:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f7f8fa; --text: #1a1f29; --muted: #566072; --faint: #8a93a3;
  --border: #e0e4ea; --border-strong: #c9cfd9; --accent: #233a6b; --accent-2: #2f5bd3; --focus: #2f5bd3;
  --good: #1f7a3d; --good-bg: #e6f4ea; --ok: #3f8f2f; --ok-bg: #eef7e6; --warn: #8a5800; --warn-bg: #fff4dc;
  --bad: #b42318; --bad-bg: #fde8e6; --info-bg: #eaf0fd;
  --s101: #6741d9; --s102: #0b7285; --s103: #1c5fd4; --s112: #c2410c; --sdp: #475467; --sother: #6b7280;
  --doc-font: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --width: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141a; --surface: #181c24; --surface-2: #1e232d; --text: #e7eaf0; --muted: #a8b1c0; --faint: #7d8696;
    --border: #2a303c; --border-strong: #3a4250; --accent: #8fb0ff; --accent-2: #8fb0ff;
    --good: #6fd08c; --good-bg: #16301f; --ok: #9ad57a; --ok-bg: #1d2e16; --warn: #f2c063; --warn-bg: #33270e;
    --bad: #ff8a80; --bad-bg: #3a1714; --info-bg: #1a2540;
    --s101: #a48cff; --s102: #4fc3d7; --s103: #7aa7ff; --s112: #ff9b5e; --sdp: #a7b1c2; --sother: #9aa3b2;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--ui-font); }
a { color: var(--accent-2); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; gap: 16px; align-items: center; justify-content: space-between;
  padding: 12px max(20px, calc((100vw - var(--width)) / 2 + 20px)); background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent);
  box-shadow: inset 0 0 0 7px var(--accent), inset 0 0 0 9px rgba(255,255,255,.85); }
.brand strong { font-size: 19px; letter-spacing: .2px; }
.brand small { display: none; }
.lookup { display: flex; gap: 8px; }
.lookup input { width: 270px; padding: 9px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); }
button { cursor: pointer; border: 1px solid transparent; border-radius: 10px; padding: 10px 18px; background: var(--accent); color: #fff; font-weight: 600; }
button.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); font-weight: 500; }
button.link { background: none; color: var(--accent-2); padding: 0; font-weight: 500; }
button:disabled { opacity: .5; cursor: default; }
@media (prefers-color-scheme: dark) { button { color: #0f1420; } button.secondary { color: var(--text); } }
body.home .topbar .lookup { visibility: hidden; }

main { max-width: var(--width); margin: 0 auto; padding: 28px 20px 130px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; margin-bottom: 18px; }
h1 { font-size: 27px; line-height: 1.25; margin: 0; letter-spacing: -.2px; }
h2 { font-size: 21px; line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 18px; line-height: 1.35; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.lead { font-size: 18px; color: var(--muted); max-width: 860px; margin: 0 0 18px; }
.empty { text-align: center; padding: 36px; color: var(--muted); }

/* home */
.hero { padding: 34px 0 30px; }
.hero h1 { font-size: 32px; }
.hero p { max-width: 640px; color: var(--muted); font-size: 18px; margin: 10px 0 22px; }
.hero .lookup input { width: 340px; padding: 13px 16px; font-size: 18px; }
.hero .lookup button { padding: 13px 24px; font-size: 18px; }
.case-list { display: grid; gap: 10px; }
.case-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px 170px 110px; gap: 18px; align-items: center; padding: 16px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.case-row:hover { border-color: var(--accent-2); }
.case-row strong { display: block; font-size: 18px; }
.case-row .sub { display: block; color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) { .case-row { grid-template-columns: 1fr auto; } .case-row .cr-oa { display: none; } }

/* badges and chips */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; white-space: nowrap; border: 1px solid currentColor; }
.statute { color: #fff; border: none; text-align: center; }
.rej-row .statute { justify-self: start; }
.statute.s101 { background: var(--s101); } .statute.s102 { background: var(--s102); } .statute.s103 { background: var(--s103); }
.statute.s112 { background: var(--s112); } .statute.sdp { background: var(--sdp); } .statute.sother { background: var(--sother); }
@media (prefers-color-scheme: dark) { .statute { color: #0f1420; } }
.chip { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 14.5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.chip.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chip.info { background: var(--info-bg); color: var(--accent-2); border-color: transparent; }
a.chip.bad { text-decoration: none; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* case top: what and when */
.case-top { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.eyebrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 16px; margin-bottom: 6px; }
.eyebrow strong { color: var(--text); }
.case-top h1 { font-size: 24px; max-width: 720px; }
.due { flex: none; text-align: right; padding: 12px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.due strong { display: block; font-size: 22px; line-height: 1.2; }
.due span { color: var(--muted); font-size: 15px; }
.due.urgent { background: var(--bad-bg); border-color: transparent; } .due.urgent strong { color: var(--bad); }
.due.soon { background: var(--warn-bg); border-color: transparent; } .due.soon strong { color: var(--warn); }
@media (max-width: 820px) { .case-top { flex-direction: column; } .due { text-align: left; } .lookup input { width: 100%; } .topbar { flex-wrap: wrap; } .lookup { flex: 1; } }

.alert { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; display: flex; gap: 12px; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert strong { white-space: nowrap; }
.alert ul.tight li:first-child { margin-top: 0; } .alert ul.tight li:last-child { margin-bottom: 0; }
.callout { border-radius: var(--radius); padding: 12px 18px; margin: 0 0 16px; }
.callout.good { background: var(--good-bg); color: var(--good); }

/* tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 0 0 22px; }
.tab { background: none; color: var(--muted); font-weight: 600; font-size: 17px; padding: 12px 16px; border: none; border-bottom: 3px solid transparent;
  border-radius: 0; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent-2); }
@media (prefers-color-scheme: dark) { .tab { color: var(--muted); } .tab.on, .tab:hover { color: var(--text); } }
.count { display: inline-block; min-width: 26px; padding: 1px 8px; margin-left: 4px; border-radius: 999px; background: var(--border); color: var(--muted);
  font-size: 14px; font-weight: 700; text-align: center; }
.count.bad { background: var(--bad-bg); color: var(--bad); } .count.warn { background: var(--warn-bg); color: var(--warn); }

/* progress */
.steps { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 12px; }
.step { flex: 1; min-width: 170px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 16px; }
.step.active { border-color: var(--accent-2); background: var(--info-bg); }
.step.done { color: var(--good); }
.step.done::before { content: "✓ "; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* score */
.score { --c: var(--faint); display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--v) * 36deg), var(--border) 0); flex: none; }
.score b { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--surface); font-size: 22px; }
.score.mini { width: 44px; height: 44px; } .score.mini b { width: 35px; height: 35px; font-size: 17px; }
.sc-5 { --c: var(--good); } .sc-4 { --c: var(--ok); } .sc-3 { --c: var(--warn); } .sc-2 { --c: #d9480f; } .sc-1 { --c: var(--bad); }
.score-label { font-size: 16px; font-weight: 700; white-space: nowrap; }
.t-5 { color: var(--good); } .t-4 { color: var(--ok); } .t-3 { color: var(--warn); } .t-2 { color: #d9480f; } .t-1 { color: var(--bad); }

/* rejection list (one row each, opens in place) */
.rej-list { display: grid; gap: 12px; }
.rej { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.rej.open { border-color: var(--border-strong); }
.rej-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto 20px; gap: 18px; align-items: center; width: 100%; text-align: left;
  padding: 18px 22px; background: none; color: var(--text); font-weight: 400; border: none; border-radius: var(--radius); }
.rej-row:hover { background: var(--surface-2); }
.rej.open .rej-row { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { .rej-row { color: var(--text); } }
.rej-main strong { display: block; font-size: 19px; }
.rej-main .ground { display: block; color: var(--muted); }
.choice { display: block; margin-top: 4px; font-size: 15px; color: var(--faint); }
.choice.done { color: var(--good); font-weight: 600; }
.rej-score { display: flex; gap: 10px; align-items: center; }
.chev { width: 11px; height: 11px; border-right: 2.5px solid var(--faint); border-bottom: 2.5px solid var(--faint); transform: rotate(45deg); margin-top: -6px; transition: transform .15s; }
.rej.open .chev { transform: rotate(225deg); margin-top: 6px; }
.rej-body { padding: 20px 22px 22px; }
@media (max-width: 820px) { .rej-row { grid-template-columns: 1fr 20px; gap: 10px; } .rej-row .chev { grid-row: 1; grid-column: 2; } }

/* other items */
.item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; }
.item h3 { margin: 8px 0 6px; }
.item p { margin: 0 0 8px; }
.obj-reply { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.obj-reply label { display: inline-flex; gap: 6px; align-items: center; }

/* options */
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 6px 0 4px; }
.option { position: relative; border: 2px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.option.selected { border-color: var(--accent-2); background: var(--info-bg); }
.option.open { border-style: dashed; }
.option h3 { margin: 0; }
.option .top { display: flex; gap: 12px; align-items: center; }
.option p { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.option .actions { display: flex; gap: 10px; margin-top: auto; }
.option .actions button { flex: 1; }
.reco { margin-left: auto; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .reco { color: #0f1420; } }

/* draft detail */
.draft { margin-top: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-2); padding: 20px 22px; }
.draft h4 { font-size: 16px; color: var(--muted); margin: 20px 0 8px; font-weight: 700; }
.doc { font-family: var(--doc-font); font-size: 17.5px; line-height: 1.7; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px 24px; }
.doc p { margin: 0 0 14px; } .doc p:last-child { margin-bottom: 0; }
.claim { margin: 0 0 14px; } .claim .num { font-weight: 700; }
.ins { text-decoration: underline; text-decoration-thickness: 1.5px; color: var(--good); }
.del { text-decoration: line-through; color: var(--bad); }
.dbl { color: var(--bad); }
ul.tight { margin: 0; padding-left: 22px; } ul.tight li { margin: 6px 0; }
.quote { font-family: var(--doc-font); font-style: italic; }
.ok-mark { color: var(--good); font-weight: 700; } .no-mark { color: var(--warn); font-weight: 700; }
.checks { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.checks ul { margin: 4px 0 0; padding-left: 22px; }

/* fold-away detail */
details { border-top: 1px solid var(--border); }
details > summary { cursor: pointer; color: var(--accent-2); font-weight: 600; padding: 12px 0; list-style-position: inside; }
details[open] > summary { color: var(--text); }
details > :not(summary):last-child { margin-bottom: 16px; }
.rej-body > details:first-of-type, .draft > details:first-of-type { margin-top: 16px; }
.oa-text { white-space: pre-wrap; font-family: var(--doc-font); font-size: 17px; line-height: 1.65; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; max-height: 480px; overflow: auto; }
.oa-text img { display: block; max-width: 100%; margin: 8px 0; background: #fff; border: 1px solid var(--border); border-radius: 4px; }

/* tables (claim mapping, references) */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 15px; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.mapping td { font-size: 16px; }
.mapping td.el { font-family: var(--doc-font); font-size: 17px; width: 32%; }
.mapping .claimrow td { background: var(--surface-2); font-weight: 700; }

/* notes and details */
ul.notes { margin: 0; padding-left: 22px; } ul.notes li { margin: 8px 0; }
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 24px; margin: 0; }
.meta dt { font-size: 15px; color: var(--muted); } .meta dd { margin: 0; }

/* selection bar */
.selbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--surface); border-top: 1px solid var(--border);
  padding: 14px max(20px, calc((100vw - var(--width)) / 2 + 20px)); display: flex; gap: 16px; align-items: center; box-shadow: 0 -4px 14px rgba(16,24,40,.07); }
.selbar strong { font-size: 18px; }
.selbar .bar { flex: 1; height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; max-width: 260px; }
.selbar .bar i { display: block; height: 100%; background: var(--accent-2); }
@media (max-width: 820px) { .selbar .bar { display: none; } }

label.button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); font-weight: 500; cursor: pointer; white-space: nowrap; }
a.button, label.button { display: inline-block; text-decoration: none; border-radius: 10px; padding: 10px 18px; background: var(--accent); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { a.button { color: #0f1420; } }

/* response draft */
.caption-grid label:has([data-cap="Title"]) { grid-column: 1 / -1; }
.chip.ph { cursor: pointer; font-family: var(--ui-font); font-weight: 500; }
.paper { max-width: 8.5in; margin: 0 auto 40px; background: #fff; color: #111; border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 60px 68px; font-family: "Times New Roman", Times, var(--doc-font); font-size: 18px; line-height: 1.55; }
.paper .center { text-align: center; }
.paper hr { border: none; border-top: 1px solid #999; margin: 14px 0 18px; }
.paper h3 { font-size: 20px; margin: 10px 0 12px; }
.doc-input { width: 100%; font: inherit; color: inherit; background: transparent; border: 1px dashed transparent; border-radius: 4px; padding: 2px 4px; resize: none; line-height: 1.55; }
.doc-input:hover { border-color: #c9ced6; }
.doc-input:focus { outline: none; border-color: #2f5bd3; background: #f6f8ff; }
textarea.doc-input { display: block; text-indent: 0.5in; margin: 0 0 10px; overflow: hidden; }
textarea.doc-input.line { text-indent: 0; margin-bottom: 0; }   /* a one-line field that may wrap (title, headings) */
textarea.doc-input.title.line { margin: 4px 0 14px; }
.caption-grid label textarea.doc-input.line { flex: 1; min-width: 0; }
.doc-input.title { text-align: center; font-weight: 700; font-size: 20px; margin: 4px 0 14px; }
.doc-input.sec-head { font-weight: 700; margin-top: 10px; }
.caption-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.caption-grid label { display: flex; gap: 6px; align-items: baseline; }
.caption-grid label span { font-weight: 700; white-space: nowrap; }
.caption-grid.sig { grid-template-columns: 1fr; max-width: 440px; }
.sheet { margin: 28px -68px 18px; border-top: 2px dashed #b9c0cc; text-align: center; font: 14px var(--ui-font); color: #8a93a3; padding-top: 4px; }
.claim-row .claim { margin: 0 0 10px; }
.claim-row select.status { font: 15px var(--ui-font); border: 1px solid #c9ced6; border-radius: 4px; padding: 1px 4px; background: #fff; color: #111; }
.paper .ins { color: #116b33; } .paper .del, .paper .dbl { color: #b42318; }
.paper button.link { color: #2f5bd3; }
@media (max-width: 820px) { .paper { padding: 24px 18px; } .caption-grid { grid-template-columns: 1fr; } .sheet { margin: 20px -18px 14px; } }

#toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 16px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 30; }
#toast.show { opacity: 1; }

/* ---------- phones and tablets held upright (up to 820px wide) ----------
   One block, so the desktop layout above is untouched. Nothing may be wider than the screen: grid columns that
   hold long text use minmax(0, 1fr), and rows of controls wrap. */
@media (max-width: 820px) {
  body { font-size: 16px; }
  main { padding: 16px 14px 150px; }
  .card { padding: 16px; }
  h1, .case-top h1 { font-size: 21px; }
  h2 { font-size: 19px; }
  .lead { font-size: 16px; }

  /* top bar: brand on one line, the lookup under it at full width */
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand strong { font-size: 17px; }
  .lookup { flex: 1 1 100%; min-width: 0; }
  .lookup input { flex: 1; min-width: 0; width: auto; }
  .lookup button { flex: none; padding: 10px 14px; }
  body.home .topbar .lookup { display: none; }   /* the home page has its own, larger lookup */

  /* home */
  .hero { padding: 18px 0 20px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 16px; margin-bottom: 16px; }
  .hero .lookup { flex-wrap: wrap; }
  .hero .lookup input { flex: 1 1 100%; width: 100%; font-size: 17px; }
  .hero .lookup button { flex: 1; font-size: 17px; }
  .case-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; }
  .case-row > span:first-child { grid-column: 1 / -1; }
  .case-row strong { font-size: 17px; }
  .case-row .sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .case-row > span:nth-child(3) { font-size: 15px; color: var(--muted); }
  .case-row > span:nth-child(3) .sub { display: inline; margin-left: 6px; }
  .case-row > span:last-child { justify-self: end; }

  /* case header and notices */
  .eyebrow { font-size: 15px; }
  .due { width: 100%; padding: 10px 14px; }
  .due strong { font-size: 19px; }
  .alert { flex-direction: column; gap: 4px; padding: 12px 14px; }
  .alert ul.tight { padding-left: 18px; }

  /* tabs: one line that scrolls sideways instead of three wrapped rows */
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-bottom: 16px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; font-size: 16px; padding: 10px 12px; white-space: nowrap; }
  .step { min-width: 130px; font-size: 15px; }

  /* rejections and options */
  .rej-row { grid-template-columns: minmax(0, 1fr) 20px; padding: 14px 16px; }
  .rej-row > * { grid-column: 1; }
  .rej-row .chev { grid-row: 1; grid-column: 2; justify-self: end; }
  .rej-main strong { font-size: 17px; }
  .rej-body { padding: 14px 14px 16px; }
  .item { padding: 14px 16px; }
  .options { grid-template-columns: minmax(0, 1fr); }
  .option { padding: 14px; }
  .option .top { flex-wrap: wrap; }
  .score-label { white-space: normal; }
  .draft { padding: 14px; }
  .doc { font-size: 16.5px; padding: 14px; }
  .oa-text { font-size: 16px; padding: 12px 14px; }
  .meta { grid-template-columns: minmax(0, 1fr); }

  /* tables keep their columns and scroll sideways inside their own box */
  .table-wrap table { min-width: 560px; }
  th, td { padding: 10px 8px; }

  /* bottom bar: the count on the first line, the buttons below it at full width */
  .selbar { flex-wrap: wrap; gap: 8px 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .selbar strong { flex: 1 1 100%; font-size: 16px; }
  .selbar .spacer { display: none; }
  .selbar button, .selbar a.button { flex: 1; padding: 10px 8px; text-align: center; font-size: 15.5px; white-space: nowrap; }
  #toast { bottom: 120px; max-width: calc(100vw - 28px); text-align: center; }

  /* response draft: back link and save state on one line, the two buttons below it side by side */
  .resp-bar .row > .spacer { display: none; }
  .resp-bar .row > a:first-child { flex: 1 1 auto; }
  .resp-bar .row button, .resp-bar .row a.button { flex: 1 1 40%; text-align: center; padding: 10px 6px; font-size: 15.5px; white-space: nowrap; }
  .paper { padding: 18px 14px; font-size: 17px; margin-left: -6px; margin-right: -6px; }
  .sheet { margin: 18px -14px 12px; }
  textarea.doc-input { text-indent: 0.25in; }
  .caption-grid label .doc-input { flex: 1; min-width: 0; }
  .doc-input.title { font-size: 18px; }
  .claim-row select.status { max-width: 100%; }
}
