@font-face {
  font-family: "Golos Text";
  src: url("/golostext.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #fbf8f4;
  --paper: #fffcfa;
  --ink: #101124;
  --muted: #585c70;
  --edge: #d1cfdb;
  --rule: #e4e1e8;
  --blue: #133bf5;
  --track: #dddfeb;
  --heading: Georgia, "Times New Roman", serif;
  font-family: "Golos Text", Arial, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button, a, summary, input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }
button, summary, input[type="checkbox"] { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
a { color: #1337c6; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2, .brand, .stage > summary .group-title { font-family: var(--heading); font-weight: 700; }
h1 { font-size: clamp(2.45rem, 10.35vw, 5rem); line-height: 1.02; letter-spacing: -.038em; margin: 26px 0 25px; }
h2 { font-size: clamp(1.8rem, 7.6vw, 2.8rem); line-height: 1.05; letter-spacing: -.027em; }

.page { width: min(100%, 760px); margin-inline: auto; padding: 14px 14px 34px; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 27px; }
.brand { font-size: clamp(1.1rem, 5.25vw, 1.55rem); line-height: 1; letter-spacing: -.03em; }
.environment { flex: none; background: var(--track); border-radius: 20px; padding: 6px 10px; font-size: .67rem; font-weight: 600; }
.panel { background: var(--paper); border: 1px solid var(--edge); border-radius: 10px; }
.readiness { padding: 15px 14px 11px; }
.readiness h2 { font-size: clamp(1.35rem, 5.4vw, 1.85rem); line-height: 1.14; }
.percentage { color: var(--blue); font-size: clamp(3.6rem, 14.5vw, 5rem); font-weight: 800; line-height: 1.02; margin: 8px 0 10px; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; height: 17px; appearance: none; border: 0; border-radius: 20px; background: var(--track); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--track); border-radius: 20px; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 20px; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 20px; }
.progress-count { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.milestone { margin-top: 5px; color: var(--muted); font-size: .72rem; line-height: 1.45; }

.today { margin-top: 22px; }
.today-top { margin-bottom: 7px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eyebrow { text-transform: uppercase; color: var(--muted); font-weight: 800; font-size: .77rem; letter-spacing: .035em; }
.today-purpose { margin-top: 6px; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.today-result { margin-top: 4px; font-size: .78rem; color: var(--muted); line-height: 1.4; }
.primary { display: flex; align-items: center; justify-content: center; min-height: 45px; width: 100%; background: var(--blue); color: white; padding: 9px 12px; border: 0; border-radius: 9px; font-weight: 700; }
.primary:hover { background: #0c30db; }
.copy { gap: 9px; margin-top: 12px; font-size: clamp(.9rem, 4.2vw, 1.1rem); text-align: center; }
.copy-icon { flex: none; }
.today-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: .72rem; min-height: 32px; }
.text-button { background: none; border: none; color: #1337c6; text-decoration: underline; text-underline-offset: .2em; padding: 0; min-height: 34px; }
#copy-status { color: #145a35; }

.checklist { margin-top: 18px; }
.tree { display: grid; gap: 12px; margin-top: 14px; }
summary { display: grid; align-items: center; list-style: none; min-width: 0; }
summary::-webkit-details-marker { display: none; }
.group-summary { grid-template-columns: minmax(0, 1fr) auto 13px; gap: 11px; }
.group-title, .check-title { overflow-wrap: anywhere; }
.stage > summary { min-height: 48px; padding: 10px 13px; }
.stage > summary .group-title { font-size: clamp(1.18rem, 5vw, 1.45rem); line-height: 1.1; letter-spacing: -.023em; }
.subtotal { color: var(--muted); white-space: nowrap; font-size: .76rem; font-variant-numeric: tabular-nums; }
.chevron { display: block; justify-self: center; width: 8px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); opacity: .7; }
details[open] > summary .chevron { transform: translateY(2px) rotate(225deg); }
.stage > .children { border-top: 1px solid var(--edge); padding: 0 10px; }
.branch > summary { min-height: 42px; padding: 8px 4px; font-weight: 700; font-size: .85rem; }
.branch > .children { margin-left: 5px; padding-left: 5px; border-left: 1px solid var(--rule); }
.children > * + * { border-top: 1px solid var(--rule); }
.check { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1px; align-items: start; }
.accept-target { display: grid; place-items: center; min-height: 53px; cursor: pointer; }
.accept-box { display: grid; place-content: center; appearance: none; margin: 0; width: 27px; height: 27px; border: 1.5px solid #a8a8b3; background: var(--paper); border-radius: 7px; }
.accept-box::after { content: ""; display: block; width: 8px; height: 14px; border: solid white; border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg) scale(0); }
.accept-box:checked { background: var(--blue); border-color: var(--blue); }
.accept-box:checked::after { transform: translateY(-1px) rotate(45deg); }
.check-summary { grid-template-columns: minmax(0, 1fr) 13px; min-height: 53px; padding: 8px 0; gap: 4px 6px; }
.check-title { font-size: .92rem; font-weight: 700; line-height: 1.2; }
.tags { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.chip { display: inline-block; max-width: 100%; border-radius: 30px; padding: 3px 7px; font-weight: 700; line-height: 1.2; font-size: .64rem; }
.kind-unknown { background: #ebeaf0; color: #4c5061; }
.kind-review { background: #fff0ca; color: #724805; }
.kind-local, .kind-verified { background: #e2e8fd; color: #24428c; }
.kind-accepted { background: #d2f3dc; color: #11552e; }
.kind-blocked { background: #f9e2dd; color: #803b32; }
.kind-optional { background: #f0e8f4; color: #604071; }
.check-details { padding: 7px 4px 12px 0; font-size: .81rem; line-height: 1.48; overflow-wrap: anywhere; }
.check-details dl { margin: 0; }
.check-details dt, .check-details h3 { font-weight: 700; margin: 7px 0 2px; font-size: .81rem; }
.check-details dd { margin: 0; color: var(--muted); }
.evidence, .note-body ul { margin: 6px 0 8px; padding-left: 17px; }
.evidence li { margin-bottom: 7px; white-space: pre-wrap; }
.evidence small { display: block; color: var(--muted); margin-top: 3px; }
.muted { color: var(--muted); line-height: 1.45; }
.save-status { position: sticky; z-index: 1; top: 6px; margin-top: 12px; background: #e4f5e9; color: #135733; border: 1px solid #a5d5b4; border-radius: 7px; padding: 8px 10px; font-size: .8rem; }
.save-status.error, .message { background: #ffebe6; color: #842b23; border-color: #e8b5aa; padding: 8px; border-radius: 6px; }

.support { margin-top: 26px; }
.support h2 { font-size: 1.5rem; margin-bottom: 10px; }
.note-details { margin-top: 7px; }
.note-details summary { cursor: pointer; display: list-item; list-style: revert; padding: 10px 13px; font-size: .86rem; }
.note-details summary::-webkit-details-marker { display: inline; }
.note-body { padding: 2px 13px 12px; font-size: .81rem; line-height: 1.5; color: var(--muted); }
.note-body li + li { margin-top: 5px; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 21px; font-size: .79rem; }
.login, #load-error { max-width: 440px; padding: 17px; }
.login h2 { font-size: 1.65rem; }
.login p { margin: 8px 0; }
.login label, #spec label { display: block; font-size: .85rem; }
.login input { display: block; width: 100%; min-height: 45px; background: #fff; border: 1px solid var(--edge); border-radius: 7px; margin: 4px 0 11px; padding: 7px 9px; }
.login input:focus-visible { outline-offset: 1px; }
dialog { width: min(calc(100% - 24px), 650px); max-height: calc(100% - 24px); padding: 15px; border: 1px solid var(--edge); border-radius: 12px; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #10112488; }
.spec-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.spec-header button, #retry { border: 1px solid var(--edge); background: var(--paper); color: var(--ink); border-radius: 6px; padding: 7px 9px; }
#retry { margin-top: 10px; }
#spec h2 { font-size: 1.55rem; }
#spec-source { font-size: .82rem; margin: 9px 0; }
#spec-text { display: block; width: 100%; height: min(48vh, 420px); min-height: 120px; resize: vertical; margin: 5px 0 10px; padding: 8px; border: 1px solid var(--edge); border-radius: 7px; font-size: .84rem; line-height: 1.5; background: #fff; color: var(--ink); }

@media (min-width: 660px) {
  .page { padding: 25px 24px 45px; }
  h1 { margin: 34px 0 31px; }
  .readiness { padding: 23px; }
  .today { margin-top: 29px; }
  .today-purpose { font-size: 1rem; }
  .today-result { font-size: .9rem; }
  .checklist { margin-top: 24px; }
  .stage > summary { min-height: 59px; padding-inline: 17px; }
  .stage > .children { padding: 0 16px; }
  .branch > .children { margin-left: 8px; padding-left: 10px; }
  .check-summary { grid-template-columns: minmax(0, 1fr) auto 13px; }
  .check-summary > .chevron { grid-column: 3; grid-row: 1; }
  .tags { grid-column: 2; grid-row: 1; }
  .chip { font-size: .72rem; }
}
