:root {
  color-scheme: dark;
  --bg: #161c1a; --surface: #1f2725; --raised: #2a3530;
  --ink: #e3e2da; --muted: #b4bcb5; --accent: #9fc7b8; --error: #ffb8a9;
  --line: rgba(255,255,255,.08);
  --line-hover: color-mix(in srgb, var(--accent) 30%, transparent);
  --radius: 12px;
  --body: 1rem; --small: .875rem; --kicker: .75rem; --lead: 1.25rem; --head: 2rem;
  --display: clamp(2.25rem,5.2vw,4.75rem); --mobile-display: 2.5rem; --score-size: 3rem;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--muted) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--body)/1.65 'Work Sans', system-ui; }
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-underline-offset: .25em; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button, a, input, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }
a, button, summary { transition: color .18s, background-color .18s, border-color .18s; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
strong, b { font-weight: 600; }
.wrap { max-width: 1248px; margin-inline: auto; padding-inline: var(--s4); }
.skip { position: absolute; top: -100px; left: var(--s2); background: var(--surface); padding: var(--s2); z-index: 10; }
.skip:focus { top: var(--s2); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 96px; }
.brand { font-size: var(--lead); font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; vertical-align: middle; margin-right: var(--s1); }
.site-nav { display: flex; gap: var(--s4); flex-wrap: wrap; }
.site-nav a { text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.site-nav a[aria-current=page] { color: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--display); line-height: 1.08; letter-spacing: -.025em; margin-bottom: var(--s4); }
h2 { font-size: var(--head); line-height: 1.25; letter-spacing: -.025em; margin-bottom: var(--s4); }
h3 { font-size: var(--lead); line-height: 1.4; margin-bottom: var(--s2); }
p, ul, ol { max-width: 68ch; }
p { margin-bottom: var(--s4); }
ul, ol { padding-left: var(--s3); }
.lead { font-size: var(--lead); line-height: 1.5; max-width: 49ch; }
.muted, .small { color: var(--muted); }
.small, .disclaimer { font-size: var(--small); line-height: 1.6; }
.disclaimer { color: var(--muted); }
.kicker { font-size: var(--kicker); font-weight: 600; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s2); }
.section { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line); }
.section-heading { margin-bottom: var(--s4); max-width: 48rem; }
.section-heading h2 { margin-bottom: 0; }
.card, .upload-panel, .result, .article-cta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); transition: border-color .18s; }
@media (hover: hover) { .card:hover, .upload-panel:hover, .result:hover, .article-cta:hover { border-color: var(--line-hover); } }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: var(--s4); align-items: start; padding-top: var(--s5); }
.hero-copy { grid-column: 1; grid-row: 1; }
.hero-details { grid-column: 1; grid-row: 2; }
.hero > .upload-panel { grid-column: 2; grid-row: 1 / span 2; }
.home-hero { display: flex; flex-direction: column; align-items: center; gap: var(--s4); padding-top: var(--s5); }
.home-hero .hero-copy { text-align: center; width: 100%; }
.home-hero h1 { margin-bottom: var(--s3); }
.home-hero .lead { margin: 0 auto; }
.home-hero .upload-panel { width: 100%; max-width: 640px; background: transparent; padding: 0; border: 0; }
.home-hero form { display: grid; gap: var(--s3); }
.upload-entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); }
.upload-entry:hover { border-color: var(--line-hover); }
.upload-panel h2 { margin-bottom: var(--s2); }
.consent { display: flex; align-items: flex-start; gap: var(--s2); margin-bottom: var(--s3); }
.consent input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); margin: 0; }
.consent label { font-size: var(--small); line-height: 1.6; }
.home-hero .consent { margin: 0; }
.file-label { display: block; font-weight: 600; margin-bottom: var(--s2); }
.file-picker { position: relative; display: flex; align-items: center; justify-content: center; min-height: 56px; padding-inline: var(--s2); background: transparent; border: 1px solid var(--muted); border-radius: var(--radius); color: var(--ink); }
.file-picker:has(input:disabled) { color: var(--muted); border-color: var(--line); }
.file-picker:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; }
.file-picker .file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-picker .file-input:disabled { cursor: not-allowed; }
.button, button.primary, .secondary, .coming-soon { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: var(--s2) var(--s3); border: 1px solid var(--muted); border-radius: var(--radius); background: transparent; color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.4; }
.button:hover, .secondary:hover { border-color: var(--accent); color: var(--accent); }
button.primary { width: 100%; margin-top: var(--s2); border-color: var(--accent); background: var(--accent); color: var(--bg); }
button.primary:not(:disabled):hover { background: var(--ink); border-color: var(--ink); }
.home-hero button.primary { margin: 0; }
button:disabled { opacity: .5; }
.preview { display: block; max-width: 100%; max-height: 260px; margin: var(--s3) auto; object-fit: contain; }
.home-hero .preview { margin-block: 0; }
.status { margin: var(--s2) 0 0; color: var(--muted); font-size: var(--small); }
.status:empty { display: none; }
.error { color: var(--error); margin: var(--s2) 0 0; }
.home-hero .status, .home-hero .error { margin: 0; }
.privacy-note { text-align: center; margin: 0 auto; }
.two-columns { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: var(--s4); }
.tool-notes ul { margin-block: 0 var(--s4); }
.tool-notes li { margin-bottom: var(--s2); }
.tool-notes .two-columns > div > :last-child { margin-bottom: 0; }
.result { margin-top: var(--s7); scroll-margin-top: var(--s3); }
.result-top { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.result-top h2 { margin-bottom: var(--s2); }
.result-top p:last-child { margin-bottom: 0; }
.score-ring { position: relative; width: 160px; height: 160px; flex: none; display: grid; place-items: center; }
.score-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { stroke: var(--raised); }
.ring-arc { stroke: var(--accent); transition: stroke-dasharray .6s; }
.score-number { font-size: var(--score-size); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.dimension-list { padding: 0; margin: 0 0 var(--s4); list-style: none; max-width: none; }
.dimension-list li { padding: var(--s3) 0; }
.dimension-list li + li { border-top: 1px solid var(--line); }
.dimension-heading { display: flex; justify-content: space-between; gap: var(--s2); align-items: baseline; }
.dimension-heading h3 { margin: 0 0 var(--s2); }
.dimension-score { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--accent); }
.dimension-list p { margin-bottom: var(--s1); }
.dimension-list .tip { color: var(--muted); }
.coming-soon { max-width: 100%; white-space: normal; }
.result .disclaimer { margin: var(--s3) 0 var(--s2); }
.result > p:last-child { margin-bottom: 0; }
.sample-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: var(--s4); align-items: center; }
.sample-layout:has(.sample-image[hidden]) { grid-template-columns: minmax(0,1fr); }
.sample-image { margin: 0; }
.sample-image:not(.image-ready) { visibility: hidden; }
.sample-image img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.sample-image figcaption { margin-top: var(--s2); color: var(--muted); font-size: var(--small); }
.sample-points { padding-left: var(--s3); margin: 0 0 var(--s4); }
.sample-points li { margin-bottom: var(--s2); }
.sample-points li::marker { color: var(--accent); }
.feature-grid, .step-grid, .reading-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--s4); }
.feature-card { display: flex; flex-direction: column; gap: var(--s3); }
.feature-title { display: flex; align-items: center; gap: var(--s2); }
.feature-title h3 { margin: 0; }
.feature-icon { width: 24px; height: 24px; flex: none; color: var(--accent); }
.feature-card p { margin-bottom: 0; }
.feature-scale { display: flex; align-items: center; gap: var(--s2); margin-top: auto; font-size: var(--kicker); color: var(--muted); font-variant-numeric: tabular-nums; }
.scale-track { height: 1px; flex: 1; background: var(--line); display: flex; align-items: center; justify-content: space-between; }
.scale-track i { display: block; height: 8px; width: 1px; background: var(--muted); }
.step-grid { padding: 0; margin: 0; max-width: none; list-style: none; }
.step-card { display: flex; gap: var(--s3); align-items: flex-start; }
.step-number { color: var(--accent); font-size: var(--score-size); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.step-card p { margin: 0; }
.reading-card p { margin-bottom: var(--s3); }
.reading-card p:last-child { margin-bottom: 0; }
.faq-layout, .faq-section { display: grid; grid-template-columns: minmax(0,4fr) minmax(0,6fr); gap: var(--s4); }
.faq-intro h2 { margin-bottom: var(--s2); }
.faq-list details { border-bottom: 1px solid var(--line); padding: var(--s2) 0; }
.faq-list details:first-child { padding-top: 0; }
.faq-list summary { cursor: pointer; font-size: var(--body); font-weight: 600; line-height: 1.5; min-height: 48px; padding-block: var(--s1); }
.faq-list summary::marker { color: var(--accent); }
.faq-list details p { margin: var(--s2) 0 0; }
.footer { margin-top: var(--s7); padding-block: var(--s5) var(--s4); border-top: 1px solid var(--line); background: var(--surface); }
.footer-top { display: flex; justify-content: space-between; gap: var(--s4); }
.footer nav { display: flex; gap: var(--s3); flex-wrap: wrap; }
.footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-name { font-size: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -.025em; margin: var(--s4) 0 var(--s3); }
.footer .small { margin: 0; }
.article-head { max-width: 920px; margin: var(--s5) 0 var(--s7); }
.article-head h1 { max-width: 18ch; }
.article-section { display: grid; grid-template-columns: minmax(0,4fr) minmax(0,6fr); gap: var(--s4); margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line); }
.article-section p:last-child { margin-bottom: 0; }
.bands { list-style: none; padding: 0; margin: 0; }
.bands li { padding: var(--s3) 0; }
.bands li:first-child { padding-top: 0; }
.article-cta { margin-top: var(--s7); }
.inline-links { display: flex; gap: var(--s3); flex-wrap: wrap; }
.sample-report { max-width: 900px; }
.sample-report .result { margin-top: 0; }
.footer a:hover, .site-nav a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .site-nav { gap: var(--s2); }
  .hero:not(.home-hero) h1 { font-size: var(--mobile-display); }
  .step-card { flex-direction: column; gap: var(--s2); }
}
@media (max-width: 640px) {
  .wrap { padding-inline: var(--s2); }
  .site-header { flex-wrap: wrap; justify-content: flex-start; gap: var(--s1); padding-block: var(--s2); }
  .site-nav { width: 100%; gap: var(--s3); font-size: var(--small); }
  h1, .hero h1, .article-head h1 { font-size: var(--mobile-display); }
  h2 { font-size: var(--lead); }
  .hero { grid-template-columns: minmax(0,1fr); gap: var(--s4); padding-top: var(--s4); }
  .hero-copy, .hero-details, .hero > .upload-panel { grid-column: 1; grid-row: auto; }
  .hero > .upload-panel { order: 1; }
  .hero-details { order: 2; }
  .home-hero { gap: var(--s3); }
  .home-hero h1 { margin-bottom: var(--s2); }
  .home-hero .lead { font-size: var(--body); }
  .home-hero form { gap: var(--s2); }
  .section, .result, .article-section, .article-cta { margin-top: var(--s6); }
  .two-columns, .sample-layout, .feature-grid, .step-grid, .reading-grid, .faq-layout, .faq-section, .article-section { grid-template-columns: minmax(0,1fr); }
  .result-top { flex-direction: column; align-items: flex-start; }
  .score-ring { width: 140px; height: 140px; }
  .dimension-heading h3 { font-size: var(--body); }
  .dimension-score { font-size: var(--small); }
  .coming-soon { width: 100%; }
  .footer { margin-top: var(--s6); }
  .footer-top { flex-direction: column; gap: var(--s2); }
  .article-head { margin: var(--s4) 0 var(--s6); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
