:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #fcfcfb;
  --border: #e4e2dc;
  --grid: #ebe9e3;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #7a7974;
  --accent: #2a78d6;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211;
    --surface: #1a1a19;
    --border: #2e2e2c;
    --grid: #262624;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #8f8e88;
    --accent: #6da7ec;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211; --surface: #1a1a19; --border: #2e2e2c; --grid: #262624;
  --text: #f0efec; --text-2: #c3c2b7; --muted: #8f8e88; --accent: #6da7ec;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .wrap { padding: 0 32px; } }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--text-2); max-width: 62ch; }
.muted { color: var(--muted); font-size: .875rem; }

/* nav */
.topbar { border-bottom: 1px solid var(--border); background: var(--surface); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font-weight: 700; color: var(--text); white-space: nowrap; }
.links { display: flex; gap: 20px; font-size: .95rem; }
.links a { color: var(--text-2); }

/* sections */
.hero { padding: 64px 0 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: .95rem; border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn:hover { text-decoration: none; opacity: .88; }
section { padding: 32px 0; }
.page-head { padding: 40px 0 8px; }

.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); min-width: 0; }
a.card { color: inherit; display: block; transition: border-color .15s; }
a.card:hover { border-color: var(--accent); text-decoration: none; }
a.card .go { color: var(--accent); font-weight: 600; font-size: .9rem; }

/* stat tiles */
.stat .value { font-size: 2.2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat .label { color: var(--text-2); font-size: .9rem; margin-top: 4px; }

/* charts */
.chart-card h2 { margin-bottom: 4px; }
.chart { position: relative; width: 100%; margin-top: 16px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text, .chart .lbl { fill: var(--muted); font-size: 12px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--border); stroke-width: 1; }
.chart .val { fill: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .cat { fill: var(--text); font-size: 13px; }
.chart .end-label { font-size: 12px; font-weight: 600; fill: var(--text); }
.chart .bar { transition: opacity .1s; }
.chart .hit:hover + .bar, .chart .hit:focus + .bar { opacity: .75; }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: .875rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 2px; border-radius: 1px; display: inline-block; }
.tooltip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: .8rem; box-shadow: 0 4px 16px rgba(0,0,0,.12); white-space: nowrap; z-index: 2; opacity: 0; transition: opacity .1s; }
.tooltip.on { opacity: 1; }
.tooltip .t { color: var(--muted); margin-bottom: 4px; }
.tooltip .row { display: flex; align-items: center; gap: 8px; }
.tooltip .row b { font-variant-numeric: tabular-nums; min-width: 3.5em; }
.tooltip .row i { width: 12px; height: 2px; display: inline-block; }
.tooltip .row span { color: var(--text-2); }

details.table { margin-top: 16px; font-size: .875rem; }
details.table summary { cursor: pointer; color: var(--text-2); }
.tablewrap { overflow-x: auto; max-height: 320px; margin-top: 8px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--grid); }
th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }

/* lists */
.storylist { list-style: none; margin: 0; padding: 0; }
.storylist li { padding: 12px 0; border-bottom: 1px solid var(--grid); }
.storylist li:last-child { border-bottom: 0; }
.storylist .meta { color: var(--muted); font-size: .8rem; }
.callout { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; color: var(--text-2); margin: 16px 0 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; font-size: .92rem; color: var(--text-2); }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: .75rem; font-weight: 700; margin-bottom: 8px; }
.steps li b { color: var(--text); display: block; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags span { font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); }
.footer { padding: 40px 16px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); margin-top: 48px; }

@media (max-width: 560px) {
  .links { gap: 12px; font-size: .85rem; }
  .brand { font-size: .95rem; }
  .hero { padding-top: 40px; }
}
.chart .bar, .chart .val, .chart .cat { pointer-events: none; }

/* BorrowdaleJS draws in fixed inks (#333 text/axes, #c8c8c8 grid); map them onto the theme */
.sketch svg { width: 100%; height: auto; display: block; }
.sketch [fill="#333"] { fill: var(--text-2); }
.sketch [stroke="#333"] { stroke: var(--text-2); }
.sketch [stroke="#c8c8c8"] { stroke: var(--grid); }
.sketch [stroke="#2a78d6"] { stroke: var(--series-1); }
.sketch [fill="#2a78d6"] { fill: var(--series-1); }
.credit { margin: 8px 0 0; font-size: .8rem; }

/* ======================= Visual refresh: colour, motion, pill nav ======================= */
:root {
  --c1: #2a78d6; --c2: #6250d6; --c3: #1baf7a; --c4: #eb6834;
  --ink1: #1f62b3; --ink2: #5040c4; --ink3: #0f7a55; --ink4: #c4501f;
  --nav-bg: rgba(252, 252, 251, .78);
  --pill-hover: rgba(0, 0, 0, .05);
  --glow-a: rgba(42, 120, 214, .22); --glow-b: rgba(98, 80, 214, .18); --glow-c: rgba(27, 175, 122, .16);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c1: #3987e5; --c2: #9085e9; --c3: #199e70; --c4: #d95926;
    --ink1: #6da7ec; --ink2: #a79ef0; --ink3: #3fcf98; --ink4: #f08a5d;
    --nav-bg: rgba(18, 18, 17, .72);
    --pill-hover: rgba(255, 255, 255, .07);
    --glow-a: rgba(57, 135, 229, .20); --glow-b: rgba(144, 133, 233, .16); --glow-c: rgba(25, 158, 112, .14);
  }
}
:root[data-theme="dark"] {
  --c1: #3987e5; --c2: #9085e9; --c3: #199e70; --c4: #d95926;
  --ink1: #6da7ec; --ink2: #a79ef0; --ink3: #3fcf98; --ink4: #f08a5d;
  --nav-bg: rgba(18, 18, 17, .72); --pill-hover: rgba(255, 255, 255, .07);
  --glow-a: rgba(57, 135, 229, .20); --glow-b: rgba(144, 133, 233, .16); --glow-c: rgba(25, 158, 112, .14);
}
html, body { overflow-x: clip; }

/* sticky frosted nav with pill buttons */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--nav-bg); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: .95rem;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 4px 12px var(--glow-b); }
.brand .short { display: none; }
.links { gap: 6px; align-items: center; }
.pill { white-space: nowrap; padding: 7px 14px; border-radius: 999px; color: var(--text-2); font-weight: 500; transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.links a.pill { color: var(--text-2); }
.pill:hover { background: var(--pill-hover); color: var(--text); text-decoration: none; transform: translateY(-1px); }
.links a.pill.active { background: color-mix(in srgb, var(--c1) 14%, transparent); color: var(--ink1); }
.links a.pill.cta { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 4px 14px var(--glow-b); margin-left: 4px; }
.links a.pill.cta:hover { box-shadow: 0 6px 20px var(--glow-a); transform: translateY(-2px); }

/* hero glow + gradient headline */
.hero, .page-head { position: relative; isolation: isolate; }
.glow, .page-head::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -80px -20vw auto; height: 520px;
  background:
    radial-gradient(40% 50% at 20% 30%, var(--glow-a), transparent 70%),
    radial-gradient(35% 45% at 70% 20%, var(--glow-b), transparent 70%),
    radial-gradient(30% 40% at 50% 70%, var(--glow-c), transparent 70%);
  filter: blur(10px); animation: drift 18s ease-in-out infinite alternate; }
.page-head::before { height: 360px; opacity: .8; }
@keyframes drift { from { transform: translate3d(-2%, 0, 0) scale(1); } to { transform: translate3d(2%, 2%, 0) scale(1.06); } }
.grad { background: linear-gradient(90deg, var(--ink1), var(--ink2) 50%, var(--ink3)); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 8s ease-in-out infinite alternate; }
@keyframes shimmer { from { background-position: 0% center; } to { background-position: 100% center; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--c3), var(--c1)); }
.page-head .eyebrow { display: inline-block; }

/* buttons */
.btn { transition: transform .2s, box-shadow .2s, border-color .2s, background .2s; }
.btn.primary { background: linear-gradient(135deg, var(--c1), var(--c2)); border-color: transparent; color: #fff; box-shadow: 0 6px 20px var(--glow-b); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px var(--glow-a); opacity: 1; }
.btn:not(.primary):hover { border-color: var(--c2); transform: translateY(-2px); opacity: 1; }

/* tinted cards */
.tint-1 { --c: var(--c1); --ink: var(--ink1); }
.tint-2 { --c: var(--c2); --ink: var(--ink2); }
.tint-3 { --c: var(--c3); --ink: var(--ink3); }
.tint-4 { --c: var(--c4); --ink: var(--ink4); }
.card[class*="tint-"] { position: relative; overflow: hidden; border-top: 3px solid var(--c);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, var(--surface)), var(--surface) 70%);
  transition: transform .25s, box-shadow .25s, border-color .25s; }
.stat.card[class*="tint-"] .value { color: var(--ink); }
.dash .icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 1.4rem; margin-bottom: 12px;
  background: color-mix(in srgb, var(--c) 16%, transparent); }
a.card.dash .go { color: var(--ink); }
a.card.dash .go { display: inline-block; transition: transform .2s; }
a.card.dash:hover .go { transform: translateX(4px); }
a.card.dash:hover { border-color: var(--border); border-top-color: var(--c); }

/* live pulse */
.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--c3); box-shadow: 0 0 0 0 var(--c3); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c3) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* colourful steps */
.steps.colourful li { transition: transform .25s, box-shadow .25s; border-top: 3px solid var(--c, var(--c1)); }
.steps.colourful li:nth-child(1) { --c: var(--c1); } .steps.colourful li:nth-child(2) { --c: var(--c2); }
.steps.colourful li:nth-child(3) { --c: var(--c3); } .steps.colourful li:nth-child(4) { --c: var(--c4); }
.steps.colourful li::before { background: var(--c); color: #fff; }
.callout { border-left-color: var(--c2); background: color-mix(in srgb, var(--c2) 6%, transparent); padding: 12px 16px; border-radius: 0 10px 10px 0; }

/* scroll reveal (only when JS runs, so content is never hidden without it) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease, box-shadow .25s; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .brand .full { display: none; }
  .brand .short { display: inline; }
  .hide-sm { display: none; }
  .pill { padding: 6px 9px; font-size: .82rem; }
  .brand { gap: 8px; }
  .nav { gap: 8px; }
  .links { gap: 2px; }
  .links a.pill.cta { margin-left: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media (max-width: 380px) {
  .brand .short { display: none; }
  .pill { padding: 6px 8px; }
}

/* ======================= Colourful nav buttons ======================= */
:root { --deep1: #1c5cab; --deep2: #4a3aa7; --deep3: #0f7a55; }
.links a.pill.n1 { --c: var(--c1); --ink: var(--ink1); --deep: var(--deep1); }
.links a.pill.n2 { --c: var(--c2); --ink: var(--ink2); --deep: var(--deep2); }
.links a.pill.n3 { --c: var(--c3); --ink: var(--ink3); --deep: var(--deep3); }
.links a.pill.cta { --c: var(--c2); --deep: var(--deep1); }
.links a.pill { position: relative; overflow: hidden; display: inline-flex; align-items: center;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .25s, color .2s, box-shadow .25s, border-color .25s, padding .25s; }
.links a.pill:is(.n1, .n2, .n3) { color: var(--ink); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent); }
/* hover: fill with gradient, grow, glow */
.links a.pill:is(.n1, .n2, .n3):hover, .links a.pill:is(.n1, .n2, .n3):focus-visible, .links a.pill:is(.n1, .n2, .n3).active {
  color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--deep), var(--c));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 45%, transparent); }
.links a.pill:hover, .links a.pill:focus-visible { transform: translateY(-2px) scale(1.08); text-decoration: none; }
/* click: quick squish */
.links a.pill:active { transform: scale(.94); transition-duration: .08s; }
/* icon always shown; wiggles on hover */
.pill .ico { display: inline-block; margin-right: 6px; transform-origin: 50% 70%; }
@media (hover: hover) {
  .links a.pill:hover .ico, .links a.pill:focus-visible .ico { animation: ico-wiggle .6s cubic-bezier(.34, 1.56, .64, 1); }
}
@keyframes ico-wiggle {
  0% { transform: none; } 25% { transform: rotate(-16deg) scale(1.3); } 50% { transform: rotate(12deg) scale(1.22); }
  75% { transform: rotate(-6deg) scale(1.1); } 100% { transform: none; } }
/* nav icons need ~90px; below 800px the bar has no room for them */
@media (max-width: 799px) { .pill .ico { display: none; } }
@media (prefers-reduced-motion: reduce) { .links a.pill .ico { animation: none !important; } }
/* ripple from the click point */
.pill .ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, .55);
  transform: scale(0); animation: ripple .55s ease-out forwards; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pill .ripple { display: none; } }
.pill .arr { margin-left: 4px; }
@media (max-width: 640px) { .links a.pill.hide-sm { display: none; } }

/* ======================= LinkedIn + email buttons ======================= */
.links .pill.n4 { --c: #0a66c2; --ink: #0a66c2; --deep: #004182; }
.links .pill.n5 { --c: var(--c4); --ink: var(--ink4); --deep: #a8431a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .links .pill.n4 { --ink: #70b5f9; } }
:root[data-theme="dark"] .links .pill.n4 { --ink: #70b5f9; }
.links .pill:is(.n4, .n5) { color: var(--ink); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.links .pill:is(.n4, .n5):hover, .links .pill:is(.n4, .n5):focus-visible {
  color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--deep), var(--c)); box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 45%, transparent); }
.links .icon-btn { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; line-height: 0; vertical-align: middle; }
.links .icon-btn svg { display: block; }
.links .icon-btn svg { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.links .icon-btn:hover svg { transform: rotate(-8deg) scale(1.12); }
button.pill { font: inherit; cursor: pointer; }
.links .icon-btn:hover, .links .icon-btn:focus-visible { transform: translateY(-2px) scale(1.12); }

/* email pop-up */
dialog.mail { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); overflow: auto; }
dialog.mail[open] { animation: pop .28s cubic-bezier(.34, 1.56, .64, 1); }
dialog.mail::backdrop { background: rgba(10, 10, 12, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.mail-form { padding: 22px 22px 20px; border-top: 4px solid transparent; border-image: linear-gradient(90deg, var(--c1), var(--c2), var(--c3)) 1; display: grid; gap: 14px; }
.mail-head { display: flex; align-items: center; justify-content: space-between; }
.mail-head h2 { margin: 0; font-family: Fraunces, Georgia, serif; font-size: 1.6rem; }
.mail-x { border: 0; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.mail-x:hover { background: var(--pill-hover); color: var(--text); }
.mail-form p.muted { margin: -6px 0 0; }
.mail-form label { display: grid; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--text-2); }
.mail-form input, .mail-form textarea { font: inherit; font-size: .95rem; font-weight: 400; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; width: 100%; resize: vertical; transition: border-color .2s, box-shadow .2s; }
.mail-form input:focus, .mail-form textarea:focus { outline: none; border-color: var(--c1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c1) 22%, transparent); }
.mail-form input[readonly] { color: var(--text-2); }
.mail-to { display: flex; gap: 8px; }
.mini { font: inherit; font-size: .82rem; font-weight: 600; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; }
.mini:hover { border-color: var(--c1); }
.mini.done { background: var(--c3); border-color: var(--c3); color: #fff; }
.mail-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.mail-actions .btn { cursor: pointer; font: inherit; font-weight: 600; font-size: .95rem; }

/* contact row in the footer, so phones (narrow nav) still reach LinkedIn + email */
.footer .contact { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.footer .contact a, .footer .contact button { font: inherit; font-size: .85rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: border-color .2s, transform .2s; }
.footer .contact a:hover, .footer .contact button:hover { border-color: var(--c2); transform: translateY(-1px); text-decoration: none; }
@media (max-width: 380px) { .links .pill.n5 { display: none; } }

/* ======================= 3D: globe hero, bar grid, card tilt ======================= */
.hero-3d { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 24px; padding-top: 24px; }
.globe { position: relative; margin: 0; height: 520px; cursor: grab; user-select: none; -webkit-user-select: none; }
.globe.grabbing { cursor: grabbing; }
.globe canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 1.2s ease; }
.globe.ready canvas { opacity: 1; }
.globe.no-3d { display: none; }
.globe-cap { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; pointer-events: none; }
.globe-label { position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap; font-size: .75rem; padding: 3px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border); color: var(--text); transition: opacity .3s; backdrop-filter: blur(4px); }
.globe-label span { color: var(--muted); }
.grid3d { position: relative; height: 440px; margin-top: 12px; cursor: grab; user-select: none; -webkit-user-select: none; }
.grid3d canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity .8s; }
.grid3d.ready canvas { opacity: 1; }
.grid3d.no-3d { display: none; }
.grid-label { position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap; font-size: .75rem; color: var(--text-2); }
.grid-label.row { font-weight: 600; color: var(--text); }
.grid3d .tooltip { z-index: 3; }
.js .card[class*="tint-"] { transform-style: preserve-3d; will-change: transform; }
@media (max-width: 860px) {
  .hero-3d { grid-template-columns: 1fr; gap: 0; }
  .globe { height: 360px; margin-top: 8px; }
  .grid3d { height: 340px; }
}
@media (max-width: 560px) { .grid-label { font-size: .66rem; } .globe-label { font-size: .68rem; } }

/* ---- globe: clickable countries, story panel, time slider ---- */
.globe-col { position: relative; min-width: 0; }
@media (min-width: 861px) { .hero-3d .globe-col { margin-top: -80px; } } /* sphere sits low in its 520px canvas; centre it on the hero text */
.globe-label.clickable { pointer-events: auto; cursor: pointer; font: inherit; font-size: .75rem; transition: opacity .3s, border-color .2s, box-shadow .2s; }
.globe-label.clickable:hover, .globe-label.clickable:focus-visible { border-color: var(--c4); box-shadow: 0 4px 14px color-mix(in srgb, var(--c4) 30%, transparent); outline: none; }
.hover-tip { z-index: 4; }
.globe-panel { position: absolute; z-index: 5; right: 0; top: 12px; width: min(340px, 100%); max-height: calc(100% - 60px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--c4); border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28); opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .25s, transform .3s cubic-bezier(.34, 1.56, .64, 1); cursor: default; }
.globe-panel.open { opacity: 1; transform: none; }
.gp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.gp-head h3 { margin: 0; font-size: 1.1rem; }
.gp-sub { color: var(--muted); font-size: .78rem; }
.gp-x { border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.gp-x:hover { background: var(--pill-hover); color: var(--text); }
.gp-list { list-style: none; margin: 0; padding: 0; }
.gp-list li { padding: 9px 0; border-top: 1px solid var(--grid); font-size: .88rem; line-height: 1.4; }
.gp-list li:first-child { border-top: 0; }
.gp-list a { color: var(--text); display: block; }
.gp-list a:hover { color: var(--ink1); }
.gp-meta { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.globe-time { margin: 4px auto 0; max-width: 420px; text-align: center; opacity: 0; transition: opacity .4s; }
.globe-time.ready { opacity: 1; }
.gt-row { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--text-2); }
.globe-time:not(.has-history) .gt-row { display: none; }
.gt-k { white-space: nowrap; font-weight: 600; }
.gt-row input { flex: 1; accent-color: var(--c4); min-width: 0; }
.gt-date { min-width: 8.5em; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.gt-note { font-size: .75rem; margin: 6px 0 0; }
@media (max-width: 860px) { .globe-panel { left: 0; right: 0; margin: 0 auto; width: calc(100% - 8px); } }
.ranges { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); margin-top: 12px; }
.ranges[hidden] { display: none; }
.ranges button { font: inherit; font-size: .8rem; font-weight: 600; border: 0; background: transparent; color: var(--text-2); padding: 5px 14px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.ranges button:hover { color: var(--text); background: var(--pill-hover); }
.ranges button[aria-pressed="true"] { background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; }
.months { margin-top: 16px; }
.month ol { margin: 8px 0 0; padding-left: 18px; font-size: .88rem; }
.month li { margin-bottom: 8px; }
.month li > a { color: var(--text); }
.month li > a:hover { color: var(--ink1); }
.month .meta { display: block; color: var(--muted); font-size: .75rem; }
.month .eyebrow { margin-bottom: 0; }
.gp-x { width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center; padding: 0; border-radius: 50%; font-size: 1.5rem;
  border: 1px solid var(--border); background: var(--bg); margin: -4px -6px 0 0; transition: background .2s, color .2s, transform .2s; }
.gp-x:hover { background: var(--c4); border-color: var(--c4); color: #fff; transform: rotate(90deg); }

/* ======================= Automation demo ======================= */
.phone { position: relative; width: 272px; height: 560px; border-radius: 42px; padding: 12px; background: #0e0e10; flex: none;
  box-shadow: 0 0 0 2px #2a2a2e, 0 30px 60px rgba(0, 0, 0, .35), 0 0 60px var(--glow-b); }
.phone-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 96px; height: 24px; background: #0e0e10; border-radius: 0 0 14px 14px; z-index: 3; }
.phone-status { position: absolute; top: 16px; left: 30px; right: 30px; display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: #222; z-index: 2; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: #f6f8f4; color: #1d2a1f; font-size: 13px; }
.app-screen { position: absolute; inset: 0; padding: 48px 18px 18px; display: flex; flex-direction: column; gap: 10px;
  transform: translateX(100%); opacity: 0; transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .45s; }
.app-screen.active { transform: none; opacity: 1; }
.app-screen.left { transform: translateX(-30%); opacity: 0; }
.app-brand { display: grid; justify-items: center; gap: 2px; margin: 22px 0 18px; }
.app-logo { font-size: 44px; }
.app-brand b { font-size: 24px; color: #2f6b3f; }
.app-brand small, .app-small { color: #6b786d; font-size: 11.5px; }
.app-field { display: grid; gap: 4px; font-size: 11px; color: #4f5d51; }
.app-field input { font: inherit; font-size: 13px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #d6ded6; background: #fff; color: #1d2a1f; outline: none; transition: border-color .2s, box-shadow .2s; }
.app-field input.focus { border-color: #2f6b3f; box-shadow: 0 0 0 3px rgba(47, 107, 63, .18); }
.app-btn { margin-top: 6px; text-align: center; padding: 12px; border-radius: 12px; background: #2f6b3f; color: #fff; font-weight: 600; transition: transform .15s, filter .15s; }
.app-btn.pressed, .app-card.pressed, .app-basket.pressed { transform: scale(.95); filter: brightness(.9); }
.app-bar { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.app-basket { position: relative; font-size: 18px; transition: transform .15s; }
.app-basket i { position: absolute; top: -6px; right: -9px; min-width: 16px; height: 16px; border-radius: 8px; background: #2f6b3f; color: #fff; font-size: 10px; font-style: normal; display: grid; place-items: center; }
.app-basket i.bump { animation: bump .45s; }
@keyframes bump { 50% { transform: scale(1.5); } }
.app-card { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); transition: transform .15s, filter .15s; }
.app-card div { flex: 1; display: grid; }
.app-card small { color: #6b786d; font-size: 11px; }
.app-card em { font-style: normal; font-weight: 700; color: #2f6b3f; }
.app-emoji { font-size: 26px; }
.app-hero { font-size: 92px; text-align: center; background: #e7efe4; border-radius: 18px; padding: 8px 0; }
.app-title { font-size: 17px; }
.app-price { font-size: 20px; font-weight: 700; color: #2f6b3f; }
.app-total { display: flex; justify-content: space-between; color: #4f5d51; padding: 0 4px; }
.app-total.big { font-weight: 700; color: #1d2a1f; font-size: 15px; border-top: 1px solid #dfe5dd; padding-top: 10px; }
.app-done { margin: auto; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 18px; border-radius: 18px; }
.app-done b { font-size: 18px; }
.app-done small { color: #6b786d; }
.app-tick { width: 72px; height: 72px; border-radius: 50%; background: #2f6b3f; color: #fff; font-size: 38px; display: grid; place-items: center; animation: pop .5s; }
.asserted { outline: 2.5px solid #22a35a; outline-offset: 3px; border-radius: 10px; position: relative; }
.asserted::after { content: "✓"; position: absolute; top: -10px; right: -10px; width: 18px; height: 18px; border-radius: 50%; background: #22a35a; color: #fff; font-size: 11px; display: grid; place-items: center; }
.touch { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(98, 80, 214, .35); border: 2px solid rgba(98, 80, 214, .8);
  opacity: 0; pointer-events: none; z-index: 5; transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
.touch.on { opacity: 1; }
.touch.press::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(98, 80, 214, .8); animation: ripple .5s ease-out forwards; }

.demo-full { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 8px; }
.demo-left { display: grid; justify-items: center; gap: 10px; position: sticky; top: 84px; }
.demo-cap { font-size: .8rem; margin: 0; }
.demo-right { display: grid; gap: 12px; min-width: 0; }
.demo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.demo-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mini-btn, .speed button { font: inherit; font-size: .82rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s, transform .2s; }
.mini-btn:hover { border-color: var(--c2); transform: translateY(-1px); }
.speed { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; background: var(--bg); }
.speed button { border: 0; background: transparent; padding: 5px 12px; }
.speed button[aria-pressed="true"] { background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; }
.status { font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); }
.status.run { color: var(--ink1); border-color: var(--c1); }
.status.run::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c1); margin-right: 6px; animation: pulse 1.4s infinite; }
.status.ok { color: #fff; background: #22a35a; border-color: #22a35a; }
.status.pause { color: var(--ink4); border-color: var(--c4); }
.code-pane, .term-pane { border-radius: 12px; overflow: hidden; border: 1px solid #2a2a30; background: #0f1117; color: #d6deeb; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.pane-head { display: flex; align-items: center; gap: 10px; font: 500 .75rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #8b93a7; padding: 9px 12px; background: #161922; border-bottom: 1px solid #23262f; }
.dots { display: inline-flex; gap: 5px; } .dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.code-body { position: relative; max-height: 330px; overflow: auto; font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-body ol { margin: 0; padding: 10px 0; list-style: none; counter-reset: ln; }
.code-body li { counter-increment: ln; padding: 0 14px 0 0; white-space: pre; transition: background .25s; border-left: 3px solid transparent; }
.code-body li::before { content: counter(ln); display: inline-block; width: 34px; text-align: right; margin-right: 14px; color: #4b5263; }
.code-body li.current { background: rgba(98, 80, 214, .22); border-left-color: #9085e9; }
.tk-str { color: #addb67; } .tk-kw { color: #c792ea; } .tk-sel { color: #82aaff; } .tk-fn { color: #7fdbca; }
.term-body { height: 210px; overflow: auto; padding: 10px 12px; font: 11.5px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.tl { white-space: pre-wrap; word-break: break-all; animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } }
.tl.cmd { color: #fff; } .tl.cmd::before { content: ""; }
.tl.dim { color: #7a8299; } .tl.info { color: #82aaff; } .tl.pass { color: #4ade80; } .tl.big { font-weight: 700; font-size: 13px; }
.tests { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.test { display: flex; align-items: center; gap: 10px; font-size: .88rem; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: all .3s; }
.test::before { content: "○"; font-weight: 700; width: 1em; text-align: center; }
.test.running { color: var(--text); border-color: var(--c1); } .test.running::before { content: "◌"; color: var(--c1); animation: spin 1s linear infinite; }
.test.passed { color: var(--text); border-color: #22a35a; background: color-mix(in srgb, #22a35a 10%, var(--surface)); } .test.passed::before { content: "✓"; color: #22a35a; animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* home teaser */
.demo-mini { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; padding: 28px; border-radius: 20px; border: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c2) 10%, var(--surface)), var(--surface) 60%); }
.dm-phone { width: calc(272px * .78); height: calc(560px * .78); }
.dm-phone .phone { transform: scale(.78); transform-origin: top left; }
.dm-copy h2 { font-family: Fraunces, Georgia, serif; font-size: clamp(1.5rem, 3vw, 2rem); }
.term-pane.small { margin: 14px 0 18px; }
.term-pane.small .term-body { height: 150px; overflow: hidden; }
@media (max-width: 860px) {
  .demo-full { grid-template-columns: 1fr; }
  .demo-left { position: static; }
  .demo-mini { grid-template-columns: 1fr; justify-items: center; padding: 20px 16px; }
  .dm-copy { width: 100%; }
  .code-body { max-height: 260px; }
}

/* ---------- Outage watch ---------- */
:root { --ok: #1baf7a; --minor: #d9a21b; --major: #e0453a; }
.status-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.status-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; color: var(--text); border-left: 4px solid var(--lvl, var(--ok)); transition: transform .2s; }
.status-tile:hover { text-decoration: none; transform: translateY(-2px); }
.status-tile { cursor: pointer; }
.status-tile.is-active { outline: 2px solid var(--lvl); outline-offset: 2px; }
.st-more { display: block; margin-top: auto; font-size: .75rem; color: var(--muted); }
.status-tile:hover .st-more, .status-tile.is-active .st-more { color: var(--text-2); }
#incident-log { scroll-margin-top: 120px; }
.svc-panel { border-left: 4px solid var(--lvl, var(--ok)); padding: 10px 14px; margin: 6px 0 10px; border-radius: 8px;
  background: color-mix(in srgb, var(--lvl, var(--ok)) 7%, transparent); }
.svc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.svc-head .fav { width: 20px; height: 20px; }
.svc-head .svc-name { font-size: 1.05rem; }
.svc-clear { margin-left: auto; font: inherit; font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  color: var(--text); background: transparent; border: 1px solid var(--grid); }
.svc-clear:hover { border-color: var(--text-2); }
.svc-panel p { margin: 6px 0 0; }
.svc-down { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; color: var(--text-2); }
.svc-down li { padding-left: 16px; position: relative; }
.svc-down li::before { content: ''; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--lvl); }
.lvl-ok { --lvl: var(--ok); } .lvl-minor { --lvl: var(--minor); } .lvl-major { --lvl: var(--major); } .lvl-done { --lvl: var(--muted); }
.st-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lvl); flex: none; }
.lvl-minor .st-dot, .lvl-major .st-dot { animation: pulse 2s infinite; box-shadow: 0 0 0 0 var(--lvl); }
.st-word { margin-left: auto; font-size: .75rem; font-weight: 600; color: var(--lvl); }
.lvl-ok .st-word { color: var(--muted); }
.st-note { font-size: .82rem; color: var(--text-2); overflow-wrap: anywhere; }
.status-tile.lvl-major { background: color-mix(in srgb, var(--major) 8%, var(--surface)); }
/* Outage watch tiles: any problem is red and flashing, like the outage pill (no amber) */
.status-tile.lvl-minor, .svc-panel.lvl-minor { --lvl: var(--major); }
.status-tile.lvl-minor { background: color-mix(in srgb, var(--major) 8%, var(--surface)); }
.status-tile.lvl-minor, .status-tile.lvl-major { animation: tile-flash 1.4s ease-in-out infinite; }
@keyframes tile-flash { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--major) 0%, transparent); border-color: var(--major); }
  50% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--major) 75%, transparent), 0 0 18px color-mix(in srgb, var(--major) 45%, transparent);
        border-color: color-mix(in srgb, var(--major) 45%, var(--surface)); } }
@media (prefers-reduced-motion: reduce) { .status-tile.lvl-minor, .status-tile.lvl-major { animation: none; box-shadow: 0 0 0 1px var(--major); } }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; margin-right: 6px;
  color: var(--lvl); background: color-mix(in srgb, var(--lvl) 14%, transparent); }
.outage-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; font-size: .85rem; }
.outage-strip .os-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.outage-strip .os-item .st-dot { width: 8px; height: 8px; }

/* Flash-news outage ticker under the nav (every page) */
.flash { display: block; color: var(--text); border-top: 1px solid var(--border); font-size: .82rem;
  background: color-mix(in srgb, var(--lvl) 12%, var(--nav-bg)); }
.flash:hover { text-decoration: none; background: color-mix(in srgb, var(--lvl) 20%, var(--nav-bg)); }
.flash-in { display: flex; align-items: center; gap: 12px; height: 34px; }
.flash-main { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 12px; color: inherit; }
.flash-main:hover { text-decoration: none; }
.flash-rss { flex: none; display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .72rem; letter-spacing: .04em;
  color: #fff; background: #ee802f; padding: 3px 9px; border-radius: 999px; }
.flash-rss:hover { text-decoration: none; background: #d96d1c; }
.flash-label { flex: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .7rem;
  color: #fff; background: var(--lvl); padding: 3px 10px; border-radius: 999px; }
.flash-label .st-dot { width: 7px; height: 7px; background: #fff; }
.flash.lvl-major .flash-label .st-dot, .flash.lvl-minor .flash-label .st-dot { animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.flash-track { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.flash-run { display: inline-flex; white-space: nowrap; animation: ticker 40s linear infinite; }
.flash:hover .flash-run, .flash:focus-visible .flash-run { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.flash-item { padding-right: 40px; color: var(--text-2); }
.flash-item b { color: var(--lvl); margin-right: 4px; }
.flash-static { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flash-go { flex: none; font-weight: 600; color: var(--ink1, var(--c1)); }
@media (max-width: 560px) { .flash-go { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .flash-run { animation: none; } .flash-track { -webkit-mask-image: none; mask-image: none; text-overflow: ellipsis; }
  .flash.lvl-major .flash-label .st-dot, .flash.lvl-minor .flash-label .st-dot { animation: none; }
}
.flash.lvl-minor .flash-label { color: #241a00; } .flash.lvl-minor .flash-label .st-dot { background: #241a00; } /* white on amber is too faint */

/* Globe: one dot per story, coloured by BBC section group (validated: CVD + normal-vision pass in both modes) */
:root { --sec-uk: #2a78d6; --sec-world: #1baf7a; --sec-biz: #eda100; --sec-sci: #e87ba4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sec-uk: #3987e5; --sec-world: #199e70; --sec-biz: #c98500; --sec-sci: #d55181; } }
:root[data-theme="dark"] { --sec-uk: #3987e5; --sec-world: #199e70; --sec-biz: #c98500; --sec-sci: #d55181; }
.globe-key { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: .8rem; color: var(--text-2); }
.globe-key li { display: inline-flex; align-items: center; gap: 6px; }
.globe-key i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* Markets dashboard: TradingView widget slots. Reserve height so the page doesn't jump as they load. */
.tv-widget { margin-top: 12px; min-height: 120px; }
.tv-widget[data-height="420"] { min-height: 450px; }
.tv-widget[data-height="520"] { min-height: 550px; }
.tv-widget.tv-tape { min-height: 46px; margin: 0 0 8px; }
.tv-widget .tradingview-widget-copyright { font-size: .75rem; color: var(--muted); margin-top: 6px; }
.tv-widget .tradingview-widget-copyright a { color: var(--muted); }
.disclaimer { margin-top: 16px; }
/* The page declares color-scheme: dark; an iframe whose document doesn't match gets an opaque white
   backdrop, which turned TradingView's dark widgets into pale text on white. Match their (light) default. */
.tv-widget iframe { color-scheme: light; }

/* ======================= Markets: 5th colour (gold), nav pill, homepage teaser ======================= */
:root { --c5: #c98a00; --ink5: #8a5f00; --deep5: #8a5f00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c5: #d9a227; --ink5: #f2c46d; } }
:root[data-theme="dark"] { --c5: #d9a227; --ink5: #f2c46d; }
.tint-5 { --c: var(--c5); --ink: var(--ink5); }
.links a.pill.n6 { --c: var(--c5); --ink: var(--ink5); --deep: var(--deep5); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.links a.pill.n6:hover, .links a.pill.n6:focus-visible, .links a.pill.n6.active {
  color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--deep), var(--c));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 45%, transparent); }
.new-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: .62rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1.5; color: #1a1300; background: var(--c5); }
.eyebrow .new-badge { margin: 0 8px 0 0; }
.links a.pill.n6:hover .new-badge { background: #fff; }

.mk-teaser { margin-top: 32px; }
.js .mk-teaser.reveal.in:hover, .card.mk-teaser[class*="tint-"]:hover { transform: none; box-shadow: var(--shadow); }
.mk-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.mk-head h2 { margin: 6px 0 4px; }
.mk-head .muted { margin: 0; max-width: 60ch; }
.mk-teaser .tv-tape { margin: 16px 0 4px; }
.mk-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.mk-fact { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; color: var(--text-2);
  border: 1px solid var(--border); background: color-mix(in srgb, var(--c5) 6%, transparent); }
.mk-fact b { color: var(--ink5); font-size: 1.25rem; }
.mk-fact span { font-size: .85rem; }
.mk-fact:hover { text-decoration: none; border-color: var(--c5); }
.mk-news { list-style: none; margin: 14px 0 0; padding: 0; }
.mk-news li { padding: 8px 0; border-top: 1px solid var(--grid); font-size: .92rem; }
.mk-news .muted { font-size: .78rem; margin-left: 6px; }
/* Five dashboard cards: three per row (3 + 2) instead of four plus an orphan */
#dashboards .grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
/* Phones: the Markets pill made the bar wider than the screen ("Work with me" was cut off). The footer's
   contact row already covers email on phones, and the logo alone identifies the site. */
@media (max-width: 640px) {
  .links .pill .new-badge, .brand .short, .links .pill.n5 { display: none; }
}
/* Tablets: the full name + GitHub pill + badges overflowed between 641 and 960px (even before Markets). */
@media (min-width: 641px) and (max-width: 960px) {
  .brand .full, .links .pill .new-badge { display: none; }
  .brand .short { display: inline; }
}
/* Small phones: About is still one tap away via "Work with me" (/about/#for-business). */
@media (max-width: 400px) { .links .pill.n2 { display: none; } }
@media (min-width: 641px) and (max-width: 720px) { .links .pill.n4 { display: none; } }
@media (max-width: 340px) { .links .pill { padding: 6px 6px; } }

/* ---- homepage (2026-11-18 tidy): hero = automation demo, dashboards as proof, closing CTA ---- */
.hero-home { padding-top: 32px; }
.hero-home h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 8px 0 12px; }
.hero-home .actions { margin-top: 4px; }
.dash .big { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 6px; color: var(--ink, var(--text)); }
.dash h3 .new-badge { vertical-align: middle; margin-left: 6px; font-size: .65rem; }
.globe-card { margin-bottom: 24px; }
.home-cta { padding: 28px; margin-top: 8px; }
.home-cta h2 { margin-top: 0; }
.home-cta .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.globe-card .globe { margin-top: -40px; }
@media (max-width: 860px) { .globe-card .globe { margin-top: 0; } }

/* ---- Live news ticker (replaced the outage ticker, 18 Nov) ---- */
.flash.news { --lvl: var(--c1); }
.flash.news.has-breaking { --lvl: var(--major); }
.flash.news:hover { background: color-mix(in srgb, var(--lvl) 12%, var(--nav-bg)); }
.flash.news.has-breaking .flash-label .st-dot { animation: blink 1.2s steps(2, start) infinite; }
.flash-set { display: inline-flex; }
.flash-main .flash-item { color: var(--text-2); }
.flash-main .flash-item:hover, .flash-main .flash-item:focus-visible { color: var(--text); text-decoration: underline; }
.flash-item b { text-transform: uppercase; font-size: .68rem; letter-spacing: .05em; margin-right: 7px; }
.flash-item.k-breaking b { color: var(--major); }
.flash-item.k-trending b { color: var(--c4); }
.flash-item.k-latest b { color: var(--c5); }
.flash-main:hover .flash-run, .flash-main:focus-within .flash-run { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .flash-track { overflow-x: auto; } }

/* hero: intro on top, demo + globe side by side (18 Nov) */
.hero-intro { max-width: 820px; margin-bottom: 28px; }
.hero-pair { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.hero-card { position: relative; padding: 22px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.hero-pair .demo-mini { gap: 20px; padding: 22px; }
.hero-pair .dm-copy h2, .hero-globe h2 { font-family: Fraunces, Georgia, serif; font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: 6px 0 6px; }
.hero-pair .dm-copy .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-globe { display: flex; flex-direction: column; background: linear-gradient(160deg, color-mix(in srgb, var(--c4) 9%, var(--surface)), var(--surface) 60%); }
.hero-globe .globe { height: 420px; margin-top: 0; }
.hero-globe .globe-key { margin-top: 0; }
.hero-globe .go-link { margin-top: auto; padding-top: 12px; font-weight: 600; font-size: .9rem; }
@media (max-width: 1100px) { .hero-pair { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .hero-globe .globe { height: 340px; margin-top: 0; } }

/* ---- Markets: week ahead + earnings calendar ---- */
.week-ahead { margin: 20px 0 8px; padding: 24px; }
.week-ahead h2 { margin: 6px 0 14px; }
.wa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.wa-grid h3 { font-size: 1rem; margin: 0 0 8px; }
.wa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.wa-list .flag { margin-right: 6px; }
.wa-note { margin: 16px 0 0; font-size: .8rem; }
.badge { display: inline-block; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.badge.big { color: #241a00; background: var(--c5); }
.badge.mag7 { color: #fff; background: var(--c4); }
.earn-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.earn-day { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.earn-day.closed { opacity: .75; }
.earn-day h3 { font-size: .95rem; margin: 0 0 10px; }
.earn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.earn-list li { display: grid; gap: 2px; padding: 7px 9px; border-radius: 10px; font-size: .85rem; border-left: 3px solid transparent; }
.earn-list li.is-big { border-left-color: var(--c5); background: color-mix(in srgb, var(--c5) 12%, transparent); }
.earn-list .e-meta { color: var(--text-2); font-size: .78rem; }
@media (max-width: 900px) { .wa-grid { grid-template-columns: 1fr; gap: 18px; } }

/* hero v2: demo is the star (bigger, highlighted), globe is the supporting panel (18 Nov) */
.hero-pair { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.hero-pair .demo-mini { gap: 28px; padding: 26px; border: 1.5px solid color-mix(in srgb, var(--c1) 55%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 10%, transparent), 0 18px 50px -20px color-mix(in srgb, var(--c1) 45%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 12%, var(--surface)), var(--surface) 65%); }
.hero-pair .dm-phone { width: calc(272px * .92); height: calc(560px * .92); }
.hero-pair .dm-phone .phone { transform: scale(.92); }
.hero-pair .dm-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.hero-pair .term-pane.small .term-body { height: 190px; }
.hero-globe { padding: 18px; }
.hero-globe h2 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.hero-globe p.muted { font-size: .85rem; }
.hero-globe .globe { height: 320px; }
.hero-globe .globe-key { font-size: .72rem; gap: 4px 10px; }
@media (max-width: 1100px) { .hero-pair { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .hero-pair .dm-phone { width: calc(272px * .78); height: calc(560px * .78); } .hero-pair .dm-phone .phone { transform: scale(.78); } .hero-globe .globe { height: 320px; } }

/* outage chip + RSS back in the news bars (v2.1) */
.outage-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .72rem; letter-spacing: .03em;
  padding: 3px 10px; border-radius: 999px; color: var(--text); border: 1px solid color-mix(in srgb, var(--lvl) 60%, transparent);
  background: color-mix(in srgb, var(--lvl) 16%, transparent); }
.outage-chip:hover { text-decoration: none; background: color-mix(in srgb, var(--lvl) 28%, transparent); }
.outage-chip.lvl-ok { --lvl: var(--ok); } .outage-chip.lvl-minor { --lvl: var(--minor); } .outage-chip.lvl-major { --lvl: var(--major); }
.outage-chip .st-dot { width: 7px; height: 7px; background: var(--lvl); }
.outage-chip.lvl-major .st-dot, .outage-chip.lvl-minor .st-dot { animation: blink 1.2s steps(2, start) infinite; }
/* live problem: solid red pill that flashes; no problem: muted 30-day history */
.outage-chip.lvl-major { color: #fff; background: var(--major); border-color: var(--major); animation: oc-flash 1.2s ease-in-out infinite; }
.outage-chip.lvl-major .st-dot { background: #fff; }
.outage-chip.lvl-major:hover { background: color-mix(in srgb, var(--major) 85%, #000); }
@keyframes oc-flash { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--major) 70%, transparent); }
  50% { opacity: .55; box-shadow: 0 0 0 6px transparent; } }
.outage-chip.lvl-past { --lvl: var(--muted, #8b93a7); color: var(--muted, #8b93a7); font-weight: 600; }
.outage-chip.lvl-past .st-dot { display: none; }
.oc-short { display: none; }
@media (max-width: 560px) { .oc-long { display: none; } .oc-short { display: inline; } .flash-rss { padding: 4px 6px; } }
@media (prefers-reduced-motion: reduce) { .outage-chip .st-dot, .outage-chip { animation: none !important; } }

/* ================= v2.2 motion pass (18 Nov) ================= */
/* 1. hero: text + live pipeline panel side by side */
.hero-intro { max-width: 880px; }
.pipeline { position: relative; border-radius: 18px; padding: 16px 18px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 20px 50px -24px color-mix(in srgb, var(--c3) 45%, transparent); transition: box-shadow .4s, border-color .4s; }
.pipeline.passed { border-color: color-mix(in srgb, #22a35a 55%, var(--border)); box-shadow: 0 20px 50px -22px color-mix(in srgb, #22a35a 55%, transparent); }
.pl-head { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-bottom: 10px; }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; background: #22a35a; }
.pipeline.running .pl-dot { background: var(--c1); animation: blink 1s steps(2, start) infinite; }
.pl-state { margin-left: auto; font-family: inherit; font-size: .72rem; color: var(--text-2); }
.pl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pl-steps li { display: grid; grid-template-columns: 22px auto 1fr; align-items: center; gap: 4px 10px; padding: 7px 8px; border-radius: 10px; font-size: .85rem;
  transition: background .3s, opacity .3s; opacity: .45; }
.pl-steps li span:last-child { color: var(--text-2); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-steps li.run, .pl-steps li.done { opacity: 1; }
.pl-steps li.run { background: color-mix(in srgb, var(--c1) 12%, transparent); }
.pl-ic { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); display: inline-grid; place-items: center; font-size: .65rem; font-weight: 800; color: #fff; }
.pl-steps li.run .pl-ic { border-color: var(--c1); border-top-color: transparent; animation: spin .8s linear infinite; }
.pl-steps li.done .pl-ic { border-color: #22a35a; background: #22a35a; animation: pop .35s ease; }
.pl-steps li.done .pl-ic::after { content: "✓"; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.pl-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .78rem; }
.pl-pass { font-weight: 700; color: #22a35a; }
@media (max-width: 960px) { .hero-intro { grid-template-columns: 1fr; gap: 24px; } }

/* 2. moving glow + faint grid behind the hero */
.hero-home { position: relative; isolation: isolate; }
.hero-home .glow { height: 680px; inset: -120px -20vw auto; animation-duration: 14s; opacity: 1; }
.hero-grid { position: absolute; z-index: -1; inset: -40px -10vw auto; height: 640px; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px);
  background-size: 44px 44px; animation: gridmove 22s linear infinite;
  -webkit-mask-image: radial-gradient(60% 60% at 60% 35%, #000, transparent 75%); mask-image: radial-gradient(60% 60% at 60% 35%, #000, transparent 75%); }
@keyframes gridmove { to { background-position: 44px 44px, 44px 44px; } }

/* 3. a light sweep across the gradient headline every few seconds */
.grad.sweep { background-image: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .7) 50%, transparent 58%), linear-gradient(90deg, var(--ink1), var(--ink2) 50%, var(--ink3));
  background-size: 250% 100%, 200% auto; background-repeat: no-repeat, repeat; animation: sweep 6s ease-in-out infinite, shimmer 8s ease-in-out infinite alternate; }
@keyframes sweep { 0%, 55% { background-position: 150% 0, 0% center; } 100% { background-position: -50% 0, 100% center; } }

/* 5. hover: button arrows nudge, dashboard icons bounce, hero cards glow */
.btn .arr { display: inline-block; transition: transform .2s; }
.btn:hover .arr { transform: translateX(4px); }
.dash .icon { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.hero-card { transition: transform .3s, box-shadow .3s, border-color .3s; }

@media (prefers-reduced-motion: reduce) {
  .hero-grid, .hero-home .glow, .grad.sweep { animation: none; }
  .pl-steps li { opacity: 1; } .pl-ic { animation: none !important; }
}
@media (max-width: 560px) { .pl-steps li span:last-child { grid-column: 2 / -1; white-space: normal; } .pl-steps li { align-items: start; } }

/* ---- v2.3 photos + logos ---- */
.dash-img { display: block; width: calc(100% + 40px); max-width: none; height: 120px; object-fit: cover; margin: -20px -20px 14px; border-radius: 9px 9px 0 0;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); transition: transform .5s ease; }
a.card.dash { overflow: hidden; }
.dash .dash-img + .icon { margin-top: -38px; position: relative; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.page-head.has-photo::after { content: ""; position: absolute; z-index: -1; pointer-events: none; top: 0; right: -10vw; bottom: -20px; width: min(62vw, 820px);
  background: var(--photo) center / cover no-repeat; opacity: .38;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%, #000 80%, transparent), linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000 80%, transparent); -webkit-mask-composite: source-in; mask-composite: intersect; }
:root[data-theme="light"] .page-head.has-photo::after { opacity: .28; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .page-head.has-photo::after { opacity: .28; } }
@media (max-width: 700px) { .page-head.has-photo::after { width: 100vw; right: -16px; opacity: .2; } }
.logo-tile { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 7px; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.logo-tile img { position: absolute; inset: 3px; width: 20px; height: 20px; object-fit: contain; background: #fff; }
.logo-letter { font-weight: 800; font-size: .8rem; color: #333; }
.earn-list .e-name { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.earn-list .e-name .logo-tile { margin-right: 2px; }
.wa-list li { display: block; }
.logo-tile.dark, .logo-tile.dark img { background: #1d2430; }
.logo-tile.dark .logo-letter { color: #fff; }

/* ---- v2.4 favicons (services, sources, story domains) ---- */
.fav { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; margin-right: 6px; background: #fff; padding: 1px; object-fit: contain; }
.status-tile .fav { width: 20px; height: 20px; vertical-align: -5px; margin: 0 2px 0 0; }
.st-head { display: flex; align-items: center; gap: 6px; }
.st-head .st-word { margin-left: auto; }

/* Region tabs above a market widget (Market movers, Gainers and losers) */
.tv-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 14px; }
.tv-tabs button { font: inherit; font-size: .9rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.tv-tabs button:hover { color: var(--text); border-color: var(--c2); }
.tv-tabs button[aria-selected="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.tv-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tv-tabs-group { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 2px 0 10px; }
@media (max-width: 640px) {
  .tv-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tv-tabs::-webkit-scrollbar { display: none; }
  .tv-tabs button { flex: none; }
  .tv-tabs-group { flex: none; }
}

/* ======================= v3.0: CV homepage, delivery flow, projects ======================= */
.hero-cv { padding-top: 32px; }
.hero-cv h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 8px 0 14px; }
.cv-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: center; }
.cv-top .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cv-top .demo-mini { gap: 20px; padding: 22px; }
.cv-top .dm-copy h2 { font-family: Fraunces, Georgia, serif; font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: 6px 0; }
.cv-top .dm-copy .actions { margin-top: 8px; gap: 8px; }
@media (max-width: 960px) { .cv-top { grid-template-columns: 1fr; } }
button.btn { font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; }

.role-chips { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.role-chips li { padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.role-chips .rc1 { --c: var(--c1); --ink: var(--ink1); } .role-chips .rc2 { --c: var(--c2); --ink: var(--ink2); } .role-chips .rc3 { --c: var(--c3); --ink: var(--ink3); } .role-chips .rc4 { --c: var(--c4); --ink: var(--ink4); } .role-chips .rc5 { --c: var(--c5); --ink: var(--ink5); }

a.role-card { color: inherit; display: flex; flex-direction: column; }
a.role-card:hover { text-decoration: none; }
a.role-card .go { margin-top: auto; color: var(--ink); }
.role-card .icon, .project .icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 1.4rem; margin-bottom: 10px;
  background: color-mix(in srgb, var(--c) 14%, transparent); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--border); display: grid; gap: 18px; }
.timeline > li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.timeline > li::before { content: ""; position: absolute; left: -31px; top: 22px; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 4px var(--bg); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.tl-head h3 { margin: 0; }
.tl-meta { color: var(--muted); font-size: .9rem; }
.timeline ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); }
.timeline ul li { margin: 4px 0; }
.draft-badge { display: inline-block; vertical-align: middle; font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--major, #d03b3b); color: #fff; }

.quote { margin: 0; }
.quote blockquote { margin: 0 0 12px; font-family: Fraunces, Georgia, serif; font-size: 1.1rem; line-height: 1.45; }
.quote figcaption { font-size: .9rem; color: var(--text-2); }

a.side-project { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; color: inherit;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c5) 10%, var(--surface)), var(--surface) 70%); }
a.side-project:hover { text-decoration: none; border-color: var(--c5); }
a.side-project h3 { margin: 8px 0 4px; }
a.side-project p { margin: 0; max-width: 62ch; }
a.side-project .go { color: var(--ink5); }
.eyebrow .pulse { display: inline-block; }

/* ---- Delivery flow: each stage lights up in turn, a dot travels along the connector ---- */
.flow-wrap { padding: 24px; }
.flow-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.flow-head h2 { margin: 0; }
.flow-ctl { display: flex; gap: 8px; }
.flow-ctl .mini-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.flow { --n: 8; --step: 1.6s; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 14px; position: relative; }
.flow.one-qa .fs-opt { display: none; }
.fs { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); font-size: .85rem; color: var(--text-2); min-width: 0; }
.fs b { color: var(--text); font-size: 1rem; }
.fs em { font-style: normal; font-size: .75rem; color: var(--muted); margin-top: auto; padding-top: 6px; }
.fs-ico { font-size: 1.4rem; }
.fs-opt b::after { content: "optional"; display: block; width: fit-content; margin-top: 3px; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink2); border: 1px solid color-mix(in srgb, var(--c2) 40%, transparent); border-radius: 999px; padding: 1px 6px; vertical-align: middle; }
/* connector arrow between stages */
.fs:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -14px; width: 14px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--c1) 0 4px, transparent 4px 7px); background-size: 7px 2px; }
.flow.run .fs:not(:last-child)::after { animation: flow-dash .6s linear infinite; }
@keyframes flow-dash { to { background-position: 7px 0; } }
.flow.one-qa .fs:nth-last-child(4)::after { display: block; }
.flow.run .fs { animation: fs-on calc(var(--n) * var(--step)) infinite; animation-delay: calc(var(--i) * var(--step)); }
@keyframes fs-on {
  0% { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 14%, var(--surface)); transform: translateY(-4px);
       box-shadow: 0 10px 24px color-mix(in srgb, var(--c1) 25%, transparent); }
  12%, 100% { border-color: var(--border); background: var(--surface); transform: none; box-shadow: none; }
}
.flow-loop { margin: 16px 0 0; color: var(--text-2); font-size: .92rem; }
.flow-loop span { color: var(--c4); font-weight: 700; margin-right: 4px; }
@media (max-width: 1100px) { .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); } .fs:nth-child(4n)::after { display: none; } }
@media (max-width: 640px) {
  .flow { grid-template-columns: 1fr; gap: 12px; }
  .fs { display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; }
  .fs .fs-ico { grid-row: span 3; }
  .fs:not(:last-child)::after, .fs:nth-child(4n)::after { display: block; top: auto; bottom: -12px; left: 26px; right: auto; width: 2px; height: 12px;
    background: repeating-linear-gradient(180deg, var(--c1) 0 4px, transparent 4px 7px); }
}
@media (prefers-reduced-motion: reduce) { .flow.run .fs, .flow.run .fs::after { animation: none; } }

.table-scroll { overflow-x: auto; }
.raci { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
.raci th, .raci td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--grid); }
.raci thead th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.raci td { color: var(--text-2); }
.raci td b { color: var(--ink1); }
.raci { table-layout: fixed; }
.raci col.raci-step { width: 20%; }
.raci td, .raci th { vertical-align: middle; }
.raci td.own { position: relative; }
.raci td.own::before { content: ""; position: absolute; inset: 5px 4px; border-radius: 8px; background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.raci td.own b { position: relative; color: var(--c); }
.raci tr td.own:nth-child(2) { --c: var(--c1); }
.raci tr td.own:nth-child(3) { --c: var(--c2); }
.raci tr td.own:nth-child(4) { --c: var(--c3); }
.raci tr td.own:nth-child(5) { --c: var(--c4); }

.project { display: flex; flex-direction: column; }
a.project { color: inherit; } a.project:hover { text-decoration: none; }
.project .go { margin-top: auto; padding-top: 10px; color: var(--ink); font-weight: 600; }
.project .eyebrow { display: inline-block; }
.project .thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; margin-top: 14px; border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.35); }

.facts { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); font-size: .92rem; }
.hero-globe-solo { margin-top: 8px; }
.tl-meta b { color: var(--text-2); font-weight: 600; }
.tl-earlier p { margin: 8px 0 0; font-size: .92rem; }

/* Full-width card inside a two-column grid (Projects: "Leading QA and delivery") */
.grid.two > .wide { grid-column: 1 / -1; }

/* Site-wide role line in the footer (SEO: repeats the key roles on every page) */
.footer-roles { width: 100%; margin: 0 0 12px; font-size: .8rem; color: var(--text-2); text-align: center; }

/* Platform strip under the hero role chips */
.platforms { display: inline-flex; flex-wrap: wrap; align-items: stretch; margin: 2px 0 18px; border-radius: 14px; padding: 1.5px;
  background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3)); box-shadow: 0 6px 24px -10px color-mix(in srgb, var(--c2) 60%, transparent); }
.platforms > span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; background: var(--surface); font-weight: 700; font-size: 1rem; letter-spacing: .01em; }
.platforms > span:first-child { border-radius: 12.5px 0 0 12.5px; }
.platforms > span:last-child { border-radius: 0 12.5px 12.5px 0; }
.platforms > span + span { margin-left: 1.5px; }
.platforms .pf-label { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 700; color: var(--muted); }
.platforms svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.platforms svg.brand-ico { fill: currentColor; stroke: none; }
.platforms .pf-and svg { width: 22px; height: 22px; }
/* Home: one quiet line of live status under the hero, linking to Outage watch */
.live-pill { display: flex; width: fit-content; align-items: center; gap: 10px; margin: 0 0 18px; padding: 7px 14px 7px 12px;
  border: 1px solid color-mix(in srgb, var(--lvl) 45%, var(--border)); border-radius: 999px; font-size: .88rem; color: var(--text-2);
  background: color-mix(in srgb, var(--lvl) 8%, var(--surface)); text-decoration: none; max-width: 100%; }
.live-pill b { color: var(--text); }
.live-pill .lp-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
@media (max-width: 640px) { .live-pill { border-radius: 14px; padding: 9px 14px 9px 12px; font-size: .85rem; } .live-pill .lp-when { flex-basis: 100%; } }
.live-pill .lp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lvl); flex: none; box-shadow: 0 0 0 0 var(--lvl); animation: lp-pulse 2s infinite; }
.live-pill .lp-when { color: var(--muted); font-size: .8rem; }
.live-pill .arr { color: var(--lvl); transition: transform .2s; }
.live-pill:hover { border-color: var(--lvl); }
.live-pill:hover .arr { transform: translateX(3px); }
@keyframes lp-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lvl) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .live-pill .lp-dot { animation: none; } .live-pill .arr { transition: none; } }
.platforms .pf-web { color: var(--ink1); } .platforms .pf-ios { color: var(--ink2); } .platforms .pf-and { color: var(--ink3); }
@media (max-width: 560px) { .platforms > span { padding: 8px 12px; font-size: .92rem; } .platforms .pf-label { display: none; }
  .platforms > span.pf-web { border-radius: 12.5px 0 0 12.5px; } }

/* ======================= Vibrant dark: navy base, aurora, section washes ======================= */
/* 1. Deep navy/indigo base instead of neutral black (dark mode only) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1f; --surface: #121a2e; --border: #24304b; --grid: #1a2440;
    --text-2: #c6ccdc; --muted: #8d95ab; --nav-bg: rgba(10, 15, 31, .72);
    --glow-a: rgba(57, 135, 229, .34); --glow-b: rgba(144, 133, 233, .30); --glow-c: rgba(25, 158, 112, .24);
    --aurora: 1;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f1f; --surface: #121a2e; --border: #24304b; --grid: #1a2440;
  --text-2: #c6ccdc; --muted: #8d95ab; --nav-bg: rgba(10, 15, 31, .72);
  --glow-a: rgba(57, 135, 229, .34); --glow-b: rgba(144, 133, 233, .30); --glow-c: rgba(25, 158, 112, .24);
  --aurora: 1;
}

/* 2. Page-wide aurora: slow-drifting colour blobs behind everything */
body { position: relative; isolation: isolate; }
body::before { content: ""; position: fixed; inset: -20vh -20vw; z-index: -2; pointer-events: none;
  opacity: calc(var(--aurora, 0) * 1);
  background:
    radial-gradient(28% 32% at 18% 22%, rgba(57, 135, 229, .16), transparent 70%),
    radial-gradient(26% 30% at 82% 18%, rgba(144, 133, 233, .15), transparent 70%),
    radial-gradient(30% 34% at 70% 78%, rgba(25, 158, 112, .12), transparent 70%),
    radial-gradient(24% 28% at 25% 85%, rgba(217, 89, 38, .08), transparent 70%);
  filter: blur(30px); animation: aurora 28s ease-in-out infinite alternate; }
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(3%, -2%, 0) rotate(6deg) scale(1.08); }
  100% { transform: translate3d(-3%, 2%, 0) rotate(-4deg) scale(1.04); } }
/* stronger, faster hero glow with a fourth (orange) blob */
.glow { height: 620px; animation-duration: 12s;
  background:
    radial-gradient(40% 50% at 18% 30%, var(--glow-a), transparent 70%),
    radial-gradient(35% 45% at 72% 18%, var(--glow-b), transparent 70%),
    radial-gradient(30% 40% at 50% 75%, var(--glow-c), transparent 70%),
    radial-gradient(22% 30% at 90% 70%, color-mix(in srgb, var(--c4) 18%, transparent), transparent 70%); }

/* 3. Full-bleed colour wash on alternating sections */
main > section { position: relative; isolation: isolate; }
main > section:nth-of-type(n+2)::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0 -50vw;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--wash, var(--c1)) 7%, transparent) 30%, color-mix(in srgb, var(--wash, var(--c1)) 7%, transparent) 70%, transparent); }
main > section:nth-of-type(3n+2) { --wash: var(--c1); }
main > section:nth-of-type(3n+3) { --wash: var(--c2); }
main > section:nth-of-type(3n+4) { --wash: var(--c3); }

/* 4. Cards stay still. Only cards that are links react on hover:
   border and glow in the card's colour, and the arrow nudges right. */
.card { transition: box-shadow .25s, border-color .25s; }
a.card:hover { border-color: color-mix(in srgb, var(--c, var(--c2)) 55%, var(--border));
  box-shadow: 0 10px 34px -12px color-mix(in srgb, var(--c, var(--c2)) 55%, transparent); }

@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

/* Employer logos in the Experience timeline */
.co-logos { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin-right: 10px; }
.co-logo { display: block; height: 28px; width: auto; max-width: 120px; padding: 5px 9px; border-radius: 7px; background: #fff; object-fit: contain;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.co-logo.sq { width: 28px; padding: 0; object-fit: cover; }
.co-logos.earlier { margin: 10px 0 0; }
.tl-meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 4px; }
@media (max-width: 560px) { .co-logo { height: 24px; padding: 4px 7px; } .co-logo.sq { width: 24px; padding: 0; } }
/* monogram chip for companies without a logo */
.co-logo.mono { display: inline-grid; place-items: center; width: 28px; padding: 0; background: #fff; color: #5040c4;
  font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: .8rem; letter-spacing: -.02em; line-height: 1; }
@media (max-width: 560px) { .co-logo.mono { width: 24px; font-size: .72rem; } }
/* external link on a company name (Recrd only) */
.co-link { color: inherit; display: inline-flex; align-items: baseline; gap: 3px; border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
.co-link:hover { text-decoration: none; color: var(--accent); border-bottom-style: solid; }
.co-link .ext { font-size: .8em; color: var(--accent); display: inline-block; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.co-link:hover .ext { transform: translate(2px, -2px); }

a.card .go { display: inline-block; transition: transform .2s ease; }
a.card:hover .go { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { a.card:hover .go { transform: none; } }
.grid-head { margin: 0 0 14px; }
.grid.two.pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* Home: slow ticker of our own numbers inside the Live Data Lab card (24 Nov) */
a.side-project .data-tick { flex: 1 0 100%; overflow: hidden; border-top: 1px solid var(--border); padding-top: 12px; font-size: .85rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.data-tick-run { display: inline-flex; white-space: nowrap; animation: ticker 60s linear infinite; }
a.side-project:hover .data-tick-run, a.side-project:focus-visible .data-tick-run { animation-play-state: paused; }
.data-tick-set { display: inline-flex; }
.data-tick-set > span { padding-right: 36px; color: var(--text-2); }
.data-tick-set b { color: var(--ink5, var(--c5)); text-transform: uppercase; font-size: .68rem; letter-spacing: .05em; margin-right: 7px; }
a.side-project .data-tick-when { flex: 1 0 100%; margin: -4px 0 0; font-size: .75rem; }
@media (prefers-reduced-motion: reduce) {
  .data-tick-run { animation: none; white-space: normal; flex-wrap: wrap; }
  .data-tick-set[aria-hidden] { display: none; }
  .data-tick-set { flex-wrap: wrap; row-gap: 4px; }
}
.tl-note { font-size: .8rem; margin: 10px 0 0; }

/* ---------- State of the internet (world map) ---------- */
:root { --maint: #4f8fd9; }
.lvl-maint { --lvl: var(--maint); }
.nm-notices { list-style: none; margin: 0; padding: 0; }
.nm-notices li { padding: 8px 0; border-top: 1px solid var(--border); }
.nm-notices li:first-child { border-top: 0; }
.netmap-card { padding: 16px 16px 12px; }
.nm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 10px; }
.nm-key { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0; padding: 0; font-size: .8rem; color: var(--text-2); }
.nm-key li { display: inline-flex; align-items: center; gap: 6px; }
.nm-key i { width: 9px; height: 9px; border-radius: 50%; background: var(--lvl); display: inline-block; }
.nm-key i.nm-sq { border-radius: 2px; background: transparent; border: 2px solid var(--text-2); width: 9px; height: 9px; box-sizing: border-box; }
.nm-filter { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.nm-filter button { font: inherit; font-size: .8rem; font-weight: 600; border: 0; background: none; color: var(--text-2); padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.nm-filter button[aria-pressed="true"] { background: var(--c1); color: #fff; }
.netmap { position: relative; margin: 0; }
.nm-svg { display: block; width: 100%; height: auto; }
.nm-land path { fill: color-mix(in srgb, var(--muted) 38%, transparent); }
.nm-pt { cursor: pointer; outline: none; }
.nm-pt .nm-dot { fill: var(--lvl); stroke: var(--surface); stroke-width: .8; transition: opacity .2s; }
.nm-pt.lvl-ok .nm-dot { opacity: .75; }
.nm-pt.aws .nm-dot { stroke: var(--text); stroke-width: 1.2; }
.nm-pt.aws.lvl-ok .nm-dot { fill: color-mix(in srgb, var(--ok) 70%, var(--surface)); }
.nm-pt.fastly .nm-dot { stroke: var(--c4); stroke-width: 1; }
.nm-pt.fastly.lvl-ok .nm-dot { opacity: .85; }
.nm-pt .nm-notice { fill: none; stroke: var(--c1); stroke-width: 1.1; opacity: .7; }
.nm-key i.nm-dm { border-radius: 1px; transform: rotate(45deg) scale(.85); background: var(--ok); outline: 1.5px solid var(--c4); }
.nm-key i.nm-ring { background: transparent; border: 1.5px solid var(--c1); box-sizing: border-box; }
.netmap.only-bad .nm-pt.has-notice.lvl-ok { opacity: .08; }
.nm-pt .nm-halo { fill: var(--lvl); opacity: .25; transform-box: fill-box; transform-origin: center; animation: nm-ping 2.4s ease-out infinite; }
.nm-pt:hover .nm-dot, .nm-pt:focus-visible .nm-dot { stroke: var(--text); stroke-width: 1.6; opacity: 1; }
.netmap.only-bad .nm-pt.lvl-ok, .netmap.only-bad .nm-pt.lvl-maint { opacity: .08; pointer-events: none; }
@keyframes nm-ping { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nm-pt .nm-halo { animation: none; } }
.nm-tip-name { font-weight: 700; color: var(--text); }
.nm-tip-st { font-weight: 600; color: var(--lvl); }
.nm-tip-ev { color: var(--text-2); max-width: 260px; white-space: normal; }
.stat .value small { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat.lvl-minor { border-left: 4px solid var(--minor); } .stat.lvl-major { border-left: 4px solid var(--major); }
@media (max-width: 640px) {
  .netmap { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .nm-svg { width: 760px; max-width: none; }
}
.nm-swipe { display: none; margin: 0 0 6px; } @media (max-width: 640px) { .nm-swipe { display: block; } }
.badge.new { color: #241a00; background: var(--c5); }
.status-summary { margin-top: 10px; max-width: 70ch; }
.footer-roles a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.footer-roles a:hover { color: var(--text); text-decoration-color: currentColor; }
#qa-lead, #agile, #gates { scroll-margin-top: 120px; }
/* Outage watch: when a problem started and how long it has been going on */
.st-time { display: block; font-size: .78rem; line-height: 1.45; color: var(--text-2); }
.st-time b, .ongoing-for { color: var(--major); font-weight: 600; }

/* Home: "However you hire me" terms */
.terms-head { margin: 34px 0 4px; }
.terms-lede { margin: 0 0 14px; max-width: 70ch; }
.term { padding: 18px; }
.term h4 { margin: 8px 0 6px; font-size: 1rem; }
.term p { margin: 0; font-size: .9rem; }
.term-ico { font-size: 1.4rem; }

/* Home: time in each role (bars from cv.json dates) */
.tenure { padding: 18px 20px; margin-bottom: 22px; }
.tenure-head { margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tenure-head .muted { font-size: .85rem; }
.tenure-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tenure-bars li { display: grid; grid-template-columns: 9.5rem 1fr 6.5rem; align-items: center; gap: 12px; font-size: .9rem; }
.tb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-track { height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--text) 7%, transparent); overflow: hidden; }
.tb-bar { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.tenure.in .tb-bar, .no-js .tb-bar { width: var(--w); }
.tb-len { color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .tenure-bars li { grid-template-columns: 6.5rem 1fr; } .tb-len { grid-column: 2; margin-top: -6px; font-size: .8rem; } }
@media (prefers-reduced-motion: reduce) { .tb-bar { transition: none; width: var(--w); } }

/* Home: what to put in the first email */
.first-email-head { margin: 18px 0 10px; font-size: 1rem; }
.first-email { list-style: none; counter-reset: fe; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.first-email li { counter-increment: fe; display: grid; align-content: start; gap: 3px; padding: 12px 14px 12px 44px; position: relative; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); font-size: .88rem; text-align: left; }
.first-email li::before { content: counter(fe); position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: .75rem; font-weight: 700; color: #fff; background: var(--c, var(--c2)); }
.first-email-note { font-size: .85rem; margin: 10px 0 16px; }
