/* Use what you saved. Loaded after articles.css, for this article only.

   Tilt means loose: a save with no job yet sits crooked in the pile. The moment it has a kind it
   stands straight, so nothing sorted is tilted and nothing tilted reads as sorted.
   Orange is the leak: the saves you open looking for the wrong thing, the fresh start, the weekly
   chore that never gets done, and a line still waiting in the sort. Indigo is what came back: the
   three saves for the job, found in one look-up, and the few seconds at the moment you save.
   Nothing else here wears either colour. */

.a-hero h1, .a-body h2, .a-body h3 { text-wrap: balance; }
.a-hero .lead, .a-body p, .a-body li { text-wrap: pretty; }
.sv-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* A person before the picture, in one line, so the five kinds still clear the fold. */
.sv-by { margin-top: 18px; }
.sv-by img { width: 32px; height: 32px; }
.sv-by strong { display: inline; margin-right: 0.6em; }
/* The facts before the picture, so the stakes read on the first screen. */
.sv-facts { margin-top: 22px; padding-top: 18px; }

/* ---------- The set piece: one job, before and after ----------
   The five kinds are real markup, so no JS still gets the finished picture. tool.js adds is-before
   to show the pile and the orange trail, then flies a copy of each save to its kind. */
.sv-fig { position: relative; margin: clamp(28px, 4vw, 44px) 0 0; padding: clamp(14px, 2.6vw, 24px); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-float); display: grid; gap: 16px; min-width: 0; }
/* The job and what happens to it, in words: a stranger reads this before any shape. */
.sv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; }
.sv-q1 { display: grid; gap: 3px; min-width: 0; }
.sv-q1 b { font-family: var(--serif); font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); font-weight: 700; line-height: 1.15; color: var(--ink); }
.sv-q1 span { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; text-wrap: balance; }
.sv-q1 .sv-af { display: block; color: var(--primary-deep); }
.sv-q1 .sv-b4 { display: none; color: var(--lift-ink); }
.is-before .sv-q1 .sv-af { display: none; }
.is-before .sv-q1 .sv-b4 { display: block; }

.sv-sw { flex: none; display: grid; grid-auto-flow: column; gap: 2px; padding: 3px; border-radius: 999px; background: var(--grid); }
.sv-sw[hidden] { display: none; }
.sv-sw button { padding: 0.45em 0.9em; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 700 0.8125rem/1.2 var(--sans); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.sv-sw button:hover { color: var(--ink); }
.sv-sw [aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(21, 26, 59, 0.16); }
.sv-sw button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Two sentences in one place, the finished one by default, so no JS still reads true. */
.sv-b4 { display: none; }
.is-before .sv-b4 { display: inline; }
.is-before .sv-af { display: none; }

/* The pile and the gate only exist before the sort. Once every save has a kind they fold away, so
   the finished picture is the five kinds and the look-up, and nothing that needs explaining. */
.sv-stage { position: relative; display: grid; min-width: 0; }
.sv-fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.sv-fold > div { min-height: 0; overflow: hidden; }
.is-before .sv-fold { grid-template-rows: 1fr; transition: none; }
.is-before .sv-fold > div { overflow: visible; }

.sv-pile { position: relative; padding: 12px 12px 16px; border-radius: 14px; background: var(--paper); }
.sv-pilehead { position: relative; z-index: 1; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-hint); }
/* Four weeks side by side, each column as long as what was saved that week: the pile grows. */
.sv-weeks { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 10px; align-items: start; }
.sv-wk { display: grid; gap: 7px; justify-items: start; min-width: 0; }
.sv-wl { justify-self: stretch; padding-bottom: 4px; border-bottom: 1px solid var(--rule); font: 600 0.75rem/1.2 var(--mono); color: var(--ink-hint); }

.sv-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.is-sorting .sv-trail { display: none; }
.sv-trail path { fill: none; stroke: var(--lift); stroke-width: 2; stroke-dasharray: 3 6; stroke-linecap: round; stroke-linejoin: round; }

.sv-g { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 0.42em 0.7em; border-radius: 8px; transform: rotate(calc(var(--r) * 1deg)); color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px #C9CEE3, 0 2px 5px -2px rgba(21, 26, 59, 0.22); font-size: 0.8125rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
/* What kind of thing it is, as a small shape: a tool, a page to read, a video, a document. */
.sv-g::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 2px; background: #AEB5D6; }
.sv-g.is-video::before { width: 8px; border-radius: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.sv-g.is-read::before { width: 8px; height: 10px; background: none; box-shadow: inset 0 0 0 1.5px #AEB5D6; }
.sv-g.is-doc::before { width: 8px; height: 10px; border-radius: 1px 3px 1px 1px; }
/* Opened in the search: orange, numbered in the order you opened it. */
.sv-g[data-n] { color: var(--lift-ink); background: var(--lift-tint); box-shadow: inset 0 0 0 1px var(--lift), 0 2px 5px -2px rgba(21, 26, 59, 0.22); }
.sv-g[data-n]::before { background: var(--lift-ring); }
.sv-g[data-n]::after { content: attr(data-n); position: absolute; top: -9px; right: -7px; width: 19px; height: 19px; border-radius: 50%; background: var(--lift-ink); color: #fff; font: 700 11px/19px var(--mono); text-align: center; }
/* Where a save lay, once it has left: the pile visibly thins as the sort runs. */
.sv-g.is-left { color: transparent; background: none; box-shadow: inset 0 0 0 1px #DADDEC; }
.sv-g.is-left::before, .sv-g.is-left::after { visibility: hidden; }
.sv-fly { position: absolute; z-index: 5; margin: 0; overflow: hidden; pointer-events: none; }
.sv-fly::after { display: none; }

/* The fresh start, where the trail ends: in the empty corner the short weeks leave. */
.sv-scratch { position: absolute; z-index: 2; left: 12px; bottom: 16px; padding: 0.45em 0.95em; border-radius: 999px; background: var(--lift-tint); box-shadow: inset 0 0 0 1.5px var(--lift); color: var(--lift-ink); font: 700 0.8125rem/1.2 var(--sans); white-space: nowrap; }
.is-sorting .sv-scratch { visibility: hidden; }

.sv-gate { position: relative; display: grid; place-items: center; height: 2.75rem; }
.sv-gate::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #AEB5D6; }
.sv-gate span { position: relative; padding: 0.42em 1em; border-radius: 999px; background: var(--night); color: #fff; font: 700 0.8125rem/1.2 var(--sans); }

/* ---------- The five kinds ---------- */
.sv-land { display: grid; gap: 6px; min-width: 0; }
.is-before .sv-land { padding-top: 12px; border-top: 2px solid #AEB5D6; }
.sv-kind { display: grid; grid-template-columns: 9.25rem minmax(0, 1fr); gap: 12px; align-items: center; min-width: 0; padding: 9px 10px 9px 12px; border-radius: 12px; background: var(--paper); }
.sv-kh { display: grid; gap: 1px; min-width: 0; line-height: 1.2; }
.sv-kh b { font-size: 0.9375rem; font-weight: 700; color: var(--ink); }
.sv-kh small { font-size: 0.75rem; color: var(--ink-hint); }
.sv-items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.sv-items li { min-width: 0; padding: 5px 9px; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 0.8125rem; font-weight: 600; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.sv-items li.is-wait { visibility: hidden; }
/* Before the sort the kinds are only their names, one short row each. The saves take their space the
   moment the sort starts, so each copy flies to where its save will stand. */
.is-before:not(.is-sorting) .sv-items li.is-wait { display: none; }
/* Let go: still shown, so you see what you are deleting, but no longer asking for attention. */
.sv-kind[data-k="go"] li { background: none; box-shadow: inset 0 0 0 1px #D3D7E8; color: var(--ink-hint); text-decoration: line-through; text-decoration-color: #AEB5D6; }
/* The three saves for Friday's job, once every save has a kind: indigo, found at once. */
.sv-items li.is-job { box-shadow: inset 0 0 0 2px var(--primary); color: var(--primary-deep); font-weight: 700; }
.is-before .sv-items li.is-job { box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink); font-weight: 600; }

/* The look-up: the job, then what you reach for. The list by job, in one line. */
.sv-look { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px 16px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--primary-tint); min-width: 0; }
.is-before .sv-look { display: none; }
.sv-lq, .sv-la { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.sv-lq small, .sv-la small { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-hint); }
.sv-lq b { font-family: var(--serif); font-size: 1.125rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.sv-la span { padding: 4px 9px; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--primary); color: var(--primary-deep); font-size: 0.8125rem; font-weight: 700; line-height: 1.2; }

.sv-read { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "eye eye" "num txt"; align-items: baseline; gap: 2px 12px; padding: 12px 16px; border-radius: 12px; background: var(--paper); min-width: 0; }
.sv-read .eyebrow { grid-area: eye; color: var(--ink-hint); }
.sv-read b { grid-area: num; font-family: var(--serif); font-size: clamp(1.7rem, 1.4rem + 1.1vw, 2.2rem); font-weight: 700; line-height: 1.05; color: var(--primary-deep); white-space: nowrap; }
.sv-read small { grid-area: txt; font-size: 0.9375rem; line-height: 1.35; color: var(--ink-2); text-wrap: balance; }
.is-before .sv-read b { color: var(--ink-hint); }
.sv-cap { margin-top: 14px; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-hint); }

/* ---------- Step 1: the list ---------- */
/* The one dark surface in the reading column: where the reader stops reading and writes. */
.sv-tool { padding: clamp(16px, 2.6vw, 26px); border-radius: 22px; background: var(--night); color-scheme: dark; display: grid; gap: 12px; min-width: 0; }
.sv-lab { font-size: 0.875rem; font-weight: 700; line-height: 1.3; color: var(--on-night); text-wrap: balance; }
.sv-tool textarea { width: 100%; min-width: 0; padding: 0.7em 0.85em; border: 1px solid var(--night-line); border-radius: 12px; background: var(--night-2); color: var(--on-night); font: 500 1.0625rem/1.55 var(--sans); resize: vertical; transition: border-color 0.2s, box-shadow 0.2s; }
.sv-tool textarea::placeholder { color: var(--on-night-2); }
.sv-tool textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 108, 248, 0.25); }
.sv-count { font: 600 0.9375rem/1.4 var(--mono); color: var(--on-night); }
.sv-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.sv-text { padding: 0.2em 0; border: 0; background: none; color: var(--on-night); font: 600 0.9375rem/1.2 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sv-text:hover { color: #fff; }
.sv-tool button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.a-body .sv-tool .fine { line-height: 1.5; color: var(--on-night-2); }

.sv-empty { padding: 16px 18px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 1rem; line-height: 1.5; color: var(--ink-hint); }
.sv-tool .sv-empty { background: var(--night-2); box-shadow: none; color: var(--on-night-2); }

/* ---------- Step 2: the questions, as a path ---------- */
.sv-path { margin: 0; display: grid; gap: 0; }
.sv-q { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem 9.5rem; align-items: center; }
.sv-q > span:first-child { padding: 13px 16px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.sv-to { position: relative; display: grid; place-items: center; height: 2px; background: #AEB5D6; font-size: 0.75rem; font-style: normal; font-weight: 700; color: var(--ink-2); }
.sv-to::after { content: ""; position: absolute; right: 0; top: -4px; border-left: 7px solid #AEB5D6; border-block: 5px solid transparent; }
/* Each answer sits on its own line, as a small label the line runs through. */
.sv-to span, .sv-on span { padding: 2px 7px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px #C9CEE3; line-height: 1.2; white-space: nowrap; }
.sv-to span { position: absolute; left: calc(50% - 3px); top: 50%; transform: translate(-50%, -50%); }
/* A kind is a dark pill everywhere on the page: here, on the sorted rows, and on the test day. Same height as its question. */
.sv-out { padding: 13px 12px; border-radius: 12px; background: var(--night); font-size: 1rem; font-weight: 700; line-height: 1.3; text-align: center; color: #fff; white-space: nowrap; }
.sv-on { position: relative; display: flex; align-items: center; height: 34px; margin-left: 28px; border-left: 2px solid #AEB5D6; font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.sv-on span { margin-left: -1px; transform: translateX(-50%); }
/* No question left to ask: a statement, so it sits on the paper, not on a card. */
.sv-q.is-else > span:first-child { background: var(--paper); font-weight: 500; color: var(--ink-2); }

/* ---------- Step 2: the sort ---------- */
#sv-sorter { display: grid; gap: 12px; min-width: 0; }
.sv-tally { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9375rem; line-height: 1.3; color: var(--ink-2); }
.sv-tally:empty { display: none; }
.sv-tally b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.sv-tally .is-open, .sv-tally .is-open b { color: var(--lift-ink); }

.a-body .sv-sort { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "q seg"; gap: 8px 14px; align-items: center; min-width: 0; padding: 11px 12px 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 1rem; line-height: 1.35; }
.sv-row > strong { grid-area: name; min-width: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.sv-row .sv-ask { grid-area: q; min-width: 0; display: grid; gap: 2px; font-size: 0.9375rem; line-height: 1.35; color: var(--ink-2); }
.sv-row .sv-so { font-size: 0.8125rem; color: var(--ink-hint); overflow-wrap: anywhere; }
.sv-row > .sv-seg { grid-area: seg; grid-auto-columns: 4.6rem; }
/* A question that takes words: the field gets the whole row under it. */
.sv-row.is-words { grid-template-areas: "name name" "q q" "in in"; }
.sv-in { grid-area: in; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; min-width: 0; }
.sv-in input { flex: 1 1 14rem; min-width: 0; min-height: 2.5rem; padding: 0.45em 0.75em; border: 1px solid #C9CEE3; border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 1rem/1.3 var(--sans); }
.sv-in input::placeholder { color: var(--ink-hint); }
.sv-in input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 108, 248, 0.25); }
.sv-in input[aria-invalid="true"] { border-color: var(--lift); }
.sv-next { min-height: 2.5rem; padding: 0.3em 1em; border: 0; border-radius: 10px; background: var(--night); color: #fff; font: 700 0.9375rem/1.15 var(--sans); cursor: pointer; }
.sv-next:hover { background: var(--night-2); }
.sv-next:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.sv-hint { flex-basis: 100%; font-size: 0.875rem; line-height: 1.4; color: var(--lift-ink); }
.sv-hint:empty { display: none; }
/* Still loose, so still orange: the mark goes the moment the line gets a kind. */
.sv-row.is-open { box-shadow: inset 0 0 0 1px var(--rule), inset 3px 0 0 var(--lift); }
.sv-row.is-set { grid-template-areas: "name tag" "why why"; }
.sv-tag { grid-area: tag; justify-self: end; padding: 0.35em 0.8em; border-radius: 999px; background: var(--night); color: #fff; font: 700 0.875rem/1.2 var(--sans); white-space: nowrap; }
.sv-why { grid-area: why; min-width: 0; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.sv-link { padding: 0.1em 0; border: 0; background: none; color: var(--primary-deep); font: 600 0.875rem/1.3 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.sv-why .sv-link, .sv-so .sv-link { margin-left: 0.5em; }
.sv-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
/* The sample before there is a list. Recomputed colours, not opacity. */
.is-ghost .sv-row > strong { font-weight: 500; color: var(--ink-hint); }
.is-ghost .sv-seg button, .is-ghost .sv-link, .is-ghost .sv-next { color: var(--ink-hint); cursor: default; }
.is-ghost .sv-next { background: #DFE1EC; }
.is-ghost .sv-in input { background: var(--paper); }
.is-ghost .sv-tag { background: #DFE1EC; color: var(--ink-2); }
.sv-try { justify-self: start; padding: 0.6em 1.05em; border: 0; border-radius: 999px; background: var(--primary-tint); color: var(--primary-deep); font: 700 0.9375rem/1.2 var(--sans); cursor: pointer; }
.sv-try:hover { background: #DFE4FD; }
.sv-try:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.sv-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; min-width: 0; }
.sv-seg button { min-height: 2.5rem; padding: 0.3em 0.7em; border: 0; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); font: 700 0.9375rem/1.15 var(--sans); cursor: pointer; transition: background-color 0.2s, box-shadow 0.2s, color 0.2s; }
.sv-seg button:hover { box-shadow: inset 0 0 0 2px #B5BAD2; }
.sv-seg button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- Step 3 and 4: the list, and the dated folder ---------- */
/* The list is what the reader leaves with, so it shows whole: no box to scroll inside a page. */
.a-step .a-code.is-tall pre { max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.sv-ln { display: block; min-height: 1.6em; }
.a-body li > code.sv-date { white-space: normal; }

/* ---------- Step 5: a test on a day, then one call ---------- */
.sv-test { margin: 0; padding: clamp(16px, 2.6vw, 22px); border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 14px; position: relative; }
.sv-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
/* An empty day is only a hairline. A day with a test is a card, the same card a save is in the pile. */
.sv-day { display: grid; align-content: start; gap: 4px; min-width: 0; min-height: 6.5rem; padding: 8px 9px 10px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--rule); }
.sv-day small { font: 600 0.75rem/1.2 var(--mono); color: var(--ink-hint); }
.sv-day b { font-size: 0.875rem; font-weight: 700; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }
.sv-day i { font-size: 0.8125rem; font-style: normal; line-height: 1.3; color: var(--ink-2); }
.sv-day.is-on { background: var(--surface); box-shadow: inset 0 0 0 1px #C9CEE3, 0 2px 5px -2px rgba(21, 26, 59, 0.22); }
.sv-call { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sv-cl { margin-right: 4px; font-size: 0.875rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.sv-c { display: grid; gap: 1px; padding: 6px 12px; border-radius: 10px; background: var(--night); color: #fff; font-size: 0.9375rem; font-weight: 700; line-height: 1.2; }
.sv-c small { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; color: var(--on-night-2); }

/* The reader's own tests, once step 2 has one. */
.sv-mine { display: grid; gap: 8px; min-width: 0; }
.sv-mine:empty { display: none; }
.sv-ml { font-size: 0.875rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.a-body .sv-tests { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sv-tests li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 4px 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.sv-tests li b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.sv-tests li strong { color: var(--ink); }

/* ---------- Step 6: a weekly chore, or a few seconds at the save ---------- */
.sv-rule { margin: 6px 0; padding: clamp(16px, 2.6vw, 22px); border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 18px; position: relative; }
.sv-lane { display: grid; gap: 8px; min-width: 0; }
.sv-ll { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-hint); }
.sv-lr { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.is-chore .sv-lr { color: var(--lift-ink); }
.is-save .sv-lr { color: var(--primary-deep); }
.sv-weeks4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sv-wc { display: grid; gap: 6px; min-width: 0; padding: 8px 9px 10px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.sv-wc small { font: 600 0.75rem/1.2 var(--mono); color: var(--ink-hint); }
.sv-wc i { justify-self: start; padding: 4px 8px; border-radius: 7px; background: var(--lift-tint); box-shadow: inset 0 0 0 1px var(--lift); color: var(--lift-ink); font-size: 0.8125rem; font-style: normal; font-weight: 700; line-height: 1.25; }
.sv-flow { display: grid; grid-template-columns: auto minmax(1rem, 1fr) auto minmax(1rem, 1fr) auto minmax(1rem, 1fr) auto; align-items: center; gap: 8px; min-width: 0; }
.sv-fs { display: grid; gap: 1px; min-width: 0; padding: 7px 11px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); font-size: 0.875rem; font-weight: 700; line-height: 1.25; color: var(--ink); }
.sv-fs small { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-hint); }
.sv-fs.is-list { box-shadow: inset 0 0 0 2px var(--primary); color: var(--primary-deep); }
.sv-fa { position: relative; display: block; height: 2px; background: var(--primary); }
.sv-fa::after { content: ""; position: absolute; right: -1px; top: -4px; border-left: 7px solid var(--primary); border-block: 5px solid transparent; }

/* ---------- Tablets and small laptops ---------- */
@media (max-width: 900px) and (min-width: 641px) {
  .sv-g { font-size: 0.75rem; padding: 0.4em 0.6em; }
}

/* ---------- Phones ----------
   Four weeks at 390 leave no room for names, so the saves in the pile lose their words and become
   bars: at this size the pile only has to look like more each week, and the orange numbers carry
   the search. The five kinds stack their label over their saves. The path puts each answer in a row
   under its question. */
@media (max-width: 640px) {
  .sv-weeks { gap: 7px; }
  .sv-wk { gap: 6px; justify-items: stretch; }
  .sv-g, .sv-fly { height: 1rem; padding: 0; font-size: 0; }
  .sv-g::before { display: none; }
  .sv-pile { padding-bottom: 14px; }
  .sv-scratch { left: 10px; bottom: 12px; }
  .sv-gate { height: 2.5rem; }
  .sv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "q sw" "a a"; align-items: center; gap: 4px 12px; }
  .sv-q1 { display: contents; }
  .sv-q1 b { grid-area: q; }
  .sv-q1 span { grid-area: a; }
  .sv-sw { grid-area: sw; }
  .sv-sw button { padding-inline: 0.75em; }

  .sv-kind { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px 9px 9px; }
  .sv-kh { grid-template-columns: auto auto; justify-content: start; align-items: baseline; gap: 8px; }
  .sv-items li { padding: 4px 7px; font-size: 0.75rem; }
  .sv-look { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 12px; }
  .sv-la span { font-size: 0.75rem; }
  .sv-read { padding: 10px 12px; }

  .sv-q { grid-template-columns: minmax(0, 1fr) 9rem; row-gap: 0; }
  .sv-q > span:first-child { grid-column: 1 / -1; }
  .sv-to { grid-column: 1; grid-row: 2; display: flex; justify-content: flex-end; align-items: center; align-self: center; height: auto; margin-top: 6px; padding-right: 10px; background: none; }
  .sv-to::after { display: none; }
  .sv-to span { position: static; transform: none; }
  .sv-to span::after { content: " →"; }
  .sv-out { grid-column: 2; grid-row: 2; margin-top: 6px; padding-block: 11px; }
  /* The next line has to leave from its question, so it runs up past the answer beside it. */
  .sv-on { align-items: flex-end; height: 74px; margin-top: -44px; padding-bottom: 7px; pointer-events: none; }

  .sv-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "q" "seg"; }
  .sv-row.is-words { grid-template-areas: "name" "q" "in"; }
  .sv-row > .sv-seg { grid-auto-columns: minmax(0, 1fr); }
  .sv-row.is-set { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name tag" "why why"; }
  .sv-in input { flex-basis: 100%; }

  /* A week of five days is too narrow for words, so only the days with a test stay, as rows. */
  .sv-days { grid-template-columns: minmax(0, 1fr); }
  .sv-day { display: none; }
  .sv-day.is-on { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); min-height: 0; column-gap: 10px; }
  .sv-day.is-on small { grid-row: 1 / span 2; padding-top: 2px; }
  .sv-tests li { grid-template-columns: minmax(0, 1fr); }
  /* The call's two answers side by side, under the question, so neither ends up alone on a line. */
  .sv-call { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-cl { grid-column: 1 / -1; margin-right: 0; }

  .sv-weeks4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-flow { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 0; }
  .sv-fa { width: 2px; height: 18px; margin-left: 22px; }
  .sv-fa::after { right: -4px; top: auto; bottom: -1px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--primary); border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-sw button, .sv-seg button, .sv-fold { transition: none; }
}
