/* ─────────────────────────────────────────────────────────────────────────
   Perivitta Rajendran — Custom design system
   Purple/Violet accent · Lora + Source Sans 3
   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:         "Lora", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --w-sans:          "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --w-mono:          "JetBrains 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: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer;
  color: inherit; opacity: .82; margin-left: 2px;
  transition: opacity .15s ease, background .15s ease, transform .25s ease;
}
.w-nav-mode:hover { opacity: 1; background: color-mix(in oklab, currentColor 8%, transparent); transform: rotate(20deg); }

/* ── 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) {
  .w-nav { padding: 12px 16px; }
  .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, transparent 0%, transparent 55%, rgba(0,0,0,.18) 100%),
    radial-gradient(ellipse 80% 60% at 50% 50%, transparent 40%, rgba(0,0,0,.18) 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-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: 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: 19px;
  line-height: 1.75;
}
.w-article-body h2 {
  font-family: var(--w-serif); font-weight: 600;
  font-size: 28px; 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: 22px; 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: 18px; 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: 19px; 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: 22px; 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; }
.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 {
  width: 100%; border-collapse: collapse; margin: 1.6em 0;
  font-family: var(--w-sans); font-size: 15px;
}
.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-accent); transform: translateY(-2px); }
.w-channel-icn {
  width: 44px; height: 44px;
  background: var(--w-accent-soft); color: var(--w-accent);
  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-accent); }

.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-accent); 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-accent) !important;
  box-shadow: 0 0 0 4px var(--w-accent-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-accent); 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-accent); align-self: flex-start;
}
.w-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px var(--w-accent); color: #fff; }
.w-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── footer ── */
.w-foot {
  padding: 50px 32px 36px; margin-top: 40px;
  border-top: 1px solid var(--w-border); background: var(--w-surface);
}
.w-foot-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 24px; align-items: end;
}
@media (min-width: 720px) { .w-foot-inner { grid-template-columns: 1fr auto auto; } }
.w-foot-brand { font-family: var(--w-serif); font-weight: 600; font-size: 18px; color: var(--w-fg); }
.w-foot-tag   { font-family: var(--w-sans); font-size: 13px; color: var(--w-muted); margin-top: 4px; }
.w-foot-socials { display: flex; gap: 14px; align-items: center; }
.w-foot-icn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: var(--w-bg); color: var(--w-muted);
  border: 1px solid var(--w-border); text-decoration: none;
  transition: color .15s ease, border-color .15s ease, transform .2s ease;
}
.w-foot-icn:hover { color: var(--w-accent); border-color: var(--w-accent); transform: translateY(-2px); }
.w-foot-copy { font-family: var(--w-sans); font-size: 12px; color: var(--w-dim); letter-spacing: .04em; }

/* ── 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%; white-space: pre-wrap; 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-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 */

/* ── 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: responsive table scroll ────────────────────────────────────── */
.w-article-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── 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; }
}
