:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --card: #fffefa;
  --ink: #182a2e;
  --muted: #617173;
  --line: #dfe4df;
  --blue: #17576b;
  --blue-soft: #e8f0f0;
  --yellow: #e8cb59;
  --yellow-soft: #f6edc7;
  --error: #a33f32;
  --success: #246450;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.55; }
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.skip-link { position: absolute; z-index: 10; left: 12px; top: -60px; padding: 10px 14px; background: var(--ink); color: white; border-radius: 8px; }
.skip-link:focus { top: 10px; }
.site-header, main, footer { width: min(1050px, calc(100% - 40px)); margin-inline: auto; }
.site-header { height: 68px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: .91rem; font-weight: 720; letter-spacing: -.025em; }
.brand-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: var(--blue); color: var(--yellow); font-size: 1.14rem; line-height: 1; }
.private-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .75rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px #e2eee7; }
main { padding: 22px 0 72px; }
.test-card { position: relative; padding: 30px 34px 18px; background: var(--card); border: 1px solid #e2e5df; border-radius: 20px; box-shadow: 0 16px 38px rgba(33, 54, 48, .055); overflow: hidden; }
.test-topline { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.eyebrow, .step-label { margin: 0 0 7px; color: var(--blue); font: 700 .68rem/1.3 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.48rem, 3vw, 2.1rem); line-height: 1.14; letter-spacing: -.05em; font-weight: 720; }
.progress-block { flex: 0 0 auto; padding-bottom: 1px; font-variant-numeric: tabular-nums; }
.progress-number { color: var(--blue); font: 650 1.55rem/1 var(--mono); letter-spacing: -.08em; }
.progress-total { color: #9aa5a2; font: 500 .79rem/1 var(--mono); }
.progress-track { height: 3px; margin: 20px 0 24px; overflow: hidden; background: #e8ebe6; border-radius: 10px; }
.progress-track span { display: block; width: 8.333%; height: 100%; background: var(--yellow); border-radius: inherit; transition: width 180ms ease; }
.test-layout { display: grid; grid-template-columns: minmax(245px, .9fr) minmax(300px, 1.1fr); align-items: center; gap: clamp(30px, 6vw, 70px); max-width: 790px; margin: 0 auto; padding: 2px 8px 20px; }
.plate-wrap { min-width: 0; margin: 0; }
.plate-shell { display: grid; place-items: center; width: min(100%, 340px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: #f3f1e7; border: 1px solid #e9e5d3; box-shadow: inset 0 0 0 9px #fffefa, 0 8px 22px rgba(36, 52, 43, .07); transition: transform 150ms ease; }
.plate-shell.is-changing { transform: scale(.975); }
.plate-shell svg { display: block; width: 81%; height: 81%; overflow: visible; }
.plate-wrap figcaption { display: flex; justify-content: space-between; gap: 10px; width: min(100%, 340px); margin: 12px auto 0; color: var(--muted); font-size: .68rem; }
.plate-index { color: #495c5d; font: 600 .65rem/1.4 var(--mono); letter-spacing: .08em; }
.plate-kind { text-align: right; }
.answer-panel { min-width: 0; }
.step-label { margin-bottom: 9px; color: #899694; font-size: .63rem; letter-spacing: .12em; }
.answer-panel h2, .result-panel h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.68rem); line-height: 1.2; letter-spacing: -.04em; }
.prompt-copy { margin: 8px 0 18px; color: var(--muted); font-size: .91rem; }
.direction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.direction-button { display: flex; min-height: 59px; align-items: center; justify-content: flex-start; gap: 13px; padding: 8px 14px; border: 1px solid #dfe5e1; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease; }
.direction-button > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 1.1rem; font-weight: 650; }
.direction-button small { font-size: .86rem; font-weight: 630; }
.direction-button:hover { border-color: #a9c0bd; background: #fbfdfa; box-shadow: 0 3px 9px rgba(21, 68, 69, .07); transform: translateY(-1px); }
.direction-button:active { transform: translateY(0); }
.direction-button:focus-visible, .quiet-button:focus-visible, .skip-button:focus-visible, .primary-button:focus-visible, .secondary-button:focus-visible, .text-button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #d2ac22; outline-offset: 3px; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #edf0ec; }
.quiet-button, .skip-button, .text-button { min-height: 38px; padding: 6px 0; border: 0; background: none; cursor: pointer; }
.quiet-button { color: var(--muted); font-size: .8rem; text-decoration: underline; text-decoration-color: #bdc8c2; text-underline-offset: 4px; }
.skip-button { color: var(--blue); font-size: .81rem; font-weight: 650; }
.answer-status { min-height: 1.3em; margin: 5px 0 0; color: var(--error); font-size: .75rem; }
.screening-note { display: flex; align-items: center; gap: 10px; margin: 0 -34px; padding: 12px 34px 2px; border-top: 1px solid #edf0ec; color: #667473; font-size: .73rem; }
.note-symbol { display: grid; flex: 0 0 18px; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow-soft); color: #65520e; font: 700 .67rem/1 var(--mono); }
.result-panel { position: relative; max-width: 590px; margin: 4px auto 25px; padding: 22px 28px 26px; border: 1px solid #dfe5e0; border-radius: 16px; background: #fff; }
.result-panel .eyebrow { margin-bottom: 14px; }
.result-mark { position: absolute; top: 25px; right: 29px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--yellow-soft); color: var(--blue); font-size: 1.1rem; }
.result-mark--concern { background: #f7e9e5; color: var(--error); }
.result-panel h2 { max-width: 460px; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.result-advice { margin: 12px 0 10px; color: var(--blue); font-size: .96rem; font-weight: 630; }
.result-limit { margin: 0; padding: 11px 13px; border-left: 3px solid var(--yellow); background: #faf8ef; color: #526365; font-size: .78rem; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 19px; }
.primary-button, .secondary-button { min-height: 43px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: .81rem; font-weight: 660; transition: transform 120ms ease, background 120ms ease; }
.primary-button { background: var(--blue); color: #fff; }
.primary-button:hover { background: #10495a; transform: translateY(-1px); }
.secondary-button { border-color: #d9e0dc; background: #fff; color: var(--ink); }
.secondary-button:hover { background: #f4f7f4; transform: translateY(-1px); }
.text-button { color: var(--muted); font-size: .8rem; }
.copy-status { min-height: 1.2em; margin: 8px 0 0; color: var(--success); font-size: .75rem; }
.observation-entry { margin: 0 0 16px; min-width: 0; }
.observation-entry label { display: block; margin-bottom: 7px; font-size: .9rem; font-weight: 650; }
.observation-entry label span { color: var(--muted); font-weight: 400; }
.observation-entry input, .observation-record input, .observation-record textarea { display: block; width: 100%; max-width: 100%; min-width: 0; padding: 12px; border: 1px solid #aebbb7; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.observation-entry input { min-height: 48px; scroll-margin-block: 24px; }
.observation-entry input:focus-visible, .observation-record input:focus-visible, .observation-record textarea:focus-visible { outline: 3px solid #d2ac22; outline-offset: 3px; }
.observation-entry p { margin: 6px 0 0; font-size: .75rem; color: var(--muted); }
#observation-storage-status:empty { display: none; }
.observation-record { max-width: 100%; margin: 24px auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow-wrap: anywhere; }
.observation-record h2 { font-size: 1.5rem; line-height: 1.3; margin: 0 0 12px; }
.observation-record > p { font-size: .86rem; }
.record-setup { min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.record-setup legend { padding: 0; font-size: .86rem; color: var(--muted); }
.record-setup-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.record-setup-fields > div { min-width: 0; }
.record-setup input { min-height: 48px; scroll-margin-block: 24px; }
.record-table-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.observation-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .86rem; }
.observation-table th, .observation-table td { text-align: left; vertical-align: top; padding: 13px 15px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.observation-table thead th { background: #f5f7f4; font-size: .76rem; color: var(--muted); }
.observation-table tbody th { width: 50%; font-weight: 600; }
.observation-table tbody tr:last-child th, .observation-table tbody tr:last-child td { border-bottom: 0; }
.observation-record .export-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 22px; }
.observation-record .export-actions button { min-width: 0; min-height: 48px; padding: 10px 12px; white-space: normal; line-height: 1.4; }
.export-status { font-size: .8rem; color: var(--success); overflow-wrap: anywhere; }
.observation-record label { display: block; margin: 12px 0 8px; font-size: .9rem; font-weight: 650; }
.observation-record .share-panel { background: #f5f7f4; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.observation-record .share-panel p, .observation-record #copy-fallback p { font-size: .78rem; }
.observation-record .share-panel button { margin: 8px 8px 0 0; max-width: 100%; min-height: 44px; }
.observation-record .record-privacy { color: var(--muted); font-size: .78rem; }
.observation-record #record-text { font: 13px/1.5 ui-monospace, monospace; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 600px) {
  .record-setup-fields { grid-template-columns: 1fr; gap: 0; }
  .observation-record { padding: 20px 16px; }
  .observation-record .export-actions { grid-template-columns: 1fr; }
  .observation-record .export-actions button { width: 100%; }
  .observation-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .observation-table, .observation-table tbody, .observation-table tr, .observation-table th, .observation-table td { display: block; width: 100%; }
  .observation-table tbody tr { padding: 12px; border-bottom: 1px solid var(--line); }
  .observation-table tbody th, .observation-table tbody td { width: 100%; padding: 8px 0; border: 0; font-size: .82rem; }
  .observation-table [data-label]::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
  .observation-table tbody tr:last-child { border-bottom: 0; }
  .observation-record .share-panel button { width: 100%; margin-right: 0; }
}
@media print { .observation-record .export-actions, .observation-record .export-status, .observation-record .share-panel, .observation-record #copy-fallback, #new-record-session { display: none !important; } }
.reading { width: min(710px, 100%); margin: 46px auto 0; }
.reading section { padding: 24px 0 26px; border-bottom: 1px solid var(--line); }
.reading .eyebrow { margin-bottom: 7px; }
.reading h2 { margin: 0 0 13px; font-size: clamp(1.23rem, 2.5vw, 1.55rem); line-height: 1.24; letter-spacing: -.035em; }
.reading p:not(.eyebrow) { max-width: 67ch; margin: 10px 0 0; color: #465759; font-size: .91rem; line-height: 1.75; }
.reading details { border-top: 1px solid #e3e7e2; }
.reading details:last-child { border-bottom: 1px solid #e3e7e2; }
.reading summary { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; font-size: .9rem; font-weight: 620; list-style: none; }
.reading summary::-webkit-details-marker { display: none; }
.reading summary::after { content: "+"; color: var(--blue); font: 500 1.15rem/1 var(--mono); }
.reading details[open] summary::after { content: "−"; }
.reading details p { padding: 0 22px 15px 0; }
.reading .faq-item { border-top: 1px solid #e3e7e2; }
.reading .faq-item:last-child { border-bottom: 1px solid #e3e7e2; }
.reading .faq-item h3 { margin: 0; padding: 16px 0; font-size: .9rem; line-height: 1.5; font-weight: 620; }
.reading .faq-item > p:last-child { padding: 0 22px 15px 0; }
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .69rem; }
footer > a { font-weight: 700; text-decoration: none; color: var(--ink); }
footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
footer nav a { text-underline-offset: 3px; }
[hidden] { display: none !important; }
@media (max-width: 680px) {
  .site-header, main, footer { width: min(100% - 24px, 540px); }
  .site-header { height: 58px; }
  .brand { gap: 8px; font-size: .82rem; }
  .brand-icon { width: 26px; height: 26px; }
  .private-label { gap: 6px; font-size: .68rem; }
  main { padding: 12px 0 44px; }
  .test-card { padding: 19px 16px 13px; border-radius: 16px; }
  .test-topline { align-items: center; gap: 9px; }
  h1 { max-width: 295px; font-size: clamp(1.3rem, 6vw, 1.68rem); }
  .eyebrow { font-size: .61rem; }
  .progress-number { font-size: 1.28rem; }
  .progress-track { margin: 15px 0 13px; }
  .test-layout { grid-template-columns: 1fr; gap: 14px; padding: 0 0 12px; }
  .plate-shell { width: min(72vw, 284px); box-shadow: inset 0 0 0 7px #fffefa, 0 6px 18px rgba(36, 52, 43, .07); }
  .plate-wrap figcaption { width: min(72vw, 284px); margin-top: 8px; font-size: .64rem; }
  .answer-panel { width: min(100%, 410px); margin-inline: auto; }
  .step-label { margin-bottom: 5px; }
  .answer-panel h2 { font-size: 1.28rem; }
  .prompt-copy { margin: 5px 0 11px; font-size: .83rem; }
  .direction-grid { gap: 7px; }
  .direction-button { min-height: 51px; gap: 10px; padding: 6px 11px; }
  .direction-button > span { width: 27px; height: 27px; }
  .direction-button small { font-size: .82rem; }
  .action-row { margin-top: 10px; padding-top: 8px; }
  .quiet-button, .skip-button { min-height: 36px; font-size: .76rem; }
  .answer-status { min-height: 1em; margin-top: 1px; }
  .screening-note { align-items: flex-start; margin: 0 -16px; padding: 10px 16px 0; font-size: .68rem; line-height: 1.45; }
  .note-symbol { margin-top: 1px; }
  .result-panel { margin: 2px auto 17px; padding: 19px 17px 20px; }
  .result-mark { top: 19px; right: 17px; width: 30px; height: 30px; }
  .result-panel h2 { padding-right: 4px; font-size: 1.4rem; }
  .result-advice { font-size: .88rem; }
  .result-actions { gap: 6px; }
  .primary-button, .secondary-button { min-height: 41px; padding-inline: 12px; font-size: .76rem; }
  .reading { margin-top: 27px; }
  .reading section { padding: 19px 1px 21px; }
  .reading p:not(.eyebrow) { font-size: .86rem; }
  footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 360px) {
  .site-header, main, footer { width: calc(100% - 20px); }
  .test-card { padding-inline: 12px; }
  .screening-note { margin-inline: -12px; padding-inline: 12px; }
  .private-label { font-size: .62rem; }
  .direction-button { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  @page { margin: 16mm; }
  body { background: #fff; color: #111; }
  .site-header, .reading, .test-topline, .progress-track, .test-layout, .screening-note, .result-actions, .copy-status, footer { display: none !important; }
  main { width: 100%; padding: 0; }
  .test-card { width: 100%; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .result-panel { display: block !important; max-width: none; margin: 0; padding: 0; border: 0; }
  .result-panel[hidden] { display: block !important; }
  .result-mark { background: #f5edc8; }
}
