/* Answer the Call Scholarship Portal — "Honor Roll" look (Version 2, type-led).
   Colors come from the ATC logo manual: Pantone 295 navy (police) and Pantone 1795 red (fire),
   with Pantone 7540 charcoal for text. Fonts are self-hosted (SIL Open Font License, see /fonts). */

@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/libre-caslon-text-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/libre-caslon-text-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/libre-caslon-text-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/public-sans-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/public-sans-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/barlow-semi-condensed-latin-600-normal.woff2) format("woff2"); }

:root {
  --navy: #132e54; --navy-2: #1e4275; --red: #ab241d; --charcoal: #4b4f54;
  --ink: #1b2430; --muted: #5c636b; --rule: #dcd7cc; --line: #dcd7cc; --field: #b4b0a6;
  --bg: #fbfaf7; --card: #fff; --navy-soft: #eef2f7; --red-soft: #f8ecea; --head: #f4f2ec;
  --ok: #1f6b45; --warn: #8a5a00; --err: #a3221b; --focus: #2563eb; --chip: #eef2f7;
  --radius: 4px;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --cond: "Barlow Semi Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  font-family: var(--sans); color: var(--ink); line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 16px; }
a { color: var(--navy-2); text-underline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 9; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hidden { display: none !important; }

/* ---------- header: red/blue stripe, logo, title ---------- */
header.top { background: #fff; border-bottom: 1px solid var(--rule); }
header.top::before { content: ""; display: block; height: 6px; background: linear-gradient(90deg, var(--red) 0 50%, var(--navy) 50% 100%); }
header.top .in { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px 20px; justify-content: space-between; flex-wrap: wrap; }
header.top .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); min-width: 0; }
header.top .brand img { height: 46px; width: auto; display: block; flex: none; }
header.top .brand .bt { border-left: 1px solid var(--rule); padding-left: 14px; font: 600 13.5px/1.25 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
header.top .brand .bt small { display: block; font: 400 13px/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 2px; }
header.top nav { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; font-size: 14px; }
header.top nav a { color: var(--charcoal); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
header.top nav a:hover { color: var(--navy); border-bottom-color: var(--red); }
header.top nav a.cta { background: var(--navy); color: #fff; padding: 7px 14px; border-radius: 3px; border: 0; font-weight: 600; }
header.top nav a.cta:hover { background: var(--navy-2); }
@media (max-width: 640px) {
  header.top .brand img { height: 34px; }
  header.top .brand .bt { font-size: 12px; padding-left: 10px; }
  header.top .brand .bt small { font-size: 12px; }
}
/* staff portal tabs (sit under the header) */
nav.tabs { background: #fff; border-bottom: 1px solid var(--rule); }
nav.tabs:has(.in:empty) { display: none; }
nav.tabs .in { max-width: 1100px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px 22px; flex-wrap: wrap; align-items: stretch; }
nav.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 11px 0 9px; font: 500 14.5px var(--sans); color: var(--charcoal); cursor: pointer; }
nav.tabs button:hover { color: var(--navy); border-bottom-color: var(--rule); }
nav.tabs button.on { color: var(--navy); font-weight: 700; border-bottom-color: var(--red); }
nav.tabs .gap { flex: 1; }
nav.tabs button.quiet { color: var(--muted); font-size: 13.5px; }

/* ---------- type ---------- */
main { max-width: 760px; margin: 0 auto; padding: 28px 16px 80px; }
main.wide { max-width: 1100px; }
h1 { font: 400 30px/1.2 var(--serif); margin: 4px 0 14px; color: var(--navy); letter-spacing: -.005em; text-wrap: balance; }
h2 { font: 400 22px/1.25 var(--serif); margin: 0 0 10px; color: var(--navy); text-wrap: balance; }
h3 { font-size: 16px; font-weight: 700; margin: 20px 0 6px; color: var(--navy); }
@media (max-width: 640px) { h1 { font-size: 26px; } h2 { font-size: 20px; } }
.kick { font: 600 13px/1.3 var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.dual { display: grid; gap: 3px; width: 64px; }
.dual::before, .dual::after { content: ""; height: 2px; }
.dual::before { background: var(--red); } .dual::after { background: var(--navy); }
.muted { color: var(--muted); } .small { font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
@media (max-width: 640px) { .card { padding: 18px 16px; } }
.card > h1:first-child, .card > h2:first-child { margin-top: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--navy); color: #fff; border: 1px solid var(--navy); padding: 11px 20px; border-radius: 3px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn.secondary { background: #fff; color: var(--navy); }
.btn.secondary:hover { background: var(--navy-soft); }
.btn.danger { background: var(--err); border-color: var(--err); }
.btn.danger:hover { background: #861c16; }
.btn.small { padding: 6px 11px; font-size: 14px; font-weight: 600; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.tlink { font-weight: 600; color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 1px; }
.tlink:hover { color: var(--navy-2); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* ---------- forms ---------- */
.field { margin: 0 0 20px; }
.field > label, .field > .q { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field .help { font-size: 14px; color: var(--muted); margin: -2px 0 8px; overflow-wrap: anywhere; }
.field .opt { font-weight: 400; color: var(--muted); font-size: 14px; }
.inline-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--field); border-radius: 3px; background: #fff; color: var(--ink);
}
input:hover, select:hover, textarea:hover { border-color: #8f8a7f; }
textarea { resize: vertical; min-height: 84px; }
.money { position: relative; } .money span { position: absolute; left: 12px; top: 10px; color: var(--muted); } .money input { padding-left: 24px; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; cursor: pointer; background: #fff; }
.choice:hover { border-color: var(--navy-2); }
.choice input { margin-top: 3px; accent-color: var(--navy); width: 18px; height: 18px; flex: none; }
.choice.sel { border-color: var(--navy); box-shadow: inset 4px 0 0 var(--navy); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--navy); }
.my { display: flex; gap: 8px; flex-wrap: wrap; } .my select { width: auto; }
.my input.year { width: 9em; }
.err { color: var(--err); font-size: 14px; font-weight: 600; margin-top: 6px; }
.field.has-err input, .field.has-err textarea, .field.has-err select, .field.has-err .choice { border-color: var(--err); }
.field.has-err { border-left: 3px solid var(--err); padding-left: 12px; margin-left: -15px; }
@media (max-width: 640px) { .field.has-err { margin-left: -11px; padding-left: 8px; } }
.wc { font-size: 13px; color: var(--muted); text-align: right; } .wc.over { color: var(--err); font-weight: 600; }
.reveal { animation: fade .25s ease; } @keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }
fieldset legend { color: var(--ink); }

/* ---------- application wizard ---------- */
main.app { max-width: 1060px; }
#app > .card { max-width: 760px; margin-left: auto; margin-right: auto; }
.wiz { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.wiz > .card { margin: 0; max-width: 760px; }
.sections { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 0 14px; position: sticky; top: 16px; }
.sections .lab { font: 600 12px var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 18px 8px; }
.sections ol { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.sections li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 18px; color: var(--muted); border-left: 3px solid transparent; line-height: 1.35; }
.sections li button { all: unset; cursor: pointer; color: var(--navy); }
.sections li button:hover { text-decoration: underline; }
.sections li button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sections li.done::after { content: "✓"; color: var(--navy); font-weight: 700; }
.sections li.now { color: var(--navy); font-weight: 700; border-left-color: var(--red); background: var(--navy-soft); }
.sections .appid { border-top: 1px solid var(--rule); margin: 12px 18px 0; padding-top: 10px; font-size: 12.5px; color: var(--muted); }
.mprog { display: none; margin-bottom: 14px; }
.mprog .rowx { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.mprog .rowx b { color: var(--navy); }
.segs { display: flex; gap: 3px; }
.segs i { flex: 1; height: 4px; background: var(--rule); }
.segs i.d { background: var(--navy); } .segs i.n { background: var(--red); }
@media (max-width: 860px) {
  .wiz { grid-template-columns: 1fr; gap: 0; }
  .sections { display: none; }
  .mprog { display: block; }
}
.wizard-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--rule); }
@media (max-width: 520px) { .wizard-nav { flex-direction: column-reverse; align-items: stretch; } .wizard-nav .btn { width: 100%; } }
.savebar { font-size: 13px; color: var(--muted); }
.stepline { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.progress { height: 4px; background: var(--rule); overflow: hidden; margin: 6px 0 18px; }
.progress > div { height: 100%; background: var(--navy); transition: width .3s; }

/* ---------- notices, chips, documents ---------- */
.notice { border-left: 4px solid var(--navy); background: var(--navy-soft); padding: 12px 14px; border-radius: 0 3px 3px 0; margin-bottom: 16px; }
.notice.warn { border-color: #b7791f; background: #fdf6e6; }
.notice.bad { border-color: var(--err); background: var(--red-soft); color: #6f1712; }
.notice.good { border-color: var(--ok); background: #eaf5ee; }
.linkbox { display: flex; gap: 8px; flex-wrap: wrap; } .linkbox input { font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace; flex: 1; min-width: 220px; }
.doc { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.doc .files { margin: 6px 0 0; padding: 0; list-style: none; font-size: 14px; }
.doc .files li { display: flex; gap: 8px; align-items: center; padding: 3px 0; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--chip); color: var(--navy); }
.tag.req { background: var(--red-soft); color: var(--err); } .tag.ok { background: #e6f2ea; color: var(--ok); } .tag.warn { background: #fbefd3; color: var(--warn); }
.summary dl { margin: 0; } .summary dt { font-weight: 600; font-size: 14px; color: var(--muted); margin-top: 10px; } .summary dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
details > summary { cursor: pointer; }

/* ---------- home page ---------- */
main.home { max-width: 1040px; padding-top: 0; }
.hero { padding: 52px 0 36px; display: grid; justify-items: center; text-align: center; gap: 16px; }
.hero h1 { font-size: 46px; line-height: 1.12; margin: 0; max-width: 18ch; }
.hero .dual { width: 88px; }
.hero .lead { font: italic 400 18px/1.6 var(--serif); color: var(--charcoal); max-width: 46ch; margin: 0; }
.hero .ctas { display: flex; gap: 14px 26px; align-items: center; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.hero .meta { font-size: 14px; color: var(--muted); margin: 0; }
.hero .meta b { color: var(--navy); }
.hero .notice { text-align: left; margin: 0; }
.steps { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 8px; }
.steps > div { padding: 20px 22px; display: grid; grid-template-columns: 44px 1fr; gap: 2px 10px; font-size: 14px; color: var(--muted); border-right: 1px solid var(--rule); }
.steps > div:last-child { border-right: 0; }
.steps em { grid-row: span 2; font: 400 28px/1 var(--serif); color: var(--red); font-style: normal; }
.steps b { color: var(--navy); font-size: 15px; }
.sect { padding: 34px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; position: relative; }
.sect::after { content: ""; position: absolute; top: 34px; bottom: 34px; left: 50%; width: 1px; background: var(--rule); }
.sect h2 { margin: 6px 0 12px; font-size: 25px; }
.sect p { margin: 0 0 10px; }
ul.need { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 9px; }
ul.need li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
ul.need li::before { content: ""; width: 8px; height: 8px; margin-top: 8px; border: 2px solid var(--red); transform: rotate(45deg); }
.home .card { padding: 28px; }
.home .card h2 { font-size: 24px; }
.home .startgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.home .startgrid > div + div { border-left: 1px solid var(--rule); padding-left: 36px; }
@media (max-width: 860px) {
  .hero { padding: 36px 0 26px; }
  .hero h1 { font-size: 34px; }
  .hero .lead { font-size: 16.5px; }
  .hero .ctas { flex-direction: column; width: 100%; max-width: 420px; }
  .hero .ctas .btn { width: 100%; padding: 13px 18px; }
  .steps { grid-template-columns: 1fr; }
  .steps > div { border-right: 0; border-bottom: 1px solid var(--rule); padding: 14px 4px; }
  .steps > div:last-child { border-bottom: 0; }
  .sect { grid-template-columns: 1fr; gap: 28px; padding: 26px 0; }
  .sect::after { display: none; }
  .home .card { padding: 20px 16px; }
  .home .startgrid { grid-template-columns: 1fr; gap: 22px; }
  .home .startgrid > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 20px; }
}

/* ---------- staff tables ---------- */
table.grid { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.grid th, table.grid td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #e7e3da; vertical-align: top; }
table.grid th { background: var(--head); font: 600 12.5px var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--charcoal); position: sticky; top: 0; border-bottom: 1px solid var(--rule); }
table.grid tr.click { cursor: pointer; } table.grid tr.click:hover td { background: #f6f8fb; }
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .filters input, .filters select { width: auto; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 220px 1fr; gap: 5px 12px; font-size: 14px; } .kv div:nth-child(odd) { color: var(--muted); }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } }
.st { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--chip); white-space: nowrap; }
.st-draft { background: #eeeeec; color: #555; } .st-submitted { background: #e3ecf8; color: var(--navy); } .st-returned { background: #fbefd3; color: #7a5000; }
.st-eligible { background: #e6f2ea; color: var(--ok); } .st-ineligible, .st-withdrawn { background: var(--red-soft); color: var(--err); } .st-in_review { background: #ece8f6; color: #4a2a8a; }
.st-awarded { background: var(--ok); color: #fff; } .st-alternate { background: #fbefd3; color: #7a5000; } .st-not_awarded { background: #eeeeec; color: #555; }

main.wide > #view > .row:first-child h1 { margin-bottom: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 14px; }
.stats > div { padding: 12px 16px; border-right: 1px solid var(--rule); font: 600 12px/1.3 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stats > div:last-child { border-right: 0; }
.stats > div:first-child { box-shadow: inset 3px 0 0 var(--red); }
.stats b { display: block; font: 400 26px/1.2 var(--serif); color: var(--navy); letter-spacing: 0; text-transform: none; }

/* ---------- review form ---------- */
.rubric { border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; background: #fff; }
.rubric h3 { margin-top: 0; font: 400 19px var(--serif); }
.ratings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; } @media (max-width: 700px) { .ratings { grid-template-columns: 1fr 1fr; } }
.ratings label { border: 1px solid var(--rule); border-radius: 3px; padding: 9px 8px; text-align: center; cursor: pointer; font-size: 14px; background: #fff; position: relative; }
.ratings label:hover { border-color: var(--navy-2); }
.ratings label.sel { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: inset 0 -3px 0 var(--red); }
.ratings label:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.ratings input { position: absolute; opacity: 0; }
.factor { display: grid; grid-template-columns: 260px 1fr; gap: 10px; margin-bottom: 8px; align-items: start; } @media (max-width: 700px) { .factor { grid-template-columns: 1fr; } }
.factor label { font-size: 14px; font-weight: 600; padding-top: 8px; }
.factor textarea { min-height: 42px; }
.scorebox { position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--navy); padding: 12px 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 0 -16px; box-shadow: 0 -4px 12px rgba(19,46,84,.06); }
.scorebox b { font: 400 24px var(--serif); color: var(--navy); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; } @media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.split > div { min-width: 0; }
.sticky-col { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }

/* ---------- misc ---------- */
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 3px; z-index: 50; font-size: 14px; border-bottom: 3px solid var(--red); max-width: calc(100% - 32px); }
footer.foot { border-top: 1px solid var(--rule); background: #fff; font-size: 13px; color: var(--muted); }
footer.foot .in { max-width: 1100px; margin: 0 auto; padding: 18px 16px 28px; display: flex; gap: 8px 20px; justify-content: space-between; flex-wrap: wrap; }
footer.foot b { color: var(--navy); font-weight: 600; }
footer.foot a { color: var(--muted); }
dialog { border: 1px solid var(--rule); border-radius: var(--radius); max-width: 560px; width: calc(100% - 32px); border-top: 4px solid var(--navy); }
dialog::backdrop { background: rgba(19,46,84,.35); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* review form: character score buttons, flagged and missing sections */
.ratings.nine { grid-template-columns: repeat(9, minmax(0, 1fr)); max-width: 520px; }
@media (max-width: 700px) { .ratings.nine { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ratings.nine label { padding: 9px 0; font-weight: 600; }
.rubric.flagged { border-left: 4px solid var(--red); }
.rubric.flagged > .tag { margin: -2px 0 8px; }
.rubric.missing { border-color: var(--err); box-shadow: 0 0 0 2px var(--red-soft); }
.scorebox .err a { color: var(--err); }

/* staff: document list (cards, redacted copies nested under their original) */
.btn.small { white-space: nowrap; }
.btn.ghost-danger { background: #fff; color: var(--err); border-color: var(--rule); }
.btn.ghost-danger:hover { background: var(--red-soft); border-color: var(--err); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkbtn.small { font-size: 13px; }
.doclist { display: grid; gap: 10px; }
.docrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: start; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; }
.docrow.child { margin-left: 28px; border-left: 3px solid var(--navy); background: #fcfdfe; }
.docrow .dtitle { font-weight: 700; color: var(--navy); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.docrow .dfile { margin-top: 2px; overflow-wrap: anywhere; }
.docrow .dpii { margin-top: 8px; display: grid; gap: 3px; justify-items: start; }
.docrow .dpii .tag { font-size: 12.5px; }
.docrow .dside { display: grid; gap: 8px; justify-items: end; }
.docrow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.docrow .check.small { font-size: 14px; gap: 7px; align-items: center; white-space: nowrap; }
.docrow .check.small input { margin-top: 0; }
@media (max-width: 640px) {
  .docrow { grid-template-columns: 1fr; }
  .docrow .dside { justify-items: start; }
  .docrow .acts { justify-content: flex-start; }
  .docrow.child { margin-left: 12px; }
}

/* document cards: result tags wrap cleanly, and the card stacks when its column is narrow */
.docrow .dpii .tag { border-radius: 6px; line-height: 1.4; padding: 3px 9px; }
.doclist { container-type: inline-size; }
@container (max-width: 640px) {
  .docrow { grid-template-columns: 1fr; }
  .docrow .dside { justify-items: start; grid-auto-flow: row; }
  .docrow .acts { justify-content: flex-start; }
}
