/* ==========================================================================
   AI Signal, design system
   A modern technology-publication layout. Categorical colours are the
   validated data-viz reference set: slots 1-4 pass CVD, chroma, lightness
   and normal-vision gates against both the light and dark surfaces.
   ========================================================================== */

:root {
  color-scheme: light;

  --surface-1:   #ffffff;   /* elevated studio card surface */
  --surface-0:   #faf9f5;   /* warm editorial studio canvas */
  --surface-2:   #f2f0e8;   /* inset / pill wash */
  --surface-3:   #e6e4da;   /* active / hover ground */
  --ink-invert:  #ffffff;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #64748b;

  --grid:   #e2e0d6;
  --axis:   #cbd5e1;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --rule:   rgba(15, 23, 42, 0.85);

  --series-1: #2563eb;  /* Model Releases / Vibe Coder Accent */
  --series-2: #ea580c;  /* Capability & Research / AI Curious */
  --series-3: #059669;  /* Industry & Money / ROI Emerald     */
  --series-4: #d97706;  /* Policy & Adoption / Bundle Gold    */

  --accent:   #2563eb;
  --good:     #059669;
  --critical: #dc2626;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 2px 6px rgba(15,23,42,.03);
  --shadow:    0 4px 12px rgba(15,23,42,.06), 0 12px 28px rgba(15,23,42,.05);
  --shadow-lg: 0 8px 24px rgba(15,23,42,.08), 0 24px 56px rgba(15,23,42,.10);

  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --maxw: 1240px;
  --gutter: 26px;
  --radius: 8px;
  --radius-lg: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-1: #121723;
    --surface-0: #0a0d14;
    --surface-2: #1a2130;
    --surface-3: #242d40;
    --ink-invert: #0a0d14;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --grid: #1e293b;
    --axis: #334155;
    --border: rgba(248,250,252,0.10);
    --border-strong: rgba(248,250,252,0.18);
    --rule: rgba(248,250,252,0.88);
    --series-1: #3b82f6;
    --series-2: #f97316;
    --series-3: #10b981;
    --series-4: #f59e0b;
    --accent: #3b82f6;
    --good: #10b981;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.45);
    --shadow: 0 4px 16px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.35);
    --shadow-lg: 0 8px 28px rgba(0,0,0,.55), 0 24px 60px rgba(0,0,0,.50);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-1: #121723;
  --surface-0: #0a0d14;
  --surface-2: #1a2130;
  --surface-3: #242d40;
  --ink-invert: #0a0d14;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --grid: #1e293b;
  --axis: #334155;
  --border: rgba(248,250,252,0.10);
  --border-strong: rgba(248,250,252,0.18);
  --rule: rgba(248,250,252,0.88);
  --series-1: #3b82f6;
  --series-2: #f97316;
  --series-3: #10b981;
  --series-4: #f59e0b;
  --accent: #3b82f6;
  --good: #10b981;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.45);
  --shadow: 0 4px 16px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.35);
  --shadow-lg: 0 8px 28px rgba(0,0,0,.55), 0 24px 60px rgba(0,0,0,.50);
}

/* Category accent, set per element via data-cat. */
[data-cat="releases"] { --cat: var(--series-1); }
[data-cat="research"] { --cat: var(--series-2); }
[data-cat="industry"] { --cat: var(--series-3); }
[data-cat="policy"]   { --cat: var(--series-4); }

/* -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  background: var(--surface-0);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.021em; line-height: 1.16; }
img { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* Shared eyebrow / kicker treatment. */
.kicker {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface-0) 90%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.masthead-inner {
  display: flex; align-items: center; gap: 26px;
  height: 62px; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 800; letter-spacing: -0.035em;
  white-space: nowrap;
}
.brand-mark {
  width: 10px; height: 10px; border-radius: 50%; background: var(--series-1);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--series-1) 20%, transparent);
  flex: none;
}
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a {
  padding: 7px 12px; border-radius: 6px; color: var(--text-secondary);
  font-size: 13.5px; font-weight: 550; white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav a:hover { background: var(--surface-2); color: var(--text-primary); }
.nav a[aria-current="page"] { color: var(--text-primary); background: var(--surface-2); font-weight: 650; }

.theme-toggle {
  margin-left: 8px; width: 33px; height: 33px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 7px;
  background: transparent; color: var(--text-secondary); cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text-primary); }
.theme-toggle svg { width: 15px; height: 15px; }
:root:not([data-theme="dark"]) .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: none; }
  :root:not([data-theme="light"]) .icon-sun { display: block; }
}

/* ==========================================================================
   Ticker, the liveness signal directly under the masthead
   ========================================================================== */

.ticker { border-bottom: 1px solid var(--border); background: var(--surface-1); overflow: hidden; }
.ticker-inner {
  display: flex; align-items: stretch;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
}
.ticker-label {
  flex: none; display: flex; align-items: center; gap: 7px;
  padding-right: 16px; margin-right: 16px;
  border-right: 1px solid var(--border);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-primary);
}
.ticker-label .live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--critical);
  animation: blip 2.4s ease-in-out infinite;
}
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.ticker-track { overflow: hidden; flex: 1; min-width: 0; padding: 9px 0; }
.ticker-rail { display: flex; width: max-content; animation: marquee 80s linear infinite; }
.ticker:hover .ticker-rail, .ticker:focus-within .ticker-rail { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.ticker-item {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 0 20px; font-size: 13px; color: var(--text-secondary);
  white-space: nowrap; border-right: 1px solid var(--border);
}
.ticker-item:hover { color: var(--text-primary); }
.ticker-item .tk-org { font-weight: 650; color: var(--text-primary); }
.ticker-item .tk-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--cat, var(--text-muted)); flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-rail { animation: none; }
  .ticker-track { overflow-x: auto; scrollbar-width: none; }
  .ticker-track::-webkit-scrollbar { display: none; }
  .ticker-label .live-dot { animation: none; }
}

/* ==========================================================================
   Edition bar
   ========================================================================== */

.edition {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 26px 0 18px; border-bottom: 2px solid var(--rule); margin-bottom: 26px;
}
.edition h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.04em; font-weight: 800; }
.edition .lede { margin: 10px 0 0; color: var(--text-secondary); font-size: 15.5px; max-width: 62ch; }
.edition-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.edition-meta .kicker { font-size: 11px; }

/* ==========================================================================
   Thumbnails, feed artwork with a generated fallback tile
   ========================================================================== */

.thumb {
  position: relative; display: block; overflow: hidden;
  background: var(--surface-3); border-radius: var(--radius);
  aspect-ratio: 16 / 9; container-type: inline-size;
}
.thumb img {
  /* Positioned so it paints ABOVE the fallback tile. A statically positioned
     image loses the paint order to the absolutely positioned tile beneath it,
     which hides the artwork completely. */
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .45s cubic-bezier(.2,.7,.3,1);
}
.thumb::after {   /* hairline ring, keeps pale artwork from bleeding into the page */
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px var(--border);
  border-radius: inherit; pointer-events: none;
}
a:hover .thumb img { transform: scale(1.035); }

/* Generated tile, used when a feed ships no artwork (most lab blogs do not). */
.thumb-tile {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px 16px;
  background:
    radial-gradient(120% 100% at 88% 6%, color-mix(in srgb, var(--cat, var(--accent)) 34%, transparent) 0%, transparent 62%),
    linear-gradient(150deg, color-mix(in srgb, var(--cat, var(--accent)) 13%, var(--surface-2)) 0%, var(--surface-2) 74%);
}
.thumb-tile::before {   /* faint rule pattern so flat colour does not read as empty */
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    135deg, transparent 0 13px, color-mix(in srgb, var(--cat, var(--accent)) 11%, transparent) 13px 14px);
  opacity: .55;
}
.thumb-tile .tile-org {
  position: relative; font-weight: 800; letter-spacing: -0.03em;
  color: var(--text-primary); line-height: 1.08;
  font-size: clamp(13px, 9cqw, 34px);
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2;
}
.thumb-tile .tile-cat {
  position: relative; margin-top: 5px;
  font-family: var(--mono); font-size: clamp(8px, 2.6cqw, 10px); font-weight: 500;
  letter-spacing: .11em; text-transform: uppercase; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* In a narrow thumb there is no room for a wordmark; the pattern alone reads
   as artwork, and the org name is already in the meta line beside it. */
@container (max-width: 150px) {
  .thumb-tile { padding: 9px 10px; }
  .thumb-tile .tile-cat { display: none; }
  .thumb-tile .tile-org { font-size: 12px; -webkit-line-clamp: 2; line-clamp: 2; }
}
@container (max-width: 105px) {
  .thumb-tile .tile-org { display: none; }
}

/* ==========================================================================
   Story meta, chips and badges
   ========================================================================== */

.meta-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted);
}
.meta-row .sep { opacity: .5; }
.meta-row .src { color: var(--text-secondary); }

/* Category label. The dot is a secondary cue; the word carries the meaning. */
.cat-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--cat, var(--text-secondary));
}
.cat-tag::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px;
  background: var(--cat, var(--text-muted)); flex: none;
}

.badge-new {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-invert); background: var(--critical);
  padding: 2px 6px; border-radius: 3px;
}
.badge-points {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-muted);
}

/* ==========================================================================
   Lead story + rail
   ========================================================================== */

.lead-grid {
  display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: 34px; align-items: start; margin-bottom: 38px;
}
@media (max-width: 980px) { .lead-grid { grid-template-columns: 1fr; gap: 30px; } }

.lead { display: block; }
.lead .thumb { aspect-ratio: 16 / 8.4; border-radius: var(--radius-lg); }
.lead-body { padding-top: 17px; }
.lead h2 {
  font-size: clamp(27px, 3.5vw, 42px); letter-spacing: -0.038em;
  font-weight: 800; margin: 11px 0 0; text-wrap: balance;
}
.lead:hover h2 { color: var(--accent); }
.lead .dek { margin: 12px 0 0; font-size: 16.5px; line-height: 1.55; color: var(--text-secondary); max-width: 60ch; }
.lead .meta-row { margin-top: 14px; }

.rail-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding-bottom: 11px; margin-bottom: 2px;
  border-bottom: 2px solid var(--rule);
}
.rail-head h3 { font-size: 14.5px; font-weight: 750; letter-spacing: -0.015em; }

.ranked { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.ranked li { border-bottom: 1px solid var(--border); }
.ranked li:last-child { border-bottom: 0; }
.ranked a { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 13px; padding: 14px 0; align-items: start; }
.ranked a:hover .rk-title { color: var(--accent); }
.ranked .rk-num {
  counter-increment: rank;
  font-family: var(--mono); font-size: 19px; font-weight: 700;
  color: var(--text-muted); line-height: 1.1; font-variant-numeric: tabular-nums;
}
.ranked .rk-num::before { content: counter(rank, decimal-leading-zero); }
.ranked .rk-title { font-size: 14.5px; font-weight: 650; line-height: 1.34; letter-spacing: -0.012em; margin-bottom: 5px; }
.ranked .meta-row { font-size: 10px; }

/* ==========================================================================
   Briefing
   ========================================================================== */

.briefing {
  background: var(--surface-1); border: 1px solid var(--border);
  border-top: 3px solid var(--series-1);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 26px 30px 28px; margin-bottom: 42px;
}
.briefing .kicker { display: block; margin-bottom: 12px; }
.briefing p {
  margin: 0; font-size: 18px; line-height: 1.6; max-width: 84ch;
  letter-spacing: -0.011em; color: var(--text-primary);
}
.briefing .byline { margin-top: 15px; }

/* ==========================================================================
   Section fronts
   ========================================================================== */

.section-front { margin-bottom: 44px; }
.section-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 11px; margin-bottom: 22px;
  border-bottom: 2px solid var(--cat, var(--rule));
}
.section-bar h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.028em; display: flex; align-items: center; gap: 10px; }
.section-bar h2::before {
  content: ""; width: 10px; height: 10px; border-radius: 2px;
  background: var(--cat, var(--accent)); flex: none;
}
.section-bar .count { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.section-bar .more { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.section-bar .more:hover { color: var(--accent); }

.section-body {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 30px; align-items: start;
}
.section-body.solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
@media (max-width: 860px) { .section-body { grid-template-columns: 1fr; gap: 24px; } }

.sec-lead .thumb { aspect-ratio: 16 / 8.6; }
.sec-lead h3 { font-size: 21px; font-weight: 750; letter-spacing: -0.026em; margin: 12px 0 0; text-wrap: balance; }
.sec-lead:hover h3 { color: var(--accent); }
.sec-lead .dek { margin: 9px 0 0; font-size: 14.5px; line-height: 1.52; color: var(--text-secondary); }
.sec-lead .meta-row { margin-top: 11px; }

.compact-list { display: flex; flex-direction: column; }
.compact {
  display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 15px;
  padding: 15px 0; border-bottom: 1px solid var(--border); align-items: start;
}
.compact:first-child { padding-top: 0; }
.compact:last-child { border-bottom: 0; }
.compact h4 { font-size: 15px; font-weight: 650; line-height: 1.36; letter-spacing: -0.015em; margin-bottom: 6px; }
.compact:hover h4 { color: var(--accent); }
.compact .thumb { aspect-ratio: 16/10; border-radius: 3px; }
.compact.no-art { grid-template-columns: minmax(0, 1fr); }
.compact .meta-row { font-size: 10px; }

/* ==========================================================================
   Card grid
   ========================================================================== */

.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1040px) { .card-grid, .card-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .card-grid, .card-grid.cols-3 { grid-template-columns: 1fr; gap: 22px; } }

.card-story { display: block; }
.card-story h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.021em; margin: 11px 0 0; line-height: 1.32; text-wrap: balance; }
.card-story:hover h3 { color: var(--accent); }
.card-story .dek { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.card-story .meta-row { margin-top: 10px; }

/* ==========================================================================
   Feed page rows
   ========================================================================== */

.feed-list { display: flex; flex-direction: column; }
.feed-row {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 22px;
  padding: 22px 0; border-bottom: 1px solid var(--border); align-items: start;
}
.feed-row h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.024em; margin: 9px 0 0; line-height: 1.3; }
.feed-row:hover h3 { color: var(--accent); }
.feed-row .dek { margin: 8px 0 0; font-size: 14.5px; line-height: 1.52; color: var(--text-secondary); max-width: 82ch; }
.feed-row .also { margin-top: 9px; font-size: 12.5px; color: var(--text-muted); }
@media (max-width: 680px) { .feed-row { grid-template-columns: 1fr; gap: 13px; } }

/* ==========================================================================
   Release timeline
   ========================================================================== */

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 2px; background: var(--grid); border-radius: 2px;
}
.release { position: relative; padding-bottom: 26px; }
.release:last-child { padding-bottom: 0; }
.release::before {
  content: ""; position: absolute; left: -27px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--series-1); box-shadow: 0 0 0 4px var(--surface-0);
}
.release h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.023em; margin: 7px 0 0; }
.release a:hover h3 { color: var(--accent); }
.release .dek { margin: 7px 0 0; font-size: 14px; color: var(--text-secondary); max-width: 76ch; }
.release .org-line { font-size: 13px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }

/* ==========================================================================
   Stats strip
   ========================================================================== */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-1); overflow: hidden; box-shadow: var(--shadow-sm);
}
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat { padding: 19px 22px 21px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
@media (max-width: 760px) {
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
.stat .label { margin-bottom: 9px; }
.stat .value { font-size: 36px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.stat .value.text { font-size: 25px; }
.stat .sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 8px; }

/* ==========================================================================
   Panels, bands, charts
   ========================================================================== */

.panel {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.panel-head { padding: 17px 21px 0; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.panel-head h3 { font-size: 14.5px; font-weight: 700; }
.panel-head .hint { font-size: 12.5px; color: var(--text-muted); }
.panel-body { padding: 16px 21px 20px; }

.band { margin-bottom: 42px; }
.band-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 11px; margin-bottom: 22px; border-bottom: 2px solid var(--rule);
}
.band-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.028em; }
.band-head .hint { font-size: 13px; color: var(--text-muted); }

.chart-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 940px) { .chart-grid { grid-template-columns: 1fr; } }

.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--sans); }
.axis-label { fill: var(--text-muted); font-size: 11px; }
.value-label { fill: var(--text-secondary); font-size: 11px; font-weight: 700; }
.grid-line { stroke: var(--grid); stroke-width: 1; }
.axis-line { stroke: var(--axis); stroke-width: 1; }

.legend { display: flex; flex-wrap: wrap; gap: 7px 18px; margin: 0 0 16px; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-secondary); }
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none; opacity: 0;
  transition: opacity .1s; transform: translate(-50%, -100%);
  background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 10px 13px; font-size: 12.5px; line-height: 1.5;
  max-width: 270px; white-space: nowrap;
}
.tooltip strong { display: block; margin-bottom: 5px; }
.tooltip .row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tooltip .row .k { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); }
.tooltip .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.tooltip .v { font-variant-numeric: tabular-nums; font-weight: 700; }

.table-toggle {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.table-toggle:hover { color: var(--text-primary); }
.data-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.data-table th, .data-table td {
  text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.data-table th:first-child, .data-table td:first-child { text-align: left; font-variant-numeric: normal; }
.data-table th { color: var(--text-muted); font-weight: 650; font-size: 11.5px; }

.split-bar { display: flex; gap: 2px; margin-bottom: 15px; }
.split-bar > div { height: 10px; border-radius: 2px; }

/* ==========================================================================
   Filters
   ========================================================================== */

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.filter-btn {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 30px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface-1);
  color: var(--text-secondary); transition: all .12s;
  display: inline-flex; align-items: center; gap: 8px;
}
.filter-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }
.filter-btn[aria-pressed="true"] { background: var(--text-primary); color: var(--surface-1); border-color: var(--text-primary); }
.filter-btn .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.filter-btn .n { font-variant-numeric: tabular-nums; opacity: .62; font-size: 12px; }
.search {
  flex: 1; min-width: 190px; max-width: 300px;
  font-family: var(--sans); font-size: 13px;
  padding: 8px 15px; border-radius: 30px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1); color: var(--text-primary);
}
.search::placeholder { color: var(--text-muted); }

/* ==========================================================================
   Archive
   ========================================================================== */

.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .archive-grid { grid-template-columns: 1fr; } }
.week-card {
  padding: 20px 22px; display: block; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: border-color .12s, transform .12s;
}
.week-card:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.week-card h3 { font-size: 17px; margin: 8px 0 13px; letter-spacing: -0.024em; }
.week-card .counts { display: flex; gap: 20px; font-size: 13px; color: var(--text-secondary); }
.week-card .counts b { color: var(--text-primary); font-variant-numeric: tabular-nums; font-weight: 700; }

/* ==========================================================================
   States
   ========================================================================== */

.empty {
  padding: 56px 30px; text-align: center; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.empty h3 { font-size: 18px; margin-bottom: 9px; }
.empty p { margin: 0 auto; max-width: 48ch; color: var(--text-secondary); font-size: 14.5px; }
.empty code {
  font-family: var(--mono); font-size: 12.5px; background: var(--surface-2);
  padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border);
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ==========================================================================
   Footer
   ========================================================================== */

.foot { border-top: 2px solid var(--rule); margin-top: 46px; padding: 28px 0 46px; }
.foot-inner {
  display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  color: var(--text-muted); font-size: 13px;
}
.foot a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }
.sources-note { max-width: 66ch; line-height: 1.6; }

/* ==========================================================================
   Narrow screens
   ========================================================================== */

@media (max-width: 640px) {
  :root { --gutter: 17px; }
  .masthead-inner { height: auto; flex-wrap: wrap; padding: 11px var(--gutter) 0; row-gap: 4px; }
  .brand { flex: 1 1 auto; font-size: 18px; }
  .theme-toggle { order: 2; margin-left: 0; }
  .nav {
    order: 3; flex: 1 0 100%; margin-left: 0; gap: 2px;
    overflow-x: auto; scrollbar-width: none; padding-bottom: 9px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .ticker-label { padding-right: 12px; margin-right: 12px; }
  .edition { padding: 22px 0 15px; margin-bottom: 22px; }
  .briefing { padding: 22px 20px 24px; }
  .briefing p { font-size: 16.5px; }
  .compact { grid-template-columns: minmax(0, 1fr) 76px; gap: 13px; }
}

/* ==========================================================================
   Model catalog page
   ========================================================================== */

/* --- What changed --- */

.changes { display: grid; gap: 18px; }
.chg-group { display: grid; gap: 7px; }
.chg-group .kicker { margin-bottom: 2px; }
.chg {
  display: grid; grid-template-columns: 62px minmax(0, 1.1fr) 96px minmax(0, 1.4fr);
  gap: 14px; align-items: baseline;
  padding: 11px 14px; border: 1px solid var(--border);
  border-left: 3px solid var(--chg-color, var(--text-muted));
  border-radius: 0 6px 6px 0; background: var(--surface-1);
}
.chg[data-kind="new"]     { --chg-color: var(--good); }
.chg[data-kind="price"]   { --chg-color: var(--series-4); }
.chg[data-kind="context"] { --chg-color: var(--series-1); }
.chg[data-kind="gone"]    { --chg-color: var(--critical); }
@media (max-width: 720px) {
  .chg { grid-template-columns: 62px minmax(0, 1fr); row-gap: 5px; }
  .chg .chg-lab { grid-column: 2; }
  .chg .chg-detail { grid-column: 1 / -1; }
}
.chg-tag {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--chg-color, var(--text-muted));
}
.chg-name { font-weight: 650; font-size: 15px; letter-spacing: -0.012em; }
.chg-lab { font-size: 13px; color: var(--text-secondary); }
.chg-detail { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.chg-down { color: var(--good); font-weight: 600; }
.chg-up { color: var(--critical); font-weight: 600; }

.no-changes {
  padding: 26px 24px; border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg); color: var(--text-secondary);
  font-size: 14.5px; text-align: center;
}

/* --- Release timeline --- */

.tl-month { margin-bottom: 26px; }
.tl-month:last-child { margin-bottom: 0; }
.tl-month-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
.tl-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px;
  padding: 10px 0 10px 14px; border-left: 2px solid var(--lab, var(--accent));
  margin-bottom: 8px; align-items: baseline;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-date {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.tl-name { font-size: 16px; font-weight: 650; letter-spacing: -0.015em; }
.tl-lab {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--lab, var(--text-muted)); margin-left: 9px;
}
.tl-spec {
  font-size: 13px; color: var(--text-secondary); margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* --- Catalog table --- */

/* 112 rows is 7000px of page on its own. Bounding the table keeps the
   catalog complete while letting the rest of the page stay reachable; the
   sticky header keeps the columns labelled while it scrolls. */
.table-scroll {
  overflow: auto; border-radius: var(--radius-lg);
  max-height: min(70vh, 720px);
  overscroll-behavior: contain;
}
.model-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 860px; }
.model-table th, .model-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.model-table th.l, .model-table td.l, .model-table tbody th { text-align: left; }
.model-table tbody th { font-weight: 600; font-variant-numeric: normal; }
.model-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2); border-bottom: 1px solid var(--border-strong);
  padding: 0; white-space: nowrap;
}
.model-table thead th button {
  width: 100%; background: none; border: 0; cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary);
  padding: 11px 14px; text-align: inherit;
  display: flex; align-items: center; gap: 5px; justify-content: flex-end;
}
.model-table thead th.l button { justify-content: flex-start; }
.model-table thead th button:hover { color: var(--text-primary); }
.model-table thead th[aria-sort="none"] .arrow::after { content: ""; }
.model-table thead th[aria-sort="ascending"] .arrow::after { content: "\2191"; }
.model-table thead th[aria-sort="descending"] .arrow::after { content: "\2193"; }
.model-table thead th:not([aria-sort="none"]) button { color: var(--text-primary); }
.model-table tbody tr:hover { background: var(--surface-2); }
.model-table tbody tr:last-child th, .model-table tbody tr:last-child td { border-bottom: 0; }

.m-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; }
.m-id {
  display: block; font-family: var(--mono); font-size: 11px;
  color: var(--text-muted); font-weight: 400; margin-top: 2px; margin-left: 16px;
}
.m-mods { color: var(--text-secondary); font-size: 12.5px; }

.source-note {
  margin-top: 14px; font-size: 12.5px; color: var(--text-muted);
  max-width: 78ch; line-height: 1.6;
}

/* Media-generation marker. These models sit in the catalog and the timeline but
   not in the token-price comparisons, where they are not like for like. */
.m-media {
  display: inline-block; margin-left: 8px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong); border-radius: 3px;
  padding: 1px 5px; vertical-align: middle;
}

/* ==========================================================================
   Comparison bars
   HTML rather than SVG: text stays at a real size on every screen, a long
   model name truncates instead of escaping the panel, and the row can stack
   on a narrow viewport.
   ========================================================================== */

.mbars { display: flex; flex-direction: column; }

.mbar {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr) 72px;
  gap: 14px; align-items: center;
  padding: 5px 0; border-radius: 4px;
}
.mbar:hover { background: var(--surface-2); }

.mbar-label {
  text-align: right; font-size: 13px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mbar:hover .mbar-label { color: var(--text-primary); }

.mbar-track {
  position: relative; height: 14px; border-radius: 3px;
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
}
.mbar-fill {
  position: absolute; inset: 0 auto 0 0;
  border-radius: 3px; min-width: 3px;
}

.mbar-val {
  font-size: 12.5px; font-weight: 700; color: var(--text-secondary);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.mbar-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-top: 16px;
  padding-top: 13px; border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  /* Stack: a truncated label plus a squeezed bar reads as neither. */
  .mbar {
    grid-template-columns: minmax(0, 1fr) 66px;
    gap: 4px 12px; padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }
  .mbar-label { text-align: left; grid-column: 1; font-size: 13.5px; }
  .mbar-val { grid-column: 2; grid-row: 1; text-align: right; }
  .mbar-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ==========================================================================
   Tools & Playbooks storefront + Token ROI Calculator
   ========================================================================== */

.roi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 26px;
}
@media (max-width: 780px) {
  .roi-grid { grid-template-columns: 1fr; }
}

.roi-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.roi-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.roi-label-row label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text-primary);
}
.roi-val-badge {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.roi-select,
.roi-input {
  width: 100%;
  font-family: var(--sans);
  font-size: 13.5px;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface-0);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.roi-select:focus,
.roi-input:focus {
  border-color: var(--accent);
}
.roi-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}
.roi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.stat .value.good {
  color: var(--good);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 820px) {
  .product-grid { grid-template-columns: 1fr; }
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
  transition: border-color .14s, box-shadow .14s;
}
.product-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.product-card.featured {
  border-top: 3px solid var(--series-1);
}

.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.product-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.product-card h3 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.024em;
  line-height: 1.25;
  margin-bottom: 10px;
}
.product-card .dek {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.product-deliverables {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.5;
  display: grid;
  gap: 7px;
}
.product-deliverables li::marker {
  color: var(--accent);
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.product-price-wrap {
  display: flex;
  flex-direction: column;
}
.product-price {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.product-platform {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.product-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 650;
  padding: 9px 16px;
  border-radius: 6px;
  background: var(--text-primary);
  color: var(--surface-1);
  transition: opacity .12s;
}
.product-cta:hover {
  opacity: .88;
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.product-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-primary);
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.product-preview-btn:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}

.sample-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sample-preview-backdrop[hidden] {
  display: none;
}
.sample-preview-dialog {
  width: 100%;
  max-width: 820px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.sample-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.sample-preview-head h3 {
  font-size: 17px;
  font-weight: 750;
  margin: 0;
}
.sample-preview-close {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-primary);
  cursor: pointer;
}
.sample-preview-body {
  padding: 20px 22px;
  overflow-y: auto;
  display: grid;
  gap: 16px;
}
.sample-preview-code {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-0);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
}

/* ==========================================================================
   Unified Executive Portfolio & Masthead Extensions (colinafish.com)
   ========================================================================== */

.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
@media (max-width: 720px) {
  .brand-sub { display: none; }
}

.nav-linkedin {
  margin-left: 6px;
  background: #0A66C2 !important;
  color: #ffffff !important;
  font-weight: 650 !important;
  padding: 6px 12px !important;
  border-radius: 6px;
}
.nav-linkedin:hover {
  opacity: 0.92;
}

.exec-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 36px;
  align-items: center;
  padding: 34px 0 30px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 34px;
}
@media (max-width: 820px) {
  .exec-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.exec-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.exec-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.exec-pill .dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
}

.exec-hero h1 {
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 8px;
}
.exec-hero .exec-role {
  font-size: 19px;
  font-weight: 650;
  color: var(--text-primary);
  margin: 0 0 12px;
}
.exec-hero .exec-bio {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 66ch;
  margin: 0 0 20px;
}
.exec-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 650;
  padding: 10px 18px;
  border-radius: 6px;
  background: #0A66C2;
  color: #ffffff;
}
.btn-linkedin:hover {
  opacity: 0.92;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 650;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-3);
}

.exec-portrait-wrap {
  position: relative;
  width: 230px;
  height: 230px;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  background: var(--surface-2);
}
.exec-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.exp-stack {
  display: grid;
  gap: 16px;
}
.exp-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.exp-card.current {
  border-left: 3px solid var(--series-1);
}
.exp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.exp-role {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.exp-company {
  font-size: 14px;
  font-weight: 650;
  color: var(--accent);
}
.exp-company:hover {
  text-decoration: underline;
}
.exp-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: right;
}
@media (max-width: 640px) {
  .exp-meta { text-align: left; }
}
.exp-list {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  display: grid;
  gap: 6px;
}
.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.exp-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.cred-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 780px) {
  .cred-grid { grid-template-columns: 1fr; }
}
.cred-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.cred-card h4 {
  font-size: 15.5px;
  font-weight: 750;
  margin: 0 0 4px;
}
.cred-card .cred-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.cred-card p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 860px) {
  .domain-grid { grid-template-columns: 1fr; }
}
.domain-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.domain-card h3 {
  font-size: 17px;
  font-weight: 750;
  margin: 0 0 8px;
}
.domain-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 14px;
}

/* ==========================================================================
   Modern Builder Studio Redesign (colinafish.com)
   ========================================================================== */

.signal-subnav-bar {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.signal-subnav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px var(--gutter);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.signal-subnav-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-right: 4px;
}
.signal-subnav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.signal-subnav-link:hover {
  color: var(--text-primary);
  background: var(--surface-1);
}
.signal-subnav-link[aria-current="page"] {
  color: var(--text-primary);
  background: var(--surface-1);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

/* Studio Hero & Dual-Path Selector */
.studio-hero {
  position: relative;
  background: linear-gradient(145deg, var(--surface-1) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 40px 42px;
  margin: 26px 0 38px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.studio-hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
@media (max-width: 820px) {
  .studio-hero {
    padding: 26px 22px;
  }
}

.studio-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 36px;
  align-items: center;
  margin-bottom: 30px;
}
@media (max-width: 860px) {
  .studio-hero-top {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.studio-hero h1 {
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 850;
  letter-spacing: -0.038em;
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--text-primary);
}
.studio-hero-lead {
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--text-secondary);
  max-width: 68ch;
  margin: 0 0 20px;
}
.studio-hero-lead strong {
  color: var(--text-primary);
}

.studio-founder-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.studio-founder-badge img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--accent);
  margin-bottom: 10px;
}
.studio-founder-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}
.studio-founder-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 2px 0 8px;
  line-height: 1.35;
}

.dual-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--border-strong);
}
@media (max-width: 780px) {
  .dual-path-grid {
    grid-template-columns: 1fr;
  }
}

.path-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface-1);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 20px 22px;
  text-align: left;
  cursor: pointer;
  transition: transform .14s, border-color .14s, box-shadow .14s;
  box-shadow: var(--shadow-sm);
}
.path-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.path-card.path-curious {
  border-left: 4px solid var(--series-2);
}
.path-card.path-vibe {
  border-left: 4px solid var(--series-1);
}
.path-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 6px;
}
.path-curious .path-kicker { color: var(--series-2); }
.path-vibe .path-kicker { color: var(--series-1); }

.path-card h2 {
  font-size: 18.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--text-primary);
}
.path-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 14px;
}
.path-cta-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Interactive 3-Stage Agent Visual Simulator */
.agent-stage-wrap {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}
@media (max-width: 780px) {
  .agent-stage-wrap { padding: 20px 18px; }
}

.stage-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 780px) {
  .stage-tabs { grid-template-columns: 1fr; }
}

.stage-tab {
  font-family: var(--sans);
  text-align: left;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface-0);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .14s, background .14s, box-shadow .14s;
}
.stage-tab:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.stage-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--surface-1);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.stage-tab-num {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 4px;
}
.stage-tab-title {
  display: block;
  font-size: 14.5px;
  font-weight: 750;
  color: var(--text-primary);
}
.stage-tab-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stage-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 780px) {
  .stage-compare { grid-template-columns: 1fr; }
}

.stage-box {
  border-radius: 12px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  background: var(--surface-0);
}
.stage-box.stage-after {
  border-color: color-mix(in srgb, var(--good) 45%, var(--border));
  background: color-mix(in srgb, var(--good) 4%, var(--surface-0));
}
.stage-box-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px;
}
.stage-box.stage-before .stage-box-kicker { color: var(--text-muted); }
.stage-box.stage-after .stage-box-kicker { color: var(--good); }
.stage-box h4 {
  font-size: 16.5px;
  font-weight: 750;
  margin: 0 0 8px;
}
.stage-box p {
  font-size: 13.8px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 12px;
}
.stage-mockup {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  white-space: pre-wrap;
}

/* Free AI Coworker Interactive Lab */
.free-agent-lab {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-strong);
}
.lab-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.lab-head h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
}
.lab-head p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
}
.lab-goal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.lab-goal-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-0);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.lab-goal-btn:hover {
  color: var(--text-primary);
  background: var(--surface-2);
}
.lab-goal-btn[aria-pressed="true"] {
  background: var(--text-primary);
  color: var(--surface-1);
  border-color: var(--text-primary);
}
.lab-output-wrap {
  background: var(--surface-0);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 16px 18px;
}
.lab-output-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.lab-file-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.lab-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lab-btn {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-primary);
  cursor: pointer;
}
.lab-btn.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.lab-code {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}

/* Guided Two-Track Storefront Switcher */
.track-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 820px) {
  .track-switcher { grid-template-columns: 1fr; }
}
.track-btn {
  font-family: var(--sans);
  text-align: left;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .14s, box-shadow .14s, transform .14s;
}
.track-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.track-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-1));
  color: var(--text-primary);
  box-shadow: var(--shadow);
}
.track-btn-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent);
  margin-bottom: 3px;
}
.track-btn-title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}
.track-btn-sub {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.product-who-box {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.product-who-box strong {
  color: var(--text-primary);
}

.product-steps-box {
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-0));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 16px;
}
.product-steps-title {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent);
  margin-bottom: 6px;
}
.product-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
  font-size: 12.8px;
  color: var(--text-primary);
  line-height: 1.45;
}

/* Meet the Builder + Expandable Career Drawer */
.builder-story-card {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.builder-story-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
@media (max-width: 720px) {
  .builder-story-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
.builder-story-grid img {
  width: 150px;
  height: 150px;
  border-radius: 16px;
  object-fit: cover;
  object-position: top center;
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.builder-story-body h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.builder-story-body p {
  font-size: 14.8px;
  line-height: 1.62;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.career-drawer {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.career-drawer summary {
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 750;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
  list-style: none;
}
.career-drawer summary::-webkit-details-marker {
  display: none;
}
.career-drawer summary:hover {
  background: var(--surface-3);
}
.career-drawer-body {
  padding: 24px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 28px;
}

/* ROI Preset Bar on tools.html */
.roi-preset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.roi-preset-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.roi-preset-btn {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-secondary);
  cursor: pointer;
}
.roi-preset-btn:hover,
.roi-preset-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* Visual Pipeline Diagrams Inside 3-Stage Simulator */
.stage-diagram {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface-0);
  border: 1px solid var(--border-strong);
}
.stage-diagram-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 10px;
}
.diag-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
@media (max-width: 820px) {
  .diag-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .diag-flow { grid-template-columns: 1fr; }
}
.diag-node {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.diag-node.good {
  border-color: color-mix(in srgb, var(--good) 50%, var(--border));
  background: color-mix(in srgb, var(--good) 5%, var(--surface-1));
}
.diag-node-step {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.diag-node.good .diag-node-step {
  color: var(--good);
}
.diag-node-title {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text-primary);
}
.diag-node-sub {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Visual Product Card Mockup Headers */
.product-visual-banner {
  position: relative;
  height: 118px;
  margin: -24px -26px 18px -26px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface-2)) 0%, var(--surface-2) 100%);
}
.product-visual-banner.theme-curious {
  background: linear-gradient(135deg, color-mix(in srgb, var(--series-2) 15%, var(--surface-2)) 0%, var(--surface-2) 100%);
}
.product-visual-banner.theme-vibe {
  background: linear-gradient(135deg, color-mix(in srgb, var(--series-1) 16%, var(--surface-2)) 0%, var(--surface-2) 100%);
}
.product-visual-banner.theme-ops {
  background: linear-gradient(135deg, color-mix(in srgb, var(--series-3) 15%, var(--surface-2)) 0%, var(--surface-2) 100%);
}
.product-visual-banner.theme-bundle {
  background: linear-gradient(135deg, color-mix(in srgb, var(--series-4) 18%, var(--surface-2)) 0%, color-mix(in srgb, var(--series-1) 12%, var(--surface-2)) 100%);
}

.visual-window {
  flex: 1;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 10px 13px;
  box-shadow: var(--shadow-sm);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
}
.visual-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
.visual-dots {
  display: inline-flex;
  gap: 4px;
}
.visual-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--axis);
}
.visual-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.visual-chip {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.visual-chip.good {
  background: color-mix(in srgb, var(--good) 14%, var(--surface-1));
  color: var(--good);
  border-color: color-mix(in srgb, var(--good) 35%, var(--border));
}
