:root {
  --bg: #f7f8f6; --surface: #ffffff; --surface-2: #f0f3f1; --ink: #17201d; --ink-2: #4a5752; --line: #dde3df;
  --brand: #0f766e; --brand-ink: #ffffff; --brand-soft: #e2f3f0; --accent: #f2c230;
  --go: #15803d; --go-bg: #e3f5e8; --adapter: #1d4ed8; --adapter-bg: #e5edff; --check: #a16207; --check-bg: #fdf3d8;
  --pro: #c2410c; --pro-bg: #fde9dd; --no: #b91c1c; --no-bg: #fde4e4;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 24, 20, .06), 0 4px 16px rgba(16, 24, 20, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412; --surface: #161d1a; --surface-2: #1d2622; --ink: #e8eeeb; --ink-2: #a9b6b1; --line: #2a3530;
    --brand: #2dd4bf; --brand-ink: #062a26; --brand-soft: #123530;
    --go: #4ade80; --go-bg: #12301d; --adapter: #93b4ff; --adapter-bg: #172544; --check: #facc15; --check-bg: #33290c;
    --pro: #fb923c; --pro-bg: #3a2111; --no: #f87171; --no-bg: #3b1616; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.1rem; margin: 1.2em 0 .4em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.08rem; }
.logo img { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 0; }
.nav a:hover { color: var(--brand); }
.site-footer { margin-top: 64px; padding: 36px 0 48px; border-top: 1px solid var(--line); background: var(--surface); font-size: .9rem; color: var(--ink-2); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; }
.site-footer h4 { margin: 0 0 8px; color: var(--ink); font-size: .95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 4px 0; }
.site-footer a { color: var(--ink-2); }
.crumbs { font-size: .88rem; color: var(--ink-2); margin: 18px 0 0; }
.crumbs a { color: var(--ink-2); }

/* hero */
.hero { padding: 28px 0 8px; }
.hero .lede { font-size: 1.12rem; color: var(--ink-2); max-width: 720px; margin: 0; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--ink-2); }
.trust li::before { content: "✓ "; color: var(--go); font-weight: 700; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; padding: 10px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.small { padding: 6px 10px; font-size: .88rem; }
.btn.amazon { background: #ffd814; border-color: #fcd200; color: #0f1111; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, label:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }

/* tool */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 22px 0; }
.step { border-top: 1px dashed var(--line); padding-top: 18px; margin-top: 18px; }
.step:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.step-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; font-size: 1.1rem; }
.step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .85rem; font-weight: 800; flex: none; }
.photo { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--brand-soft); border-radius: 12px; padding: 14px; }
.photo input[type=file] { display: none; }
.photo .status { font-size: .92rem; color: var(--ink-2); flex: 1 1 220px; }
.photo img.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 10px 0; }
.chip { position: relative; display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); cursor: pointer; min-height: 62px; }
.chip input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.chip .lbl { font-weight: 800; font-size: 1.05rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.chip .hint { font-size: .76rem; color: var(--ink-2); line-height: 1.25; }
.chip.on { border-color: var(--brand); background: var(--brand-soft); }
.chip select { font-size: .8rem; margin-top: 2px; }
.chip .swatch { position: absolute; top: 9px; right: 10px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.35); }
.more { margin: 4px 0 0; }
.more summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.qs { display: grid; gap: 14px; }
.q legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.q { border: 0; margin: 0; padding: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg label { border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label.on { border-color: var(--brand); background: var(--brand-soft); }
.checks label { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; font-size: .95rem; }
.checks input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.q .help { font-size: .85rem; color: var(--ink-2); margin: 4px 0 0; }

/* results */
.sysline { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; font-weight: 600; margin: 8px 0 14px; }
.flags { display: grid; gap: 8px; margin: 10px 0 16px; }
.callout { border-radius: 10px; padding: 10px 14px; font-size: .95rem; border-left: 4px solid; }
.callout.info { background: var(--adapter-bg); border-color: var(--adapter); }
.callout.check { background: var(--check-bg); border-color: var(--check); }
.callout.pro { background: var(--pro-bg); border-color: var(--pro); }
.callout.stop { background: var(--no-bg); border-color: var(--no); font-weight: 600; }
.callout.safety { background: var(--surface-2); border-color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.tcard { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.tcard .nm { font-weight: 800; line-height: 1.25; }
.tcard.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.badge { display: inline-block; font-size: .78rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; width: fit-content; }
.badge.go { background: var(--go-bg); color: var(--go); }
.badge.adapter { background: var(--adapter-bg); color: var(--adapter); }
.badge.check { background: var(--check-bg); color: var(--check); }
.badge.pro { background: var(--pro-bg); color: var(--pro); }
.badge.no { background: var(--no-bg); color: var(--no); }
.detail { margin-top: 20px; }
.detail-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-h h3 { margin: 0; font-size: 1.25rem; }
.diagram-wrap { overflow-x: auto; background: var(--surface-2); border-radius: 12px; padding: 8px; margin: 14px 0; }
.diagram { display: block; min-width: 520px; width: 100%; max-width: 680px; height: auto; margin: 0 auto; }
.dg-h { font: 700 14px var(--font); fill: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.dg-l { font: 800 17px ui-monospace, Menlo, Consolas, monospace; fill: var(--ink); }
.dg-s { font: 12px var(--font); fill: var(--ink-2); }
.dg-plate { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.dg-term { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 1.5; }
.dg-t { font: 800 15px ui-monospace, Menlo, Consolas, monospace; fill: var(--ink); }
.dg-cap { fill: var(--ink-2); }
.dg-check { fill: var(--check); font-weight: 700; } .dg-no { fill: var(--no); font-weight: 700; } .dg-cap.dg-s { fill: var(--ink-2); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
td.mono, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.35); vertical-align: -1px; margin-right: 6px; }
.st-ok { color: var(--go); font-weight: 700; } .st-cap { color: var(--ink-2); font-weight: 700; } .st-check { color: var(--check); font-weight: 700; } .st-no { color: var(--no); font-weight: 700; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.parts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.parts li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.parts .why { display: block; font-size: .84rem; color: var(--ink-2); }
ol.steps { padding-left: 1.3em; } ol.steps li { margin: 6px 0; }
.disclosure { font-size: .8rem; color: var(--ink-2); margin-top: 8px; }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* content */
.prose p, .prose li { max-width: 72ch; }
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.linkgrid a { display: block; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 700; height: 100%; }
.linkgrid a:hover { border-color: var(--brand); }
.linkgrid a span { display: block; font-weight: 400; font-size: .86rem; color: var(--ink-2); margin-top: 2px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 12px 16px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.ad { margin: 26px 0; min-height: 90px; }
.ad-placeholder { display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 12px; color: var(--ink-2); font-size: .85rem; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .tool { padding: 16px; }
  .nav { margin-left: 0; }
  .site-header { position: static; }
}
@media print { .site-header, .site-footer, .ad, .photo, .share { display: none; } .tool { box-shadow: none; } }
