/* Aera articles (guides/ and notes/). Same tokens as home.css so a guide reads
   as part of the site. Motion is opacity + transform only, added by article.js;
   without JS or with reduced motion everything is simply visible. */
:root {
  color-scheme: light dark;
  --bg: #f6f4ef; --bg-2: #efebe2; --card: #ffffff;
  --ink: #17161b; --ink-2: #57535d; --ink-3: #8a8690;
  --line: rgba(23, 22, 27, 0.09);
  --green: #23966f; --sage: #80b49e; --gold: #a8741f; --indigo: #5e5ce6; --pink: #e2335f;
  --shadow: 0 1px 2px rgba(40, 30, 10, 0.05), 0 24px 60px -24px rgba(40, 30, 10, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --measure: 680px;
  --gutter: clamp(16px, 5vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000; --bg-2: #0b0b0d; --card: #121215;
    --ink: #f5f3ee; --ink-2: #aaa6af; --ink-3: #6f6b76;
    --line: rgba(255, 255, 255, 0.085);
    --green: #4ecca3; --sage: #6fae95; --gold: #e8b366; --indigo: #8e8cff; --pink: #ff4572;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.62 var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; max-width: 1120px; }
.mark { font: 700 20px/1 var(--rounded); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.topnav { display: flex; gap: clamp(12px, 3vw, 24px); }
.topnav a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.topnav a:hover, .topnav a[aria-current] { color: var(--ink); }
@media (max-width: 380px) { .topbar .wrap { gap: 10px; } .topnav { gap: 10px; min-width: 0; } .topnav a { font-size: 13.5px; } .topnav a[href*="privacy"] { display: none; } }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.page-head { padding-top: clamp(40px, 9vw, 96px); padding-bottom: 8px; }
.eyebrow { margin: 0 0 14px; font: 600 13px/1 var(--text); letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); }
h1 { margin: 0; font: 700 clamp(34px, 6.4vw, 54px)/1.06 var(--rounded); letter-spacing: -0.022em; text-wrap: balance; }
.lang-switch { margin: 22px 0 0; font-size: 14px; color: var(--ink-3); }
.lang-switch a { color: var(--ink-2); }
.lang-switch a[aria-current] { color: var(--ink); text-decoration: none; font-weight: 600; }

/* Body */
.legal { padding-top: 24px; padding-bottom: 64px; }
.legal > p:first-of-type { font-size: clamp(20px, 2.6vw, 23px); line-height: 1.5; color: var(--ink); }
.legal > p:first-of-type strong { font-weight: 650; }
.legal p, .legal li { color: var(--ink-2); }
.legal p strong, .legal li strong { color: var(--ink); }
h2 { margin: 2.4em 0 0.6em; font: 700 clamp(25px, 3.6vw, 31px)/1.18 var(--rounded); letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
h3 { margin: 1.8em 0 0.4em; font: 650 19px/1.35 var(--text); color: var(--ink); }
ul, ol { padding-left: 1.2em; }
li { margin: 0.45em 0; }
li::marker { color: var(--ink-3); }

/* Key numbers */
.keys { list-style: none; padding: 0; margin: 36px 0 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.keys li { margin: 0; background: var(--card); border-radius: 20px; padding: 18px 16px 16px; box-shadow: var(--shadow); color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.keys b { display: block; margin-bottom: 6px; font: 700 clamp(24px, 4.4vw, 32px)/1 var(--rounded); color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.keys small { display: block; margin-top: 6px; color: var(--ink-3); font-size: 12px; }
@media (max-width: 560px) { .keys { grid-template-columns: 1fr; gap: 10px; } .keys li { padding: 16px 18px; } }

/* Figures */
.fig { margin: 40px calc(-1 * min(var(--gutter), 24px)); background: var(--card); border-radius: 24px; padding: clamp(18px, 4vw, 28px); box-shadow: var(--shadow); }
.fig svg { display: block; width: 100%; max-width: 540px; margin: 0 auto; height: auto; overflow: visible; }
.fig .fig-h { margin: 0 0 14px; font: 650 17px/1.35 var(--rounded); color: var(--ink); }
.fig figcaption { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.fig figcaption b { color: var(--ink); font-weight: 600; }
.fig .t { font: 500 11px var(--text); fill: var(--ink-3); }
.fig .tb { font: 650 13px var(--text); fill: var(--ink); }
.fig .grid { stroke: var(--line); stroke-width: 1; }
.fig .band { fill: var(--sage); fill-opacity: 0.24; }
.fig .mid { stroke: var(--sage); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: 0.9; }
.fig .dot { fill: var(--ink-3); }
.fig .dot.lo { fill: var(--pink); }
.fig .avg { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fig .avg-key { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; }
.fig .ann { stroke: var(--ink-3); stroke-width: 1; fill: none; }
.fig .ann-t { fill: var(--ink-2); }
/* Generic marks for topic figures: fills and strokes by palette role. */
.fig .f-green { fill: var(--green); } .fig .f-sage { fill: var(--sage); } .fig .f-gold { fill: var(--gold); }
.fig .f-indigo { fill: var(--indigo); } .fig .f-pink { fill: var(--pink); } .fig .f-mute { fill: var(--line); } .fig .f-bg { fill: var(--bg-2); }
.fig .s-green { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fig .s-ink { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; }
.fig .bar { transform-box: fill-box; transform-origin: 0 100%; }
.fig .bar.h { transform-origin: 0 50%; }

/* App shot beside its caption: never text over the image. */
.shot { margin: 40px 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(16px, 4vw, 32px); align-items: center; }
.shot .frame { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); border: 1px solid var(--line); }
.shot p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-3); }
.shot p b { display: block; margin-bottom: 4px; color: var(--ink); font: 650 17px/1.3 var(--rounded); }
@media (max-width: 560px) { .shot { grid-template-columns: 1fr; } }

/* Pull quote */
.pull { margin: 40px 0; padding: 0 0 0 20px; border-left: 3px solid var(--green); font: 600 clamp(21px, 3vw, 25px)/1.36 var(--rounded); color: var(--ink); letter-spacing: -0.01em; }

/* Aera box */
.note { margin: 20px 0 8px; background: var(--card); border-radius: 24px; padding: clamp(20px, 4vw, 28px); box-shadow: var(--shadow); }
.note p { font-size: 16px; }
.note p:first-child strong { font: 700 18px/1.3 var(--rounded); }
.btn { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 8px; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 16px/1 var(--text); text-decoration: none; }
.btn:hover { opacity: 0.88; }

/* Sources, footer */
.note-sources { font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.note-sources li { color: var(--ink-3); overflow-wrap: anywhere; }
.meta { color: var(--ink-3); font-size: 14px; }
.footer-base { border-top: 1px solid var(--line); padding: 24px 0 48px; }
.footer-base .wrap { max-width: var(--measure); }

/* Motion: article.js adds .rv to blocks below the fold and .in when they arrive. */
.rv { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.fig .dot, .fig .band, .fig .ann, .fig .ann-t { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.fig.rv:not(.in) .dot { opacity: 0; transform: translate3d(0, 6px, 0); }
.fig.rv:not(.in) .band { opacity: 0; }
.fig.rv:not(.in) .ann, .fig.rv:not(.in) .ann-t { opacity: 0; }
.fig .bar { transition: transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
.fig.rv:not(.in) .bar { transform: scaleY(0.04); }
.fig.rv:not(.in) .bar.h { transform: scaleX(0.04); }
.fig .s-green { stroke-dasharray: var(--len, 1200); stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s var(--ease) 0.3s; }
.fig.rv:not(.in) .s-green { stroke-dashoffset: var(--len, 1200); }
.fig .avg { stroke-dasharray: var(--len, 1200); stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s var(--ease) 0.5s; }
.fig.rv:not(.in) .avg { stroke-dashoffset: var(--len, 1200); }
@media (prefers-reduced-motion: reduce) {
  .rv, .rv.in, .fig .dot, .fig .band, .fig .avg, .fig .bar, .fig .s-green, .fig .ann, .fig .ann-t { transition: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
}
