/* Layout concept: a reader's term sheet. Wide editorial hero with a navy "ledger" of the week's figures,
   then calm single-column sections; figures set in mono with tabular digits. */
:root {
  --paper: #F6F4EE;
  --surface: #FFFFFF;
  --ink: #14213D;
  --text: #2A3550;
  --muted: #4E5A72;
  --rule: #D9D4C7;
  --accent: #9A4708;
  --accent-hover: #7E3A06;
  --on-accent: #FFFFFF;
  --band: #14213D;
  --band-text: #F3EFE6;
  --band-muted: #B9C1D3;
  --band-fig: #F0B377;
  --band-rule: #2C3A5C;
  --ok: #1E6B3A;
  --err: #A1260F;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.5rem, 6vw, 4.25rem);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1628; --surface: #152038; --ink: #F3EFE6; --text: #D3D8E2; --muted: #A2ACBF;
    --rule: #2A3652; --accent: #E89A52; --accent-hover: #F2AE6E; --on-accent: #14213D;
    --band: #1A2643; --band-text: #F3EFE6; --band-muted: #A9B3C7; --band-fig: #F0B377; --band-rule: #2E3C5E;
    --ok: #6FCF8E; --err: #FF8A73; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1628; --surface: #152038; --ink: #F3EFE6; --text: #D3D8E2; --muted: #A2ACBF;
  --rule: #2A3652; --accent: #E89A52; --accent-hover: #F2AE6E; --on-accent: #14213D;
  --band: #1A2643; --band-text: #F3EFE6; --band-muted: #A9B3C7; --band-fig: #F0B377; --band-rule: #2E3C5E;
  --ok: #6FCF8E; --err: #FF8A73; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; text-wrap: balance; margin: 0; font-weight: 700; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; background: #14213D; color: #F6F4EE; box-shadow: 0 0 0 1px var(--band-rule); padding: 5px 6px 4px; border-radius: 3px; line-height: 1; }
.brand-mark span { color: #F0B377; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; font-size: var(--step--1); }
.nav a { color: var(--text); text-decoration: none; padding-block: 6px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav a.btn { color: var(--on-accent); text-decoration: none; }
@media (max-width: 640px) {
  .head-row { flex-wrap: wrap; row-gap: 4px; }
  .brand-name { font-size: 1.0625rem; }
  .nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 20px; border-top: 1px solid var(--rule); padding-top: 6px; }
  .nav a.btn { display: none; }
  .head-row::after { content: none; }
  .site-head { position: static; }
}

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 4px; cursor: pointer;
  font: 600 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap; transition: background .15s;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.875rem; }
.signup { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.signup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input[type=email] {
  flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 0 14px; font: 400 1rem var(--font-body);
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--rule); border-radius: 4px;
}
.signup input[type=email]::placeholder { color: var(--muted); opacity: .8; }
.signup input[type=email]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.signup input[aria-invalid="true"] { border-color: var(--err); }
.form-msg { font-size: var(--step--1); min-height: 0; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--ok); font-weight: 500; }
.form-msg.err { color: var(--err); }
.form-note { font-size: var(--step--1); color: var(--muted); }
.signup.done .signup-row { display: none; }
.signup-dark .form-note { color: var(--band-muted); }
.signup-dark .form-msg.ok { color: var(--band-fig); }
.signup-dark .form-msg.err { color: #FFB4A3; }
.signup-dark .form-msg a { color: var(--band-fig); }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.eyebrow a { color: inherit; }
.hero h1 { font-size: var(--step-4); letter-spacing: -0.025em; font-variation-settings: "opsz" 144; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--text); max-width: 34ch; }
.page .lede { max-width: none; }
.hero-alt { font-size: var(--step--1); }
.hero-alt a { font-weight: 500; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .lede { max-width: none; } }

/* Ledger card */
.ledger { background: var(--band); color: var(--band-text); border-radius: 6px; padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ledger-kicker { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--band-muted); }
.ledger h2 { color: var(--band-text); font-size: var(--step-2); margin-top: 6px; }
.ledger-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ledger-list li { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); gap: 16px; align-items: baseline; padding-block: 12px; border-top: 1px dashed var(--band-rule); }
.ledger-list li:first-child { border-top: 0; padding-top: 0; }
.fig { font-family: var(--font-mono); font-weight: 500; font-size: 1.375rem; color: var(--band-fig); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.lbl { font-size: 0.9375rem; line-height: 1.45; color: var(--band-text); }
.ledger-link { color: var(--band-fig); font-weight: 500; font-size: var(--step--1); }
.ledger-link:hover { color: var(--band-text); }

/* Sections */
.section { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--rule); }
.section-alt { background: var(--surface); }
.sec-title { font-size: var(--step-3); letter-spacing: -0.015em; }
.sec-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.sec-sub { color: var(--muted); }
.section > .wrap > .sec-title { margin-bottom: 32px; }

.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 28px 32px; margin: 0; counter-reset: part; }
@media (min-width: 980px) { .parts { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.parts > div { border-top: 2px solid var(--ink); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.parts dt { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: var(--ink); line-height: 1.2; }
.parts dd { margin: 0; color: var(--text); font-size: 0.9875rem; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fund { width: 100%; border-collapse: collapse; font-size: 0.9875rem; min-width: 560px; }
.fund th, .fund td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.fund thead th { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; border-bottom: 2px solid var(--ink); }
.fund tbody th { color: var(--ink); font-weight: 600; white-space: nowrap; }
.fund .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fund td.num { color: var(--ink); }
.table-note { margin-top: 14px; font-size: var(--step--1); color: var(--muted); }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px clamp(32px, 6vw, 80px); }
.two-col .sec-title { margin-bottom: 24px; }
.for-list, .rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.for-list li { padding-left: 28px; position: relative; }
.for-list li::before { content: "\2192"; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
.rules li { padding-left: 16px; border-left: 2px solid var(--accent); }
.rules strong { color: var(--ink); display: block; }

.author { display: flex; gap: clamp(20px, 4vw, 40px); align-items: flex-start; }
.author-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 62ch; }
.monogram { flex: none; width: clamp(84px, 12vw, 120px); aspect-ratio: 1; max-width: 100%; border-radius: 50%; background: var(--band); color: var(--band-fig); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: 0.02em; }
@media (max-width: 520px) { .author { flex-direction: column; } }

.faq { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-weight: 600; color: var(--ink); font-size: var(--step-0); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-family: var(--font-mono); font-size: 1.375rem; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 20px; max-width: 64ch; }

.cta-band { background: var(--band); color: var(--band-text); padding-block: clamp(56px, 8vw, 96px); }
.cta-inner { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.cta-band h2 { color: var(--band-text); font-size: var(--step-4); letter-spacing: -0.02em; }
.cta-band p { color: var(--band-muted); font-size: var(--step-1); max-width: 46ch; }
.cta-band .signup { width: 100%; margin-top: 8px; }
.cta-band .signup input[type=email] { border-color: var(--band-rule); }

/* Inner pages */
.page { padding-block: clamp(40px, 7vw, 80px); display: flex; flex-direction: column; gap: 20px; }
.page h1 { font-size: var(--step-4); letter-spacing: -0.02em; }
.page > h2 { font-size: var(--step-2); margin-top: 24px; }
.page ul { margin: 0; padding-left: 1.25em; display: flex; flex-direction: column; gap: 8px; }
.legal h2 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 600; margin-top: 16px; }
.updated { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }
.author-page { padding: clamp(20px, 4vw, 32px); background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; margin-block: 12px; }
.author-page h2 { font-size: var(--step-2); }
.standards { margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.standards > div { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 6px 24px; padding-block: 16px; border-bottom: 1px solid var(--rule); }
.standards dt { font-weight: 600; color: var(--ink); }
.standards dd { margin: 0; }
@media (max-width: 560px) { .standards > div { grid-template-columns: minmax(0, 1fr); } }
.inline-cta { margin-top: 28px; padding: clamp(20px, 4vw, 32px); background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 6px; display: flex; flex-direction: column; gap: 14px; }

.archive { list-style: none; margin: 8px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.arch-item { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 4px 24px; padding-block: 22px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--text); }
.arch-meta { grid-row: span 2; display: flex; flex-direction: column; gap: 2px; font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }
.arch-no { color: var(--accent); font-weight: 500; font-size: 1rem; }
.arch-title { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); color: var(--ink); line-height: 1.15; }
.arch-item:hover .arch-title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
@media (max-width: 560px) { .arch-item { grid-template-columns: minmax(0, 1fr); } .arch-meta { grid-row: auto; flex-direction: row; gap: 12px; } }

/* Issue article */
.issue { padding-block: clamp(40px, 7vw, 80px); display: flex; flex-direction: column; gap: 18px; }
.issue-head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.issue h1 { font-size: clamp(2.125rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
.issue-meta { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }
.issue > h2 { font-size: var(--step-2); margin-top: 28px; padding-top: 14px; border-top: 2px solid var(--accent); scroll-margin-top: 80px; }
.issue > p, .issue > ul { max-width: 66ch; }
.issue ul { margin: 0; padding-left: 1.25em; display: flex; flex-direction: column; gap: 10px; }
.issue strong { color: var(--ink); }
.dropcap { font-size: var(--step-1); line-height: 1.55; }
.why { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 16px 18px; font-size: 0.9875rem; }
.disclose { color: var(--muted); }
.small { font-size: var(--step--1); color: var(--muted); }
.sign { font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); }
.ledger-inline { margin-block: 8px; }
.issue-cta { margin-top: 24px; padding: clamp(20px, 4vw, 32px); background: var(--band); color: var(--band-text); border-radius: 6px; display: flex; flex-direction: column; gap: 10px; }
.issue-cta h2 { color: var(--band-text); font-size: var(--step-2); }
.issue-cta p { color: var(--band-muted); }
.issue-cta .form-msg.ok { color: var(--band-fig); }
.issue-cta .form-msg.err { color: #FFB4A3; }
.issue-cta .form-msg a { color: var(--band-fig); }
.issue-foot { margin-top: 16px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.issue-foot h2 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.sources { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding-block: 40px 32px; font-size: var(--step--1); color: var(--muted); background: var(--paper); }
.foot-grid { display: flex; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.foot-brand { display: flex; flex-direction: column; gap: 6px; max-width: 40ch; }
.foot-name { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: var(--step-1); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: flex-start; }
.foot-links a { color: var(--text); }
.foot-legal { padding-top: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 0.8125rem; }
.foot-legal a, .foot-contact a { color: var(--text); }

/* FAQ section: heading beside the questions on wide screens */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px clamp(32px, 6vw, 80px); align-items: start; }
.section > .faq-grid > .sec-title { margin-bottom: 0; }
@media (max-width: 760px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }

/* Funding table becomes stacked rows on phones */
@media (max-width: 600px) {
  .fund { min-width: 0; }
  .fund thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fund tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
  .fund th, .fund td { padding: 0; border: 0; }
  .fund tbody th { grid-column: 1; white-space: normal; }
  .fund td:nth-of-type(1) { grid-column: 1 / -1; grid-row: 2; color: var(--muted); font-size: 0.9375rem; }
  .fund td:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  .fund td:nth-of-type(3) { grid-column: 1 / -1; grid-row: 3; text-align: left; font-size: 0.875rem; color: var(--muted); }
  .fund td:nth-of-type(3)::before { content: "Valuation: "; font-family: var(--font-body); }
}

/* Header subscribe button on phones sits beside the brand */
.head-cta { display: none; }
@media (max-width: 640px) { .head-cta { display: inline-flex; } }
@media (max-width: 480px) { .signup-row .btn { flex: 1 1 100%; } }
.cta-band .form-note { font-size: var(--step--1); color: var(--band-muted); }
.cta-band .form-note a, .signup-dark .form-note a { color: var(--band-text); }
.issue .sources { flex-direction: row; flex-wrap: wrap; padding-left: 0; list-style: none; gap: 4px 18px; }
.next-issue { color: var(--muted); display: block; margin-bottom: 4px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-block: 16px; border-block: 1px solid var(--rule); font-size: var(--step--1); }
.share-lbl { font-weight: 600; color: var(--ink); margin-right: 6px; flex-basis: 100%; }
@media (min-width: 640px) { .share-lbl { flex-basis: auto; } }
.share a, .share button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); background: var(--surface); text-decoration: none; font: 500 0.875rem var(--font-body); cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--accent); color: var(--accent); }
.byline-bio { font-size: var(--step--1); color: var(--muted); padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; max-width: 66ch; }
.byline-bio strong { color: var(--ink); }
