:root {
  --ground: #EBEEEA;
  --ground-2: #DFE3DE;
  --sheet: #FAFBF9;
  --ink: #121417;
  --ink-2: #4A4D52;
  --ink-3: #5F6268;
  --rule: #BFC5BE;
  --rule-soft: #DCE1DB;
  --amber: #E8A317;
  --amber-ink: #7A4F00;
  --amber-wash: #FBF0D6;
  --red: #B42318;
  --red-wash: #FBEAE6;
  --green: #2F6B4F;
  --green-wash: #E6F0EA;
  --radius: 4px;
  --cond: 68%;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.55 'Archivo', system-ui, sans-serif;
  font-stretch: 100%;
  caret-color: var(--ink);
  scrollbar-color: var(--rule) transparent;
}
::selection { background: rgba(232, 163, 23, .38); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
p + p { margin-top: .75em; }
.fig, .num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--sheet); padding: 8px 12px; z-index: 50; }
.skip:focus { top: 8px; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.boot { padding: 48px; color: var(--ink-3); }
[hidden] { display: none !important; }

/* condensed caps voice: section heads, tags, group heads */
.sec-h, .ghead, .tag, .facts dt, .sub h3, .rules dt, .check-state, .brand, .ready-h, .num, .prio, .bar nav a, .step-mark, .ev-who {
  font-stretch: var(--cond);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  height: 58px; padding: 0 20px;
  background: var(--sheet);
  border-bottom: 2px solid var(--ink);
}
.brand { font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: .02em; }
.bar nav { display: flex; gap: 4px; height: 100%; }
.bar nav a {
  display: flex; align-items: center; padding: 0 12px;
  font-weight: 700; font-size: 15px; text-decoration: none; color: var(--ink-2);
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.bar nav a:hover { color: var(--ink); }
.bar nav a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who { font-weight: 600; color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px;
  font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1;
  color: var(--ink); background: var(--sheet);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease), opacity 150ms;
}
.btn:hover { background: var(--ground-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--sheet); }
.btn-primary:hover { background: #2B2F36; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #962015; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--ground-2); color: var(--ink); }
.btn-quiet-danger { color: var(--red); }
.btn-quiet-danger:hover { background: var(--red-wash); color: var(--red); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 14px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-icon { width: 40px; padding: 0; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.is-busy { cursor: progress; opacity: .7; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.row-actions.start { justify-content: flex-start; }

/* ---------- forms ---------- */
.stack { display: grid; gap: 18px; }
.field { display: grid; gap: 5px; }
.label { font-weight: 650; font-size: 15px; }
.label em, .req { font-style: normal; font-stretch: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-size: 12px; font-weight: 700; color: var(--ink-3); margin-left: 6px; }
.req { margin: 0; }
.help { font-size: 14px; color: var(--ink-2); }
.field-warn .help { color: var(--red); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--rule); border-radius: var(--radius);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
input, select { min-height: 44px; padding: 0 12px; }
textarea { padding: 10px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #686B70; }
input:hover, select:hover, textarea:hover { border-color: #9AA19A; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18, 20, 23, .14); }
input[readonly] { background: var(--ground); }
.narrow { max-width: 280px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.error { color: var(--red); font-weight: 600; font-size: 15px; }
.error:empty { display: none; }
.warn { background: var(--amber-wash); border: 1px solid var(--amber); padding: 10px 12px; border-radius: var(--radius); font-weight: 600; }
.hint, .quiet, .meta { color: var(--ink-2); font-size: 14px; }

/* ---------- state tags (the one ramp) ---------- */
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  font-size: 12px; font-weight: 750; line-height: 1;
  border-radius: 2px; border: 1.5px solid transparent; white-space: nowrap;
}
.tag-ink { background: var(--ink); color: var(--sheet); }
.tag-amber { background: var(--amber); color: var(--ink); }
.tag-red { background: var(--red); color: #fff; }
.tag-green { background: var(--green); color: #fff; }
.tag-paid { border-color: var(--green); color: var(--green); }
.tag-draft { border: 1.5px dashed var(--ink-3); color: var(--ink-2); }
.tag-void { color: var(--ink-3); text-decoration: line-through; }
.prio { font-size: 12px; font-weight: 750; }
.prio-urgent { display: inline-flex; align-items: center; height: 20px; padding: 0 5px; border: 1.5px solid var(--ink); border-radius: 2px; color: var(--ink); }
.prio-high { color: var(--ink); }
.late { color: var(--red); font-weight: 650; }
.soon { color: var(--amber-ink); font-weight: 650; }

/* ---------- desk: index + open ticket ---------- */
.desk { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - 58px); }
.index { overflow-y: auto; background: var(--ground); border-right: 1px solid var(--rule); padding-bottom: 48px; }
.pane { overflow-y: auto; background: var(--sheet); }
.igroup { border-bottom: 1px solid var(--rule); }
.ghead {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 20px 8px; font-size: 14px; font-weight: 750; color: var(--ink);
}
details.igroup > summary { cursor: pointer; list-style: none; color: var(--ink-2); padding-bottom: 14px; }
details.igroup > summary::-webkit-details-marker { display: none; }
details.igroup[open] > summary { padding-bottom: 8px; }
.ghead .fig { color: var(--ink-3); font-weight: 600; }
.irow {
  display: grid; gap: 4px; padding: 10px 20px 12px;
  text-decoration: none; border-top: 1px solid var(--rule-soft);
  transition: background-color 150ms var(--ease);
}
.irow:hover { background: var(--ground-2); }
.irow[aria-current] { background: var(--sheet); box-shadow: inset 0 1px 0 var(--ink), inset 0 -1px 0 var(--ink); }
.irow-top { display: flex; align-items: center; gap: 8px; }
.num { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.irow-title { font-weight: 600; line-height: 1.35; }
.irow[aria-current] .irow-title { font-weight: 700; }
.irow-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--ink-2); }
.index-empty { padding: 24px 20px; color: var(--ink-2); }
.pane-hint { display: grid; place-content: center; gap: 8px; height: 100%; padding: 48px; color: var(--ink-3); text-align: center; }
.loading { margin: 40px 48px; height: 240px; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--ground) 0 30%, var(--ground-2) 50%, var(--ground) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- the brief ---------- */
.brief { max-width: 900px; padding: 32px 48px 120px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--ink-2); text-decoration: none; margin-bottom: 16px; }
.back:hover { color: var(--ink); }
.brief > .back { display: none; }
.brief-ids { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.brief-head h1 { font-size: 2rem; line-height: 1.15; font-weight: 750; letter-spacing: -.012em; text-wrap: balance; max-width: 30ch; }
.facts { display: flex; flex-wrap: wrap; margin: 22px 0 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.facts > div { padding: 10px 28px 12px 0; }
.facts dt { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.facts dd { margin: 2px 0 0; font-weight: 650; font-size: 1.125rem; }
.tools { display: flex; flex-wrap: wrap; gap: 2px; margin: -2px 0 6px -10px; }

.next {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  margin: 24px 0 8px; padding: 14px 16px;
  background: var(--ground); border: 1px solid var(--rule); border-radius: var(--radius);
}
.next p { flex: 1 1 320px; }
.next-amber { background: var(--amber-wash); border-color: var(--amber); }
.next-red { background: var(--red-wash); border-color: var(--red); }
.next-green { background: var(--green-wash); border-color: var(--green); }
.changes { margin: 0 0 8px; padding: 16px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; }

.sec { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 28px; padding: 18px 0 22px; border-top: 2px solid var(--ink); margin: 16px 0 0; min-width: 0; }
fieldset.sec { border-left: 0; border-right: 0; border-bottom: 0; }
.sec-h { font-size: 15px; font-weight: 800; line-height: 1.3; padding-top: 3px; }
legend.sec-h { float: left; padding: 3px 0 0; margin: 0; width: 170px; }
fieldset.sec { display: block; }
fieldset.sec::after { content: ''; display: table; clear: both; }
fieldset.sec > .sec-b { margin-left: 198px; }
.sec-b { min-width: 0; max-width: 68ch; }
.sec-b > p + .sub, .sub + .sub { margin-top: 16px; }
.sub h3 { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 3px; }
.lead-p { font-size: 1.25rem; line-height: 1.5; font-weight: 500; }
.unset { color: var(--ink-3); }
.unset a { color: var(--ink-2); font-weight: 600; }

/* checklist rows with leader lines: the signature */
.checks { list-style: none; margin: 0; padding: 0; }
.check { border-bottom: 1px solid var(--rule-soft); }
.check:last-child { border-bottom: 0; }
.check label { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check input:not(:disabled) ~ * { cursor: pointer; }
.box {
  flex: none; align-self: flex-start; margin-top: 2px;
  display: grid; place-items: center; width: 22px; height: 22px;
  border: 2px solid var(--ink); border-radius: 3px; background: #fff; color: #fff;
  transition: background-color 180ms var(--ease);
}
.box .i { width: 15px; height: 15px; stroke-width: 3; opacity: 0; transform: scale(.6); transition: opacity 180ms var(--ease), transform 220ms var(--ease); }
.check input:checked + .box { background: var(--green); border-color: var(--green); }
.check input:checked + .box .i { opacity: 1; transform: none; }
.check input:focus-visible + .box { outline: 2px solid var(--ink); outline-offset: 3px; }
.check input:disabled + .box { border-color: var(--ink-3); }
.check input:disabled:checked + .box { background: var(--green); border-color: var(--green); }
.check-text { flex: 0 1 auto; }
.is-done .check-text { color: var(--ink-2); }
.leader { position: relative; flex: 1 1 24px; min-width: 24px; height: .7em; border-bottom: 2px dotted var(--rule); }
.leader::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--green); transform: scaleX(0); transform-origin: left center;
  transition: transform 260ms var(--ease);
}
.is-done .leader::after { transform: scaleX(1); }
.check-state { flex: none; font-size: 13px; font-weight: 750; color: var(--ink-2); min-width: 4ch; text-align: right; }
.is-done .check-state { color: var(--green); }
.ms-note { margin: 0 0 12px 34px; width: calc(100% - 34px); min-height: 40px; font-size: 15px; resize: none; overflow: hidden; }
.ms-note-read { margin: -4px 0 12px 34px; font-size: 15px; color: var(--ink-2); }

.level { font-size: 1.125rem; margin-bottom: 12px; }
.rules { margin: 0; display: grid; gap: 0; }
.rules > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.rules dt { font-size: 13px; font-weight: 750; padding-top: 2px; }
.rules dd { margin: 0; }
.rules .never dt { color: var(--red); }

.links { list-style: none; margin: 0; padding: 0; }
.links li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0; }
.links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; word-break: break-word; }
.links a .i { width: 15px; height: 15px; color: var(--ink-3); }
.url { font-size: 14px; color: var(--ink-3); }

.log { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 4px 14px; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); align-items: baseline; }
.ev-who { font-size: 13px; font-weight: 750; color: var(--ink-2); }
.ev-when { font-size: 13px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-status .ev-body { color: var(--ink-2); font-size: 15px; }
.ev-comment .ev-body { font-weight: 500; }
.say { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 14px; }
.submit .sec-b { max-width: 68ch; }

/* ---------- editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 56px; max-width: 1240px; margin: 0 auto; padding: 24px 32px 140px; }
.ed-title { font-size: 2rem; font-weight: 750; letter-spacing: -.012em; margin-bottom: 8px; }
.ed-main > .next { margin-top: 12px; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-body {
  display: grid; gap: 4px; height: 100%; padding: 12px 14px;
  background: #fff; border: 1.5px solid var(--rule); border-radius: var(--radius);
  font-size: 14px; color: var(--ink-2); transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.choice-body strong { font-size: 16px; color: var(--ink); }
.choice:hover .choice-body { border-color: #9AA19A; }
.choice input:checked + .choice-body { border: 2px solid var(--ink); padding: 11.5px 13.5px; background: var(--ground); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--ink); outline-offset: 3px; }
.reps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: rep; }
.rep { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.rep-ms { grid-template-columns: minmax(0, 1fr) 170px auto; }
.rep-link { grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; }
.reps:empty { display: none; }

.ready { position: relative; }
.ready-in { position: sticky; top: 82px; border-top: 2px solid var(--ink); padding-top: 14px; }
.ready-h { font-size: 15px; font-weight: 800; }
.ready-sum { margin: 6px 0 10px; font-size: 14px; color: var(--ink-2); }
.ready-sum strong { color: var(--ink); }
.ready-list { list-style: none; margin: 0 0 16px; padding: 0; }
.ready-list a { display: flex; align-items: center; gap: 10px; padding: 5px 0; text-decoration: none; font-size: 15px; }
.ready-list a:hover span:not(.mark) { text-decoration: underline; }
.ready-list em { margin-left: auto; font-style: normal; font-stretch: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-size: 12px; font-weight: 750; color: var(--ink-2); }
.mark { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--ink-3); border-radius: 3px; color: #fff; transition: background-color 180ms var(--ease); }
.mark .i { width: 13px; height: 13px; stroke-width: 3; }
.ready-list .ok .mark { background: var(--green); border-color: var(--green); }
.ready-list .ok a { color: var(--ink-2); }
.ready-list .need a { font-weight: 650; }
.ready-list .need .mark { border-color: var(--ink); border-width: 2px; }
.ready-actions { display: grid; gap: 8px; }
.ready-actions .btn { width: 100%; }

/* ---------- pages: payouts, engineer, onboarding ---------- */
.page { max-width: 960px; margin: 0 auto; padding: 32px 32px 120px; }
.narrow-page { max-width: 640px; }
.page h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.012em; margin-bottom: 8px; }
.ledger { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 28px; margin-top: 28px; border-top: 2px solid var(--ink); padding-top: 14px; }
.ledger-b { min-width: 0; }
.set-h { margin: 20px 0 12px; padding-top: 14px; border-top: 2px solid var(--ink); }
.led { list-style: none; margin: 0; padding: 0; }
.led-row { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.led-check { position: relative; display: inline-flex; align-self: center; flex: none; cursor: pointer; }
.led-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.led-check .box { margin-top: 0; }
.led-check input:checked + .box { background: var(--green); border-color: var(--green); }
.led-check input:checked + .box .i { opacity: 1; transform: none; }
.led-check input:focus-visible + .box { outline: 2px solid var(--ink); outline-offset: 3px; }
.led-name { text-decoration: none; font-weight: 600; flex: 0 1 auto; }
.led-name:hover { text-decoration: underline; }
.led-row .leader { height: .6em; }
.led-amt { flex: none; font-weight: 650; }
.led-total { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 4px double var(--ink); font-size: 1.25rem; }
.led-total > span:first-child { font-weight: 800; font-stretch: var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.payform { display: grid; gap: 16px; margin-top: 22px; }
.balance { font-weight: 650; }
.balance.is-ok { color: var(--green); }
.balance.is-off { color: var(--red); }
.pays { list-style: none; margin: 0; padding: 0; }
.pay { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.pay-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; color: var(--ink-2); }
.pay-head strong { font-size: 1.125rem; color: var(--ink); }
.pay-head .btn { margin-left: auto; }
.pay-items { list-style: none; margin: 8px 0 0; padding: 0; }
.pay-items li { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 15px; }
.pay-items a { text-decoration: none; }
.pay-items a:hover { text-decoration: underline; }
.linkbox { margin-top: 36px; border-top: 2px solid var(--ink); padding-top: 14px; display: grid; gap: 12px; justify-items: start; }
.copyline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; }
.copyline input { font-size: 14px; font-variant-numeric: tabular-nums; }

.empty { max-width: 720px; padding: 40px 48px 80px; }
.empty h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.012em; }
.steps { list-style: none; margin: 20px 0 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-top: 1px solid var(--rule); }
.steps li:first-child { border-top: 2px solid var(--ink); }
.steps strong { display: block; font-size: 1.125rem; margin-bottom: 4px; }
.steps p { color: var(--ink-2); max-width: 56ch; margin-bottom: 12px; }
.steps .ok { color: var(--green); font-weight: 650; }
.step-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--ink); border-radius: 3px; font-weight: 800; }
.steps .done .step-mark { background: var(--green); border-color: var(--green); color: #fff; }

.login { max-width: 400px; margin: 14vh auto 0; padding: 0 20px; }
.login h1 { font-size: 2.6rem; font-weight: 800; font-stretch: var(--cond); text-transform: uppercase; letter-spacing: .02em; line-height: 1; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.login .lede { margin: 12px 0 28px; color: var(--ink-2); }
.login .hint { margin-top: 24px; }

/* ---------- feedback ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40; max-width: min(92vw, 480px);
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--ink); color: var(--sheet); font-weight: 600;
  box-shadow: 0 8px 24px rgba(18, 20, 23, .22);
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }
dialog.confirm { max-width: 420px; padding: 24px; border: 2px solid var(--ink); border-radius: 6px; background: var(--sheet); color: var(--ink); box-shadow: 0 16px 40px rgba(18, 20, 23, .25); }
dialog.confirm::backdrop { background: rgba(18, 20, 23, .42); }
dialog.confirm p { font-size: 1.125rem; font-weight: 550; margin-bottom: 20px; }

/* ---------- small screens ---------- */
@media (max-width: 899px) {
  .bar { gap: 12px; padding: 0 12px; }
  .bar nav a { padding: 0 8px; }
  .bar-end .btn-primary span { display: none; }
  .bar-end .btn-primary { width: 40px; padding: 0; }
  .desk { display: block; height: auto; }
  .index { border-right: 0; overflow: visible; padding-bottom: 32px; }
  .pane { overflow: visible; }
  .desk.has-ticket .index { display: none; }
  .desk:not(.has-ticket) .pane-hint { display: none; }
  .brief { padding: 16px 16px 120px; }
  .brief > .back { display: inline-flex; }
  .editor { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 16px 16px 40px; }
  .ready { position: sticky; bottom: 0; z-index: 5; margin: 0 -16px; }
  .ready-in { position: static; background: var(--sheet); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 16px rgba(18, 20, 23, .08); }
  .ready-h, .ready-list { display: none; }
  .ready-sum { margin: 0 0 8px; }
  .ready-actions { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .page, .empty { padding: 20px 16px 96px; }
}
@media (max-width: 680px) {
  .sec { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  legend.sec-h { width: 100%; margin-bottom: 10px; }
  fieldset.sec > .sec-b { margin-left: 0; clear: both; }
  .grid3, .choices { grid-template-columns: minmax(0, 1fr); }
  .ledger { grid-template-columns: minmax(0, 1fr); }
  .rules > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rep-ms { grid-template-columns: minmax(0, 1fr) auto; }
  .rep-ms input[type="date"] { grid-column: 1; grid-row: 2; }
  .rep-link { grid-template-columns: minmax(0, 1fr) auto; }
  .rep-link input[name="link_url"] { grid-column: 1; grid-row: 2; }
  .ev { grid-template-columns: minmax(0, 1fr) auto; }
  .ev-body { grid-column: 1 / -1; grid-row: 2; }
  .brief-head h1, .ed-title, .page h1, .empty h1 { font-size: 1.6rem; }
  .facts > div { padding-right: 20px; }
  .say { grid-template-columns: minmax(0, 1fr); }
  .say .btn { justify-self: end; }
  .next .row-actions { width: 100%; justify-content: stretch; }
  .next .row-actions .btn { flex: 1; }
}
@media (max-width: 560px) {
  .brand { font-size: 16px; }
  .bar { gap: 8px; padding: 0 10px; }
  .bar nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .bar nav a { padding: 0 7px; font-size: 14px; white-space: nowrap; }
  .bar-end [data-act="logout"] { display: none; }
}
.signout { margin-top: 40px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
