:root {
  --ink: #101318;
  --ink-2: #262b33;
  --cream: #f7f5ef;
  --paper: #ffffff;
  --line: #dedbd1;
  --muted: #6b6f76;
  --signal: #f6c84c;
  --signal-dark: #9a7111;
  --green: #16795a;
  --green-bg: #e9f6f0;
  --red: #b63d3d;
  --red-bg: #fff0ee;
  --amber: #9a6500;
  --amber-bg: #fff6dc;
  --blue: #2f5f9f;
  --blue-bg: #eef5ff;
  --shadow: 0 18px 50px rgba(16, 19, 24, .09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--cream); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(247,245,239,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(16,19,24,.08);
}
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--signal); color: var(--ink); font-weight: 900; }
nav { display: flex; align-items: center; gap: 24px; }
nav a { text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 650; }
.nav-button { border: 1px solid var(--ink); background: transparent; border-radius: 999px; padding: 8px 13px; font-weight: 750; }

main { overflow: hidden; }
.hero { max-width: 920px; margin: 0 auto; text-align: center; padding: clamp(76px, 10vw, 130px) 22px 46px; }
.eyebrow, .section-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 850; color: var(--signal-dark); margin: 0 0 15px; }
h1 { font-size: clamp(48px, 8vw, 92px); line-height: 1; letter-spacing: -.06em; margin: 0; font-weight: 880; }
.hero h1 { margin-bottom: 24px; }
h1 em { font-style: normal; position: relative; white-space: nowrap; }
h1 em::after { content: ""; position: absolute; left: 2%; right: 0; bottom: .02em; height: .13em; background: var(--signal); z-index: -1; transform: rotate(-1deg); }
.hero-copy { max-width: 720px; margin: 0 auto 22px; color: var(--ink-2); font-size: clamp(18px, 2.2vw, 23px); line-height: 1.5; letter-spacing: -.018em; }
.hero-savings { max-width: 720px; margin: 0 auto 24px; color: var(--ink); font-size: clamp(16px, 1.8vw, 19px); line-height: 1.4; font-weight: 800; }
.trust-row { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.trust-row span, .privacy-pill { border: 1px solid var(--line); background: rgba(255,255,255,.65); border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--ink-2); }

.checker-shell { width: min(940px, calc(100% - 28px)); margin: 20px auto 90px; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: clamp(18px, 4vw, 38px); }
.checker-topline, .tray-header, .result-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.free-callout { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin: 0 0 18px; padding: 15px 18px; border: 1px solid #b8ddcd; border-radius: 14px; background: #effaf5; color: #174f3c; }
.free-callout strong { font-size: 16px; }
.free-callout span { font-size: 13px; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -.04em; margin: 0; }
h3 { margin: 0; letter-spacing: -.02em; }
.drop-zone { margin-top: 26px; min-height: 330px; border: 2px dashed #c9c4b6; border-radius: 22px; background: #fbfaf6; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 34px; transition: .18s ease; outline: none; }
.drop-zone:hover, .drop-zone:focus, .drop-zone.dragover { border-color: var(--signal-dark); background: #fffaf0; transform: translateY(-1px); }
.upload-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; color: var(--ink); background: var(--signal); font-size: 30px; font-weight: 900; margin-bottom: 18px; }
.drop-title { margin: 0; font-size: 24px; font-weight: 850; letter-spacing: -.03em; }
.drop-help { max-width: 560px; color: var(--muted); line-height: 1.5; margin: 10px auto 22px; }
.handwriting-help { max-width: 590px; margin: -8px auto 22px; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.media-help { max-width: 720px; margin: 8px auto 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.primary-button, .secondary-button { border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 850; transition: .15s ease; }
.primary-button { color: var(--ink); background: var(--signal); box-shadow: 0 7px 18px rgba(154,113,17,.14); }
.primary-button:hover { transform: translateY(-1px); filter: brightness(.98); }
.secondary-button { color: var(--ink); background: #f3f1eb; border: 1px solid #ddd9cd; }
.secondary-button:hover { background: #ece9e1; }
.full { width: 100%; }
.text-button { background: transparent; border: 0; padding: 8px 0; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.danger-text { color: var(--red); }

.file-tray { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.file-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 9px; }
.file-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fcfbf8; }
.file-meta { min-width: 0; }
.file-name { display: block; font-weight: 780; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-detail { font-size: 12px; color: var(--muted); margin-top: 3px; }
.file-remove { border: 0; background: transparent; color: var(--muted); font-size: 18px; padding: 4px 8px; }
.parse-status { min-height: 22px; font-size: 13px; color: var(--muted); margin: 10px 0 14px; }
.parse-status.error { color: var(--red); }

.results { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.media-scope { margin-bottom: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.media-scope h3 { margin: 6px 0 8px; }
.media-scope p { margin: 0; line-height: 1.55; }
.media-scope .media-scope-note { margin-top: 8px; color: var(--muted); }
.ocr-review { margin: 0 0 22px; padding: 20px; border: 1px solid #eed99f; border-radius: 16px; background: var(--amber-bg); }
.ocr-review > p:not(.section-kicker) { margin: 8px 0 16px; color: var(--ink-2); line-height: 1.5; }
.ocr-editors { display: grid; gap: 14px; margin-bottom: 14px; }
.ocr-editor label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 13px; font-weight: 800; }
.ocr-editor textarea { width: 100%; min-height: 150px; resize: vertical; padding: 12px; border: 1px solid #d1b96f; border-radius: 10px; background: white; color: var(--ink); font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.score-card { display: grid; grid-template-columns: 1fr 170px; align-items: center; gap: 26px; padding: 26px; background: var(--ink); color: white; border-radius: 20px; }
.score-card .section-kicker { color: #edce7a; }
.score-line { display: flex; align-items: baseline; gap: 4px; }
#scoreValue { font-size: 76px; line-height: .9; font-weight: 900; letter-spacing: -.07em; }
.score-denom { color: #b7bac0; font-size: 20px; font-weight: 700; }
.score-label { margin: 12px 0 0; color: #d8d9dc; font-weight: 650; }
.score-gauge { width: 150px; height: 150px; border-radius: 50%; padding: 14px; background: conic-gradient(var(--signal) var(--score,0%), #313640 0); }
.score-gauge span { display: block; width: 100%; height: 100%; background: var(--ink); border-radius: 50%; }

.top-fixes { margin: 24px 0; padding: 20px; border: 1px solid #ecd4a0; background: #fff9e8; border-radius: 16px; }
.top-fixes h3 { margin-bottom: 12px; }
.top-fixes ol { padding-left: 22px; margin: 0; display: grid; gap: 8px; }
.result-toolbar { flex-wrap: wrap; margin-bottom: 16px; }
.filter-group, .toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-button { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 750; }
.filter-button.active { color: white; background: var(--ink); border-color: var(--ink); }
.finding-list { display: grid; gap: 10px; }
.finding { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: white; }
.finding-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.finding-title { display: flex; gap: 10px; align-items: center; font-weight: 820; }
.severity { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.finding.critical { border-color: #efc1bc; background: var(--red-bg); }
.finding.critical .severity { color: var(--red); background: #ffd8d3; }
.finding.warning { border-color: #eed99f; background: var(--amber-bg); }
.finding.warning .severity { color: var(--amber); background: #ffe9a7; }
.finding.info { border-color: #c9d9ed; background: var(--blue-bg); }
.finding.info .severity { color: var(--blue); background: #dbeaff; }
.finding.pass { border-color: #b9ddce; background: var(--green-bg); }
.finding.pass .severity { color: var(--green); background: #caeddf; }
.finding p { margin: 9px 0 0; line-height: 1.45; color: var(--ink-2); }
.finding .evidence { font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.finding .source { font-size: 11px; color: var(--muted); margin-top: 8px; }

.share-card { margin-top: 22px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: #fbfaf6; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 22px; align-items: center; }
.share-card h3 { font-size: 19px; }
.share-card p:not(.section-kicker) { max-width: 620px; margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.share-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 14px; }
.share-status { grid-column: 1 / -1; min-height: 1.4em; color: var(--muted); font-size: 13px; }

.deep-review-card { margin-top: 22px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.deep-review-card[hidden], .media-scope[hidden] { display: none !important; }
.deep-review-card p:not(.section-kicker) { color: var(--muted); line-height: 1.5; margin: 7px 0 0; max-width: 650px; }
.deep-review-card .deep-review-privacy { font-size: 13px; }
.deep-review-status { grid-column: 1/-1; font-size: 13px; color: var(--muted); }
.deep-review-results { grid-column: 1/-1; display: grid; gap: 9px; }

.info-section, .use-cases-section, .privacy-section, .pricing-section, .faq-section { width: min(1060px, calc(100% - 36px)); margin: 110px auto; }
.use-cases-section { margin-top: 84px; padding: clamp(28px, 5vw, 54px); border: 1px solid var(--line); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.use-cases-heading { max-width: 780px; }
.use-cases-lead { margin: 12px 0 0; color: var(--ink-2); font-size: clamp(22px, 3vw, 32px); line-height: 1.25; font-weight: 780; letter-spacing: -.025em; }
.use-case-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0; padding: 0; list-style: none; }
.use-case-list li { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fbfaf6; color: var(--ink-2); font-size: 14px; font-weight: 700; line-height: 1.25; }
.use-case-list a { text-decoration: none; }
.use-case-list a:hover, .use-case-list a:focus-visible { text-decoration: underline; }
.use-cases-statement { margin: 0; padding: 20px 22px; border-left: 5px solid var(--signal); background: #fff9e8; color: var(--ink); font-size: clamp(20px, 2.6vw, 28px); line-height: 1.35; letter-spacing: -.025em; }
.use-cases-qualifier { max-width: 900px; margin: 24px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.use-cases-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; font-weight: 650; }
.section-heading { max-width: 770px; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 36px; }
.steps-grid article { padding: 26px; background: white; border: 1px solid var(--line); border-radius: 18px; }
.steps-grid article span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--signal); font-weight: 900; margin-bottom: 34px; }
.steps-grid h3 { font-size: 21px; }
.steps-grid p { color: var(--muted); line-height: 1.5; }
.privacy-section { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; background: var(--ink); color: white; padding: clamp(28px,5vw,58px); border-radius: 28px; }
.privacy-section .section-kicker { color: #edce7a; }
.privacy-copy { color: #d7d9dd; line-height: 1.65; font-size: 17px; }
.pricing-section { display: grid; gap: 34px; }
.pricing-heading { max-width: 760px; margin: 0 auto; text-align: center; }
.pricing-heading h2 { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; }
.pricing-heading > p:last-child { color: var(--muted); font-size: 18px; line-height: 1.5; }
.pricing-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: stretch; }
.pricing-card { min-width: 0; padding: 34px; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pricing-card.paid-plan { border-color: var(--signal-dark); box-shadow: 0 18px 55px rgba(220,164,0,.16); }
.plan-name { margin: 0 0 8px; font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pricing-card h3 { margin: 0; font-size: clamp(48px,7vw,64px); line-height: 1; }
.pricing-card h3 span { font-size: 16px; color: var(--muted); letter-spacing: 0; }
.pricing-copy { color: var(--muted); line-height: 1.5; }
.pricing-card ul { list-style: "✓  "; padding-left: 20px; display: grid; gap: 10px; margin: 25px 0; }
.pricing-card .full { margin-top: auto; }
.pricing-privacy { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 22px; }
.pricing-note { font-size: 12px; color: var(--muted); text-align: center; }
.subscription-status { min-height: 1.5em; color: var(--muted); font-size: .9rem; text-align: center; }
.paywall-dialog { width: min(520px, calc(100% - 32px)); padding: clamp(26px, 6vw, 42px); border: 0; border-radius: 24px; box-shadow: 0 28px 90px rgba(10,14,22,.28); color: var(--ink); }
.paywall-dialog::backdrop { background: rgba(16,19,24,.68); backdrop-filter: blur(4px); }
.paywall-dialog h2 { margin: 0 0 14px; font-size: clamp(34px, 7vw, 50px); line-height: 1; letter-spacing: -.045em; }
.paywall-dialog > p:not(.section-kicker):not(.subscription-status) { color: var(--muted); line-height: 1.6; }
.paywall-dialog ul { margin: 22px 0; padding-left: 22px; display: grid; gap: 10px; }
.dialog-close { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink); font-size: 26px; cursor: pointer; }
.faq-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 7vw, 90px); align-items: start; }
.faq-section h2 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -.045em; }
.faq-answer { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.72); }
.faq-answer p { margin: 0; color: var(--ink-2); font-size: 17px; line-height: 1.7; }

footer { padding: 40px clamp(20px,5vw,72px); border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; }
footer p { color: var(--muted); }
.footer-links { display: flex; gap: 18px; }
.noscript { position: fixed; inset: auto 20px 20px; background: var(--red-bg); color: var(--red); padding: 16px; border-radius: 12px; }

@media (max-width: 760px) {
  nav a { display: none; }
  .site-header { padding: 14px 18px; }
  .hero { padding-top: 64px; }
  h1 { font-size: clamp(46px, 15vw, 70px); }
  .checker-topline { align-items: flex-start; }
  .privacy-pill { display: none; }
  .free-callout { align-items: flex-start; flex-direction: column; }
  .drop-zone { min-height: 280px; padding: 24px 18px; }
  .score-card { grid-template-columns: 1fr; }
  .score-gauge { width: 100px; height: 100px; position: absolute; right: 44px; }
  #scoreValue { font-size: 64px; }
  .steps-grid { grid-template-columns: 1fr; }
  .use-cases-section { margin-top: 72px; padding: 26px 20px; }
  .use-case-list { gap: 8px; margin: 24px 0; }
  .use-case-list li { padding: 8px 11px; font-size: 13px; }
  .use-cases-statement { padding: 17px 16px; }
  .privacy-section { grid-template-columns: 1fr; gap: 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .faq-section { grid-template-columns: 1fr; gap: 20px; }
  .deep-review-card { grid-template-columns: 1fr; }
  .deep-review-card .secondary-button { width: 100%; }
  .share-card { grid-template-columns: 1fr; }
  .share-actions { justify-content: flex-start; }
  .share-actions .secondary-button { width: 100%; }
  footer { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

@media print {
  .site-header, .hero, .drop-zone, .file-tray, .result-toolbar, .share-card, .deep-review-card, #runAgainButton, .info-section, .use-cases-section, .privacy-section, .pricing-section, .faq-section, footer { display: none !important; }
  body, .checker-shell { background: white; }
  .checker-shell { width: 100%; margin: 0; border: 0; box-shadow: none; padding: 0; }
  .results { display: block !important; border: 0; margin: 0; padding: 0; }
  .score-card { color: black; background: white; border: 2px solid #111; }
  .score-card .section-kicker, .score-label { color: black; }
  .score-gauge { display: none; }
  .finding { break-inside: avoid; }
}
