/* Company-data and member pages, in the same design as the service pages (DESIGN_site.md).
   Loaded after lida.css, which supplies the colour tokens, the header and the footer.
   Status is always carried by words, never by colour alone; no gradients, no lights, no gauges. */
:root { --error: #a1260d; }

/* ── 標示條 ─────────────────────────────────────── */
.demo-banner, .pilot-banner {
  margin: 0; padding: 4px 16px; text-align: center; font-size: 0.875rem; font-weight: 700;
  color: var(--primary); background: var(--wash); border-bottom: 1px solid var(--line);
}

/* ── 帳號連結（頁首） ───────────────────────────────── */
.account-nav { display: flex; gap: 16px; align-items: center; }
@media (min-width: 900px) { .account-nav { padding-left: 16px; border-left: 1px solid var(--line); } }
.account-nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.account-nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.account-nav .link-button { padding: 4px 0; border-bottom: 2px solid transparent; text-decoration: none; }
.account-nav .link-button:hover { border-bottom-color: var(--primary); text-decoration: none; }
.inline-form { display: inline; margin: 0; }
.link-button {
  display: inline; min-height: 0; padding: 4px 0; border: 0; background: none; font: inherit; cursor: pointer;
  color: var(--ink); text-decoration: none;
}
.link-button:hover { color: var(--primary); text-decoration: underline; }

/* ── 版面 ─────────────────────────────────────── */
.data-page { padding-top: 40px; padding-bottom: 24px; }
.messages { list-style: none; padding: 0; margin: 0 0 24px; }
.message { padding: 12px 16px; background: var(--wash); border: 1px solid var(--line); margin-bottom: 8px; max-width: var(--measure); }
.message.error { border: 2px solid var(--error); background: var(--white); font-weight: 700; }
.sheet { max-width: 52rem; margin: 0 0 40px; }
.sheet.narrow { max-width: 36rem; }
.sheet.report { max-width: 60rem; }
.sheet-head { padding: 0 0 24px; border-bottom: 3px solid var(--ink-strong); }
.sheet-title, .slip-name {
  margin: 0; font-weight: 900; font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.2; letter-spacing: -0.01em; color: var(--ink-strong);
}
.lede { margin: 10px 0 0; max-width: 40em; font-family: var(--serif); font-size: 1.125rem; line-height: 1.8; color: var(--ink-strong); }
.sheet-subject { margin: 8px 0 0; font-size: 1.125rem; font-weight: 700; }
.sheet-subject a { color: var(--ink-strong); }
.sheet-head .ban-line { margin-top: 12px; }
.sheet-head .fine { margin-top: 12px; }
.part { padding: 28px 0; border-top: 3px solid var(--ink-strong); min-width: 0; }
.sheet-head + .part, .slip-body > .part:first-child { border-top: 0; }
.part-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; }
.part-head h2, .part-title { margin: 0; font-family: var(--serif); font-size: 1.5rem; line-height: 1.4; font-weight: 900; color: var(--ink-strong); }
.part-head h3 { margin: 0; }
.part-lede { margin: 0 0 14px; color: var(--muted); max-width: var(--measure); }
.fine { margin: 12px 0 0; font-size: 0.875rem; line-height: 1.7; color: var(--muted); max-width: var(--measure); }
.hint, .muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.num, time { font-variant-numeric: tabular-nums; }
.note { display: block; font-size: 0.875rem; line-height: 1.6; color: var(--muted); font-weight: 400; }
.source { margin: 12px 0 0; font-size: 0.875rem; color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.875rem; overflow-wrap: anywhere; }
.actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.reply-action { margin: 20px 0 0; }
.part > .hint { margin: 0; }

/* 注意事項、提醒 */
.notice, .pair-note { margin: 12px 0 0; padding: 12px 16px; background: var(--wash); border: 1px solid var(--line); max-width: var(--measure); }
.notes { margin: 0; padding-left: 1.5rem; max-width: var(--measure); }
.notes li { padding: 4px 0 4px 4px; }
.notes li::marker { font-family: var(--serif); color: var(--primary); font-weight: 900; }
.draft-band {
  margin: 0 0 24px; padding: 8px 12px; font-size: 0.9rem; font-weight: 700; max-width: var(--measure);
  background: var(--wash); border: 2px dashed var(--muted); color: var(--ink); border-radius: 0;
}
.part-reply { margin-top: 8px; padding: 24px; background: var(--wash); border: 1px solid var(--line); border-radius: 0; }
.part-reply p { max-width: var(--measure); }
.part-reply > .part-head + p, .part-reply > p:first-child { margin-top: 0; }
.blank-below { margin: 16px 0 0; text-align: center; font-size: 0.8125rem; color: var(--muted); }

/* 標記與狀態：用字表達，不靠顏色 */
.mark, .note-inline, .stamp {
  display: inline-block; margin-left: 8px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--muted); font-size: 0.8125rem; font-weight: 500; line-height: 1.7; vertical-align: 0.1em; white-space: nowrap;
  background: var(--white);
}
.stamp { margin: 0; vertical-align: baseline; font-variant-numeric: tabular-nums; }
.stamp-extra { margin-left: 8px; }
.part-head .stamp, .stream-head .stamp { margin-left: 0; }
.unchecked { display: inline-block; padding: 0 8px; border: 1px dashed var(--muted); background: var(--wash); color: var(--ink); font-weight: 500; }
.state-unchecked, .state-none { margin: 0; }
.state-unchecked .note, .state-none .note { margin-top: 4px; }
.chip { display: inline-block; font-size: 0.875rem; line-height: 1.7; padding: 0 10px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.chip-alt { border-style: dashed; border-color: var(--muted); background: var(--wash); }

/* ── 統一編號 ───────────────────────────────────── */
.ban-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 0; }
.ban-label { color: var(--muted); font-size: 0.9375rem; }
.ban-boxes { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.ban-boxes span { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 2.25rem; font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; color: var(--ink-strong); }
.ban-boxes span + span { border-left: 1px solid var(--line); }
.slip-ban .note { margin-top: 6px; }

/* ── 搜尋 ─────────────────────────────────────── */
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 0; }
.search-row label { grid-column: 1 / -1; font-weight: 600; color: var(--ink-strong); }
.search-row input { min-height: 3rem; font-size: 1.0625rem; border-right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.search-row button { border-radius: 0 var(--radius) var(--radius) 0; padding: 0 24px; }
.checkbox-line { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; }
.checkbox-line input { margin-top: 0.4rem; flex: none; }
.checkbox-line label { cursor: pointer; }
.results { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.results li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.results li:first-child { border-top: 0; }
.results a { grid-column: 1 / -1; font-weight: 700; font-size: 1.0625rem; }
.results .ban { color: var(--muted); font-variant-numeric: tabular-nums; }
.results .chip { justify-self: end; }
.results .alias-hit { grid-column: 1 / -1; font-size: 0.875rem; color: var(--muted); }
@media (min-width: 560px) {
  .results li { grid-template-columns: minmax(0, 1fr) 7rem 9rem; }
  .results a { grid-column: auto; }
}

/* ── 表單 ─────────────────────────────────────── */
.data-page input[type="search"], .data-page input[type="text"], .data-page input[type="email"], .data-page input[type="password"],
.data-page input[type="number"], .data-page select, .data-page textarea {
  font: inherit; color: var(--ink); background: var(--white); border: 1px solid #8a96a3; border-radius: var(--radius);
  padding: 8px 12px; min-height: 2.75rem;
}
.data-page input[type="search"] { flex: 1; min-width: 0; }
.data-page input::placeholder, .data-page textarea::placeholder { color: var(--muted); opacity: 1; }
.data-page input[type="checkbox"], .data-page input[type="radio"] { accent-color: var(--primary); width: 1.125rem; height: 1.125rem; margin: 0; }
main button:not(.link-button) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 8px 22px;
  font: inherit; font-weight: 600; color: #fff; background: var(--primary); border: 2px solid var(--primary); border-radius: var(--radius); cursor: pointer;
}
main button:not(.link-button):hover { background: var(--primary-deep); border-color: var(--primary-deep); }
main button.secondary { background: var(--white); color: var(--primary); }
main button.secondary:hover { background: var(--wash); color: var(--primary-deep); }
main button:disabled { opacity: 0.5; cursor: not-allowed; }
.form-card form > div { margin-bottom: 22px; }
.form-card form > div > label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--ink-strong); }
.form-card input[type="text"], .form-card input[type="email"], .form-card select, .form-card textarea,
.inline-code input[type="text"], .review-form input { width: 100%; max-width: 32.5rem; }
.form-card textarea { min-height: 8rem; line-height: 1.7; }
.form-card form > div:has(> input[type="checkbox"]) { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: flex-start; gap: 10px; }
.form-card form > div:has(> input[type="checkbox"]) > input { margin-top: 0.3rem; flex: none; }
.form-card form > div:has(> input[type="checkbox"]) > label { margin: 0; font-weight: 400; color: var(--ink); cursor: pointer; }
.form-card form > div:has(> input[type="checkbox"]) > .errorlist { flex-basis: 100%; order: -1; }
.form-card fieldset { margin: 0; padding: 8px 14px 12px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 32.5rem; }
.form-card legend { padding: 0 6px; font-weight: 600; color: var(--ink-strong); }
.form-card fieldset label { display: flex; align-items: center; gap: 8px; min-height: 2.25rem; cursor: pointer; }
/* Required fields of a form with more than one field (core/forms.py): an asterisk after the label, as on the inquiry form. */
.form-card .required > label::after, .form-card .required > fieldset > legend::after { content: " *"; content: " *" / ""; color: var(--error); }
.form-card .helptext, .form-card [id$="_helptext"] { display: block; font-size: 0.875rem; color: var(--muted); margin: 0 0 6px; }
.form-card ul[id$="plan"] { list-style: none; padding: 0; }
.code-form input[type="text"] { max-width: 15rem; min-height: 3.5rem; text-align: center; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.4em; text-indent: 0.4em; font-variant-numeric: tabular-nums; }
.errorlist { list-style: none; padding: 0; margin: 4px 0; color: var(--error); font-weight: 600; }
.error-summary { max-width: 32.5rem; }
.form-card [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.inline-code { margin-top: 16px; }

/* ── 方案 ─────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 20px; }
.plan { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--ink-strong); border-radius: 0; padding: 20px; }
.plan h2 { margin: 0 0 6px; font-size: 1.2rem; color: var(--ink-strong); }
.price { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 1.25rem; font-weight: 700; color: var(--ink-strong); }
.plan ul { margin: 0; padding-left: 1.125rem; font-size: 0.9375rem; }
.plan li + li { margin-top: 4px; }

/* ── 說明文件 ───────────────────────────────────── */
.part.prose > * { max-width: var(--measure); }
.prose h2 { margin: 32px 0 8px; font-size: 1.25rem; color: var(--ink-strong); }
.prose h2:first-child, .prose .draft-band + h2 { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 4px; }

/* ── 認領流程 ───────────────────────────────────── */
/* A sequence of steps: round markers joined by a line, never the square checkbox (that one is a
   done / not-done mark for a field, see .check-grid below). The markers carry no number because the
   steps and the two verification stages are counted differently. Stacked on a phone, in a row from 640px. */
.flow { list-style: none; margin: 0 0 20px; padding: 0 0 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); font-size: 0.9375rem; color: var(--muted); }
.flow li { display: flex; align-items: center; gap: 10px; }
.flow-dot { position: relative; flex: none; width: 1.25rem; height: 1.25rem; border: 2px solid var(--muted); border-radius: 50%; background: var(--white); }
.flow li.current { color: var(--ink-strong); font-weight: 700; }
.flow li.current .flow-dot { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px var(--white); }
.flow li.done { color: var(--primary); }
.flow li.done .flow-dot { border-color: var(--primary); background: var(--primary); }
.flow li.done .flow-dot::after {
  content: ""; position: absolute; left: 0.3125rem; top: 0.0625rem; width: 0.3125rem; height: 0.625rem;
  border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
@media (min-width: 640px) {
  .flow { flex-direction: row; align-items: center; gap: 0; }
  .flow li + li::before { content: ""; flex: none; width: 2.5rem; height: 2px; margin-inline: 12px; background: var(--line); }
  .flow li.done + li::before, .flow li.current::before { background: var(--primary); }
}
.flow-box { position: relative; flex: none; width: 1.125rem; height: 1.125rem; border: 2px solid var(--muted); border-radius: 3px; }
.check-grid .done .flow-box { border-color: var(--primary); }
.check-grid .done .flow-box::after {
  content: ""; position: absolute; left: 0.3125rem; top: 0.0625rem; width: 0.3125rem; height: 0.625rem;
  border: solid var(--primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ── 表格 ─────────────────────────────────────── */
.counts, .ledger { border-collapse: collapse; width: 100%; max-width: 32rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.counts th, .counts td, .ledger th, .ledger td { padding: 8px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.counts thead th, .ledger thead th, .counts tbody th, .ledger tbody th { background: var(--wash); color: var(--ink-strong); font-weight: 600; }
.ledger td { text-align: right; font-weight: 700; font-size: 1.0625rem; }
.counts.wide { max-width: none; }
.counts.wide th, .counts.wide td { white-space: nowrap; }
.counts.wide td:has(a) { white-space: normal; min-width: 14em; }
.table-scroll { overflow-x: auto; }
.month-table { max-width: none; }
.num-cell, .heat-cell { font-variant-numeric: tabular-nums; }
.heat-cell { font-weight: 700; }
@media (max-width: 559px) {
  .table-scroll:has(.stack) { overflow: visible; }
  .counts.stack, .counts.stack tbody, .counts.stack tr, .counts.stack td { display: block; width: 100%; }
  .counts.stack { border: 0; }
  .counts.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .counts.stack tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 0; margin-bottom: 12px; }
  .counts.stack td { display: grid; grid-template-columns: minmax(4.5rem, 36%) minmax(0, 1fr); gap: 8px; border: 0; padding: 2px 14px; white-space: normal; min-width: 0; }
  .counts.stack td::before { content: attr(data-label); font-size: 0.8125rem; color: var(--muted); }
}
.table-view { margin-top: 8px; }
.table-view summary { display: inline-flex; align-items: center; gap: 8px; min-height: 2.75rem; cursor: pointer; color: var(--primary); font-size: 0.9375rem; font-weight: 600; }

/* ── 圖表 ─────────────────────────────────────── */
.chart-wrap { margin: 12px 0 0; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: var(--primary); }
.chart .axis { stroke: var(--ink); stroke-width: 1.5; }
.chart .slot { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-family: inherit; font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .value-label { fill: var(--ink-strong); font-family: inherit; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-narrow { display: none; }
.chart-narrow .chart .axis-label { font-size: 12.5px; }
.chart-narrow .chart .value-label { font-size: 13px; }
@media (max-width: 559px) {
  .chart-wide { display: none; }
  .chart-narrow { display: block; }
}

/* ── 新聞與公開資訊、關鍵詞、自述 ───────────────────── */
.disclaimer { margin: 0 0 20px; font-size: 0.9375rem; color: var(--muted); max-width: var(--measure); }
.stream + .stream { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.stream-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
.stream-head h3, .stream > h3 { margin: 0 0 4px; font-size: 1.15rem; color: var(--ink-strong); }
.stream-total { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.stream-total .num { font-size: 1.125rem; font-weight: 700; color: var(--ink-strong); }
.stream h4 { margin: 20px 0 8px; font-size: 1rem; color: var(--ink-strong); }
.keywords { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.keywords .kw { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; line-height: 1.7; }
.kw-word { padding: 0 10px; }
.kw-count { padding: 0 10px; border-left: 1px solid var(--line); background: var(--wash); color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.statement { padding: 16px 0; border-top: 1px solid var(--line); }
.statement:first-of-type { border-top: 0; padding-top: 0; }
.statement p { margin: 0; max-width: var(--measure); }
.statement-topic { color: var(--muted); font-size: 0.9375rem; margin: 0 0 6px !important; }
.statement-meta { margin-top: 10px !important; }
.excerpts { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.excerpts li { border-top: 1px solid var(--line); padding: 12px 0; }
.excerpts li:first-child { border-top: 0; padding-top: 0; }
.excerpts p { margin: 0 0 4px; }

/* ── 公司頁 ───────────────────────────────────── */
.slip { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stub" "body"; gap: 0 40px; margin-bottom: 40px; }
.slip-head { grid-area: head; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name seal" "ban seal"; gap: 12px 20px; align-items: start; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.slip-name { grid-area: name; }
.slip-head.has-alias { grid-template-areas: "name seal" "alias seal" "ban seal"; }
.slip-alias { grid-area: alias; margin: 0; color: var(--ink); }
.slip-alias .note { margin-top: 2px; }
.slip-ban { grid-area: ban; min-width: 0; }
.slip-body { grid-area: body; min-width: 0; }
.slip-stub { grid-area: stub; margin: 24px 0 0; padding: 20px; background: var(--wash); border: 1px solid var(--line); border-radius: 0; align-self: start; }
.stub-title { margin: 0 0 12px; font-family: var(--serif); font-size: 1.1875rem; font-weight: 900; color: var(--ink-strong); }
.stub-rows { margin: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.stub-rows div { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.stub-rows dt { font-size: 0.875rem; color: var(--muted); }
.stub-rows dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.stub-caption { margin: 8px 0 0; font-size: 0.875rem; color: var(--muted); }
.stub-block { margin-top: 20px; }
.stub-block h3 { margin: 0 0 4px; font-size: 0.9375rem; color: var(--ink-strong); }
.stub-block p, .stub-block ul { margin: 0; font-size: 0.9375rem; }
.stub-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.stub-note { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.875rem; line-height: 1.7; color: var(--muted); }
@media (min-width: 900px) {
  .slip { grid-template-columns: minmax(0, 1fr) 17rem; grid-template-areas: "head stub" "body stub"; }
  .slip-stub { margin-top: 0; grid-row: 1 / span 2; position: sticky; top: 96px; }
}
.seal-slot { grid-area: seal; margin: 0; }
.seal { display: inline-block; padding: 4px 14px; font-weight: 700; font-size: 0.9375rem; line-height: 1.6; border-radius: var(--radius); border: 2px solid var(--primary); color: var(--primary); background: var(--white); }
.seal-claimed { background: var(--primary); color: #fff; }
.seal-unclaimed { border-color: var(--line); color: var(--muted); font-weight: 400; }
.seal-open { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-decoration: none; max-width: 11rem; text-align: right; }
.seal-open:hover .seal { background: var(--wash); }
.seal-caption { font-size: 0.8125rem; line-height: 1.5; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.form-grid { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.form-row { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.form-row:first-child { border-top: 0; }
.form-row dt { padding: 8px 14px 0; font-size: 0.9375rem; font-weight: 600; color: var(--ink-strong); }
.form-row dd { margin: 0; padding: 0 14px 10px; }
.form-row dd .note { margin-top: 2px; }
@media (min-width: 560px) {
  .form-row { grid-template-columns: 9rem minmax(0, 1fr); }
  .form-row dt { padding: 10px 14px; background: var(--wash); border-right: 1px solid var(--line); }
  .form-row dd { padding: 10px 14px; }
}

/* ── 會員頁 ───────────────────────────────────── */
.claim-slip { padding-bottom: 8px; }
.claim-name { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.35; }
.claim-name a { color: var(--ink-strong); }
.claim-ban { margin: 4px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.check-grid dt { display: flex; align-items: center; gap: 8px; }
.claim-links { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.claim-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.ledger-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.ledger-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 14px; border-top: 1px solid var(--line); }
.ledger-list li:first-child { border-top: 0; }
.ledger-list .mark { margin-left: 0; }
.ledger-list .st-topic { flex: 1 1 9rem; min-width: 0; color: var(--ink-strong); }
.ledger-list .note { flex-basis: 100%; }
.member-note { max-width: 52rem; margin: 0 0 24px; }
.report-meta { margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 8px 20px; max-width: 40rem; }
.report-meta div { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.report-meta dt { font-size: 0.875rem; color: var(--muted); }
.report-meta dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.report-actions { margin-top: 20px; }
.sheet-title .mark { font-size: 0.8125rem; }
.report-section h3 { margin: 0 0 4px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Sources page: one card per source, the facts as a label column and a value column. */
.prose .source-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 16px; }
.prose .source-list > li { margin: 0; }
.source-item { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--ink-strong); border-radius: 0; padding: 16px 20px 18px; min-width: 0; }
.source-item > p { margin: 0 0 8px; font-size: 1.0625rem; color: var(--ink-strong); }
.source-facts { margin: 0; display: grid; gap: 4px; }
.source-facts > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0 16px; }
.source-facts dt { color: var(--muted); font-size: 0.875rem; padding-top: 0.15rem; }
.source-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 559px) {
  .source-item { padding: 14px 16px 16px; }
  .source-facts > div { grid-template-columns: minmax(0, 1fr); }
}
