/* Hallmark · checked: 2026-11-29 · genre: editorial (inferred) · scope: app · brand: Bearing (navy #1F3559, gold #CC9A3C)
 * floor: 0 FAIL (static) · fixed: 7a, 20, 34, 48, 54, 56, 63, 67, 3, 29, 40, 41, F3, F6, F7, F16, F24 · structural: printed in the handoff
 * answered: F7 (text inputs share one control recipe on purpose)
 * built: the project · redesign: polish · v2.0.0 */

/* Bearing: styles. System fonts only (nothing is downloaded). Every colour is a token below. */

:root {
  --picker-white: #ffffff;
  --picker-black: #000000;
  --picker-knob: #fafafc;
  --picker-hues: linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  --bg: #f4f5f8;
  --surface: #fcfcfd;
  --surface-2: #eef1f5;
  --text: #1b2230;
  --muted: #586172;
  --line: #e0e4eb;
  --line-strong: #c8cfda;
  --accent: #1f3559;
  --accent-hover: #172946;
  --accent-ink: #f6f4ee;
  --accent-soft: #e6ecf6;
  --accent-text: #1f3559;
  --gold: #85601c;
  --gold-soft: #f7eedb;
  --good: #17734d;
  --good-soft: #e3f4ea;
  --warn: #8f5507;
  --warn-soft: #fdf1dc;
  --warn-line: #ecc47c;
  --info: #2852b8;
  --info-soft: #e8eefb;
  --danger: #b42318;
  --danger-ink: #fff6f4;
  --danger-soft: #fcebe8;
  --scrim: rgba(12, 17, 28, 0.48);
  --paper: #fffdf8;
  --paper-ink: #16191f;
  --paper-rule: #16191f;
  --paper-grid: #b9bec7;
  --sig-ink: #16243f;
  --ed-backdrop: #e4e7ec;
  --ed-bar: #ffffff;
  --ed-select: #3a74d8;
  --ed-page: #fefefd;
  --ed-ring: rgba(0, 0, 0, 0.2);
  --ed-page-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 30px rgba(0, 0, 0, 0.16);
  --ed-thumb-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  --ed-typing: rgba(255, 255, 255, 0.6);
  --note-bg: #fff6c2;
  --note-ink: #3b2f00;
  --note-line: #a07800;
  --shadow: 0 1px 2px rgba(16, 22, 34, 0.05), 0 4px 16px rgba(16, 22, 34, 0.04);
  --shadow-lg: 0 12px 40px rgba(16, 22, 34, 0.18);
  --shadow-paper: 0 1px 3px rgba(16, 22, 34, 0.1), 0 10px 28px rgba(16, 22, 34, 0.07);
  --radius: 14px;
  --radius-sm: 8px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  --sidebar: 264px;
  color-scheme: light dark;
}

/* Dark mode: neutral graphite, with the brand gold as the accent (navy has
   too little contrast on a dark ground). It follows the device unless the
   person picks Light or Dark (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #121316;
    --surface: #1a1c20;
    --surface-2: #212429;
    --text: #ececee;
    --muted: #b4b7be;
    --line: #2b2e34;
    --line-strong: #3b3f47;
    --accent: #e2b65c;
    --accent-hover: #ecc677;
    --accent-ink: #1c1406;
    --accent-soft: #2a2416;
    --accent-text: #e9c274;
    --gold: #e2b65c;
    --gold-soft: #2a2416;
    --good: #63cf9a;
    --good-soft: #17291f;
    --warn: #f0b05a;
    --warn-soft: #2d2415;
    --warn-line: #6a5024;
    --info: #9db5ea;
    --info-soft: #1d2331;
    --danger: #ff8f85;
    --danger-ink: #2b0d0a;
    --danger-soft: #3a1714;
    --scrim: rgba(4, 5, 7, 0.64);
    --ed-backdrop: #0c0d10;
    --ed-bar: #17181c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme='dark'] {
    --bg: #121316;
    --surface: #1a1c20;
    --surface-2: #212429;
    --text: #ececee;
    --muted: #b4b7be;
    --line: #2b2e34;
    --line-strong: #3b3f47;
    --accent: #e2b65c;
    --accent-hover: #ecc677;
    --accent-ink: #1c1406;
    --accent-soft: #2a2416;
    --accent-text: #e9c274;
    --gold: #e2b65c;
    --gold-soft: #2a2416;
    --good: #63cf9a;
    --good-soft: #17291f;
    --warn: #f0b05a;
    --warn-soft: #2d2415;
    --warn-line: #6a5024;
    --info: #9db5ea;
    --info-soft: #1d2331;
    --danger: #ff8f85;
    --danger-ink: #2b0d0a;
    --danger-soft: #3a1714;
    --scrim: rgba(4, 5, 7, 0.64);
    --ed-backdrop: #0c0d10;
    --ed-bar: #17181c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
}
:root[data-theme='light'] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
  scrollbar-color: var(--line-strong) transparent;
}
::selection { background: var(--accent-soft); color: var(--text); }

a { color: var(--accent-text); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.012em; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
h1 { font-size: clamp(28px, 3.2vw, 36px); margin: 0 0 8px; font-weight: 720; }
h2 { font-size: 18px; margin: 0; font-weight: 660; }
h3 { font-size: 16px; margin: 0; font-weight: 640; }
h4 { font-size: 15px; margin: 0 0 8px; font-weight: 640; color: var(--muted); }
p { margin: 0 0 12px; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 40px; text-align: center; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------- layout ---------- */

.app { min-height: 100vh; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 16px 16px;
  background: var(--surface);
  color: var(--text);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  z-index: 30;
}

.brand { display: flex; align-items: center; padding: 4px 8px 16px; text-decoration: none; }
.brand img { display: block; height: 32px; width: auto; }
.topbar .brand img { height: 36px; }

.nav-group { margin-bottom: 12px; }
.nav-group-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 4px 12px 4px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 540;
  transition: background-color 0.15s;
}
.nav-link svg { color: var(--muted); flex: none; }
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link[aria-current='page'] { background: var(--accent-soft); color: var(--accent-text); }
.nav-link[aria-current='page'] svg { color: var(--accent-text); }
.nav-count { margin-left: auto; font-size: 12px; font-weight: 700; min-width: 24px; text-align: center; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-link[aria-current='page'] .nav-count { background: var(--surface); color: var(--accent-text); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 16px; }

.topbar { display: none; }
.content { margin-left: var(--sidebar); min-width: 0; }
.main { max-width: 1120px; margin: 0 auto; padding: 36px 40px 28px; outline: none; }
.site-footer { max-width: 1120px; margin: 0 auto; padding: 8px 40px 40px; font-size: 14px; color: var(--muted); }
.site-footer p { margin: 4px 0; }

@media (max-width: 900px) {
  .topbar {
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 12px;
    min-height: 64px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; }
  .topbar .btn.icon-only { width: 44px; min-height: 44px; border-radius: 12px; }
  .topbar .btn.icon-only svg { width: 26px; height: 26px; }
  .sidebar { transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 25; }
  .content { margin-left: 0; }
  .main { padding: 24px 16px 20px; }
  .site-footer { padding: 8px 16px 32px; }
}

.page { display: flex; flex-direction: column; gap: 24px; }
.page.narrow { max-width: 760px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head .lead { margin: 0; max-width: 680px; }
.page-title { outline: none; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lead { font-size: 17px; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; margin-bottom: -8px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 640px) { .row-2, .row-3 { grid-template-columns: 1fr; } .row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- cards ---------- */

.card { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.card-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }

.card-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--accent-text); background: var(--accent-soft); flex: none; }
.card-actions { margin-left: auto; }
.card.subtle { background: var(--surface-2); color: var(--text); box-shadow: none; }
.card.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.card.danger-zone .card-icon { background: var(--danger-soft); color: var(--danger); }
.form-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* ---------- hero & stats ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 36px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(30px, 3.6vw, 42px); }
.hero .lead { margin-bottom: 20px; }
.hero-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 24px 20px; } }

.stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); }
.stat-value { font-size: 32px; font-weight: 720; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 14px; color: var(--muted); }
.stat.good .stat-value { color: var(--good); }
.stat.warn .stat-value { color: var(--warn); }
.stat.info .stat-value { color: var(--info); }
.summary-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 16px; }

.feature { padding: 20px; border-radius: var(--radius); background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.feature h3 { margin: 12px 0 8px; }
.feature p { margin: 0; font-size: 15px; }
.feature-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--accent-text); background: var(--accent-soft); }

/* progress */
.progress { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.progress-step { display: flex; gap: 12px; padding: 8px; border-radius: 12px; }
.progress-step.current { background: var(--accent-soft); }
.progress-dot { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface); font-variant-numeric: tabular-nums; }
.progress-step.done .progress-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.progress-step.current .progress-dot { border-color: var(--accent); color: var(--accent-text); }
.progress-title { font-weight: 650; color: var(--text); text-decoration: none; }
.progress-step.done .progress-title { color: var(--muted); }
.progress-step p { margin: 4px 0 0; }

.deadline-list { list-style: none; padding: 0; margin: 0; }
.deadline-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.deadline-list li:last-child { border-bottom: 0; }
.deadline-list p { margin: 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 620;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: var(--danger-ink); }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 14px; border-radius: 8px; }
.btn.lg { min-height: 48px; padding: 12px 24px; font-size: 16px; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn.icon-only { min-height: 36px; width: 36px; padding: 0; border-radius: 8px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions.end { justify-content: flex-end; }
.actions.spread { justify-content: space-between; }

/* ---------- forms ---------- */

.form { display: flex; flex-direction: column; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; min-width: 0; }
.field label { font-weight: 620; font-size: 15px; }
.optional { font-weight: 450; color: var(--muted); font-size: 14px; }
.help { margin: 0; font-size: 15px; color: var(--muted); }
.help.over { color: var(--danger); font-weight: 650; }
.error { color: var(--danger); font-weight: 600; margin: 0 0 12px; }
.error:empty { display: none; }

input[type='text'], input[type='tel'], input[type='password'], input[type='date'], input[type='number'], input[type='search'], input[type='email'], select, textarea {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  width: 100%;
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent); }
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
legend { font-weight: 620; font-size: 15px; padding: 0; margin-bottom: 8px; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.checks.inline { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }
.company-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 24px; padding-top: 12px; }
.company-group-title { font-size: 15px; font-weight: 650; color: var(--text); margin: 0 0 8px; }
.checks.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 20px; padding-top: 12px; }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

details.more { margin: 4px 0 16px; }
details.more > summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--accent-text); list-style: none; display: inline-flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.2s; }
details.more[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
details.more[open] > summary { margin-bottom: 12px; }

/* ---------- badges, callouts, chips ---------- */

.badge { display: inline-flex; align-items: center; font-size: 13px; font-weight: 650; padding: 4px 12px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.tone-good { background: var(--good-soft); color: var(--good); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-info { background: var(--info-soft); color: var(--info); }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 15px; }
.callout > svg { flex: none; margin-top: 2px; color: var(--muted); }
.callout > div { min-width: 0; }
.callout.tone-info { background: var(--info-soft); }
.callout.tone-info > svg { color: var(--info); }
.callout.tone-warn { background: var(--warn-soft); }
.callout.tone-warn > svg { color: var(--warn); }
.card .callout { margin: 16px 0; }

.banner { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.banner.warn { background: var(--warn-soft); color: var(--text); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

.empty { text-align: center; padding: 44px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 12px; }
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 auto 16px; }
.empty .actions { justify-content: center; }
.tab-panel .empty { border: 0; background: transparent; padding: 32px 12px; }

/* ---------- tabs & tables ---------- */

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin-bottom: 16px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { font: inherit; font-weight: 620; font-size: 15px; border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab-count { font-size: 12px; background: var(--accent-soft); color: var(--accent-text); padding: 0 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.panel-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.panel-bar p { margin: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: 14px; color: var(--muted); background: var(--surface-2); font-weight: 600; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { white-space: nowrap; text-align: right; }
.matrix tbody th { font-weight: 620; min-width: 180px; }
.matrix tr.flagged th { color: var(--warn); }
.warn-icon { color: var(--warn); margin-left: 8px; vertical-align: -2px; }

/* findings: rows divided by hairlines, not boxes inside the card */
.findings { list-style: none; padding: 0; margin: 0 0 8px; }
.finding { padding: 16px 0; border-bottom: 1px solid var(--line); }
.finding:first-child { padding-top: 4px; }
.finding-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.finding-kind { margin: 4px 0 0; font-weight: 600; color: var(--muted); font-size: 15px; }
.finding-values { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 8px; font-size: 15px; }
.finding-values dt { font-weight: 650; }
.finding-values dd { margin: 0; }

/* Terms and codes */
.terms-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.terms-search { flex: 1 1 280px; max-width: 520px; }
.terms button.chip { height: 36px; padding: 0 12px; border: 1px solid var(--line); font: inherit; font-size: 14px; cursor: pointer; }
.terms button.chip:hover { color: var(--text); }
.terms button.chip.on { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
.terms-az { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 0; }
.terms-az .az { min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 650; cursor: pointer; }
.terms-az .az:hover:not(:disabled) { background: var(--surface-2); }
.terms-az .az:disabled { background: var(--surface-2); color: var(--muted); border-color: transparent; cursor: default; }
.terms-list { display: grid; gap: 24px; }
.terms-group { display: grid; gap: 8px; scroll-margin-top: 120px; }
.terms-letter { margin: 0; font-size: 22px; padding-bottom: 4px; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.term { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); scroll-margin-top: 120px; }
.term > summary { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 16px; cursor: pointer; list-style: none; }
.term > summary::-webkit-details-marker { display: none; }
.term-head { display: grid; gap: 4px; min-width: 0; flex: 1; }
.term-title { font-weight: 650; }
.term-meaning { color: var(--muted); font-size: 15px; font-weight: 400; }
.term-codes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.term-code { padding: 2px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.term-body { padding: 0 16px 16px; display: grid; gap: 8px; }
.term-body p, .term-body h4 { margin: 0; }
.term-body h4 { font-size: 15px; }
.term.compact > summary { padding: 8px 12px; }
.term.compact .term-body { padding: 0 12px 12px; }
.terms-here { border: 1px solid var(--line); border-radius: 12px; }
.terms-here > summary { display: flex; gap: 8px; align-items: center; padding: 12px 16px; cursor: pointer; font-weight: 650; }
.terms-here-list { display: grid; gap: 8px; padding: 0 16px 16px; }
@media (max-width: 640px) { .terms-az { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .terms-az .az { flex: none; } }

/* Bank account reports: score notice and the situation guide */
.bank-panel { display: grid; gap: 20px; }
.bank-panel > p { margin: 0; }
.bank-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.bank-slot { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); }
.bank-slot.done { border-style: solid; border-color: var(--line); color: var(--good); }
.bank-slot p { margin: 0; }
.bank-slot-title { font-weight: 650; color: var(--text); }
.bank-score { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.bank-score-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.bank-score-head h3 { margin: 0 0 4px; font-size: 17px; }
.bank-score-head p { margin: 0; }
.bank-score-num { margin: 0; font-size: 40px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.bank-meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bank-meter-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); }
.bank-score h4, .bank-guide h4 { margin: 0 0 4px; font-size: 16px; }
.bank-reasons { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.bank-reasons li { display: flex; gap: 12px; align-items: flex-start; }
.bank-reasons p { margin: 0; }
.bank-reasons p + p { margin-top: 4px; }
.bank-code { flex: none; min-width: 40px; padding: 4px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.bank-printed { font-size: 13px; letter-spacing: 0.02em; color: var(--muted); }
.bank-kind-activity, .bank-kind-none { color: var(--good); }
.bank-guide { display: grid; gap: 12px; }
.bank-guide > h3 { margin: 0; font-size: 18px; }
.bank-guide .field { max-width: 420px; }
.bank-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: step; }
.bank-step { position: relative; padding: 14px 16px 14px 56px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); counter-increment: step; }
.bank-step::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--text); }
.bank-step.step-warn::before { background: var(--warn-soft); color: var(--warn); }
.bank-step.step-good::before { background: var(--good-soft); color: var(--good); }
.bank-step.step-info::before { background: var(--info-soft); color: var(--info); }
.bank-step p { margin: 4px 0 0; color: var(--text); }
.bank-step h4 { color: var(--text); }
.bank-step .actions, .bank-step .inline-links { margin-top: 8px; }

/* Reading a bureau's reply */
.reply-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.reply-results { display: grid; gap: 16px; }
.outcome-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.outcome-list li { padding: 4px 12px; border-radius: 999px; font-size: 13px; background: var(--surface-2); }
.outcome-list .outcome-deleted { background: var(--good-soft); color: var(--good); }
.outcome-list .outcome-verified { background: var(--warn-soft); color: var(--warn); }
.outcome-list .outcome-updated { background: var(--info-soft); color: var(--info); }

/* Changes since the last report */
.changes-bureau + .changes-bureau { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.changes-bureau h3 { margin: 0 0 8px; font-size: 17px; }
.changes-bureau h4 { margin: 0; font-size: 16px; }
.change-group { margin-top: 16px; }
.change-group h4 { margin-bottom: 8px; }
.change-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.change-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.change-list li > span { flex: 1 1 200px; min-width: 0; }
.change-list .btn { margin-left: auto; }

/* Time limits */
.limits { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.limit-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px 20px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.limit-row h3 { margin: 0; font-size: 16px; }
.limit-row p { margin: 0; }
.limit-row p + p { margin-top: 4px; }
.limit-side { display: grid; gap: 8px; justify-items: end; }
@media (max-width: 720px) {
  .limit-row { grid-template-columns: minmax(0, 1fr); }
  .limit-side { justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; }
}

/* items */
.item-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.item-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: border-color 0.15s; }
.item-row:hover { border-color: var(--accent); text-decoration: none; }
.item-main p { margin: 4px 0 8px; }
.item-side { display: flex; align-items: center; gap: 12px; flex: none; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.details dt { font-weight: 650; color: var(--muted); }
.details dd { margin: 0; white-space: pre-wrap; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 20px; display: flex; gap: 16px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.tl-date { color: var(--muted); font-size: 14px; min-width: 100px; font-variant-numeric: tabular-nums; }

/* ---------- letters ---------- */

.letters-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.letters-steps { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.letters-preview { position: sticky; top: 24px; min-width: 0; max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
@media (max-width: 1180px) { .letters-layout { grid-template-columns: 1fr; } .letters-preview { position: static; max-height: none; overflow: visible; padding-right: 0; } }

.type-group + .type-group { margin-top: 16px; }
.type-group-label { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.type-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.type-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; min-height: 100%; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: transparent; color: var(--text); transition: border-color 0.15s, background-color 0.15s; }
.type-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.type-card input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.type-card:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.type-card.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.type-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tc-title { font-weight: 650; font-size: 16px; line-height: 1.35; }
.tc-mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: transparent; margin-top: -1px; }
.type-card.on .tc-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tc-desc { font-size: 15px; color: var(--muted); line-height: 1.45; }
.tc-law { font-size: 14px; color: var(--gold); font-weight: 600; margin-top: auto; padding-top: 4px; }

.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.segmented label { padding: 8px 16px; cursor: pointer; border-right: 1px solid var(--line-strong); font-weight: 620; font-size: 15px; }
.segmented label:last-child { border-right: 0; }
.segmented label.on { background: var(--accent); color: var(--accent-ink); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -3px; }

.preview-bar { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); }
.tips { list-style: none; margin: 0 0 12px; padding: 12px 16px; background: var(--surface-2); border-radius: 12px; font-size: 14px; color: var(--muted); display: grid; gap: 8px; }
.tips li { display: flex; gap: 8px; }
.tips svg { flex: none; margin-top: 4px; color: var(--accent-text); }
.paper-wrap { background: var(--surface-2); border-radius: var(--radius); padding: 20px; overflow-x: auto; }

.letter-paper {
  background: var(--paper);
  color: var(--paper-ink);
  font: 15px/1.55 var(--serif);
  padding: 56px 60px;
  border-radius: 4px;
  box-shadow: var(--shadow-paper);
  max-width: 780px;
  margin: 0 auto;
}
.lp-block { white-space: pre-wrap; margin: 0 0 16px; overflow-wrap: break-word; hyphens: manual; }
.lp-re { font-weight: 700; }
.lp-items { margin: 0 0 16px; padding-left: 28px; display: grid; gap: 16px; }
.lp-items > li { padding-left: 4px; }
.lp-items > li::marker { font-weight: 700; }
.lp-item-title { font-weight: 700; margin-bottom: 4px; }
.lp-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; }
.lp-rows dt { font-style: italic; }
.lp-rows dt::after { content: ':'; }
.lp-rows dd { margin: 0; overflow-wrap: break-word; }
.lp-sign { white-space: normal; }
.lp-line { height: 56px; border-bottom: 1px solid var(--paper-rule); width: 260px; margin: 4px 0; position: relative; }
.lp-signature { position: absolute; left: 4px; bottom: 2px; max-height: 64px; max-width: 250px; object-fit: contain; }
.lp-enc ul { margin: 4px 0 0; padding-left: 20px; white-space: normal; display: grid; gap: 2px; }
@media (max-width: 560px) { .lp-rows { grid-template-columns: minmax(0, 1fr); gap: 0; } .lp-rows dd { margin-bottom: 4px; } }
@media (max-width: 640px) { .letter-paper { padding: 28px 20px; font-size: 14px; } .paper-wrap { padding: 8px; } }

/* ---------- tracker ---------- */

.track-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.track-card { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.track-card.status-no-response, .track-card.status-verified, .track-card.status-frivolous, .track-card.status-declined { border-color: var(--warn-line); }
.tc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.tc-head p { margin: 4px 0 0; }
.due-strip { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--info-soft); color: var(--text); font-weight: 600; font-size: 15px; margin-bottom: 16px; }
.due-strip svg { color: var(--info); }
.next-steps { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.next-steps ul { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.next-steps li > .btn { margin: 8px 8px 0 0; }
.inline-links { display: block; margin-top: 4px; font-size: 15px; }

/* CFPB complaint builder */
.cx-picks { display: grid; gap: 0; margin: 0; }
.cx-pick { display: grid; grid-template-columns: minmax(96px, 160px) minmax(0, 1fr); gap: 8px 20px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.cx-pick:first-child { border-top: 0; padding-top: 0; }
.cx-pick dt { font-weight: 650; color: var(--muted); }
.cx-pick dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cx-value { font-size: 16px; font-weight: 600; color: var(--text); }
.cx-text { width: 100%; line-height: 1.55; }
.cx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.cx-row .help { margin: 0; }
.cx-attach { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; font-size: 16px; }
.cx-attach li { display: flex; gap: 8px; align-items: flex-start; }
.cx-attach svg { flex: none; margin-top: 4px; color: var(--accent-text); }
@media (max-width: 560px) { .cx-pick { grid-template-columns: minmax(0, 1fr); } }

/* ---------- documents ---------- */

.docs + .docs { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.docs-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.docs-head p { margin: 4px 0 0; }
.doc-grid { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.doc { display: flex; flex-direction: column; min-width: 0; }
.doc-thumb { border: 1px solid var(--line); padding: 0; background: var(--surface-2); height: 132px; cursor: pointer; display: block; width: 100%; border-radius: 8px; overflow: hidden; }
.doc-thumb-img { width: 100%; height: 132px; object-fit: cover; object-position: top; display: block; }
.doc-meta { padding: 8px 0 0; display: flex; flex-direction: column; min-width: 0; }
.doc-name { font-weight: 620; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-actions { display: flex; gap: 4px; padding: 4px 0 0; }

/* ---------- companies ---------- */

.freeze-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 16px 0; }
@media (max-width: 900px) { .freeze-grid { grid-template-columns: 1fr; } }
.freeze-card { padding: 4px 0 4px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.freeze-card:first-child { padding-left: 0; border-left: 0; }
@media (max-width: 900px) { .freeze-card { padding-left: 0; border-left: 0; } }
.freeze-card p { margin: 0; }
.freeze-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cat { margin-top: 24px; }
.cat-title { font-size: 17px; font-weight: 650; color: var(--text); margin-bottom: 4px; }
.agency-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.agency { border-top: 1px solid var(--line); padding: 24px 0; display: flex; flex-direction: column; gap: 16px; }
.agency-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.agency-head h3 { font-size: 18px; }
.agency-covers { margin: 4px 0 0; font-size: 16px; color: var(--muted); max-width: 640px; }
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 32px; }
.contact-label { font-size: 15px; font-weight: 650; color: var(--text); margin: 0 0 8px; }
.contact ul { list-style: none; margin: 0; padding: 0; font-size: 16px; line-height: 1.5; display: grid; gap: 8px; }
.contact li { display: flex; gap: 12px; align-items: flex-start; }
.contact li svg { flex: none; margin-top: 4px; color: var(--muted); }
.addr { color: var(--text); }
.agency-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 15px; color: var(--muted); }
.agency-note svg { flex: none; margin-top: 4px; }
.agency .actions { margin-top: auto; }

/* ---------- data page ---------- */

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts svg { flex: none; color: var(--accent-text); margin-top: 2px; }
.steps-list { padding-left: 20px; display: grid; gap: 12px; }
.code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border-radius: 8px; padding: 12px; overflow-x: auto; white-space: pre; margin: 8px 0 0; max-width: 100%; }
li { min-width: 0; }
.link-list { padding-left: 20px; margin: 0; display: grid; gap: 8px; }
.ext::after { content: ' ↗'; font-size: 0.85em; }

/* ---------- modal ---------- */

dialog.modal { border: 0; padding: 0; overflow: auto; overscroll-behavior: contain; border-radius: 20px; background: var(--surface); color: var(--text); width: min(520px, calc(100% - 24px)); max-height: calc(100% - 40px); box-shadow: var(--shadow-lg); }
dialog.modal.wide { width: min(980px, calc(100% - 24px)); }
dialog.modal::backdrop { background: var(--scrim); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 24px; }
.modal-body .actions { margin-top: 20px; }
dialog.modal.wide:has(.ed-layout) { width: min(1240px, calc(100% - 24px)); }

/* Document editor: full-screen workspace */
dialog.edx { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ed-backdrop); color: var(--text); display: grid; grid-template-rows: auto auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); overflow: hidden; }
dialog.edx::backdrop { background: var(--ed-backdrop); }
.edx-top { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; background: var(--ed-bar); border-bottom: 1px solid var(--line); }
.edx-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 260px; }
.edx-titles { display: grid; min-width: 0; line-height: 1.25; }
.edx-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edx-sub { font-size: 12px; color: var(--muted); }
.edx-tools { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
/* Centered when there is room, but never clipped at the start when there is not. */
.edx-tools > :first-child { margin-left: auto; }
.edx-tools > :last-child { margin-right: auto; }
.edx-tools::-webkit-scrollbar { display: none; }
.edx-group { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--surface-2); flex: none; }
.edx-tool { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: background-color 0.12s, color 0.12s; }
.edx-tool:hover { background: var(--surface); color: var(--text); }
.edx-tool.on { background: var(--accent); color: var(--accent-ink); }
.edx-tool:focus-visible, .edx-tbtn:focus-visible, .edx-cbtn:focus-visible, .edx-mbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.edx-right { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.edx-right .btn.primary { margin-left: 8px; }
.edx-right .btn.on { background: var(--accent-soft); color: var(--accent-text); }
.edx-zoom { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; }
.edx-zoom .btn { min-height: 32px; width: 32px; }
.edx-zoomlabel { min-width: 52px; border: 0; background: none; color: var(--text); font: 600 13px/1 var(--font); font-variant-numeric: tabular-nums; cursor: pointer; padding: 8px 4px; }

.edx-context { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 4px 12px; background: var(--ed-bar); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.edx-context > * { flex: none; }
.edx-hint { color: var(--muted); font-size: 14px; padding: 0 4px; white-space: nowrap; }
.edx-grow { flex: 1 1 auto; }
.edx-csep { width: 1px; height: 24px; margin: 0 4px; background: var(--line); }
.edx-tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: 600 15px/1 var(--font); cursor: pointer; }
.edx-tbtn:hover { background: var(--surface-2); }
.edx-tbtn.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent-text); }
.edx-select, .edx-input { height: 32px; min-height: 32px; padding: 0 8px; border-radius: 8px; font-size: 14px; width: auto; }
.edx-select.font { width: 132px; }
.edx-select.wide { width: 200px; }
.edx-input { width: 160px; }
.edx-size { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; height: 32px; }
.edx-size .edx-tbtn { height: 30px; min-width: 28px; padding: 0 4px; }
.edx-size input { width: 40px; height: 30px; min-height: 30px; border: 0; padding: 0; text-align: center; font-size: 14px; background: transparent; -moz-appearance: textfield; }
.edx-size input::-webkit-inner-spin-button { display: none; }
.edx-cbtn, .edx-mbtn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); font-size: 13px; cursor: pointer; }
.edx-cbtn:hover, .edx-mbtn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.edx-chip { width: 18px; height: 18px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px var(--ed-ring); }
.edx-chip.none { background: linear-gradient(135deg, transparent 45%, var(--danger) 45% 55%, transparent 55%), var(--surface); }
.edx-cbtn-label { color: var(--muted); }
.edx-slider { display: grid; grid-template-columns: auto minmax(100px, 1fr) 52px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.edx-slider output { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.edx-context .edx-slider { min-width: 280px; }
.edx-warn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.edx-warn svg { color: var(--danger); }

.edx-pop { position: absolute; z-index: 5; min-width: 220px; max-width: 320px; padding: 12px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); display: grid; gap: 12px; }
.edx-pop[hidden] { display: none; }
.edx-pop-title { margin: 0; font-size: 13px; font-weight: 650; color: var(--muted); }
.edx-colors { display: grid; gap: 12px; }
.edx-swatches { display: grid; grid-template-columns: repeat(8, 24px); gap: 8px; }
.edx-swatch { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 0; background: var(--sw); box-shadow: inset 0 0 0 1px var(--ed-ring); cursor: pointer; }
.edx-swatch.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.edx-swatch.none { background: linear-gradient(135deg, transparent 45%, var(--danger) 45% 55%, transparent 55%), var(--surface-2); }
.edx-recent { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.edx-custom { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.edx-custom .edx-pop-title { margin: 0; }
.edx-menu { display: grid; gap: 2px; }
.edx-fontbtn { min-width: 160px; justify-content: space-between; font-size: 14px; }
.edx-fontbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.edx-fontsearch { width: 100%; }
.edx-fontcats { display: flex; flex-wrap: wrap; gap: 4px; }
.edx-fontcats button { padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.edx-fontcats button.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.edx-fontlist { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.edx-fontopt { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; text-align: left; }
.edx-fontopt span { font-size: 18px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edx-fontopt small { flex: none; font-size: 11px; color: var(--muted); }
.edx-fontopt:hover, .edx-fontopt.on { background: var(--surface-2); }
.edx-pop:has(.edx-fontlist) { width: 300px; max-width: 300px; }
.edx-menu button { text-align: left; padding: 8px; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; font-size: 14px; }
.edx-menu button:hover, .edx-menu button.on { background: var(--surface-2); }
.edx-help dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 13px; max-height: 56vh; overflow: auto; }
.edx-help dd { margin: 0; color: var(--muted); }
.edx-help kbd { font: 600 11px/1 var(--mono); padding: 4px 8px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); white-space: nowrap; }
.edx-help-note { margin: 0; font-size: 12px; color: var(--muted); }

.edx-body { display: grid; grid-template-columns: 120px minmax(0, 1fr) 0; min-height: 0; }
dialog.edx.drawer-open .edx-body { grid-template-columns: 120px minmax(0, 1fr) 288px; }
.edx-rail { display: flex; flex-direction: column; min-height: 0; background: var(--ed-bar); border-right: 1px solid var(--line); }
.edx-thumbs { flex: 1 1 auto; overflow-y: auto; padding: 12px; display: grid; gap: 12px; align-content: start; }
.edx-thumb { display: grid; gap: 4px; justify-items: center; padding: 4px; border: 2px solid transparent; border-radius: 8px; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.edx-thumb:hover { border-color: var(--line-strong); }
.edx-thumb.on { border-color: var(--accent); color: var(--text); }
.edx-thumb-img { width: 88px; height: auto; display: block; border-radius: 2px; box-shadow: var(--ed-thumb-shadow); background: var(--ed-page); }
/* Page strip: each page has its own menu (the ⋯ button or a right-click),
   pages drag to reorder, and "Add page" sits at the end. */
.edx-thumb-wrap { position: relative; border-radius: 10px; }
.edx-thumb-wrap .edx-thumb { width: 100%; }
.edx-thumb-wrap.dragging { opacity: 0.45; }
.edx-thumb-wrap.drop-before::before, .edx-thumb-wrap.drop-after::after { content: ''; position: absolute; left: 4px; right: 4px; height: 3px; border-radius: 3px; background: var(--accent); }
.edx-thumb-wrap.drop-before::before { top: -8px; }
.edx-thumb-wrap.drop-after::after { bottom: -8px; }
.edx-thumb-more { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.edx-thumb-wrap:hover .edx-thumb-more, .edx-thumb-wrap.on .edx-thumb-more, .edx-thumb-more:focus-visible, .edx-thumb-more[aria-expanded='true'] { opacity: 1; }
.edx-thumb-more:hover { background: var(--surface-2); }
@media (hover: none) { .edx-thumb-more { opacity: 1; } }
.edx-addpage { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.edx-addpage:hover { border-color: var(--accent); color: var(--text); background: var(--surface-2); }
.edx-pagepill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; }
.edx-pagepill:hover, .edx-pagepill[aria-expanded='true'] { background: var(--surface-2); }

/* Menus */
.menu { min-width: 220px; max-height: min(420px, 70vh); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); outline: none; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.menu-item > span:not(.menu-gap) { flex: 1; }
.menu-item > svg { flex: none; color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }
.menu-item.current { font-weight: 650; }
.menu-item.danger, .menu-item.danger > svg { color: var(--danger); }
.menu-item:disabled { background: none; color: var(--line-strong); cursor: not-allowed; }
.menu-item:disabled > svg { color: var(--line-strong); }
.menu-gap { width: 16px; flex: none; }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.menu-heading { margin: 6px 10px 4px; font-size: 13px; font-weight: 650; color: var(--muted); }
.edx-main { position: relative; min-width: 0; min-height: 0; }
.edx-stage { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; padding: 32px; }
.edx-page { position: relative; margin: auto; line-height: 0; }
.edx-canvas { display: block; background: var(--ed-page); box-shadow: var(--ed-page-shadow); touch-action: none; cursor: crosshair; outline: none; }
.edx-canvas[data-tool='select'] { cursor: default; }
.edx-canvas[data-tool='hand'] { cursor: grab; }
.edx-canvas[data-tool='text'] { cursor: text; }
.edx-inline { position: absolute; z-index: 2; margin: 0; padding: 0; border: 1px dashed var(--ed-select); border-radius: 2px; background: var(--ed-typing); resize: none; overflow: hidden; min-height: 1.4em; outline: none; line-height: 1.25; }
.edx-inline.note { padding: 8px; border: 1px solid var(--note-line); border-radius: 8px; background: var(--note-bg); color: var(--note-ink); font: 15px/1.4 var(--font); box-shadow: var(--shadow); }
.edx-pagenav { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--ed-bar); box-shadow: var(--shadow); font-size: 13px; font-variant-numeric: tabular-nums; }
.edx-pagenav:empty { display: none; }
.edx-drawer { min-height: 0; overflow-y: auto; background: var(--ed-bar); border-left: 1px solid var(--line); }
dialog.edx:not(.drawer-open) .edx-drawer { display: none; }
.edx-sec { padding: 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.edx-sec h3 { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: normal; color: var(--muted); }
.edx-btnrow { display: flex; flex-wrap: wrap; gap: 2px; }
.edx-geo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.edx-num { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.edx-num input { min-height: 32px; height: 32px; padding: 0 8px; font-size: 14px; }
.edx-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.edx-link { border: 0; background: none; padding: 0; color: var(--accent-text); font-size: 12px; font-weight: 600; cursor: pointer; }
.edx-layers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.edx-layers li { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 4px; border: 1px solid transparent; border-radius: 8px; }
.edx-layers li:hover { background: var(--surface-2); }
.edx-layers li.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.edx-layers li.off .edx-layer-name { color: var(--muted); text-decoration: line-through; }
.edx-layers li.dragging { opacity: 0.4; }
.edx-layers li.drop { border-color: var(--accent); }
.edx-layers li .btn { min-height: 28px; width: 28px; }
.edx-grip { display: grid; color: var(--muted); cursor: grab; }
.edx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sw); flex: none; box-shadow: inset 0 0 0 1px var(--ed-ring); }
.edx-dot.none { background: none; }
.edx-layer-ic { color: var(--muted); display: grid; }
.edx-layer-name { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: var(--text); padding: 8px 4px; font: 14px/1.3 var(--font); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edx-rename { flex: 1; min-width: 0; height: 30px; min-height: 30px; }
.edx-empty { margin: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 1279px) {
  .edx-top { flex-wrap: wrap; row-gap: 8px; }
  .edx-tools { order: 3; flex-basis: 100%; }
  .edx-right { margin-left: auto; }
}
@media (max-width: 900px) {
  .edx-left { flex: 0 0 auto; }
  .edx-titles { display: none; }
  .edx-top { flex-wrap: wrap; }
  .edx-tools { order: 3; flex-basis: 100%; }
  .edx-right { margin-left: auto; }
  .edx-zoom { display: none; }
  .edx-body, dialog.edx.drawer-open .edx-body { grid-template-columns: minmax(0, 1fr); }
  .edx-rail { display: none; }
  dialog.edx.drawer-open .edx-drawer { position: absolute; right: 0; bottom: 0; left: 0; max-height: 50dvh; z-index: 4; border-left: 0; border-top: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .edx-stage { padding: 16px; }
}
@media (max-width: 640px) {
  .edx-top { padding: 8px; gap: 8px; }
  .edx-tools { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; gap: 4px; }
  .edx-tools::-webkit-scrollbar, .edx-context::-webkit-scrollbar { display: none; }
  .edx-tools > :first-child, .edx-tools > :last-child { margin: 0; }
  .edx-tools > * { flex: none; }
  .edx-tool { width: 40px; height: 40px; }
  .edx-context { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 8px; gap: 8px; }
  .edx-context > * { flex: none; }
  .edx-context .edx-hint { white-space: nowrap; }
  .edx-context .edx-grow { display: none; }
  .edx-context .edx-slider { min-width: 160px; }
  .edx-pop { max-width: calc(100vw - 16px); }
  .edx-right .btn.primary { margin-left: 4px; }
}

.swatch { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--swatch); cursor: pointer; }
.swatch.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.swatch.none { background: linear-gradient(135deg, transparent 45%, var(--danger) 45% 55%, transparent 55%), var(--surface); }

/* Signature */
.sig-body { display: grid; gap: 12px; margin: 4px 0 12px; }
.sig-stage { position: relative; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.sig-pad { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.sig-baseline { position: absolute; left: 6%; right: 6%; bottom: 24%; border-bottom: 1px dashed var(--paper-grid); pointer-events: none; }
.sig-typed { padding: 24px 28px; min-height: 120px; font-size: 52px; line-height: 1.4; color: var(--sig-ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sig-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; padding: 4px; }
.sig-font { display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--sig-ink); font-size: 26px; line-height: 1.2; cursor: pointer; overflow: hidden; }
.sig-font span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sig-font:hover { border-color: var(--line-strong); }
.sig-font.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.sig-upload { display: block; max-width: 100%; max-height: 240px; margin: 0 auto; }
.sig-card { display: grid; gap: 16px; margin-top: 16px; }
.sig-frame { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; max-width: 420px; }
.sig-preview { display: block; max-width: 100%; max-height: 96px; }
.sign-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }

/* Downloads */
.dl-files { display: grid; gap: 8px; }
.dl-file > span { display: grid; gap: 2px; }
.dl-hint { display: block; }
.dl-formats { margin-bottom: 4px; }
.dl-name { overflow-wrap: anywhere; }

/* Reports and letters */
.kept-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; }
.kept-copy p { margin: 0; flex: 1 1 260px; }
.kept-copy svg { color: var(--accent-text); }
.slots { margin-top: 12px; }
.checks + .slots { padding-top: 16px; border-top: 1px solid var(--line); }
.slots-title { margin: 0 0 8px; font-weight: 650; }
.slots ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.slot-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.slot-text { display: grid; gap: 2px; min-width: 0; }
@media (max-width: 480px) { .slot { grid-template-columns: auto minmax(0, 1fr); } .slot .btn { grid-column: 1 / -1; } }
.formal-tools { display: flex; justify-content: flex-end; margin-top: 4px; }
.formal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 12px 0; }
.formal-label { margin: 0 0 4px; font-weight: 650; font-size: 14px; color: var(--muted); }
.formal-before { white-space: pre-wrap; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); min-height: 100%; overflow-wrap: anywhere; }
.formal-after { width: 100%; min-height: 160px; }
.formal-changes { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
@media (max-width: 640px) { .formal-grid { grid-template-columns: minmax(0, 1fr); } }
.kind-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-chip { position: relative; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 15px; font-weight: 550; line-height: 1.3; }
.kind-chip:hover { border-color: var(--accent); }
.kind-chip input { position: absolute; opacity: 0; pointer-events: none; }
.kind-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kind-chip:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.reason-picker { display: grid; gap: 16px; }
.custom-reason { display: grid; gap: 4px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.docs-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-kind { max-width: 240px; }
.scan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; margin: 12px 0; }
.scan-stage { background: var(--surface-2); border-radius: 12px; padding: 12px; text-align: center; max-height: 64vh; overflow: auto; }
.scan-canvas { max-width: 100%; height: auto; touch-action: none; box-shadow: var(--shadow); }
.scan-controls { display: grid; gap: 12px; align-content: start; }
.scan-controls .segmented { margin: 0; }
@media (max-width: 860px) { .scan-layout { grid-template-columns: minmax(0, 1fr); } }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.guide-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
.guide-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 17px; }
.guide-body h3 { margin: 4px 0 4px; font-size: 18px; }
.guide-body p { margin: 0 0 8px; max-width: 68ch; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.guide-tile { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.guide-tile h3 { margin: 0 0 4px; font-size: 16px; }
.guide-tile p { margin: 0; font-size: 15px; color: var(--muted); }
.guide-links, .helplines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.guide-links li { display: grid; gap: 2px; }
.helplines li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.helplines li:first-child { border-top: 0; padding-top: 0; }
.helplines li > div:first-child { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.helpline-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.exhibit-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.exhibit-card { display: grid; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); transition: border-color 0.15s, background-color 0.15s; }
.exhibit-card.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.exhibit-preview { display: block; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); cursor: zoom-in; height: 168px; }
.exhibit-thumb { display: block; width: 100%; height: 168px; object-fit: cover; object-position: top; }
.exhibit-pick { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-weight: 600; line-height: 1.35; }
.exhibit-pick input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.exhibit-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; }
.sheets-wrap { display: grid; gap: 8px; min-width: 0; }
.sheets-count { margin: 0; }
.sheets { display: grid; gap: 24px; justify-items: center; padding: 24px 16px 32px; }
.sheet { margin: 0; display: grid; gap: 8px; justify-items: center; width: 100%; max-width: calc(760px * var(--zv, 1)); }

/* Pan-and-zoom viewer for page previews */
.zv { display: grid; gap: 8px; min-width: 0; }
.zv-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.zv-controls { display: flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.zv-controls .btn.icon-only { width: 36px; height: 36px; min-height: 36px; padding: 0; }
.zv-pct { min-width: 56px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
.zv-pct:hover { background: var(--surface-2); }
.zv-port { position: relative; overflow: auto; height: clamp(420px, calc(100dvh - 220px), 1400px); border-radius: 16px; background: var(--ed-backdrop); touch-action: pan-x pan-y; outline: none; }
.zv-port:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.zv-port.zoomed { cursor: grab; }
.zv-port.dragging { cursor: grabbing; user-select: none; }
.zv-content { min-width: 100%; }
.zv-full { position: fixed; inset: 0; z-index: 60; grid-template-rows: auto minmax(0, 1fr); padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: var(--bg); }
.zv-full .zv-port { height: auto; }
html.zv-locked, html.zv-locked body { overflow: hidden; }
.sheet-page { width: 100%; height: auto; display: block; background: var(--ed-page); box-shadow: var(--ed-page-shadow); border-radius: 2px; }
.sheet figcaption { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .sheets { padding: 12px 8px 16px; gap: 16px; } .zv-port { border-radius: 12px; } }
.ssn-row { display: flex; gap: 8px; align-items: center; }
.ssn-row input { flex: 1 1 auto; max-width: 240px; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.check-help { margin: 4px 0 0 32px; }
.report-tabs { display: grid; gap: 16px; margin-bottom: 20px; }
.report-tab-group { display: grid; gap: 8px; justify-items: start; }
.report-tab-label { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.report-other { max-width: 360px; }
.report-tab-group .tabs { margin-bottom: 0; }
.report-other.on { border-color: var(--accent); }
.sample-banner { display: flex; gap: 12px; padding: 16px 20px; margin-bottom: 16px; border-radius: 12px; background: var(--accent-soft); color: var(--text); }
.sample-banner svg { flex: none; margin-top: 2px; color: var(--accent-text); }
.sample-banner p { margin: 4px 0 12px; color: var(--muted); }
.sample-banner .actions { margin: 0; }
.sample-pages { opacity: 0.85; }
.exhibit-auto { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- lock screen ---------- */

.lock-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.lock-card { width: min(420px, 100%); background: var(--surface); color: var(--text); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 8px; text-align: center; }
.lock-card .field { text-align: left; margin-top: 12px; }
.lock-mark { display: block; width: 64px; height: 64px; margin: 0 auto 8px; }
.lock-card .btn.ghost { margin-top: 8px; color: var(--muted); font-weight: 500; }

/* ---------- toast ---------- */

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 200; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- print ---------- */

#print-root { display: none; }
.summary-doc table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
.summary-doc th, .summary-doc td { border: 1px solid var(--paper-grid); padding: 4px 8px; text-align: left; vertical-align: top; }
.summary-doc h1 { font-size: 22px; }
.summary-doc h2 { font-size: 16px; margin: 20px 0 8px; }

/* One rhythm inside cards and dialogs: 16px between blocks, so nothing new
   ends up touching its neighbour. Kept late in the file so it wins over
   component margins of the same weight (fields, lists). */
.card > * + *, .modal-body > * + * { margin-top: 16px; }
.card > .card-title + * { margin-top: 0; }
.card > :last-child, .modal-body > :last-child { margin-bottom: 0; }
.card > .help, .modal-body > .help, .modal-body > p { margin-bottom: 0; }
.field .check { font-weight: 400; }
.field .check + .help { margin-top: 0; }

/* Phones and small tablets */
.tabs { flex-wrap: wrap; overflow: visible; }
.tab { white-space: nowrap; }
@media (max-width: 640px) {
  .card { padding: 20px 16px; }
  .card-title { margin-bottom: 16px; }
  .page-head { align-items: stretch; }
  .page-actions { width: 100%; }
  .page-actions > .btn { flex: 1 1 auto; justify-content: center; }
  .tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); width: 100%; }
  .tab { justify-content: center; white-space: normal; text-align: center; min-height: 44px; }
  .segmented { border: 0; gap: 8px; overflow: visible; border-radius: 0; }
  .segmented label { flex: 1 1 auto; text-align: center; border: 1px solid var(--line-strong); border-radius: 10px; }
  .segmented label:last-child { border-right: 1px solid var(--line-strong); }
  .actions.end { justify-content: stretch; }
  .actions.end > .btn { flex: 1 1 auto; justify-content: center; }
  .modal-body { padding: 20px 16px; }
  .modal-head { padding: 12px 16px; }
  dialog.modal { width: calc(100% - 16px); max-height: calc(100% - 16px); }
  /* Tables become a stack of small cards. */
  .table-wrap { border: 0; overflow: visible; }
  .table, .table tbody, .table tr, .table td, .table th[scope='row'] { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; background: var(--surface); }
  .table td, .table th[scope='row'] { border: 0; padding: 4px 0; text-align: left; }
  .table td[data-label] { display: grid; grid-template-columns: minmax(88px, 38%) minmax(0, 1fr); gap: 12px; align-items: baseline; }
  .table td[data-label]::before { content: attr(data-label); font-size: 13px; font-weight: 600; color: var(--muted); }
  .table tr > :first-child { display: block; font-size: 16px; padding: 4px 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .table tr > :first-child::before { display: none; }
  .table td:empty, .table td[data-label='']::before { display: none; }
  .table .row-actions { display: flex; gap: 4px; justify-content: flex-end; }
  .table .num { text-align: left; }
}
@media (max-width: 380px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .card { padding: 16px 12px; }
}

/* Touch screens: scrolling only (no pinch or double-tap zoom), and form
   text at 16px or more, below which iPhones zoom in when a box is tapped. */
html { touch-action: pan-x pan-y; }
@media (pointer: coarse) {
  input, select, textarea, .edx-select, .edx-input, .edx-size input, .edx-num input { font-size: 16px !important; }
}


/* ---------- Bearing's own controls (controls.js) ---------- */
.float { position: fixed; z-index: 1000; color: var(--text); }
/* Undo the browser's popover box; each panel draws its own. */
.float[popover], .tip[popover] { inset: auto; margin: 0; }

/* Date field and calendar */
.dp { position: relative; width: 100%; }
.dp .dp-input { padding-right: 48px; font-variant-numeric: tabular-nums; }
.dp-input[aria-invalid='true'] { border-color: var(--danger); }
.dp-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.dp-btn:hover, .dp-btn[aria-expanded='true'] { background: var(--surface-2); color: var(--text); }
.cal { width: 312px; max-width: calc(100vw - 16px); overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); display: grid; gap: 8px; }
.cal-head { display: flex; align-items: center; gap: 4px; }
.cal-title { flex: 1; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-transform: capitalize; }
.cal-nav { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; }
.cal-nav:first-child svg { transform: none; }
.cal-title:hover, .cal-nav:hover { background: var(--surface-2); }
.cal-grid { display: grid; gap: 2px; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 650; color: var(--muted); padding: 4px 0; text-transform: capitalize; }
.cal-day { width: 100%; aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
.cal-day:hover { background: var(--surface-2); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-day.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cal-day:disabled { background: transparent; color: var(--line-strong); cursor: not-allowed; text-decoration: line-through; }
.cal-day:focus-visible, .cal-pick:focus-visible, .cal-nav:focus-visible, .cal-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cal-pick { height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-transform: capitalize; }
.cal-pick:hover { background: var(--surface-2); }
.cal-pick.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cal-foot { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); }

/* Dropdown */
.sel { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; text-align: left; transition: border-color 0.15s; }
.sel > svg { flex: none; color: var(--muted); transition: transform 0.15s; }
.sel[aria-expanded='true'] > svg { transform: rotate(180deg); }
.sel:hover { border-color: var(--muted); }
.sel:focus-visible, .sel[aria-expanded='true'] { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent); }
.sel-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-list { max-height: min(360px, 60vh); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); outline: none; max-width: min(440px, calc(100vw - 16px)); }
.sel-group { padding: 10px 10px 4px; font-size: 13px; font-weight: 650; color: var(--muted); }
.sel-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--text); }
.sel-opt.active { background: var(--surface-2); }
.sel-opt[aria-selected='true'] { font-weight: 650; color: var(--accent-text); }
.edx-select.sel { height: 32px; min-height: 32px; padding: 0 8px; border-radius: 8px; font-size: 14px; width: auto; }
.report-other.sel.on { border-color: var(--accent); }

/* Color picker */
.cp { display: grid; gap: 10px; width: 232px; }
.cp-sv { position: relative; height: 140px; border-radius: 10px; background: linear-gradient(to top, var(--picker-black), transparent), linear-gradient(to right, var(--picker-white), var(--hue, var(--accent))); cursor: crosshair; touch-action: none; outline: none; }
.cp-hue { position: relative; height: 14px; border-radius: 999px; background: var(--picker-hues); cursor: pointer; touch-action: none; outline: none; }
.cp-sv:focus-visible, .cp-hue:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.cp-dot, .cp-knob { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; border: 2px solid var(--picker-white); box-shadow: var(--shadow); }
.cp-dot { width: 16px; height: 16px; }
.cp-knob { top: 50%; width: 18px; height: 18px; background: var(--picker-knob); }
.cp-row { display: flex; gap: 8px; align-items: center; }
.cp-preview { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-strong); flex: none; }
input.cp-hex { flex: 1; min-height: 32px; height: 32px; padding: 0 8px; font-family: var(--mono); font-size: 14px; }

/* Tooltips */
.tip { position: fixed; z-index: 1100; max-width: 260px; padding: 6px 10px; border: 0; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 13px; line-height: 1.35; pointer-events: none; box-shadow: var(--shadow-lg); }

/* Checkboxes and radio buttons */
input[type='checkbox'], input[type='radio'] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 2px 0 0; flex: none; display: inline-grid; place-content: center; border: 1.5px solid var(--line-strong); background: var(--bg); cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
input[type='checkbox'] { border-radius: 6px; }
input[type='radio'] { border-radius: 50%; }
input[type='checkbox']::before { content: ''; width: 10px; height: 6px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: translate(0, -1px) rotate(-45deg) scale(0); transition: transform 0.12s; }
input[type='radio']::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); transform: scale(0); transition: transform 0.12s; }
input[type='checkbox']:checked, input[type='radio']:checked { background: var(--accent); border-color: var(--accent); }
input[type='checkbox']:checked::before { transform: translate(0, -1px) rotate(-45deg) scale(1); }
input[type='radio']:checked::before { transform: scale(1); }
input[type='checkbox']:hover, input[type='radio']:hover { border-color: var(--accent); }
input[type='checkbox']:focus-visible, input[type='radio']:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
input[type='checkbox']:disabled, input[type='radio']:disabled { background: var(--surface-2); border-color: var(--line); cursor: not-allowed; }

/* Sliders */
input[type='range'] { appearance: none; -webkit-appearance: none; background: transparent; height: 24px; cursor: pointer; }
input[type='range']::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--line-strong); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); box-shadow: var(--shadow); }
input[type='range']::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line-strong); }
input[type='range']::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
input[type='range']:focus-visible { outline: none; }
input[type='range']:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }

/* Search boxes and number fields: no browser buttons inside them */
input[type='search']::-webkit-search-cancel-button, input[type='search']::-webkit-search-decoration { -webkit-appearance: none; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }

/* Accordions: one look everywhere */
.acc-list { display: grid; gap: 8px; }
details.acc { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color 0.15s, background-color 0.15s; }
details.acc:hover { border-color: var(--line-strong); }
details.acc[open] { border-color: var(--line-strong); background: var(--surface-2); }
details.acc > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; cursor: pointer; font-weight: 650; font-size: 16px; border-radius: 12px; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: ''; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform 0.2s; }
details.acc[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
details.acc > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
details.acc > p { margin: 0; padding: 0 16px 16px; max-width: 72ch; color: var(--text); }


/* Sidebar: privacy card, theme and language switches */
.privacy-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.privacy-head { display: flex; gap: 12px; align-items: flex-start; }
.privacy-head p { margin: 0; }
.privacy-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--good-soft); color: var(--good); }
.privacy-title { font-weight: 700; font-size: 15px; }
.privacy-text { font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.privacy-rows { display: grid; gap: 2px; }
.privacy-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; color: var(--muted); font-size: 13px; text-decoration: none; }
.privacy-row:hover { background: var(--surface); color: var(--text); }
.privacy-label { flex: 1; }
.privacy-value { font-weight: 650; }
.privacy-value.tone-good { color: var(--good); }
.privacy-value.tone-warn { color: var(--warn); }
.privacy-value.tone-muted { color: var(--muted); }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Search: the button and the window */
.search-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; margin: 0 0 12px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.search-btn span { flex: 1; }
.search-btn:hover { border-color: var(--line-strong); color: var(--text); }
.search-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.search-btn kbd, .search-esc { font: inherit; font-size: 12px; padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--muted); }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
dialog.search-dialog { width: 100%; max-width: 640px; box-sizing: border-box; max-height: min(620px, calc(100dvh - 48px)); margin: 8vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; }
dialog.search-dialog:not([open]) { display: none; }
dialog.search-dialog::backdrop { background: var(--scrim); }
.search-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
input.search-input { flex: 1; min-height: 44px; border: 0; background: transparent; font-size: 17px; padding: 0; box-shadow: none; }
input.search-input:focus { box-shadow: none; }
.search-results { flex: 1; overflow-y: auto; padding: 8px; }
.search-group { margin: 8px 8px 4px; font-size: 13px; font-weight: 650; color: var(--muted); }
.search-opt { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; }
.search-opt.active { background: var(--surface-2); }
.search-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); color: var(--accent-text); }
.search-opt.active .search-ic { background: var(--surface); }
.search-text { display: grid; min-width: 0; }
.search-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 24px 16px; text-align: center; color: var(--muted); margin: 0; }
.search-hint { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { dialog.search-dialog { margin-top: 12px; } .search-hint { display: none; } }


/* Fill in About you from a document */
.fill-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.fill-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.fill-text { flex: 1 1 260px; min-width: 0; }
.fill-text p { margin: 0; }
.fill-title { font-weight: 700; }
.fill-text .muted { margin-top: 4px; }
.fill-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.fill-rows li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.fill-rows label { display: grid; gap: 2px; cursor: pointer; min-width: 0; }
.fill-label { font-size: 13px; color: var(--muted); }
.fill-value { font-weight: 650; overflow-wrap: anywhere; }
.fill-now { font-size: 13px; color: var(--warn); }

@media print {
  @page { margin: 0.75in; }
  :root { --paper: #fffffe; --paper-ink: #111214; --paper-rule: #111214; --paper-grid: #9a9ea6; }
  body { background: var(--paper); color: var(--paper-ink); }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  #print-root .letter-paper { box-shadow: none; padding: 0; max-width: none; font-size: 11.5pt; border-radius: 0; }
  .exhibit-page { break-before: page; text-align: center; }
  .exhibit-label { font: 600 11pt/1.4 var(--serif); text-align: left; border-bottom: 1px solid var(--paper-rule); padding-bottom: 4px; margin-bottom: 12px; color: var(--paper-ink); }
  .exhibit-page img { max-width: 100%; max-height: 9in; object-fit: contain; }
  .summary-doc { color: var(--paper-ink); }
}

/* Website build: the readable summary in index.html that the app replaces. */
.prerender { max-width: 680px; margin: 0 auto; padding: 48px 16px; }
.prerender h1 { margin-bottom: 12px; }
.prerender ul { padding-left: 20px; }
.prerender li { margin: 6px 0; }
