/* Home, the route page and the step pages. Tokens from site.css. On the route, colour names a stage (the brand ring's four arcs);
   every state is also said in words (Done, You are here, Skim), never by colour alone. */

/* home: say where you are, then go. The H1 and the four buttons fit the first phone screen. */
.hello { padding: clamp(18px, 4vw, 56px) 0 clamp(20px, 4vw, 48px); }
.hello h1 { font-size: clamp(34px, 5.6vw, 76px); max-width: 14em; }
.hello .lead { margin-top: 16px; font-size: clamp(16px, 1.5vw, 20px); }
.hello .resume { margin-top: 18px; }
.hello .q { font-size: 18px; font-stretch: 105%; letter-spacing: -.01em; margin: 22px 0 10px; }
.where { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 640px; }
.where .btn { width: 100%; justify-content: center; min-height: 52px; padding: .8em 1.2em; }
@media (min-width: 640px) { .where { grid-template-columns: 1fr 1fr; } }
.hello .fine { margin-top: 14px; }
.hello .just { margin-top: 10px; font-size: 16px; }
.hello .just a { font-weight: 650; }

/* the route page: the brand ring shows your four stages filling up; the 13 steps hang on a rail */
.routehead { padding: clamp(20px, 4vw, 56px) 0 8px; }
.routehead .wrap { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; align-items: center; }
.routehead h1 { font-size: clamp(34px, 5.2vw, 68px); }
.routehead .lead { margin-top: 14px; }
.beta { margin-top: 12px; font-size: 15px; color: var(--mute); max-width: 52ch; }
.routehead .resume { margin-top: 18px; }
.banner { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--beh); font-size: 15px; max-width: 60ch; }
.ring { position: relative; width: 168px; aspect-ratio: 1; display: grid; place-items: center; align-content: center; text-align: center; line-height: 1.1; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring .t { opacity: .2; }
.ring b { font-family: var(--hand); font-weight: 400; font-size: 46px; position: relative; }
.ring span { font-size: 13px; color: var(--mute); position: relative; }
@media (max-width: 640px) { .routehead .wrap { grid-template-columns: 1fr; } .ring { width: 116px; order: -1; justify-self: start; } .ring b { font-size: 32px; } .ring span { font-size: 11px; } }
.legs { padding-bottom: 56px; }
.leg { margin-top: 30px; }
.leg h2 { font-family: var(--hand); font-weight: 400; letter-spacing: 0; font-stretch: 100%; font-size: clamp(26px, 3.4vw, 36px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding-left: 58px; position: relative; }
.leg h2::before { content: ""; position: absolute; left: 0; top: .5em; width: 44px; height: 6px; border-radius: 3px; background: var(--c); }
.leg h2 small { font-family: "Mona Sans", sans-serif; font-size: 14px; color: var(--mute); }
.route { list-style: none; margin: 14px 0 0; padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 0 14px; padding-bottom: 14px; scroll-margin-top: 90px; }
.step::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: -4px; width: 2px; background: var(--line-2); }
.leg:last-child .step:last-child::before { display: none; }
.step .node { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-family: var(--hand); font-size: 22px;
  box-shadow: inset 0 0 0 3px var(--c); position: relative; z-index: 1; }
.step.done .node { background: var(--c); color: var(--board); }
.step .card { background: var(--paper); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow), 0 0 0 1px var(--line); min-width: 0; }
.step[aria-current="step"] .card { box-shadow: var(--shadow), inset 0 0 0 3px var(--c); }
.step h3 { font-size: 19px; line-height: 1.25; }
.step .pr { margin-top: 4px; color: var(--mute); font-size: 15px; max-width: 60ch; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.flags:has(> :not([hidden])) { margin-bottom: 8px; }
.flags span { font-size: 13px; font-weight: 650; padding: 3px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--c); }
.flags .trk { box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--mute); font-weight: 600; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.acts .btn { min-height: 44px; }
.soon { color: var(--mute); font-size: 14px; padding: 0 4px; min-height: 44px; display: inline-flex; align-items: center; }
.tick { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px; cursor: pointer; font-weight: 600; font-size: 15px; margin-left: auto; }
.tick input { width: 24px; height: 24px; accent-color: var(--ink); flex: none; }
@media (max-width: 480px) { .tick { margin-left: 0; } }

/* a step page */
.stepwrap { max-width: 760px; padding-top: clamp(14px, 3vw, 40px); padding-bottom: 56px; }
.crumb { font-size: 14px; color: var(--mute); }
.crumb a { color: var(--ink); }
.stepwrap h1 { font-size: clamp(32px, 5vw, 56px); margin-top: 10px; border-top: 6px solid var(--c); padding-top: 14px; }
.promise { margin-top: 14px; }
.stepwrap section { margin-top: 28px; }
.stepwrap h2 { font-size: 22px; font-stretch: 108%; letter-spacing: -.01em; margin-bottom: 10px; }
.tool, .practise { background: var(--paper); border-radius: 20px; padding: 18px 18px 20px; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.f label { display: block; font-weight: 650; font-size: 15px; margin: 12px 0 6px; }
.f textarea { width: 100%; border-radius: 14px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line-2); background: var(--board); color: var(--ink); font: 400 17px/1.5 "Mona Sans", sans-serif; padding: 12px 14px; resize: vertical; }
.f textarea:focus-visible { outline: 3px solid var(--code); }
.saved { min-height: 1.5em; margin-top: 10px; font-size: 14px; color: var(--mute); }
.practise .btn { margin-top: 4px; }
.know ol { margin: 0; padding-left: 1.2em; }
.know li { margin: 6px 0; }
.donebar { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.donebar .btn { min-height: 52px; }
.donebar .btn[aria-pressed="true"] { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--c); }
.next { font-weight: 650; }
@media (max-width: 480px) { .donebar .btn { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* the step tools (C6 to C14): fields, results, tabs, tables. Same tokens as above; a result is always words plus a number, never colour alone. */
.tool > h2 { margin-bottom: 4px; }
.tool .blk { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.tool .blk:first-of-type { margin-top: 10px; padding-top: 0; border-top: 0; }
.tool h3 { margin: 0 0 6px; font-size: 18px; }
.tool .f { margin: 12px 0; }
.tool .f > label, .tool legend.l, .tool .l { display: block; font-weight: 650; font-size: 15px; margin: 0 0 6px; padding: 0; }
.tool fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.tool input[type=text], .tool input[type=number], .tool input[type=date], .tool select, .tool textarea { width: 100%; min-height: 48px; border-radius: 12px; border: 0; background: var(--board); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-2); font: 400 17px/1.4 "Mona Sans", sans-serif; padding: 10px 14px; }
.tool textarea { min-height: 96px; line-height: 1.5; resize: vertical; }
.tool input:focus-visible, .tool select:focus-visible, .tool textarea:focus-visible { outline: 3px solid var(--code); outline-offset: 2px; }
.tool [aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--beh); }
.unit { display: flex; align-items: center; gap: 8px; } .unit span { color: var(--mute); white-space: nowrap; } .unit input { flex: 1; min-width: 0; }
.hint { font-size: 14px; color: var(--mute); margin-top: 4px; max-width: 60ch; }
.msg { font-size: 14px; font-weight: 650; margin-top: 4px; color: var(--ink); } .msg::before { content: "Check this: "; color: var(--beh); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } @media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }
.opt { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 500; }
.opt input { width: 24px; height: 24px; accent-color: var(--ink); flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; } .seg .opt { box-shadow: inset 0 0 0 1.5px var(--line-2); border-radius: 12px; padding: 0 14px; min-height: 48px; }
.seg .opt:has(input:checked) { box-shadow: inset 0 0 0 2.5px var(--c); }
.res { background: var(--board); border-radius: 16px; padding: 14px 16px; margin-top: 14px; box-shadow: inset 0 0 0 1.5px var(--line); }
.res .big { font-size: clamp(24px, 4.4vw, 34px); font-weight: 800; font-stretch: 110%; letter-spacing: -.02em; line-height: 1.12; margin: 2px 0 6px; }
.res .mute, .mute { color: var(--mute); font-size: 15px; }
.res p + p, .res table { margin-top: 8px; }
.res ul { margin: 8px 0 0; padding-left: 1.2em; } .res li { margin: 3px 0; }
.tool table { border-collapse: collapse; width: 100%; font-size: 15px; }
.tool th, .tool td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tool td.n, .tool th.n { text-align: right; white-space: nowrap; }
.tool details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 650; }
.item { background: var(--board); border-radius: 14px; padding: 4px 14px 12px; margin: 10px 0; box-shadow: inset 0 0 0 1.5px var(--line); }
.item legend { font-weight: 650; padding: 0 4px; }
.tool .btn.ghost { min-height: 44px; }
.tabs { display: flex; gap: 6px; margin: 10px 0 4px; } .tabs button { flex: 1; min-height: 48px; border: 0; border-radius: 12px; background: var(--board); color: var(--ink); font: 650 16px "Mona Sans", sans-serif;
  box-shadow: inset 0 0 0 1.5px var(--line-2); cursor: pointer; } .tabs button[aria-pressed="true"] { background: var(--ink); color: var(--board); }
.tag { display: inline-block; font-size: 13px; font-weight: 650; padding: 2px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--mute); }
.pre { font-size: 12px; font-weight: 600; padding: 0 7px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--go); margin-left: 6px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 650; }
.wk { background: var(--board); border-radius: 14px; padding: 0 14px 10px; margin: 10px 0; box-shadow: inset 0 0 0 1.5px var(--line); }
.wk .opt { align-items: flex-start; padding: 8px 0; }
.card4 { border-radius: 18px; padding: 20px; margin: 12px 0; min-height: 240px; box-shadow: inset 0 0 0 3px var(--c); background: var(--paper); overflow-wrap: anywhere; }
.card4 .q { font-size: 20px; font-weight: 700; } .card4 .a { font-size: 26px; line-height: 1.3; margin: 14px 0; white-space: pre-line; }
.card4 + .row2 .btn { min-height: 56px; justify-content: center; }
.stack th[scope=row] { font-weight: 650; }
@media (max-width: 600px) { table.stack, table.stack tbody, table.stack tr, table.stack td, table.stack th { display: block; width: 100%; } table.stack thead { display: none; }
  table.stack tr { border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); margin: 8px 0; padding: 6px 8px; } table.stack td, table.stack th { border: 0; padding: 4px 0; } }
.ok { color: var(--go); font-weight: 650; }
.cl { display: none; }
@media (max-width: 600px) { .cl { display: block; font-size: 13px; color: var(--mute); } }
/* step 11: one column at a time on a phone, three side by side on a laptop */
.cols .col:not(.on) { display: none; }
@media (min-width: 900px) { .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } .cols .col:not(.on) { display: block; } #ctabs { display: none; } .cols .row2 { grid-template-columns: 1fr; } }
.col table, .col tbody, .col tr, .col th, .col td { display: block; text-align: left; } .col th { padding-bottom: 0; } .col td { padding-top: 2px; } .col tr { padding: 6px 0; }
.cols .col { border-top: 0; margin-top: 0; padding-top: 0; }

/* routes and step pages: the tag on a step that has notes and practice but no tool yet; the Tonight block in step 5; the print card in step 4 */
.stub { color: var(--mute); }
.printrow { margin: 6px 0 0; }
#card-print { display: none; }
.tonight h3 { font-size: 22px; }
.tonight ol { margin: 10px 0 0; padding-left: 1.2em; } .tonight li { margin: 8px 0; }
.tonight .f { margin: 10px 0; }
@media print {
  @page { margin: 12mm; }
  :root { color-scheme: light; }
  body { background: #fff !important; color: #000 !important; }
  body::before, .nav, footer, .skip, .skip2 { display: none !important; }
  main[data-step="4"] .stepwrap { padding: 0; max-width: none; }
  main[data-step="4"] .stepwrap > :not(#tool), main[data-step="4"] #tool > :not(#card-print) { display: none !important; }
  main[data-step="4"] #tool { box-shadow: none; background: none; padding: 0; }
  #card-print { display: block; color: #000; font-size: 11pt; line-height: 1.35; }
  #card-print h2 { font-size: 16pt; margin: 0 0 8pt; color: #000; }
  #card-print ol { margin: 0; padding: 0; list-style: none; counter-reset: q; }
  #card-print li { counter-increment: q; break-inside: avoid; padding: 5pt 0; border-top: .5pt solid #000; }
  #card-print li b { display: block; }
  #card-print li b::before { content: counter(q) ". "; }
  #card-print li span { display: block; white-space: pre-line; font-size: 12pt; }
  #card-print li i { display: block; font-size: 10pt; }
}
