/* ============================================================
   Getting Started with Claude — SAilsy edition
   Design tokens, themes, layout, components, print
   ============================================================ */

/* ---------- Fonts ---------- */
/* Self-hosted webfonts (latin subset, woff2) */
/* ============================================================
   SAilsy · Webfonts — self-hosted (latin subset, woff2)
   Downloaded from Google Fonts so consumers work offline.
   ============================================================ */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/BricolageGrotesque-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/BricolageGrotesque-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/BricolageGrotesque-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/BricolageGrotesque-800.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/IBMPlexMono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/IBMPlexMono-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/SourceSans3-400-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/SourceSans3-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/SourceSans3-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/SourceSans3-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/SourceSans3-700.woff2') format('woff2');
}

/* ---------- Light theme (default) ---------- */
:root {
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --bg: #F4F7FB;
  --bg-tint: #EAF1FA;
  --surface: #FFFFFF;
  --surface-2: #F1F5FB;
  --surface-3: #E9F0F9;
  --border: #E0E8F2;
  --border-strong: #CBD7E6;

  --text: #141C2B;
  --text-soft: #46546A;
  --text-faint: #8593A6;

  --heading: #1B4ECB;
  --accent-a: #2C6EE6;
  --accent-b: #11B79A;
  --coral: #CE6E52;
  --coral-soft: #F6E7E0;

  --grad: linear-gradient(95deg, var(--accent-a), var(--accent-b));

  --tip-bg: #EAF6F3;
  --tip-edge: #11B79A;
  --rule-bg: #FBF1ED;
  --rule-edge: #CE6E52;

  --shadow-sm: 0 1px 2px rgba(20, 35, 70, .04), 0 2px 8px rgba(20, 35, 70, .05);
  --shadow-md: 0 4px 14px rgba(20, 35, 70, .08), 0 18px 44px rgba(20, 35, 70, .07);
  --code-bg: #F2F5FA;

  color-scheme: light;
}

/* ---------- Dark theme ---------- */
html[data-theme="dark"] {
  --bg: #080C14;
  --bg-tint: #0E1626;
  --surface: #111A28;
  --surface-2: #16202F;
  --surface-3: #1B2738;
  --border: #233044;
  --border-strong: #324259;

  --text: #D7E1EE;
  --text-soft: #93A2B6;
  --text-faint: #5D6B7E;

  --heading: #45D7C1;
  --accent-a: #4F8BF5;
  --accent-b: #2DD4B2;
  --coral: #E2906F;
  --coral-soft: #2A1E18;

  --tip-bg: #0E2421;
  --tip-edge: #2DD4B2;
  --rule-bg: #261A14;
  --rule-edge: #E2906F;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .5);
  --code-bg: #0E1726;

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.62;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent-a); text-decoration: none; }
strong { font-weight: 700; color: var(--text); }

/* ---------- Reading progress ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad); z-index: 200; transition: width .1s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 20px;
  padding: 0 28px; height: 62px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand .spark-sq {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(160deg, #D8795C, #C25E43);
  display: grid; place-items: center; flex: none;
  box-shadow: 0 2px 6px rgba(186, 84, 56, .35);
}
.brand .spark-sq svg { width: 19px; height: 19px; }
.wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 23px; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.header-sep { width: 1px; height: 24px; background: var(--border-strong); }
.header-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 13px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-soft); font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .18s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent-a); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.square { width: 38px; padding: 0; justify-content: center; }
.icon-btn .ic-moon { display: none; }
html[data-theme="dark"] .icon-btn .ic-sun { display: none; }
html[data-theme="dark"] .icon-btn .ic-moon { display: inline; }
#themeBtn svg { transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
#themeBtn.spin svg { transform: rotate(180deg) scale(1.12); }

/* View-transition: circular reveal of the new theme from the toggle */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 76px 28px 64px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--accent-b) 12%, transparent), transparent 60%),
    radial-gradient(110% 80% at 8% 10%, color-mix(in srgb, var(--accent-a) 10%, transparent), transparent 55%),
    var(--bg-tint);
}
.hero-inner { max-width: 1080px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 22px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.hero h1 {
  font-size: clamp(38px, 6.2vw, 68px); font-weight: 800; letter-spacing: -.025em; line-height: 1.02;
  max-width: 16ch;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede {
  font-size: clamp(18px, 2.2vw, 22px); color: var(--text-soft); max-width: 46ch; margin: 22px 0 0; line-height: 1.5;
}

/* journey diagram */
.journey {
  margin-top: 52px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 34px 30px 30px; box-shadow: var(--shadow-md); position: relative;
}
.journey-label { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 26px; }
.journey-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; position: relative; }
.journey-track::before {
  content: ""; position: absolute; left: 11%; right: 11%; top: 26px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 7px, transparent 7px 14px);
  z-index: 0;
}
.j-step { display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; z-index: 1; text-align: center; }
.j-node {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--border-strong); color: var(--text-soft);
}
.j-node svg { width: 24px; height: 24px; }
.j-step:last-child .j-node { background: linear-gradient(150deg, var(--accent-a) -8%, var(--accent-b) 112%); border: none; color: #fff; box-shadow: 0 12px 30px -8px color-mix(in srgb, var(--accent-b) 42%, transparent); }
.j-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); }
.j-sub { font-size: 13px; color: var(--text-faint); margin-top: -6px; max-width: 18ch; }
.prepared { margin-top: 30px; display: flex; align-items: center; gap: 14px; justify-content: center; }
.prepared .pl { font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-faint); }
.prepared .wordmark { font-size: 30px; }

/* ---------- Body grid ---------- */
.layout { max-width: 1180px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 56px; align-items: start; }

/* TOC */
.toc { position: sticky; top: 82px; padding: 36px 0; max-height: calc(100vh - 82px); overflow-y: auto; }
.toc-title { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 14px 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a {
  display: flex; gap: 11px; align-items: baseline;
  padding: 7px 12px; border-radius: 8px; color: var(--text-soft);
  font-size: 14px; line-height: 1.35; font-weight: 500;
  border-left: 2px solid transparent; transition: all .15s ease;
}
.toc a .num { color: var(--text-faint); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; min-width: 16px; }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc a.active { color: var(--heading); background: color-mix(in srgb, var(--accent-a) 9%, transparent); border-left-color: var(--accent-a); font-weight: 600; }
.toc a.active .num { color: var(--accent-a); }
.toc-scroll-hint { display: none; }

/* Content column */
.content { padding: 48px 0 100px; max-width: 760px; }

/* section */
.section { scroll-margin-top: 82px; padding: 30px 0 6px; }
.section + .section { border-top: 1px solid var(--border); margin-top: 26px; }
.section-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.section-num {
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent-a) 12%, transparent); color: var(--heading);
  font-variant-numeric: tabular-nums;
}
.section h2 { font-size: clamp(25px, 3.4vw, 33px); font-weight: 700; color: var(--heading); letter-spacing: -.02em; padding-top: 1px; }
.section h2 .accent { color: var(--text); }
.lead { font-size: 18px; font-weight: 500; color: var(--text); }
.section h3 {
  font-size: 18px; font-weight: 700; color: var(--text); margin: 28px 0 10px;
  font-family: var(--font-body); letter-spacing: 0;
}
.section h3.tinted { color: var(--heading); }

/* lists */
.section ul { margin: 0 0 1.1em; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.section ul li { position: relative; padding-left: 26px; }
.section ul li::before {
  content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 2px;
  background: var(--grad);
}
.section ul li strong { color: var(--text); }
.section ol.steps { margin: 0 0 1.1em; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 13px; }
.section ol.steps li { position: relative; padding-left: 42px; counter-increment: step; }
.section ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--heading); font-family: var(--font-display); font-weight: 700; font-size: 13.5px;
}

/* callouts */
.callout {
  display: flex; gap: 14px; padding: 17px 20px; border-radius: 14px; margin: 22px 0;
  background: var(--tip-bg); border: 1px solid color-mix(in srgb, var(--tip-edge) 30%, transparent);
}
.callout .ic { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--tip-edge); color: #fff; }
.callout .ic svg { width: 16px; height: 16px; }
.callout .ct { font-size: 17px; line-height: 1.58; }
.callout .ct b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--tip-edge); margin-bottom: 3px; }
.callout p { margin: 0; }
.callout.rule { background: var(--rule-bg); border-color: color-mix(in srgb, var(--rule-edge) 32%, transparent); }
.callout.rule .ic { background: var(--rule-edge); }
.callout.rule .ct b { color: var(--rule-edge); }

/* tables */
.table-wrap { margin: 22px 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 17px; }
thead th { background: var(--grad); color: #fff; text-align: left; padding: 13px 18px; font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: .01em; }
tbody td { padding: 14px 18px; border-top: 1px solid var(--border); vertical-align: top; color: var(--text); }
tbody tr:nth-child(even) td { background: var(--surface-2); }
tbody td:first-child { font-weight: 700; color: var(--text); white-space: nowrap; }
tbody td .pill { font-family: var(--font-body); }

/* model / plan cards inline emphasis */
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; font-family: var(--font-body); white-space: nowrap; }
.tag.opus { background: var(--coral-soft); color: var(--coral); }
.tag.sonnet { background: color-mix(in srgb, var(--accent-a) 14%, transparent); color: var(--accent-a); }
.tag.haiku { background: color-mix(in srgb, var(--accent-b) 16%, transparent); color: var(--accent-b); }

/* prompt example with copy */
.prompt {
  margin: 18px 0; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; background: var(--code-bg);
}
.prompt .pbar { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.prompt .pbar span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--border-strong); color: var(--text-soft); border-radius: 7px; padding: 5px 10px; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.copy-btn:hover { color: var(--text); border-color: var(--accent-a); }
.copy-btn.done { color: var(--accent-b); border-color: var(--accent-b); }
.copy-btn svg { width: 13px; height: 13px; }
.prompt pre { margin: 0; padding: 15px 16px; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }

/* compare grid (memory vs search) */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.compare .c { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); }
.compare .c h4 { font-family: var(--font-display); font-size: 15px; color: var(--heading); margin-bottom: 7px; }
.compare .c p { margin: 0; font-size: 15px; color: var(--text-soft); }

/* feature mini-cards */
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 22px 0; }
.mini { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); }
.mini .mic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent-a) 12%, transparent); color: var(--accent-a); margin-bottom: 12px; }
.mini .mic svg { width: 20px; height: 20px; }
.mini h4 { font-family: var(--font-display); font-size: 15.5px; color: var(--text); margin-bottom: 5px; }
.mini p { margin: 0; font-size: 14.5px; color: var(--text-soft); line-height: 1.5; }

/* glossary */
.glossary { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin: 22px 0; }
.gloss { background: var(--surface); padding: 16px 18px; }
.gloss dt { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--heading); margin-bottom: 3px; }
.gloss dd { margin: 0; font-size: 14.5px; color: var(--text-soft); line-height: 1.5; }

/* footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-tint); padding: 44px 28px; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; justify-content: space-between; }
.footer-inner .fbrand { display: flex; align-items: center; gap: 11px; }
.footer-inner .meta { font-size: 13.5px; color: var(--text-faint); }
.to-top { display: inline-flex; align-items: center; gap: 8px; }

/* mobile toc toggle */
.toc-toggle { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc {
    position: fixed; inset: 62px 0 auto 0; top: 62px; z-index: 90;
    background: var(--surface); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; padding: 0 16px; transition: max-height .3s ease, padding .3s ease;
    box-shadow: var(--shadow-md);
  }
  .toc.open { max-height: 70vh; overflow-y: auto; padding: 16px; }
  .toc-toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 13px;
    border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface);
    color: var(--text-soft); font-family: var(--font-body); font-weight: 600; font-size: 14px; cursor: pointer;
  }
  .toc-toggle svg { width: 16px; height: 16px; }
  .content { padding: 32px 0 80px; }
  .header-title { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding: 52px 20px 44px; }
  .layout { padding: 0 20px; }
  .site-header { padding: 0 18px; gap: 12px; }
  .journey-track { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .journey-track::before { display: none; }
  .compare, .glossary { grid-template-columns: 1fr; }
  .header-sep { display: none; }
  .section-head { gap: 12px; }
}

/* ---------- Print / PDF ---------- */
@media print {
  @page { size: A4; margin: 16mm 15mm; }
  html, body { background: #fff !important; color: #14171f !important; font-size: 11.5pt; }
  #progress, .site-header, .toc, .toc-toggle, .header-actions, .to-top, .copy-btn, .toc-toggle { display: none !important; }
  .hero { background: #fff !important; border: none; padding: 0 0 18pt; page-break-after: always; }
  .hero h1 { font-size: 34pt; }
  .hero h1 .grad, .wordmark { color: #1b4ecb !important; -webkit-text-fill-color: #1b4ecb; }
  .journey { box-shadow: none; border: 1px solid #d8dee8; }
  .layout { display: block; max-width: none; padding: 0; }
  .content { max-width: none; padding: 0; }
  .section { break-inside: avoid; page-break-inside: avoid; padding: 14pt 0; scroll-margin: 0; }
  .section + .section { border-top: 1px solid #e2e7ef; }
  .section h2 { color: #1b4ecb !important; }
  thead th { background: #1b4ecb !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .callout, .table-wrap, .prompt, .mini, .compare .c, .glossary, .gloss { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-footer { background: #fff !important; border-top: 1px solid #e2e7ef; }
  a { color: inherit; }
}


/* ============================================================
   Field-guides extensions — hub cards, track toggle, pager,
   kbd, "worth knowing", checklists
   ============================================================ */

/* ---------- kbd ---------- */
kbd {
  font-family: var(--font-mono); font-size: 13px; padding: 2px 7px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; color: var(--text); white-space: nowrap;
}

/* ---------- inline code ---------- */
code.inline {
  font-family: var(--font-mono); font-size: 14px; padding: 1.5px 6px; border-radius: 6px;
  background: var(--code-bg); border: 1px solid var(--border); color: var(--text);
}

/* ---------- track toggle (I don't code / I code) ---------- */
.track-toggle {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm);
}
.track-toggle button {
  border: none; background: none; cursor: pointer; border-radius: 9px; white-space: nowrap;
  padding: 9px 18px; font-family: var(--font-body); font-weight: 700; font-size: 14.5px;
  color: var(--text-soft); transition: all .18s ease;
}
.track-toggle button.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--accent-a) 60%, transparent); }
.track-note { font-size: 13.5px; color: var(--text-faint); margin-top: 10px; }

/* track visibility: body carries data-track="dev" | "nondev" */
body[data-track="dev"] [data-track="nondev"] { display: none !important; }
body[data-track="nondev"] [data-track="dev"] { display: none !important; }

/* ---------- "worth knowing" callout (coral, co-brand) ---------- */
.callout.know { background: var(--rule-bg); border-color: color-mix(in srgb, var(--rule-edge) 32%, transparent); }
.callout.know .ic { background: var(--rule-edge); }
.callout.know .ct b { color: var(--rule-edge); }

/* ---------- checklist ---------- */
.section ul.check li::before {
  content: ""; background: var(--accent-b); border-radius: 50%;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>') center/100% no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>') center/100% no-repeat;
  width: 13px; height: 13px; top: .42em;
}

/* ---------- guide pager (prev / next in series) ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0 0; }
.pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-sm); transition: all .18s ease; color: var(--text);
}
.pager a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.pager a .pk { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.pager a .pt { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; color: var(--heading); }
.pager a.next { text-align: right; align-items: flex-end; }
.pager a.hub-link { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: center; gap: 10px; }
.pager a.hub-link .pt { font-size: 15px; }

/* ============================================================
   Hub page
   ============================================================ */
.hub-hero { padding-bottom: 56px; }
.hub-hero .lede { max-width: 56ch; }

/* level router */
.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 46px; }
.route {
  display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-sm); color: var(--text); transition: all .18s ease; position: relative;
}
.route:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.route .rn { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.route h3 { font-size: 19px; color: var(--heading); font-weight: 700; }
.route p { margin: 0; font-size: 14.5px; color: var(--text-soft); line-height: 1.5; flex: 1; }
.route .ra { font-size: 14px; font-weight: 700; color: var(--accent-a); display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }

/* guide groups */
.hub-main { max-width: 1180px; margin: 0 auto; padding: 26px 28px 90px; }
.ggroup { margin-top: 44px; }
.ggroup-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.ggroup-head h2 { font-size: 24px; letter-spacing: -.015em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.ggroup-head .gc { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.ggroup > p { color: var(--text-soft); font-size: 15.5px; max-width: 70ch; margin: 0 0 20px; }
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.gcard {
  display: flex; flex-direction: column; gap: 9px; padding: 22px 22px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-sm); color: var(--text); transition: all .18s ease; position: relative;
}
a.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.gcard .gtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gcard .gnum {
  font-family: var(--font-display); font-weight: 800; font-size: 13.5px;
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent-a) 12%, transparent); color: var(--heading);
}
.gcard h3 { font-size: 18.5px; font-weight: 700; color: var(--heading); letter-spacing: -.01em; }
.gcard p { margin: 0; font-size: 14.5px; color: var(--text-soft); line-height: 1.55; flex: 1; }
.gcard .gmeta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--text-faint); font-weight: 600; }
.gcard .gmeta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.tag.ready { background: color-mix(in srgb, var(--accent-b) 16%, transparent); color: var(--accent-b); }
.tag.soon { background: var(--surface-3); color: var(--text-faint); }
.tag.new { background: var(--coral-soft); color: var(--coral); }
.gcard.soon { opacity: .72; }
.gcard.soon:hover { transform: none; box-shadow: var(--shadow-sm); }

/* promise strip */
.promise { margin-top: 54px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); display: grid; grid-template-columns: repeat(3, 1fr); background: var(--border); gap: 1px; }
.promise .pcell { background: var(--surface); padding: 20px 22px; }
.promise .pcell b { display: block; font-family: var(--font-display); font-size: 15px; color: var(--heading); margin-bottom: 4px; }
.promise .pcell p { margin: 0; font-size: 14px; color: var(--text-soft); line-height: 1.5; }

@media (max-width: 940px) {
  .routes, .promise { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .pager { grid-template-columns: 1fr; }
  .pager a.next { text-align: left; align-items: flex-start; }
}
@media print {
  .track-toggle, .pager { display: none !important; }
}


/* ---------- SAilsy quasar emblem (contrast-flipping: dark icon on light theme, bright on dark) ---------- */
.brand .brand-emblem { width: 30px; height: 30px; border-radius: 9px; overflow: hidden; flex: none; box-shadow: 0 2px 8px rgba(20, 60, 140, .28); }
.brand-emblem img { width: 100%; height: 100%; display: block; }
.brand-emblem .em-light { display: none; }
html[data-theme="dark"] .brand-emblem .em-light { display: block; }
html[data-theme="dark"] .brand-emblem .em-dark { display: none; }


/* ---------- back-to-hub affordances ---------- */
a.brand { text-decoration: none; }
.hub-top {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px;
  border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-soft); font-family: var(--font-body); font-size: 14px; font-weight: 600;
  transition: all .18s ease;
}
.hub-top:hover { color: var(--text); border-color: var(--accent-a); }
.hub-top svg { width: 15px; height: 15px; }
@media (max-width: 700px) { .hub-top span { display: none; } .hub-top { width: 38px; padding: 0; justify-content: center; } }

/* ---------- SAilsy deploy safety net: on the narrowest phones, wide tables
   scroll sideways inside their rounded frame instead of clipping. Invisible
   unless a table genuinely cannot fit. ---------- */
@media (max-width: 620px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
