/* Errata OTG — stylesheet
   Identity: the deposition transcript page. Pleading-paper double margin rules,
   Courier line numbers, docket-blue ink on white paper. Red is reserved for the
   margin rule and for destructive or failed states. */

@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url(/fonts/public-sans/public-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url(/fonts/public-sans/public-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-display: swap; src: url(/fonts/public-sans/public-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url(/fonts/source-serif-4/source-serif-4-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 400; font-display: swap; src: url(/fonts/courier-prime/courier-prime-latin-400-normal.woff2) format("woff2"); }

:root {
  --ink: #1F2A44;
  --ink-2: #3A4560;
  --slate: #5B6577;
  --line: #D9DCE3;
  --wash: #F2F4F7;
  --paper: #FFFFFF;
  --rule: #B3261E;
  --seal: #2E6B4F;
  --amber: #8A5300;
  --blue: #2F5AA8;
  --focus: #2F5AA8;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Courier Prime", "Courier New", Courier, monospace;
  --r-sm: 4px;
  --r-md: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--sans); color: var(--ink); background: var(--wash); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.005em; }
h1 { font-size: 1.95rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; max-width: 72ch; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--slate); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; gap: .45em; font: 600 .95rem/1 var(--sans); padding: .72em 1.1em; border-radius: var(--r-sm);
  border: 1px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ink-2); color: #fff; }
.btn.secondary { background: var(--paper); color: var(--ink); border-color: #AEB4C2; }
.btn.secondary:hover { border-color: var(--ink); background: var(--paper); color: var(--ink); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--blue); padding-inline: .4em; }
.btn.quiet:hover { color: var(--ink); text-decoration: underline; }
.btn.danger { background: var(--paper); color: var(--rule); border-color: #E2B4B0; }
.btn.danger:hover { border-color: var(--rule); }
.btn.big { font-size: 1.05rem; padding: .9em 1.4em; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.hint { display: block; font-weight: 400; color: var(--slate); font-size: .84rem; margin-top: .15rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid #AEB4C2; border-radius: var(--r-sm); padding: .6em .7em; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(47, 90, 168, .3); outline-offset: 0; border-color: var(--blue); }
textarea { resize: vertical; min-height: 4.5em; }
input[type=file] { font: inherit; }
.field { margin-bottom: 1rem; }
.grid { display: grid; gap: 0 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; font-size: 1rem; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .18rem; flex: none; accent-color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
legend { font: 600 1.15rem/1.3 var(--serif); padding: 0; margin-bottom: .75rem; }

.alert { border-radius: var(--r-sm); padding: .8rem 1rem; margin: 0 0 1.2rem; border: 1px solid; background: var(--paper); }
.alert ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.alert.error { border-color: #E2B4B0; border-left: 4px solid var(--rule); }
.alert.ok { border-color: #B9D3C5; border-left: 4px solid var(--seal); }
.alert.info { border-color: #C3CEE4; border-left: 4px solid var(--blue); }

/* ---------- Status marks ----------
   Each status gets a shape as well as a color so it reads without color. */
.status { display: inline-flex; align-items: center; gap: .4em; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: .62em; height: .62em; border-radius: 50%; border: 2px solid currentColor; }
.status.s-draft { color: var(--slate); }
.status.s-draft::before { border-style: dashed; }
.status.s-sent { color: var(--ink-2); }
.status.s-opened { color: var(--blue); }
.status.s-opened::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status.s-acknowledged { color: var(--blue); }
.status.s-acknowledged::before { background: linear-gradient(90deg, currentColor 75%, transparent 75%); }
.status.s-in_progress { color: var(--amber); }
.status.s-in_progress::before { background: radial-gradient(currentColor 40%, transparent 45%); }
.status.s-completed { color: var(--seal); }
.status.s-completed::before { background: currentColor; }
.status.s-expired, .status.s-withdrawn { color: var(--rule); }
.status.s-expired::before, .status.s-withdrawn::before { border-radius: 1px; }

/* ---------- Public pages (sign in, register) ---------- */
.public-top { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem clamp(1rem, 4vw, 3rem); }
.wordmark { font: 600 1.35rem/1 var(--serif); color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: .35rem; }
.wordmark .otg { font-family: var(--mono); font-size: .8em; color: var(--rule); }
.public-main { padding: 0 clamp(1rem, 4vw, 3rem) 4rem; }
.home { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; max-width: 1180px; margin: 1rem auto 0; }
@media (max-width: 900px) { .home { grid-template-columns: 1fr; } }
.home-intro h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); max-width: 18ch; margin-bottom: .4em; }
.home-intro .lede { font-size: 1.12rem; color: var(--ink-2); max-width: 54ch; }

/* The transcript page – the product's signature visual. */
.tpage { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 2px; margin-top: 1.75rem;
  padding: 1.4rem 1.4rem 1.4rem 4.6rem; font: 400 .95rem/1.85 var(--mono); color: #2a2f3a; box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(31, 42, 68, .45); }
.tpage::before, .tpage::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.tpage::before { left: 3.55rem; }
.tpage::after { left: 3.8rem; }
.tpage ol { list-style: none; margin: 0; padding: 0; counter-reset: tl; }
.tpage li { counter-increment: tl; position: relative; white-space: pre-wrap; }
.tpage li::before { content: counter(tl); position: absolute; left: -3.9rem; width: 2.4rem; text-align: right; color: #8b93a3; }
.tpage .pg { position: absolute; top: .6rem; right: 1rem; color: #8b93a3; font-size: .85rem; }
.tpage del { text-decoration-color: var(--rule); text-decoration-thickness: 2px; color: #6b7280; }
.tpage ins { text-decoration: none; background: #FFF1C2; padding: 0 .2em; color: var(--ink); }
.tpage .note { position: absolute; right: 1rem; font: 600 .78rem/1.3 var(--sans); color: var(--rule); max-width: 12rem; text-align: right; }
@media (max-width: 600px) { .tpage .note { display: none; } .tpage { font-size: .8rem; padding-left: 3.6rem; } .tpage::before { left: 2.7rem; } .tpage::after { left: 2.95rem; } .tpage li::before { left: -3.2rem; width: 2rem; } }

.flow { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; color: var(--ink-2); font-size: .95rem; counter-reset: fl; }
.flow li { counter-increment: fl; }
.flow li::before { content: counter(fl) ". "; font-family: var(--mono); color: var(--rule); }

.doors { display: grid; gap: 1.25rem; }
.door { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.4rem 1.5rem 1.5rem; }
.door h2 { font-size: 1.25rem; margin-bottom: .2rem; }
.door > p { color: var(--slate); font-size: .93rem; }
.door.witness { border-top: 3px solid var(--ink); }
.door .links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .9rem; margin-top: .9rem; }
.code-input { font-family: var(--mono) !important; font-size: 1.3rem !important; letter-spacing: .12em; text-transform: uppercase; }

.narrow { max-width: 720px; margin: 1rem auto; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(1.1rem, 3vw, 2rem); }

/* ---------- Staff app shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #DCE1EC; padding: 1.2rem 0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .wordmark { color: #fff; padding: 0 1.25rem 1.2rem; }
.side .firmname { padding: 0 1.25rem 1rem; font-size: .85rem; color: #AEB7CB; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: .6rem; }
.side nav a { display: block; color: #DCE1EC; text-decoration: none; padding: .55rem 1.25rem; border-left: 3px solid transparent; font-size: .95rem; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a[aria-current=page] { border-left-color: var(--rule); background: rgba(255,255,255,.08); color: #fff; font-weight: 600; }
.side nav .cta { margin: .6rem 1.25rem 1rem; display: flex; justify-content: center; background: #fff; color: var(--ink); border-radius: var(--r-sm); font-weight: 600; border: 0; padding: .6rem; }
.side nav .cta:hover { background: #E8ECF4; color: var(--ink); }
.side .who { margin-top: auto; padding: 1rem 1.25rem 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: #AEB7CB; }
.side .who strong { color: #fff; display: block; font-weight: 600; }
.side .who .who-links { display: flex; gap: 1rem; margin-top: .5rem; }
.side .who a, .side .who button { background: none; border: 0; color: #DCE1EC; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.main { padding: clamp(1rem, 3vw, 2.2rem) clamp(1rem, 3.5vw, 2.8rem) 4rem; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--slate); margin: .3rem 0 0; }
.crumbs { font-size: .88rem; margin-bottom: .35rem; color: var(--slate); }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: .8rem 0 0; }
  .side nav { display: flex; overflow-x: auto; }
  .side nav a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; padding: .6rem .9rem; }
  .side nav a[aria-current=page] { border-bottom-color: var(--rule); }
  .side nav .cta { margin: .3rem .6rem; }
  .side .firmname { display: none; }
  .side .who { display: flex; gap: .4rem 1rem; align-items: center; flex-wrap: wrap; padding: .6rem 1rem; }
  .side .who strong { display: inline; }
  .side .who .who-links { margin: 0; }
}

/* Filter tabs on Check status */
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; align-items: center; }
.filters a { text-decoration: none; color: var(--ink-2); border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .32rem .8rem; font-size: .88rem; }
.filters a[aria-current=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters a .n { font-family: var(--mono); margin-left: .35em; opacity: .8; }
.filters form { margin-left: auto; display: flex; gap: .4rem; }
.filters form input { width: 16rem; padding: .42em .7em; }

/* Tables */
.table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th { text-align: left; font-weight: 600; font-size: .8rem; color: var(--slate); padding: .7rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFC; }
td { padding: .7rem .8rem; border-bottom: 1px solid #ECEEF2; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FAFBFD; }
td .primary { font-weight: 600; color: var(--ink); text-decoration: none; }
td .primary:hover { text-decoration: underline; }
td .sub { display: block; color: var(--slate); font-size: .83rem; }
.attempts { display: flex; gap: .35rem; }
.attempt { font: 400 .78rem/1 var(--mono); border: 1px solid var(--line); border-radius: 3px; padding: .3rem .35rem; color: #9AA1AE; white-space: nowrap; }
.attempt.done { color: var(--ink); border-color: #AEB4C2; background: #F4F6FA; }
.attempt.due { color: var(--amber); border-style: dashed; border-color: #D9B680; }
.empty { padding: 2.5rem 1.5rem; text-align: center; color: var(--slate); }
.empty .btn { margin-top: .6rem; }
.flag { color: var(--rule); font-size: .8rem; font-weight: 600; display: block; }

/* Cards/sections on detail pages */
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1.4rem; align-items: start; }
@media (max-width: 1050px) { .cols { grid-template-columns: 1fr; } }
.section { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.2rem 1.35rem; margin-bottom: 1.4rem; }
.section > h2 { font-size: 1.15rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.4rem; margin: 0; }
dl.facts dt { color: var(--slate); font-size: .88rem; }
dl.facts dd { margin: 0; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: .5rem; } }

/* Progress strip for a single Read & Sign (a real sequence, so it is numbered). */
.progress { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0 0 1.4rem; padding: 0; counter-reset: st; }
.progress li { counter-increment: st; position: relative; padding: 2.1rem .3rem 0; text-align: center; font-size: .82rem; color: #9AA1AE; }
.progress li::before { content: counter(st); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 2px solid #C9CDD6; background: var(--paper); font: 400 .8rem/1.4rem var(--mono); color: #9AA1AE; z-index: 1; }
.progress li::after { content: ""; position: absolute; top: .8rem; left: -50%; width: 100%; height: 2px; background: #C9CDD6; }
.progress li:first-child::after { display: none; }
.progress li.done { color: var(--ink); }
.progress li.done::before { background: var(--ink); border-color: var(--ink); color: #fff; }
.progress li.done::after { background: var(--ink); }
.progress li.now { color: var(--ink); font-weight: 600; }
.progress li.now::before { border-color: var(--ink); color: var(--ink); }
.progress li .when { display: block; font-weight: 400; color: var(--slate); font-size: .75rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid #ECEEF2; font-size: .9rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--slate); font-size: .8rem; line-height: 1.4; padding-top: .1rem; }
.timeline .ev { font-weight: 600; }
.timeline .by { color: var(--slate); font-size: .83rem; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: .1rem; } }

.counsel-list { list-style: none; margin: 0; padding: 0; }
.counsel-list > li { padding: .8rem 0; border-bottom: 1px solid #ECEEF2; }
.counsel-list > li:last-child { border-bottom: 0; }
.counsel-list .side-tag { font-size: .78rem; color: var(--slate); border: 1px solid var(--line); border-radius: 3px; padding: .05rem .35rem; margin-left: .35rem; }

.counsel-row { border: 1px solid var(--line); border-left: 3px solid #C9CDD6; border-radius: var(--r-sm); padding: 1rem 1rem .2rem; margin-bottom: .8rem; position: relative; background: #FCFCFD; }
.counsel-row .remove { position: absolute; top: .5rem; right: .5rem; }
.hidden { display: none !important; }
details.disclose summary { cursor: pointer; color: var(--blue); font-weight: 600; margin: .5rem 0; }
.code-box { font: 400 1.25rem/1 var(--mono); letter-spacing: .1em; }

/* ---------- Witness portal ---------- */
.w-top { background: var(--paper); border-bottom: 1px solid var(--line); padding: .7rem clamp(1rem, 3vw, 2rem); display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.w-top .case { font-size: .9rem; color: var(--slate); }
.w-top .case strong { color: var(--ink); }
.w-top form { margin-left: auto; }
.steps { list-style: none; display: flex; gap: .2rem; margin: 0; padding: 0; counter-reset: ws; font-size: .82rem; }
.steps li { counter-increment: ws; color: #9AA1AE; padding: .25rem .5rem; border-radius: 3px; }
.steps li::before { content: counter(ws) " "; font-family: var(--mono); }
.steps li.done { color: var(--ink-2); }
.steps li.now { background: var(--ink); color: #fff; }
@media (max-width: 760px) { .steps { display: none; } }
.w-main { padding: clamp(1rem, 3vw, 2.2rem) clamp(1rem, 3vw, 2rem) 4rem; }
.instructions { counter-reset: ins; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.instructions li { counter-increment: ins; position: relative; padding: .55rem 0 .55rem 2.6rem; border-bottom: 1px solid #ECEEF2; max-width: 70ch; }
.instructions li::before { content: counter(ins); position: absolute; left: 0; top: .55rem; width: 1.8rem; text-align: right; font-family: var(--mono); color: var(--rule); }

/* Read & Sign room: transcript left, errata sheet right */
.room { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); height: calc(100vh - 58px); }
.viewer { background: #E4E7EC; overflow: auto; padding: 1.2rem; position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.viewer .pagebox { position: relative; margin: 0 auto 1.2rem; background: #fff; box-shadow: 0 1px 3px rgba(31,42,68,.18); max-width: 900px; }
.viewer canvas { display: block; width: 100%; height: auto; pointer-events: none; }
.viewer .wm { position: absolute; inset: 0; pointer-events: none; overflow: hidden; display: grid; place-items: center; }
.viewer .wm span { transform: rotate(-30deg); font: 600 clamp(.9rem, 2.2vw, 1.4rem)/1.3 var(--sans); color: rgba(31,42,68,.14); text-align: center; white-space: pre; }
.viewer .pagebar { position: absolute; top: .4rem; right: .4rem; }
.viewer .pagebar button { font: 600 .78rem/1 var(--sans); background: rgba(255,255,255,.95); border: 1px solid #AEB4C2; border-radius: 3px; padding: .4rem .55rem; cursor: pointer; color: var(--ink); }
.viewer .pagebar button:hover { border-color: var(--ink); }
.viewer .pnum { position: absolute; bottom: .4rem; left: 50%; transform: translateX(-50%); font: .75rem var(--mono); color: var(--slate); background: rgba(255,255,255,.9); padding: .1rem .4rem; }
.viewer .loading { text-align: center; color: var(--slate); padding: 3rem 1rem; }
.viewer-tools { position: sticky; top: -1.2rem; z-index: 3; margin: -1.2rem -1.2rem 1rem; padding: .5rem 1.2rem; background: rgba(228,231,236,.96); display: flex; gap: .5rem; align-items: center; font-size: .85rem; border-bottom: 1px solid #D3D7DE; }
.viewer-tools button { font: 600 .85rem var(--sans); border: 1px solid #AEB4C2; background: #fff; border-radius: 3px; padding: .25rem .6rem; cursor: pointer; color: var(--ink); }
.viewer-tools .count { margin-left: auto; color: var(--slate); }

.sheet { background: var(--paper); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: relative; }
.sheet::before, .sheet::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); opacity: .55; }
.sheet::before { left: 10px; } .sheet::after { left: 13px; }
.sheet-head { padding: 1rem 1.2rem .8rem 1.75rem; border-bottom: 1px solid var(--line); }
.sheet-head h1 { font-size: 1.35rem; margin-bottom: .15rem; }
.sheet-head p { font-size: .88rem; color: var(--slate); margin: 0; }
.entries { flex: 1; overflow: auto; padding: 1rem 1.2rem 1rem 1.75rem; }
.entry { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .8rem .85rem .2rem; margin-bottom: .8rem; background: #fff; }
.entry:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 90, 168, .15); }
.entry-top { display: flex; gap: .6rem; align-items: flex-end; margin-bottom: .55rem; }
.entry-top .n { font: 400 .85rem var(--mono); color: var(--rule); align-self: center; min-width: 1.6rem; }
.entry-top .field { margin: 0; width: 5.4rem; }
.entry-top .field input { font-family: var(--mono); }
.entry-top .remove { margin-left: auto; }
.entry .field { margin-bottom: .6rem; }
.entry label { font-size: .8rem; margin-bottom: .2rem; }
.entry textarea { min-height: 2.6em; font-size: .95rem; }
.sheet-foot { border-top: 1px solid var(--line); padding: .8rem 1.2rem .9rem 1.75rem; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; background: #FAFBFC; }
.sheet-foot .save-state { font-size: .82rem; color: var(--slate); margin-right: auto; }
.sheet-empty { color: var(--slate); text-align: center; padding: 2rem 1rem; border: 1px dashed #C9CDD6; border-radius: var(--r-sm); }
.room-tabs { display: none; }
@media (max-width: 900px) {
  .room { grid-template-columns: 1fr; height: auto; }
  .room-tabs { display: flex; position: sticky; top: 0; z-index: 4; background: var(--paper); border-bottom: 1px solid var(--line); }
  .room-tabs button { flex: 1; padding: .8rem; font: 600 .95rem var(--sans); background: none; border: 0; border-bottom: 3px solid transparent; color: var(--slate); }
  .room-tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--rule); }
  .room [data-pane][hidden] { display: none; }
  .viewer { height: calc(100vh - 120px); }
  .sheet { min-height: calc(100vh - 120px); }
}

.sig { font: 600 1.6rem/1.2 var(--serif); font-style: italic; border-bottom: 1px solid var(--ink); padding: .2rem 0; min-height: 2.2rem; margin: .4rem 0 1rem; color: var(--ink); }
.declaration { border-left: 3px double var(--rule); padding: .2rem 0 .2rem 1rem; margin: 1rem 0 1.4rem; font-family: var(--serif); font-size: 1.05rem; line-height: 1.6; max-width: 68ch; }
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--seal); display: grid; place-items: center; margin-bottom: 1rem; }
.done-mark svg { width: 28px; height: 28px; }

/* Print: staff reports print; the witness transcript never does. */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .side, .no-print, .w-top, .room-tabs { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .table-wrap, .section { border: 0; }
  .print-only { display: block; }
  body.witness-room > * { display: none !important; }
  body.witness-room::after { content: "Printing is not available for transcripts in Errata OTG."; display: block; padding: 2rem; font: 16px sans-serif; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
.narrow.wide { max-width: 900px; }
.mail-body { white-space: pre-wrap; font-family: var(--sans); margin: 0; }
.spaced { margin-top: 1rem; }
.narrow-form { max-width: 520px; }

/* Layout refinements */
.grid { align-items: end; }
.counsel-row { padding-top: 2.4rem; }
.counsel-row .remove { top: .35rem; right: .35rem; }
.tpage { padding-top: 2.2rem; }
@media (max-width: 900px) {
  .doors { order: -1; }
  .home-intro h1 { font-size: 1.8rem; }
}
@media (max-width: 600px) {
  .tpage li { white-space: pre; overflow: hidden; }
  .w-top .case { flex-basis: 100%; order: 3; font-size: .82rem; }
  .w-top { gap: .5rem 1rem; }
}

/* Auto-fill from transcript */
.autofill-status { border: 1px solid #C3CEE4; border-left: 4px solid var(--blue); border-radius: var(--r-sm); padding: .75rem 1rem; font-size: .92rem; background: #F7F9FD; }
.autofill-status.error { border-color: #E2B4B0; border-left-color: var(--rule); background: var(--paper); }
.autofill-status ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.autofill-status li { margin: .25rem 0; }
.autofill-status .btn { padding: .3em .6em; font-size: .85rem; margin-left: .3rem; }
.autofilled { background: #FFFBEA !important; border-color: #D9B680 !important; }
.side .who a.who-name { text-decoration: none; }
.side .who a.who-name:hover strong { text-decoration: underline; }

/* Platform admin */
.side .nav-group { margin: .9rem 1.25rem .3rem; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; color: #AEB7CB; }
.admin-note { font-size: .85rem; color: var(--slate); border-left: 3px solid var(--line); padding-left: .7rem; margin: 0 0 1.2rem; max-width: 80ch; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 1.4rem; }
.stat { background: var(--paper); padding: .9rem 1rem; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.stat .num { font: 400 1.7rem/1.1 var(--mono); color: var(--ink); display: block; }
.stat .lbl { font-size: .85rem; color: var(--slate); }
.stat.warn .num { color: var(--rule); }
.pill { display: inline-block; font-size: .78rem; font-weight: 600; border-radius: 3px; padding: .1rem .45rem; border: 1px solid; white-space: nowrap; }
.pill.ok { color: var(--seal); border-color: #B9D3C5; background: #F3F9F5; }
.pill.bad { color: var(--rule); border-color: #E2B4B0; background: #FDF5F4; }
.pill.muted { color: var(--slate); border-color: var(--line); background: #F7F8FA; }
.inline-form { display: inline; }
