/* The review app: QAN's tokens, light only. One Patrick Hand line per view. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100dvh; background: var(--surface); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 22px; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.display { margin: 0; font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 36px; color: var(--forest-deep); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--radius-sm); font-weight: 800; transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent-fill); color: var(--on-accent); }
.btn--secondary { box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface-raised); }
.btn--ghost { color: var(--accent-text); padding: 0 10px; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--accent-fill-hover); }
  .btn--secondary:hover, .btn--ghost:hover { background: var(--surface-alt); }
}

/* Sign in */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); display: grid; gap: 16px; }
.login-card img { width: 56px; height: 56px; }
.login-card p { margin: 0; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.input { width: 100%; height: 48px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 16px; }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--danger); }
.err { margin: 0; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--danger); }

/* Shell */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px 0 12px; background: var(--bar); color: var(--on-accent); }
.bar img { width: 36px; height: 36px; }
.bar-title { font-weight: 800; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.bar-prog { font-size: 13px; font-weight: 700; padding: 0 8px; font-variant-numeric: tabular-nums; }
.bar .btn--ghost { color: var(--on-accent); height: 36px; }
@media (hover: hover) and (pointer: fine) { .bar .btn--ghost:hover { background: rgba(245,238,220,0.12); } }

.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100dvh - 56px); }
.nav { position: sticky; top: 56px; align-self: start; height: calc(100dvh - 56px); overflow: auto; padding: 16px 12px 32px; background: var(--surface-alt); border-right: 1px solid var(--line); }
.nav-group { margin: 16px 8px 6px; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.nav-group:first-child { margin-top: 0; }
.nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 48px; padding: 8px 10px; border-radius: var(--radius-sm); text-align: left; transition: background-color 150ms ease; }
.nav-item b { font-weight: 700; }
.nav-item[aria-current="page"] { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) and (pointer: fine) { .nav-item:hover { background: var(--surface); } }
.state { flex: none; font-size: 12px; line-height: 16px; font-weight: 800; padding: 2px 8px; border-radius: var(--radius-pill); }
.state--todo { color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); }
.state--done { background: var(--sage-soft); color: var(--forest-deep); }
.state--ours { background: var(--attention-soft); color: var(--attention); }

.main { min-width: 0; padding: 24px 32px 48px; }
.intro { max-width: 640px; display: grid; gap: 14px; }
.intro p { margin: 0; }
.intro ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }

/* A screen */
.scr-head { display: grid; gap: 4px; margin-bottom: 16px; }
.scr-back { justify-self: start; margin-left: -10px; }
.scr-who { margin: 0; color: var(--ink-soft); }
/* The versions: cards that say what each one is; the one on screen has the forest ring */
.versions { margin: 0 0 16px; }
.versions-h { margin: 0 0 10px; font-size: 15px; line-height: 20px; font-weight: 800; }
.vcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vcard { display: grid; gap: 6px; align-content: start; padding: 12px 14px 14px; border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line-strong); text-align: left; transition: box-shadow 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out); }
.vcard:active { transform: scale(0.98); }
.vcard-top { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.vcard-top b { font-size: 16px; }
.vnow { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: var(--accent-text); }
.vtext { font-size: 14px; line-height: 20px; color: var(--ink-soft); }
.vcard[aria-selected="true"] { background: var(--sage-soft); box-shadow: inset 0 0 0 2px var(--forest); }
.vcard[aria-selected="true"] .vnow { color: var(--forest-deep); }
.vcard[aria-selected="true"] .vtext { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .vcard:not([aria-selected="true"]):hover { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sage); }
  .vcard:not([aria-selected="true"]):hover .vnow .ic { transform: translateX(2px); }
  .seg button:not([aria-selected="true"]):hover { color: var(--ink); background: rgba(255,253,247,0.6); }
}
.vnow .ic { transition: transform 160ms var(--ease-out); }
.dir-text { margin: 0 0 14px; max-width: 760px; }
.seg .ic { flex: none; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 800; color: var(--ink-soft); transition: background-color 150ms ease, color 150ms ease; }
.seg button[aria-selected="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

/* The frame */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-lg); background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.device { position: relative; flex: none; overflow: hidden; background: var(--surface); }
.device--phone { border-radius: 28px; box-shadow: 0 0 0 8px var(--ink), var(--shadow-float); margin: 8px 0; }
.device--desktop { border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float); }
.device--bare { border-radius: 0; box-shadow: none; margin: 0; }
.device iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: var(--surface); }
.device .skel { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-soft); background: var(--surface); transition: opacity 200ms var(--ease-out); }
.device.is-ready .skel { opacity: 0; pointer-events: none; }
.stage-note { margin: 10px 0 0; }
.stage-bar { align-self: stretch; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.stage-full { margin-left: auto; height: 40px; padding: 0 14px; }
.full-only { display: none; }
.stage-title { font-weight: 800; margin-right: 4px; }
.stage.is-full { position: fixed; inset: 0; z-index: 50; border-radius: 0; box-shadow: none; padding: 12px 16px 16px; }
.stage.is-full:fullscreen { width: 100vw; height: 100vh; }
.stage.is-full .full-only { display: inline-flex; }
.stage.is-full .device { margin: auto; }
.stage.is-full .device--bare { margin: 0 -16px -16px; }
body.no-scroll { overflow: hidden; }

.decide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.decide h2 { margin: 0 0 8px; font-size: 17px; line-height: 24px; font-weight: 800; }
.pick { display: grid; gap: 10px; align-content: start; }
.pick p { margin: 0; }
.chosen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--sage-soft); }
.chosen b { color: var(--forest-deep); }
.notes { display: grid; gap: 14px; align-content: start; }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; line-height: 22px; resize: vertical; }
.q { padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }
.q p { margin: 0 0 8px; }
.q ol { margin: 0 0 8px; padding-left: 22px; }
.q > :last-child { margin-bottom: 0; }
.saved { min-height: 18px; }
.next { margin-top: 24px; display: flex; justify-content: flex-end; }

@media (max-width: 1023px) {
  .layout { display: block; }
  .nav { position: static; height: auto; border-right: 0; background: none; padding: 16px; }
  .layout.has-screen .nav { display: none; }
  .layout:not(.has-screen) .main { display: none; }
  .main { padding: 16px 16px 40px; }
  .stage { padding: 12px; }
  .decide { grid-template-columns: minmax(0, 1fr); }
  .bar-name { display: none; }
}
@media (max-width: 599px) {
  .bar-title { display: none; }
  .vcards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 4px; scroll-padding: 0 16px; }
  .vcard { scroll-snap-align: start; }
  .stage-bar .seg button { padding: 0 10px; }
  .stage-full span, .stage.is-full .stage-title { display: none; }
  .stage.is-full { padding: 8px 12px 12px; }
  .stage.is-full .device--bare { margin: 0 -12px -12px; }
}
@media (prefers-reduced-motion: reduce) { .btn:active, .vcard:active { transform: none; } .device .skel, .vnow .ic { transition: none; } }
