/* Analytics Course - static rebuild, Aug 2026
   Palette is MeasureU production Tailwind (tailwind.config.mjs), not invented:
     navy #16254c / teal #35a292 / CTA #e5de5a
   Type is the MeasureU system: Oswald 700 headings, Inter body.
   Contrast note: #e5de5a is a true yellow and CANNOT reach 4.5:1 on white, so it is
   only ever used as a FILL behind navy text, never as text on light. */

:root {
  --navy: #16254c;
  --navy-400: #203c7b;
  --navy-100: #c5d0e0;
  --navy-50: #e8ebf2;
  --teal: #35a292;
  --teal-400: #277c76;
  --teal-500: #05484f;
  --teal-50: #e6f5f3;
  --cta: #e5de5a;
  --cta-hover: #d4cd3a;
  --ink: #16254c;
  --body: #35405c;
  --muted: #667089;
  --rule: #dfe4ee;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --maxw: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f5fa;
    --body: #c9d2e2;
    --muted: #93a0b8;
    --rule: #23324f;
    --bg: #0e1729;
    --bg-soft: #131f36;
    --navy-50: #16254c;
  }
}
:root[data-theme="dark"] {
  --ink: #f2f5fa; --body: #c9d2e2; --muted: #93a0b8;
  --rule: #23324f; --bg: #0e1729; --bg-soft: #131f36; --navy-50: #16254c;
}
:root[data-theme="light"] {
  --ink: #16254c; --body: #35405c; --muted: #667089;
  --rule: #dfe4ee; --bg: #ffffff; --bg-soft: #f7f9fc; --navy-50: #e8ebf2;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}
h1, h2, h3, h4, .font-display {
  font-family: Oswald, "Arial Narrow", Impact, sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 2.25rem 0 0.75rem;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 0; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1.15rem; }
a { color: var(--teal-400); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal); }
@media (prefers-color-scheme: dark) { a { color: var(--teal); } }
img { max-width: 100%; height: auto; border-radius: 6px; }
figure { margin: 1.5rem 0; }
blockquote {
  margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.15rem;
  border-left: 3px solid var(--teal); color: var(--muted);
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em;
  background: var(--bg-soft); padding: 0.15em 0.35em; border-radius: 4px; }
pre { overflow-x: auto; background: var(--bg-soft); padding: 1rem; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: 64rem; }

/* ---- header ---- */
.site-head {
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
}
.site-head .bar {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px; max-width: 64rem; margin: 0 auto; padding: 0 1.25rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand svg { width: 30px; height: 30px; display: block; }
.brand .name {
  font-family: Oswald, "Arial Narrow", sans-serif; font-weight: 700;
  font-size: 1.2rem; letter-spacing: 0.02em; color: var(--ink); white-space: nowrap;
}
.site-head nav { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; }
.site-head nav a { color: var(--body); text-decoration: none; font-size: 0.95rem; }
.site-head nav a:hover { color: var(--teal); }

/* ---- buttons ----
   One raised element per view (the primary CTA); everything else is a hairline. */
.btn {
  display: inline-block; font-family: Oswald, sans-serif; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; font-size: 0.95rem;
  padding: 0.85rem 1.6rem; border-radius: 6px; text-decoration: none;
  background: var(--cta); color: #16254c; border: 1px solid var(--cta-hover);
  box-shadow: 0 2px 0 0 var(--cta-hover);
}
.btn:hover { background: var(--cta-hover); color: #16254c; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); background: transparent; }
/* On the navy hero the ghost button inherits --ink (navy) and vanishes into the
   background - it rendered as an empty outlined box. Scope it light. */
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.hero .btn-ghost:hover { color: var(--cta); border-color: var(--cta); }

/* oEmbed replacement: WordPress turned a bare YouTube URL into a player, so the raw
   URLs were left sitting in post_content as plain text. */
.video {
  position: relative; padding-top: 56.25%; margin: 1.75rem 0;
  border-radius: 8px; overflow: hidden; background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- hero ---- */
.hero { background: var(--navy); color: #eef2f9; padding: 4.5rem 0 4rem; }
.hero h1 { color: #fff; max-width: 20ch; }
.hero p.lede { font-size: 1.2rem; color: #c5d0e0; max-width: 46ch; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; align-items: center; }
.hero .note { font-size: 0.9rem; color: #93a0b8; margin: 0.9rem 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center;
  max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
@media (max-width: 800px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 300px; height: auto; }

/* ---- content sections ---- */
.section { padding: 3.5rem 0; }
.section-soft { background: var(--bg-soft); }
.eyebrow {
  font-family: Oswald, sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.78rem; color: var(--teal-400); margin: 0 0 0.5rem;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--teal); } }

/* A list with hairline rules, not a card grid - cards are the generated default. */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.rows li:last-child { border-bottom: 1px solid var(--rule); }
.rows h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.rows a { text-decoration: none; }
.rows a:hover h3 { color: var(--teal); }
.rows .meta { font-size: 0.85rem; color: var(--muted); margin: 0; }
.rows .dek { margin: 0.35rem 0 0; color: var(--body); font-size: 0.95rem; }

.callout {
  border: 1px solid var(--rule); border-left: 3px solid var(--teal);
  background: var(--bg-soft); padding: 1.25rem 1.4rem; border-radius: 6px; margin: 2rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---- article ---- */
.article-head { padding: 2.75rem 0 0.5rem; }
.article-head .meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.75rem; }
.article-body { padding-bottom: 3rem; }
.article-body h2 { margin-top: 2.5rem; }
.archive-note {
  font-size: 0.9rem; color: var(--muted); border: 1px dashed var(--rule);
  border-radius: 6px; padding: 0.85rem 1rem; margin: 0 0 2rem;
}

/* ---- footer ---- */
.site-foot { border-top: 1px solid var(--rule); padding: 2.5rem 0; margin-top: 2rem;
  color: var(--muted); font-size: 0.9rem; }
.site-foot .cols { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: baseline;
  max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--teal); }
.site-foot .spacer { margin-left: auto; }

/* ---- small screens ----
   The header CTA is ~200px of non-wrapping uppercase Oswald; at 390px it pushed the
   whole document wider than the viewport, so every section rendered clipped, not just
   the header. Drop it on mobile - the same CTA is the first thing in the hero anyway. */
@media (max-width: 700px) {
  .site-head nav { gap: 1rem; }
  .site-head nav .btn { display: none; }
  .brand .name { font-size: 1.05rem; }
  .hero { padding: 3rem 0 2.75rem; }
  .hero .cta-row { gap: 0.75rem; }
  .hero .cta-row .btn { flex: 1 1 100%; text-align: center; }
  .hero-art { display: none; }
  .site-foot .cols { gap: 0.75rem 1.5rem; }
  .site-foot .spacer { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 420px) {
  .site-head nav a { font-size: 0.9rem; }
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--cta); color: #16254c;
  padding: 0.6rem 1rem; border-radius: 6px; z-index: 50; }
