/* aismaeel /data: GCC valuation database
   Same type and colour system as aismaeel.com and research.aismaeel.com:
   pine-evergreen palette, Archivo for interface and figures, Source Serif 4
   for prose, Spline Sans Mono for labels. Ink on paper, thin rules, tabular
   numerals. */

@font-face { font-family: "Archivo Variable"; src: url("fonts/archivo-latin.woff2") format("woff2");
             font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Spline Sans Mono Variable"; src: url("fonts/spline-sans-mono-latin.woff2") format("woff2");
             font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin.woff2") format("woff2");
             font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-italic.woff2") format("woff2");
             font-weight: 400 600; font-style: italic; font-display: swap; }

:root {
  --paper:   #f9fbfb;
  --paper-2: #edf2f1;
  --surface: #fff;
  --ink:     #152528;
  --ink-2:   #4b5f63;
  --ink-3:   #5a7277;
  --ink-prose: #33474b;
  --rule:    #dce5e4;
  --rule-2:  #e7eeed;
  --accent:  #145c4a;
  --accent-d:#0f4336;
  --accent-tint: #e3f2ef;
  --wash-accent: #f0f7f5;
  --rule-accent: #c3dbd4;
  --gold:    #f5970a;
  --pos:     #145c4a;
  --neg:     #d32222;
  --neg-tint: #fdf2f2;
  --faint:   #9fb2b5;
  --sans:  "Archivo Variable", ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --figs:  "Archivo Variable", ui-sans-serif, "Segoe UI", Helvetica, Arial, sans-serif;
  --prose: "Source Serif 4", "Iowan Old Style", Charter, Georgia, serif;
  --mono:  "Spline Sans Mono Variable", ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --arabic: "Geeza Pro", "Segoe UI", "Noto Naskh Arabic", "Arial", sans-serif;
  --maxw: 1180px;
  --measure: 604px;
  --radius: 8px;
  --radius-sm: 4px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans);
       font-size: 15px; line-height: 1.62; -webkit-font-smoothing: antialiased;
       font-feature-settings: "ss01", "cv01"; }
a { color: var(--accent-d); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto;
        padding-left: max(24px, env(safe-area-inset-left, 0px));
        padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff;
        padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; }

/* ---------- masthead ---------- */
.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); }
.masthead .wrap { display: flex; align-items: baseline; gap: 18px; padding-top: 22px; padding-bottom: 16px;
                  flex-wrap: wrap; padding-left: max(68px, env(safe-area-inset-left, 0px)); }
.wordmark { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.wordmark a { color: inherit; }
.wordmark a:hover { text-decoration: none; color: var(--accent); }
.wordmark .tag { font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: 0;
                 color: var(--ink-3); margin-left: 2px; }
.beta { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
        color: var(--accent-d); background: var(--accent-tint); border: 1px solid var(--rule-accent);
        border-radius: 999px; padding: 1px 8px; margin-left: 8px; vertical-align: 3px; font-weight: 500; }
.tagline { color: var(--ink-3); font-size: 13px; letter-spacing: .02em; }
.masthead .spacer { flex: 1; }
.topnav { display: flex; gap: 18px; font-size: 13.5px; }
.topnav a { color: var(--ink-2); }
.topnav a[aria-current="page"] { color: var(--accent-d); font-weight: 600; }

/* ---------- side drawer ---------- */
.navtoggle { position: fixed; top: max(18px, env(safe-area-inset-top, 0px)); left: max(18px, env(safe-area-inset-left, 0px));
             z-index: 60; width: 42px; height: 38px; padding: 9px 8px; cursor: pointer;
             background: var(--ink); border: 0; border-radius: var(--radius-sm);
             display: flex; flex-direction: column; justify-content: space-between;
             box-shadow: 0 1px 4px rgba(0,0,0,.22); }
.navtoggle span { display: block; height: 2px; background: #fff; border-radius: 2px;
                  transition: transform .18s ease, opacity .18s ease; }
.navtoggle:hover { background: var(--accent-d); }
.navtoggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navtoggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.scrim { position: fixed; inset: 0; background: rgba(15,23,32,.42); z-index: 55; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 292px; max-width: 86vw; z-index: 58;
          background: var(--ink); color: #cfd6dc; overflow-y: auto;
          padding: 74px 0 30px; box-shadow: 2px 0 18px rgba(0,0,0,.28); }
.drawer .dhead { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
                 font-family: var(--mono); color: #83989a; padding: 0 22px 8px; }
.drawer .dlist a, .drawer .dlist span.soon { display: flex; align-items: center; gap: 11px;
                 padding: 8px 22px; font-size: 14px; color: #cfd6dc; }
.drawer .dlist a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.drawer .dlist a.active { color: #fff; background: rgba(20,92,74,.55); font-weight: 600; }
.drawer .dlist span.soon { color: #8e99a4; cursor: default; }
.drawer .dlist span.soon::after { content: "soon"; margin-left: auto; font-family: var(--mono); font-size: 9px;
                 letter-spacing: .1em; border: 1px solid #4a545e; padding: 1px 5px; border-radius: var(--radius-sm); }
.dsep { height: 1px; background: #2c383a; margin: 18px 22px; }
.dcontact a { display: flex; flex-direction: column; padding: 8px 22px; color: #cfd6dc; }
.dcontact a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.dcontact .cl { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-family: var(--mono); color: #83989a; }
.dcontact .cv { font-size: 13.5px; color: #e9f1ef; }
.no-js .navtoggle { display: none; }

/* ---------- hero ---------- */
.hero { background: var(--accent-d); color: #fff; padding: 30px 0 34px; }
.hero.tall { padding: 64px 0 70px; }
.hero h1 { color: #fff; font-size: clamp(28px, 3.6vw, 38px); margin: 0 0 9px; }
.hero .promise { font-size: clamp(32px, 5vw, 54px); max-width: 22ch; letter-spacing: -.03em; line-height: 1.08; }
.hero .crumb, .hero .crumb a { color: rgba(255,255,255,.74); }
.hero .crumb a:hover { color: #fff; }
.thesis { font-family: var(--prose); font-size: 19px; line-height: 1.5; color: rgba(255,255,255,.9);
          max-width: 64ch; margin: 0 0 14px; }
.hero-meta { font-size: 13px; letter-spacing: .01em; color: rgba(255,255,255,.76);
             display: flex; flex-wrap: wrap; gap: 4px 20px; font-variant-numeric: lining-nums tabular-nums; }
.hero-meta b { color: #fff; font-weight: 600; }
.ar { font-family: var(--arabic); }

/* ---------- page furniture ---------- */
.page { padding: 34px 0 70px; }
.crumb { font-size: 12.5px; color: var(--ink-3); letter-spacing: .01em; margin-bottom: 10px; }
.crumb a { color: var(--ink-3); }
h1 { font-family: var(--sans); font-size: 34px; font-weight: 800; letter-spacing: -.02em;
     margin: 0 0 4px; line-height: 1.15; text-wrap: balance; }
h2 { font-family: var(--sans); font-size: 24px; font-weight: 700; letter-spacing: -.015em;
     margin: 44px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); text-wrap: balance; }
h3 { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
     font-family: var(--mono); color: var(--ink-2); margin: 26px 0 8px; }
p { margin: 0 0 13px; text-wrap: pretty; }
.lede { font-family: var(--prose); font-size: 18px; line-height: 1.55; color: var(--ink-prose); max-width: var(--measure); }
.note { font-size: 12.5px; color: var(--ink-3); max-width: var(--measure); margin: 8px 0 0; }
.sec { margin-bottom: 8px; }
.sec > h2:first-child { margin-top: 0; }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 15px; min-width: 0; }
.kpi .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.kpi .v { font-family: var(--figs); font-weight: 650; font-size: 24px; letter-spacing: -.01em; margin-top: 4px;
          white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.kpi .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
@media (max-width: 780px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .v { font-size: 19px; } }

/* ---------- search ---------- */
.search { position: relative; max-width: 560px; margin-top: 22px; }
.search label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
                text-transform: uppercase; color: rgba(255,255,255,.74); margin-bottom: 6px; }
.search input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
                border: 1px solid rgba(255,255,255,.3); background: #fff; color: var(--ink); }
.search input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; list-style: none; margin: 6px 0 0; padding: 0;
           background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
           box-shadow: 0 8px 24px rgba(21,37,40,.14); overflow: hidden; }
.results a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--ink);
             border-bottom: 1px solid var(--rule-2); }
.results li:last-child a { border-bottom: 0; }
.results a:hover, .results a:focus { background: var(--accent-tint); text-decoration: none; }
.results .k { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.results .s { color: var(--ink-3); font-size: 13px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
thead th { background: var(--paper-2); font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
           text-transform: uppercase; color: var(--ink-2); font-weight: 600; padding: 9px 12px; text-align: right;
           border-bottom: 1px solid var(--rule); white-space: nowrap; vertical-align: bottom; }
thead th small { display: block; font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--ink-3); }
thead th a { color: var(--ink-2); }
thead th.rl { text-align: left; }
td, tbody th { padding: 8px 12px; border-bottom: 1px solid var(--rule-2); }
td { text-align: right; font-family: var(--figs); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
tbody th { text-align: left; font-weight: 500; white-space: nowrap; font-size: 13.5px; }
tbody th .sub { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover td, tbody tr:hover th { background: var(--wash-accent); }
td.na { color: var(--ink-3); }
td.pos { color: var(--pos); font-weight: 600; }
td.neg { color: var(--neg); font-weight: 600; }
tr.ind th { font-weight: 700; }
tr.co th, tr.co td { background: var(--paper); font-size: 12.5px; }
tr.co th { padding-left: 38px; font-weight: 400; color: var(--ink-2); }
tr.co .tk { font-family: var(--figs); color: var(--ink-3); margin-left: 6px; font-size: 12px; }
tr.total th, tr.total td { font-weight: 700; border-top: 2px solid var(--accent-d); background: var(--surface); }
tr.grp th { text-align: left; padding: 8px 12px; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
            letter-spacing: .14em; text-transform: uppercase; color: var(--accent-d); background: var(--accent-tint);
            border-top: 1px solid var(--rule-accent); border-bottom: 1px solid var(--rule-accent); }
.tog { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 0;
       display: inline-flex; gap: 8px; align-items: baseline; text-align: left; font-weight: inherit; }
.tog .chev { display: inline-block; width: 10px; color: var(--ink-3); transition: transform .15s ease; font-size: 11px; }
.tog[aria-expanded="true"] .chev { transform: rotate(90deg); }
.no-js .tog .chev { display: none; }

/* the dataset index: datasets down, markets across */
.dstable td { text-align: center; }
.dstable tbody th { white-space: normal; min-width: 280px; font-size: 15px; font-weight: 700; padding: 14px 16px; }
.dstable tbody th .sub { font-family: var(--prose); font-size: 14px; font-weight: 400; color: var(--ink-2); margin-top: 2px; line-height: 1.45; }
.dstable thead th { text-align: center; }
.dstable thead th.rl { text-align: left; padding-left: 16px; }
.dstable .live { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent-d);
                 padding: 3px 10px; border-radius: 999px; background: var(--accent-tint); border: 1px solid var(--rule-accent); }
.dstable .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dstable .live:hover { text-decoration: none; background: var(--accent-d); color: #fff; }
.dstable .live:hover::before { background: #fff; }
.soon { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* ---------- cards ---------- */
.indgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.indcard { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--rule);
           border-radius: var(--radius); padding: 18px 20px; color: inherit; min-width: 0;
           transition: border-color .15s ease, box-shadow .15s ease; }
a.indcard:hover { text-decoration: none; border-color: var(--rule-accent); box-shadow: 0 3px 14px rgba(21,37,40,.07); }
.indcard h3 { font-family: var(--sans); font-size: 18px; font-weight: 800; text-transform: none; letter-spacing: -.01em;
              color: var(--ink); margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.indcard h3 .ar { font-weight: 400; font-size: 16px; color: var(--ink-3); }
.indcard .meta { font-size: 13px; color: var(--ink-3); }
.indcard p { font-family: var(--prose); font-size: 15px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.ind-go { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-d); margin-top: auto; padding-top: 6px; }
.indcard.soon-card { background: transparent; }
.indcard.soon-card h3 { color: var(--ink-2); }
.indcard.soon-card .ind-go { color: var(--faint); }

.mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 26px 32px; }
.mcard { border-top: 2px solid var(--accent); padding-top: 14px; }
.mcard h3 { font-family: var(--sans); font-size: 16px; font-weight: 800; text-transform: none; letter-spacing: -.01em;
            color: var(--ink); margin: 0 0 7px; }
.mcard p { font-family: var(--prose); font-size: 15px; line-height: 1.58; color: var(--ink-2); margin: 0; }

.verdict { border: 1px solid var(--rule-accent); border-radius: var(--radius); background: var(--wash-accent);
           padding: 16px 20px; margin: 18px 0; }
.verdict .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.verdict p { font-family: var(--prose); font-size: 16px; color: var(--ink-2); margin: 0; }
.verdict.warn { border-color: #f1d3a4; background: #fff8ec; }

.btn { display: inline-block; background: var(--accent-d); color: #fff; padding: 10px 18px; border-radius: var(--radius-sm);
       font-size: 13.5px; font-weight: 600; transition: background .15s ease; }
.btn:hover { background: var(--accent); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent-d); box-shadow: inset 0 0 0 1px var(--rule-accent); }
.btn.ghost:hover { background: var(--surface); }
.endcard { background: var(--wash-accent); border: 1px solid var(--rule-accent); border-radius: var(--radius); padding: 24px 28px; }
.endcard h2 { border: 0; margin: 0 0 8px; padding: 0; }
.endcard p { font-family: var(--prose); font-size: 16px; color: var(--ink-2); max-width: var(--measure); }

/* ---------- dataset page ---------- */
.ds { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; align-items: start; }
.rail { position: sticky; top: 20px; font-size: 13.5px; display: flex; flex-direction: column; }
.rail .rh { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.rail a { display: block; padding: 6px 0 6px 12px; color: var(--ink-2); border-left: 1px solid var(--rule); line-height: 1.4; }
.rail a:hover { color: var(--accent-d); border-left-color: var(--rule-accent); text-decoration: none; }
.rail a[aria-current="page"] { color: var(--accent-d); font-weight: 600; border-left: 2px solid var(--accent); padding-left: 11px; }
.dsmain { min-width: 0; }
.mkts { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin: 0 0 18px; }
.mkts a { padding: 9px 14px; color: var(--ink-2); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mkts a:hover { color: var(--ink); text-decoration: none; }
.mkts a[aria-current="page"] { color: var(--accent-d); border-bottom-color: var(--accent); font-weight: 600; }
.mkts small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-left: 4px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.toolbar h2 { margin: 0; border: 0; padding: 0; font-size: 19px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.seg button { font: inherit; font-family: var(--figs); font-size: 13px; font-variant-numeric: tabular-nums; border: 0;
              background: none; color: var(--ink-2); padding: 6px 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button:hover { background: var(--wash-accent); }
.seg button[aria-pressed="true"] { background: var(--accent-d); color: #fff; }
.dl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent-d);
      border: 1px solid var(--rule-accent); border-radius: var(--radius-sm); padding: 5px 11px; background: var(--surface); }
.dl:hover { background: var(--accent-tint); text-decoration: none; }
.dl .fmt { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.linkbtn { font: inherit; font-size: 13px; background: none; border: 0; color: var(--accent-d); cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .ds { grid-template-columns: 1fr; gap: 18px; }
  .rail { position: static; flex-direction: row; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
  .rail .rh { display: none; }
  .rail a, .rail a[aria-current="page"] { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 12px; white-space: nowrap; margin-bottom: -1px; }
  .rail a[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* ---------- charts ---------- */
.figure { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 16px 18px 12px; margin: 0 0 22px; }
.figure .fq { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.figure .fb { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.cx { overflow-x: auto; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
@media (max-width: 640px) { .cx .chart { min-width: 600px; } .grid2 .cx .chart { min-width: 520px; } }
.chart .grid { stroke: var(--rule-2); }
.chart .axis { stroke: var(--ink-3); }
.chart .tx { fill: var(--ink-3); font-family: var(--figs); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .lab { fill: var(--ink); font-family: var(--sans); font-size: 12.5px; font-weight: 700; }
.chart .ilab { fill: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 600; }
.chart .ilab:hover { fill: var(--accent-d); }
.chart .diag { stroke: var(--ink-3); stroke-dasharray: 4 4; }
.chart .above { fill: var(--wash-accent); }
.chart .ind { fill: var(--accent-d); stroke: #fff; stroke-width: 2; }
.chart .co { fill: #fff; stroke: var(--faint); stroke-width: 1.5; }
.chart .co.neg { stroke: var(--neg); }
.chart .ln { fill: none; stroke-width: 2.2; }
.chart .l1 { stroke: var(--accent-d); } .chart .l2 { stroke: var(--gold); } .chart .l3 { stroke: var(--ink-3); stroke-dasharray: 5 4; }
.chart .p1 { fill: var(--accent-d); } .chart .p2 { fill: var(--gold); } .chart .p3 { fill: var(--ink-3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); align-items: center; margin-top: 4px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.legend i.ind { background: var(--accent-d); }
.legend i.co { border: 1.5px solid var(--faint); background: #fff; }
.legend i.l1, .legend i.l2, .legend i.l3 { width: 16px; height: 3px; border-radius: 0; vertical-align: 3px; }
.legend i.l1 { background: var(--accent-d); } .legend i.l2 { background: var(--gold); } .legend i.l3 { background: var(--ink-3); }
.legend .hint { color: var(--ink-3); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid2 .figure { margin: 0; }
@media (max-width: 880px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

dl.defs { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; margin: 0; border-top: 1px solid var(--rule); }
dl.defs dt, dl.defs dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--rule-2); }
dl.defs dt { font-weight: 700; padding-right: 16px; }
dl.defs dd { font-family: var(--prose); font-size: 15.5px; color: var(--ink-2); }
@media (max-width: 560px) { dl.defs { grid-template-columns: 1fr; } dl.defs dt { border-bottom: 0; padding-bottom: 0; } }
.formula { font-family: var(--mono); font-size: 13.5px; background: var(--surface); border: 1px solid var(--rule);
           border-radius: var(--radius); padding: 12px 16px; overflow-x: auto; white-space: nowrap; margin: 0 0 12px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--rule); margin-top: 60px; padding: 26px 0 50px; font-size: 12.5px; color: var(--ink-3); }
footer h3 { margin-top: 0; }
footer .disc { max-width: 84ch; margin-bottom: 12px; }
footer a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-accent); }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .masthead .wrap { padding-top: 16px; padding-bottom: 12px; gap: 4px 12px; align-items: center; min-height: 64px;
                    padding-left: max(68px, env(safe-area-inset-left, 0px)); }
  .masthead .tagline, .masthead .spacer, .topnav { display: none; }
  .navtoggle { top: max(14px, env(safe-area-inset-top, 0px)); left: max(14px, env(safe-area-inset-left, 0px)); }
  .hero.tall { padding: 40px 0 44px; }
  .thesis { font-size: 17.5px; }
  h1 { font-size: 28px; }
  .dstable tbody th { min-width: 200px; }
  .mkts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .mkts a { white-space: nowrap; }
}

@media print {
  .navtoggle, .drawer, .scrim, .seg, .dl, .search, .rail, .mkts { display: none !important; }
  .hero { background: none; color: var(--ink); }
  .hero h1, .thesis, .hero-meta, .hero .crumb, .hero .crumb a { color: var(--ink); }
  .masthead .wrap { padding-left: 0; }
  .ds { grid-template-columns: 1fr; }
  .tbl-wrap { overflow: visible; }
  tr, .figure { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
