:root {
  color-scheme: light;
  font: 100%/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #162e2a;
  background: #f5f7f3;
  --ink: #162e2a;
  --muted: #4c625b;
  --line: #cdd9d1;
  --accent: #0f4c3a;
  --tint: #eaf3ed;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow-wrap: anywhere; }
button, input, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #287c67; outline-offset: 3px; }
h1, h2, p { margin: 0; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.site-header { background: white; border-bottom: 1px solid var(--line); padding-block: 8px; }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand { color: var(--ink); font-size: 1.24rem; font-weight: 760; letter-spacing: -.025em; text-decoration: none; }
.header-inner .sample-link { max-width: 54%; padding-inline: 5px; font-size: .82rem; text-align: end; }
.workspace { display: grid; gap: 24px; padding-block: 28px 20px; }
.workspace > * { min-width: 0; }
h1 { max-width: 15ch; font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.04; letter-spacing: -.055em; }
.intro-copy { color: var(--muted); margin-top: 12px; max-width: 42ch; }
.steps { padding: 0; margin: 18px 0 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.steps li { display: flex; align-items: flex-start; gap: 10px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  flex: 0 0 1.65rem; height: 1.65rem; display: grid; place-items: center;
  background: var(--tint); color: var(--accent); border: 1px solid var(--line);
  border-radius: 50%; font-size: .8rem; font-weight: 700;
}
.steps small { display: block; color: var(--muted); font-size: .85rem; }
.input-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: 0 12px 32px #162e2a0a; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
.tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 4px; background: #f0f3ef; padding: 4px; border-radius: 10px; margin-block: 14px 16px; }
.tab { border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; font-size: .88rem; font-weight: 650; min-height: 44px; padding: 6px; }
.tab[aria-selected="true"] { border-color: var(--line); background: white; color: var(--accent); }
.field-label, .name-fields label { display: block; font-size: .9rem; font-weight: 650; }
textarea, input[type="text"], input[type="password"] { display: block; width: 100%; color: var(--ink); border: 1px solid #9bb0a6; border-radius: 8px; padding: 10px 12px; margin-top: 5px; background: #fcfdfb; }
textarea { min-height: 156px; resize: vertical; }
textarea::placeholder { color: #5a7067; }
.field-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; color: var(--muted); font-size: .8rem; }
#text-count { font-variant-numeric: tabular-nums; }
.anonymize { margin-top: 12px; border-block: 1px solid var(--line); }
summary { padding: 10px 0; min-height: 44px; cursor: pointer; font-size: .9rem; font-weight: 650; color: var(--accent); }
.optional { font-weight: 400; color: var(--muted); }
.name-fields { display: grid; gap: 10px; }
.inline-actions, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.primary, .secondary, .quiet { min-height: 44px; padding: 9px 12px; border: 1px solid transparent; border-radius: 8px; font-size: .9rem; font-weight: 680; }
.primary { color: white; background: var(--accent); flex: 1 1 100%; }
.primary span[aria-hidden="true"] { margin-inline-start: .4em; }
.primary:hover:enabled { background: #0e4436; }
.secondary { background: white; color: var(--accent); border-color: #9bb0a6; }
.quiet { background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.secondary:hover:enabled, .quiet:hover:enabled { background: var(--tint); }
.drop-area { text-align: center; padding: 20px 10px; border: 1px dashed #829f91; background: #f7faf6; border-radius: 10px; }
.drop-area.is-dragging { background: var(--tint); outline: 2px solid var(--accent); }
.picker-actions { justify-content: center; }
.helper { color: var(--muted); font-size: .85rem; }
p.helper:not(:empty) { margin-top: 8px; }
.helper:empty { margin: 0; padding: 0; }
.anonymize .helper:not(:empty) { margin-bottom: 10px; }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.file-row { display: grid; grid-template-columns: auto 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.file-order { font-variant-numeric: tabular-nums; color: var(--muted); }
.file-preview { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; background: var(--tint); display: grid; place-items: center; font-size: .7rem; font-weight: 750; color: var(--accent); }
.file-name { font-size: .86rem; font-weight: 650; }
.file-row button { font-size: 1.25rem; text-decoration: none; }
.notice { padding: 10px 12px; margin-top: 12px; border-radius: 8px; font-size: .9rem; }
.notice { background: #fcf0ea; color: #862e19; border: 1px solid #eed1c4; }
.checkout-notice { margin-top: 20px; padding: 16px; border: 1px solid #b6d2be; border-radius: 12px; background: var(--tint); }
.checkout-notice > * + * { margin-top: 8px; }
.checkout-notice:not(.checkout-paid) { background: white; border-color: var(--line); }
.checkout-paid .copy-box { max-width: 32ch; background: white; border: 1px solid var(--line); }
.checkout-paid .copy-content { font-family: ui-monospace, monospace; font-weight: 700; }
.access-entry { margin-top: 10px; }
#start, .check-time { flex: 0 0 100%; }
.actions .check-time { text-align: center; margin: 0; }
.progress:not(:empty) { color: var(--accent); padding-inline-start: 10px; border-inline-start: 3px solid #8eac9d; }
.trust { padding: 16px; background: var(--tint); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.trust ul { margin-block: 8px; padding-inline-start: 20px; }
.trust li, .trust p { font-size: .88rem; }
.trust p { color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--muted); font-size: .85rem; padding-block: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }
.legal { padding-block: 32px; }
.legal h1 { margin-top: 16px; }
.legal p + p { margin-top: 16px; }

.results { margin-block: 0 20px; scroll-margin-block-start: 16px; }
#full-result { margin-block-start: 24px; }
.preview-grid, .full-report { display: grid; gap: 14px; }
.report-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.report-card > * + * { margin-top: 12px; }
.result-title { width: fit-content; font-size: clamp(1.45rem, 3.8vw, 2rem); line-height: 1.15; letter-spacing: -.04em; }
.report-lead { background: #f0f7f2; }
.report-summary { max-width: 68ch; }
.grade-row { display: flex; align-items: center; gap: 12px; }
.grade-number { display: grid; place-items: center; flex: 0 0 52px; height: 52px; color: white; background: var(--accent); border-radius: 12px; font-size: 1.7rem; }
.grade-label, .unlock-price, .category-grade, .copy-label { font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.badge { display: inline-block; border: 1px solid; padding: 2px 8px; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1.45; }
.badge--neutral { color: #41554d; background: #f3f5f2; border-color: #d7dfd9; }
.badge--good { color: #18533c; background: #e7f2e9; border-color: #b6d2be; }
.badge--caution { color: #684715; background: #f9f0da; border-color: #e4d3a9; }
.badge--risk { color: #882e26; background: #faeae7; border-color: #e8c4be; }
.report-card h3, .report-card h4 { margin: 0; line-height: 1.3; }
.report-card h3 { font-size: 1.1rem; }
.report-card h4 { font-size: .95rem; }
.card-topline, .copy-heading, .report-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.report-toolbar { justify-content: flex-start; }
.original-quote { margin: 10px 0; padding: 8px 12px; border-inline-start: 3px solid #89aa98; background: #f5f8f4; white-space: pre-wrap; }
.finding-card { border: 1px solid var(--line); padding: 12px; border-radius: 10px; }
.preview-grid .finding-card { padding: 0; border: 0; }
.category-grid, .checklist { list-style: none; padding: 0; margin-bottom: 0; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.category-card { background: #f7faf6; border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.category-grade { margin-top: 6px; font-size: .88rem; }
.unlock-card { border-color: #a4beae; }
.report-includes { padding-inline-start: 20px; font-size: .9rem; }
.unlock-form { display: grid; justify-items: start; gap: 8px; }
.unlock-form label { width: min(100%, 28ch); }
.unlock-form p { margin: 0; }
.suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; margin-top: 10px; }
.copy-box, .structural-note { padding: 10px 12px; background: #f1f6f1; border-radius: 8px; }
.copy-heading h5, .copy-heading p { margin: 0; font-size: .87rem; }
.copy-heading .copy-button { padding-inline: 8px; }
.copy-content { white-space: pre-wrap; }
.structural-note .helper { margin-top: 5px; }
.checklist li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 12px; padding-block: 8px; border-top: 1px solid var(--line); }
.checklist li > div { flex: 1 1 16ch; min-width: 0; }
.rejection .secondary { width: fit-content; }
.print-only { display: none; }
.visually-hidden, .copy-buffer { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.copy-buffer { position: fixed; top: 0; left: 0; }
.sample-dialog { width: min(860px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; color: var(--ink); background: #f5f7f3; border: 1px solid var(--line); border-radius: 14px; overscroll-behavior: contain; }
.sample-dialog::backdrop { background: #132d25a1; }
.dialog-bar { position: sticky; top: 0; z-index: 1; background: white; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; padding: 8px 12px; }
.dialog-bar h2 { font-size: 1.05rem; }
.dialog-bar .quiet { padding-inline: 8px; }
#sample-report { padding: 12px; }
.sample-dialog .result-title { font-size: 1.35rem; }

@media (min-width: 480px) {
  .name-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary { flex: 0 1 auto; }
}

@media (min-width: 880px) {
  .wrap { width: min(1120px, calc(100% - 80px)); }
  .workspace { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 50px; padding-block: 56px 26px; }
  .intro { padding-block: 10px; }
  .intro-copy { margin-top: 18px; font-size: 1.06rem; }
  .steps { gap: 14px; margin-top: 26px; }
  .input-card, .trust { padding: 22px; }
  textarea { min-height: 184px; }
  .trust ul { display: flex; flex-wrap: wrap; gap: 4px 30px; }
  .preview-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .unlock-card { grid-column: 1 / -1; }
  .report-card { padding: 22px; }
}

@page { margin: 14mm; }

@media print {
  :root, body { background: white; color: #111; }
  .site-header, .site-footer, #workspace, #preview-result, .trust, .checkout-notice, .report-toolbar,
  .dialog-bar, .screen-legal, button, .copy-buffer { display: none !important; }
  body.print-sample > main { display: none; }
  body:not(.print-sample) > #sample { display: none; }
  body.print-sample > #sample[open] {
    display: block; position: static; inset: auto; margin: 0; width: auto; max-width: none;
    max-height: none; overflow: visible; border: 0; border-radius: 0; background: white;
  }
  #sample::backdrop { display: none; }
  #sample-report, #full-result, .wrap { margin: 0; padding: 0; width: auto; }
  .print-only { display: block; }
  .print-header { font-size: 16pt; font-weight: 750; padding-bottom: 3mm; border-bottom: 1px solid #555; }
  .print-footer { font-size: 9pt; border-top: 1px solid #aaa; padding-top: 3mm; margin-top: 3mm; }
  .full-report { display: block; }
  .report-card { margin-block: 4mm; padding: 0; border: 0; background: white; }
  .report-card h3, .report-card h4 { break-after: avoid; }
  .report-lead, .finding-card, .copy-box, .category-card, .checklist li,
  .structural-note, .print-footer { break-inside: avoid; }
  .finding-card, .category-card, .copy-box, .structural-note { background: white; border: 1px solid #aaa; }
  .category-grid, .suggestions { display: block; }
  .category-card + .category-card, .copy-box + .copy-box { margin-top: 2mm; }
  .grade-number, .badge { background: white; color: #111; border: 1px solid #777; }
  .original-quote { background: white; border-color: #777; }
}
