/* Editorial Ledger: the canonical screen presentation for HTML reports.
   It extends the PDF export's pale wash, navy type, large section numerals,
   and gold editorial rules without changing print output. */

html {
  background: #eaf2f8;
  color-scheme: light;
}

.artifact-shell {
  --bg: #eaf2f8;
  --surface: #fbfdff;
  --surface-strong: #edf3f7;
  --text: #18222d;
  --text-secondary: #344454;
  --text-muted: #667483;
  --border-subtle: #cbd8e3;
  --border-strong: #91a6b8;
  --accent-blue: #173b58;
  --accent-green: #547263;
  --accent-yellow: #ad8a32;
  --accent-red: #8d4650;
  --font-prose: Aptos, "Helvetica Neue", Arial, sans-serif;
  --font-ui: Aptos, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  background: #eaf2f8;
  font-family: var(--font-ui);
}

.artifact-document {
  background: #fbfdff;
  border-left: 1px solid #d2dde6;
  border-right: 1px solid #d2dde6;
  box-shadow: 0 18px 54px rgba(29, 53, 74, 0.09);
  max-width: 1220px;
  padding: 52px 70px 88px;
}

.artifact-colophon.is-top {
  border-bottom-color: #cbd8e3;
  margin-bottom: 0;
  padding-bottom: 14px;
}

.artifact-colophon .ac-prep,
.artifact-colophon .ac-date {
  color: #667483;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.artifact-colophon .ac-mark rect {
  fill: #173b58;
}

.artifact-colophon .ac-word {
  color: #173b58;
  font-family: var(--font-ui);
}

.artifact-hero {
  border-bottom: 0;
  padding: 70px 0 58px;
  position: relative;
}

.artifact-hero::before {
  background: #ad8a32;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  top: 38px;
  width: 74px;
}

.artifact-hero h1 {
  color: #173b58;
  font-family: var(--font-ui);
  font-size: clamp(3rem, 5.2vw, 4.85rem);
  font-weight: 400;
  line-height: 0.99;
  max-width: 940px;
}

.artifact-subtitle {
  color: #405365;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-top: 24px;
  max-width: 900px;
  text-transform: uppercase;
}

.artifact-dek {
  color: #506171;
  font-family: var(--font-ui);
  font-size: 1.12rem;
  line-height: 1.6;
  margin-top: 18px;
  max-width: 760px;
}

.artifact-opening {
  background: #edf3f7;
  border-bottom: 1px solid #b9c9d6;
  border-top: 1px solid #b9c9d6;
  gap: 44px;
  grid-template-columns: minmax(0, 1.45fr) minmax(230px, 0.55fr);
  margin: 0 -32px;
  padding: 32px;
}

.opening-narrative,
.opening-metrics {
  border-top: 0;
  padding-top: 0;
}

.opening-kicker,
.opening-lead span,
.opening-brief span,
.metric-item span,
.section-label,
.appendix-kicker,
.source-register-fold summary,
.data-table figcaption {
  color: #4d6071;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
}

.opening-lead p {
  color: #173b58;
  font-family: var(--font-ui);
  font-size: clamp(1.24rem, 1.8vw, 1.52rem);
  font-weight: 500;
  line-height: 1.42;
}

.opening-briefs {
  border-top-color: #c6d4df;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.opening-brief {
  border-bottom: 0;
  padding-right: 0;
}

.opening-brief p {
  color: #445565;
  font-family: var(--font-ui);
  font-size: 0.93rem;
}

.opening-metrics {
  border-left: 1px solid #b9c9d6;
  padding-left: 28px;
}

.metric-item {
  border-top-color: #c6d4df;
  padding: 18px 0;
}

.metric-item strong {
  color: #173b58;
  font-family: var(--font-ui);
  font-size: 2.05rem;
  font-weight: 400;
}

.metric-item p {
  color: #667483;
  font-family: var(--font-ui);
}

.artifact-body {
  margin-top: 30px;
}

.brief-section {
  border-top-color: #cbd8e3;
  column-gap: 46px;
  grid-template-columns: 142px minmax(0, 1fr);
  padding: 52px 0;
}

.brief-section:first-child {
  padding-top: 30px;
}

.brief-section-label {
  border-top: 0;
  padding-top: 0;
}

.brief-section-label span {
  color: #667483;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

.brief-section-label strong {
  color: #173b58;
  font-family: var(--font-ui);
  font-size: 3.35rem;
  font-weight: 300;
  line-height: 0.9;
  margin-top: 10px;
}

.section-heading-group h2 {
  color: #344b60;
  font-family: var(--font-ui);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.45;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.section-content {
  max-width: 780px;
}

.section-content p,
.unknowns-section span,
.source-appendix p {
  color: #344454;
  font-family: var(--font-ui);
  font-size: 1.02rem;
  line-height: 1.72;
}

.block-heading,
.key-findings h3,
.callout h3 {
  color: #536779;
  font-family: var(--font-ui);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.key-findings {
  border-top: 1px solid #91a6b8;
  margin: 30px 0;
}

.key-findings h3 {
  margin-top: 13px;
}

.key-findings li {
  border-top-color: #d2dde6;
  color: #344454;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  padding: 14px 0;
}

.callout {
  background: transparent;
  border-bottom: 1px solid #ad8a32;
  border-left: 0;
  border-top: 1px solid #ad8a32;
  margin: 32px 34px;
  padding: 18px 24px;
  text-align: center;
}

.callout h3,
.callout p {
  color: #8b6c20;
}

.callout p {
  font-family: var(--font-ui);
  font-style: italic;
}

.data-table.table-matrix {
  border-top-color: #91a6b8;
}

.data-table th {
  background: #f3f7fa;
  border: 1px solid #cbd8e3;
  color: #3f5366;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0.66rem 0.78rem;
}

.data-table td {
  border: 1px solid #d5dfe7;
  color: #344454;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 0.72rem 0.78rem;
}

/* The structural sheet removes the left inset in appendix tables. Restore a
   consistent cell gutter now that Editorial Ledger uses visible cell rules. */
.artifact-appendix .data-table th {
  padding: 0.66rem 0.78rem;
}

.artifact-appendix .data-table td {
  padding: 0.72rem 0.78rem;
}

.data-table.table-matrix td:first-child,
.data-table td strong {
  color: #173b58;
  font-family: var(--font-ui);
}

.artifact-appendix {
  background: #edf3f7;
  border-top: 3px solid #173b58;
  margin: 42px -32px 0;
  padding: 38px 32px 28px;
}

.artifact-appendix > h2 {
  color: #173b58;
  font-family: var(--font-ui);
  font-size: 1.5rem;
  font-weight: 500;
}

.appendix-intro {
  color: #607080;
  font-family: var(--font-ui);
}

.artifact-appendix .confidence-section,
.artifact-appendix .unknowns-section,
.artifact-appendix .source-appendix {
  border-top-color: #c6d4df;
  grid-template-columns: 142px minmax(0, 1fr);
}

.unknowns-section strong,
.source-appendix strong,
.confidence-table td:nth-child(2),
.confidence-table td:nth-child(3) {
  font-family: var(--font-ui);
}

.tier-pill {
  color: #8b6c20;
}

.source-ref {
  color: #547263;
}

.scope-note {
  grid-template-columns: 142px minmax(0, 1fr);
}

.artifact-colophon.is-bottom {
  border-top-color: #cbd8e3;
}

@media screen and (max-width: 780px) {
  .artifact-document {
    border: 0;
    padding: 30px 20px 52px;
  }

  .artifact-hero {
    padding: 62px 0 40px;
  }

  .artifact-hero h1 {
    font-size: 2.65rem;
  }

  .artifact-opening,
  .artifact-appendix {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .opening-metrics {
    border-left: 0;
    border-top: 1px solid #b9c9d6;
    padding-left: 0;
    padding-top: 24px;
  }

  .brief-section {
    padding: 38px 0;
  }

  .brief-section-label strong {
    font-size: 2.55rem;
  }

  .section-heading-group h2 {
    font-size: 0.88rem;
  }

  .callout {
    margin-left: 0;
    margin-right: 0;
  }

  .artifact-appendix .source-register td {
    padding: 4px 0;
  }

  .artifact-appendix .source-register td:first-child {
    padding-bottom: 7px;
  }
}
