/* ─────────────────────────────────────────────────────────────────────────
   Perivitta Rajendran — Custom design system
   Purple/Violet accent · Newsreader + Hanken Grotesk + Space Mono
   Prefixed w- to avoid Bootstrap 4 class conflicts
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --w-bg:            #fcfbf8;
  --w-surface:       #ffffff;
  --w-surface-2:     #f4f1ea;
  --w-fg:            #1a1a1a;
  --w-fg-soft:       #2c2a26;
  --w-muted:         #6c6960;
  --w-dim:           #95918a;
  --w-border:        #e7e2d8;
  --w-border-strong: #d4ccbb;
  --w-accent:        #7c3aed;
  --w-accent-soft:   rgba(124,58,237,0.10);
  --w-serif:         "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --w-sans:          "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --w-mono:          "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --w-shadow-sm:     0 1px 2px rgba(28,24,16,.05);
  --w-shadow:        0 6px 22px -8px rgba(28,24,16,.12), 0 2px 6px -2px rgba(28,24,16,.06);
  --w-shadow-lg:     0 22px 60px -18px rgba(28,24,16,.28), 0 6px 16px -4px rgba(28,24,16,.10);
  --w-hero-home:
    radial-gradient(ellipse 80% 60% at 50% 28%, oklch(0.42 0.18 295) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 78% 80%, oklch(0.35 0.14 280) 0%, transparent 55%),
    linear-gradient(165deg, oklch(0.22 0.10 290) 0%, oklch(0.14 0.06 280) 60%, oklch(0.10 0.03 270) 100%);
  --w-hero-posts:
    radial-gradient(ellipse at 30% 30%, oklch(0.30 0.15 285) 0%, oklch(0.18 0.08 280) 60%, oklch(0.12 0.04 270) 100%);
  --w-hero-contact:
    radial-gradient(ellipse at 50% 30%, oklch(0.32 0.16 300) 0%, oklch(0.20 0.09 290) 60%, oklch(0.12 0.04 280) 100%);
  --w-hero-post:
    radial-gradient(ellipse at 60% 30%, oklch(0.32 0.16 280) 0%, oklch(0.18 0.10 270) 60%, oklch(0.10 0.05 260) 100%);
}

html[data-mode="dark"] {
  --w-bg:            #131311;
  --w-surface:       #1a1a17;
  --w-surface-2:     #22221e;
  --w-fg:            #f2efe7;
  --w-fg-soft:       #e0dccf;
  --w-muted:         #a09b8d;
  --w-dim:           #6e6a5e;
  --w-border:        #2a2924;
  --w-border-strong: #3a3830;
  --w-accent:        #a78bfa;
  --w-accent-soft:   rgba(167,139,250,0.12);
  --w-shadow-sm:     0 1px 2px rgba(0,0,0,.4);
  --w-shadow:        0 8px 28px -8px rgba(0,0,0,.55), 0 2px 6px -2px rgba(0,0,0,.35);
  --w-shadow-lg:     0 28px 70px -18px rgba(0,0,0,.7), 0 6px 16px -4px rgba(0,0,0,.4);
}

/* ── base resets (covers pages that don't load Bootstrap) ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; background: transparent; border: 0; outline: 0; }

/* ── base ── */
body {
  background: var(--w-bg);
  color: var(--w-fg);
  font-family: var(--w-sans);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s ease, color .25s ease;
}

/* hide old Bootstrap navbar and masthead */
#mainNav { display: none !important; }
.masthead { display: none !important; }

/* ── dark mode icon swap ── */
.w-icon-moon { display: block; }
.w-icon-sun  { display: none; }
html[data-mode="dark"] .w-icon-moon { display: none; }
html[data-mode="dark"] .w-icon-sun  { display: block; }

/* ── global touch optimizations ── */
a, button, [role="button"], input, textarea, select,
.w-nav-link, .w-nav-toggle, .w-nav-mode,
.w-chip, .w-btn, .w-see-more, .w-card,
.share-fab, .share-item-btn,
.cbot-fab, .cbot-send, .cbot-suggest, .cbot-close,
.ra-play, .ra-icn, .ra-speed {
  touch-action: manipulation;          /* remove 300ms tap delay on Android */
  -webkit-tap-highlight-color: transparent;  /* no blue flash on tap */
}
/* visible tap feedback for primary actions */
.share-item-btn:active { transform: scale(.94) !important; }
.cbot-fab:active        { transform: scale(.96) !important; }
.w-btn:active           { transform: scale(.97) !important; }
.ra-play:active         { transform: scale(.92) !important; }
.w-nav-toggle:active    { opacity: .7; }

/* ── nav ── */
.w-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, padding .3s ease, border-color .3s ease, box-shadow .3s ease, color .3s ease;
  color: #fff;
}
.w-nav.is-solid {
  background: color-mix(in oklab, var(--w-bg) 92%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--w-border);
  padding: 12px 32px;
  color: var(--w-fg);
  box-shadow: var(--w-shadow-sm);
}
.w-nav-brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--w-serif); font-weight: 600; font-size: 19px;
  text-decoration: none; color: inherit;
}
/* logo images — white on transparent nav, swap on scroll/dark */
.w-nav-logo-light { display: block; width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.w-nav-logo-dark  { display: none;  width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.w-nav.is-solid .w-nav-logo-light { display: none; }
.w-nav.is-solid .w-nav-logo-dark  { display: block; }
html[data-mode="dark"] .w-nav.is-solid .w-nav-logo-light { display: block; }
html[data-mode="dark"] .w-nav.is-solid .w-nav-logo-dark  { display: none; }
.w-nav-brand-name { display: block; line-height: 1; }
.w-nav-brand-sub {
  display: block; font-family: var(--w-sans);
  font-size: 11px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; opacity: .7; margin-top: 4px;
}
.w-nav-links { display: flex; align-items: center; gap: 4px; }
.w-nav-link {
  position: relative;
  font-family: var(--w-sans); font-size: 13.5px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
  text-decoration: none; color: inherit; opacity: .82;
  transition: opacity .15s ease, background .15s ease;
}
.w-nav-link:hover { opacity: 1; background: color-mix(in oklab, currentColor 8%, transparent); color: inherit; }
.w-nav-link.is-active { opacity: 1; }
.w-nav-link.is-active::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 1.5px; background: currentColor; opacity: .7;
}
/* theme toggle — always 44×44 for touch compliance */
.w-nav-mode {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 35%, #ea580c 65%, #c4421b 100%);
  border: 0; cursor: pointer;
  color: #fff; opacity: .92; margin-left: 4px;
  box-shadow: 0 4px 12px -2px rgba(196,66,27,.45);
  transition: opacity .15s ease, transform .25s ease, box-shadow .15s ease;
}
.w-nav-mode:hover { opacity: 1; transform: rotate(20deg); box-shadow: 0 6px 16px -2px rgba(196,66,27,.6); }

/* ── mobile-only controls row (theme toggle + hamburger) ── */
.w-nav-mobile-controls {
  display: none;   /* hidden on desktop */
  align-items: center; gap: 2px;
}
/* desktop: show the theme toggle inside .w-nav-links */
.w-nav-mode-desktop { display: grid; }

/* ── hamburger button ── */
.w-nav-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: 8px;
  align-items: center; justify-content: center;
  color: inherit; opacity: .85; border: 0; cursor: pointer;
  transition: opacity .15s ease, background .15s ease;
}
.w-nav-toggle:hover { opacity: 1; background: color-mix(in oklab, currentColor 10%, transparent); }
.w-toggle-bars { display: block; }
.w-toggle-x    { display: none; }

/* ── mobile nav ── */
@media (max-width: 720px) {
  /* Always solid on mobile — transparent white text is unreadable on light pages */
  .w-nav {
    padding: 12px 16px;
    background: color-mix(in oklab, var(--w-bg) 92%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom-color: var(--w-border);
    color: var(--w-fg);
    box-shadow: var(--w-shadow-sm);
  }
  /* Use the theme-appropriate logo from the start (no transparent-nav white logo) */
  .w-nav .w-nav-logo-light { display: none; }
  .w-nav .w-nav-logo-dark  { display: block; }
  html[data-mode="dark"] .w-nav .w-nav-logo-light { display: block; }
  html[data-mode="dark"] .w-nav .w-nav-logo-dark  { display: none; }

  .w-nav.is-solid { padding: 10px 16px; }
  .w-nav-brand-sub { display: none; }
  .w-nav-brand { font-size: 17px; gap: 10px; }

  /* show mobile controls, hide desktop theme toggle */
  .w-nav-mobile-controls { display: flex; }
  .w-nav-mode-desktop { display: none; }
  .w-nav-toggle { display: flex; }

  /* nav links become a full-width drawer that slides down */
  .w-nav-links {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 68px 0 20px;      /* top = nav bar height */
    background: color-mix(in oklab, var(--w-bg) 97%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--w-border);
    box-shadow: 0 12px 32px -8px rgba(0,0,0,.18);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 99;  /* sits behind the nav bar (z-index: 100) */
    transform: translateY(-105%);
    opacity: 0; pointer-events: none;
    transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  }
  .w-nav.is-open .w-nav-links {
    transform: translateY(0);
    opacity: 1; pointer-events: auto;
  }

  .w-nav-link {
    padding: 16px 22px; font-size: 15px; border-radius: 0; opacity: 1;
    letter-spacing: .05em; border-bottom: 1px solid var(--w-border);
  }
  .w-nav-link:last-of-type { border-bottom: 0; }
  .w-nav-link.is-active::after { display: none; }

  /* hamburger ↔ close icon swap */
  .w-nav.is-open .w-toggle-bars { display: none; }
  .w-nav.is-open .w-toggle-x    { display: block; }

  /* lock body scroll when menu open */
  body.nav-open { overflow: hidden; }
}

/* ── hero ── */
.w-hero {
  position: relative; min-height: 78vh;
  display: grid; place-items: center;
  text-align: center; color: #fff;
  isolation: isolate; overflow: hidden;
}
.w-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: -2; transform: scale(1.06);
  animation: w-kenburns 18s ease-out forwards;
}
@keyframes w-kenburns { to { transform: scale(1); } }
.w-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.52) 100%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0,0,0,.2) 0%, rgba(0,0,0,.15) 100%);
  z-index: -1;
}
.w-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: .25; mix-blend-mode: overlay; pointer-events: none; z-index: -1;
}
.w-hero-inner { padding: 160px 32px 80px; max-width: 880px; margin: 0 auto; }
.w-hero-eyebrow {
  font-family: var(--w-sans); font-size: 12px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; opacity: .82;
  margin-bottom: 22px; display: inline-flex; align-items: center; gap: 10px;
}
.w-hero-eyebrow::before, .w-hero-eyebrow::after {
  content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7;
}
.w-hero-title {
  font-family: var(--w-serif); font-weight: 600;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.04; letter-spacing: -.018em; margin: 0 0 18px;
  text-shadow: 0 2px 30px rgba(0,0,0,.25); color: #fff;
}
.w-hero-title em { font-style: italic; font-weight: 500; color: #c4b5fd; }
.w-hero-sub {
  font-family: var(--w-serif); font-style: italic;
  font-size: clamp(18px, 2.6vw, 24px); font-weight: 400;
  line-height: 1.45; opacity: .9; max-width: 640px; margin: 0 auto;
}
.w-hero-meta {
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 10px 20px; margin-top: 36px;
  font-family: var(--w-sans); font-size: 12.5px;
  letter-spacing: .08em; text-transform: uppercase; opacity: .75;
}
.w-hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.w-hero-meta-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.w-hero-scroll {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-family: var(--w-sans); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; opacity: .7; color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  animation: w-bob 2.4s ease-in-out infinite; z-index: 2;
}
.w-hero-scroll:hover { opacity: 1; color: #fff; }
@keyframes w-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}
.w-hero-slim { min-height: 620px; }
.w-hero-slim .w-hero-inner { padding-top: 120px; padding-bottom: 50px; }
.w-hero-slim .w-hero-title { font-size: clamp(28px, 4.5vw, 56px); }

/* ── containers / sections ── */
.w-container        { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.w-container-narrow { max-width:  760px; margin: 0 auto; padding: 0 24px; }
.w-section       { padding: 90px 0; }
.w-section-tight { padding: 64px 0; }
.w-page-content  { padding: 60px 0; }

.w-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 36px; border-bottom: 1px solid var(--w-border); padding-bottom: 18px;
}
.w-section-h {
  font-family: var(--w-serif); font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15; letter-spacing: -.01em; margin: 0; color: var(--w-fg);
}
.w-section-h em { font-style: italic; color: var(--w-ai-orange); }
.w-section-link {
  font-family: var(--w-sans); font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--w-muted); font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
  transition: color .15s ease;
}
.w-section-link:hover { color: var(--w-accent); }

/* ── post cards ── */
.w-cards {
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
@media (min-width: 720px)  { .w-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .w-cards { grid-template-columns: 1fr 1fr 1fr; gap: 32px; } }

.w-card {
  display: flex; flex-direction: column;
  background: var(--w-surface); border: 1px solid var(--w-border);
  border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .25s ease, border-color .2s ease, box-shadow .25s ease;
}
.w-card:hover { transform: translateY(-3px); border-color: var(--w-border-strong); box-shadow: var(--w-shadow); }

.w-card-thumb {
  aspect-ratio: 16/10; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--w-border); background: var(--w-surface-2);
}
.w-card-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.w-card:hover .w-card-thumb img { transform: scale(1.04); }
.w-card-thumb-art {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, oklch(0.35 0.15 290), oklch(0.20 0.10 270));
}
.w-card-thumb-tag {
  position: absolute; top: 14px; left: 14px;
  background: rgba(0,0,0,.42); color: #fff;
  font-family: var(--w-sans); font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px; backdrop-filter: blur(8px);
}
.w-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.w-card-meta {
  font-family: var(--w-sans); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--w-muted);
  display: flex; gap: 10px; align-items: center; white-space: nowrap;
}
.w-card-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.w-card-title {
  font-family: var(--w-serif); font-weight: 600; font-size: 21px;
  line-height: 1.25; letter-spacing: -.005em; margin: 0;
  color: var(--w-fg); transition: color .15s ease;
}
.w-card:hover .w-card-title { color: var(--w-accent); }
.w-card-excerpt {
  font-family: var(--w-serif); font-style: italic;
  font-size: 15px; line-height: 1.55; color: var(--w-muted); margin: 0;
}
.w-card-foot {
  margin-top: auto; padding-top: 14px;
  font-family: var(--w-sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--w-accent); display: inline-flex; align-items: center; gap: 6px;
}

/* ── archive list ── */
.w-archive { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--w-border); }
.w-archive-item { border-bottom: 1px solid var(--w-border); }
.w-archive-link {
  display: grid; grid-template-columns: 130px 1fr auto;
  gap: 24px; align-items: baseline;
  padding: 22px 4px; text-decoration: none; color: inherit;
  transition: padding .2s ease;
}
.w-archive-link:hover { padding-left: 16px; padding-right: 16px; }
.w-archive-link:hover .w-archive-title { color: var(--w-accent); }
.w-archive-link:hover .w-archive-arrow { color: var(--w-accent); }
.w-archive-date {
  font-family: var(--w-sans); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--w-muted); white-space: nowrap; padding-top: 4px;
}
.w-archive-body { min-width: 0; }
.w-archive-title {
  font-family: var(--w-serif); font-weight: 600; font-size: 19px;
  line-height: 1.3; margin: 0 0 4px; color: var(--w-fg);
  letter-spacing: -.005em; transition: color .15s ease;
}
.w-archive-excerpt {
  font-family: var(--w-sans); font-size: 14px;
  color: var(--w-muted); line-height: 1.5; margin: 0; max-width: 62ch;
}
.w-archive-arrow { color: var(--w-dim); transition: color .15s ease; align-self: center; }
@media (max-width: 720px) {
  .w-archive-link { grid-template-columns: 1fr auto; }
  .w-archive-date { grid-column: 1 / -1; }
}

/* ── archive rich list (home page "From the archive") ── */
.w-archive-rich { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--w-border); }
.w-archive-rich .w-archive-item { border-bottom: 1px solid var(--w-border); }
.w-archive-rich .w-archive-link {
  display: grid;
  grid-template-columns: 110px 132px 1fr auto;
  gap: 24px; align-items: stretch;
  padding: 22px 4px; text-decoration: none; color: inherit;
  transition: padding .2s ease;
}
.w-archive-rich .w-archive-link:hover { padding-left: 18px; padding-right: 18px; }
.w-archive-rich .w-archive-link:hover .w-archive-title { color: var(--w-accent); }
.w-archive-rich .w-archive-link:hover .w-archive-arrow { color: var(--w-accent); transform: translateX(4px); }
.w-archive-rich .w-archive-link:hover .w-archive-thumb { transform: scale(1.02); box-shadow: 0 12px 24px -10px rgba(28,24,16,.25); }
.w-archive-rich .w-archive-date { align-self: center; }
.w-archive-rich .w-archive-body { align-self: center; min-width: 0; }
.w-archive-thumb {
  width: 132px; height: 90px;
  position: relative; border-radius: 10px; overflow: hidden;
  isolation: isolate; align-self: center;
  background: linear-gradient(135deg, oklch(0.35 0.15 290), oklch(0.20 0.10 270));
  transition: transform .25s ease, box-shadow .25s ease;
}
.w-archive-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.w-archive-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,.18) 100%);
}
.w-archive-thumb-tag {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.35); color: #fff;
  font-family: var(--w-sans); font-size: 9.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  backdrop-filter: blur(8px); z-index: 2;
}
.w-archive-meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px;
  font-family: var(--w-sans); font-size: 11.5px; letter-spacing: .04em; color: var(--w-dim);
}
.w-archive-meta-cat { color: var(--w-accent); font-weight: 600; }
@media (max-width: 720px) {
  .w-archive-rich .w-archive-link { grid-template-columns: 96px 1fr auto; gap: 14px; }
  .w-archive-rich .w-archive-link > .w-archive-date { grid-column: 1 / -1; }
  .w-archive-thumb { width: 96px; height: 70px; }
  .w-archive-thumb-tag { font-size: 8.5px; padding: 3px 6px; }
}

/* ── article ── */
.w-article { padding: 70px 0 60px; }
.w-post-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 600px) {
  .w-post-inner { padding: 0 18px; }
  .w-article { padding: 48px 0; }
}

.w-article-crumb {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--w-sans); font-size: 12.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--w-muted); text-decoration: none;
  margin-bottom: 22px; transition: color .15s ease;
}
.w-article-crumb:hover { color: var(--w-accent); }
.w-article-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; margin-top: 60px; padding-top: 28px;
  border-top: 1px solid var(--w-border);
}
.w-article-nav-card {
  padding: 18px 20px; border: 1px solid var(--w-border);
  border-radius: 12px; text-decoration: none;
  background: var(--w-surface); transition: border-color .15s ease, transform .2s ease;
}
.w-article-nav-card:hover { border-color: var(--w-accent); transform: translateY(-2px); }
.w-article-nav-card-r { text-align: right; }
.w-article-nav-lbl {
  font-family: var(--w-sans); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--w-muted); margin-bottom: 8px;
}
.w-article-nav-title {
  font-family: var(--w-serif); font-weight: 600; font-size: 16px;
  line-height: 1.3; color: var(--w-fg); transition: color .15s ease;
}
.w-article-nav-card:hover .w-article-nav-title { color: var(--w-accent); }

.w-article-body {
  font-family: var(--w-serif) !important;
  font-size: var(--w-article-fs, 19px);
  line-height: 1.75;
  color: var(--w-fg-soft);
  margin-top: 28px;
}
.w-article-body p {
  margin: 0 0 1.2em;
  font-family: var(--w-serif);
  font-size: 1em;
  line-height: 1.75;
}
.w-article-body h1 {
  font-family: var(--w-serif); font-weight: 700;
  font-size: 1.9em; line-height: 1.15; letter-spacing: -.02em;
  margin: 0 0 .8em; color: var(--w-fg);
}
.w-article-body h2 {
  font-family: var(--w-serif); font-weight: 600;
  font-size: 1.47em; line-height: 1.25; letter-spacing: -.01em;
  margin: 1.8em 0 .6em; color: var(--w-fg);
  border: none; padding: 0;
}
.w-article-body h3 {
  font-family: var(--w-serif); font-weight: 600;
  font-size: 1.16em; line-height: 1.3; letter-spacing: -.01em;
  margin: 1.5em 0 .5em; color: var(--w-fg);
  border: none; padding: 0;
}
.w-article-body h4 {
  font-family: var(--w-serif); font-weight: 600;
  font-size: 0.95em; line-height: 1.3;
  margin: 1.2em 0 .4em; color: var(--w-fg);
}
.w-article-body ul, .w-article-body ol { padding-left: 24px; margin: 0 0 1.2em; }
.w-article-body li { margin: .35em 0; font-size: 1em; font-family: var(--w-serif); }
.w-article-body li::marker { color: var(--w-accent); }
.w-article-body blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--w-accent);
  border-top: none; border-right: none; border-bottom: none;
  font-style: italic; color: var(--w-fg);
  font-size: 1.16em; line-height: 1.5;
  background: transparent;
}
.w-code-wrap {
  position: relative;
  margin: 1.6em 0;
}
.w-code-wrap pre {
  margin: 0;
}
.w-code-copy {
  position: absolute; top: 10px; right: 10px;
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px;
  font-family: var(--w-sans); font-size: 11px; font-weight: 600; letter-spacing: .03em;
  background: var(--w-surface); border: 1px solid var(--w-border-strong);
  color: var(--w-dim); cursor: pointer;
  opacity: 0; transition: opacity .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.w-code-wrap:hover .w-code-copy { opacity: 1; }
.w-code-copy.copied { background: var(--w-ai-orange); color: #fff; border-color: var(--w-ai-orange); }
.w-article-body pre {
  margin: 1.6em 0; padding: 18px 22px;
  background: var(--w-surface-2); border: 1px solid var(--w-border);
  border-radius: 10px; overflow-x: auto;
  font-family: var(--w-mono); font-size: 13.5px;
  line-height: 1.6; color: var(--w-fg);
  white-space: pre;
}
.w-article-body code {
  font-family: var(--w-mono); font-size: .88em;
  background: var(--w-surface-2); padding: 2px 6px;
  border-radius: 4px; color: var(--w-fg);
}
.w-article-body pre code {
  background: transparent; padding: 0; font-size: 13.5px; border-radius: 0;
}
.w-article-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 1.2em 0; display: block; }

/* ── article figures with attribution ── */
.w-figure { margin: 2.2em 0; text-align: center; }
.w-figure img {
  max-width: 100%; height: auto;
  border-radius: 10px;
  box-shadow: var(--w-shadow);
  margin: 0 auto; display: block;
}
.w-figure-caption {
  font-size: 13.5px; color: var(--w-muted);
  margin-top: 0.65em; line-height: 1.55;
  text-align: left; padding: 0 4px;
}
.w-figure-source { display: block; margin-top: 0.2em; font-size: 12.5px; }
.w-figure-source a { color: var(--w-accent); text-decoration: underline; }
.w-article-body a { color: var(--w-accent); text-decoration: underline; text-underline-offset: 2px; }
.w-article-body a:hover { opacity: .8; }
.w-article-body hr {
  border: none; border-top: 1px solid var(--w-border); margin: 2em 0;
}
.w-article-body table {
  display: block; width: 100%; max-width: 100%;
  border-collapse: collapse; margin: 1.6em 0;
  font-family: var(--w-sans); font-size: 15px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.w-article-body th, .w-article-body td {
  padding: 10px 14px; border: 1px solid var(--w-border); text-align: left;
}
.w-article-body th { background: var(--w-surface-2); font-weight: 600; }

/* ── contact ── */
.w-contact-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 880px) { .w-contact-grid { grid-template-columns: 1fr 1.2fr; gap: 72px; } }

.w-channels { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.w-channel {
  display: grid; grid-template-columns: 44px 1fr auto;
  gap: 14px; align-items: center; padding: 16px 18px;
  background: var(--w-surface); border: 1px solid var(--w-border);
  border-radius: 12px; text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .2s ease;
}
.w-channel:hover { border-color: var(--w-ai-orange); transform: translateY(-2px); }
.w-channel-icn {
  width: 44px; height: 44px;
  background: var(--w-ai-orange-soft); color: var(--w-ai-orange);
  display: grid; place-items: center; border-radius: 12px;
}
.w-channel-lbl {
  font-family: var(--w-sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--w-muted); display: block;
}
.w-channel-val {
  font-family: var(--w-serif); font-size: 16px; color: var(--w-fg);
  margin-top: 2px; display: block;
}
.w-channel-arrow { color: var(--w-dim); font-size: 18px; transition: color .15s ease; }
.w-channel:hover .w-channel-arrow { color: var(--w-ai-orange); }

.w-contact-form {
  background: var(--w-surface); padding: 28px 30px;
  border: 1px solid var(--w-border); border-radius: 16px;
  display: flex; flex-direction: column; gap: 18px;
}
.w-contact-form-h {
  font-family: var(--w-serif); font-weight: 600; font-size: 22px;
  margin: 0; color: var(--w-fg);
}
.w-field { display: flex; flex-direction: column; gap: 6px; }
.w-field-l {
  font-family: var(--w-sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--w-muted);
}
.w-field input.form-control,
.w-field textarea.form-control {
  padding: 11px 14px !important; background: var(--w-bg) !important;
  border: 1px solid var(--w-border) !important; border-radius: 10px !important;
  font-family: var(--w-sans) !important; font-size: 15px !important; color: var(--w-fg) !important;
  caret-color: var(--w-ai-orange); width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-shadow: none !important;
}
.w-field input.form-control::placeholder,
.w-field textarea.form-control::placeholder { color: var(--w-dim); }
.w-field input.form-control:focus,
.w-field textarea.form-control:focus {
  border-color: var(--w-ai-orange) !important;
  box-shadow: 0 0 0 4px var(--w-ai-orange-soft) !important;
  outline: 0;
}
.w-field textarea.form-control { resize: vertical; min-height: 110px; }
.w-success-msg { padding: 12px 16px; border-radius: 8px; font-family: var(--w-sans); font-size: 14px; }
.alert-success { color: #166534; background: #dcfce7; border: 1px solid #86efac; }
.alert-danger  { color: #991b1b; background: #fee2e2; border: 1px solid #fca5a5; }
.w-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; background: var(--w-ai-orange); color: #fff;
  border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--w-sans); font-size: 14px; font-weight: 600; letter-spacing: .04em;
  transition: background .15s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 18px -8px var(--w-ai-orange); align-self: flex-start;
}
.w-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px var(--w-ai-orange); color: #fff; }
.w-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── footer ── */
.w-foot {
  background: #1c1814; color: #fbf7ef;
  margin-top: 80px; padding: 80px 0 40px;
}
html[data-mode="dark"] .w-foot { background: #221c14; border-top: 1px solid #3b3328; }
.w-foot-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 32px;
}
.w-foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; align-items: start;
}
.w-foot-name {
  font-family: var(--w-serif); font-size: clamp(32px, 4vw, 52px);
  font-weight: 600; line-height: 1; color: #fbf7ef; margin: 0;
}
.w-foot-name-em { font-style: italic; color: var(--w-ai-orange); }
.w-foot-tag {
  font-family: var(--w-mono); font-size: 13px; letter-spacing: .04em;
  color: rgba(251,247,239,.55); margin-top: 14px; margin-bottom: 0;
}
.w-foot-col h5 {
  font-family: var(--w-mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: rgba(251,247,239,.5);
  margin: 0 0 18px; font-weight: 400;
}
.w-foot-col a {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  color: rgba(251,247,239,.8); font-size: 15px; text-decoration: none;
  transition: color .2s ease, padding-left .2s ease;
}
.w-foot-col a:hover { color: var(--w-ai-orange); padding-left: 6px; }
.w-foot-col a svg { width: 16px; height: 16px; opacity: .7; flex-shrink: 0; }
.w-foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid rgba(251,247,239,.16);
  font-family: var(--w-mono); font-size: 13px; letter-spacing: .03em;
  color: rgba(251,247,239,.48);
}
.w-foot-blink { color: var(--w-ai-orange); animation: w-foot-blink 2s step-end infinite; }
@keyframes w-foot-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (max-width: 860px) {
  .w-foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .w-foot-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}
@media (max-width: 600px) {
  .w-foot { padding: 56px 0 32px; }
  .w-foot-inner { padding: 0 20px; }
}

/* ── home marquee ── */
.w-marquee {
  overflow: hidden;
  border-top: 1px solid var(--w-border);
  border-bottom: 1px solid var(--w-border);
  margin-top: clamp(40px, 6vw, 80px);
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.w-marquee-track {
  display: flex; gap: 48px; width: max-content;
  animation: w-marquee 38s linear infinite;
}
.w-marquee-track span {
  font-family: var(--w-serif); font-style: italic; font-size: 22px;
  color: var(--w-muted);
  display: inline-flex; align-items: center; gap: 48px;
}
.w-marquee-track span::after {
  content: "\2726"; color: var(--w-ai-orange); font-style: normal; font-size: 13px;
}
@keyframes w-marquee { to { transform: translateX(-50%); } }

/* ── scroll to top ── */
.w-scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 99;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 35%, #ea580c 65%, #c4421b 100%);
  color: #fff; border: 0; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 14px 30px -10px rgba(196,66,27,.55), 0 6px 14px -4px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.22);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.w-scroll-top:hover { transform: translateY(-2px); opacity: 1; }
.w-scroll-top.visible { opacity: .94; transform: translateY(0); pointer-events: auto; }

/* ── posts page: search ── */
.w-search {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border: 1px solid var(--w-border);
  border-radius: 12px; background: var(--w-surface);
  margin: 4px 0 18px; max-width: 520px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.w-search:focus-within { border-color: var(--w-accent); box-shadow: 0 0 0 4px var(--w-accent-soft); }
.w-search svg { color: var(--w-muted); flex-shrink: 0; }
.w-search input {
  flex: 1; font-size: 15px; color: var(--w-fg); font-family: var(--w-sans);
  background: transparent; border: 0; outline: 0;
}
.w-search input::placeholder { color: var(--w-dim); }
.w-search kbd {
  font-family: var(--w-mono); font-size: 11px; padding: 2px 7px;
  background: var(--w-surface-2); border: 1px solid var(--w-border);
  border-radius: 4px; color: var(--w-muted);
}

/* ── posts page: filter chips ── */
.w-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 36px; }
.w-chip {
  font-family: var(--w-sans); font-size: 12.5px; font-weight: 500;
  letter-spacing: .04em; padding: 7px 14px;
  border: 1px solid var(--w-border); border-radius: 999px;
  color: var(--w-muted); background: var(--w-surface);
  cursor: pointer; transition: all .15s ease;
  display: inline-flex; align-items: center; gap: 7px;
}
.w-chip:hover { color: var(--w-fg); border-color: var(--w-border-strong); }
.w-chip.is-active { color: var(--w-surface); background: var(--w-fg); border-color: var(--w-fg); }
.w-chip-count { font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }

/* ── posts page: see more / done ── */
.w-see-more-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 0 8px;
}
.w-see-more-count { font-family: var(--w-sans); font-size: 13px; color: var(--w-muted); letter-spacing: .04em; }
.w-see-more-count strong { color: var(--w-fg); font-weight: 600; }
.w-see-more-done { font-family: var(--w-serif); font-style: italic; font-size: 15px; }
.w-see-more {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; font-family: var(--w-sans); font-size: 14px; font-weight: 600;
  letter-spacing: .04em; color: var(--w-fg); background: var(--w-surface);
  border: 1px solid var(--w-border-strong); border-radius: 999px;
  cursor: pointer; transition: all .2s ease;
}
.w-see-more:hover {
  color: #fff; background: var(--w-accent); border-color: var(--w-accent);
  transform: translateY(-1px); box-shadow: 0 8px 18px -8px var(--w-accent);
}
.w-see-more svg { transition: transform .2s ease; }
.w-see-more:hover svg { transform: translateY(2px); }
.w-archive-empty {
  padding: 40px 8px; font-family: var(--w-serif); font-style: italic;
  font-size: 18px; color: var(--w-muted); text-align: center;
  border-bottom: 1px solid var(--w-border);
}

/* ── dark mode for post .content cards ── */
html[data-mode="dark"] .content {
  background: rgba(26, 26, 23, 0.97) !important;
  color: var(--w-fg) !important;
}
html[data-mode="dark"] .content h1,
html[data-mode="dark"] .content h2,
html[data-mode="dark"] .content h3,
html[data-mode="dark"] .content h4 { color: var(--w-fg) !important; }
html[data-mode="dark"] .content p,
html[data-mode="dark"] .content li { color: var(--w-fg-soft) !important; }
html[data-mode="dark"] .content table th { background: var(--w-surface-2) !important; color: var(--w-fg) !important; }
html[data-mode="dark"] .content table td { color: var(--w-fg-soft) !important; border-color: var(--w-border) !important; }
html[data-mode="dark"] .content code { background: var(--w-surface-2) !important; color: var(--w-fg) !important; }

/* ── home page AI promo card ── */
/* ── home page AI promo card (orange accent, matching Website.html) ── */
:root { --w-ai-orange: #c4421b; --w-ai-orange-soft: rgba(196,66,27,0.12); }
html[data-mode="dark"] { --w-ai-orange: #e87654; --w-ai-orange-soft: rgba(232,118,84,0.12); }
.w-ai-promo {
  display: grid; grid-template-columns: 84px 1fr;
  gap: 28px; align-items: start; padding: 36px;
  border-radius: 20px; border: 1px solid var(--w-border);
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(217,119,87,0.18), transparent 70%),
    linear-gradient(135deg, var(--w-surface) 0%, var(--w-surface-2) 100%);
  position: relative; overflow: hidden;
}
.w-ai-promo-badge {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--w-ai-orange); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 26px -8px var(--w-ai-orange); position: relative;
}
.w-ai-promo-badge::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--w-ai-orange); opacity: .4;
  animation: cbot-pulse 2.4s ease-out infinite;
}
.w-ai-promo-content { min-width: 0; }
.w-ai-promo-eyebrow {
  font-family: var(--w-sans); font-size: 11.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--w-ai-orange);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.w-ai-promo-eyebrow::after {
  content: ""; flex: 1; height: 1px; margin-left: 4px;
  background: linear-gradient(90deg, rgba(217,119,87,0.35), transparent);
}
.w-ai-promo-h {
  margin: 0 0 10px; font-family: var(--w-serif); font-weight: 600;
  font-size: clamp(22px, 3vw, 30px); letter-spacing: -.01em; line-height: 1.2; color: var(--w-fg);
}
.w-ai-promo-h em { font-style: italic; color: var(--w-ai-orange); }
.w-ai-promo-sub {
  margin: 0 0 22px; font-family: var(--w-sans); font-size: 15px;
  color: var(--w-muted); max-width: 56ch; line-height: 1.6;
}
.w-ai-promo-suggests { display: flex; flex-wrap: wrap; gap: 8px; }
.w-ai-promo-suggest {
  font-family: var(--w-sans); font-size: 13px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--w-border-strong);
  background: var(--w-surface); color: var(--w-fg); cursor: pointer;
  transition: all .15s ease; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.w-ai-promo-suggest::before { content: "›"; color: var(--w-ai-orange); font-weight: 700; font-size: 15px; line-height: 1; }
.w-ai-promo-suggest:hover {
  border-color: var(--w-ai-orange); background: var(--w-ai-orange); color: #fff;
  transform: translateY(-1px); box-shadow: 0 6px 14px -6px var(--w-ai-orange);
}
.w-ai-promo-suggest:hover::before { color: #fff; }
@media (max-width: 720px) {
  .w-ai-promo { grid-template-columns: 1fr; padding: 28px 24px; gap: 16px; }
  .w-ai-promo-badge { width: 52px; height: 52px; }
  .w-ai-promo-eyebrow { white-space: normal; }
  .w-ai-promo-eyebrow::after { display: none; }
  .w-ai-promo-suggest { white-space: normal; }
}

/* ── chatbot widget ── */
.cbot-fab {
  position: fixed; right: 24px; bottom: 96px; z-index: 200;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 35%, #ea580c 65%, #c4421b 100%);
  color: #fff;
  font-family: var(--w-sans); text-align: left; border: 0; cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(196,66,27,.55), 0 6px 14px -4px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cbot-fab:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -10px rgba(196,66,27,.65), 0 8px 18px -4px rgba(0,0,0,.28); }
.cbot-fab::before {
  content: ""; position: absolute; inset: -4px; border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #c4421b); opacity: .22; z-index: -1;
  animation: cbot-pulse 2.4s ease-out infinite;
}
@keyframes cbot-pulse {
  0%   { transform: scale(.95); opacity: .35; }
  100% { transform: scale(1.18); opacity: 0; }
}
.cbot-fab-icn {
  width: 42px; height: 42px;
  background: none; display: grid; place-items: center; flex-shrink: 0;
}
.cbot-fab-lbl { display: flex; flex-direction: column; line-height: 1.15; padding-right: 6px; }
.cbot-fab-lbl-top { font-size: 14.5px; font-weight: 700; letter-spacing: .01em; }
.cbot-fab-lbl-sub { font-size: 11.5px; letter-spacing: .04em; opacity: .8; margin-top: 2px; }

.cbot {
  position: fixed; right: 24px; bottom: 80px; z-index: 201;
  width: min(400px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 108px));
  background: var(--w-surface); border: 1px solid var(--w-border);
  border-radius: 20px; box-shadow: var(--w-shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right;
  animation: cbot-in .25s cubic-bezier(.2,.7,.2,1.05);
}
@keyframes cbot-in {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cbot-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--w-border);
}
.cbot-avatar {
  width: 38px; height: 38px;
  background: none;
  display: grid; place-items: center;
  position: relative; flex-shrink: 0;
}

.cbot-avatar-img { width: 28px; height: 28px; object-fit: contain; }
.cbot-fab-logo { width: 28px; height: 28px; object-fit: contain; display: block; }
.cbot-title { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.cbot-name { font-family: var(--w-serif); font-weight: 600; font-size: 16px; color: var(--w-fg); line-height: 1.1; }
.cbot-status {
  font-family: var(--w-sans); font-size: 11.5px; letter-spacing: .06em; color: var(--w-muted);
  display: inline-flex; align-items: center; gap: 6px;
}
.cbot-status::before { content: ""; width: 6px; height: 6px; background: #46c266; border-radius: 50%; }
.cbot-close {
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--w-muted); background: transparent;
}
.cbot-close:hover { background: var(--w-surface-2); color: var(--w-fg); }

.cbot-body {
  flex: 1; overflow-y: auto; padding: 20px 18px;
  display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth;
}
.cbot-body::-webkit-scrollbar { width: 6px; }
.cbot-body::-webkit-scrollbar-thumb { background: var(--w-border-strong); border-radius: 3px; }

.cbot-msg { display: flex; gap: 10px; max-width: 100%; animation: cbot-msg-in .25s ease-out; }
@keyframes cbot-msg-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.cbot-msg-user { justify-content: flex-end; }
.cbot-bubble {
  padding: 11px 14px; border-radius: 14px;
  font-size: 14.5px; line-height: 1.5; max-width: 84%; word-wrap: break-word;
}
.cbot-msg-bot  .cbot-bubble { background: var(--w-surface-2); color: var(--w-fg); border-top-left-radius: 4px; font-family: var(--w-sans); }
.cbot-msg-user .cbot-bubble { background: var(--w-ai-orange); color: #fff; border-top-right-radius: 4px; font-family: var(--w-sans); }
.cbot-bubble a { color: var(--w-ai-orange); text-decoration: underline; text-underline-offset: 2px; }
.cbot-msg-user .cbot-bubble a { color: #fff; }
.cbot-bubble p { margin: 0 0 6px; }
.cbot-bubble p:last-child { margin-bottom: 0; }
.cbot-bubble p.cbot-spacer { margin: 2px 0; }
.cbot-bubble ul { margin: 4px 0 6px; padding-left: 18px; }
.cbot-bubble li { margin: 3px 0; }
.cbot-bubble strong { font-weight: 600; color: var(--w-fg); }
.cbot-bubble code { font-family: var(--w-mono); font-size: 12.5px; background: var(--w-surface-3, rgba(0,0,0,.08)); padding: 1px 5px; border-radius: 4px; }

.cbot-typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 14px; background: var(--w-surface-2); border-radius: 14px; border-top-left-radius: 4px; }
.cbot-typing-dot { width: 7px; height: 7px; background: var(--w-muted); border-radius: 50%; animation: cbot-dot 1.2s infinite ease-in-out; }
.cbot-typing-dot:nth-child(2) { animation-delay: .15s; }
.cbot-typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes cbot-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.cbot-suggests { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 6px; }
.cbot-suggest {
  font-family: var(--w-sans); font-size: 12.5px; padding: 6px 12px;
  border: 1px solid var(--w-border); border-radius: 999px;
  color: var(--w-muted); background: var(--w-surface);
  cursor: pointer; transition: all .15s ease; text-align: left;
}
.cbot-suggest:hover { color: var(--w-ai-orange); border-color: var(--w-ai-orange); background: rgba(217,119,87,0.10); }

.cbot-input {
  border-top: 1px solid var(--w-border); padding: 14px 16px;
  display: flex; gap: 10px; align-items: flex-end; background: var(--w-surface);
}
.cbot-input textarea {
  flex: 1; font-family: var(--w-sans); font-size: 14.5px; line-height: 1.45;
  color: var(--w-fg); padding: 9px 12px; background: var(--w-bg);
  border: 1px solid var(--w-border); border-radius: 12px;
  resize: none; max-height: 100px; min-height: 40px; outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cbot-input textarea:focus { border-color: var(--w-ai-orange); box-shadow: 0 0 0 3px rgba(217,119,87,0.15); }
.cbot-send {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--w-ai-orange); color: #fff; display: grid; place-items: center; flex-shrink: 0;
  transition: background-color .15s ease, transform .2s ease;
}
.cbot-send:hover { transform: translateY(-1px); }
.cbot-send:disabled { background: var(--w-border-strong); cursor: not-allowed; transform: none; }

@media (max-width: 480px) {
  .cbot { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); border-radius: 16px; }
  .cbot-fab { right: 16px; bottom: 84px; padding: 8px 14px 8px 8px; }
  .cbot-fab-icn { width: 36px; height: 36px; }
  .cbot-fab-lbl-top { font-size: 13.5px; }
  .cbot-fab-lbl-sub { display: none; }
  .w-scroll-top { bottom: 16px; right: 16px; }
}

/* ── github-link override ── */
.github-link { color: var(--w-accent) !important; font-family: var(--w-sans); }
.github-link:hover { opacity: .8; }

/* ── read-aloud widget ── */
.ra {
  display: grid; grid-template-columns: 48px 1fr auto;
  align-items: center; gap: 14px;
  padding: 12px 14px; background: var(--w-surface);
  border: 1px solid var(--w-border); border-radius: 14px;
  margin: 0 0 36px; position: relative;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.ra.is-playing {
  border-color: var(--w-ai-orange);
  box-shadow: 0 8px 22px -10px var(--w-ai-orange), 0 2px 6px -2px rgba(28,24,16,.08);
}
.ra-play {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--w-ai-orange); color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 6px 14px -6px var(--w-ai-orange);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ra-play:hover { transform: scale(1.05); }
.ra.is-playing .ra-play { animation: ra-pulse 2s ease-in-out infinite; }
@keyframes ra-pulse {
  0%,100% { box-shadow: 0 6px 14px -6px var(--w-ai-orange), 0 0 0 0 rgba(217,119,87,.35); }
  50%      { box-shadow: 0 6px 14px -6px var(--w-ai-orange), 0 0 0 8px rgba(217,119,87,0); }
}
.ra-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ra-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-family: var(--w-sans); line-height: 1.15;
}
.ra-l-title { font-size: 14px; font-weight: 600; color: var(--w-fg); letter-spacing: -.005em; }
.ra-l-sub { font-size: 11.5px; color: var(--w-muted); letter-spacing: .04em; white-space: nowrap; }
.ra-bar { height: 3px; background: var(--w-surface-2); border-radius: 2px; overflow: hidden; }
.ra-bar span { display: block; height: 100%; background: var(--w-ai-orange); border-radius: 2px; transition: width .3s ease; }
.ra-controls { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.ra-icn {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; color: var(--w-muted);
  transition: color .15s ease, background-color .15s ease;
}
.ra-icn:hover, .ra-icn.is-on { color: var(--w-ai-orange); background: var(--w-ai-orange-soft); }
.ra-pop {
  position: absolute; top: calc(100% + 8px); right: 12px; z-index: 20;
  background: var(--w-surface); border: 1px solid var(--w-border); border-radius: 12px;
  padding: 14px 16px; min-width: 280px; box-shadow: var(--w-shadow-lg);
  font-family: var(--w-sans); animation: ra-pop-in .18s ease-out;
}
@keyframes ra-pop-in {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ra-pop-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ra-pop-row:last-of-type { margin-bottom: 0; }
.ra-pop-l { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--w-muted); white-space: nowrap; }
.ra-pop-speeds { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ra-speed {
  font-family: var(--w-mono); font-size: 11.5px;
  padding: 4px 8px; border-radius: 6px; color: var(--w-muted);
  background: var(--w-surface-2); transition: all .12s ease; min-width: 32px;
}
.ra-speed:hover { color: var(--w-fg); }
.ra-speed.is-active { background: var(--w-ai-orange); color: #fff; }
.ra-pop-select {
  font-family: var(--w-sans); font-size: 13px; padding: 5px 8px;
  background: var(--w-bg); border: 1px solid var(--w-border);
  border-radius: 6px; color: var(--w-fg); max-width: 180px;
}
.ra-pop-foot {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--w-border);
  font-size: 11px; color: var(--w-dim); letter-spacing: .02em; font-style: italic;
}
/* ra mobile styles moved to the consolidated mobile section below */

/* ── Read-aloud speaking highlight ──────────────────────────────────────── */
@keyframes ra-speaking-glow {
  0%, 100% { background: var(--w-accent-soft); }
  50%       { background: color-mix(in oklab, var(--w-accent) 18%, transparent); }
}
.ra-speaking {
  border-radius: 4px;
  box-shadow: inset 3px 0 0 var(--w-accent);
  scroll-margin-top: 80px;
  animation: ra-speaking-glow 2s ease-in-out infinite;
}
.ra-word { display: inline; }
.ra-word-active {
  background: var(--w-accent);
  color: #fff;
  border-radius: 3px;
  padding: 0 2px;
  box-shadow: 0 0 0 2px var(--w-accent);
  transition: background 0.08s ease;
}

/* ── Share FAB (floating right-edge, vertically centred) ────────────────── */
.share {
  position: fixed;
  right: 24px; top: 40%;
  z-index: 60;
  transform: translateY(-50%);
  display: flex; flex-direction: row; align-items: center; gap: 0;
  background: transparent; border: 0; padding: 0; margin: 0;
}
.share-fab {
  position: relative;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 35%, #ea580c 65%, #c4421b 100%);
  color: #fff;
  box-shadow:
    0 14px 30px -10px rgba(196,66,27,.55),
    0 6px 14px -4px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease, opacity .25s ease;
  opacity: .94;
  cursor: pointer;
}
.share-fab:hover { opacity: 1; transform: translateX(-2px); }
.share.is-open .share-fab { opacity: 1; }
.share-fab::before {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #c4421b);
  opacity: .22; z-index: -1;
  animation: shr-pulse 2.6s ease-out infinite;
}
.share.is-open .share-fab::before { animation: none; opacity: 0; }
@keyframes shr-pulse {
  0%   { transform: scale(.96); opacity: .35; }
  100% { transform: scale(1.12); opacity: 0; }
}
.share-fab-icn { display: grid; place-items: center; transition: transform .3s ease; }
.share.is-open .share-fab-icn { transform: rotate(180deg); }
.share-fab-text { display: none; }

/* icon list – vertical column to the LEFT of the fab */
.share-list {
  list-style: none; padding: 0; margin: 0 12px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  pointer-events: none; opacity: 0;
  transition: opacity .2s ease;
}
.share.is-open .share-list { pointer-events: auto; opacity: 1; }

.share-item {
  position: relative;
  opacity: 0;
  transform: translateX(24px) scale(.5);
  transition:
    opacity .35s cubic-bezier(.34,1.56,.64,1),
    transform .35s cubic-bezier(.34,1.56,.64,1);
  transition-delay: 0ms;
}
.share.is-open .share-item {
  opacity: 1; transform: translateX(0) scale(1);
  transition-delay: calc(var(--i) * 50ms);
}

.share-item-btn {
  display: grid; place-items: center;
  width: 46px; height: 46px; padding: 0;
  border-radius: 50%; color: #fff;
  font-family: var(--w-sans);
  box-shadow:
    0 10px 22px -8px rgba(0,0,0,.4),
    0 4px 10px -2px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  cursor: pointer; border: 0; text-decoration: none;
}
.share-item-btn:hover {
  transform: translateX(-3px) scale(1.08);
  box-shadow:
    0 14px 26px -8px rgba(0,0,0,.45),
    0 6px 12px -2px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.22);
  color: #fff;
}
.share-item-icn { display: grid; place-items: center; width: 100%; height: 100%; }

/* tooltip to the LEFT of each icon */
.share-item-lbl {
  position: absolute;
  right: calc(100% + 10px); top: 50%;
  transform: translateY(-50%) translateX(4px);
  background: var(--w-fg); color: var(--w-bg);
  padding: 5px 10px; border-radius: 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; pointer-events: none; opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 6px 14px -4px rgba(0,0,0,.3);
}
.share-item-lbl::after {
  content: "";
  position: absolute; right: -3px; top: 50%;
  width: 8px; height: 8px;
  background: var(--w-fg);
  transform: translateY(-50%) rotate(45deg);
}
.share-item-btn:hover .share-item-lbl,
.share-item-btn:focus-visible .share-item-lbl { opacity: 1; transform: translateY(-50%) translateX(0); }

@media (max-width: 480px) {
  .share { right: 16px; }
  .share-fab { width: 46px; height: 46px; }
  .share-item-btn { width: 40px; height: 40px; }
  .share-list { gap: 8px; }
}

/* ── article: prev/next nav stacks to 1 col on mobile ── */
@media (max-width: 600px) {
  .w-article-nav { grid-template-columns: 1fr; }
  .w-article-nav-card-r { text-align: left; }
}

/* ── chatbot: momentum scrolling on iOS ── */
.cbot-body { -webkit-overflow-scrolling: touch; }

/* ── read-aloud: keep play button 44px on mobile ── */
@media (max-width: 600px) {
  .ra { grid-template-columns: 44px 1fr auto; gap: 10px; padding: 10px 12px; }
  .ra-play { width: 44px; height: 44px; }   /* was 36px — below minimum */
  .ra-pop { min-width: auto; left: 12px; right: 12px; }
}

/* ── iOS: prevent auto-zoom on form focus (inputs < 16px trigger zoom) ── */
@media (hover: none) and (pointer: coarse) {
  .w-field input.form-control,
  .w-field textarea.form-control { font-size: 16px !important; }
  .cbot-input textarea            { font-size: 16px; }
  .w-search input                 { font-size: 16px; }
}

/* ── iOS: remove default input styling ── */
input, textarea, select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;   /* iOS adds rounded corners by default */
}
/* re-apply our border-radius where needed */
.w-field input.form-control,
.w-field textarea.form-control { border-radius: 10px !important; }
.cbot-input textarea            { border-radius: 12px; }
.w-search                       { border-radius: 12px; }


/* ── very small screens (< 360px) ────────────────────────────────────────── */
@media (max-width: 360px) {
  .w-nav { padding: 10px 12px; }
  .w-nav-brand { font-size: 15px; gap: 8px; }
  .w-nav-logo-light, .w-nav-logo-dark { width: 30px; height: 30px; }
  .w-hero-inner { padding-left: 18px; padding-right: 18px; }
  .w-container { padding: 0 16px; }
  .w-container-narrow { padding: 0 16px; }
  .w-post-inner { padding: 0 14px; }
  .w-card-body { padding: 16px 18px 18px; }
  .cbot-fab { right: 10px; padding: 8px 12px 8px 8px; }
  .w-scroll-top { right: 10px; bottom: 10px; width: 42px; height: 42px; }
}

/* ── Share v2 — bottom-centre popover ──────────────────────────────────────── */
.share2 {
  position: fixed;
  left: 50%; bottom: 24px;
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.share2-fab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  background: var(--w-fg);
  color: var(--w-bg);
  font-family: var(--w-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  box-shadow: 0 12px 28px -10px rgba(28,24,16,.35), 0 4px 10px -2px rgba(28,24,16,.18);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
  white-space: nowrap;
  cursor: pointer;
}
@media (hover: hover) {
  .share2-fab:hover {
    transform: translateY(-2px);
    background: var(--w-accent);
    color: #fff;
    box-shadow: 0 16px 32px -10px var(--w-accent), 0 6px 14px -4px rgba(0,0,0,.18);
  }
}
.share2.is-open .share2-fab { background: var(--w-accent); color: #fff; }
.share2-fab-icn { display: inline-flex; }
.share2-fab-text { line-height: 1; }

.share2-pop {
  width: 320px;
  margin-bottom: 12px;
  padding: 14px;
  background: var(--w-surface);
  border: 1px solid var(--w-border);
  border-radius: 16px;
  box-shadow: 0 24px 60px -16px rgba(28,24,16,.32), 0 8px 22px -8px rgba(28,24,16,.16);
  opacity: 0;
  transform: translateY(8px) scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2,.7,.2,1.05);
  transform-origin: bottom center;
}
.share2.is-open .share2-pop {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.share2-pop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px 12px;
}
.share2-pop-h {
  font-family: var(--w-sans);
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--w-muted);
}
.share2-pop-x {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--w-dim);
  transition: color .15s ease, background-color .15s ease;
  cursor: pointer;
}
.share2-pop-x:hover { color: var(--w-fg); background: var(--w-surface-2); }

.share2-copy {
  width: 100%;
  display: block;
  padding: 12px 14px;
  background: var(--w-surface-2);
  border: 1px solid var(--w-border);
  border-radius: 12px;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
  cursor: pointer;
}
@media (hover: hover) { .share2-copy:hover { border-color: var(--w-accent); } }
.share2-copy.is-copied { border-color: var(--w-accent); background: var(--w-accent-soft); }
.share2-copy-l { display: flex; align-items: center; gap: 12px; }
.share2-copy-icn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--w-surface);
  border: 1px solid var(--w-border);
  color: var(--w-fg);
  flex-shrink: 0;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
@media (hover: hover) { .share2-copy:hover .share2-copy-icn { background: var(--w-accent); border-color: var(--w-accent); color: #fff; } }
.share2-copy.is-copied .share2-copy-icn { background: var(--w-accent); border-color: var(--w-accent); color: #fff; }
.share2-copy-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.share2-copy-label { font-family: var(--w-sans); font-size: 13.5px; font-weight: 600; color: var(--w-fg); line-height: 1.2; }
.share2-copy-url { font-family: var(--w-mono); font-size: 11.5px; color: var(--w-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.share2-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 4px 12px;
  font-family: var(--w-sans);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--w-dim);
}
.share2-divider::before, .share2-divider::after { content: ""; flex: 1; height: 1px; background: var(--w-border); }

.share2-row {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.share2-chip {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px 10px;
  background: var(--w-surface);
  border: 1px solid var(--w-border);
  border-radius: 10px;
  color: var(--brand, var(--w-fg-soft));
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
@media (hover: hover) {
  .share2-chip:hover {
    border-color: var(--brand, var(--w-accent));
    background: color-mix(in oklab, var(--brand, var(--w-accent)) 8%, var(--w-surface));
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -10px var(--brand, var(--w-accent));
  }
  .share2-chip:hover .share2-chip-lbl { color: var(--brand, var(--w-accent)); }
}
.share2-chip-icn { display: inline-flex; color: var(--brand, var(--w-fg-soft)); }
.share2-chip-lbl {
  font-family: var(--w-sans);
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--w-muted);
  transition: color .15s ease;
}
html[data-mode="dark"] .share2-chip-twitter { --brand: #f2efe7; }

@media (max-width: 600px) {
  .share2 { bottom: 16px; }
  .share2-pop { width: calc(100vw - 32px); max-width: 340px; }
}

/* ── share2 hero-corner variant ─────────────────────────────────────────── */
.share2.share2-corner {
  position: absolute;
  left: auto; right: 28px; bottom: 24px;
  transform: none;
  z-index: 5;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 8px 12px 8px 16px;
  background: linear-gradient(135deg, oklch(0.35 0.15 290), oklch(0.20 0.10 270));
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  box-shadow: 0 10px 28px -10px rgba(0,0,0,.35);
}
.share2-corner-lbl {
  font-family: var(--w-sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.75);
  padding-right: 12px;
  border-right: 1px solid rgba(255,255,255,.18);
}
.share2-corner-row {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 4px;
}
.share2-corner-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
@media (hover: hover) {
  .share2-corner-btn:hover { background: #fff; color: var(--brand, var(--w-accent)); transform: translateY(-2px); }
}
.share2-corner-btn.is-copied { background: #25d366; color: #fff; }
.share2-corner-btn svg { width: 16px; height: 16px; display: block; }

@media (max-width: 600px) {
  .share2.share2-corner { right: 16px; bottom: 16px; padding: 6px 10px 6px 14px; gap: 8px; }
  .share2-corner-lbl { display: none; }
}

/* ── Reading progress bar ────────────────────────────────────────────────── */
.w-progress-bar {
  position: fixed; top: 0; left: 0; z-index: 2000;
  height: 3px; width: 0%;
  background: var(--w-accent);
  transition: width .08s linear;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
}

/* ── Table of contents ───────────────────────────────────────────────────── */
.w-toc {
  position: fixed; top: 120px; bottom: 24px;
  width: 180px;
  overflow-y: auto; scrollbar-width: none;
  z-index: 90; display: none;
  transition: top .12s ease;
}
.w-toc::-webkit-scrollbar { display: none; }
.w-toc-title {
  font-family: var(--w-sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--w-dim); margin: 0 0 10px;
}
.w-toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.w-toc-link {
  display: block;
  font-family: var(--w-sans); font-size: 12px; line-height: 1.4;
  color: var(--w-muted); text-decoration: none;
  padding: 4px 8px; border-left: 2px solid var(--w-border);
  transition: color .15s, border-color .15s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.w-toc-link:hover { color: var(--w-fg); border-color: var(--w-muted); }
.w-toc-link.is-active { color: var(--w-accent); border-color: var(--w-accent); font-weight: 600; }
.w-toc-link[data-level="3"] { padding-left: 18px; font-size: 11px; }

/* ── Mobile / inline TOC ─────────────────────────────────────────────────── */
.w-toc-mobile {
  display: none;
  border: 1px solid var(--w-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--w-surface);
  margin: 0 0 32px;
}
@media (max-width: 1180px) {
  .w-toc-mobile { display: block; }
}
.w-toc-mobile-sum {
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  font-family: var(--w-sans);
  font-size: 13px; font-weight: 600;
  color: var(--w-fg);
  cursor: pointer; user-select: none;
}
.w-toc-mobile-sum::-webkit-details-marker { display: none; }
.w-toc-mobile-sum::marker { display: none; content: ""; }
.w-toc-mobile-sum svg:first-child { flex-shrink: 0; color: var(--w-muted); }
.w-toc-mobile-chevron { flex-shrink: 0; color: var(--w-muted); margin-left: auto; transition: transform .2s ease; }
.w-toc-mobile[open] .w-toc-mobile-chevron { transform: rotate(180deg); }
.w-toc-mobile[open] .w-toc-mobile-sum { border-bottom: 1px solid var(--w-border); }
.w-toc-mobile .w-toc-list { padding: 8px 0; }
.w-toc-mobile .w-toc-link { padding: 7px 16px; white-space: normal; font-size: 13px; border-left: none; min-height: 44px; display: flex; align-items: center; }
.w-toc-mobile .w-toc-link[data-level="3"] { padding-left: 28px; font-size: 12px; }
.w-toc-mobile .w-toc-link:active { background: var(--w-surface-2); }

/* ── Difficulty badge ────────────────────────────────────────────────────── */
.w-difficulty {
  display: inline-flex; align-items: center;
  font-family: var(--w-sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 999px;
  border: 1.5px solid currentColor; opacity: .9;
}
.w-difficulty-beginner     { color: #4ade80; }
.w-difficulty-intermediate { color: #fbbf24; }
.w-difficulty-advanced     { color: #f87171; }
.w-archive-difficulty {
  font-family: var(--w-sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 1px 7px; border-radius: 999px;
  border: 1px solid currentColor;
}
.w-archive-difficulty-beginner     { color: #22c55e; }
.w-archive-difficulty-intermediate { color: #f59e0b; }
.w-archive-difficulty-advanced     { color: #ef4444; }

/* ── Code language label ─────────────────────────────────────────────────── */
.w-code-lang {
  position: absolute; top: 10px; left: 14px;
  font-family: var(--w-sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--w-dim); pointer-events: none; user-select: none;
}

/* ── Reading history checkmark ───────────────────────────────────────────── */
.w-read-check {
  display: none; align-items: center; gap: 3px;
  font-family: var(--w-sans); font-size: 10px; font-weight: 600;
  color: #22c55e; flex-shrink: 0;
}
.w-archive-item.is-read .w-read-check { display: inline-flex; }

/* ── Heading anchor copy link ────────────────────────────────────────────── */
.w-article-body h2,
.w-article-body h3 { position: relative; }
.w-heading-anchor {
  display: inline-flex; align-items: center;
  margin-left: 8px; opacity: 0;
  color: var(--w-muted); cursor: pointer;
  border: none; background: none; padding: 2px 4px;
  border-radius: 4px; vertical-align: middle;
  transition: opacity .15s, color .15s;
}
.w-article-body h2:hover .w-heading-anchor,
.w-article-body h3:hover .w-heading-anchor { opacity: 1; }
.w-heading-anchor:hover { color: var(--w-accent); }
.w-heading-anchor.is-copied { color: #22c55e; opacity: 1; }
/* Always show on touch — no hover available to reveal it */
@media (hover: none) and (pointer: coarse) {
  .w-heading-anchor { opacity: 0.45; }
}

/* ── Post reactions ──────────────────────────────────────────────────────── */
.w-reactions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 44px 0 0; padding: 24px 0 0;
  border-top: 1px solid var(--w-border);
}
.w-reactions-label {
  font-family: var(--w-sans); font-size: 13px; font-weight: 600;
  color: var(--w-muted); margin-right: 4px; flex-basis: 100%;
}
.w-reaction-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--w-border);
  background: var(--w-surface);
  font-family: var(--w-sans); font-size: 13px; font-weight: 600;
  color: var(--w-muted); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}
@media (hover: hover) {
  .w-reaction-btn:hover { border-color: var(--w-accent); color: var(--w-accent); transform: translateY(-2px); }
}
.w-reaction-btn.is-active {
  border-color: var(--w-accent);
  background: color-mix(in oklab, var(--w-accent) 10%, var(--w-surface));
  color: var(--w-accent);
}
.w-reaction-emoji { font-size: 17px; line-height: 1; }

/* ── Glossary tooltips ───────────────────────────────────────────────────── */
.w-gloss {
  border-bottom: 1.5px dotted var(--w-accent);
  cursor: help; display: inline;
}
/* Single shared tooltip appended to <body> — position: fixed escapes all overflow contexts */
.w-gloss-tip {
  position: fixed;
  width: 250px;
  background: var(--w-fg); color: var(--w-bg);
  font-family: var(--w-sans); font-size: 12px; line-height: 1.55;
  padding: 9px 13px; border-radius: 8px;
  pointer-events: none; opacity: 0;
  transition: opacity .15s; z-index: 9999;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  white-space: normal; text-align: left;
}
.w-gloss-tip.is-visible { opacity: 1; }
.w-gloss-tip::after {
  content: ''; position: absolute;
  top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--w-fg);
}
@media (max-width: 640px) { .w-gloss-tip { display: none; } }

/* ── Article topbar (crumb + reading mode btn) ───────────────────────────── */
.w-article-topbar {
  display: flex; align-items: center; margin-bottom: 22px;
}
.w-article-topbar .w-article-crumb { margin-bottom: 0; }
.w-read-mode-btn {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 8px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 40%, #7c3aed 70%, #6d28d9 100%);
  border: 0; border-radius: 6px; padding: 5px 10px;
  box-shadow: 0 4px 10px -2px rgba(109,40,217,.4);
  transition: opacity .15s, transform .15s; white-space: nowrap; cursor: pointer;
}
@media (max-width: 600px) {
  .w-read-mode-btn .w-read-mode-label { display: none; }
  .w-read-mode-btn { padding: 5px 8px; }
}
@media (hover: hover) {
  .w-read-mode-btn:hover { opacity: .88; transform: translateY(-1px); }
}

/* ── Font size A- / A+ control (topbar, left of Reading mode) ───────────── */
.w-font-size-ctrl {
  display: inline-flex; align-items: stretch; margin-left: auto;
  background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 40%, #7c3aed 70%, #6d28d9 100%);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 4px 10px -2px rgba(109,40,217,.4);
}
.w-font-step {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 9px; font-size: 11.5px; font-weight: 700;
  font-family: var(--w-sans); color: #fff; background: none; border: none;
  transition: opacity .15s, transform .15s; cursor: pointer; user-select: none;
  letter-spacing: .03em;
}
.w-font-step:disabled { opacity: 0.35; cursor: not-allowed; }
.w-font-step-divider { width: 1px; background: rgba(255,255,255,.3); flex-shrink: 0; }
@media (hover: hover) {
  .w-font-step:not(:disabled):hover { opacity: .82; transform: translateY(-1px); }
}

/* ── Article font scaling: base is set via --w-article-fs on .w-article-body ── */
/* All child elements use em so they scale proportionally with A- / A+ toggle   */

/* ── Reading mode ─────────────────────────────────────────────────────────── */
.w-read-mode-exit {
  position: fixed; top: 14px; right: 14px; z-index: 9999;
  display: none; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 40%, #7c3aed 70%, #6d28d9 100%);
  border: 0; border-radius: 8px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: #fff;
  box-shadow: 0 4px 14px -3px rgba(109,40,217,.45);
  transition: opacity .15s, transform .15s; cursor: pointer;
}
@media (hover: hover) {
  .w-read-mode-exit:hover { opacity: .88; transform: translateY(-1px); }
}
body.is-reading-mode .w-read-mode-exit { display: flex; }
body.is-reading-mode .w-nav { opacity: 0; pointer-events: none; }
body.is-reading-mode .w-foot { display: none; }
body.is-reading-mode .w-toc { display: none !important; }
body.is-reading-mode .w-toc-mobile { display: none !important; }
body.is-reading-mode .share2-corner { display: none; }
body.is-reading-mode .w-progress-bar { display: none; }
body.is-reading-mode .w-article-topbar { display: none; }
body.is-reading-mode .w-reactions { display: none; }
body.is-reading-mode .w-complete-bar { display: none; }
body.is-reading-mode .w-article-body {
  max-width: 700px; margin: 0 auto; font-size: 18.5px; line-height: 1.82;
}
body.is-reading-mode .w-post-inner { padding-top: 48px; }
@media (max-width: 600px) {
  body.is-reading-mode .w-article-body { font-size: inherit; line-height: inherit; }
  body.is-reading-mode .w-post-inner { padding-top: 24px; }
}

/* ── Complete bar ─────────────────────────────────────────────────────────── */
.w-complete-bar {
  display: flex; justify-content: center;
  margin-top: 28px; padding-top: 28px;
  border-top: 1px solid var(--w-border);
}
.w-complete-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--w-border); border-radius: 10px;
  padding: 10px 22px; font-size: 14px; font-weight: 500;
  color: var(--w-muted); transition: border-color .2s, color .2s, background .2s;
}
@media (hover: hover) {
  .w-complete-btn:hover:not(.is-done) { border-color: #22c55e; color: #22c55e; }
}
.w-complete-btn.is-done {
  border-color: #22c55e; color: #22c55e;
  background: color-mix(in oklab, #22c55e 10%, var(--w-surface));
  pointer-events: none;
}

/* ── Streak badge ─────────────────────────────────────────────────────────── */
.w-streak-wrap { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.w-streak {
  display: none; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: #f97316;
  background: color-mix(in oklab, #f97316 10%, var(--w-surface));
  border: 1px solid color-mix(in oklab, #f97316 25%, var(--w-surface));
  border-radius: 20px; padding: 3px 11px;
}
.w-streak.is-visible { display: inline-flex; }

/* completed tick override on posts list */
.w-archive-item.is-completed .w-read-check { color: #16a34a; font-weight: 700; }

/* ── Summarise button ─────────────────────────────────────────────────────── */
.w-summarise-btn {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 8px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 35%, #ea580c 65%, #c4421b 100%);
  border: 0; border-radius: 6px; padding: 5px 10px;
  box-shadow: 0 4px 10px -2px rgba(196,66,27,.4);
  transition: opacity .15s, transform .15s; white-space: nowrap; cursor: pointer;
}
@media (hover: hover) {
  .w-summarise-btn:hover { opacity: .88; transform: translateY(-1px); }
}
.w-summarise-btn.is-loading { opacity: .6; pointer-events: none; }
@media (max-width: 600px) {
  .w-summarise-label { display: none; }
  .w-summarise-btn { padding: 5px 8px; margin-left: 6px; }
}

/* ── Summary panel ────────────────────────────────────────────────────────── */
.w-summary-panel {
  background: color-mix(in oklab, var(--w-accent) 5%, var(--w-surface));
  border: 1px solid color-mix(in oklab, var(--w-accent) 20%, var(--w-border));
  border-radius: 12px; padding: 18px 20px; margin-bottom: 28px;
}
.w-summary-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--w-accent);
  margin-bottom: 12px;
}
.w-summary-close {
  margin-left: auto; font-size: 16px; color: var(--w-muted);
  transition: color .15s;
}
@media (hover: hover) { .w-summary-close:hover { color: var(--w-fg); } }
.w-summary-body { font-size: 14.5px; line-height: 1.7; color: var(--w-fg-soft); }
.w-summary-body ul { margin: 0; padding: 0; list-style: none; }
.w-summary-body li {
  display: flex; gap: 10px; padding: 5px 0;
  border-bottom: 1px solid color-mix(in oklab, var(--w-border) 60%, transparent);
}
.w-summary-body li:last-child { border-bottom: none; }
.w-summary-body li::before {
  content: '•'; color: var(--w-accent); font-weight: 700; flex-shrink: 0;
}
.w-summary-loading {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--w-muted);
}
.w-summary-dots span {
  display: inline-block; width: 5px; height: 5px;
  background: var(--w-accent); border-radius: 50%;
  animation: w-dot-bounce .9s ease-in-out infinite;
}
.w-summary-dots span:nth-child(2) { animation-delay: .15s; }
.w-summary-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes w-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* ── Leaderboard ─────────────────────────────────────────────────────────── */
.lb-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 28px 0 16px; }
.lb-live { display: inline-flex; align-items: center; gap: 9px; font-family: var(--w-mono); font-size: 12px; letter-spacing: .04em; color: var(--w-muted); }
.lb-live .d { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 #22c55e; animation: lb-pulse 2.4s infinite; }
@keyframes lb-pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.6);} 70%{box-shadow:0 0 0 8px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }
.lb-note { font-family: var(--w-mono); font-size: 12px; color: var(--w-dim); }

/* podium */
.lb-podium { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 1px; background: var(--w-border); border: 1px solid var(--w-border); border-radius: 12px; overflow: hidden; margin: 8px 0 40px; }
.lb-pod { background: var(--w-surface); padding: 28px; display: flex; flex-direction: column; gap: 4px; position: relative; transition: background .2s; }
.lb-pod:hover { background: var(--w-surface-2); }
.lb-pod.is-first { background: #1c1814; color: #fbf7ef; }
html[data-mode="dark"] .lb-pod.is-first { background: #221c14; }
.lb-pod.is-first:hover { background: #241f18; }
.lb-pod-rank { font-family: var(--w-serif); font-style: italic; font-size: 50px; line-height: 1; color: var(--w-dim); }
.lb-pod.is-first .lb-pod-rank { color: var(--w-ai-orange); }
.lb-pod-name { font-family: var(--w-serif); font-size: 22px; line-height: 1.1; letter-spacing: -.01em; margin-top: 14px; color: var(--w-fg); }
.lb-pod.is-first .lb-pod-name { color: #fbf7ef; }
.lb-pod-org { font-family: var(--w-mono); font-size: 11px; color: var(--w-muted); margin-top: 4px; }
.lb-pod.is-first .lb-pod-org { color: rgba(251,247,239,.5); }
.lb-pod-score { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.lb-pod-score .v { font-family: var(--w-serif); font-size: 40px; line-height: 1; color: var(--w-fg); }
.lb-pod.is-first .lb-pod-score .v { color: #fbf7ef; }
.lb-pod-score .l { font-family: var(--w-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--w-dim); }
.lb-pod.is-first .lb-pod-score .l { color: rgba(251,247,239,.5); }
.lb-pod-subs { display: flex; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--w-border); }
.lb-pod.is-first .lb-pod-subs { border-color: rgba(251,247,239,.16); }
.lb-pod-sub span { font-family: var(--w-mono); font-size: 11px; color: var(--w-dim); letter-spacing: .04em; display: block; }
.lb-pod.is-first .lb-pod-sub span { color: rgba(251,247,239,.5); }
.lb-pod-sub b { display: block; font-family: var(--w-sans); font-weight: 600; font-size: 15px; margin-top: 3px; color: var(--w-fg); }
.lb-pod.is-first .lb-pod-sub b { color: #fbf7ef; }
.lb-pod-type { position: absolute; top: 20px; right: 20px; }

/* type badge */
.lb-type-badge { font-family: var(--w-mono); font-size: 11px; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.lb-type-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lb-type-badge.open   { color: #22c55e; background: rgba(34,197,94,.12); }
.lb-type-badge.closed { color: var(--w-ai-orange); background: var(--w-ai-orange-soft); }

/* controls */
.lb-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 0 16px; }

/* table */
.lb-table-wrap { border: 1px solid var(--w-border); border-radius: 10px; overflow: hidden; margin-bottom: 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table thead th { background: var(--w-surface-2); text-align: left; font-family: var(--w-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--w-muted); padding: 14px 16px; font-weight: 400; border-bottom: 1px solid var(--w-border); white-space: nowrap; }
.lb-table th.lb-sortable { cursor: pointer; user-select: none; transition: color .15s; }
.lb-table th.lb-sortable:hover { color: var(--w-fg); }
.lb-table th .arr { opacity: 0; margin-left: 4px; transition: opacity .15s; }
.lb-table th.lb-sorted .arr { opacity: 1; color: var(--w-ai-orange); }
.lb-table th.lb-num { text-align: right; }
.lb-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--w-border); font-size: 14px; vertical-align: middle; }
.lb-table tbody tr { transition: background .15s; }
.lb-table tbody tr:hover { background: var(--w-surface-2); }
.lb-table tbody tr:last-child td { border-bottom: none; }
.lb-table tbody tr.lb-top td { background: color-mix(in oklab, var(--w-ai-orange) 6%, transparent); }
.lb-rank { font-family: var(--w-mono); font-size: 13px; color: var(--w-dim); width: 40px; }
.lb-rank.medal { color: var(--w-ai-orange); font-weight: 700; }
.lb-model-cell { display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.lb-model-cell b { font-family: var(--w-serif); font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--w-fg); }
.lb-model-cell span { font-family: var(--w-mono); font-size: 11px; color: var(--w-dim); }
.lb-score-cell { text-align: right; }
.lb-score-wrap { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 60px; }
.lb-score-wrap .n { font-family: var(--w-mono); font-size: 13px; font-weight: 700; color: var(--w-fg); }
.lb-bar { width: 56px; height: 4px; border-radius: 4px; background: var(--w-border); overflow: hidden; }
.lb-bar i { display: block; height: 100%; background: var(--w-muted); border-radius: 4px; }
.lb-score-cell.lb-avg .n { color: var(--w-ai-orange); }
.lb-score-cell.lb-avg .lb-bar i { background: var(--w-ai-orange); }
.lb-method { font-family: var(--w-sans); font-size: 13px; color: var(--w-dim); line-height: 1.7; margin: 22px 0 64px; }
.lb-method b { color: var(--w-muted); font-weight: 600; }

/* home page leaderboard teaser — matches .w-ai-promo card style */
.lb-teaser {
  display: grid; grid-template-columns: 84px 1fr 280px;
  gap: 28px; align-items: start; padding: 36px;
  border-radius: 20px; border: 1px solid var(--w-border);
  background:
    radial-gradient(ellipse 60% 80% at 100% 50%, rgba(217,119,87,0.15), transparent 70%),
    linear-gradient(135deg, var(--w-surface) 0%, var(--w-surface-2) 100%);
  position: relative; overflow: hidden;
}
.lb-teaser-badge {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--w-ai-orange); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 26px -8px var(--w-ai-orange);
  position: relative; flex-shrink: 0;
}
.lb-teaser-badge::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--w-ai-orange); opacity: .4;
  animation: cbot-pulse 2.4s ease-out infinite;
}
.lb-teaser-content { min-width: 0; }
.lb-teaser-eyebrow {
  font-family: var(--w-sans); font-size: 11.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--w-ai-orange);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.lb-teaser-eyebrow::after {
  content: ""; flex: 1; height: 1px; margin-left: 4px;
  background: linear-gradient(90deg, rgba(217,119,87,0.35), transparent);
}
.lb-teaser-h { font-family: var(--w-serif); font-weight: 600; font-size: clamp(22px,3vw,32px); line-height: 1.15; margin: 0 0 10px; color: var(--w-fg); }
.lb-teaser-h em { font-style: italic; color: var(--w-ai-orange); }
.lb-teaser-sub { font-family: var(--w-sans); font-size: 15px; color: var(--w-muted); margin: 0 0 22px; max-width: 40ch; line-height: 1.6; }
.lb-mini { display: flex; flex-direction: column; gap: 1px; background: var(--w-border); border: 1px solid var(--w-border); border-radius: 10px; overflow: hidden; }
.lb-mini-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; background: var(--w-surface); padding: 14px 18px; transition: background .15s; text-decoration: none; color: inherit; }
.lb-mini-row:hover { background: var(--w-surface-2); }
.lb-mini-row .r { font-family: var(--w-serif); font-style: italic; font-size: 20px; color: var(--w-dim); }
.lb-mini-row.lb-top .r { color: var(--w-ai-orange); }
.lb-mini-row .m b { font-family: var(--w-serif); font-size: 16px; font-weight: 600; display: block; color: var(--w-fg); }
.lb-mini-row .m span { font-family: var(--w-mono); font-size: 11px; color: var(--w-dim); display: block; margin-top: 1px; }
.lb-mini-row .sc { font-family: var(--w-mono); font-size: 14px; font-weight: 700; text-align: right; color: var(--w-fg); }
.lb-mini-row .sc span { display: block; font-size: 10px; letter-spacing: .08em; color: var(--w-dim); font-weight: 400; }

@media (max-width: 960px) {
  .lb-teaser { grid-template-columns: 84px 1fr; }
  .lb-teaser .lb-mini { grid-column: 2 / -1; }
}
@media (max-width: 860px) {
  .lb-podium { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lb-teaser { grid-template-columns: 1fr; padding: 28px 24px; gap: 16px; }
  .lb-teaser-badge { width: 52px; height: 52px; }
  .lb-teaser .lb-mini { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .lb-pod { padding: 20px; }
  .lb-pod-rank { font-size: 36px; }
  .lb-pod-name { font-size: 19px; }
  .lb-pod-score .v { font-size: 30px; }
}

/* ── Feeling Lucky button ─────────────────────────────────────────────────── */
.w-search-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.w-search-row .w-search { flex: 1; margin-bottom: 0; }
.w-lucky-btn {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-size: 13px; font-weight: 500; color: var(--w-muted);
  border: 1px solid var(--w-border); border-radius: 8px;
  padding: 10px 14px; transition: color .15s, border-color .15s, background .15s;
  white-space: nowrap;
}
@media (hover: hover) {
  .w-lucky-btn:hover { color: var(--w-accent); border-color: var(--w-accent); }
}
@media (max-width: 480px) {
  .w-lucky-label { display: none; }
  .w-lucky-btn { padding: 10px 12px; }
}
