/* twentyfifty's own colours and voice: forest green bands, white sheets on pale paper, serif headlines over a
   plain sans, lime for the one thing to do next. A passage that reads like AI writing is marked in warm red, and
   turns forest green once a person has settled it. The mark on an issued document is the one bold thing.
   docs/UI.md says why. */
@font-face { font-family: "Newsreader"; src: url("/static/newsreader-latin-variable.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --forest: #18433C;
  --deep: #0B3832;
  --ink: #0E2A25;
  --soft: #3C5C55;
  --lime: #B7C958;
  --mist: #ACCCC9;
  --paper: #F4F5F1;
  --sheet: #FFFFFF;
  --rule: #DDE1DA;
  --edge: #9FB0AA;
  --mark: #B4412B;
  --settle: #18433C;
  --mark-wash: #FBEAE5;
  --mark-lit: #F6CFC6;
  --mark-on-dark: #F2997F;
  --here: #EEF3EA;
  --on-band: #FFFFFF;
  --on-band-soft: #C9DDD9;
  --sans: "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "Tiempos Headline", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 3vw, 40px);
  --r: 8px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E6EFEB;
    --soft: #A9C2BB;
    --paper: #0C1F1B;
    --sheet: #122A25;
    --rule: #24423B;
    --edge: #4E6E66;
    --mark: #F2997F;
    --settle: #B7C958;
    --mark-wash: #40221B;
    --mark-lit: #5C2F25;
    --here: #17332D;
    --forest: #18433C;
    --deep: #0A2925;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; box-shadow: 0 0 0 5px var(--forest); }
p { margin: 0 0 0.8em; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.012em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 8px; background: var(--sheet); padding: 6px 10px; z-index: 9; }
.hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.muted { font-weight: 400; color: var(--soft); }
details:not([open]) > :not(summary) { display: none; }

/* ---------- frame ---------- */
.bar { background: var(--forest); color: var(--on-band); }
.bar-in { max-width: 1280px; margin: 0 auto; padding: 18px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 10px 28px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: baseline; gap: 12px; color: var(--on-band); text-decoration: none; font-size: 1.5rem; line-height: 1; letter-spacing: -0.01em; }
.wordmark .tw { font-weight: 300; }
.wordmark .ff { font-weight: 700; }
.wordmark .product { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: var(--lime); padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.3); }
.bar-nav { display: flex; align-items: center; gap: 6px 26px; flex-wrap: wrap; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.bar-nav a, .bar-nav .link { color: var(--on-band); text-decoration: none; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.bar-nav a:hover, .bar-nav .link:hover { color: var(--lime); }
.bar-nav form { margin: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wide { max-width: 1280px; margin: 0 auto; padding: 32px var(--gutter) 72px; }
.narrow { max-width: 560px; margin: 0 auto; padding: 64px var(--gutter); }
.reading { max-width: 760px; margin: 0 auto; padding: 44px var(--gutter) 80px; }
.reading h2 { font-size: 1.7rem; margin: 2.4rem 0 0.6rem; }
.reading h3 { font-size: 1.3rem; margin: 1.6rem 0 0.5rem; }
.reading dt { font-weight: 700; margin-top: 0.9rem; }
.reading dd { margin: 0.1rem 0 0; }
.reading li { margin: 0.45rem 0; }
.reading p, .reading li, .reading dd { max-width: 66ch; }
.page-title { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: 0.35em; }
.lede { font-size: 1.14rem; line-height: 1.5; margin: 0.4rem 0 1.4rem; max-width: 58ch; }
.lede-small { margin: 0.3rem 0 0.9rem; max-width: 62ch; color: var(--soft); }
.note { font-size: 0.94rem; color: var(--soft); }
.error { border-left: 4px solid var(--mark); background: var(--mark-wash); padding: 10px 14px; margin: 0 0 16px; font-weight: 600; border-radius: 0 var(--r) var(--r) 0; }
.fine { color: var(--soft); font-size: 0.9rem; margin: 2px 0 0; }

/* ---------- controls ---------- */
label { display: block; font-weight: 600; margin: 0 0 6px; }
input[type="email"], input[type="password"], input[type="text"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--edge); border-radius: var(--r); padding: 11px 12px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--lime); outline-offset: 1px; border-color: var(--forest); }
.go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; background: var(--forest); color: #fff; border: 0; border-radius: var(--r); padding: 0 22px; font: 600 1rem/1.1 var(--sans); cursor: pointer; text-decoration: none; }
.go:hover { background: var(--deep); }
.go:disabled { opacity: 0.6; cursor: default; }
.go kbd { font: 500 0.72rem/1 var(--sans); opacity: 0.75; }
.go-small { min-height: 42px; padding: 0 16px; font-size: 0.94rem; }
.band .go, .changes .go { background: var(--lime); color: #0E2A25; }
.band .go:hover, .changes .go:hover { background: #C9DA6E; }
.plain-button { display: inline-flex; align-items: center; min-height: 42px; background: transparent; color: var(--ink); border: 1px solid var(--edge); border-radius: var(--r); padding: 0 14px; font: 600 0.92rem/1.1 var(--sans); text-decoration: none; cursor: pointer; }
.plain-button:hover { border-color: var(--forest); background: var(--here); }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 360px; border: 2px dashed var(--edge); border-radius: var(--r); padding: 24px; margin: 0; cursor: pointer; font-weight: 400; }
.drop:hover, .drop.has-file, .drop:focus-within { background: var(--here); border-color: var(--forest); }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-big { font: 600 1.7rem/1.15 var(--serif); overflow-wrap: anywhere; }
.drop-small { max-width: 38em; color: var(--soft); }
.drop-compact { min-height: 150px; background: var(--sheet); }
.drop-compact .drop-big { font-size: 1.35rem; }
.tick { display: flex; gap: 10px; align-items: baseline; font-weight: 400; margin: 0; font-size: 0.96rem; }
.tick input { margin: 0; accent-color: var(--forest); width: 16px; height: 16px; flex: none; transform: translateY(2px); }
.drop-veil { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: color-mix(in srgb, var(--deep) 92%, transparent); color: #fff; pointer-events: none; font: 600 2.6rem var(--serif); }

/* ---------- the green band, and the three steps every draft goes through ---------- */
.band { background: var(--forest); color: var(--on-band); }
.band-in { max-width: 1280px; margin: 0 auto; padding: 34px var(--gutter) 30px; }
.band a { color: var(--on-band); }
.band a:hover { color: var(--lime); }
.steps { list-style: none; margin: 0; padding: 0; background: var(--deep); color: var(--on-band-soft); }
.steps-in { list-style: none; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; padding: 14px 0 16px; border-top: 3px solid transparent; opacity: 0.62; }
.step-n { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; }
.step-name { font-weight: 700; color: var(--on-band); }
.step-what { font-size: 0.88rem; line-height: 1.35; }
.step.is-now { opacity: 1; border-top-color: var(--lime); }
.step.is-now .step-n { background: var(--lime); border-color: var(--lime); color: #0E2A25; }
.step.is-done { opacity: 0.9; }
.step.is-done .step-n { background: transparent; color: var(--lime); border-color: var(--lime); }
.step a { color: inherit; }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: flex; flex-wrap: wrap; }
.signin-show { flex: 999 1 520px; min-width: 0; background: var(--forest); color: var(--on-band); padding: clamp(28px, 5vw, 72px); display: flex; flex-direction: column; gap: 30px; }
.signin-line { margin: 0; max-width: 14em; font: 600 clamp(2.3rem, 4.8vw, 3.9rem)/1.08 var(--serif); letter-spacing: -0.015em; }
.signin-steps { list-style: none; margin: auto 0 0; padding: 0; max-width: 34em; counter-reset: s; }
.signin-steps li { counter-increment: s; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.signin-steps li::before { content: counter(s); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--lime); color: var(--lime); display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; }
.signin-steps b { font-weight: 700; }
.signin-steps span { color: var(--on-band-soft); font-size: 0.95rem; }
.signin-form { flex: 1 1 380px; background: var(--sheet); padding: clamp(28px, 5vw, 72px); display: flex; align-items: center; }
.signin-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 6px; }
.signin-form h1 { font-size: 2.2rem; margin-bottom: 18px; }
.signin-form input { margin-bottom: 14px; }
.signin-form .fine { margin-top: 12px; }

/* ---------- step one: the check page ---------- */
.home-title { font-size: clamp(2.3rem, 4.8vw, 3.6rem); max-width: 16em; }
.home-lede { color: var(--on-band-soft); font-size: 1.1rem; margin: 12px 0 0; max-width: 58ch; }
.home-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 48px; }
.home-main { flex: 999 1 560px; min-width: 0; }
.composer { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.switch { border: 0; margin: 0; padding: 0 14px; display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--rule); }
.switch label { margin: 0; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { display: flex; align-items: center; min-height: 52px; padding: 0 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--soft); }
.switch input:checked + span { font-weight: 700; color: var(--ink); border-bottom-color: var(--settle); }
.switch input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: -3px; }
.panel-paste textarea { display: block; min-height: 400px; resize: vertical; border: 0; border-radius: 0; background: transparent; padding: 28px 34px; font: 400 1.22rem/1.6 var(--serif); }
.panel-paste textarea:focus { outline: none; }
.panel-paste textarea::placeholder { color: var(--soft); }
.hint { font-size: 0.94rem; margin: 10px 0 0; color: var(--soft); }
.panel-paste .hint { padding: 0 34px 12px; margin: 0; }
.panel-line { padding: 34px; min-height: 330px; }
.panel-line input, .panel-line select { height: 50px; }
.panel-file { padding: 22px; }
.composer-foot { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 14px 16px 14px 34px; border-top: 1px solid var(--rule); background: var(--paper); }
.composer-foot .go { margin-left: auto; }
.count { margin: 0; font-size: 0.92rem; flex-basis: 100%; color: var(--soft); }
.count:empty { display: none; }
.composer-foot .link { font-size: 0.95rem; }
.home-fine { font-size: 0.93rem; margin: 16px 0 0; color: var(--soft); }
.home-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.home-side h2 { font-size: 1.35rem; margin-bottom: 10px; }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { border-top: 1px solid var(--rule); }
.recent a { display: block; padding: 11px 0; text-decoration: none; }
.recent a:hover .recent-title { text-decoration: underline; }
.recent-title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.recent-meta { display: block; font-size: 0.92rem; color: var(--soft); }
.rules p { position: relative; margin: 0 0 10px; line-height: 1.45; }
.rules p:has(.stroke) { padding-left: 34px; }
.rules .stroke { position: absolute; left: 0; top: 0.2em; }
.rules-no { font-weight: 600; }
.stroke { display: inline-block; vertical-align: middle; width: 5px; height: 1.15em; margin-right: 10px; border-radius: 3px; background: var(--edge); }
.stroke-marked { background: var(--mark); }
.stroke-little { background: repeating-linear-gradient(var(--soft) 0 3px, transparent 3px 6px); }
.stroke-signed { background: var(--settle); }

/* ---------- step two: the report ---------- */
.source-line { margin: 0 0 8px; overflow-wrap: anywhere; color: var(--on-band-soft); font-size: 0.95rem; }
.src-title { font-weight: 600; color: var(--on-band); }
.verdict { font-size: clamp(2.4rem, 5.2vw, 4.1rem); line-height: 1.04; max-width: 16em; }
.next { margin: 14px 0 0; max-width: 60ch; font-size: 1.12rem; line-height: 1.45; color: var(--on-band); }
.caveat { margin: 8px 0 0; max-width: 84ch; font-size: 0.93rem; color: var(--on-band-soft); }
.tally { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 0.95rem; color: var(--on-band-soft); }
.tally li { position: relative; padding-left: 15px; }
.tally li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 5px; height: 1em; border-radius: 3px; background: var(--mist); }
.tally b { font-weight: 700; color: var(--on-band); font-variant-numeric: tabular-nums; }
.t-marked::before { background: var(--mark-on-dark) !important; }
.t-signed::before { background: var(--lime) !important; }
.t-little::before { background: repeating-linear-gradient(var(--mist) 0 3px, transparent 3px 6px) !important; }
.progress { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; font-weight: 600; }
.pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.strip { display: block; width: 100%; height: 22px; margin-top: 24px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
.m-clean { fill: transparent; }
.m-marked { fill: var(--mark-on-dark); }
.m-little { fill: var(--mist); opacity: 0.55; }
.m-signed { fill: var(--lime); }
.strip a:hover rect, .strip a:focus rect { opacity: 0.7; }
.page-bar { background: var(--rule); border-radius: 3px; }
.page-bar .m-marked { fill: var(--mark); }
.page-bar .m-little { fill: var(--soft); }
.key { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; font-size: 0.9rem; color: var(--on-band-soft); }

.columns { max-width: 1280px; margin: 0 auto; padding: 30px var(--gutter) 72px; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 30px 36px; }
.side-in { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; scrollbar-width: thin; padding: 0 6px 6px 0; }
.side h2 { font-size: 1.5rem; margin-bottom: 4px; }
.side-count { margin: 0 0 12px; color: var(--soft); font-size: 0.95rem; }
.chips { display: flex; gap: 2px 14px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { min-height: 38px; padding: 0; color: var(--soft); background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; font-size: 0.9rem; cursor: pointer; }
.chip b { font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 4px; }
.chip:disabled { opacity: 0.45; cursor: default; }
.chip.is-on { font-weight: 700; color: var(--ink); border-bottom-color: var(--settle); }
.stepper { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.keys { font-size: 0.85rem; color: var(--soft); }
.fix-list { list-style: none; counter-reset: fix; margin: 0; padding: 0; border-top: 1px solid var(--edge); }
.fix-list li { counter-increment: fix; border-bottom: 1px solid var(--rule); }
.fix-list a, .fix-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 3px 10px; padding: 12px 8px 12px 4px; text-decoration: none; }
.fix-list a:hover, .fix-list a.is-here { background: var(--here); }
.fix-list a::before { content: counter(fix); grid-row: span 2; font: 600 1.25rem/1.1 var(--serif); color: var(--soft); }
.fix-marked a::before { color: var(--mark); }
.fix-signed a::before { content: "✓"; color: var(--settle); font-family: var(--sans); }
.fix-text { font: 400 1rem/1.35 var(--serif); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.fix-why { font-size: 0.88rem; line-height: 1.4; color: var(--soft); }
.fix-marked .fix-why { color: var(--mark); font-weight: 600; }
.fix-change, .fix-signed-by { grid-column: 2; font-size: 0.9rem; line-height: 1.4; color: var(--soft); }
.fix-signed .fix-text, .fix-signed .fix-why { color: var(--soft); }
.fix-none p { margin: 0; color: var(--soft); }
.take { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--rule); display: grid; gap: 8px; justify-items: start; font-size: 0.94rem; }
.take h3 { font: 700 0.95rem var(--sans); letter-spacing: 0; }
.body { min-width: 0; }

.proof { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 22px 0; container-type: inline-size; }
.row { --pad: clamp(14px, 3vw, 36px); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 270px); grid-template-rows: auto 1fr; column-gap: 32px; padding: 10px var(--pad) 10px calc(var(--pad) + 18px); transition: background 0.5s; }
.row::before { content: ""; position: absolute; left: calc(var(--pad) - 6px); top: 14px; bottom: 14px; width: 4px; border-radius: 3px; }
.is-marked::before { background: var(--mark); }
.is-little::before { background: repeating-linear-gradient(var(--edge) 0 4px, transparent 4px 8px); }
.is-signed::before { background: var(--settle); }
.is-edited::before { background: var(--mist); }
.row.is-here { background: var(--here); }
.row.is-changed { background: var(--mark-wash); }
.is-out { display: none; }
.copy { grid-column: 1; max-width: 40em; font: 400 1.2rem/1.62 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.copy.other { font-weight: 600; font-size: 1.4rem; line-height: 1.25; padding-top: 10px; }
mark { background: transparent; color: inherit; text-decoration: underline 2px dotted var(--edge); text-underline-offset: 3px; cursor: default; transition: background 0.15s; }
.is-marked mark:not(.soft) { background: var(--mark-wash); text-decoration: underline 2px solid var(--mark); }
mark.is-lit, .is-marked mark:not(.soft).is-lit { background: var(--mark-lit); }
.margin { grid-column: 2; grid-row: 1 / span 2; font-size: 0.92rem; line-height: 1.45; padding-top: 5px; }
.call { margin: 0 0 6px; font-weight: 700; color: var(--mark); }
.is-signed .call { color: var(--settle); }
.is-signed .call::before { content: "✓ "; }
.call-edited { color: var(--ink); }
.n { margin: 0 -6px 8px; padding: 2px 6px; overflow-wrap: anywhere; border-radius: 4px; transition: background 0.15s; }
.n.is-lit { background: var(--here); }
.n q { font-family: var(--serif); font-size: 1.05em; }
.n-change b { font-weight: 700; }
.n-little, .n-human, .n-quiet { color: var(--soft); }
.n-reason { font-family: var(--serif); font-size: 1.02rem; }
.by { display: block; color: var(--soft); font-size: 0.8rem; margin-top: 1px; }
.more summary { cursor: pointer; font-size: 0.85rem; min-height: 28px; color: var(--soft); }
.more .n { margin-top: 6px; }
.do { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 10px 0 4px; padding-top: 10px; border-top: 1px solid var(--rule); }
.do form { margin: 0; }
.do .plain-button { min-height: 38px; font-size: 0.88rem; padding: 0 12px; }
.do .is-main { background: var(--forest); color: #fff; border-color: var(--forest); }
.do .is-main:hover { background: var(--deep); }
.swaps { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 2px 0 8px; }
.swaps form { display: inline; margin: 0; }
.swap { min-height: 34px; font-size: 0.84rem; padding: 0 10px; }
.suggestion { margin-top: 10px; padding: 12px; background: var(--here); border-radius: var(--r); }
.suggested-text { font: 400 1.02rem/1.5 var(--serif); margin: 6px 0 8px; }
.suggestion-actions { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0; }
.signoff > summary { list-style: none; cursor: pointer; }
.signoff[open] { flex-basis: 100%; }
.signoff > summary::-webkit-details-marker { display: none; }
.signoff-form { display: grid; gap: 8px; margin-top: 8px; padding: 12px; background: var(--here); border-radius: var(--r); }
.signoff.is-done { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.clean-run { --pad: clamp(14px, 3vw, 36px); margin: 6px var(--pad); }
.clean-run > summary { list-style: none; cursor: pointer; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.93rem; color: var(--soft); border-bottom: 1px solid var(--rule); }
.clean-run > summary::-webkit-details-marker { display: none; }
.clean-run > summary span { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.clean-run[open] > summary span { visibility: hidden; }
.clean-run[open] { margin: 6px 0; }
.clean-run[open] > summary { margin: 0 var(--pad) 8px; }
.edit { grid-column: 1; margin-top: 4px; }
.edit > summary { display: inline-block; list-style: none; cursor: pointer; font-size: 0.86rem; font-weight: 600; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.edit > summary::-webkit-details-marker { display: none; }
.is-clean .edit:not([open]) > summary { opacity: 0; }
.row:hover .edit > summary, .edit > summary:focus-visible { opacity: 1; }
@media (hover: none) { .is-clean .edit:not([open]) > summary { opacity: 1; } }
.row:has(.edit[open]) .copy { display: none; }
.edit[open] { grid-row: 1; }
.edit[open] > summary { font-weight: 400; }
.edit[open] > summary::after { content: " (close without saving)"; }
.edit-form { margin-top: 8px; display: grid; gap: 10px; }
.edit-form textarea { max-width: 40em; font: 400 1.2rem/1.6 var(--serif); resize: vertical; }
.edit-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.is-edited .copy s { color: var(--soft); }
@container (max-width: 720px) {
  .row { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 8px; }
  .margin { grid-column: 1; padding-top: 0; grid-row: auto; }
  .edit[open] { grid-row: auto; }
}

/* ---------- after the text ---------- */
.after { margin-top: 40px; }
.after h2 { font-size: 1.6rem; margin-bottom: 6px; }
.after h3 { font-size: 1.15rem; margin: 18px 0 6px; }
.source-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 28px; }
.group h3 { font-size: 1.1rem; margin: 12px 0 6px; }
.g-bad h3 { color: var(--mark); }
.links { list-style: none; padding: 0; margin: 0; }
.links li { padding: 8px 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere; font-size: 0.94rem; }
.links .t { display: block; font-weight: 600; }
.link-fix { margin-top: 8px; display: grid; gap: 8px; }
.link-fix p { margin: 0; font-weight: 500; }
.link-fix .link { justify-self: start; }
.link-actions { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.link-actions .plain-button { min-height: 36px; font-size: 0.86rem; }
.facts { margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 28px; }
.fact { border-top: 1px solid var(--edge); padding: 10px 0 16px; }
.fact dt { font-size: 0.86rem; margin: 0; font-weight: 400; color: var(--soft); }
.fact dd { margin: 2px 0 0; }
.fact b { display: block; font: 600 1.45rem/1.15 var(--serif); }
.lean-machine b { color: var(--mark); }
.fact-note, .fact .sessions { display: block; margin-top: 5px; }
.fact-note { font-size: 0.92rem; line-height: 1.4; color: var(--soft); }
.sessions circle { fill: var(--settle); }
.lean-machine .sessions circle { fill: var(--mark); }
.more-dots { font-size: 0.85rem; }
.ran > summary { cursor: pointer; font: 600 1.3rem var(--serif); }
.how p { max-width: 66ch; }
.tests { border-collapse: collapse; width: 100%; font-size: 0.94rem; margin-top: 10px; }
.tests th, .tests td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--rule); }
.tests thead th { font-weight: 600; border-top: 0; font-size: 0.86rem; color: var(--soft); }
.tests tbody th { font-weight: 600; min-width: 200px; overflow-wrap: anywhere; }
.tests small { display: block; font-weight: 400; color: var(--soft); font-size: 0.85rem; margin-top: 2px; }
.tests td.num, .tests th.num { text-align: right; }

/* ---------- step three: issue it ---------- */
.issue { margin-top: 40px; background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--forest); border-radius: 0 0 12px 12px; padding: 26px clamp(18px, 3vw, 34px) 30px; }
.issue h2 { font-size: 1.8rem; }
.issue > p { max-width: 62ch; }
.issue-wait { list-style: none; margin: 14px 0 0; padding: 0; max-width: 62ch; }
.issue-wait li { position: relative; padding: 10px 0 10px 26px; border-top: 1px solid var(--rule); }
.issue-wait li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--mark); }
.issue-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px 36px; align-items: start; margin-top: 18px; }
.issue-col { display: grid; gap: 14px; }
.plan-note { max-width: 62ch; padding: 10px 14px; border-left: 4px solid var(--lime); background: var(--here); border-radius: 0 var(--r) var(--r) 0; }

/* ---------- the mark: what a reader of the document sees ---------- */
.tfmark { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; max-width: 560px; background: var(--forest); color: #fff; border-radius: 12px; padding: 20px 22px; border-left: 6px solid var(--lime); }
.tfmark-qr { flex: none; width: 104px; height: 104px; background: #fff; color: #0E2A25; border-radius: 6px; padding: 6px; }
.tfmark-qr svg { display: block; width: 100%; height: 100%; }
.tfmark-gone { flex: none; width: 104px; height: 104px; border-radius: 6px; border: 2px dashed rgba(255, 255, 255, 0.5); }
.tfmark-words { flex: 1 1 240px; min-width: 0; }
.tfmark-words p { margin: 0; }
.tfmark-head { font: 600 1.6rem/1.1 var(--serif); }
.tfmark-lines { margin-top: 8px !important; font-size: 0.88rem; line-height: 1.4; color: var(--on-band-soft); }
.tfmark-lines span { display: block; }
.tfmark-altered, .tfmark-withdrawn { background: var(--sheet); color: var(--ink); border: 1px solid var(--mark); border-left: 6px solid var(--mark); }
.tfmark-altered .tfmark-lines, .tfmark-withdrawn .tfmark-lines { color: var(--soft); }
.tfmark-altered .tfmark-gone, .tfmark-withdrawn .tfmark-gone { border-color: var(--mark); }

/* ---------- the issued page (staff) and the public page (anyone) ---------- */
.proofed { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 56px; max-width: 1280px; margin: 0 auto; padding: 38px var(--gutter) 40px; }
.proofed-words { flex: 999 1 420px; min-width: 0; }
.state { max-width: 15em; font-size: clamp(2.3rem, 5vw, 3.9rem); line-height: 1.05; }
.proofed-words .lede { margin: 16px 0 0; max-width: 36em; color: var(--on-band); }
.state-line { margin: 14px 0 0; max-width: 36em; font-weight: 600; }
.state-line.is-bad { border-left: 4px solid var(--mark-on-dark); padding-left: 10px; }
.band .error { color: #0E2A25; background: #FBEAE5; }
.slip { flex: 0 1 560px; min-width: 0; }
.band .tfmark { background: var(--deep); }
.pub-top { background: var(--forest); border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.pub-top .bar-in { justify-content: flex-start; }
.verify-body { max-width: 1280px; margin: 0 auto; padding: 44px var(--gutter) 72px; }
.verify-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 64px; }
.verify-cols > section { flex: 1 1 420px; min-width: 0; }
.verify-body h2 { font-size: 1.8rem; margin-bottom: 8px; }
.verify-body h3 { font-size: 1.25rem; margin: 28px 0 6px; }
.code-label { margin: 0; font-size: 0.92rem; color: var(--soft); }
.code-big { margin: 2px 0 16px; font: 700 2rem/1.2 var(--sans); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.eye { margin: 0; }
.eye > div { display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 10px 0; border-top: 1px solid var(--rule); }
.eye > div:first-child { border-top: 1px solid var(--edge); }
.eye > div:last-child { border-bottom: 1px solid var(--rule); }
.eye dt { flex: 0 0 150px; font-size: 0.92rem; color: var(--soft); }
.eye dd { flex: 1 1 220px; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.eye dd.quote { font: 400 1.1rem/1.35 var(--serif); }
.verify-form { display: flex; flex-direction: column; gap: 12px; }
.verify-form label[for="paste"] { margin: 4px 0 -6px; font-size: 0.94rem; }
.verify-form textarea { font: 400 1.08rem/1.5 var(--serif); resize: vertical; }
.pub-foot { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter) 56px; color: var(--soft); font-size: 0.92rem; }
.pub-foot p { max-width: 62ch; }
.record { margin-top: 36px; }
.record h2 { font-size: 1.5rem; margin-bottom: 4px; }
.words-beside { margin: 0 0 6px; font-family: var(--serif); font-size: 1.05rem; }
.withdraw { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- a firm's pages ---------- */
.pages { list-style: none; padding: 0; margin: 0 0 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; }
.page-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 190px auto; gap: 8px 18px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--rule); }
.page-row:first-child { border-top: 0; }
.page-row form { margin: 0; }
.page-name { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.page-url { margin: 0; color: var(--soft); font-size: 0.85rem; overflow-wrap: anywhere; }
.page-bar { width: 100%; height: 8px; display: block; }
.page-verdict { margin: 0; font-size: 0.93rem; font-weight: 600; }
.head { max-width: 860px; margin-bottom: 20px; }
.head .verdict { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.head .source-line { color: var(--soft); }
.head .progress, .head .lede { margin-top: 14px; }

/* ---------- changes waiting to be checked ---------- */
.changes { position: sticky; bottom: 0; z-index: 5; background: var(--deep); color: #fff; }
.changes-in { max-width: 1280px; margin: 0 auto; padding: 14px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.changes-in p { margin: 0; flex: 1 1 360px; max-width: 70ch; }
.changes-in form { margin: 0; }
.changes-in .link:hover { color: var(--lime); }
.changes-in .error { flex-basis: 100%; max-width: none; color: #0E2A25; }

/* ---------- saved copies, phones, paper ---------- */
.saved .wide { max-width: none; padding: 0; }
@media (max-width: 1100px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .side-in { position: static; max-height: none; overflow: visible; padding: 0; }
  .fix-list li:nth-child(n+6) { display: none; }
}
@media (max-width: 820px) {
  .steps-in { gap: 0 12px; }
  .step { grid-template-columns: minmax(0, 1fr); }
  .step-n { display: none; }
  .step-what { display: none; }
  .composer-foot { padding: 12px 16px; }
  .composer-foot .go { width: 100%; margin-left: 0; }
  .go kbd { display: none; }
  .panel-paste textarea { padding: 18px; min-height: 300px; }
  .panel-paste .hint { padding: 0 18px 12px; }
  .panel-line { padding: 22px 18px; min-height: 0; }
  .panel-file { padding: 14px; }
  .drop { min-height: 220px; }
  .switch { padding: 0 6px; }
  .switch span { padding: 0 8px; font-size: 0.94rem; }
  .tests tbody th { min-width: 130px; }
  .after { overflow-x: auto; }
  .page-row { grid-template-columns: minmax(0, 1fr) auto; }
  .page-bar, .page-verdict { grid-column: 1 / -1; }
  .page-bar { grid-row: 2; }
  .bar-nav { gap: 6px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .row, mark, .n { transition: none; }
}
@media print {
  body { background: #fff; }
  .bar, .steps, .progress, .strip, .issue, .chips, .stepper, .do, .edit, .take, .changes { display: none; }
  .band { background: none; color: #000; }
  .columns { display: block; }
  .side-in { position: static; max-height: none; }
  .row { break-inside: avoid; }
}
