/* Shared by the homepage entry and the static, readable-without-JS guide library. */
.code-finder, .section.code-finder { margin-block: 28px; padding: clamp(24px, 4vw, 48px); border: 1px solid #294151; border-radius: 24px; background: linear-gradient(130deg, #132a38, #0a1823); color: #f1f6f8; }
.code-finder-heading { max-width: 740px; }
.code-finder .code-inventory, .code-page .code-inventory { display: inline-block; margin: 16px 0 0; padding: 9px 13px; border: 1px solid #6a523b; border-radius: 9px; color: #f0c797; background: #251e17; font-size: .9rem; font-weight: 700; }
.code-category-nav { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0 28px; }
.code-category-nav a { display: inline-flex; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid #456274; border-radius: 10px; color: #d6e2e6; background: #122632; font-size: .85rem; text-decoration: none; }
.code-category-nav a:hover { background: #234455; border-color: #b3d4e4; }
.code-category-count { min-width: 1.5em; text-align: center; color: #efc18b; font-family: ui-monospace, monospace; font-weight: 800; }
.code-page .code-category-section { margin-top: 32px; padding-top: 20px; scroll-margin-top: 112px; }
.code-category-section h2 { margin-bottom: 18px; }
.code-finder h2 { margin: 0 0 14px; font-size: clamp(1.7rem, 3.3vw, 2.6rem); line-height: 1.15; letter-spacing: -.025em; color: #f1f6f8; }
.code-finder p { color: #c8d8df; line-height: 1.65; }
.code-search { margin-block: 26px; }
.code-search label { display: block; margin-bottom: 10px; font-size: .87rem; font-weight: 700; color: #d6e2e6; }
.code-search-row { display: flex; gap: 10px; }
.code-search input { flex: 1; min-width: 0; width: 100%; border: 1px solid #587588; border-radius: 12px; padding: 15px 17px; background: #07131d; color: #f1f6f8; font: inherit; font-size: 1rem; }
.code-search input::placeholder { color: #a3b7c2; }
.code-search button, .code-empty button, .code-primary-link { display: inline-flex; align-items: center; justify-content: center; gap: 14px; border: 1px solid #c9945a; border-radius: 12px; background: #c9945a; color: #07131d; padding: 14px 20px; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; }
.code-search button:hover, .code-primary-link:hover { background: #e2ae75; color: #07131d; }
.code-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.code-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px 30px 20px 18px; border: 1px solid #365163; border-radius: 14px; background: #0b1c28; color: #d6e2e6; font-size: .9rem; font-weight: 500; line-height: 1.5; text-decoration: none; transition: border-color .15s, background .15s; }
.code-card:hover { border-color: #a8c7d7; background: #193242; color: #fff; }
.code-card-number { color: #e3b27e; font-family: ui-monospace, monospace; font-weight: 800; font-size: 1.3rem; letter-spacing: .04em; }
.code-card-arrow { position: absolute; right: 14px; top: 17px; color: #9db6c3; }
.code-finder-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 24px; }
.code-finder-links a, .code-related > a { color: #b3d4e4; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.code-finder :focus-visible, .code-page :focus-visible { outline: 3px solid #f2be81; outline-offset: 4px; }
.code-page .legal-shell { width: min(1160px, calc(100% - 40px)); }
.code-page main { width: 100%; margin-top: 24px; }
.code-page h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 900px; line-height: 1.17; }
.code-page h3 { font-size: 1.05rem; margin: 0 0 10px; color: #f1f6f8; }
.code-page h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.code-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: #a5bbc7; margin: 28px 0 36px; }
.code-breadcrumb a { font-weight: 600; }
.code-directory-hero { max-width: 820px; padding: 14px 0; }
.code-directory-hero h1 { max-width: 750px; font-size: clamp(2rem, 5vw, 3.8rem); }
.code-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.code-directory-grid .code-card { padding: 25px; min-height: 120px; }
.code-result-count { color: #a5bbc7; font-size: .9rem; }
.code-empty { padding: 22px; margin: 18px 0; border: 1px solid #6a523b; border-radius: 12px; background: #261f18; }
.code-empty p { margin-top: 0; }
.code-page [hidden], .code-card[hidden] { display: none !important; }
.code-hero { padding-bottom: 32px; border-bottom: 1px solid #294151; }
.code-display { display: inline-block; margin: 0 0 18px; padding: 8px 14px; border: 1px solid #6a523b; border-radius: 8px; background: #251e17; color: #e3b27e; font-family: ui-monospace, monospace; font-size: 1.2rem; letter-spacing: .07em; }
.code-page .code-byline { font-size: .8rem; color: #9eb3be; margin-top: 18px; }
.code-article-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(200px, 1fr); gap: 56px; }
.code-article { min-width: 0; }
.code-article section { padding: 30px 0; scroll-margin-top: 112px; }
.code-article section:first-of-type { border: none; margin-top: 0; }
.code-focus, .code-question { border-left: 3px solid #c9945a; padding: 18px 22px; background: #142734; border-radius: 0 12px 12px 0; margin-top: 22px; }
.code-focus p, .code-question p { margin-bottom: 0; }
.code-page .code-term { color: #d7e8f1; text-decoration: underline dotted; text-underline-offset: 4px; }
.code-page .code-term:hover { color: #f2be81; }
.code-page .code-reading-help { font-size: .9rem; line-height: 1.7; }
.code-reading-help a, .code-glossary-continue { color: #b3d4e4; text-decoration: underline; text-underline-offset: 4px; }
.code-article .code-glossary { padding: 24px; border: 1px solid #365163; border-radius: 16px; background: #0c202d; margin: 0 0 14px; }
.code-glossary h2 { margin-top: 0; }
.code-glossary dl { margin: 20px 0; }
.code-definition { padding: 14px 0; border-top: 1px solid #294151; scroll-margin-top: 112px; }
.code-definition dt { color: #f1f6f8; font-weight: 700; line-height: 1.5; }
.code-definition dd { margin: 5px 0 0; color: #c0d0d9; line-height: 1.75; font-size: .95rem; }
.code-definition:target { background: #233c4b; box-shadow: 0 0 0 10px #233c4b; border-color: transparent; border-radius: 4px; }
.code-glossary-continue { display: inline-block; padding: 8px 0; font-size: .9rem; }
.code-toc { position: sticky; top: 28px; align-self: start; margin-top: 34px; padding: 24px; border: 1px solid #294151; border-radius: 16px; background: #0b1c28; }
.code-toc nav { display: grid; gap: 17px; }
.code-toc nav a, .code-toc p, .code-toc > a { font-size: .88rem; }
.code-toc p { margin-top: 24px; padding-top: 18px; border-top: 1px solid #294151; color: #a5bbc7; }
.code-steps { padding-left: 24px; }
.code-steps li { margin-bottom: 18px; padding-left: 8px; }
.code-steps li::marker { color: #e3b27e; font-weight: 800; }
.code-source-links a { font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.code-page .code-small { color: #a5bbc7; font-size: .88rem; line-height: 1.65; }
.code-case { padding: 28px; margin-top: 32px; border: 1px solid #365163; border-radius: 16px; }
.code-case p { max-width: 780px; }
.code-next { padding: clamp(24px, 4vw, 42px); margin: 34px 0; background: linear-gradient(110deg, #193745, #101e2c); border: 1px solid #526c7b; border-radius: 20px; }
.code-next > p { max-width: 780px; }
.code-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin: 24px 0; }
.code-related .code-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 20px; }
.code-analytics-settings button { background: transparent; color: #a5bbc7; font: inherit; font-size: .8rem; border: 0; text-decoration: underline; cursor: pointer; padding: 8px 0; }
.code-skip { position: absolute; top: -100px; left: 20px; padding: 14px; background: #f1f6f8; color: #07131d; z-index: 10; }
.code-skip:focus { top: 10px; }
.code-consent { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); width: min(1000px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow: auto; display: flex; gap: 24px; align-items: center; padding: 20px 24px; z-index: 20; border: 1px solid #587588; border-radius: 16px; background: #142734; box-shadow: 0 16px 60px #0009; }
.code-consent p { font-size: .85rem; margin-bottom: 0; line-height: 1.5; }
.code-consent-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 10px; }
.code-consent button { font: inherit; font-size: .85rem; font-weight: 700; padding: 12px 14px; border-radius: 9px; border: 1px solid #91b3c5; background: #142734; color: #f1f6f8; cursor: pointer; }
.code-consent button[data-consent="granted"] { color: #07131d; background: #c9945a; border-color: #c9945a; }
@media (max-width: 900px) {
  .code-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .code-article-layout { grid-template-columns: 1fr; gap: 0; }
  .code-toc { position: static; grid-row: 1; margin: 22px 0 0; padding: 18px; }
  .code-toc nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }
  .code-toc nav strong { flex-basis: 100%; }
  .code-toc > p, .code-toc > a { display: none; }
  .code-consent { flex-direction: column; align-items: stretch; gap: 14px; }
}
@media (max-width: 520px) {
  .code-finder, .section.code-finder { padding: 24px 18px; border-radius: 16px; }
  .code-search-row { flex-direction: column; }
  .code-search button { width: 100%; }
  .code-card { padding: 17px 25px 17px 14px; font-size: .84rem; }
  .code-page .legal-shell { width: calc(100% - 32px); }
  .code-directory-grid, .code-related .code-card-grid { grid-template-columns: 1fr; }
  .code-directory-grid .code-card { min-height: 0; }
  .code-focus, .code-question { padding: 18px; }
  .code-article .code-glossary { padding: 18px; }
  .code-breadcrumb { margin-bottom: 24px; }
  .code-consent { padding: 18px; }
}
