/* ==========================================================================
   NepDate Documentation Site
   Theme: light / dark / system, manual segmented toggle
   Foundation: design tokens (Phase 1 rewrite)
   ========================================================================== */

/* -------- Self-hosted variable fonts (latin subset) --------
   Single woff2 per family covers every weight via the wght axis.
   Files served from same origin -> no CDN, no FOIT, GDPR-safe. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/Inter-Variable.woff2') format('woff2-variations'),
       url('../assets/fonts/Inter-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/JetBrainsMono-Variable.woff2') format('woff2-variations'),
       url('../assets/fonts/JetBrainsMono-Variable.woff2') format('woff2');
}

/* -------- Reset & Base -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--accent-hover); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; line-height: 1.18; font-weight: 600; letter-spacing: -.022em; font-feature-settings: 'ss01','cv11','cv03'; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .25em; }

/* -------- Design Tokens (single source of truth) -------- */
:root {
  --bg:            #ffffff;
  --bg-alt:        #f6f7f9;
  --bg-elev:       #ffffff;
  --bg-elev-1:     #fbfbfd;
  --bg-elev-2:     #f3f4f7;
  --bg-elev-3:     #ebedf2;
  --bg-code:       #0e1117;
  --bg-glass:      color-mix(in srgb, #ffffff 72%, transparent);

  --text:          #0b0f1a;
  --text-muted:    #4b5466;
  --text-subtle:   #6b7588;

  --border:        #e6e8ee;
  --border-strong: #d3d6df;
  --border-subtle: color-mix(in srgb, #0b0f1a 6%, transparent);

  --accent:        #dc3f10;
  --accent-hover:  #b3300a;
  --accent-soft:   #ffece4;
  --accent-border: #fbb39a;
  --accent-glow:   rgba(220, 63, 16, .35);
  --grad-aurora:   linear-gradient(135deg, #ff7a18 0%, #af002d 100%);

  --success:       #16a34a;
  --danger:        #dc2626;
  --warning:       #d97706;

  --shadow-sm:     0 1px 2px rgba(11,15,26,.06), 0 1px 3px rgba(11,15,26,.06);
  --shadow-md:     0 4px 8px -2px rgba(11,15,26,.07), 0 2px 4px -2px rgba(11,15,26,.06);
  --shadow-lg:     0 16px 32px -12px rgba(11,15,26,.14), 0 4px 12px -4px rgba(11,15,26,.06);
  --shadow-xl:     0 30px 80px -20px rgba(11,15,26,.22), 0 8px 24px -8px rgba(11,15,26,.10);
  --shadow-glow:   0 0 0 1px var(--accent-border), 0 8px 24px -8px var(--accent-glow);

  --radius-xs:     4px;
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     16px;
  --radius-2xl:    24px;
  --radius-pill:   999px;

  --dur-fast:      .15s;
  --dur-med:       .28s;
  --dur-slow:      .55s;
  --ease-out:      cubic-bezier(.22,1,.36,1);
  --ease-in-out:   cubic-bezier(.65,0,.35,1);

  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'Cascadia Code', 'Source Code Pro', Consolas, 'Courier New', monospace;

  --header-h:      64px;
  --sidebar-w:     280px;
  --toc-w:         270px;
  --content-max:   1500px;
}

[data-theme="dark"] {
  --bg:            #0a0e1a;
  --bg-alt:        #0d1322;
  --bg-elev:       #11182a;
  --bg-elev-1:     #131b30;
  --bg-elev-2:     #1a2238;
  --bg-elev-3:     #222b44;
  --bg-code:       #060912;
  --bg-glass:      color-mix(in srgb, #0a0e1a 70%, transparent);

  --text:          #e8ecf4;
  --text-muted:    #9aa3b8;
  --text-subtle:   #6b7388;

  --border:        #1f2740;
  --border-strong: #2a324d;
  --border-subtle: color-mix(in srgb, #e8ecf4 8%, transparent);

  --accent:        #ff8a5b;
  --accent-hover:  #ffa685;
  --accent-soft:   rgba(255, 138, 91, .14);
  --accent-border: rgba(255, 138, 91, .42);
  --accent-glow:   rgba(255, 138, 91, .50);
  --grad-aurora:   linear-gradient(135deg, #ff8a5b 0%, #e0245a 100%);

  --success:       #4ade80;
  --danger:        #f87171;
  --warning:       #fbbf24;

  --shadow-sm:     0 1px 2px rgba(0,0,0,.45);
  --shadow-md:     0 4px 12px -4px rgba(0,0,0,.55);
  --shadow-lg:     0 18px 40px -12px rgba(0,0,0,.65);
  --shadow-xl:     0 36px 100px -24px rgba(0,0,0,.75), 0 12px 32px -8px rgba(0,0,0,.55);
  --shadow-glow:   0 0 0 1px var(--accent-border), 0 12px 36px -8px var(--accent-glow);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'ss01','cv11','cv03','cv05';
  transition: background var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* -------- Header -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.05rem; color: var(--text);
  letter-spacing: -.02em;
}
.brand:hover { color: var(--text); }
.brand .logo-img {
  width: 30px; height: 30px;
  border-radius: 7px;
  object-fit: contain;
  display: block;
  box-shadow: var(--shadow-sm);
  background: var(--bg-elev);
}
.brand .logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #dc2626 100%);
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.nav-main {
  display: flex; align-items: center; gap: 6px;
  margin-left: 16px;
}
.nav-main a {
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  font-size: .94rem;
  transition: all .15s ease;
}
.nav-main a:hover { background: var(--bg-alt); color: var(--text); }
.nav-main a.active { color: var(--accent); background: var(--accent-soft); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all .15s ease;
}
.icon-btn:hover { background: var(--bg-alt); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
.github-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 500;
  font-size: .9rem;
  transition: all .15s ease;
}
.github-btn:hover { background: var(--bg-alt); color: var(--text); border-color: var(--border-strong); }
.hamburger { display: none; }

/* -------- Container & Layout Helpers -------- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}
.section:last-child { border-bottom: none; }
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  transition: all .18s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--accent) 55%, transparent);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-alt); color: var(--text); }
.btn-ghost {
  color: var(--text-muted);
  padding: 8px 14px;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-alt); }

/* -------- Buy me a momo (donation) button -------- */
.btn-momo {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px -4px rgba(225, 29, 72, .45);
  position: relative;
}
.btn-momo:hover { color: #fff; background: linear-gradient(135deg, #be123c 0%, #9f1239 100%); transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(225, 29, 72, .55); }
.btn-momo .momo-ico { display: inline-flex; }
.btn-momo.btn-sm {
  padding: 8px 14px;
  font-size: .85rem;
  border-radius: 8px;
  gap: 6px;
}
.btn-momo.btn-sm .momo-ico svg { width: 14px; height: 14px; }
[data-theme="dark"] .btn-momo {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  box-shadow: 0 6px 16px -4px rgba(244, 63, 94, .35);
}
[data-theme="dark"] .btn-momo:hover {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
}

/* -------- Hero -------- */
.hero {
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 15% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(500px 260px at 85% 20%, color-mix(in srgb, #dc2626 10%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 20px;
}
.hero-badges img { height: 28px; }
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 18px;
  letter-spacing: -.025em;
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 28px; margin-top: 36px;
  flex-wrap: wrap;
}
.hero-stat .n {
  font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--text);
  display: block;
}
.hero-stat .l {
  font-size: .82rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
}

/* Terminal demo */
.terminal {
  background: var(--bg-code);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
}
.terminal-bar {
  display: flex; align-items: center;
  padding: 12px 14px;
  background: #0a0c14;
  border-bottom: 1px solid rgba(255,255,255,.06);
  gap: 8px;
}
.terminal-bar .dots { display: flex; gap: 6px; }
.terminal-bar .dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-bar .dot.r { background: #ff5f56; }
.terminal-bar .dot.y { background: #ffbd2e; }
.terminal-bar .dot.g { background: #27c93f; }
.terminal-bar .title {
  margin: 0 auto; color: #9ca3af; font-size: .78rem; font-family: var(--font-mono);
  padding-right: 44px;
}
.terminal-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 1.7;
  color: #e5e7eb;
  min-height: 270px;
}
.terminal-body .line { white-space: pre; }
.cursor {
  display: inline-block;
  width: 8px; height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s steps(2) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* -------- Feature Grid -------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: all .22s ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* -------- Install tabs -------- */
.install-tabs {
  max-width: 720px;
  margin: 0 auto;
}
.tabs {
  display: flex; gap: 4px;
  background: var(--bg-alt);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  width: fit-content;
  margin: 0 auto 16px;
}
.tab {
  padding: 8px 18px;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .15s ease;
}
.tab.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* -------- Benchmark / API tables -------- */
.benchmark-wrap, .compare-wrap, .api-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}
.api-table-wrap { margin: 14px 0 22px; }
.api-table th, .api-table td { font-size: .95rem; }
.api-table td code { font-size: .88em; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}
.data-table th, .data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text-muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-alt); }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: .88rem; }
.data-table tr.highlight td { background: var(--accent-soft); font-weight: 600; }
.data-table tr.highlight td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table th:not(:first-child), .compare-table td:not(:first-child) { text-align: center; }
.compare-table .col-highlight { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.check { color: var(--success); font-weight: 700; }
.cross { color: var(--danger); font-weight: 700; }
.partial { color: #ca8a04; font-weight: 700; }

/* -------- Benchmark headline + cards + bars -------- */
.bench-headline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 28px;
}
.bench-kpi {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.bench-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: .9;
}
.bench-kpi-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 600;
}
.bench-kpi-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  line-height: 1.1;
  margin: 6px 0 4px;
  color: var(--text);
  font-weight: 700;
}
.bench-kpi-value span { font-size: .9rem; color: var(--text-muted); font-weight: 500; margin-left: 2px; }
.bench-kpi-sub { font-size: .85rem; color: var(--text-muted); }
.bench-kpi-sub strong { color: var(--accent); font-weight: 700; }

.bench-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.bench-card { display: flex; flex-direction: column; }
.bench-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 2px 10px;
}
.bench-card-head h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: .01em;
}
.bench-card-tag {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-left: 8px;
}

.bench-table th, .bench-table td { padding: 12px 14px; }
.bench-table .bench-col-bar { width: 46%; }
.bench-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bench-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-width: 60px;
}
.bench-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong, var(--accent)));
  border-radius: 999px;
  min-width: 2px;
}
.data-table tr.highlight .bench-bar span {
  background: linear-gradient(90deg, var(--accent), var(--accent));
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.bench-num {
  font-family: var(--font-mono);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
  min-width: 78px;
  text-align: right;
}

.bench-caption {
  margin: 18px 2px 0;
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .bench-headline { grid-template-columns: 1fr; }
  .bench-grid { grid-template-columns: 1fr; }
}

/* -------- FAQ Accordion -------- */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--bg-elev);
  overflow: hidden;
  transition: border-color .15s ease;
}
.faq-item.open { border-color: var(--accent-border); }
.faq-q {
  width: 100%;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
.faq-q::after {
  content: "";
  margin-left: auto;
  width: 10px; height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq-item.open .faq-q::after { transform: rotate(-135deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  color: var(--text-muted);
}
.faq-a-inner { padding: 0 22px 20px; }
.faq-item.open .faq-a { max-height: 500px; }

/* -------- Contributors / Sponsor -------- */
.contributors {
  text-align: center;
}
.contributors img {
  margin: 24px auto;
  max-width: 600px;
  border-radius: 10px;
}
.sponsor-card {
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.sponsor-card h3 { margin-bottom: 8px; font-size: 1.4rem; }
.sponsor-card p { color: var(--text-muted); margin-bottom: 20px; }

/* -------- Code blocks -------- */
pre {
  background: var(--bg-code);
  color: #e5e7eb;
  padding: 18px 22px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 1.6;
  margin: 0 0 18px;
  border: 1px solid rgba(255,255,255,.06);
  position: relative;
}
pre code { font-family: inherit; background: none; padding: 0; font-size: inherit; color: inherit; border: 0; border-radius: 0; }
pre code, pre code * { text-decoration: none !important; }
code {
  font-family: var(--font-mono);
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .88em;
  color: var(--text);
  border: 1px solid var(--border);
}
[data-theme="dark"] code { border-color: #2a3449; }

.copy-btn {
  position: absolute; top: 10px; right: 10px;
  padding: 6px 10px;
  font-size: .75rem;
  color: #9ca3af;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease, background .15s ease;
  font-family: var(--font-sans);
  font-weight: 500;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: #fff; background: rgba(255,255,255,.12); }
.copy-btn.copied { color: #4ade80; border-color: rgba(74,222,128,.4); }

/* -------- Syntax highlight tokens -------- */
.tok-kw      { color: #ff7b72; }   /* keywords (GitHub Dark style) */
.tok-type    { color: #79c0ff; }   /* types */
.tok-str     { color: #a5d6ff; }   /* strings */
.tok-cmt     { color: #8b949e; font-style: italic; }
.tok-num     { color: #ffa657; }
.tok-fn      { color: #d2a8ff; }
.tok-op      { color: #e5e7eb; }
.tok-cmd     { color: #7ee787; }

/* -------- Docs layout -------- */
.docs-layout {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 32px;
  align-items: start;
}
.docs-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  padding: 16px 8px 40px 0;
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 6px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.search-wrap {
  position: relative;
  margin-bottom: 16px;
}
.search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  transition: all .15s ease;
}
.search-wrap input:focus { border-color: var(--accent); background: var(--bg-elev); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-wrap svg {
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-subtle);
  pointer-events: none;
}
.search-wrap kbd, .search-wrap .kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: .72rem; color: var(--text-subtle);
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elev);
  font-family: var(--font-mono);
  pointer-events: none;
}

.toc-group { margin-bottom: 6px; }
.toc-group > .toc-group-head {
  display: flex; align-items: center; width: 100%;
  padding: 8px 12px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-subtle);
  border-radius: 6px;
}
.toc-group > .toc-group-head:hover { color: var(--text); }
.toc-group > .toc-group-head::after {
  content: "";
  margin-left: auto;
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.toc-group.collapsed > .toc-group-head::after { transform: rotate(-45deg); }
.toc-group.collapsed > ul { display: none; }
.toc-group ul { list-style: none; padding: 0 0 0 4px; margin: 2px 0 8px; }
.toc-group li a {
  display: block;
  padding: 6px 12px;
  font-size: .88rem;
  color: var(--text-muted);
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all .12s ease;
}
.toc-group li a:hover { color: var(--text); background: var(--bg-alt); }
.toc-group li a.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 600;
}
.toc-group li.hidden { display: none; }
.search-empty { padding: 14px 12px; color: var(--text-subtle); font-size: .88rem; display: none; }
.search-empty.show { display: block; }

.docs-content {
  min-width: 0;
  padding: 24px 0 80px;
}
.docs-content h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}
.docs-content .docs-lede {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.docs-content h2 {
  font-size: 1.6rem;
  margin-top: 64px;
  margin-bottom: 14px;
  padding-top: 12px;
  scroll-margin-top: calc(var(--header-h) + 16px);
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.docs-content h2:first-of-type { border-top: none; padding-top: 12px; margin-top: 0; }
.docs-content h3 {
  font-size: 1.2rem;
  margin-top: 40px;
  margin-bottom: 12px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.docs-content h4 {
  font-size: 1rem;
  margin-top: 24px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .82rem;
  font-weight: 700;
}
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
  font-size: .92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
}
.docs-content th {
  background: var(--bg-alt);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.docs-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.docs-content tr:last-child td { border-bottom: none; }
.docs-content td code { font-size: .82em; }

.docs-toc {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  padding: 28px 0 40px 8px;
  font-size: .85rem;
  border-left: 1px solid var(--border);
  padding-left: 16px;
  scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.hero-badge{
    border-radius: 10px;
}

.docs-toc .toc-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.docs-toc ul { list-style: none; padding: 0; margin: 0; }
.docs-toc li a {
  display: block;
  padding: 5px 0;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -2px;
  transition: all .12s ease;
}
.docs-toc li a:hover { color: var(--text); }
.docs-toc li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}
.docs-toc li.l3 a { padding-left: 24px; font-size: .82rem; }

/* -------- Changelog page -------- */
.changelog-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 0 80px;
}
.changelog-wrap h1 {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.changelog-wrap .sub {
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 1.05rem;
}
.release {
  position: relative;
  padding-left: 32px;
  margin-bottom: 48px;
}
.release::before {
  content: "";
  position: absolute;
  left: 7px; top: 10px; bottom: -48px;
  width: 2px;
  background: var(--border);
}
.release:last-child::before { display: none; }
.release::after {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}
.release.latest::after {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.release-head {
  display: flex; align-items: baseline; gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.release-head h2 { font-size: 1.4rem; margin: 0; }
.release-head .tag {
  display: inline-block;
  font-size: .72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.release-head .date {
  color: var(--text-subtle);
  font-size: .9rem;
}
.release-body {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 12px;
}
.release-body h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--accent);
}
.release-body h4:first-child { margin-top: 0; }
.release-body ul { padding-left: 20px; color: var(--text-muted); }
.release-body li { margin-bottom: 4px; }

.release-cta {
  text-align: center;
  padding: 32px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin-top: 40px;
}

/* -------- Footer -------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  background: var(--bg-alt);
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand p { color: var(--text-muted); font-size: .93rem; max-width: 320px; }
.footer-col h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 14px;
  color: var(--text);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: .92rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: .87rem;
  color: var(--text-muted);
}

/* -------- Mobile -------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 90;
}
.overlay.show { opacity: 1; pointer-events: auto; }

@media (max-width: 1100px) {
  :root { --sidebar-w: 240px; --toc-w: 0px; }
  .docs-toc { display: none; }
  .docs-layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 32px; }
  .nav-main, .github-btn, .header-right .btn-momo { display: none; }
  .hamburger {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 8px;
  }
  .hamburger:hover { background: var(--bg-alt); }
  .hamburger span {
    display: block; width: 18px; height: 2px;
    background: var(--text); border-radius: 2px;
    position: relative;
  }
  .hamburger span::before,
  .hamburger span::after {
    content: ""; position: absolute; left: 0;
    width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  }
  .hamburger span::before { top: -6px; }
  .hamburger span::after { top: 6px; }

  .mobile-nav {
    position: fixed; top: 0; right: 0;
    width: 280px; max-width: 80vw;
    height: 100vh;
    background: var(--bg);
    border-left: 1px solid var(--border);
    z-index: 95;
    transform: translateX(100%);
    transition: transform .25s ease;
    padding: 80px 24px 24px;
    display: flex; flex-direction: column; gap: 4px;
  }
  .mobile-nav.show { transform: translateX(0); }
  .mobile-nav a {
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
  }
  .mobile-nav a:hover, .mobile-nav a.active { background: var(--accent-soft); color: var(--accent); }

  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .docs-layout { grid-template-columns: 1fr; gap: 0; padding: 0 16px; }
  .docs-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 300px; max-width: 85vw;
    height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    border-top: none;
    padding: 80px 16px 40px;
    z-index: 95;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .docs-sidebar.show { transform: translateX(0); }
  .docs-menu-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elev);
    margin: 16px 0 24px;
    font-size: .9rem;
    font-weight: 500;
  }
}

@media (min-width: 769px) {
  .mobile-nav, .docs-menu-btn { display: none; }
}

/* Printable / reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Phase 1 additions
   ========================================================================== */

/* -------- Tri-state theme toggle (Light / Dark / System) -------- */
.theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  position: relative;
  isolation: isolate;
  font-size: 0;
  height: 34px;
}
.theme-switch button {
  width: 32px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  position: relative; z-index: 1;
  transition: color var(--dur-fast) var(--ease-out);
}
.theme-switch button svg { width: 15px; height: 15px; }
.theme-switch button[aria-pressed="true"] { color: var(--text); }
.theme-switch::before {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 32px; height: 28px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out);
  z-index: 0;
}
.theme-switch[data-active="light"]::before  { transform: translateX(0); }
.theme-switch[data-active="dark"]::before   { transform: translateX(32px); }
.theme-switch[data-active="system"]::before { transform: translateX(64px); }

/* Hide the legacy single-button toggle if it is still in DOM */
.theme-toggle { display: none !important; }

/* -------- Skip link visibility on focus -------- */
.skip-link:focus {
  background: var(--accent);
  color: #fff;
  outline: 2px solid var(--accent-glow);
  outline-offset: 2px;
}

/* -------- Reduced motion guard --------
   Honors user OS preference. Animations and parallax are disabled
   while keeping focus-visible transitions usable. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}


/* =====================================================================
   Phase 2: Visual identity
   Sticky header polish, native chips, screenshot chrome,
   stroke-dash icon hover, bento feature grid.
   ===================================================================== */

/* Sticky header gains depth on scroll. */
.site-header {
  transition:
    background var(--dur-med) var(--ease-out),
    border-color var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom-color: var(--border-strong);
  box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .35);
}
[data-theme="dark"] .site-header.is-scrolled {
  box-shadow: 0 10px 28px -16px rgba(0, 0, 0, .8);
}

/* ----- Native chips (replaces shields.io badges) ----- */
.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 22px;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 12px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: .8rem; font-weight: 600;
  color: var(--text);
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.chip svg { width: 13px; height: 13px; flex: none; }
.chip .chip-k { color: var(--text-muted); font-weight: 500; }
.chip .chip-v { color: var(--text); font-weight: 700; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
a.chip:hover { border-color: var(--accent-border); color: var(--accent); }
.chip-accent {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}
.chip-accent .chip-k, .chip-accent .chip-v { color: inherit; }
.chip-success {
  border-color: color-mix(in srgb, var(--success) 35%, var(--border));
  background: color-mix(in srgb, var(--success) 10%, var(--bg-elev-1));
  color: var(--success);
}
.chip-success .chip-k, .chip-success .chip-v { color: inherit; }

/* Hide the legacy shields.io badge wall if any page still emits it. */
.hero-badges { display: none; }

/* ----- Screenshot window chrome ----- */
/* Adds a 26px titlebar with traffic-light dots above every .shot. */
.shot {
  position: relative;
  padding-top: 26px;
}
.shot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 26px;
  background:
    radial-gradient(circle at 14px 13px, #ff5f56 0 5px, transparent 5.5px),
    radial-gradient(circle at 32px 13px, #ffbd2e 0 5px, transparent 5.5px),
    radial-gradient(circle at 50px 13px, #27c93f 0 5px, transparent 5.5px),
    linear-gradient(180deg, var(--bg-alt), color-mix(in srgb, var(--bg-alt) 82%, var(--border)));
  border-bottom: 1px solid var(--border);
  pointer-events: none;
  z-index: 1;
}
[data-theme="dark"] .shot::before {
  background:
    radial-gradient(circle at 14px 13px, #ff5f56 0 5px, transparent 5.5px),
    radial-gradient(circle at 32px 13px, #ffbd2e 0 5px, transparent 5.5px),
    radial-gradient(circle at 50px 13px, #27c93f 0 5px, transparent 5.5px),
    linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev-1));
}

/* ----- Animated stroke-dash on feature icons (hover only) ----- */
@media (prefers-reduced-motion: no-preference) {
  .feature-icon svg {
    overflow: visible;
  }
  .feature-icon svg path,
  .feature-icon svg rect,
  .feature-icon svg circle,
  .feature-icon svg line,
  .feature-icon svg polyline,
  .feature-icon svg polygon {
    stroke-dasharray: 240;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset var(--dur-slow) var(--ease-out);
  }
  .feature:hover .feature-icon svg path,
  .feature:hover .feature-icon svg rect,
  .feature:hover .feature-icon svg circle,
  .feature:hover .feature-icon svg line,
  .feature:hover .feature-icon svg polyline,
  .feature:hover .feature-icon svg polygon {
    animation: nd-draw .85s var(--ease-out);
  }
}
@keyframes nd-draw {
  0%   { stroke-dashoffset: 240; }
  100% { stroke-dashoffset: 0; }
}

/* ----- Bento feature grid: hero card spans two columns ----- */
.features {
  grid-auto-flow: dense;
}
.features .feature:first-child {
  grid-column: span 2;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent-soft) 100%, transparent) 0%,
      var(--bg-elev-1) 60%);
  border-color: var(--accent-border);
}
.features .feature:first-child .feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px -8px var(--accent-glow);
}
.features .feature:first-child .feature-icon svg { width: 28px; height: 28px; }
.features .feature:first-child h3 { font-size: 1.3rem; }
.features .feature:first-child p  { font-size: 1rem; max-width: 62ch; }

@media (max-width: 900px) {
  .features .feature:first-child { grid-column: span 1; }
  .features .feature:first-child .feature-icon { width: 48px; height: 48px; }
  .features .feature:first-child .feature-icon svg { width: 24px; height: 24px; }
}


/* =====================================================================
   Phase 2 second pass
   - Drop traffic-light shot chrome, switch to a clean elevated card.
   - Brand mark: inline SVG, perfectly transparent, theme-aware ring.
   - Cleaner two-state theme toggle.
   - Sponsor card icon halo.
   - Hero collage clickable affordance.
   - Lightbox close button colour fix on dark.
   ===================================================================== */

/* ----- Reset Phase 2 frame to a clean card ----- */
.shot {
  position: relative;
  padding-top: 0;                   /* undo titlebar slot */
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 1px 0 0 color-mix(in srgb, var(--text) 4%, transparent) inset,
    0 8px 24px -14px rgba(0, 0, 0, .25);
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out),
    border-color var(--dur-med) var(--ease-out);
}
[data-theme="dark"] .shot {
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, .04) inset,
    0 12px 32px -16px rgba(0, 0, 0, .8);
}
.shot::before { content: none; }    /* kill the traffic lights */
.shot:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, .05) inset,
    0 18px 38px -16px var(--accent-glow);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Clickable shots get a subtle expand affordance. */
.shot[data-lightbox] { cursor: zoom-in; }
.shot[data-lightbox]::after {
  content: "";
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 999px;
  background:
    color-mix(in srgb, var(--bg) 70%, transparent)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 3h6v6'/><path d='M9 21H3v-6'/><path d='M21 3l-7 7'/><path d='M3 21l7-7'/></svg>")
    center / 16px no-repeat;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  pointer-events: none;
}
[data-theme="dark"] .shot[data-lightbox]::after {
  background:
    color-mix(in srgb, var(--bg) 60%, transparent)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 3h6v6'/><path d='M9 21H3v-6'/><path d='M21 3l-7 7'/><path d='M3 21l7-7'/></svg>")
    center / 16px no-repeat;
}
.shot[data-lightbox]:hover::after,
.shot[data-lightbox]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Brand mark: inline SVG ----- */
.brand .logo-mark-svg {
  width: 30px; height: 30px;
  display: block;
  flex: none;
  filter: drop-shadow(0 2px 4px rgba(220, 63, 16, .25));
}
[data-theme="dark"] .brand .logo-mark-svg {
  filter: drop-shadow(0 2px 6px rgba(255, 122, 89, .35));
}
.footer-brand .brand .logo-mark-svg { width: 30px; height: 30px; }

/* ----- Sponsor card icon ----- */
.sponsor-card .sponsor-ico {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #ff5722));
  color: #fff;
  box-shadow: 0 14px 32px -10px var(--accent-glow);
}
.sponsor-card .sponsor-ico svg { width: 28px; height: 28px; }

/* ----- Hero collage clickable affordance ----- */
.hc-item[data-lightbox] { cursor: zoom-in; }

/* ----- Lightbox close button readable on light backgrounds ----- */
.lightbox .lb-close,
.lightbox .lb-nav {
  color: #fff;
}

/* ----- Theme switch: collapse to two cells (Light / Dark) ----- */
.theme-switch {
  width: auto;
}
.theme-switch button { width: 32px; }
.theme-switch::before { width: 32px; }
.theme-switch[data-active="light"]::before { transform: translateX(0); }
.theme-switch[data-active="dark"]::before  { transform: translateX(32px); }
/* Fallback for any stale system markup left over: hide that button. */
.theme-switch button[data-theme-value="system"] { display: none; }


/* =====================================================================
   Phase 2 third pass: revert SVG mark, polish PNG brand, sponsor btn-lg
   ===================================================================== */

/* The brand image is a transparent circular PNG — kill the rounded
   square clip, the backing tile, and the box shadow. */
.brand .logo-img {
  width: 32px;
  height: 32px;
  border-radius: 0;
  object-fit: contain;
  display: block;
  box-shadow: none;
  background: transparent;
  filter: drop-shadow(0 2px 4px rgba(220, 63, 16, .25));
  transition: transform var(--dur-med) var(--ease-out), filter var(--dur-med) var(--ease-out);
}
[data-theme="dark"] .brand .logo-img {
  filter: drop-shadow(0 2px 6px rgba(255, 122, 89, .35));
}
.brand:hover .logo-img {
  transform: rotate(-6deg) scale(1.04);
}

/* Drop the now-unused inline mark class (kept just in case markup lingers). */
.brand .logo-mark-svg { display: none; }

/* Big sponsor-card momo button. */
.btn-momo.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.005em;
  border-radius: var(--radius-pill);
}
.btn-momo.btn-lg .momo-ico { display: inline-flex; }
.btn-momo.btn-lg .momo-ico svg { width: 18px; height: 18px; }

/* Sponsor card centre-align the button so it doesn't cling to the left edge. */
.sponsor-card .btn-momo { margin: 0 auto; }



/* ----- Phase 2 pass 4: cross-link logo variant ----- */
.crosslink-card .ic-logo {
  background: transparent;
  box-shadow: none;
}
.crosslink-card .ic-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(220, 63, 16, .25));
}
[data-theme="dark"] .crosslink-card .ic-logo img {
  filter: drop-shadow(0 4px 12px rgba(255, 122, 89, .35));
}
