:root { color-scheme: dark; }
body {
  --canvas: #0b0c10;
  --type: #f2f1ef;
  --sub: #b8bac3;
  --border: #34363e;
  --panel: #181a20;
  --lime: #c0fa73;
  --violet: #ab9bff;
  --code: "IBM Plex Mono", Consolas, monospace;
  margin: 0;
  background: var(--canvas);
  color: var(--type);
}
body .mast, body footer { background: var(--canvas); border-color: var(--border); color: var(--type); }
.mast .brand, .mast .home-nav a, footer .brand, footer a { color: var(--type); }
.mast .nav-action, main .btn.primary { color: #14180d; background: var(--lime); border-color: var(--lime); }
.mast .nav-action:hover, main .btn.primary:hover { color: #14180d; background: #d2ffa2; }
body .skip { color: #0b0c10; background: var(--lime); }
body :where(a,summary):focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
.eyebrow { color: var(--lime); font: 550 .86rem/1.5 var(--code); margin-bottom: 1.1rem; letter-spacing: .065em; }
.eyebrow .line { display: inline-block; width: 1.55rem; height: 2px; background: currentColor; }
main h1, main h2, main h3 { color: var(--type); font-family: var(--display,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif); font-weight: 580; }
main h1 em { color: var(--lime); font-style: normal; }
main h1 { line-height: .96; letter-spacing: -.071em; }
main .btn, main .guide-link, .mast .nav-action { border-radius: 999px; }
.reading-progress { display: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .reading-progress { display: block; position: fixed; inset: 0 0 auto; z-index: 6; height: 3px; background: var(--lime); transform-origin: left; animation: reading-length auto linear both; animation-timeline: scroll(root block); }
    @keyframes reading-length { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0s !important; transition-duration: 0s !important; }
}

.guide-page { --case-color: var(--lime); }
.guide-devices { --case-color: var(--violet); }
.guide-hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.91fr); align-items: center; gap: clamp(2.25rem,6vw,7rem); padding-block: clamp(3rem,6.8vw,7.6rem); }
.guide-hero h1 { margin: 0 0 1.4rem; font-size: clamp(3.35rem,6.1vw,6.85rem); }
.guide-hero h1 em, .guide-hero .eyebrow { color: var(--case-color); }
.guide-dek { max-width: 40rem; margin: 0 0 1.2rem; color: var(--sub); font-size: clamp(1.085rem,1.3vw,1.25rem); line-height: 1.56; }
.guide-page .guide-link { display: inline-flex; align-items: center; min-height: 2.9rem; padding: .45rem 1.15rem; gap: .3rem; background: var(--case-color); color: #10120e; font-size: 1rem; line-height: 1.35; font-weight: 620; text-decoration: none; }
.guide-link span { font-size: .9em; font-weight: 500; }
.case-console { --plate: #15181c; position: relative; background: var(--plate); border: 1px solid #42454d; border-radius: .55rem; padding: clamp(1.1rem,2.5vw,2.2rem); }
.case-console figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: .9rem; font-size: 1.05rem; font-weight: 620; }
.case-console figcaption span, .guide-capture figcaption span { color: var(--sub); font: .84rem/1.4 var(--code); }
.case-switch { border: 0; margin: 1rem 0 0; padding: 0; min-width: 0; }
.case-switch legend { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.choice-row { display: flex; gap: .45rem; flex-wrap: wrap; }
.choice-row label { display: inline-flex; align-items: center; position: relative; cursor: pointer; padding: .5rem .8rem; min-height: 2.75rem; line-height: 1.25; font-size: .94rem; border: 1px solid var(--border); border-radius: .4rem; color: var(--sub); }
.choice-row label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-row label:has(input:checked) { background: var(--case-color); border-color: var(--case-color); color: #11130e; font-weight: 630; }
.choice-row label:has(input:focus-visible) { outline: 3px solid #fff; outline-offset: 3px; }
.case-value { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .2rem .5rem; padding: 1.4rem 0 .7rem; }
.case-value strong { font-family: var(--display, sans-serif); font-size: clamp(3.8rem,6.7vw,6.6rem); font-weight: 510; letter-spacing: -.085em; line-height: .95; padding-right: .16em; }
.case-value span { font-size: 1.02rem; }
.case-value small { color: var(--case-color); font: .85rem/1.4 var(--code); }
.unit-matrix { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: .35rem; align-items: center; padding: .55rem 0 1.1rem; }
.unit-matrix i { aspect-ratio: 1; border: 1px solid #686d74; background: #414750; border-radius: 50%; }
.unit-matrix .flag { background: var(--case-color); border-color: var(--case-color); }
.guide-devices .unit-matrix { grid-template-columns: repeat(11, minmax(0,1fr)); }
.guide-devices .unit-matrix i { aspect-ratio: 2/1; border-radius: 2px; }
.case-quantities { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; border-block: 1px solid var(--border); padding-block: .8rem; }
.case-quantities > div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.case-quantities dt { font-size: .94rem; color: var(--sub); }
.case-quantities dd { font: 560 1.35rem/1.1 var(--code); }
.case-panel p { font-size: 1rem; color: var(--sub); line-height: 1.5; min-height: 3em; margin: .85rem 0 0; }
.case-followup { display: none; }
.case-switch:has([value="after"]:checked) .case-baseline { display: none; }
.case-switch:has([value="after"]:checked) .case-followup { display: block; }
.case-followup .unit-matrix i { border-color: color-mix(in srgb, var(--case-color) 55%, var(--panel)); background: color-mix(in srgb, var(--case-color) 25%, var(--panel)); }
.guide-body { border-top: 1px solid var(--border); padding-block: clamp(3rem,6.5vw,6rem); display: grid; grid-template-columns: minmax(12rem,.46fr) minmax(0,1fr); align-items: start; gap: clamp(2rem,7vw,7rem); }
.guide-aside { position: sticky; top: 1.5rem; }
.guide-aside nav { display: grid; gap: 0; }
.guide-label { font: .87rem/1.5 var(--code); color: var(--sub); margin: 0 0 .65rem; text-transform: uppercase; letter-spacing: .065em; }
.guide-aside nav a { display: flex; align-items: center; min-height: 2.9rem; border-bottom: 1px solid var(--border); color: var(--type); font-size: 1rem; text-decoration: none; }
.guide-aside nav a:hover { color: var(--case-color); }
.guide-capture { margin-top: 2.2rem; padding: .6rem; border: 1px solid var(--border); background: var(--panel); border-radius: .4rem; }
.guide-capture a { display: block; overflow: hidden; border-radius: .15rem; }
.guide-capture img { width: 100%; height: auto; display: block; }
.guide-capture figcaption { display: grid; gap: .22rem; padding: .7rem .15rem .2rem; }
.guide-content { max-width: 49rem; }
.guide-content section + section { border-top: 1px solid var(--border); margin-top: clamp(3rem,4.6vw,4.75rem); padding-top: clamp(3rem,4.6vw,4.75rem); }
.guide-content h2 { font-size: clamp(2.1rem,3.7vw,4rem); line-height: 1.04; letter-spacing: -.062em; margin-bottom: 1rem; }
.guide-content p, .guide-content dd { color: var(--sub); font-size: 1.075rem; line-height: 1.65; margin-bottom: 1rem; }
.guide-content code { color: var(--case-color); font-family: var(--code); font-size: .94em; }
.guide-files { margin-top: 1.5rem; border-bottom: 1px solid var(--border); }
.guide-files > div { display: grid; grid-template-columns: minmax(6rem,.37fr) minmax(0,1fr); gap: 1.2rem; border-top: 1px solid var(--border); padding-block: 1rem; }
.guide-files dt { font-weight: 610; line-height: 1.52; }
.guide-files dd { margin: 0; }
.guide-note { border-left: 3px solid var(--case-color); padding: 1.2rem 1.4rem; background: var(--panel); margin-top: 1.5rem; }
.guide-note strong { color: var(--case-color); }
.guide-note p { margin: .4rem 0 0; }
.result-options { margin-top: 1.5rem; border-bottom: 1px solid var(--border); }
.result-options details { border-top: 1px solid var(--border); }
.result-options summary { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 3.3rem; padding: .7rem 0; list-style: none; cursor: pointer; font-size: 1.15rem; font-weight: 610; }
.result-options summary::-webkit-details-marker { display: none; }
.result-options summary::after { content: "+"; color: var(--case-color); font: 1.45rem/1 var(--code); }
.result-options details[open] summary::after { content: "−"; }
.result-options p { margin: -.1rem 0 1.1rem; max-width: 62ch; }
.guide-related { border-top: 1px solid var(--border); background: #15171c; }
.guide-related-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; padding-block: clamp(2.25rem,5vw,4.5rem); }
.guide-related-inner > div a { font-size: clamp(1.2rem,2.4vw,2.2rem); font-weight: 530; letter-spacing: -.035em; text-decoration: none; }
.guide-related .btn { color: #11130e; background: var(--case-color); }
@media (prefers-reduced-motion: no-preference) {
  .case-panel { animation: change-case .3s cubic-bezier(.22,.68,.2,1) both; }
  @keyframes change-case { from { opacity: .38; transform: translateY(.4rem); } to { opacity: 1; transform: none; } }
  @supports (animation-timeline: view()) {
    .guide-content section { animation: reveal-copy linear both; animation-timeline: view(block); animation-range: entry 0% entry 25%; }
    @keyframes reveal-copy { from { opacity: .63; transform: translateY(1.35rem); } to { opacity: 1; transform: none; } }
    .guide-hero .case-console { animation: turn-console linear both; animation-timeline: view(block); animation-range: exit 0% exit 100%; }
    @keyframes turn-console { from { transform: none; } to { transform: perspective(1500px) rotateX(3deg) translateY(1.5rem); } }
  }
}
@media (max-width: 48rem) {
  .guide-hero, .guide-body { grid-template-columns: 1fr; gap: 1.8rem; }
  .guide-hero { padding-block: 3rem 2.2rem; }
  .guide-hero h1 { font-size: clamp(2.85rem,9.2vw,5.25rem); }
  .guide-aside { position: static; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.9fr); align-items: start; gap: 1.3rem; }
  .guide-capture { margin-top: 0; }
  .guide-body { padding-block: 2.2rem 3.7rem; gap: 2.8rem; }
}
@media (max-width: 31rem) {
  .guide-aside { grid-template-columns: 1fr; }
  .guide-capture { display: grid; grid-template-columns: .8fr 1fr; align-items: center; gap: .7rem; }
  .guide-files > div { grid-template-columns: 1fr; gap: .28rem; }
  .case-value strong { font-size: 4.6rem; }
  .case-switch label { padding: .4rem .6rem; }
}
@media print {
  body { background: white; color: black; }
  main h1, main h2, main h3, .guide-content p, .guide-content dd { color: #161719; }
  .guide-page .mast, .reading-progress, .guide-aside, .guide-related, footer { display: none; }
  .guide-hero, .guide-body { display: block; padding-block: 1rem; }
  .guide-hero h1 { color: black; font-size: 2.4rem; }
  .guide-hero h1 em { color: #333; }
  .case-console { color: white; print-color-adjust: exact; margin-top: 1rem; }
  .guide-note { background: #eee; }
  .result-options details > p { display: block; }
}

