/* ============================================================
   Five Facts About Stablecoins — design system
   Circle-themed, editorial, data-forward.
   ============================================================ */

:root {
  /* Circle / USDC palette */
  --blue:        #0B53BF;   /* USDC denim — primary */
  --blue-bright: #2E6FF2;   /* accent / links */
  --blue-soft:   #EAF1FE;   /* tints, fills */
  --navy:        #0A2540;   /* dark surfaces, display ink */

  --ink:    #16202E;        /* headings */
  --body:   #38434F;        /* body text */
  --muted:  #69757F;        /* captions */
  --line:   #E4EAF2;        /* hairlines */
  --bg:     #FFFFFF;
  --bg-alt: #F5F8FD;        /* alternating section tint */

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1100px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10,37,64,.04), 0 8px 30px rgba(10,37,64,.06);
  --shadow-sm: 0 1px 2px rgba(10,37,64,.05), 0 2px 8px rgba(10,37,64,.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--ink); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-bright); }
strong, b { color: var(--ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 1.1rem;
}

/* ───────────── Buttons ───────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 600; font-size: .94rem; padding: .72em 1.3em; border-radius: 999px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer;
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(11,83,191,.28); }
.btn--primary:hover { background: var(--blue-bright); color:#fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--blue); border-color: rgba(11,83,191,.32); }
.btn--ghost:hover { background: var(--blue-soft); }

/* ───────────── Nav ───────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between; }
.nav__brand { display: flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--ink);
  font-size: .96rem; letter-spacing: -.01em; }
.nav__mark { width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--blue); display:inline-block; }
.nav__links { display: flex; align-items: center; gap: 1.4rem; }
.nav__links a { color: var(--muted); font-size: .9rem; font-weight: 500; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__cta { color: var(--blue) !important; font-weight: 600 !important; }

/* ───────────── Hero ───────────── */
.hero { position: relative; overflow: hidden;
  background: linear-gradient(180deg, #FBFCFE 0%, #EFF4FE 60%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line); }
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.flow { width: 100%; height: 100%; opacity: .9; }
.flow__nodes circle { filter: drop-shadow(0 0 6px rgba(11,83,191,.25)); }

.hero__inner { position: relative; max-width: 880px; margin: 0 auto;
  padding: 86px 24px 30px; text-align: center; }
.hero__title { font-family: var(--serif); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin: 0 0 1.1rem; letter-spacing: -.02em; color: var(--navy); }
.hero__dek { font-size: clamp(1.05rem, 2vw, 1.32rem); color: var(--body); max-width: 660px;
  margin: 0 auto 1.7rem; }
.byline { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.3rem;
  font-size: .92rem; color: var(--ink); margin-bottom: 1.8rem; }
.byline em { color: var(--muted); font-style: normal; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .9rem; }
.updated { color: var(--muted); font-size: .85rem; margin-left: .2rem; }

/* Stat strip */
.statstrip { position: relative; max-width: var(--maxw); margin: 30px auto 0;
  padding: 0 24px 56px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; box-shadow: var(--shadow-sm); }
.stat__num { display: block; font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem); color: var(--blue); line-height: 1.05; }
.stat__lab { display: block; font-size: .8rem; color: var(--muted); margin-top: .5rem; line-height: 1.35; }

/* ───────────── Intro ───────────── */
.intro { padding: 56px 0 8px; }
.intro__lead { font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.5;
  color: var(--ink); max-width: 820px; margin: 0 auto; text-align: center; font-weight: 400; }

/* ───────────── Fact sections ───────────── */
.fact { padding: 70px 0; }
.fact--alt { background: var(--bg-alt); }
.fact__head { max-width: 780px; margin: 0 auto 38px; }
.fact__kicker { margin: 0 0 .9rem; }
.fact__kicker span { font-family: var(--serif); font-weight: 700; color: var(--blue);
  font-size: .9rem; letter-spacing: .04em; border: 1px solid rgba(11,83,191,.3);
  padding: .25em .8em; border-radius: 999px; }
.fact__title { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0 0 1rem; }
.fact__dek { font-size: 1.08rem; color: var(--body); margin: 0 0 1.4rem; }
.pullstat { font-family: var(--serif); font-size: clamp(1.15rem, 2.3vw, 1.5rem); color: var(--ink);
  margin: 0; padding-left: 1rem; border-left: 4px solid var(--blue); }
.pullstat b { color: var(--blue); }
.caveat { font-size: .9rem; color: var(--muted); margin: 1rem 0 0; font-style: italic; }

/* Chart grid + cards */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.chart-grid--single { grid-template-columns: 1fr; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 16px; box-shadow: var(--shadow); margin: 0; }
.card figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; }
.card h3 { font-size: 1.02rem; margin: 0; }
.chart { width: 100%; height: 330px; }
.chart--wide { height: 400px; }
.src { font-size: .78rem; color: var(--muted); margin: 10px 2px 0; line-height: 1.45; }

/* Segmented controls */
.controls { display: inline-flex; align-items: center; gap: 2px; background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.controls .sep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; }
.seg { border: none; background: transparent; color: var(--muted); font-family: var(--sans);
  font-size: .8rem; font-weight: 600; padding: .34em .8em; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s; white-space: nowrap; }
.seg:hover { color: var(--ink); }
.seg.is-active { background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }

/* Expanders */
.more { margin-top: 22px; border-top: 1px solid var(--line); }
.more > summary { list-style: none; cursor: pointer; padding: 18px 2px 0; font-weight: 600;
  color: var(--blue); font-size: .96rem; display: flex; align-items: center; gap: .5rem; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: "+"; display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(11,83,191,.35);
  font-size: 1.1rem; line-height: 1; transition: transform .2s; }
.more[open] > summary::before { content: "–"; }
.more__body { padding-top: 22px; }
.more__body .chart-grid { margin-bottom: 22px; }
.more__body .chart-grid:last-child { margin-bottom: 0; }

/* Data table (Fact 3) */
.data-table { overflow-x: auto; }
.data-table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { padding: .6em .5em; text-align: right; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.data-table td:first-child, .data-table th:first-child { text-align: left; color: var(--ink); font-weight: 500; }
.data-table tr:last-child td { border-bottom: none; }

/* Sub-heading within a fact (e.g., the "credit not destroyed" block) */
.subhead { max-width: 800px; margin: 44px auto 24px; text-align: center; }
.subhead__title { font-family: var(--serif); font-size: clamp(1.3rem, 2.5vw, 1.75rem); margin: 0 0 .7rem; }
.subhead__text { color: var(--body); margin: 0; font-size: 1.02rem; }

/* Explainer card (text exhibit) */
.explainer { display: flex; flex-direction: column; }
.explainer h3 { margin: 0 0 .9rem; }
.explainer__list { margin: 0 0 1.1rem; padding-left: 1.15rem; }
.explainer__list li { margin-bottom: .6rem; color: var(--body); font-size: .95rem; line-height: 1.5; }
.explainer__list b { color: var(--ink); }
.explainer__stat { margin: auto 0 0; padding: .95rem 1.1rem; background: var(--blue-soft); border-radius: 12px;
  font-size: .92rem; color: var(--ink); line-height: 1.5; }
.explainer__stat b { color: var(--blue); }

/* ───────────── Implications ───────────── */
.implications { padding: 72px 0; background: var(--bg-alt); border-top: 1px solid var(--line); }
.section__title { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); text-align: center;
  margin: 0 0 36px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.icard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm); }
.icard h3 { font-size: 1.1rem; margin: 0 0 .6rem; color: var(--blue); }
.icard p { margin: 0; color: var(--body); font-size: .98rem; }

/* ───────────── Footer ───────────── */
.footer { background: var(--navy); color: #C8D6EA; padding: 64px 0; }
.footer__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.footer__title { font-family: var(--serif); color: #fff; font-size: 1.6rem; margin: 0 0 .8rem; }
.footer__authors { color: #9DB2CE; font-size: .95rem; margin: 0 0 1.6rem; }
.footer__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.footer .btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.footer .btn--ghost:hover { background: rgba(255,255,255,.08); }
.footer__notes p { font-size: .9rem; line-height: 1.6; margin: 0 0 1rem; }
.footer__notes b { color: #fff; }
.disclaimer { color: #7E94B4 !important; font-size: .82rem !important; }

/* Back to top */
.totop { position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 1.2rem;
  box-shadow: 0 8px 24px rgba(11,83,191,.4); opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 40; }
.totop.show { opacity: 1; transform: none; pointer-events: auto; }

/* ───────────── Reveal animation ───────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ───────────── Responsive ───────────── */
@media (max-width: 920px) {
  .statstrip { grid-template-columns: repeat(2, 1fr); }
  .statstrip .stat:last-child { grid-column: 1 / -1; }
  .chart-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .nav__links a:not(.nav__cta) { display: none; }
}
@media (max-width: 560px) {
  .hero__inner { padding-top: 60px; }
  .statstrip { grid-template-columns: 1fr 1fr; }
  .chart { height: 290px; }
  .chart--wide { height: 340px; }
  .byline { font-size: .84rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .flow__packets { display: none; }
  .btn:hover { transform: none; }
}
