/* Quant Ledger HQ — cream paper ledger editorial */
:root {
  --navy: #0b1f3a;
  --navy-mid: #163456;
  --green: #1f7a4c;
  --green-soft: #2d9a64;
  --cream: #f5f1e8;
  --cream-deep: #ebe4d6;
  --ink: #132033;
  --muted: #4a5a6e;
  --line: rgba(11, 31, 58, 0.14);
  --focus: #1f7a4c;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(31, 122, 76, 0.07), transparent 42%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  font-family: var(--font-ui);
  font-size: 1.02rem;
  line-height: 1.7;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: 0.65rem 1rem;
  background: var(--navy);
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--navy);
  line-height: 1.15;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.site-nav a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--green);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--green);
}

/* Split-screen homepage */
.split-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-height: calc(100vh - 4.5rem);
  border-bottom: 1px solid var(--line);
}

.split-left {
  padding: 3rem 2rem 3rem 2.5rem;
  background:
    linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-left .eyebrow {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-soft);
}

.split-left h1 {
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 11ch;
}

.split-left .lede {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(245, 241, 232, 0.86);
}

.split-left .disclosure-box {
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(245, 241, 232, 0.22);
  border-left: none;
  background: transparent;
}

.split-left .disclosure-box h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.split-left .disclosure-box p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(245, 241, 232, 0.78);
}

.split-left .disclosure-box a {
  color: #8fd4ae;
}

.split-right {
  background: var(--cream);
  overflow-y: auto;
  max-height: calc(100vh - 4.5rem);
  border-left: 1px solid var(--line);
}

.ledger-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 5.5rem 1fr 4.5rem;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--cream-deep);
  border-bottom: 2px solid var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ledger-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ledger-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 4.5rem;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.ledger-row:hover {
  background: rgba(31, 122, 76, 0.06);
}

.ledger-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ledger-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
}

.ledger-blurb {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.ledger-tag {
  justify-self: end;
  align-self: start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

.below-split {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 3.5rem;
}

.below-split.wide {
  max-width: 72rem;
}

.shell {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.shell.wide {
  max-width: 72rem;
}

.article-body > h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
}

.article-body > h2,
section > h2 {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--navy);
}

.article-body > h3 {
  margin: 1.5rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
}

.feature-entry {
  padding: 1.5rem 0 0.5rem;
  border-top: 2px solid var(--navy);
}

.feature-entry .eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.feature-entry h2 {
  margin: 0 0 0.5rem;
}

.fee-strip {
  display: grid;
  gap: 0;
  margin-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.fee-item {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.fee-item:hover .fee-name {
  color: var(--green);
}

.fee-code {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  padding-top: 0.15rem;
}

.fee-name {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
}

.fee-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.glossary-teaser {
  margin-top: 0.5rem;
  padding: 1.35rem 1.4rem;
  background: rgba(11, 31, 58, 0.04);
  border-left: 4px solid var(--green);
}

.glossary-teaser h2 {
  margin-top: 0;
}

.glossary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.glossary-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.glossary-list dt,
.glossary-term {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.35rem;
}

.glossary-list dd,
.glossary-list p {
  margin: 0;
  color: var(--muted);
}

.disclosure-box {
  margin: 1.25rem 0 2rem;
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--green);
  background: rgba(31, 122, 76, 0.06);
}

.disclosure-box h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.disclosure-box p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.updated-line {
  margin-top: 2rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

.legal-page h2 {
  margin-top: 1.75rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 28rem;
}

.form-grid label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.form-grid input,
.form-grid textarea {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}

.form-grid button,
.cookie-actions button,
[data-cookie-manage] {
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-grid button {
  justify-self: start;
  padding: 0.65rem 1.25rem;
  border: none;
  background: var(--navy);
  color: var(--cream);
}

.form-grid button:hover {
  background: var(--green);
}

[data-cookie-manage] {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.entry-stack {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry-stack li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.entry-stack h2,
.entry-stack h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
}

.entry-stack h2 a,
.entry-stack h3 a {
  color: inherit;
  text-decoration: none;
}

.entry-stack h2 a:hover,
.entry-stack h3 a:hover {
  color: var(--green);
}

.meta-line {
  font-size: 0.88rem;
  color: var(--muted);
}

.notice-banner {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1rem;
  background: rgba(11, 31, 58, 0.06);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.site-footer {
  background: var(--navy);
  color: #c5d0dc;
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-contact p {
  margin: 0.2rem 0;
}

.footer-contact strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.footer-contact a {
  color: #8fd4ae;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.15rem;
}

.footer-nav a {
  color: #c5d0dc;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: #fff;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 1rem;
  background: rgba(11, 31, 58, 0.97);
  color: var(--cream);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner a {
  color: #8fd4ae;
}

.cookie-banner p {
  margin: 0;
  flex: 1 1 18rem;
  font-size: 0.92rem;
}

.cookie-actions {
  display: flex;
  gap: 0.6rem;
}

.cookie-actions button {
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 2px;
}

.cookie-actions [data-cookie-accept] {
  background: var(--green);
  color: #fff;
}

.cookie-actions [data-cookie-reject] {
  background: transparent;
  border-color: #7a8fa8;
  color: var(--cream);
}

@media (max-width: 900px) {
  .split-home {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .split-right {
    max-height: none;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .split-left {
    padding: 2.25rem 1.25rem;
  }

  .fee-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .ledger-head,
  .ledger-row {
    grid-template-columns: 4.5rem 1fr;
  }

  .ledger-tag {
    display: none;
  }
}

/* Display ad slots — primary publisher */
.ad-slot {
  margin: 2.5rem auto;
  padding: 0;
  border: 1px solid rgba(128, 128, 128, 0.35);
  background: transparent;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}
.ad-slot.ad-slot--filled::before {
  content: "Advertisement";
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  padding: 0.4rem 0.65rem 0;
  text-align: left;
  font-family: inherit;
}
.ad-slot__inner {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  font-size: 0.75rem;
  padding: 0.5rem;
}
.ad-slot--leaderboard { max-width: 970px; }
.ad-slot--leaderboard .ad-slot__inner { min-height: 90px; }
.ad-slot--rectangle { max-width: 336px; }
.ad-slot--rectangle .ad-slot__inner { min-height: 250px; }
.ad-slot--inline { max-width: min(100%, 728px); }
.ad-slot--inline .ad-slot__inner { min-height: 90px; }
@media (max-width: 640px) {
  .ad-slot { margin: 2rem auto; }
  .ad-slot--leaderboard .ad-slot__inner,
  .ad-slot--inline .ad-slot__inner { min-height: 60px; }
  .ad-slot--rectangle .ad-slot__inner { min-height: 180px; }
}

/* Publisher spacing pass */
.article-body,
.prose,
.prose-column,
.main-pad .chapter,
.below-split {
  line-height: 1.7;
}
.article-body p,
.prose p,
.prose-column p {
  margin: 0 0 1.15rem;
}
.article-body h2,
.prose h2,
.prose-column h2,
.below-split h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  line-height: 1.25;
}
.article-body section,
.prose section,
.feature-block,
.feature-entry {
  margin-bottom: 2.5rem;
}
.page-shell,
.below-split,
.page-wrap {
  padding-top: 1.75rem;
  padding-bottom: 3.5rem;
}

/* Hide empty display slots — no flash of Advertisement boxes */
.ad-slot:not(.ad-slot--filled) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}
.ad-slot:not(.ad-slot--filled)::before {
  content: none !important;
  display: none !important;
}
.ad-slot.ad-slot--filled {
  display: block;
}
.ad-slot.ad-slot--filled::before {
  content: "Advertisement";
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.45rem;
  text-align: center;
}

/* ad-slot-nofill-guard */
.ad-slot:not(.ad-slot--filled),
aside.ad-slot:not(.ad-slot--filled) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}
