/* ARSchive: styles. See BRAND.md. No build step. */

:root {
  /* ARSchive palette (see BRAND.md) */
  --paper: #F3F4F1;          /* Mist: app background */
  --sheet: #FFFFFF;
  --sheet-tint: #F8F9F7;
  --ink: #111C1B;
  --ink-soft: #3D4A48;
  --graphite: #5C6866;
  --rule: #E1E5E2;
  --rule-strong: #C7CECA;
  --accent: #0B5A4E;         /* Spruce: the one accent */
  --accent-dark: #08463D;
  --accent-tint: #E3F0EC;
  --accent-line: #BFDAD2;
  --night: #0F2C28;          /* Night spruce: top bar, toasts */
  --marigold: #F2B233;       /* The ARS highlight: mark and dark surfaces only */
  --brass: #A86B05;          /* Marigold, deepened for small marks on light surfaces */
  --red: #A3322A;
  --red-tint: #F9E9E6;
  --amber: #8A5A00;
  --amber-tint: #FCF2DB;
  --green: #22693D;
  --green-tint: #E3F1E7;
  --blue: #2B4C7E;
  --blue-tint: #E7EDF6;

  --display: "Inter Display", "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--display);
  --doc-heading: #0B4A41;   /* matches src/brand.js headingColor */
  --doc: Georgia, Gelasio, Cambria, "Times New Roman", serif;

  --r-sm: 8px;
  --r-md: 12px;
  --shadow: 0 1px 2px rgba(17, 28, 27, .04), 0 8px 24px rgba(17, 28, 27, .07);
  --focus: 0 0 0 4px rgba(11, 90, 78, .16);
  --maxw: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 650; color: var(--ink); margin: 0; line-height: 1.22; letter-spacing: -.012em; }
h1 { font-size: 28px; letter-spacing: -.022em; font-weight: 700; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 .75em; }
small, .small { font-size: 13px; }
.muted { color: var(--graphite); }
.soft { color: var(--ink-soft); }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }
.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }

:focus { outline: none; }
/* B-58: a solid 2px Spruce ring (8:1 on white, 7.5:1 on Mist) that survives forced colours; the halo is extra. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: var(--focus); border-radius: var(--r-sm); }

.skip-link { position: absolute; left: 12px; top: -48px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- App shell ---------- */
.topbar {
  background: var(--night);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  position: sticky; top: 0; z-index: 20;
  color: #fff;
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 32px;
}
.brand { display: flex; align-items: center; text-decoration: none; color: #fff; border-radius: var(--r-sm); }
.brand img { height: 30px; width: auto; }
.brand .brand-mark { display: none; }
.brand:hover { color: #fff; opacity: .92; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  text-decoration: none; color: rgba(255, 255, 255, .74); padding: 7px 12px; border-radius: 999px; font-weight: 500; font-size: 14.5px;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a[aria-current="page"] { color: var(--night); background: #fff; }
.topbar :focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; box-shadow: none; }
.user-menu { display: flex; align-items: center; gap: 12px; }
.user-menu .who { color: rgba(255, 255, 255, .72); font-size: 14px; }
.user-menu .btn.ghost { --fg: rgba(255, 255, 255, .85); }
.user-menu .btn.ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #fff; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--marigold); color: var(--night);
  display: grid; place-items: center; font-weight: 700; font-size: 12.5px;
}

main { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 80px; }
main:focus { box-shadow: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .eyebrow { margin-bottom: 6px; }
.page-head p { margin: 6px 0 0; color: var(--ink-soft); }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); font-weight: 600; }
.crumbs { font-size: 14px; color: var(--graphite); margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--graphite); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards & sections ---------- */
.card {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md);
  padding: 24px;
}
.card + .card, .section + .section { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head p { margin: 4px 0 0; color: var(--graphite); font-size: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 20px 24px 0; margin-bottom: 12px; }
.card.quiet { background: var(--sheet-tint); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.stack > * + * { margin-top: 20px; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--sheet); --fg: var(--ink); --bd: var(--rule-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 16px; border-radius: var(--r-sm);
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font: 500 14px/1.2 var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--sheet-tint); color: var(--fg); border-color: var(--graphite); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { --bg: var(--accent); --fg: #fff; --bd: var(--accent); }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.danger { --fg: var(--red); }
.btn.danger:hover { background: var(--red-tint); border-color: var(--red); }
.btn.ghost { --bd: transparent; --bg: transparent; }
.btn.ghost:hover { background: var(--sheet-tint); border-color: var(--rule); }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn.small svg { width: 14px; height: 14px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--fg) transparent var(--fg) transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2, .form-grid .field.wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label, fieldset > legend { font-weight: 600; font-size: 14px; color: var(--ink); padding: 0; }
.req { color: var(--red); margin-left: 2px; }
.help { font-size: 13px; color: var(--graphite); margin: 0; }
.error-text { font-size: 13px; color: var(--red); margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px;
  background: var(--sheet); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
  font: 15px/1.4 var(--sans);
  transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236B6658' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input:hover, select:hover, textarea:hover { border-color: var(--graphite); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--focus); outline: 2px solid var(--accent); outline-offset: 1px; }
[aria-invalid="true"] { border-color: var(--red) !important; }
input[disabled], select[disabled], textarea[disabled] { background: var(--sheet-tint); color: var(--graphite); }
.input-affix { position: relative; }
.input-affix .affix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--graphite); pointer-events: none; }
.input-affix input { padding-left: 26px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 400; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.checklist { border: 1px solid var(--rule-strong); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 8px; max-height: 260px; overflow: auto; background: var(--sheet); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.form-actions.left { justify-content: flex-start; }

.list-field { display: grid; gap: 12px; }
.list-item { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 16px; background: var(--sheet-tint); position: relative; }
.list-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.list-item-head .eyebrow { margin: 0; }
.subform { border: 1px dashed var(--rule-strong); border-radius: var(--r-md); padding: 16px; background: var(--sheet-tint); margin-top: 8px; }
.subform h4 { margin-bottom: 12px; }

/* ---------- Status chips & tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 20px; white-space: nowrap;
  background: var(--sheet-tint); color: var(--ink-soft); border: 1px solid var(--rule);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.draft { background: #EEF1EF; color: #4B5755; border-color: #E1E5E2; }
.chip.out_for_signature { background: var(--amber-tint); color: var(--amber); border-color: #F1DDAE; }
.chip.signed { background: var(--green-tint); color: var(--green); border-color: #C4DFCC; }
.chip.filed { background: var(--blue-tint); color: var(--blue); border-color: #CBD6E8; }
.chip.void { background: var(--red-tint); color: var(--red); border-color: #EDCAC4; text-decoration: line-through; }
.chip.overdue { background: var(--red-tint); color: var(--red); border-color: #EDCAC4; }
.chip.soon { background: var(--amber-tint); color: var(--amber); border-color: #F1DDAE; }
.chip.done { background: var(--green-tint); color: var(--green); border-color: #C4DFCC; }
.chip.plain::before { display: none; }
.tag { font-size: 12px; color: var(--graphite); border: 1px solid var(--rule); border-radius: 4px; padding: 0 6px; line-height: 18px; white-space: nowrap; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th {
  text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--graphite);
  background: var(--sheet-tint); padding: 10px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.ledger td { padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger tbody tr:hover td { background: #FAFBFA; }
.ledger td.actions-cell { text-align: right; white-space: nowrap; }
.ledger .ceased td { color: var(--graphite); }
.ledger a.row-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.ledger a.row-link:hover { color: var(--accent); text-decoration: underline; }
.card > .table-wrap { margin: 0 -24px -24px; border-top: 1px solid var(--rule); }
.card.flush > .table-wrap { margin: 0; }
.empty { padding: 28px 24px; text-align: center; color: var(--graphite); }
.empty h3 { font-family: var(--serif); color: var(--ink); margin-bottom: 6px; }

/* ---------- Definition lists ---------- */
dl.facts { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0; margin: 0; }
dl.facts dt, dl.facts dd { padding: 11px 0; border-bottom: 1px solid var(--rule); margin: 0; }
dl.facts dt { color: var(--graphite); font-size: 14px; }
dl.facts dd { white-space: pre-line; }
dl.facts > :nth-last-child(-n+2) { border-bottom: 0; }

/* ---------- Dashboard ---------- */
.entity-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.entity-card {
  display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink);
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 22px 24px;
  position: relative; transition: border-color .12s, box-shadow .12s;
}
.entity-card::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.entity-card:hover { border-color: var(--rule-strong); box-shadow: var(--shadow); color: var(--ink); }
.entity-card h3, .entity-card .ec-title { font-size: 19px; margin: 0; }
.entity-card .legal { color: var(--graphite); font-size: 14px; margin-top: 2px; }
.entity-card .meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; }
.entity-card .meta .label { font-size: 12px; color: var(--graphite); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.entity-card.add { border-style: dashed; align-items: center; justify-content: center; color: var(--accent); min-height: 170px; background: transparent; }
.entity-card.add::before { display: none; }
.entity-card.add svg { width: 22px; height: 22px; }
.count-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); font-weight: 600; font-size: 13px; }

/* Obligations list */
.duelist { list-style: none; margin: 0; padding: 0; }
.due {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 16px 24px; border-top: 1px solid var(--rule);
}
.duelist > .due:first-child { border-top: 0; }
.datebox { text-align: center; border: 1px solid var(--rule); border-radius: 8px; padding: 6px 0 7px; background: var(--sheet-tint); line-height: 1.1; }
.datebox .m { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--graphite); font-weight: 600; }
.datebox .d { font-family: var(--serif); font-size: 22px; font-weight: 600; margin-top: 2px; }
.datebox .y { font-size: 11px; color: var(--graphite); margin-top: 2px; }
.due.overdue .datebox { border-color: #EDCAC4; background: var(--red-tint); }
.due.overdue .datebox .d, .due.overdue .datebox .m { color: var(--red); }
.due.done .due-title { color: var(--ink-soft); }
.due.done .datebox { background: var(--sheet); }
.due.done .due-title { text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.due-title { font-weight: 600; }
.due-sub { color: var(--graphite); font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.due-basis { font-size: 13px; color: var(--graphite); margin-top: 4px; }
.due .actions { justify-content: flex-end; }

/* ---------- Tabs ---------- */
.entity-head { margin-bottom: 8px; }
.entity-head h1 { font-size: 28px; }
.entity-head .sub { color: var(--graphite); margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin: 22px 0 28px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 11px 14px; text-decoration: none; color: var(--ink-soft); font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.tabs a:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.segmented { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--sheet); }
.segmented button { border: 0; background: none; padding: 7px 14px; font: 500 14px var(--sans); color: var(--ink-soft); cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--rule-strong); }
.segmented button[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); font-weight: 600; }

/* ---------- Callouts ---------- */
.callout { border: 1px solid var(--accent-line); background: var(--accent-tint); border-radius: var(--r-md); padding: 18px 20px; }
.callout h3 { color: var(--accent-dark); margin-bottom: 6px; }
.callout.warn { background: var(--amber-tint); border-color: #F1DDAE; }
.callout.danger { background: var(--red-tint); border-color: #EDCAC4; }
.callout ol { margin: 8px 0 0; padding-left: 20px; }
.callout ol li { margin: 2px 0; }
.prepared-list { display: grid; gap: 10px; margin-top: 14px; }
.prepared-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 12px 14px; flex-wrap: wrap; }
.prepared-item a.title { font-weight: 600; color: var(--ink); text-decoration: none; }
.prepared-item a.title:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Template picker ---------- */
.picker-group + .picker-group { margin-top: 32px; }
.picker-group > h2 { margin-bottom: 4px; }
.picker-group > p { color: var(--graphite); margin-bottom: 14px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pick {
  display: flex; flex-direction: column; gap: 6px; text-align: left; text-decoration: none; color: var(--ink);
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 16px 18px; cursor: pointer; font: inherit;
}
.pick:hover { border-color: var(--accent); color: var(--ink); box-shadow: var(--shadow); }
.pick strong { font-weight: 600; }
.pick span { color: var(--graphite); font-size: 14px; }
.pick .tag { align-self: flex-start; margin-top: 4px; }

/* ---------- Wizard ---------- */
.stepper { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 28px; counter-reset: step; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--graphite); position: relative; padding-right: 12px; }
.stepper li::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); min-width: 12px; }
.stepper li:last-child::after { display: none; }
.stepper .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--rule-strong); background: var(--sheet); font-weight: 600; font-size: 13px; flex: none; }
.stepper li.done .n { background: var(--accent-tint); color: var(--accent); border-color: var(--accent-line); }
.stepper li.current { color: var(--ink); font-weight: 600; }
.stepper li.current .n { background: var(--accent); color: #fff; border-color: var(--accent); }
.stepper li a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.wizard-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.add-row { border-top: 1px solid var(--rule); margin-top: 20px; padding-top: 20px; }
.summary-block + .summary-block { margin-top: 22px; }
.summary-block h3 { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }

/* ---------- Resolution detail ---------- */
.res-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.res-head h1 { margin-bottom: 8px; }
.res-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--graphite); font-size: 14px; }
.side .card { padding: 20px; }
.side .card h3 { margin-bottom: 12px; font-size: 16px; }
.workflow { display: grid; gap: 8px; }
.workflow .btn { width: 100%; }
.progress { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; margin: 4px 0 12px; }
.progress > span { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.sig-list { list-style: none; margin: 0; padding: 0; }
.sig { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--rule); align-items: start; }
.sig:first-child { border-top: 0; }
.sig input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--green); margin: 1px 0 0; cursor: pointer; }
.sig .who { font-weight: 600; }
.sig .role { font-size: 13px; color: var(--graphite); }
.sig .when { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.sig .when input { min-height: 32px; padding: 4px 8px; font-size: 13px; width: 150px; }
.doc-links { display: grid; gap: 8px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.file-row:first-child { border-top: 0; }
.file-row svg { width: 18px; height: 18px; color: var(--graphite); flex: none; }
.file-row a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Document preview (looks like the Word document) ---------- */
.doc-stage { background: #E6E9E6; border-radius: var(--r-md); padding: 32px 24px; border: 1px solid var(--rule); }
.doc-page {
  background: #fff; max-width: 816px; margin: 0 auto; padding: 72px 84px 40px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 30px rgba(17,28,27,.10);
  font: 14.5px/1.6 var(--doc); color: #1C2230; min-height: 600px; display: flex; flex-direction: column;
}
.doc-body { flex: 1; }
.doc-page .d-title { text-align: center; text-transform: uppercase; font-size: 19px; font-weight: 700; letter-spacing: .04em; color: var(--doc-heading); margin: 0 0 8px; }
.doc-page .d-subtitle { text-align: center; font-size: 15px; margin: 0 0 6px; }
.doc-page .d-heading { font-size: 15px; font-weight: 700; color: var(--doc-heading); margin: 22px 0 8px; }
.doc-page .d-para { margin: 0 0 11px; }
.doc-page .d-para.center { text-align: center; } .doc-page .d-para.justify { text-align: justify; }
.doc-page .d-para.indent { padding-left: 36px; }
.doc-page .d-recital { margin: 0 0 11px; padding-left: 36px; text-align: justify; }
.doc-page .d-resolved { display: grid; grid-template-columns: 36px minmax(0, 1fr); margin: 0 0 11px; text-align: justify; }
.doc-page ul, .doc-page ol { margin: 0 0 11px; padding-left: 56px; }
.doc-page table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 13.5px; }
.doc-page th, .doc-page td { border: 1px solid #9C978A; padding: 5px 8px; text-align: left; vertical-align: top; }
.doc-page th { background: #EEF1EF; font-weight: 700; }
.doc-page .d-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 48px; margin: 26px 0 14px; }
.doc-page .d-sig .line { border-bottom: 1px solid #1C2230; height: 44px; }
.doc-page .d-sig .nm { margin-top: 4px; }
.doc-page .d-sig .rl { font-size: 13px; color: #4A5162; }
.doc-page .d-sig .dt { font-size: 13px; margin-top: 8px; }
.doc-page .d-note { color: #B42318; font-style: italic; font-size: 12.5px; margin: 0 0 11px; }
.doc-page .ph { color: #B42318; font-weight: 700; }
.doc-page .d-spacer { height: 18px; }
.doc-page .d-pagebreak { border: 0; border-top: 1px dashed #CFC8B8; margin: 28px -84px; position: relative; }
.doc-page .d-pagebreak::after { content: "Page break"; position: absolute; left: 50%; transform: translate(-50%, -50%); background: #fff; padding: 0 8px; font: 11px var(--sans); color: var(--graphite); }
.doc-foot { border-top: 1px solid #CFC8B8; margin-top: 40px; padding-top: 8px; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: #6B6658; }

/* ---------- Upload ---------- */
.dropzone {
  border: 1.5px dashed var(--rule-strong); border-radius: var(--r-md); padding: 26px 20px; text-align: center;
  background: var(--sheet-tint); color: var(--ink-soft); cursor: pointer; transition: background .12s, border-color .12s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-tint); }
.dropzone svg { width: 26px; height: 26px; margin: 0 auto 8px; color: var(--accent); }
.dropzone strong { color: var(--accent); }
.dropzone .file-chosen { margin-top: 8px; color: var(--ink); font-weight: 600; }

/* ---------- Auth screens ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-wrap { background:
  radial-gradient(1100px 520px at 50% -180px, rgba(11, 90, 78, .16), transparent 70%),
  radial-gradient(600px 300px at 100% 100%, rgba(242, 178, 51, .10), transparent 70%); }
.auth-card .brand-big { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; text-align: center; }
.auth-card .brand-big img { height: 52px; width: auto; }
.auth-card .brand-big .tag { border: 0; font: 500 15px/1.4 var(--sans); color: var(--ink-soft); padding: 0; letter-spacing: -.005em; }
.auth-card .card { padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card .intro { color: var(--ink-soft); margin-bottom: 22px; }
.auth-card form { display: grid; gap: 16px; }
.auth-foot { text-align: center; color: var(--graphite); font-size: 13px; margin-top: 22px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 200; max-width: min(420px, calc(100vw - 40px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start; background: var(--ink); color: #fff; border-radius: var(--r-md);
  padding: 12px 14px 12px 16px; box-shadow: 0 10px 30px rgba(17,28,27,.25); font-size: 14px; animation: toast-in .18s ease-out;
}
.toast.error { background: #7E2620; }
.toast.ok { background: var(--accent-dark); }
.toast p { margin: 0; flex: 1; }
.toast button { background: none; border: 0; color: rgba(255,255,255,.8); cursor: pointer; padding: 2px; border-radius: 4px; }
.toast button svg { width: 16px; height: 16px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Dialog ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 12px; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(17,28,27,.3); color: var(--ink); background: var(--sheet); }
dialog.modal::backdrop { background: rgba(17, 28, 27, .38); }
dialog.modal.wide { width: min(760px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.modal-body { padding: 18px 24px 4px; max-height: calc(100vh - 200px); overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; }

/* ---------- Misc ---------- */
.loading { padding: 60px 0; text-align: center; color: var(--graphite); }
.loading::before { content: ""; display: block; width: 22px; height: 22px; margin: 0 auto 12px; border-radius: 50%; border: 2px solid var(--rule-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--sheet-tint); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.kv:first-child { border-top: 0; }
.kv span:first-child { color: var(--graphite); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 160px; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 12px 24px; border-top: 1px solid var(--rule); font-size: 14px; }
.activity li:first-child { border-top: 0; }
.activity .ts { color: var(--graphite); font-variant-numeric: tabular-nums; }
.activity .act { font-weight: 600; }
.activity .detail { color: var(--ink-soft); word-break: break-word; }
.year-head { padding: 10px 24px; background: var(--sheet-tint); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--serif); font-weight: 600; }
.ledger td .sub { display: block; font-size: 13px; color: var(--graphite); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; flex-wrap: wrap; }
.section-title:first-child { margin-top: 0; }
.section-title p { margin: 4px 0 0; color: var(--graphite); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-page { padding: 48px 44px 32px; }
  .doc-page .d-pagebreak { margin: 28px -44px; }
}
@media (max-width: 680px) {
  body { font-size: 15px; }
  .topbar-inner { padding: 0 16px; gap: 12px; height: 56px; }
  .nav a { padding: 8px 9px; }
  .user-menu .who { display: none; }
  main { padding: 22px 16px 64px; }
  h1, .entity-head h1 { font-size: 23px; }
  .card { padding: 18px; }
  .card > .table-wrap { margin: 0 -18px -18px; }
  .card.flush > .card-head { padding: 16px 18px 0; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  dl.facts { grid-template-columns: minmax(0, 1fr); }
  dl.facts dt { border-bottom: 0; padding-bottom: 0; font-size: 13px; }
  dl.facts dd { padding-top: 2px; }
  .due { grid-template-columns: 52px minmax(0, 1fr); padding: 14px 18px; gap: 14px; }
  .due .actions { grid-column: 2; justify-content: flex-start; }
  .datebox .d { font-size: 19px; }
  .stepper li .lbl { display: none; }
  .stepper li.current .lbl { display: inline; }
  .doc-stage { padding: 12px; margin: 0 -4px; }
  .doc-page { padding: 28px 20px 20px; font-size: 13.5px; min-height: 0; }
  .doc-page .d-sigs { grid-template-columns: 1fr; gap: 24px; }
  .doc-page .d-pagebreak { margin: 22px -20px; }
  .doc-page .d-recital { padding-left: 20px; }
  .doc-page .d-resolved { grid-template-columns: 26px minmax(0, 1fr); }
  .activity li { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 18px; }
  .page-head { margin-bottom: 20px; }
  .ledger th, .ledger td { padding: 10px 12px; }
  .entity-cards { grid-template-columns: minmax(0, 1fr); }
  .toasts { right: 12px; left: 12px; bottom: 12px; max-width: none; }
  /* B-52: register tables stack as cards */
  table.stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { padding: 10px 16px; border-top: 1px solid var(--rule); }
  table.stack-sm tr:first-child { border-top: 0; }
  table.stack-sm td { border: 0 !important; padding: 3px 0 !important; text-align: left !important; display: grid; grid-template-columns: 38% minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
  table.stack-sm td > * { grid-column: 2; justify-self: start; }
  table.stack-sm td:not([data-label]) { display: block; }
  table.stack-sm td[data-label]::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 4; color: var(--graphite); font-size: 13px; }
  table.stack-sm td.actions-cell { justify-content: flex-start; padding-top: 6px !important; }
  table.stack-sm td.actions-cell::before { display: none; }
  table.stack-sm td:empty { display: none; }
  .top-search { display: none !important; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1; }
  .year-head { padding: 10px 18px; }
  .hide-sm { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition: none !important; }
}
@media print {
  .topbar, .tabs, .side, .no-print, .toasts { display: none !important; }
  body { background: #fff; }
  .doc-stage { background: none; border: 0; padding: 0; }
  .doc-page { box-shadow: none; padding: 0; }
}

/* Workflow timeline in the resolution side panel */
.stepper.timeline { flex-direction: column; gap: 0; margin: 0 0 16px; }
.stepper.timeline li { padding: 0 0 0 0; min-height: 34px; position: relative; }
.stepper.timeline li::after { content: ""; position: absolute; left: 12px; top: 26px; bottom: -6px; width: 1px; height: auto; min-width: 0; background: var(--rule-strong); }
.stepper.timeline li:last-child::after { display: none; }
.stepper.timeline li.done::after { background: #9CC7BA; }
.stepper.timeline .n { width: 25px; height: 25px; font-size: 12px; }
.stepper.timeline .n svg { width: 13px; height: 13px; }

/* ---------- Refinements after visual review ---------- */
.dropzone { display: block; }
.ledger th.num { text-align: right; }
.ledger td strong { white-space: nowrap; }
.due-sub a { text-decoration: none; font-weight: 500; }
.due-sub a:hover { text-decoration: underline; }
.entity-card .meta .open { text-align: right; white-space: nowrap; }
.entity-card .corpno { color: var(--graphite); font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ledger tr.highlight td { background: var(--accent-tint); }
@media (max-width: 960px) {
  .res-split > .side { order: -1; }
}
@media (max-width: 680px) {
  .brand .brand-word { display: none; }
  .brand .brand-mark { display: block; height: 32px; }
  .topbar-inner { gap: 8px; }
  .nav { gap: 0; min-width: 0; }
  .avatar { display: none; }
  .user-menu { gap: 0; }
  .res-head .actions { width: 100%; }
}
.table-wrap, .card, .modal-body { position: relative; }
@media (max-width: 680px) {
  .stepper li { padding-right: 6px; gap: 6px; flex: 0 0 auto; }
  .stepper li.current { flex: 1 1 auto; min-width: 0; }
  .stepper li::after { min-width: 4px; }
  .stepper li:not(.current)::after { display: none; }
  .stepper li.current .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stepper li a { gap: 6px; }
}
@media (max-width: 680px) {
  .doc-page .d-recital, .doc-page .d-resolved, .doc-page .d-para.justify { text-align: left; }
}
.stepper li .lbl { white-space: nowrap; }
::placeholder { color: #97A19E; opacity: 1; }

/* =====================================================================
   Import from existing documents (SPEC-IMPORT): Import tab, review, wording, start choice
   ===================================================================== */
main.wide, .wide-page .topbar-inner { max-width: 1440px; }
.untitled { font-style: italic; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--sheet-tint); border: 1px solid var(--rule); border-radius: 4px; padding: 0 4px; }

/* Status chips for imports and proposals */
.chip.imp-uploaded, .chip.pst-pending { background: #EEF1EF; color: #4B5755; border-color: #E1E5E2; }
.chip.imp-processing { background: var(--accent-tint); color: var(--accent); border-color: var(--accent-line); }
.chip.imp-processing::before { display: none; }
.chip.imp-ready { background: var(--amber-tint); color: var(--amber); border-color: #F1DDAE; }
.chip.imp-failed, .chip.pst-error { background: var(--red-tint); color: var(--red); border-color: #EDCAC4; }
.chip.imp-applied, .chip.pst-applied, .chip.pst-accepted { background: var(--green-tint); color: var(--green); border-color: #C4DFCC; }
.chip.imp-discarded, .chip.pst-rejected { background: #EEF1EF; color: var(--graphite); border-color: #E1E5E2; text-decoration: line-through; }
.chip.imported { background: var(--sheet); color: var(--ink-soft); border-color: var(--rule-strong); }
.chip.sample { background: transparent; color: var(--graphite); border: 1px dashed var(--rule-strong); }
.chip.sample::before { background: var(--brass); }
.spin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }
.read-progress-wrap > .spin { width: 18px; height: 18px; color: var(--accent); }

/* Import tab */
.import-upload { margin-bottom: 20px; }
.import-drop { padding: 30px 20px; }
.import-drop.busy-zone { opacity: .6; pointer-events: none; }
.upload-status { margin: 8px 2px 0; min-height: 1px; }
.upload-status:empty { display: none; }
.reader-off { margin-bottom: 20px; background: var(--sheet); border-color: var(--rule-strong); }
.reader-off h3 { color: var(--ink); }
pre.cmd { margin: 4px 0 12px; padding: 12px 14px; background: var(--ink); color: #F6F4EE; border-radius: var(--r-sm); overflow-x: auto; }
pre.cmd code { background: none; border: 0; color: inherit; font-size: 14px; padding: 0; user-select: all; }
.read-progress-wrap { display: flex; align-items: center; gap: 14px; margin: 0 24px 14px; padding: 12px 16px; background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--r-sm); }
.read-progress { margin: 0; font-weight: 600; color: var(--accent-dark); }
.read-timer { font-size: 13px; font-variant-numeric: tabular-nums; }
.imp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.imp-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 8px 16px; align-items: center; padding: 14px 24px; border-top: 1px solid var(--rule); }
.imp-row:first-child { border-top: 0; }
.imp-row.reading { background: #F6FAF8; }
.imp-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--sheet-tint); border: 1px solid var(--rule); display: grid; place-items: center; color: var(--graphite); }
.imp-icon svg { width: 18px; height: 18px; }
.imp-row.st-ready .imp-icon { color: var(--amber); }
.imp-row.st-applied .imp-icon { color: var(--green); }
.imp-row.st-failed .imp-icon { color: var(--red); }
.imp-name { font-weight: 600; overflow-wrap: anywhere; }
.imp-name a { color: var(--ink); text-decoration: none; }
.imp-name a:hover { color: var(--accent); text-decoration: underline; }
.imp-meta { font-size: 13px; color: var(--graphite); }
.imp-detail { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }
.conflict-count { color: var(--amber); font-weight: 600; }
.imp-actions { justify-content: flex-end; flex-wrap: nowrap; }
.imp-discarded { border-top: 1px solid var(--rule); }
.imp-discarded > summary { padding: 12px 24px; cursor: pointer; color: var(--graphite); font-size: 14px; }
.imp-discarded .imp-row { opacity: .75; }
.apply-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 20px; padding: 18px 24px; border-radius: var(--r-md); background: var(--sheet); border: 1px solid var(--accent); box-shadow: var(--shadow); }
.apply-bar h3 { font-size: 17px; }
.apply-bar p { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }
.setup-banner { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.setup-banner > div { flex: 1; min-width: 260px; }
.apply-files { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: var(--r-sm); }
.apply-files li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--rule); font-size: 14px; }
.apply-files li:first-child { border-top: 0; }
.apply-result .big-number { font-size: 17px; margin: 0; }
.apply-result .big-number strong { font-family: var(--serif); font-size: 28px; color: var(--accent); margin-right: 2px; }
.created-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.created-list li { padding: 8px 12px; background: var(--sheet-tint); border: 1px solid var(--rule); border-radius: var(--r-sm); }
.callout.danger h3 { color: var(--red); }
.callout.danger ul { margin: 6px 0 0; padding-left: 20px; }

/* Conflict and error lines (amber is "check this", red is "did not happen") */
.conflict-line, .error-line { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; font-size: 14px; color: var(--amber); background: var(--amber-tint); border: 1px solid #F1DDAE; border-radius: var(--r-sm); padding: 7px 10px; }
.conflict-line svg, .error-line svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.error-line { color: var(--red); background: var(--red-tint); border-color: #EDCAC4; }

/* Review screen */
.review-head { margin-bottom: 20px; }
.review-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.review-title h1 { overflow-wrap: anywhere; margin-bottom: 8px; }
.review { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: start; }
.review-orig { position: sticky; top: 76px; }
details.original { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; }
details.original > summary { display: none; }
details.original.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px rgba(11, 90, 78, .45); } 100% { box-shadow: 0 0 0 0 rgba(11, 90, 78, 0); } }
.orig-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--rule); background: var(--sheet-tint); font-size: 14px; }
.orig-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.orig-page { font-size: 13px; font-variant-numeric: tabular-nums; }
.orig-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 480px; border: 0; background: #E6E9E6; }
.orig-frame.tall { height: calc(100vh - 200px); min-height: 640px; border-radius: var(--r-md); }
.orig-stage { background: #E6E9E6; border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; }
.orig-image { max-height: calc(100vh - 150px); overflow: auto; background: #E6E9E6; padding: 16px; }
.orig-image img { width: 100%; height: auto; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(17,28,27,.10); background: #fff; }
.orig-note { padding: 40px 24px; text-align: center; color: var(--ink-soft); }
.orig-note > svg { width: 32px; height: 32px; margin: 0 auto 10px; color: var(--graphite); }
.review-docs > * + * { margin-top: 20px; }
.doc-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); }
.doc-head { padding: 20px 22px 16px; }
.doc-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.doc-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.doc-kicker .eyebrow { margin: 0; }
.doc-kicker .link-btn { margin-left: auto; }
.doc-head h3 { font-size: 19px; }
.doc-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; margin-top: 8px; color: var(--graphite); font-size: 14px; }
.doc-summary { margin: 12px 0 0; color: var(--ink-soft); }
.doc-warnings { margin-top: 12px; padding: 10px 14px; background: var(--amber-tint); border: 1px solid #F1DDAE; border-radius: var(--r-sm); color: #5E4100; font-size: 14px; }
.doc-warnings h4 { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--amber); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.doc-warnings h4 svg { width: 15px; height: 15px; }
.doc-warnings ul { margin: 0; padding-left: 20px; }
.prop-section { border-top: 1px solid var(--rule); padding: 14px 22px 20px; }
.prop-section.clauses { background: var(--sheet-tint); border-radius: 0 0 var(--r-md) var(--r-md); }
.prop-section-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.prop-section-head h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); font-weight: 600; }
.prop-section-head .doc-tally { flex: 1; }
.prop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.prop { position: relative; border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong); border-radius: var(--r-sm); padding: 12px 14px 12px 14px; background: var(--sheet); transition: border-color .12s, background .12s; }
.prop.st-accepted, .prop.st-applied { border-left-color: var(--green); }
.prop.st-rejected { border-left-color: var(--rule); background: var(--sheet-tint); }
.prop.st-rejected .prop-sentence { color: var(--graphite); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.prop.st-error { border-left-color: var(--red); }
.prop.has-conflict.st-pending { border-left-color: var(--amber); }
.prop-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.prop-sentence { margin: 0; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.prop-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.conf { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 4px; white-space: nowrap; line-height: 20px; border: 1px solid; }
.conf-high { color: var(--green); border-color: #C4DFCC; background: var(--green-tint); }
.conf-medium { color: var(--amber); border-color: #F1DDAE; background: var(--amber-tint); }
.conf-low { color: var(--red); border-color: #EDCAC4; background: var(--red-tint); }
.prop-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; margin: 8px 0 0; font-size: 14px; }
.prop-fields dt { color: var(--graphite); }
.prop-fields dd { margin: 0; }
.prop-fields dt::first-letter { text-transform: uppercase; }
.quote { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; margin: 8px 0 0; padding: 6px 10px; background: transparent; border: 0; border-left: 2px solid var(--rule-strong); border-radius: 0 var(--r-sm) var(--r-sm) 0; cursor: pointer; font: italic 14px/1.5 var(--doc); color: var(--ink-soft); }
.quote:hover { background: var(--accent-tint); border-left-color: var(--accent); color: var(--ink); }
.quote .q-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.quote .q-page { font: 600 12px var(--sans); color: var(--accent); white-space: nowrap; font-style: normal; }
.prop-match { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.prop-match { gap: 8px; }
.m-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.m-line { margin: 0; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.m-label { font-weight: 600; color: var(--ink); }
.m-tag { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; padding: 0 6px; border-radius: 4px; line-height: 18px; vertical-align: 1px; }
.m-tag.ok { background: var(--green-tint); color: var(--green); }
.m-tag.new { background: var(--accent-tint); color: var(--accent); }
.m-tag.fuzzy { background: var(--amber-tint); color: var(--amber); }
.m-change { flex: none; }
.m-pick { margin-top: 6px; }
.m-pick select { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.match-row.attention .m-pick select { border-color: #E2C27E; }
.match-ro { margin: 0; }
.prop-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.toggle { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--sheet); }
.toggle .tg { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 5px 12px; min-height: 32px; font: 500 13px var(--sans); color: var(--ink-soft); cursor: pointer; }
.toggle .tg svg { width: 14px; height: 14px; }
.toggle .tg + .tg { border-left: 1px solid var(--rule-strong); }
.toggle .tg:hover { background: var(--sheet-tint); color: var(--ink); }
.toggle .tg-accept[aria-pressed="true"] { background: var(--green-tint); color: var(--green); font-weight: 600; }
.toggle .tg-reject[aria-pressed="true"] { background: var(--red-tint); color: var(--red); font-weight: 600; }
.toggle .tg:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0; }
.prop-edit { margin-top: 12px; padding: 14px; background: var(--sheet-tint); border: 1px solid var(--rule); border-radius: var(--r-sm); }
.prop-edit .form-grid { gap: 12px 14px; }
.prop-edit .form-actions { margin-top: 14px; }
.clause { border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong); border-radius: var(--r-sm); padding: 12px 14px; background: var(--sheet); display: grid; gap: 10px; }
.clause.st-accepted, .clause.st-applied { border-left-color: var(--green); }
.clause.st-rejected { opacity: .78; }
.clause-map { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.clause-map .eyebrow { font-size: 11px; }
.clause textarea, .prec-edit textarea { font: 14.5px/1.55 var(--doc); field-sizing: content; min-height: 64px; max-height: 360px; }
.clause-more { display: flex; flex-direction: column; gap: 6px; }
.clause-more .quote { margin-top: 6px; }
.review.narrow-orig { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); }
.clause-default { font-size: 13px; color: var(--graphite); }
.clause-default summary { cursor: pointer; color: var(--accent); }
.clause-default p { margin: 6px 0 0; padding: 8px 10px; border-left: 2px solid var(--rule); font: 13.5px/1.5 var(--doc); }
.clause-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
fieldset.scope { display: flex; gap: 6px 16px; align-items: center; flex-wrap: wrap; }
fieldset.scope legend { float: left; margin-right: 4px; font-weight: 600; }
fieldset.scope .check { font-size: 14px; align-items: center; }
fieldset.scope .check input { margin: 0; }
.review-foot { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; background: rgba(255, 255, 255, .97); border: 1px solid var(--accent); border-radius: var(--r-md); box-shadow: 0 -6px 24px rgba(17, 28, 27, .08); }
.review-counts { margin: 0; color: var(--ink-soft); font-size: 14px; }
.review-counts strong { color: var(--ink); }
dl.facts.compact { grid-template-columns: 76px minmax(0, 1fr); font-size: 14px; margin-top: 8px; }
dl.facts.compact dt, dl.facts.compact dd { padding: 7px 0; }

/* Wizard step 0 */
.start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.start-card { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; text-decoration: none; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 26px 26px 22px; cursor: pointer; font: inherit; transition: border-color .12s, box-shadow .12s; }
.start-card:hover, .start-card.selected { border-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.start-ico { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; margin-bottom: 6px; }
.start-ico svg { width: 22px; height: 22px; }
.start-title { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.start-text { color: var(--ink-soft); }
.start-hint { font-size: 13px; color: var(--graphite); padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--rule); }
.start-docs .start-card.selected { border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: none; }
.start-form { background: var(--sheet); border: 1px solid var(--accent); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); padding: 4px 26px 22px; }

/* Settings, Wording */
.wording-intro { margin: 0 0 18px; }
.wording-intro p { font-size: 14.5px; }
.var { display: inline-block; font: 600 12.5px/1.5 var(--sans); color: var(--accent); background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: 4px; padding: 0 5px; margin: 0 1px; font-style: normal; vertical-align: 1px; }
.wording-filter { margin: 0 0 16px; font-size: 14px; }
.wording-list { display: grid; gap: 12px; }
details.tpl > summary { list-style: none; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 22px; cursor: pointer; }
details.tpl > summary::-webkit-details-marker { display: none; }
details.tpl > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--graphite); border-bottom: 2px solid var(--graphite); transform: rotate(-45deg); transition: transform .12s; flex: none; }
details.tpl[open] > summary::before { transform: rotate(45deg); }
details.tpl > summary:hover .tpl-title { color: var(--accent); }
.tpl-title { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.tpl-sub { flex: 1; }
.tpl-body { border-top: 1px solid var(--rule); }
.tpl-body > .muted { padding: 16px 22px; margin: 0; }
.slot { padding: 18px 22px; border-top: 1px solid var(--rule); }
.slot:first-child { border-top: 0; }
.slot-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.slot-head h3 { font-size: 16px; }
.slot-default { background: var(--sheet-tint); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 10px 14px; }
.slot-default .eyebrow { font-size: 11px; margin-bottom: 4px; }
.slot-default p:last-child, .prec-text { font: 14.5px/1.6 var(--doc); margin: 0; }
.prec-list { display: grid; gap: 10px; margin-top: 10px; }
.prec { border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--r-sm); padding: 10px 14px; display: grid; gap: 6px; background: var(--sheet); }
.prec.inactive { border-left-color: var(--rule-strong); opacity: .8; }
.prec-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.scope-tag { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 4px; background: var(--accent-tint); color: var(--accent); }
.scope-tag.all { background: var(--ink); color: #fff; }
.prec .actions { margin-left: -8px; }
.prec-off { margin-top: 10px; font-size: 14px; }
.prec-off > summary { cursor: pointer; color: var(--graphite); margin-bottom: 8px; }
.prec-off .prec + .prec { margin-top: 8px; }
.prec-edit textarea { font: 14.5px/1.55 var(--doc); }
.prec-edit .help { margin-top: 6px; }

@media (max-width: 1100px) {
  .review { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .review { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .review-orig { position: static; }
  details.original > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; font-weight: 600; list-style: none; }
  details.original > summary::-webkit-details-marker { display: none; }
  details.original > summary svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
  details.original > summary .muted { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
  details.original > summary::after { content: "Show"; font: 500 13px var(--sans); color: var(--accent); }
  details.original[open] > summary::after { content: "Hide"; }
  details.original[open] > summary { border-bottom: 1px solid var(--rule); }
  .orig-bar .orig-name { visibility: hidden; }
  .review.narrow-orig { grid-template-columns: minmax(0, 1fr); }
  .orig-frame { height: 70vh; min-height: 360px; }
  .orig-image { max-height: 70vh; }
  .start-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .imp-row { grid-template-columns: 32px minmax(0, 1fr); padding: 14px 18px; gap: 6px 12px; }
  .imp-icon { width: 32px; height: 32px; }
  .imp-status, .imp-actions { grid-column: 2; justify-content: flex-start; }
  .imp-actions { flex-wrap: wrap; }
  .read-progress-wrap { margin: 0 18px 12px; flex-wrap: wrap; }
  .imp-discarded > summary { padding: 12px 18px; }
  .apply-bar { padding: 16px 18px; }
  .apply-bar .btn { width: 100%; }
  .doc-head { padding: 16px 16px 14px; }
  .prop-section { padding: 12px 12px 16px; }
  .prop { padding: 12px; }
  .prop-head { flex-direction: column; gap: 6px; }
  .prop-tags { justify-content: flex-start; }
  .prop-actions { flex-wrap: wrap; }
  .review-foot { padding: 12px 14px; }
  .review-foot .btn { width: 100%; }
  .orig-frame.tall { min-height: 420px; height: 70vh; }
  .start-card { padding: 20px; }
  .start-form { padding: 4px 20px 20px; }
  details.tpl > summary { padding: 14px 16px; }
  .slot { padding: 16px; }
  .slot-head { flex-wrap: wrap; }
}

@media (max-width: 960px) { .res-split.imported > .side { order: 0; } }
.read-progress-wrap { flex-wrap: wrap; }
.read-progress-wrap .grow { flex: 1 1 220px; }
@media (max-width: 680px) {
  details.tpl > summary { gap: 6px 10px; }
  details.tpl > summary .tpl-title { flex: 1 1 calc(100% - 24px); }
  details.tpl > summary .tpl-sub { padding-left: 18px; }
  .review-foot { gap: 8px; padding: 10px 12px; }
  .review-counts { font-size: 13px; }
}

/* =====================================================================
   v1.2: ARSchive, year ends, tax notices, register changes
   ===================================================================== */
.chip.ye-open { background: var(--sheet); color: var(--ink-soft); border-color: var(--rule-strong); }
.chip.soon-plain { background: var(--accent-tint); color: var(--accent); border-color: var(--accent-line); }

/* Year ends tab */
.ye-list { display: grid; gap: 14px; }
details.ye { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; }
details.ye[open] { box-shadow: 0 1px 2px rgba(17, 28, 27, .03); }
details.ye.ye-overdue { border-color: #EDCAC4; }
.ye-head { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto 18px; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; }
.ye-head::-webkit-details-marker { display: none; }
.ye-head:hover { background: var(--sheet-tint); }
.ye-fy { font: 700 20px/1 var(--display); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ye-ended { color: var(--ink-soft); font-size: 14px; }
.ye-progress { font-variant-numeric: tabular-nums; }
.ye-caret { width: 18px; height: 18px; color: var(--graphite); transition: transform .15s; }
details.ye[open] .ye-caret { transform: rotate(90deg); }
.ye-body { padding: 4px 20px 20px; border-top: 1px solid var(--rule); display: grid; gap: 16px; }
.ye-body > :first-child { margin-top: 14px; }
.ye-open .ye-fy { color: var(--ink-soft); }

.ms-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ms { display: flex; gap: 9px; align-items: flex-start; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet-tint); min-width: 0; }
.ms-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--sheet); border: 1px solid var(--rule-strong); color: var(--graphite); margin-top: 1px; }
.ms-ico svg { width: 13px; height: 13px; stroke-width: 2.4; }
.ms-body { display: flex; flex-direction: column; min-width: 0; }
.ms-label { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.ms-text { font-size: 12.5px; color: var(--graphite); line-height: 1.35; font-variant-numeric: tabular-nums; }
.ms-done { background: var(--green-tint); border-color: #C4DFCC; }
.ms-done .ms-ico { background: var(--green); border-color: var(--green); color: #fff; }
.ms-done .ms-text { color: var(--green); }
.ms-soon { background: var(--amber-tint); border-color: #F1DDAE; }
.ms-soon .ms-ico { color: var(--amber); border-color: #E7C67B; }
.ms-soon .ms-text { color: var(--amber); font-weight: 600; }
.ms-overdue { background: var(--red-tint); border-color: #EDCAC4; }
.ms-overdue .ms-ico { background: var(--red); border-color: var(--red); color: #fff; }
.ms-overdue .ms-text { color: var(--red); font-weight: 600; }
.ms-waiting { background: var(--accent-tint); border-color: var(--accent-line); }
.ms-waiting .ms-ico { color: var(--accent); border-color: var(--accent-line); }
.ms-waiting .ms-text { color: var(--accent); }
.ms-due .ms-text { color: var(--ink-soft); }
.ms-later { background: var(--sheet); border-style: dashed; }
.ms-later .ms-ico { border-style: dashed; color: var(--rule-strong); }
.ms-na { background: var(--sheet); border-style: dashed; opacity: .75; }
.ms-na .ms-label { color: var(--graphite); font-weight: 500; }

.owing-box { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--amber-tint); border: 1px solid #F1DDAE; color: #5E4100; }
.owing-box > svg { width: 20px; height: 20px; color: var(--amber); }
.owing-box strong { color: var(--ink); }
.owing-box.late { background: var(--red-tint); border-color: #EDCAC4; color: #6B1F19; }
.owing-box.late > svg { color: var(--red); }

.noa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.noa { border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px 10px; background: var(--sheet); }
.noa-head { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
.noa-head .eyebrow { color: var(--accent); }
.noa-figs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; margin: 0; font-size: 14px; }
.noa-figs dt { color: var(--graphite); }
.noa-figs dd { margin: 0; text-align: right; }
.amt { font-weight: 600; }
.amt.owing { color: var(--red); }
.amt.refund { color: var(--green); }
.amt.nil { color: var(--ink-soft); font-weight: 500; }
.noa-links { display: flex; gap: 2px; flex-wrap: wrap; margin: 8px -8px 0; }

details.reas { border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet-tint); }
details.reas > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
details.reas > summary::-webkit-details-marker { display: none; }
details.reas > summary svg { width: 16px; height: 16px; color: var(--graphite); transition: transform .15s; }
details.reas[open] > summary svg { transform: rotate(90deg); }
.reas-list { list-style: none; margin: 0; padding: 0 14px 6px; }
.reas-list li { padding: 12px 0; border-top: 1px solid var(--rule); }
.reas-head { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; align-items: baseline; font-size: 14px; }
.reas-figs { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.reas-sum { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); max-width: 72ch; }

.ye-notes { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.ye-notes svg { width: 15px; height: 15px; margin-top: 3px; flex: none; color: var(--graphite); }
.ye-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px dashed var(--rule); }
.ye-legend { margin: 16px 2px 0; max-width: 80ch; }

/* Dashboard: year-end status line */
.ye-line { display: flex; gap: 8px; align-items: baseline; margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }
.ye-line strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ye-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.ye-line.tone-done .ye-dot { background: var(--green); }
.ye-line.tone-overdue .ye-dot { background: var(--red); }
.ye-line.tone-overdue { color: var(--red); }
.ye-line.tone-owing .ye-dot { background: var(--marigold); }

/* Resolution: registers updated */
.reg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.reg-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); flex: none; }
.reg-ico svg { width: 17px; height: 17px; }
.reg-ico.muted { background: var(--sheet); border: 1px solid var(--rule); color: var(--graphite); }
.reg-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.reg-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.45; }
.reg-list li svg { width: 16px; height: 16px; color: var(--green); margin-top: 2px; stroke-width: 2.2; }

/* Brand details */
.page-head .eyebrow { color: var(--accent); }

@media (max-width: 1100px) {
  .ms-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .ye-head { grid-template-columns: auto minmax(0, 1fr) auto 16px; gap: 6px 10px; padding: 14px 16px; }
  .ye-head .ye-ended { grid-column: 1 / 3; grid-row: 2; font-size: 13px; }
  .ye-head .ye-progress { display: none; }
  .ye-head .chip { grid-column: 3; grid-row: 1; }
  .ye-head .ye-caret { grid-column: 4; grid-row: 1; }
  .ye-body { padding: 2px 16px 16px; }
  .ms-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ms { padding: 9px; gap: 7px; }
  .owing-box { grid-template-columns: 20px minmax(0, 1fr); }
  .owing-box .btn { grid-column: 1 / -1; justify-self: start; }
  .ye-actions .btn { flex: 1 1 auto; }
}
/* Documents stay in the classic serif, as in the Word output (src/brand.js). */
.doc-page h1, .doc-page h2, .doc-page h3, .doc-page h4, .doc-page .d-title, .doc-page .d-heading { font-family: var(--doc); letter-spacing: normal; }

/* =====================================================================
   v1.3: smart drop, add a corporation from documents, minute book (SPEC-SMARTDROP)
   ===================================================================== */
.flash { animation: flash 1.2s ease-out; border-radius: var(--r-sm); }

/* Large drop zone */
.bigdrop {
  display: grid; justify-items: center; text-align: center; gap: 10px; padding: 52px 32px 44px; cursor: pointer;
  background: var(--sheet); border: 1.5px dashed var(--accent-line); border-radius: 16px; color: var(--ink-soft);
  transition: background .12s, border-color .12s, box-shadow .12s;
  background-image: radial-gradient(circle at 50% 0%, rgba(11, 90, 78, .05), transparent 60%);
}
.bigdrop:hover, .bigdrop.over { border-color: var(--accent); background-color: var(--accent-tint); }
.bigdrop.over { box-shadow: 0 0 0 4px rgba(11, 90, 78, .12); }
.bigdrop-ico { width: 60px; height: 60px; border-radius: 16px; background: var(--accent); color: #fff; display: grid; place-items: center; position: relative; margin-bottom: 6px; box-shadow: 0 6px 16px rgba(11, 90, 78, .22); }
.bigdrop-ico::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 13px; height: 3px; border-radius: 2px; background: var(--marigold); }
.bigdrop-ico svg { width: 26px; height: 26px; margin-top: -6px; }
.bigdrop-title { font: 650 21px/1.3 var(--display); letter-spacing: -.014em; color: var(--ink); max-width: 30em; text-wrap: balance; }
.bigdrop-text { max-width: 36em; font-size: 14.5px; text-wrap: balance; }
.bigdrop-btn { margin-top: 8px; pointer-events: none; }
.bigdrop.compact { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ico title btn" "ico text btn"; justify-items: start; text-align: left; gap: 2px 18px; padding: 18px 20px; border-radius: var(--r-md); background-image: none; background-color: var(--sheet-tint); }
.bigdrop.compact .bigdrop-ico { grid-area: ico; width: 44px; height: 44px; border-radius: 12px; margin: 0; align-self: center; box-shadow: none; }
.bigdrop.compact .bigdrop-ico::after { left: 9px; right: 9px; bottom: 9px; height: 2.5px; }
.bigdrop.compact .bigdrop-ico svg { width: 20px; height: 20px; margin-top: -4px; }
.bigdrop.compact .bigdrop-title { grid-area: title; font-size: 16px; }
.bigdrop.compact .bigdrop-text { grid-area: text; font-size: 13.5px; color: var(--graphite); }
.bigdrop.compact .bigdrop-btn { grid-area: btn; margin: 0; align-self: center; }
.bigdrop-samples { margin: 10px 2px 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: center; }
.bigdrop-again { margin-top: 4px; }
.ac-alt { display: flex; justify-content: center; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 22px; font-size: 14.5px; }
.ac-stage > .card + .ac-alt, .ac-outcomes + .ac-alt { margin-top: 28px; }

/* Reading progress, per file */
.rq-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rq-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 12px 24px; border-top: 1px solid var(--rule); }
.rq-row:first-child { border-top: 0; }
.rq-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--sheet-tint); border: 1px solid var(--rule); color: var(--graphite); }
.rq-ico svg { width: 17px; height: 17px; }
.rq-ico .spin { width: 15px; height: 15px; color: var(--accent); }
.rq-read .rq-ico { background: var(--green-tint); border-color: #C4DFCC; color: var(--green); }
.rq-failed .rq-ico { background: var(--red-tint); border-color: #EDCAC4; color: var(--red); }
.rq-reading { background: #F7FBF9; }
.rq-name { font-weight: 600; overflow-wrap: anywhere; }
.rq-meta { font-size: 13px; color: var(--graphite); }
.rq-bar { margin-top: 7px; height: 4px; border-radius: 2px; background: var(--rule); overflow: hidden; max-width: 420px; }
.rq-bar > span { display: block; height: 100%; width: 35%; background: var(--accent); border-radius: 2px; animation: rq-slide 1.4s ease-in-out infinite; }
.rq-bar:not(.indeterminate) > span { animation-duration: .9s; }
@keyframes rq-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.rq-chip { font-size: 12.5px; font-weight: 600; color: var(--graphite); white-space: nowrap; }
.rq-chip-read { color: var(--green); }
.rq-chip-reading, .rq-chip-uploading { color: var(--accent); }
.rq-summary { margin: 4px 0 0; color: var(--graphite); font-size: 14px; }
.ac-queue { margin-bottom: 20px; }

/* Outcomes of a read: existing corporation, new corporation */
.ac-match { display: flex; gap: 18px; align-items: flex-start; border-color: var(--accent); box-shadow: var(--shadow); }
.ac-match h2, .ac-new h2 { font-size: 19px; margin-bottom: 6px; }
.ac-match-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.ac-match-ico svg { width: 22px; height: 22px; }
.ac-groups { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.ac-groups li { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--sheet-tint); }

/* Whole-page drop overlay */
.drop-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15, 44, 40, .72); display: grid; place-items: center; padding: 24px; pointer-events: none; }
.drop-overlay-sheet { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 56px; border: 2px dashed rgba(255, 255, 255, .55); border-radius: 20px; color: rgba(255, 255, 255, .85); }
.drop-overlay-sheet svg { width: 40px; height: 40px; color: var(--marigold); }
.drop-overlay-sheet strong { font: 700 24px var(--display); color: #fff; letter-spacing: -.015em; }

/* Source chips with the quote on hover, focus or tap */
.src { position: relative; display: inline-flex; vertical-align: middle; }
.src-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 260px; padding: 1px 8px 1px 6px; border-radius: 999px; border: 1px solid var(--accent-line); background: var(--accent-tint); color: var(--accent-dark); font: 500 12.5px/20px var(--sans); cursor: pointer; white-space: nowrap; }
.src-chip svg { width: 13px; height: 13px; flex: none; }
.src-chip:hover { border-color: var(--accent); }
.src-title { overflow: hidden; text-overflow: ellipsis; }
.src-more { font-weight: 600; color: var(--accent); }
.src-chip.none { cursor: default; background: transparent; border-style: dashed; border-color: var(--rule-strong); color: var(--graphite); padding: 1px 8px; }
.src-chip.edited { cursor: default; background: var(--sheet-tint); border-color: var(--rule-strong); color: var(--ink-soft); }
.src-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: max-content; max-width: min(360px, calc(100vw - 48px)); display: none; flex-direction: column; gap: 10px; padding: 12px 14px; background: var(--night); color: rgba(255, 255, 255, .86); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 44, 40, .28); font-size: 13px; line-height: 1.45; white-space: normal; }
.src:hover .src-pop, .src:focus-within .src-pop, .src.open .src-pop { display: flex; }
.src-item { display: flex; flex-direction: column; gap: 2px; }
.src-item + .src-item { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .12); }
.src-doc { color: #fff; font-weight: 600; }
.src-file { color: rgba(255, 255, 255, .62); font-size: 12px; }
.src-quote { margin-top: 4px; font: italic 13.5px/1.5 var(--doc); color: #F6F1E4; quotes: "\201C" "\201D"; border-left: 2px solid var(--marigold); padding-left: 9px; }

/* New corporation draft */
.draft-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.draft-main > .card + .card { margin-top: 20px; }
.draft-side { position: sticky; top: 84px; }
.draft-group > h2 { font-size: 18px; margin-bottom: 14px; }
.df-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.df { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.df:has(textarea), .df:has(.df-alts) { grid-column: 1 / -1; }
.df-head { display: flex; align-items: center; justify-content: flex-start; gap: 6px 10px; flex-wrap: wrap; min-height: 22px; }
.df-head label { font-weight: 600; font-size: 14px; color: var(--ink); }
.df .help { margin: 0; }
.df.is-missing input, .df.is-missing textarea, .df.is-missing select { border-color: #E7C67B; background: #FFFCF4; }
.df-alts { border: 1px solid #F1DDAE; background: var(--amber-tint); border-radius: var(--r-sm); padding: 10px 12px 12px; margin: 0; }
.df-alts legend { display: flex; align-items: center; gap: 6px; float: left; width: 100%; padding: 0; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--amber); }
.df-alts legend svg { width: 15px; height: 15px; }
.df-alt-grid { clear: both; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.df-alt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--r-sm); padding: 10px 12px; }
.df-alt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.df-alt-label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-weight: 500; color: var(--ink); white-space: pre-line; }
.df-alt-label input { margin-top: 4px; accent-color: var(--accent); }
.fye-pair { display: flex; gap: 8px; }
.fye-pair select { flex: 1; min-width: 0; }
.fye-pair .fye-day { width: 84px; flex: none; }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.dl-card { border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--sheet-tint); min-width: 0; }
.dl-card#row-shareholders { grid-column: 1 / -1; }
.dl-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--rule); }
.dl-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.dl-count { font: 600 12px var(--sans); color: var(--graphite); background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.dl-count:empty { display: none; }
.dl-list { list-style: none; margin: 0; padding: 0; }
.dl-row { padding: 10px 12px 10px 14px; border-top: 1px solid var(--rule); background: var(--sheet); }
.dl-row:first-child { border-top: 0; }
.dl-cells { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; align-items: center; }
.dl-share_classes .dl-cells { grid-template-columns: minmax(0, 1fr) auto; }
.dl-officers .dl-cells { grid-template-columns: minmax(0, 1fr) 150px; }
.dl-shareholders .dl-cells { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 110px; }
.dl-cells input, .dl-cells select { padding: 7px 10px; font-size: 14px; }
.dl-cells .num-in { text-align: right; font-variant-numeric: tabular-nums; }
.dl-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.dl-meta .btn { padding: 4px 6px; }
.dl-vote { white-space: nowrap; font-size: 14px; }
.dl-empty { margin: 0; padding: 14px; font-size: 13.5px; color: var(--graphite); background: var(--sheet); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.sm-card h2 { font-size: 19px; }
.sm-top { margin: 6px 0 12px; font-size: 14px; color: var(--ink-soft); }
.sm-group { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); margin: 14px 0 6px; font-weight: 600; }
.sm-list ul { list-style: none; margin: 0; padding: 0; }
.sm-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px 0; font-size: 14px; border-top: 1px solid var(--rule); }
.sm-item:first-child { border-top: 0; }
.sm-mark { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--rule-strong); display: grid; place-items: center; margin-top: 2px; }
.sm-mark svg { width: 12px; height: 12px; stroke-width: 2.6; }
.sm-item.ok .sm-mark { background: var(--green); border-color: var(--green); color: #fff; }
.sm-item.ok .sm-label { color: var(--graphite); }
.sm-item.missing.sev-required .sm-mark { border-color: var(--red); border-style: dashed; }
.sm-item.missing.sev-recommended .sm-mark { border-color: #D9AE52; border-style: dashed; }
.sm-item.missing .sm-label { font-weight: 600; }
.sm-create { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule); }
.sm-create .btn { width: 100%; justify-content: center; }
.sm-create p { margin: 8px 0 0; }

/* Still missing banner on the Overview */
.missing-banner { margin-bottom: 20px; }
.smb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; }
.smb-head > div:first-child { flex: 1; min-width: 260px; }
.smb-head p { margin: 0; }
.smb-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.smb-item { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px 5px 12px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px; font-size: 14px; }
.smb-label { font-weight: 600; }
.smb-sev { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; padding: 0 7px; border-radius: 999px; line-height: 18px; }
.smb-sev.required { background: var(--red-tint); color: var(--red); }
.smb-sev.recommended { background: var(--amber-tint); color: var(--amber); }
.smb-foot { margin: 10px 0 0; }

/* Minute book health */
.mh { position: relative; }
.mh-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title score" "link link"; gap: 4px 16px; align-items: end; }
.mh-title { grid-area: title; }
.mh-title h2 { font-size: 18px; }
.mh-status { margin: 4px 0 0; font-size: 14px; font-weight: 500; }
.mh-req .mh-status { color: var(--red); }
.mh-rec .mh-status { color: var(--amber); }
.mh-ok .mh-status { color: var(--green); }
.mh-score { grid-area: score; font-family: var(--display); color: var(--graphite); white-space: nowrap; }
.mh-score strong { font-size: 34px; line-height: 1; font-weight: 700; color: var(--ink); letter-spacing: -.03em; }
.mh-score span { font-size: 16px; }
.mh-link { grid-area: link; justify-self: start; margin-left: -10px; }
.mh-meter { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--rule); margin: 14px 0 4px; gap: 2px; }
.mh-fill { background: var(--accent); border-radius: 999px 0 0 999px; }
.mh-gap { border-radius: 0 999px 999px 0; background: repeating-linear-gradient(-45deg, #F1DDAE 0 4px, var(--amber-tint) 4px 8px); }
.mh-req .mh-gap { background: repeating-linear-gradient(-45deg, #EDCAC4 0 4px, var(--red-tint) 4px 8px); }
.mh-details { margin-top: 12px; border-top: 1px solid var(--rule); }
.mh-details > summary, .mh-ok > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 12px 0 2px; color: var(--accent); font-weight: 600; font-size: 14px; }
.mh-details > summary::-webkit-details-marker, .mh-ok > summary::-webkit-details-marker { display: none; }
.mh-caret { width: 16px; height: 16px; transition: transform .15s; }
.mh-details[open] > summary .mh-caret { transform: rotate(90deg); }
.mh-group { margin: 14px 0 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); }
.mh-group.req { color: var(--red); }
.mh-group.rec { color: var(--amber); }
.mh-list { list-style: none; margin: 0; padding: 0; }
.mh-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 11px 0; border-top: 1px solid var(--rule); }
.mh-item:first-child { border-top: 0; }
.mh-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--amber); }
.mh-item.sev-required .mh-dot { background: var(--red); }
.mh-text strong { font-weight: 600; }
.mh-text p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.mh-act { align-self: center; }
.mh-ok { margin-top: 6px; }
.mh-ok > summary { color: var(--graphite); font-weight: 500; }
.mh-ok.standalone { margin-top: 10px; border-top: 1px solid var(--rule); }
.mh-ok ul { list-style: none; margin: 6px 0 0; padding: 0; columns: 2; column-gap: 24px; font-size: 13.5px; color: var(--ink-soft); }
.mh-ok li { display: flex; gap: 6px; align-items: flex-start; padding: 2px 0; break-inside: avoid; }
.mh-ok li svg { width: 14px; height: 14px; color: var(--green); flex: none; margin-top: 3px; stroke-width: 2.4; }
.mh.compact { margin-bottom: 20px; }

/* Archive: Minute book view */
.archive-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mb-card { overflow: visible; }
.mb-cover { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 20px 24px 18px; background: var(--night); color: rgba(255, 255, 255, .8); border-radius: var(--r-md) var(--r-md) 0 0; position: relative; }
.mb-cover::after { content: ""; position: absolute; left: 24px; bottom: 0; width: 44px; height: 3px; background: var(--marigold); border-radius: 2px 2px 0 0; }
.mb-cover .eyebrow { color: var(--marigold); margin: 0 0 2px; }
.mb-cover h2 { color: #fff; font-size: 21px; }
.mb-cover p { margin: 4px 0 0; color: rgba(255, 255, 255, .68); }
.mb-cover .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.mb-cover .btn:hover { background: rgba(255, 255, 255, .16); }
.mb-contents { padding: 14px 24px 16px; border-bottom: 1px solid var(--rule); background: var(--sheet-tint); }
.mb-contents ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 18px; }
.mb-contents a { display: flex; align-items: center; gap: 8px; padding: 4px 0; text-decoration: none; color: var(--ink); font-size: 13.5px; }
.mb-contents a:hover .mb-ct { color: var(--accent); text-decoration: underline; }
.mb-cn { flex: none; width: 22px; height: 20px; display: grid; place-items: center; border-radius: 5px 5px 0 0; background: #EAF3F0; border: 1px solid var(--accent-line); border-bottom: 0; box-shadow: inset 0 2px 0 var(--marigold); color: var(--accent-dark); font: 700 11.5px/1 var(--display); }
.mb-ct { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-cc { margin-left: auto; color: var(--graphite); font-size: 12.5px; }
.mb-contents li.is-empty a { color: var(--graphite); }
.mb-contents li.is-empty .mb-cn { background: var(--sheet); border-color: var(--rule-strong); border-style: dashed; box-shadow: none; color: var(--graphite); }
.binder { padding: 6px 24px 24px; }
.mb-sec { --tab-w: 42px; position: relative; margin-top: 34px; }
.mb-tab { position: absolute; top: -23px; left: var(--tab-x, 0); width: var(--tab-w); height: 24px; display: grid; place-items: center; z-index: 1;
  background: #EEF6F3; border: 1px solid var(--accent-line); border-bottom: 0; border-radius: 8px 8px 0 0; box-shadow: inset 0 3px 0 var(--marigold);
  color: var(--accent-dark); font: 700 12.5px/1 var(--display); font-variant-numeric: tabular-nums; }
.mb-div { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: #EEF6F3; border: 1px solid var(--accent-line); border-radius: 8px; flex-wrap: wrap; }
.mb-sec:first-child .mb-div { border-top-left-radius: 0; }
.mb-num { display: none; }
.mb-div h3 { font-size: 16px; color: var(--accent-dark); }
.mb-desc { margin: 1px 0 0; font-size: 13px; color: var(--graphite); }
.mb-count { font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.mb-empty { font-size: 13px; color: var(--graphite); }
.mb-sec.is-empty .mb-tab { background: var(--sheet); border-color: var(--rule-strong); border-style: dashed; box-shadow: none; color: var(--graphite); }
.mb-sec.is-empty .mb-div { background: var(--sheet); border-style: dashed; border-color: var(--rule-strong); padding: 8px 16px; }
.mb-sec.is-empty .mb-div h3 { color: var(--graphite); font-weight: 600; font-size: 15px; }
.mb-entries { list-style: none; margin: 0; padding: 4px 0 0 16px; }
.mb-entry { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 10px 0 10px 0; border-bottom: 1px solid var(--rule); }
.mb-entry:last-child { border-bottom: 0; }
.mb-date { font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; }
.mb-title { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.mb-title:hover { color: var(--accent); text-decoration: underline; }
.mb-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; color: var(--graphite); margin-top: 1px; }
.mb-meta > span:not(.tag) + span:not(.tag)::before { content: "\00B7"; margin-right: 10px; color: var(--rule-strong); }
.tag.src-imported { color: var(--blue); border-color: #CBD6E8; background: var(--blue-tint); }
.tag.src-generated { color: var(--accent); border-color: var(--accent-line); background: var(--accent-tint); }
.mb-acts { display: flex; gap: 4px; justify-content: flex-end; }
.mb-acts .btn { padding-left: 8px; padding-right: 8px; }

/* Dashboard smart drop */
.sd-card { margin: 28px 0 32px; }
.sd-queue { margin: 18px -24px 0; border-top: 1px solid var(--rule); }
.sd-queue-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 24px 4px; }
.sd-queue-head h3 { font-size: 15px; }
.sd-queue .rq-list { border-top: 0; }
.sd-results { display: grid; gap: 14px; margin-top: 18px; }
.sd-group { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 14px 16px; background: var(--sheet); }
.sd-group h3 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; }
.sd-group h3 svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.sd-group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sd-new { border-color: var(--accent-line); background: #F7FBF9; }
.sd-home { border-color: #F1DDAE; background: #FFFCF4; }
.sd-home h3 svg { color: var(--amber); }
.sd-note { margin: 4px 0 0; }
.sd-entity { margin-top: 10px; }
.sd-entity + .sd-entity { padding-top: 10px; border-top: 1px solid var(--rule); }
.sd-files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.sd-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--sheet); }
.sd-file-ico svg { width: 16px; height: 16px; color: var(--graphite); }
.sd-file-name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.sd-file .conflict-line { margin-top: 6px; }
.sd-home-pick { display: flex; gap: 8px; align-items: center; }
.sd-home-pick select { min-width: 200px; padding: 6px 10px; font-size: 14px; }

/* Archive upload: read and file */
.read-check { margin-top: 14px; align-items: flex-start; }
.read-status { margin: 10px 0 0; display: flex; gap: 8px; align-items: center; }
.filed-note { color: var(--green); }
.review-foot-actions { margin-left: auto; }

@media (max-width: 960px) {
  .draft { grid-template-columns: minmax(0, 1fr); }
  .draft-side { position: static; }
  .mb-contents ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .bigdrop { padding: 34px 18px 30px; }
  .bigdrop-title { font-size: 18px; }
  .bigdrop.compact { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ico title" "ico text" "btn btn"; padding: 16px; }
  .bigdrop.compact .bigdrop-btn { justify-self: stretch; justify-content: center; margin-top: 10px; }
  .rq-row { padding: 12px 18px; grid-template-columns: 30px minmax(0, 1fr); }
  .rq-ico { width: 30px; height: 30px; }
  .rq-state { grid-column: 2; }
  .ac-match { flex-direction: column; gap: 12px; }
  .df-grid, .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-cells, .dl-officers .dl-cells { grid-template-columns: minmax(0, 1fr); }
  .dl-shareholders .dl-cells { grid-template-columns: minmax(0, 1fr) 96px; }
  .dl-shareholders .dl-cells > input:first-child { grid-column: 1 / -1; }
  .dl-share_classes .dl-cells { grid-template-columns: minmax(0, 1fr) auto; }
  .smb-item { border-radius: var(--r-sm); }
  .mh-score strong { font-size: 28px; }
  .mh-item { grid-template-columns: 10px minmax(0, 1fr); }
  .mh-act { grid-column: 2; justify-self: start; }
  .mh-ok ul { columns: 1; }
  .mb-cover { padding: 18px 18px 16px; }
  .mb-cover::after { left: 18px; }
  .mb-contents { padding: 10px 18px 12px; }
  .mb-contents ol { grid-template-columns: minmax(0, 1fr); }
  .binder { padding: 4px 14px 18px; }
  .mb-sec { --tab-w: 34px; }
  .mb-div { padding: 10px 12px; }
  .mb-entries { padding-left: 4px; }
  .mb-entry { grid-template-columns: minmax(0, 1fr) auto; }
  .mb-date { grid-column: 1 / -1; font-size: 12.5px; }
  .sd-queue { margin: 16px -18px 0; }
  .sd-queue-head { padding: 12px 18px 2px; }
  .sd-home-pick { width: 100%; }
  .sd-home-pick select { flex: 1; min-width: 0; }
  .review-foot-actions { width: 100%; }
}
.df-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.df-foot:empty, .df-foot > .df-src:empty { display: none; }
.sd-queue-head .btn { margin-left: auto; }
.sd-queue-head { align-items: center; }
@media (max-width: 680px) { .rq-read .rq-state { display: none; } }

/* ---------- Round 1 hardening (UI) ---------- */
h2.h3 { font-size: 17px; }
.date-echo { display: block; font-size: 12.5px; color: var(--graphite); margin-top: 3px; min-height: 1em; font-variant-numeric: tabular-nums; }
.sig .when { flex-wrap: wrap; }
.sig .when .date-echo { flex-basis: 100%; margin: 0 0 0 52px; }
.fye-pair .date-echo { display: none; }
.app-foot { max-width: var(--maxw); margin: -48px auto 0; padding: 0 24px 28px; }
.app-foot p { font-size: 12.5px; color: var(--graphite); margin: 0; border-top: 1px solid var(--rule); padding-top: 12px; }
.wide-page .app-foot { max-width: 1440px; }
.auth-notice { color: var(--graphite); text-align: center; margin: 14px 0 0; }
.not-advice { padding: 10px 14px; margin: 0 0 22px; }
.top-search { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 0 12px; height: 34px; color: rgba(255,255,255,.75); }
.top-search svg { width: 15px; height: 15px; }
.top-search input { background: transparent; border: 0; color: #fff; min-height: 0; height: 30px; padding: 0; width: 160px; font-size: 14px; box-shadow: none; }
.top-search input::placeholder { color: rgba(255,255,255,.6); }
.top-search input:focus { outline: none; box-shadow: none; }
.top-search:focus-within { outline: 2px solid var(--marigold); outline-offset: 2px; }
/* C-30: between 600 and 900 px (and on phones) search is an icon button that opens the search page; the name hides, the avatar stays. */
.top-search-btn { display: none; color: rgba(255,255,255,.85); width: 36px; height: 36px; border-radius: 999px; place-items: center; text-decoration: none; }
.top-search-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.top-search-btn svg { width: 19px; height: 19px; }
@media (max-width: 900px) {
  .topbar-inner { gap: 16px; }
  .top-search { display: none !important; }
  .top-search-btn { display: grid; }
  .user-menu .who { display: none; }
  .user-menu { gap: 8px; }
}
.page-search { display: flex; gap: 8px; margin: 0 0 20px; max-width: 560px; }
.page-search input { flex: 1; min-width: 0; }
.search-list .hit-type { display: inline-block; margin-right: 8px; }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-list li { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 12px 24px; border-top: 1px solid var(--rule); }
.search-list li:first-child { border-top: 0; }
.search-list svg { width: 14px; height: 14px; color: var(--graphite); }
.search-group + .search-group { margin-top: 20px; }

.chip.mini { font-size: 11.5px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }
.chip.soon.plain::before, .chip.overdue.plain::before { display: none; }
.btn.caution { --bg: var(--sheet); --fg: var(--amber); --bd: var(--amber); }
.btn.caution:hover { background: var(--amber-tint); color: var(--amber); border-color: var(--amber); }
.btn.danger-solid { --bg: var(--red); --fg: #fff; --bd: var(--red); }
.btn.danger-solid:hover { background: #8a2a23; border-color: #8a2a23; color: #fff; }
.warn-text { color: var(--amber); font-size: 13px; margin: 0; }
.field-note { font-size: 13px; margin: 4px 0 0; }

/* Obligations */
details.due-basis { margin-top: 4px; }
details.due-basis summary { cursor: pointer; color: var(--accent); font-size: 13px; width: max-content; border-radius: 4px; }
details.due-basis p { margin: 4px 0 0; color: var(--graphite); }
.due-note { color: var(--ink-soft); margin: 4px 0 0; }
/* UX-59: follow-ups (no statutory date) read as "to do", not as done or overdue. */
.datebox.followup { border-style: dashed; border-color: var(--rule-strong); background: var(--sheet); color: var(--graphite); }
.datebox.followup .d, .datebox.followup .y { color: var(--graphite); }
.datebox.followup .d svg { width: 22px; height: 22px; }
.duelist.stacked .due { grid-template-columns: 52px minmax(0, 1fr); padding: 14px 18px; gap: 14px; }
.duelist.stacked .due > .actions { grid-column: 2; justify-content: flex-start; }
.datebox.unknown { border-style: dashed; border-color: #EDCAC4; background: var(--red-tint); color: var(--red); }
.datebox.unknown .d, .datebox.unknown .y { color: var(--red); }
.due.not_tracked .due-title { color: var(--ink-soft); }
.group-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--graphite); padding: 14px 24px 2px; font-family: var(--sans); font-weight: 600; }
.group-note { padding: 0 24px; margin: 0; }
.unknown-group { border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.not-tracked { border-top: 1px solid var(--rule); }
.not-tracked > summary { cursor: pointer; padding: 14px 24px; color: var(--ink-soft); font-weight: 500; }
.show-all { padding: 8px 24px 18px; }
.setup-line { margin-top: 8px; }
.cu-when { display: inline-flex; align-items: center; gap: 4px; }
.all-clear { display: flex; gap: 6px; align-items: center; margin: 0 0 16px; }
.all-clear svg { width: 16px; height: 16px; color: var(--green); }

/* Entity tabs: edge fade at tablet widths, a Section select on phones (B-52) */
.tabs-wrap { position: relative; }
.tabs-wrap::before, .tabs-wrap::after { content: ""; position: absolute; top: 0; bottom: 1px; width: 32px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 1; }
.tabs-wrap::before { left: 0; background: linear-gradient(90deg, var(--paper), rgba(243,244,241,0)); }
.tabs-wrap::after { right: 0; background: linear-gradient(270deg, var(--paper), rgba(243,244,241,0)); }
.tabs-wrap.more-right::after, .tabs-wrap.more-left::before { opacity: 1; }
.tabs-wrap .tabs { margin: 22px 0 28px; }
.tab-select { display: none; margin: 18px 0 22px; gap: 10px; align-items: center; }
.tab-select label { font-weight: 600; font-size: 14px; }
.tab-select select { flex: 1; }
@media (max-width: 600px) {
  .tabs-wrap { display: none; }
  .tab-select { display: flex; }
}

/* Overview */
.name-check h3, .name-check.warn h2 { color: var(--amber); }
.name-check-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.name-check-row select { width: auto; }
.name-check { margin-bottom: 20px; }
.smb-detail { display: block; font-size: 12.5px; color: var(--graphite); font-weight: 400; }
.not-applied { margin-top: 14px; }
.usa-card .usa-status { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.usa-table { width: 100%; margin-top: 8px; font-size: 14px; }
.usa-transfer { margin: 10px 0 0; }
.usa-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.usa-row > select:first-child { flex: 1 1 220px; }
.usa-row > select:nth-child(2) { flex: 0 0 160px; }
.usa-row .sec-in { flex: 0 0 90px; }
.usa-row > input[type=text]:not(.sec-in) { flex: 1 1 160px; }
.usa-row .num-in { flex: 0 0 110px; }
.usa-pct select { width: 150px; }
.usa-row:first-child { border-top: 0; }
.usa-pct { display: flex; gap: 6px; }
.usa-pct .num-in, .usa-row .num-in { width: 80px; }
.usa-rows { margin-bottom: 8px; }
.usa-terms fieldset { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 12px 16px 16px; }

.consent-missing { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Resolution */
.check-box { margin-bottom: 16px; }
.check-box ul { margin: 6px 0 0; padding-left: 20px; }
.check-box .chk-list.warnings li { color: var(--amber); }
.notes-toggle { margin: 0 0 12px; }
.frozen-note { display: flex; gap: 6px; align-items: center; margin: 0 0 10px; }
.frozen-note svg { width: 15px; height: 15px; }
.d-draft-head { text-align: right; font: 600 11px var(--sans); letter-spacing: .1em; color: var(--red); margin: -20px 0 20px; }
.doc-void { position: relative; overflow: hidden; }
.d-void-mark { position: absolute; top: 160px; left: 0; right: 0; text-align: center; font: 700 140px/1 var(--sans); letter-spacing: .12em; color: var(--red); opacity: .16; transform: rotate(-24deg); pointer-events: none; user-select: none; z-index: 1; }
@media (max-width: 600px) { .d-void-mark { font-size: 72px; top: 120px; } }
.status-error { padding: 12px 14px; font-size: 14px; }
.status-error ul { margin: 6px 0 0; padding-left: 18px; }
.more-menu { margin-top: 4px; }
.more-menu > summary { cursor: pointer; font-size: 13px; color: var(--graphite); width: max-content; border-radius: 4px; }
.more-body { padding: 8px 0 0; }
.caution-link { color: var(--amber) !important; }
.forced-label { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; margin: 12px 0 0; font-size: 14px; }
.forced-label svg { width: 16px; height: 16px; color: var(--amber); flex: none; margin-top: 2px; }
.sub.forced-label { color: var(--amber); padding: 0; margin: 2px 0 0; display: block; }
.sig-group { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--graphite); margin: 14px 0 4px; font-family: var(--sans); }
.sig-warn { color: var(--amber); display: flex; gap: 4px; align-items: flex-start; margin: 4px 0 0; }
.sig-warn svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.approval-meter { margin: 4px 0 6px; }
.approval-meter .progress { position: relative; }
.approval-meter .progress .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.approval-meter .progress.met span { background: var(--green); }
.next-steps .ns-list { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.next-steps .ns-list li > span:first-child { font-weight: 500; }
.next-steps .ns-note { display: block; }
.next-steps .ns-list .btn { margin-top: 6px; }
.next-steps li.done { color: var(--graphite); }
.usa-reserved { margin-bottom: 20px; }
.usa-reserved h3, .usa-reserved h2 { display: flex; gap: 6px; align-items: center; color: var(--amber); }
.usa-reserved h3 svg, .usa-reserved h2 svg { flex: none;  width: 17px; height: 17px; }
.usa-reserved ul { margin: 4px 0 8px; padding-left: 20px; }

/* Import review */
.hold-banner { margin: 12px 0 0; padding: 14px 16px; }
.hold-banner h4 { display: flex; gap: 6px; align-items: center; color: var(--red); margin-bottom: 4px; }
.hold-banner h4 svg { width: 16px; height: 16px; }
.hold-banner.overridden { background: var(--amber-tint); border-color: #F1DDAE; }
.hold-banner.overridden h4 { color: var(--amber); }
.needs-date { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 0; padding: 10px 12px; background: var(--amber-tint); border-radius: var(--r-sm); font-size: 14px; }
.needs-date input { width: auto; }
.doc-actions { margin-top: 10px; }
.undo-bar { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-bottom: 12px; }
.dup-note { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 12px 14px; margin-bottom: 12px; }
.dup-note p { display: flex; gap: 6px; align-items: center; }
.dup-note svg { width: 15px; height: 15px; }
.dup-note.compact { margin: 6px 0 0; padding: 8px 10px; font-size: 13.5px; }
.undo-list { max-height: 260px; overflow: auto; margin: 0; padding-left: 20px; font-size: 14px; }
.rq-chip-duplicate { color: var(--amber); }

/* Add a corporation */
.resume-list { margin-bottom: 20px; }
.resume-draft { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.track-q { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 12px 14px; margin: 14px 0 0; display: grid; gap: 8px; }
.track-q legend { font-weight: 600; padding: 0 4px; font-size: 14px; }
.track-q.flash { border-color: var(--amber); }
.draft-files summary { cursor: pointer; color: var(--accent); width: max-content; }
.draft-files ul { margin: 6px 0 0; padding-left: 20px; color: var(--ink-soft); }
.name-check-inline { margin-top: 8px; display: grid; gap: 6px; }
.name-check-inline .warn-text { display: flex; gap: 6px; align-items: flex-start; }
.name-check-inline svg, .dl-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.dl-note { display: flex; gap: 4px; align-items: flex-start; flex-wrap: wrap; margin: 4px 0 0; color: var(--amber); grid-column: 1 / -1; }
.sm-help { display: block; font-size: 12px; color: var(--graphite); grid-column: 2 / -1; }
.doc-warnings-card h2 { display: flex; gap: 8px; align-items: center; }
.doc-warnings-card h2 svg { width: 18px; height: 18px; color: var(--amber); }
.dw-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }

/* Year ends */
.ye-flags { margin-top: 12px; }
.ye-flags > summary { cursor: pointer; color: var(--accent); font-size: 13.5px; width: max-content; }
.ye-flags .form-grid { margin-top: 10px; }
.noa.superseded { opacity: .75; }
.noa-sup { margin: 0 0 6px; }
.amt.superseded { color: var(--graphite); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.amt.paid { color: var(--green); }

/* Minute book drafts, activity */
.mb-drafts { margin-top: 20px; }
.mb-draft-list { list-style: none; margin: 8px 0 0; padding: 0; }
.mb-draft-list li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.act-more summary, .act-group summary { cursor: pointer; }
.act-more summary { color: var(--accent); font-size: 13px; width: max-content; margin-top: 2px; }
.act-more dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }
.act-more dd { margin: 0; }
.activity .act { font-weight: 500; }
.activity .act a { color: var(--ink); }
.activity.nested li { grid-template-columns: 150px minmax(0, 1fr); padding: 8px 0; }
.activity.nested { margin-top: 8px; border-left: 2px solid var(--rule); padding-left: 12px; }
.prec.needs-review { border-color: #F1DDAE; }
.prec-missing { padding: 10px 14px; margin: 8px 0; }
.prec-missing ul { margin: 0; padding-left: 20px; }
.prec-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .prec-compare { grid-template-columns: 1fr; } .activity.nested li { grid-template-columns: 1fr; } }
.vars-help code { font-size: 12px; }
@media (forced-colors: active) { :focus-visible { outline: 2px solid CanvasText; } }
.kv.cu-row > span:first-child { flex: 1 1 auto; min-width: 0; }
.usa-table-wrap { overflow-x: auto; }
.kv > .cu-when { flex: none; flex-wrap: wrap; justify-content: flex-end; }
h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible, .tabs a[aria-current="page"]:focus:not(:focus-visible) { outline: none; box-shadow: none; }
body.viewer .tpl-body .btn, body.viewer .slot-head .btn, body.viewer .prec .actions { display: none !important; }

/* =====================================================================
   Hardening round 2 (UI): signing, follow-ups, pending transfers, USA editor, due cards
   ===================================================================== */
.dz-pick { font-weight: 700; }
.dropzone .dz-pick, .bigdrop .bigdrop-btn { position: relative; z-index: 1; }
/* UX-32: Overview due card, title on its own line, date and pill under it */
.cu-list { list-style: none; margin: 4px 0 10px; padding: 0; }
.cu-list .cu-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 9px 0; border-top: 1px solid var(--rule); }
.cu-list .cu-row:first-child { border-top: 0; }
.cu-list .cu-title { color: var(--ink); line-height: 1.35; }
.cu-list .cu-when { justify-content: flex-start; flex-wrap: wrap; font-size: 14px; gap: 8px; }
/* USA editor: visible labels per control (C-34) */
.mini-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini-field.grow { flex: 1 1 200px; }
.mini-label { font-size: 12px; color: var(--graphite); font-weight: 600; }
.usa-row { align-items: flex-end; }
.usa-row .th-in { min-width: 172px; }
.usa-row > .mini-field:first-child { flex: 1 1 220px; }
.usa-row .mini-field select, .usa-row .mini-field input { width: 100%; }
.usa-row .sec-in { width: 96px; }
.usa-row .num-in { width: 110px; }
.usa-pct .mini-field select { width: 190px; }
.usa-pct.hidden { display: none; }
.perm-rows { display: grid; gap: 10px; margin: 6px 0 8px; }
.perm-row { border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 8px; }
.perm-main { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.perm-conds { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.perm-h { margin: 14px 0 2px; font-size: 15px; }
/* Conditions on transfer and issue forms (C-8c) */
.conditions .cond-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.cond-row { display: grid; gap: 6px; }
.cond-extra { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 28px; align-items: center; }
.cond-extra.hidden { display: none; }
.cond-extra select { max-width: 320px; }
/* Next steps as tasks (C-8c, DE-10) */
.next-steps .ns-list.tasks { list-style: none; padding: 0; }
.next-steps .task .check { align-items: flex-start; }
.next-steps .chip.mini { margin-left: 6px; }
.next-steps .pending-note { display: flex; gap: 6px; align-items: center; color: var(--ink-soft); margin: 0 0 8px; }
.next-steps .pending-note svg { width: 16px; height: 16px; color: var(--amber); }
.complete-box { border-top: 1px solid var(--rule); margin-top: 10px; padding-top: 10px; }
.ns-done { margin-top: 10px; }
.ns-done > summary { cursor: pointer; font-size: 14px; color: var(--graphite); }
/* Signing panel (C-2c, C-5c, C-6c) */
.sign-warnings { margin: 0 0 10px; padding: 10px 12px; }
.sign-warnings ul { margin: 0; padding-left: 18px; font-size: 14px; }
.already-signed { margin-top: 4px; }
.force-blocked { display: flex; gap: 6px; align-items: flex-start; margin: 0; color: var(--ink-soft); }
.force-blocked svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--amber); }
.approval-req + .approval-req { margin-top: 8px; }
.approval-summary { margin-top: 10px; }
.dating-card .field { margin-top: 8px; }
/* Mark past items done (C-14a) */
.bulk-list { list-style: none; padding: 0; margin: 0; max-height: 52vh; overflow: auto; border: 1px solid var(--rule); border-radius: var(--r-sm); }
.bulk-row { padding: 10px 12px; border-top: 1px solid var(--rule); }
.bulk-row:first-child { border-top: 0; }
.bulk-row.careful { background: var(--sheet-tint); }
.bulk-hint { margin: 4px 0 0 28px; }
/* Dashboard card counts (C-31) */
.entity-card .dates-to-add { color: var(--red); margin-top: 2px; font-weight: 600; }
/* Pending ledger rows (DE-4) */
.pending-row td { background: var(--sheet-tint); }
/* Pickers grouped by corporation (C-29) */
.pick-group { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--graphite); }
.pick-other > summary { cursor: pointer; font-size: 14px; color: var(--ink-soft); margin: 4px 0; }
.closes-item { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 12px; }
.closes-item svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
.baseline-card { margin-bottom: 20px; }
.to-decide { margin-top: 12px; }
/* C-33: corporate signature blocks in the preview, laid out as in Word */
.doc-page .d-sig .per { margin-top: 22px; }
.doc-page .d-sig .auth { font-style: italic; }
.scroll-x { overflow-x: auto; }
.scroll-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mini-field > input, .mini-field > select { flex: none; height: auto; }
.usa-row .mini-field .num-in, .usa-row .mini-field .sec-in { flex: none; }
.usa-row > .mini-field { flex: 0 0 auto; }
.usa-row > .mini-field.grow { flex: 1 1 200px; }
.usa-row .mini-field .num-in { width: 120px; }
.usa-row .mini-field .sec-in { width: 100px; }
.usa-pct .mini-field .num-in { width: 80px; }
.usa-row > button { align-self: flex-end; margin-bottom: 4px; }

/* Final QA, fix team A */
/* QA-SEC-17: headings moved to the second level keep their look. */
.callout h2.h3 { color: var(--accent-dark); margin-bottom: 6px; }
.callout.danger h2.h3 { color: var(--red); }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* QA-DOC-18 (e), QA-SEC-17: long values in the review wrap instead of overflowing on a phone. */
.prop, .prop-sentence, .prop-fields dd, .prop-fields dt, .conflict-line, .quote .q-text, .review-docs { overflow-wrap: anywhere; min-width: 0; }
.prop-fields { grid-template-columns: minmax(0, auto) minmax(0, 1fr); }
@media (max-width: 600px) { .review-docs, .review, .prop-tags { min-width: 0; max-width: 100%; } .prop-head { flex-wrap: wrap; } }
