@import url("./patterns.css");
@import url("./stage.css");
@import url("./print.css");

:root {
  color-scheme: light;
  --paper: #f8f6ee;
  --surface: #fffefa;
  --ink: #243b31;
  --muted: #656e65;
  --deep: #172a24;
  --green: #caef93;
  --line: #e0e2d6;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
[hidden] { display: none !important; }
a { color: #28634a; text-underline-offset: 4px; }
a:hover { color: #163d2d; }
.skip-link { position: fixed; left: 18px; top: 12px; z-index: 1100; transform: translateY(calc(-100% - 24px)); padding: 10px 16px; background: var(--surface); border: 2px solid var(--ink); border-radius: 8px; font-weight: 650; }
.skip-link:focus { transform: translateY(0); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button, input, select, textarea { border-radius: 9px; }
:focus-visible { outline: 3px solid #3d8f65; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.18; }
h1 { font-size: clamp(2.5rem, 4.4vw, 3.35rem); letter-spacing: -.055em; margin-bottom: 16px; font-weight: 750; }
h2 { font-size: 1.35rem; letter-spacing: -.03em; margin-bottom: 0; }
h3 { font-size: 1.05rem; margin-bottom: 9px; }
p { margin-bottom: 16px; }
img { max-width: 100%; }
.site-header, .site-footer, main { max-width: 1200px; margin-inline: auto; padding-inline: 28px; }
.site-header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.site-header nav { margin-inline-start: auto; order: 1; }
.site-header .lang-menu { order: 2; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.4rem; font-weight: 750; letter-spacing: -.04em; }
.brand img { flex: 0 0 auto; }
.brand small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.4; }
.site-header nav, .site-footer nav { display: flex; align-items: center; gap: 24px; font-size: .85rem; }
.site-header nav a, .site-footer nav a { text-decoration: none; }
.language-switch { display: inline-flex; background: #eeeee4; padding: 4px; border-radius: 8px; gap: 2px; }
.language-switch a { padding: 4px 9px; border-radius: 5px; font-size: .75rem; }
.language-switch a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #172a2410; }

.lang-switch { flex-basis: 100%; max-width: 760px; margin: 8px 0 0; }
.lang-switch summary { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; list-style: none; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; list-style: none; }
.lang-switch a { color: var(--ink); text-decoration: none; opacity: .85; padding: 6px 2px; }
.lang-switch a:hover, .lang-switch a[aria-current] { text-decoration: underline; opacity: 1; }

.lang-menu { position: relative; flex: none; }
.lang-menu__btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  font-size: .85rem; font-weight: 600; color: var(--ink); white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; list-style: none; user-select: none;
}
.lang-menu__btn::-webkit-details-marker { display: none; }
.lang-menu__btn:hover, .lang-menu[open] .lang-menu__btn { border-color: var(--ink); }
.lang-menu__btn:focus-visible { outline: 3px solid #3d8f65; outline-offset: 2px; }
.lang-menu__short { display: none; }
.lang-menu__caret { transition: transform .2s ease; }
.lang-menu[open] .lang-menu__caret { transform: rotate(180deg); }
.lang-menu__list {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 100;
  display: grid; grid-template-columns: repeat(2, 1fr); width: max-content; gap: 2px;
  margin: 0; padding: 8px; list-style: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(23, 42, 36, .12);
}
.lang-menu__list a {
  display: block; padding: 8px 14px; color: var(--ink); font-size: .85rem;
  white-space: nowrap; text-decoration: none; border-radius: 6px;
}
.lang-menu__list a:hover { background: #eeeee4; }
.lang-menu__list a[aria-current] { font-weight: 750; background: #eeefe3; color: var(--deep); }
.test-stage, .pattern-surface, .monitor-frame { direction: ltr; }
.intro { display: grid; grid-template-columns: 1.7fr 1fr; align-items: center; gap: 72px; padding-block: 28px; }
.eyebrow { font-size: .65rem; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.green-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4f9566; margin-right: 7px; }
.intro-copy { font-size: .94rem; max-width: 530px; color: var(--muted); margin-bottom: 0; }
.privacy-card { background: #eeefe3; border: 1px solid #e4e6d8; border-radius: 16px; padding: 20px 22px; font-size: .8rem; }
.privacy-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--green); font-size: 1.3rem; margin-bottom: 12px; }
.privacy-card strong { font-size: .9rem; display: block; margin-bottom: 8px; }
.privacy-card p { color: var(--muted); margin-bottom: 10px; }
.storage-status { font-size: .69rem; font-weight: 600; color: #3d6b45; }
.tool-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
.console, .observation-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.console { box-shadow: 0 10px 30px #172a2405; }
.console-heading, .panel-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.console-heading h2, .panel-heading h2 { font-size: 1rem; }
.panel-heading .eyebrow { margin-bottom: 0; font-size: .57rem; white-space: nowrap; }
.pill { display: inline-block; border: 1px solid var(--line); color: var(--muted); border-radius: 50px; padding: 4px 9px; font-size: .65rem; white-space: nowrap; }
.monitor-frame { background: #192720; border: 1px solid #283e33; padding: 10px 10px 0; border-radius: 15px; box-shadow: 0 6px 12px #172a2417; }
.preview-surface { position: relative; width: 100%; aspect-ratio: 16 / 8.7; border-radius: 7px; overflow: hidden; }
.monitor-chin { display: flex; align-items: center; justify-content: center; gap: 7px; height: 30px; color: #708c7b; font-size: .48rem; letter-spacing: .2em; }
.monitor-chin span { width: 4px; height: 4px; background: #8ad182; border-radius: 50%; }
.preview-caption { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .7rem; padding-block: 13px 11px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 43px; padding: 9px 16px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); font-size: .82rem; font-weight: 650; text-decoration: none; line-height: 1.3; }
.button:hover { background: #f0f1e6; color: var(--ink); }
.button-primary { background: var(--green); border-color: #bade85; color: #173e2c; }
.button-primary:hover { background: #bce67d; }
.button-dark { color: #fffefa; background: var(--ink); border-color: var(--ink); }
.button-dark:hover { color: #fffefa; background: #365344; }
.start-button { display: flex; width: 100%; font-size: .97rem; min-height: 50px; justify-content: space-between; padding-inline: 20px; }
.start-button span { font-size: 1.3rem; }
.console-note { color: var(--muted); font-size: .73rem; margin: 14px 0 18px; }
.manual-note { display: flex; align-items: start; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.manual-note > span { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; border: 1px solid #9aa397; border-radius: 50%; font-size: .7rem; color: var(--muted); }
.manual-note p { color: var(--muted); font-size: .69rem; margin: 0; }
.check-progress { height: 5px; border-radius: 20px; background: #e9eade; overflow: hidden; }
.check-progress span { display: block; height: 100%; background: #4e885a; }
.check-progress[data-checked="0"] span { width: 0; }
.check-progress[data-checked="1"] span { width: 25%; }
.check-progress[data-checked="2"] span { width: 50%; }
.check-progress[data-checked="3"] span { width: 75%; }
.check-progress[data-checked="4"] span { width: 100%; }
.progress-label { color: var(--muted); font-size: .69rem; margin: 8px 0 16px; }
.group-list { display: grid; gap: 5px; }
.check-item { display: flex; align-items: center; gap: 13px; text-align: left; background: transparent; border: 1px solid transparent; padding: 12px 10px; color: var(--ink); }
.check-item:hover { background: #f6f7ed; }
.check-item[aria-pressed="true"] { background: #edf3e0; border-color: #dce8c8; }
.group-number { color: #859279; font-size: .63rem; font-variant-numeric: tabular-nums; }
.check-item strong { display: block; font-size: .82rem; font-weight: 650; }
.check-item small { display: block; font-size: .67rem; color: var(--muted); margin-top: 3px; }
.check-item small[data-status="issue"] { color: #985530; }
.group-arrow { margin-left: auto; color: #738e64; }
.observation-editor { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.observation-editor h3 { font-size: .9rem; }
.observation-editor > p { color: var(--muted); font-size: .71rem; margin-bottom: 14px; }
label { display: block; font-size: .73rem; font-weight: 650; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid #d9ddcf; background: #fffefa; color: var(--ink); font-size: .8rem; line-height: 1.5; }
textarea { resize: vertical; min-height: 70px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.observation-editor select { margin-bottom: 13px; }
.text-button { border: 0; background: transparent; color: #376447; font-size: .74rem; font-weight: 650; padding: 8px 0; min-height: 38px; }
.text-button:hover { color: #163d2d; text-decoration: underline; text-underline-offset: 4px; }
.observation-editor .text-button { margin-top: 4px; }
.report-section { margin-block: 32px; border: 1px solid var(--line); border-radius: 20px; padding: 28px; background: #f1f2e7; scroll-margin-top: 24px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.device-row { display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: 30px; margin-bottom: 22px; }
.report-timestamp { color: var(--muted); font-size: .68rem; margin-bottom: 8px; text-align: right; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-item { padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.report-item-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.report-item h3 { font-size: .82rem; margin: 4px 0 10px; }
.status-label { font-size: .62rem; color: var(--muted); border-radius: 5px; padding: 3px 7px; background: #f0f1e9; flex: 0 0 auto; }
.status-label[data-status="clear"] { color: #326440; background: #eaf3df; }
.status-label[data-status="issue"] { color: #8c4925; background: #fbeddc; }
.report-note { font-size: .74rem; color: #5c685e; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.report-disclaimer { font-size: .71rem; color: var(--muted); margin-block: 18px; max-width: 850px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.reset-button { margin-left: auto; }
.report-local-note { color: var(--muted); font-size: .65rem; margin: 14px 0 0; }
.notice { padding: 14px 18px; border: 1px solid #cbd9b7; border-radius: 10px; background: #edf3e0; font-size: .85rem; overflow-wrap: anywhere; }
.guide-section { margin-block: 44px; scroll-margin-top: 24px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.guide-number { color: #6f8262; font-size: .63rem; font-weight: 650; letter-spacing: .1em; }
.guide-grid h3 { margin-top: 14px; font-size: .96rem; }
.guide-grid p { color: var(--muted); font-size: .78rem; margin-bottom: 0; }
.guide-links { grid-column: 1 / -1; margin: 22px 0 0; color: var(--muted); font-size: .82rem; }
.guide-links a { color: inherit; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding-block: 26px 30px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); }
.site-footer p { margin-bottom: 0; }
.site-footer strong { color: var(--ink); margin-right: 10px; }
.site-footer small { flex-basis: 100%; font-size: .65rem; }
.site-footer nav { font-size: .75rem; }
.page { max-width: 800px; min-height: 60vh; padding-block: 52px 64px; line-height: 1.8; }
.page h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 24px; }
.page h2 { font-size: 1.3rem; margin-block: 30px 12px; }
.page h3 { margin-block: 24px 10px; }
.page p, .page li { overflow-wrap: anywhere; }
.page ul, .page ol { padding-left: 24px; }
.page .button { margin-top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.print-only { display: none; }
body[data-testing="true"] { overflow: hidden; }
@media (max-width: 1000px) {
  .intro { gap: 32px; }
  .tool-grid { grid-template-columns: 1.3fr 1fr; gap: 16px; }
  .console, .observation-panel { padding: 20px; }
  .panel-heading { flex-wrap: wrap; gap: 5px; }
}
@media (max-width: 760px) {
  .tool-grid { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1.4fr 1fr; gap: 20px; }
  .privacy-card { padding: 18px; }
  .privacy-icon { display: none; }
  .guide-grid { gap: 20px; }
}
@media (max-width: 600px) {
  .site-header, .site-footer, main { padding-inline: 18px; }
  .site-header { gap: 12px; padding-block: 17px; flex-wrap: wrap; }
  .brand { font-size: 1.25rem; }
  .brand img { width: 38px; height: 38px; }
  .brand small { display: none; }
  .site-header nav { gap: 12px; order: 2; flex: 1 0 100%; flex-wrap: wrap; justify-content: space-between; margin-inline-start: 0; }
  .site-header .lang-menu { position: static; order: 1; margin-inline-start: auto; }
  .lang-menu__btn { height: 34px; padding: 0 9px; gap: 5px; }
  .lang-menu__name { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .lang-menu__short { display: inline; font-size: .8rem; font-weight: 700; }
  .lang-menu__list {
    top: 100%; inset-inline: 0; width: auto; padding: 8px 12px 12px;
    border-radius: 0; border-inline: none; box-shadow: 0 8px 16px rgba(23, 42, 36, .08);
  }
  .lang-menu__list a { padding: 10px 12px; }
  .intro { grid-template-columns: 1fr; gap: 17px; padding-block: 24px; }
  h1 { font-size: 2.6rem; }
  .intro-copy { font-size: .87rem; }
  .privacy-card { padding: 12px 16px; }
  .privacy-card strong { margin-bottom: 2px; font-size: .8rem; }
  .privacy-card p { display: none; }
  .console, .observation-panel { padding: 18px; border-radius: 16px; }
  .console-heading { gap: 8px; margin-bottom: 16px; }
  .console-heading h2 { font-size: .94rem; }
  .console-heading .pill { font-size: .58rem; }
  input, select, textarea { font-size: 16px; }
  .report-section { padding: 20px 18px; border-radius: 16px; margin-block: 24px; }
  .section-heading { align-items: start; flex-wrap: wrap; }
  .section-heading h2 { font-size: 1.25rem; }
  .device-row { grid-template-columns: 1fr; gap: 10px; margin-bottom: 15px; }
  .report-timestamp { text-align: left; margin: 0; }
  .report-grid { grid-template-columns: 1fr; }
  .report-item-heading { flex-wrap: wrap; gap: 4px; }
  .report-actions .button { flex: 1 1 auto; }
  .reset-button { margin-left: 0; }
  .guide-section { margin-block: 32px; }
  .guide-grid { grid-template-columns: 1fr; gap: 26px; }
  .guide-grid h3 { margin-top: 9px; }
  .site-footer p span { display: block; margin-top: 4px; }
  .site-footer nav { gap: 18px; }
  .page { padding-block: 34px 42px; }
}
