/* =========================
   CONTRACT — DO NOT EDIT
   Changing these requires bumping CSS version
   ========================= */


/* =========================
   SITE.CSS — Single source of truth
   - One background everywhere
   - One component system
   - Explicit variants (home vs tool vs playbook)
   ========================= */

:root{
  /* Core */
  --bg:#f9fafb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --muted2:#64748b;
  --border:#e5e7eb;
  --shadow:rgba(15,23,42,0.05);
  --radius:4px;
  --link:#2563eb;

  --grad:linear-gradient(135deg, rgba(79,70,229,.16), rgba(96,165,250,.14), rgba(167,139,250,.14));

  /* Signature top rule (pink is allowed here on all pages) */
  --accent-grad:linear-gradient(135deg,#f97373,#fb7185,#a855f7,#6366f1);

  /* Cool system gradient (used on tools + “Tools I Built” + non-home heroes) */
  --cool-grad:linear-gradient(
    135deg,
    rgba(59,130,246,.16),
    rgba(167,139,250,.16),
    rgba(99,102,241,.12)
  );

  /* Pink hero gradient (landing hero only) */
  --pink-grad:linear-gradient(
    135deg,
    rgba(249,115,115,.18),
    rgba(251,113,133,.16),
    rgba(168,85,247,.14),
    rgba(99,102,241,.10)
  );

  /* Darker tools hero gradient (explicit opt-in) */
  --tool-hero-grad: linear-gradient(
    135deg,
    rgba(79,70,229,.22),
    rgba(96,165,250,.18),
    rgba(167,139,250,.18)
  );

  /* Page background (same for EVERY page) */
  --page-bg:
    radial-gradient(circle at 10% 0%, rgba(59,130,246,.06), transparent 42%),
    radial-gradient(circle at 90% 10%, rgba(167,139,250,.06), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(99,102,241,.05), transparent 45%),
    var(--bg);

  /* Accents for links/buttons */
  --accent:#4f46e5;     /* indigo */
  --accent2:#60a5fa;    /* blue */
  --accent3:#a78bfa;    /* violet */
}

/* =========================
   BASE
   ========================= */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: 'DM Sans', ui-sans-serif, sans-serif;
  background: var(--page-bg);
  color:var(--text);
  line-height:1.55;
}


a{color:var(--link); text-decoration:none}
a:hover{text-decoration:underline}

.bar{height:4px;background:var(--accent-grad);}
.wrap{max-width:1120px; margin:0 auto; padding:28px 18px 64px}

/* =========================
   UTILITIES (minimal, reusable)
   ========================= */
.center{ text-align:center; }
.centerRow{ justify-content:center; }
.narrow{ max-width:720px; margin:0 auto; }

/* =========================
   PAGE MODES — DO NOT RENAME LIGHTLY
   Templates must use one of these.
   Allowed pageId values:
   - home
   - tools
   - tool-index
   - tool-playbook
   - tool-demo
   - tool-demo-embed
   - system
   - use-case
   - article
   ========================= */


/* =========================
   TOPBAR / NAV
   ========================= */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; margin-bottom:16px;
}
.crumbs{
  display:flex; align-items:center; gap:10px;
  color:var(--muted2); font-size:14px; flex-wrap:wrap;
}
.crumbs a{color:var(--muted2)}
.crumbs .sep{opacity:.5}

.navlinks{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.btn{
  display:inline-flex; align-items:center; gap:10px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.80);
  color:var(--text);
  padding:10px 12px;
  border-radius:999px;
  box-shadow: 0 10px 30px var(--shadow);
  font-size:14px;
  white-space:nowrap;
}
.btn:hover{background:#fff; text-decoration:none}
.btn.primary{
  border-color: rgba(79,70,229,.25);
  background: linear-gradient(135deg, rgba(79,70,229,.16), rgba(96,165,250,.10));
}
.ctaLabel{
  font-size:13px;
  font-weight:700;
  color:var(--muted2);
  padding:8px 2px;
  white-space:nowrap;
}

/* =========================
   HERO (shared shell + explicit variants)
   ========================= */
.hero{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.84));
  border-radius: var(--radius);
  padding:24px 22px 18px;
  box-shadow: 0 18px 55px var(--shadow);
  position:relative;
  overflow:hidden;
  margin-bottom:14px;
}
.hero::before{
  content:"";
  position:absolute; inset:-2px;
  opacity:.95;
  pointer-events:none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.95), rgba(0,0,0,.38), rgba(0,0,0,0));
}
.hero > *{position:relative}

/* Landing hero: purple overlay */
.hero--home::before{ background: var(--cool-grad); }

/* Tools + system + playbooks: cool overlay */
.hero--tool::before{ background: var(--cool-grad); }

/* Optional darker tools hero gradient (explicit opt-in) */
.hero--tool-strong::before{ background: var(--tool-hero-grad); }

/* Tools, system, use-case pages: h1 */
body[data-page="tools"] h1,
body[data-page="tool-demo"] h1,
body[data-page="tool-demo-embed"] h1,
body[data-page="system"] h1,
body[data-page="use-case"] h1,
body[data-page="tool-index"] h1,
body[data-page="tool-playbook"] h1,
body[data-page="article"] h1{font-family:'DM Sans', ui-sans-serif, sans-serif; font-weight:600; font-size:clamp(22px, 4vw, 44px);}
/* System page: lower min so long hero title doesn't wrap until very narrow screens */
body[data-page="system"] h1{font-size:clamp(16px, 4vw, 44px);}

/* Hero typography helpers */
.kicker{
  display:inline-flex; gap:8px; align-items:center;
  font-size:13px; color:var(--muted2);
  background:rgba(255,255,255,.78);
  border:1px solid rgba(79,70,229,.18);
  padding:6px 10px;
  border-radius:999px;
  backdrop-filter:saturate(120%) blur(6px);
}
.kdot{
  width:8px; height:8px; border-radius:999px;
  background:var(--accent);
  box-shadow:0 0 0 3px rgba(79,70,229,.12);
}

h1{margin:12px 0 8px; font-size:38px; font-weight:700; line-height:1.25; letter-spacing:normal}
.sub{
  margin:0;
  color:var(--muted);
  font-size:clamp(14px, 2vw, 16px);
}
.sub p{margin:0 0 0.75em}
.sub p:last-child{margin-bottom:0}
.accent{
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  font-weight:800;
}

.backRow{
  margin:10px 2px 2px;
  display:flex;
  align-items:center;
  gap:10px;
}
.backRow--split{ justify-content:space-between; flex-wrap:wrap; }

.ctaRow{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  margin-left:auto;
}
.ctaRow--tight{ margin-top:0; }

.backLink{
  display:inline-flex; align-items:center; gap:8px;
  color:var(--muted2);
  font-weight:700;
  font-size:14px;
}
.backLink:hover{color:var(--text); text-decoration:none}
.hairline{
  height:1px;
  background:rgba(226,232,240,0.9);
  margin:10px 0 0;
}
.hero .btn{ border-radius:999px; }
.ctaRow--left{ justify-content:flex-start; }

.btnGhost{
  display:inline-flex;
  align-items:center; gap:10px;
  border:1px solid rgba(79,70,229,.22);
  background:rgba(79,70,229,.06);
  color:#1f2a7a;
  padding:10px 12px;
  border-radius:999px;
  font-weight:900;
  font-size:14px;
  white-space:nowrap;
}
.btnGhost:hover{background:rgba(79,70,229,.10); text-decoration:none}

/* =========================
   HOME / LANDING PAGE
   (scoped so it never leaks)
   ========================= */
body[data-page="home"] .hero--home{
  padding:22px 22px 18px;
  min-height:220px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

body[data-page="home"] .hero-headline{
  margin: 8px 0 0;
  font-family:'DM Sans', ui-sans-serif, sans-serif;
  font-size:38px;
  font-weight:700;
  letter-spacing:-0.01em;
  line-height:1.25;
}

body[data-page="home"] .hero-role{
  margin: 2px 0 0;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  letter-spacing: normal;
  color: var(--text);
}
body[data-page="home"] .hero-subtitle .small{
  font-size: 16px;
}
body[data-page="home"] .hero-role a,
body[data-page="home"] .hero-subtitle a {
  white-space: nowrap;
}

body[data-page="home"] .hero-subtitle{
  color:var(--muted);
  font-size:16px;
  margin:0;
  line-height:1.75;
}

body[data-page="home"] .hero-actions{
  margin-top:auto;
  display:flex;
  justify-content:flex-start;
  gap:10px;
  flex-wrap:wrap;
}

body[data-page="home"] .hero-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  color:#334155;
  border:1px solid rgba(226,232,240,.95);
  background: rgba(255,255,255,.80);
  text-decoration:none;
}
body[data-page="home"] .hero-pill:hover{
  background: rgba(255,255,255,.92);
  text-decoration:none;
}
body[data-page="home"] a.hero-pill[href="/tools/"]{
  background: linear-gradient(135deg, #78869a, #4e6070);
  border-color: transparent;
  color:#fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
body[data-page="home"] a.hero-pill[href="/tools/"]:hover{
  background: linear-gradient(135deg, #64748b, #3d5060);
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,.22);
}

body[data-page="home"] .hero-callout{
  margin:20px 0 0;
  font-size:clamp(14px, 1.9vw, 20px);
  font-weight:600;
  line-height:1.25;
  color:inherit;
}

@media (max-width:720px){
  body[data-page="home"] .hero--home{ min-height:0; }
  body[data-page="home"] .hero-headline{ font-size:26px; }
}

/* =========================
   PANELS (your “Tools I Built” block style)
   ========================= */
.panel{
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: 0 16px 48px var(--shadow);
  background: rgba(255,255,255,.70);
}
/* Landing-only panel tint (pink is allowed ONLY on home) */
body[data-page="home"] .panel--pink{
  background: var(--pink-grad);
  border-color: rgba(99,102,241,.18);
}
body[data-page="home"] .panel--pink .panelInner{
  background: rgba(255,255,255,.92);
}

.panelInner{
  background: rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.55);
  border-radius: calc(var(--radius) - 6px);
  padding:14px;
}

.chapter{
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: 0 16px 48px var(--shadow);
  background: var(--cool-soft, var(--cool-grad));
}
.chapter__inner{
  background: rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.55);
  border-radius: calc(var(--radius) - 6px);
  padding:16px;
}
.chapter__inner h3{ margin:0 0 6px; }
.chapter__inner h3 + p{ margin:0 0 10px; }

/* System pages: strip purple gradient from chapter sections */
body[data-page="system"] .chapter{ background: rgba(255,255,255,.70); }
body[data-page="system"] .chapter__inner{ background: transparent; border: none; padding: 2px 0; }

.tagline{
  font-size: clamp(22px, 4vw, 42px);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  text-align: center;
  color: var(--text);
}

/* =========================
   EXPLORE NEXT (terminal)
   - Use on EVERY page as the final section
   - No white inner surface (gradient is exposed)
   ========================= */
.exploreNext{
  margin-top:14px;
}

/* Keep gradient panel, but REMOVE white inner surface */
.exploreNext .panel{
  background: var(--cool-grad);
  padding:16px;
}

.exploreNext .panelInner{
  background: transparent;
  border: none;
  padding: 0;
}

/* Buttons float directly on gradient */
.exploreNext__actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

/* Slightly stronger pill contrast on gradient */
.exploreNext .btn{
  background: rgba(255,255,255,.88);
  border-radius:999px;
  box-shadow:none;
}
.exploreNext .btn:hover{
  background:#fff;
  text-decoration:none;
}

/* =========================
   SECTION TITLES / CARDS
   ========================= */
.section-title{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:clamp(18px, 2.5vw, 26px);
  font-weight:600;
  color:#64748b;
  line-height:1.25;
  letter-spacing:normal;
  margin:0 0 12px;
}
.section-title::before{
  content:"";
  width:6px;
  height:28px;
  border-radius:999px;
  background: linear-gradient(180deg, var(--accent), var(--accent2), var(--accent3));
}

.section-sub{
  margin:0 0 14px;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}

.card{
  border:1px solid var(--border);
  background:rgba(255,255,255,.90);
  border-radius: var(--radius);
  padding:18px 18px;
  box-shadow: 0 16px 48px var(--shadow);
}
/* Responsive media inside cards */
.card img{
  max-width:100%;
  height:auto;
  display:block;
}

.card h2:not(.section-title){ margin:0 0 10px; font-family:'DM Sans', ui-sans-serif, sans-serif; font-size:clamp(16px, 2vw, 20px); font-weight:600; line-height:1.25; letter-spacing:normal; }
.card p{ margin:10px 0; color:var(--text); }
.small{font-size:13px; font-weight:500; color:var(--muted2)}
.muted{color:var(--muted)}
.rule{height:1px; background:var(--border); margin:14px 0}
.card h3{
  margin:0 0 10px;
  font-family:'DM Sans', ui-sans-serif, sans-serif;
  font-size:clamp(20px, 2.8vw, 28px);
  font-weight:550;
  line-height:1.25;
  letter-spacing:normal;
}

/* =========================
   CALLOUT / NOTES
   ========================= */
.callout{
  margin: 14px 0;
  padding: 10px 14px;
  background: rgba(79,70,229,.05);
  border-left: 2px solid rgba(79,70,229,.55);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.45;
}

/* =========================
   TABLE OVERFLOW GUARD
   ========================= */
.table-wrap{
  margin: 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table{
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.table-wrap th,
.table-wrap td {
  padding: 7px 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  vertical-align: top;
  text-align: left;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-wrap th {
  background: rgba(79,70,229,.06);
  font-weight: 700;
}

/* Keep lists from leaking */
.card ul, .full ul, .hero-meta ul, .toc-card ul, .persona-card ul, .prose ul{
  margin:10px 0 0 18px;
  padding:0;
}
.card li, .full li, .hero-meta li, .toc-card li, .persona-card li, .prose li{
  margin:8px 0;
  color:var(--text);
}
#candidate-analytics .card li{
  margin:3px 0;
}

/* =========================
   LAYOUTS (overview + full)
   ========================= */
.grid2{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:14px;
  margin-top:14px;
}
@media (max-width: 920px){ .grid2{grid-template-columns:1fr;} }

.full{
  margin-top:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.90);
  border-radius: var(--radius);
  padding:18px 18px;
  box-shadow: 0 16px 48px var(--shadow);
}
.full h2:not(.section-title){margin:0 0 10px; font-size:20px; letter-spacing:-.01em;}

/* Tool overview: equal columns for Before/After */
body[data-page="tool-index"] .grid2{
  grid-template-columns: 1fr 1fr;
}

/* Use case: equal columns for split sections (Context / Flag, etc.) */
body[data-page="use-case"] .grid2{
  grid-template-columns: 1fr 1fr;
}

.grid2--equal{
  grid-template-columns: 1fr 1fr;
}

/* Mini outcome grid (3 across) */
.miniGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:10px;
  margin-top:10px;
}
@media (max-width: 900px){ .miniGrid{grid-template-columns:1fr;} }
.mini{
  border:1px solid rgba(226,232,240,0.9);
  background:rgba(255,255,255,.75);
  border-radius:4px;
  padding:12px 12px;
}
.mini b{ display:block; font-size:13px; letter-spacing:-.01em; margin-bottom:6px; }
.mini span{ display:block; font-size:13px; color:var(--muted); line-height:1.45; }
a.mini{ display:block; text-decoration:none; text-align:center; cursor:pointer; border-left:3px solid var(--accent); transition:background .15s, box-shadow .15s, transform .1s; }
a.mini b{ color:var(--accent); font-size:14px; }
a.mini:hover{ background:rgba(255,255,255,1); transform:translateY(-1px); box-shadow:0 3px 10px rgba(79,70,229,.12); }

/* Tool nav: keep 3 cards side-by-side down to ~480px */
.miniGrid--nav{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 480px){ .miniGrid--nav{ grid-template-columns:1fr; } }

/* Mini outcome grid variants */
.miniGrid--4{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
/* Responsive: 2-up on medium, 1-up on small */
@media (max-width: 1100px){
  .miniGrid--4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .miniGrid--4{ grid-template-columns: 1fr; }
}

/* =========================
   LAYOUTS (extra)
   ========================= */

/* 3-up grid (System: Layers | Diagram | Operating loop) */
.grid3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
}
@media (max-width: 1100px){
  .grid3:not(.grid3--persist){ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .grid3:not(.grid3--persist){ grid-template-columns: 1fr; }
}

.grid4{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
}
.grid4 .card h3{ font-size:clamp(15px, 1.8vw, 20px); }
@media (max-width: 1100px){
  .grid4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px){
  .grid4{ grid-template-columns: 1fr; }
}

.grid5{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
  align-items:center;
}
@media (max-width: 1100px){
  .grid5:not(.grid5--persist){ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px){
  .grid5:not(.grid5--persist){ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px){
  .grid5:not(.grid5--persist){ grid-template-columns: 1fr; }
}

/* Architecture row (Signals / Decision Logic / Execution) */
.arch-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
}
@media (max-width: 900px){
  .arch-grid{ grid-template-columns: 1fr; }
}

/* =========================
   SYSTEM COMPONENTS FLOW STRIP
   ========================= */
.flow-strip{
  display:flex;
  align-items:stretch;
  gap:10px;
  margin-top:14px;
  flex-wrap:wrap;
}
.flow-step{
  flex:1;
  min-width:160px;
  display:flex;
  flex-direction:column;
  gap:5px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.90);
  border-radius:var(--radius);
  padding:14px 16px;
  box-shadow:0 16px 48px var(--shadow);
  text-decoration:none;
  color:var(--text);
  transition:transform .15s, box-shadow .15s;
}
.flow-step:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 14px rgba(79,70,229,.15);
  text-decoration:none;
}
.flow-num{
  font-size:13px;
  font-weight:700;
  color:var(--accent);
  letter-spacing:.08em;
}
.flow-step b{
  font-size:15px;
  font-family:'DM Sans', ui-sans-serif, sans-serif;
  font-weight:600;
}
.flow-desc{
  font-size:13px;
  color:var(--muted);
  line-height:1.45;
}
.flow-arrow{
  display:flex;
  align-items:center;
  font-size:22px;
  color:var(--accent3);
  flex-shrink:0;
  font-weight:300;
  line-height:1;
  padding-bottom:6px;
}
@media (max-width:700px){
  .flow-strip{ flex-direction:column; }
  .flow-arrow{ transform:rotate(90deg); align-self:center; padding-bottom:0; }
}

/* =========================
   TOOLS GRID (landing + anywhere)
   ========================= */
.tools-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:12px;
  margin-top:12px;
}

.tool-card{
  border:1px solid rgba(226,232,240,0.9);
  background: rgba(255,255,255,.90);
  border-radius:4px;
  padding:12px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.tool-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  flex-wrap:wrap;
}

.tool-top > div{
  flex: 1 1 180px;
  min-width:0;
}

.tool-card h3{
  margin:8px 0 6px;
  font-family:'DM Sans', ui-sans-serif, sans-serif;
  font-size:clamp(20px, 2.8vw, 28px);
  font-weight:550;
  letter-spacing:-.01em;
}

.tool-card h4 {
  margin: 6px 0 4px;
  font-size: 16px;
  font-weight: 500;
}

.tool-card p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  word-break:normal;
  overflow-wrap:normal;
}

.badge{
  font-size:12px;
  font-weight:300;
  color:var(--muted2);
  border:1px solid rgba(226,232,240,.95);
  border-radius:999px;
  padding:4px 8px;
  background:rgba(255,255,255,.78);
  white-space:nowrap;
  flex:0 1 auto;
  max-width:100%;
}
/* Type-coded badges (attribute selectors, no new classes) */
.badge[data-kind="tool"]{
  border-color: rgba(79,70,229,.22);
  background: rgba(79,70,229,.08);
  color: rgba(55,48,163,.95);
}

.badge[data-kind="playbook"]{
  border-color: rgba(96,165,250,.26);
  background: rgba(96,165,250,.10);
  color: rgba(29,78,216,.92);
}

.badge[data-kind="system"]{
  border-color: rgba(34,197,94,.28);
  background: rgba(34,197,94,.10);
  color: rgba(21,128,61,.95);
}

.badge[data-kind="article"]{
  border-color: rgba(251,113,133,.35);
  background: rgba(251,113,133,.12);
  color: rgba(159,18,57,.92);
}

.badge[data-kind="use-case"]{
  border-color: rgba(148,163,184,.45);
  background: rgba(148,163,184,.12);
  color: rgba(71,85,105,.98);
}

.tool-actions a{
  font-size:13px;
  font-weight:700;
  color:var(--accent);
  text-decoration:none;
}
.tool-actions a:hover{ color:#3730a3; text-decoration:none; }


.tool-actions{
  margin-top:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

/* Route-card variants (landing) */
.tool-card.is-route{
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.86));
  border-color: rgba(79,70,229,.18);
}
.tool-card.is-route .badge{
  border-color: rgba(79,70,229,.18);
  background: rgba(79,70,229,.06);
  color:#4b5563;
}

.tool-card.is-route--cool{
  background: var(--cool-grad);
  border-color: rgba(99,102,241,.22);
}
.tool-card.is-route--cool .badge{
  background: rgba(255,255,255,.82);
  border-color: rgba(255,255,255,.65);
  color: var(--muted2);
}

/* Route card: soft neutral tint (distinct from tools + from cool-grad) */
.tool-card.is-route--soft{
  background: linear-gradient(
    180deg,
    rgba(248,250,252,.96),
    rgba(241,245,249,.92)
  );
  border-color: rgba(148,163,184,.45);
}
.tool-card.is-route--soft .badge{
  background: rgba(255,255,255,.85);
  border-color: rgba(148,163,184,.45);
}

.depth-list{
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.depth-list li{
  margin: 4px 0;
  font-size: 13px;
}
.depth-list a{
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}
.depth-list a:hover{
  text-decoration: underline;
}

/* =========================
   SYSTEM DROPDOWN (details)
   ========================= */
.sys-details{
  margin-top:14px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.90);
  box-shadow: 0 16px 48px var(--shadow);
  overflow:hidden;
}
.sys-details summary{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  position:relative;
}
.sys-details summary::-webkit-details-marker{display:none;}

.sys-sum h3{
  margin:0 0 6px;
  font-family:'DM Sans', ui-sans-serif, sans-serif;
  font-size:18px;
  font-weight:900;
  letter-spacing:-.01em;
}
.sys-sum p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
  max-width:90ch;
}
.sys-chev{
  font-weight:900;
  color:var(--accent);
  font-size:18px;
  line-height:1;
  user-select:none;
  margin-top:2px;
  transform:rotate(0deg);
  transition:transform .15s ease;
}
.sys-details[open] .sys-chev{ transform:rotate(90deg); }

.sys-body{
  padding:0 16px 16px;
  border-top:1px solid rgba(226,232,240,.9);
}
.sys-layout{
  display:grid;
  grid-template-columns: 1.35fr 1fr;
  gap:14px;
  align-items:start;
  margin-top:14px;
}
@media (max-width:900px){
  .sys-layout{ grid-template-columns:1fr; }
}

.sys-diagram{
  border:1px solid rgba(226,232,240,.9);
  background: rgba(255,255,255,.75);
  border-radius:4px;
  padding:12px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
}
.sys-diagram img{
  width:100%;
  height:auto;
  border-radius:4px;
  display:block;
}

.sys-bullets{
  border:1px solid rgba(226,232,240,.9);
  background: rgba(255,255,255,.75);
  border-radius:4px;
  padding:12px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
}
.sys-bullets ul{ margin:0; padding-left:18px; }
.sys-bullets li{ margin:8px 0; color:var(--muted); font-size:14px; line-height:1.55; }
.sys-bullets b{ color:var(--text); }

.sys-cta{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.sys-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 13px;
  border-radius:999px;
  font-size:13px;
  font-weight:900;
  border:1px solid rgba(148,163,184,0.75);
  background:rgba(255,255,255,0.92);
  color:#4338ca;
  text-decoration:none;
  white-space:nowrap;
}
.sys-btn:hover{ background:#fff; text-decoration:none; color:#3730a3; }
.sys-btn.primary{
  border:none;
  background:#4f46e5;
  color:#fff;
}
.sys-btn.primary:hover{ background:#4338ca; color:#fff; }

/* =========================
   DEMO (iframe)
   ========================= */
.demo{
  border:1px solid rgba(226,232,240,0.9);
  background:rgba(255,255,255,.78);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: 0 16px 48px var(--shadow);
}
.demoHead{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid rgba(226,232,240,0.9);
}
.demoHead .label{
  display:inline-flex; align-items:center; gap:8px;
  font-weight:900;
  letter-spacing:-.01em;
}
.demoHead .label .dot{
  width:10px;height:10px;border-radius:999px;background:var(--accent);
  box-shadow:0 0 0 3px rgba(79,70,229,.12);
}
.demoHead a{ font-size:13px; font-weight:900; color:var(--accent); }
.demoFrame{
  width:100%;
  height:460px;
  border:0;
  display:block;
  background:#fff;
}
@media (max-width: 680px){ .demoFrame{height:520px;} }

/* =========================
   SITE FOOTER (centered + aligned with wrap)
   ========================= */
.site-footer{
  margin-top:28px;
  padding:22px 0 28px;
  border-top:1px solid var(--border);
  background: rgba(255,255,255,.55);
}
.site-footer__row{
  max-width:1120px;
  margin:0 auto;
  padding:0 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:var(--muted2);
  font-size:13px;
  text-align:center;
}

/* =========================
   PLAYBOOK LAYOUT (clean)
   ========================= */
body[data-page="tool-playbook"] .info-layout,
body[data-page="tool-playbook"] .info-layout-two{
  display:grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap:14px;
  margin-top:14px;
}
@media (max-width: 1100px){
  body[data-page="tool-playbook"] .info-layout,
  body[data-page="tool-playbook"] .info-layout-two{ grid-template-columns: 1fr; }
}

/* If you use a split meta block in the hero, this keeps it consistent */
body[data-page="tool-playbook"] .hero-meta--split .metaSplit{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}
body[data-page="tool-playbook"] .hero-meta--split .metaBlock + .metaBlock{
  padding-top:14px;
  border-top:1px solid var(--border);
}

body[data-page="tool-playbook"] .hero-meta,
body[data-page="tool-playbook"] .toc-card,
body[data-page="tool-playbook"] .persona-card{
  border:1px solid var(--border);
  background:rgba(255,255,255,.90);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: 0 16px 48px var(--shadow);
}
body[data-page="tool-playbook"] .tocList{
  list-style:none;
  margin:0;
  padding:0;
}
body[data-page="tool-playbook"] .tocList li{ margin:8px 0; }
body[data-page="tool-playbook"] .toc a{
  color:var(--text);
  font-weight:400;
  text-decoration:none;
}
body[data-page="tool-playbook"] .toc a:hover{
  color:var(--accent);
  text-decoration:none;
}
@media (min-width: 920px){
  body[data-page="tool-playbook"] .toc-card{
    position: sticky;
    top: 16px;
    align-self: start;
  }
}
body[data-page="tool-playbook"] .prose{ max-width: 92ch; }

body[data-page="tool-playbook"] .backRow--split{
  justify-content: space-between;
  flex-wrap: wrap;
}
body[data-page="tool-playbook"] .ctaRow--tight{
  margin-top: 0;
}

/* =========================
   ARTICLE — Editorial mode (single source)
   ========================= */

body[data-page="article"] .prose{
  font-size:18px;
  line-height:1.78;
}

body[data-page="article"] .prose p{
  color:rgba(15,23,42,.88);
  margin:18px 0;
}

/* Links: all purple */
body[data-page="article"] .prose a,
body[data-page="article"] .prose a:visited{
  color:#7c3aed;
}
body[data-page="article"] .prose a:hover{
  text-decoration:underline;
}

/* The “big MIT line” (full sentence link) */
body[data-page="article"] .prose p > a{
  font-size:20px;
  font-weight:600;
  text-decoration:underline;
}

/* Headings */
body[data-page="article"] .prose h1{
  font-size:44px;
  font-weight:800;
  line-height:1.25;
  letter-spacing:-0.01em;
  margin:18px 0 12px;
}

body[data-page="article"] .prose h2{
  font-size:30px;
  font-weight:700;
  line-height:1.25;
  letter-spacing:normal;
  margin:34px 0 12px;
  color:var(--text);
}

/* Accent ONLY the number token (your markup uses <b>#1</b>) */
body[data-page="article"] .prose h2 b{
  margin-right:8px;
  font-weight:600;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* Blockquotes: bigger, thin purple rule */
body[data-page="article"] .prose blockquote{
  margin:26px 0;
  padding:6px 0 6px 18px;
  border-left:3px solid #7c3aed;
  color:var(--text);
}
body[data-page="article"] .prose blockquote p{
  margin:0;
  font-size:28px;
  line-height:1.45;
  font-weight:500;
}

/* Lists: tighter */
body[data-page="article"] .prose ul,
body[data-page="article"] .prose ol{
  margin:10px 0 14px 20px;
  padding:0;
}
body[data-page="article"] .prose li{
  margin:2px 0;
}

/* Author/read-time meta below backLink */
body[data-page="article"] .backRow .small{ margin-top:6px; }

/* Callout: larger + centered */
body[data-page="article"] .callout{
  font-size:22px;
  font-weight:600;
  text-align:center;
  padding:16px 16px;
}



/* =========================
   APP GRID (Tools library)
   ========================= */
.appGrid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 1100px){ .appGrid{ grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px){ .appGrid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px){ .appGrid{ grid-template-columns: 1fr; } }

.appGrid--scroll{
  display:flex;
  overflow-x:auto;
  gap:12px;
  padding-bottom:8px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.appGrid--scroll::-webkit-scrollbar{ display:none; }
.appGrid--scroll .appCard{ flex:0 0 280px; }

.appCard{
  border:1px solid rgba(226,232,240,0.95);
  background: rgba(255,255,255,.90);
  border-radius:4px;
  padding:12px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}
.appTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.appMain{
  flex: 1 1 190px;
  min-width:190px;
}
.appCard h3{
  margin:0 0 6px;
  font-family:'DM Sans', ui-sans-serif, sans-serif;
  font-size:clamp(20px, 2.8vw, 28px);
  font-weight:550;
  letter-spacing:-.01em;
}
.splitEmbed{
  display:grid;
  grid-template-columns:1fr 2fr;
  gap:24px;
  align-items:center;
}
@media(max-width:768px){
  .splitEmbed{
    grid-template-columns:1fr;
  }
  .splitEmbed iframe{
    height:360px;
  }
}
.appCard--compact{
  padding:8px 12px;
  gap:4px;
}

.appCard p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  word-break:normal;
  overflow-wrap:normal;
}
.appBadge{
  font-size:12px;
  font-weight:900;
  color:var(--muted2);
  border:1px solid rgba(226,232,240,0.95);
  border-radius:999px;
  padding:4px 8px;
  background:rgba(255,255,255,.78);
  white-space:nowrap;
}

.appActions{
  margin-top:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.appLink{
  font-size:13px;
  font-weight:900;
  color:var(--accent);
  text-decoration:none;
}
.appLink:hover{ color:#3730a3; text-decoration:none; }

/* =========================
   EXPLORE NEXT active state (section highlighting)
   ========================= */
body[data-page="system"] .exploreNext a[href="/system/"],
body[data-page="system"] .exploreNext a[href="/system"],

body[data-page="tools"] .exploreNext a[href="/tools/"],
body[data-page="tools"] .exploreNext a[href="/tools"],

body[data-page="use-case"] .exploreNext a[href="/use-cases/"],
body[data-page="use-case"] .exploreNext a[href="/use-cases"],

body[data-page="article"] .exploreNext a[href="/articles/"],
body[data-page="article"] .exploreNext a[href="/articles"]{
  border-color: rgba(79,70,229,.35);
  background: linear-gradient(
    135deg,
    rgba(79,70,229,.18),
    rgba(96,165,250,.12)
  );
  font-weight:900;
}

/* Explore Next – make Contact visually distinct */
.exploreNext__actions a[href^="mailto:"]{
  border-color: rgba(79,70,229,.35);
  background: linear-gradient(
    135deg,
    rgba(79,70,229,.18),
    rgba(96,165,250,.12)
  );
  font-weight:900;
}
.exploreNext__actions a[href^="mailto:"]:hover{
  background: linear-gradient(
    135deg,
    rgba(79,70,229,.28),
    rgba(96,165,250,.18)
  );
}
/* Utility: center CTA rows even though .ctaRow defaults to flex-end */
.ctaRow.centerRow{ justify-content:center; margin-left:0; margin-top:18px;}

.btn--solid{
  background:#4f46e5;
  color:#fff;
  border:none;
}
.btn--solid:hover{
  background:#4338ca;
}

/* =========================
   USE CASE DENSITY TUNING
   ========================= */

body[data-page="use-case"] .full{
  padding:16px 16px;
  margin-top:12px;
}

body[data-page="use-case"] .section-title{
  margin-bottom:10px;
}

body[data-page="use-case"] .miniGrid{
  margin-top:8px;
}

/* =========================
   TAGLINE STATEMENT (landing)
   ========================= */
.tagline-panel{
  padding-top:0;
  padding-bottom:0;
}
.tagline-statement{
  font-family:'Playfair Display', Georgia, serif;
  font-size:clamp(22px, 4vw, 44px);
  font-weight:600;
  line-height:1.25;
  color:var(--text);
  margin:0;
  padding:28px 0;
}
.tagline-statement strong{
  font-weight:700;
}
