/* Highlight Keywords - themeable palette
   One accent: highlighter yellow #ffd400. Text on yellow is always ink.
   Light is the default (:root). Dark is applied when the pre-paint boot
   script adds <html data-theme="dark">, which happens for every visitor who
   has not chosen light, so the original dark look is preserved for everyone. */

:root {
  --bg: #f6f6f2;
  --bg-2: #efefe9;
  --bg-3: #eae9e2;
  --panel: #ffffff;
  --panel-2: #f4f4ef;
  --field: #ffffff;
  --ink: #1a1c22;
  --muted: #5c6472;
  --soft: #5e6472;
  --brand: #ffd400;
  --brand-hover: #ffd92e;
  --brand-soft: rgba(255, 212, 0, 0.18);
  --brand-line: rgba(214, 170, 0, 0.55);
  --ink-on-brand: #17171a;
  --line: rgba(0, 0, 0, 0.10);
  --line-strong: rgba(0, 0, 0, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e0f14;
  --bg-2: #101219;
  --bg-3: #0c0d12;
  --panel: #151823;
  --panel-2: #141722;
  --field: #0d0f16;
  --ink: #f4f5f8;
  --muted: #a9aebc;
  --soft: #7c8292;
  --brand: #ffd400;
  --brand-hover: #ffdb2e;
  --brand-soft: rgba(255, 212, 0, 0.1);
  --brand-line: rgba(255, 212, 0, 0.28);
  --ink-on-brand: #17171a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
/* Anchored sections land below the sticky nav, not under it. */
section[id] { scroll-margin-top: 90px; }

/* The page colour lives on <html> so the fixed background layers (which are
   children of <body> at z-index:-1) paint above it but below the content. */
html {
  background: var(--bg);
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

/* Film grain so large dark areas do not band */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  opacity: 0.022;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--brand); color: var(--ink-on-brand); }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #262b3a; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #333a4e; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

a { color: var(--ink); text-decoration: none; }
p a, li a, .a a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: var(--brand-line);
  text-underline-offset: 3px;
}
p a:hover, li a:hover, .a a:hover { text-decoration-color: var(--brand); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

section { padding: clamp(72px, 9vw, 120px) 0; }
section h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
.sub { color: var(--muted); max-width: 40em; margin: 14px 0 44px; line-height: 1.65; }

.alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out),
    background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn.yellow {
  background: var(--brand);
  color: var(--ink-on-brand);
}
.btn.yellow:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(255, 212, 0, 0.22);
}
.btn.yellow:active { transform: translateY(0) scale(0.98); }
.btn.ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn.ghost:hover {
  border-color: var(--brand-line);
  background: rgba(255, 255, 255, 0.03);
}
.btn.small { padding: 9px 18px; font-size: 0.875rem; border-radius: 10px; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 15, 20, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.navrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.02rem;
}
.logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--ink-on-brand);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(255, 212, 0, 0.22);
}
.nav .links { display: flex; align-items: center; gap: 28px; }
.nav .links > a:not(.btn) {
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav .links > a:not(.btn):hover { color: var(--ink); }

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  place-items: center;
}
.menu-btn svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 124px) 0 clamp(64px, 8vw, 104px);
}
.hero::before {
  content: "";
  position: absolute;
  top: -320px;
  left: 50%;
  width: 920px;
  height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 212, 0, 0.09), transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -260px;
  right: -180px;
  width: 640px;
  height: 520px;
  background: radial-gradient(closest-side, rgba(255, 212, 0, 0.05), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
  position: relative;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.815rem;
  font-weight: 500;
  margin-bottom: 26px;
}
.pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 10px rgba(255, 212, 0, 0.8);
}

.hero h1 {
  font-size: clamp(2.35rem, 5vw, 3.55rem);
  line-height: 1.07;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.mk, .mk2 {
  color: var(--ink-on-brand);
  padding: 0.04em 0.16em;
  margin: 0 -0.02em;
  border-radius: 0.17em;
  background-image: linear-gradient(100deg, var(--brand), #ffdd33);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lead {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 33em;
  margin: 22px 0 0;
}
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 0; }
.under { color: var(--soft); font-size: 0.875rem; margin: 18px 0 0; }

/* Load-in choreography */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeup {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes mksweep {
    0% { background-size: 0% 100%; color: var(--ink); }
    55% { color: var(--ink-on-brand); }
    100% { background-size: 100% 100%; color: var(--ink-on-brand); }
  }
  @keyframes windowin {
    from { opacity: 0; transform: translateY(26px) scale(0.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes drift {
    from { transform: translateX(-50%); }
    to { transform: translateX(-46%) translateY(24px); }
  }
  .hero .pill { animation: fadeup 0.7s var(--ease-out) 0.05s backwards; }
  .hero h1 { animation: fadeup 0.7s var(--ease-out) 0.12s backwards; }
  .hero .lead { animation: fadeup 0.7s var(--ease-out) 0.22s backwards; }
  .hero .cta { animation: fadeup 0.7s var(--ease-out) 0.32s backwards; }
  .hero .under { animation: fadeup 0.7s var(--ease-out) 0.4s backwards; }
  .hero .window { animation: windowin 0.9s var(--ease-out) 0.25s backwards; }
  .hero .mk { animation: mksweep 0.9s var(--ease-out) 0.55s backwards; }
  .hero::before { animation: drift 16s ease-in-out infinite alternate; }
}

/* ---------- Browser window mockup ---------- */

.window {
  background: linear-gradient(180deg, #181c29, #131622);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.winbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.winbar .dot { width: 10px; height: 10px; border-radius: 50%; background: #272c3c; }
.addr {
  flex: 1;
  margin: 0 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.78rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}
.winlogo {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--ink-on-brand);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.8rem;
}
.winbadge {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 16px;
  padding: 1px 5px;
  border-radius: 8px;
  background: var(--brand);
  border: 2px solid #171a26;
  color: var(--ink-on-brand);
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.5;
}

.demo-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
/* The call to action is drawn as an actual highlight mark: brand yellow,
   dark ink, impossible to read as decoration. */
.demo-input label {
  background: var(--brand);
  color: #17171a;
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 7px;
  box-shadow: 0 2px 10px rgba(255, 212, 0, 0.25);
  cursor: pointer;
}
.demo-input input {
  flex: 1;
  min-width: 0;
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ink);
  font: inherit;
  font-size: 0.925rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.demo-input input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.16);
}

.demo-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 0 14px 12px;
}
.demo-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
}
.demo-check input { accent-color: var(--brand); cursor: pointer; }
.demo-pro {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  padding: 1px 7px;
}
.demo-hint { color: var(--soft); font-size: 0.78rem; }
.demo-fuzzynote { margin: -6px 14px 12px; color: var(--brand); opacity: 0.85; }
/* Fuzzy toggle + demo-language picker share the left of the tools row */
.demo-tools-main {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.demo-langs { display: inline-flex; align-items: center; gap: 8px; }
.demo-langs-label {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
/* Compact version of the site's .lang select, same look and yellow focus */
.demo-lang {
  font-size: 0.8rem;
  padding: 6px 30px 6px 11px;
  border-radius: 9px;
  max-width: 200px;
}
[dir="rtl"] .demo-lang { padding: 6px 11px 6px 30px; }

.panel {
  position: relative;
  margin: 0 14px 14px;
  padding: 16px 26px 16px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.65;
}
.panel .tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.panel.light { background: #f7f7f3; color: #23252d; border: 1px solid #e6e6df; }
.panel.light .tag { color: #8b8e99; }
/* The two sample panels demonstrate the product on a light page and a dark
   page, so they must look identical in both site themes. Their colours are
   hardcoded (the dark one to the original dark-theme values) instead of using
   themed vars that would flip. */
.panel.dark { background: #0b0d13; color: #c6cad7; border: 1px solid rgba(255, 255, 255, 0.08); }
.panel.dark .tag { color: #7c8292; }
/* The sample text is a block so a per-language dir + text-align take hold,
   letting an Urdu/Arabic sample read right-to-left inside an LTR page. */
.panel [data-demo] { display: block; }

mark {
  position: relative;
  background: var(--brand);
  color: var(--ink-on-brand);
  padding: 0.05em 0.03em;
  border-radius: 1px;
  font-weight: 600;
  cursor: pointer;
}
.copychip {
  position: absolute;
  left: 50%;
  top: -1.9em;
  transform: translateX(-50%);
  background: #1a1e2b;
  color: #f4f5f8;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes chippop {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
  .copychip { animation: chippop 0.18s var(--ease-out); }
}

.rail { position: absolute; top: 12px; bottom: 12px; right: 7px; width: 4px; pointer-events: none; }
.rail i {
  position: absolute;
  left: 0;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: var(--brand);
}
.rail i:nth-child(1) { top: 28%; }
.rail i:nth-child(2) { top: 52%; }
.rail i:nth-child(3) { top: 74%; }

/* ---------- Feature cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-line);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  border: 1px solid rgba(255, 212, 0, 0.18);
  color: var(--brand);
  margin-bottom: 16px;
}
.ico svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; margin: 0; }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.step {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.step .num {
  display: block;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin: 0; }

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
}
.plan {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 32px 30px;
}
.plan.pro {
  background: linear-gradient(180deg, rgba(255, 212, 0, 0.07), rgba(255, 212, 0, 0.015) 55%), var(--panel-2);
  border-color: rgba(255, 212, 0, 0.4);
  box-shadow: 0 0 70px rgba(255, 212, 0, 0.06);
}
.plantag {
  position: absolute;
  top: 26px;
  right: 26px;
  background: var(--brand);
  color: var(--ink-on-brand);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.plan .name { font-weight: 700; font-size: 0.95rem; color: var(--muted); }
.plan.pro .name { color: var(--ink); }
.plan .price {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 12px 0 2px;
  line-height: 1;
}
.plan .per { color: var(--soft); font-size: 0.875rem; }
.plan ul { list-style: none; margin: 24px 0 0; padding: 0; }
.plan li {
  position: relative;
  padding: 10px 0 10px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}
.plan li:first-child { border-top: 0; }
.plan li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 14px;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd400' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan .btn { width: 100%; margin-top: 26px; }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  position: relative;
  padding: 21px 44px 21px 0;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand); }
.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd400' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a {
  padding: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 62ch;
}

/* ---------- Page head (inner pages) ---------- */

.page-head { padding: clamp(56px, 7vw, 92px) 0 clamp(20px, 3vw, 32px); max-width: 740px; }
.page-head h1 {
  font-size: clamp(1.95rem, 3.8vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.page-head p { color: var(--muted); font-size: 1.075rem; line-height: 1.65; margin: 18px 0 0; }

/* ---------- Guide / docs ---------- */

.doc {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 56px;
  padding: 24px 0 clamp(80px, 10vw, 130px);
}
.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.9rem;
}
.toc b {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 10px;
  padding-left: 12px;
}
.toc a {
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.15s, background-color 0.15s;
}
.toc a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }

.doc-body { min-width: 0; max-width: 70ch; }
.doc-body h2 {
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  margin: 56px 0 16px;
  scroll-margin-top: 96px;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: var(--muted); line-height: 1.75; }
.doc-body b { color: var(--ink); font-weight: 600; }
.doc-body ul { padding-left: 22px; }
.doc-body li { margin: 8px 0; }

.kbd {
  display: inline-block;
  background: #1a1e2b;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 0.82em;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.tip {
  margin: 22px 0;
  padding: 15px 18px;
  background: rgba(255, 212, 0, 0.06);
  border: 1px solid rgba(255, 212, 0, 0.16);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.65;
}

/* ---------- Legal / changelog ---------- */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 84px) 24px clamp(90px, 11vw, 140px);
}
.legal h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.3rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}
.legal .updated { color: var(--soft); font-size: 0.9rem; margin: 12px 0 40px; }
.legal h2 { font-size: 1.3rem; margin: 44px 0 12px; }
.legal p, .legal li { color: var(--muted); line-height: 1.75; }
.legal ul { padding-left: 22px; }
.legal li { margin: 8px 0; }
.legal strong, .legal b { color: var(--ink); font-weight: 600; }

.legal h2.ver {
  display: inline-block;
  background: var(--brand-soft);
  border: 1px solid rgba(255, 212, 0, 0.25);
  color: var(--brand);
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ---------- Coffee sticker ---------- */

.sticker {
  display: inline-grid;
  place-items: center;
  width: 152px;
  height: 152px;
  border-radius: 50%;
  background: #f7f2e2;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transform: rotate(-3deg);
  margin-bottom: 26px;
}

/* ---------- Footer ---------- */

footer {
  background: var(--bg-3);
  border-top: 1px solid var(--line);
  padding: 46px 0 58px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--soft);
  font-size: 0.9rem;
}
footer .links { display: flex; flex-wrap: wrap; gap: 22px; }
footer .links a { color: var(--muted); font-size: 0.9rem; }
footer .links a:hover { color: var(--ink); }

/* ---------- Language picker + i18n ---------- */

.lang {
  appearance: none;
  -webkit-appearance: none;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8292' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lang:hover { border-color: var(--brand-line); color: var(--ink); }
.lang:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.16); }

.lang-note {
  margin: 20px 0 0;
  padding: 12px 16px;
  background: rgba(255, 212, 0, 0.06);
  border: 1px solid rgba(255, 212, 0, 0.16);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

html[lang="ar"] body { font-family: "Noto Sans Arabic", "Inter", sans-serif; }
html[lang="bn"] body { font-family: "Noto Sans Bengali", "Inter", sans-serif; }
/* Bengali glyphs run taller than Latin at equal px; pull the root down a notch */
html[lang="bn"] { font-size: 15px; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="bn"] h1, html[lang="bn"] h2, html[lang="bn"] h3 { letter-spacing: 0; }

[dir="rtl"] .lang { background-position: left 10px center; padding: 8px 12px 8px 32px; }
[dir="rtl"] .plan li { padding: 10px 30px 10px 0; }
[dir="rtl"] .plan li::before { left: auto; right: 2px; }
[dir="rtl"] .plantag { right: auto; left: 26px; }
[dir="rtl"] .faq summary { padding: 21px 0 21px 44px; }
[dir="rtl"] .faq summary::after { right: auto; left: 4px; }
[dir="rtl"] .tip, [dir="rtl"] .lang-note { border-left: 1px solid rgba(255, 212, 0, 0.16); border-right: 3px solid var(--brand); }
[dir="rtl"] .panel { padding: 16px 16px 16px 26px; }
[dir="rtl"] .rail { right: auto; left: 7px; }
[dir="rtl"] .doc-body ul, [dir="rtl"] .legal ul { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .toc b, [dir="rtl"] .toc a { padding-left: 0; padding-right: 12px; }

@media (max-width: 780px) {
  [dir="rtl"] .plantag { position: static; }
}

/* ---------- Scroll reveal ---------- */

.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rv { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; gap: 32px; }
  .toc {
    /* relative, not static: the sliding .toc-ink marker anchors to the toc */
    position: relative;
    top: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }
  .toc b { width: 100%; padding-left: 0; }
  .toc a { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
}

@media (max-width: 780px) {
  .menu-btn { display: grid; }
  .nav .links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 20px 20px;
    background: #12141c;
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
  .nav .links.open { display: flex; }
  .nav .links > a:not(.btn) { padding: 12px 6px; font-size: 1rem; }
  .nav .links .btn { margin-top: 12px; }
  .plans { grid-template-columns: 1fr; }
  .plantag { position: static; display: inline-block; margin-bottom: 14px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: stretch; }
  .demo-input { flex-wrap: wrap; }
}

/* Scrollspy: one yellow marker (.toc-ink, created by site.js) slides behind
   the active TOC link instead of each link flashing its own background, so
   fast scrolling glides through sections instead of jump-cutting. */
.toc-ink {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  background: var(--brand);
  border-radius: 8px;
  opacity: 0;
  transform: translate(0, 0);
  transition:
    transform 0.28s cubic-bezier(0.25, 1, 0.35, 1),
    width 0.28s cubic-bezier(0.25, 1, 0.35, 1),
    height 0.28s cubic-bezier(0.25, 1, 0.35, 1),
    opacity 0.2s;
  pointer-events: none;
  will-change: transform;
}
.toc.has-ink .toc-ink { opacity: 1; }
.toc a { position: relative; z-index: 1; }
.toc a.on,
.toc a.on:hover {
  background: transparent;
  color: #17171a;
  font-weight: 700;
  transition-delay: 0.08s; /* let the marker arrive before the text darkens */
}
@media (prefers-reduced-motion: reduce) {
  .toc-ink { transition: opacity 0.2s; }
  .toc a.on, .toc a.on:hover { transition-delay: 0s; }
}

/* Guide screenshots */
.doc-body figure.shot { margin: 22px 0 30px; }
.doc-body figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.doc-body figure.shot figcaption {
  font-size: 0.85rem;
  color: var(--soft);
  line-height: 1.6;
  margin-top: 10px;
}

/* Marker-wipe page transitions. A skewed highlighter band sweeps over the
   page on same-site navigation (html.sweep-go, added by site.js), and sweeps
   off on the next page (html.sweep-in, added pre-paint by transition.js). */
body::after {
  content: "";
  position: fixed;
  top: -12vh;
  left: -20vw;
  width: 150vw;
  height: 124vh;
  background: var(--brand);
  border-left: 14px solid #17171a;
  border-right: 14px solid #17171a;
  transform: translateX(-160%) skewX(-9deg);
  will-change: transform;
  z-index: 2147483000;
  pointer-events: none;
}
html.sweep-go body::after {
  animation: hkSweepIn 0.26s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
html.sweep-in body::after {
  animation: hkSweepOut 0.38s cubic-bezier(0.65, 0, 0.35, 1) 0.03s both;
}
@keyframes hkSweepIn {
  from { transform: translateX(-160%) skewX(-9deg); }
  to { transform: translateX(0) skewX(-9deg); }
}
@keyframes hkSweepOut {
  from { transform: translateX(0) skewX(-9deg); }
  to { transform: translateX(160%) skewX(-9deg); }
}
@media (prefers-reduced-motion: reduce) {
  html.sweep-go body::after,
  html.sweep-in body::after {
    animation: none;
  }
}


/* Attract mode: until someone touches the try-it box, the input glows and
   the label types itself with a soft breathing glow, so nobody mistakes
   the demo for a screenshot. */
.demo-input.attract input {
  animation: hkAttract 1.7s ease-in-out infinite;
}
@keyframes hkAttract {
  0%, 100% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(255, 212, 0, 0); }
  50% { border-color: var(--brand); box-shadow: 0 0 0 6px rgba(255, 212, 0, 0.13); }
}
.demo-input.attract label {
  animation: hkLabelGlow 1.7s ease-in-out infinite;
}
@keyframes hkLabelGlow {
  0%, 100% { box-shadow: 0 2px 10px rgba(255, 212, 0, 0.25); }
  50% { box-shadow: 0 0 24px rgba(255, 212, 0, 0.65); }
}
@media (prefers-reduced-motion: reduce) {
  .demo-input.attract input,
  .demo-input.attract label {
    animation: none;
  }
}

/* ---------- Custom demo-language picker ----------
   Branded combobox that replaces the native <select id="demoLang">. The select
   is hidden by demo-lang-select.js (JS only, so no-JS visitors keep it) and
   stays the source of truth; this is purely the visible skin. */

.dls { position: relative; display: inline-flex; max-width: 100%; }

/* Trigger: same field language as .lang and the demo inputs. */
.dls-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  padding: 6px 10px 6px 12px;
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.dls-trigger:hover { border-color: var(--brand-line); background: rgba(255, 255, 255, 0.02); }
.dls-trigger:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.16);
}
.dls-current { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; }
.dls-native {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dls-en {
  color: var(--soft);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9em;
}
.dls-en[hidden] { display: none; }
.dls-chevron {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--soft);
  transition: transform 0.24s var(--ease-out), color 0.2s;
}
.dls-trigger:hover .dls-chevron { color: var(--muted); }
.dls.open .dls-chevron { transform: rotate(180deg); color: var(--brand); }

/* Panel: elevated dark card. position:fixed on purpose so it escapes the demo
   window's overflow:hidden; demo-lang-select.js sets left/top from the trigger
   rect and keeps it in view on scroll/resize. */
.dls-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  min-width: 272px;
  max-width: min(92vw, 372px);
  max-height: 340px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.62),
    0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform-origin: top center;
  opacity: 0;
  transform: translateY(-4px) scale(0.96);
  transition: opacity 0.11s var(--ease-out), transform 0.11s var(--ease-out);
}
.dls-panel[hidden] { display: none; }
.dls.open .dls-panel {
  opacity: 1;
  transform: none;
  transition-duration: 0.16s;
}

/* Filter row, pinned at the top. */
.dls-search { position: relative; flex: none; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.dls-search-ico {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--soft);
  pointer-events: none;
}
.dls-filter {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 8px 34px;
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dls-filter::placeholder { color: var(--soft); }
.dls-filter:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.16);
}

/* Options list: the scroll lives here, not on the card. */
.dls-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.dls-list[hidden] { display: none; }

.dls-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  scroll-margin: 6px;
}
.dls-opt.dls-hide { display: none; }
.dls-opt-native-wrap { flex: 1 1 auto; min-width: 0; }

/* The marker swipe, reused from the languages page .lang-native idiom: a brand
   gradient grows behind the native name on hover / keyboard focus. */
.dls-opt-native {
  display: inline;
  unicode-bidi: isolate;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
  border-radius: 0.16em;
  padding: 0.06em 0.16em;
  background-image: linear-gradient(100deg, var(--brand), #ffdd33);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.4s var(--ease-out), color 0.28s var(--ease-out) 0.06s;
}
.dls-opt.rtl .dls-opt-native { background-position: right center; }

.dls-opt-en {
  flex: none;
  max-width: 46%;
  color: var(--soft);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dls-check {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--brand);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s, transform 0.18s var(--ease-out);
}

/* Selected row: check + faint brand tint, but readable (no sweep) at rest. */
.dls-opt.is-selected { background: var(--brand-soft); }
.dls-opt.is-selected .dls-check { opacity: 1; transform: none; }

/* Hover / keyboard-active row: lift + the marker sweep fills. Declared after
   the selected rules so an active+selected row still sweeps. */
.dls-opt:hover,
.dls-opt.is-active { background: rgba(255, 255, 255, 0.055); }
.dls-opt:hover .dls-opt-native,
.dls-opt.is-active .dls-opt-native {
  background-size: 100% 100%;
  color: var(--ink-on-brand);
}

.dls-none {
  padding: 16px 14px 18px;
  color: var(--soft);
  font-size: 0.85rem;
  text-align: center;
}
.dls-none[hidden] { display: none; }

/* RTL site UI: flip the filter icon + padding. Per-option sweeps are handled
   by .dls-opt.rtl above, keyed off each language's own direction. */
[dir="rtl"] .dls-filter { padding: 8px 34px 8px 12px; }
[dir="rtl"] .dls-search-ico { left: auto; right: 22px; }

/* Entrance: panel scales/fades in via the transition above; options stagger in,
   but only the first ~12 carry a delay so the whole reveal stays snappy. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes dlsOptIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: none; }
  }
  .dls.open.animate .dls-opt {
    opacity: 0;
    animation: dlsOptIn 0.19s var(--ease-out) both;
  }
  .dls.open.animate .dls-opt:nth-child(1) { animation-delay: 0ms; }
  .dls.open.animate .dls-opt:nth-child(2) { animation-delay: 16ms; }
  .dls.open.animate .dls-opt:nth-child(3) { animation-delay: 32ms; }
  .dls.open.animate .dls-opt:nth-child(4) { animation-delay: 48ms; }
  .dls.open.animate .dls-opt:nth-child(5) { animation-delay: 64ms; }
  .dls.open.animate .dls-opt:nth-child(6) { animation-delay: 80ms; }
  .dls.open.animate .dls-opt:nth-child(7) { animation-delay: 96ms; }
  .dls.open.animate .dls-opt:nth-child(8) { animation-delay: 112ms; }
  .dls.open.animate .dls-opt:nth-child(9) { animation-delay: 128ms; }
  .dls.open.animate .dls-opt:nth-child(10) { animation-delay: 144ms; }
  .dls.open.animate .dls-opt:nth-child(11) { animation-delay: 160ms; }
  .dls.open.animate .dls-opt:nth-child(12) { animation-delay: 176ms; }
  .dls.open.animate .dls-opt:nth-child(n + 13) { animation-delay: 0ms; }
}

/* No motion: everything is instant and static, sweep included. */
@media (prefers-reduced-motion: reduce) {
  .dls-panel { transition: none; opacity: 1; transform: none; }
  .dls-chevron,
  .dls-opt-native,
  .dls-check,
  .dls-filter { transition: none; }
  .dls.open.animate .dls-opt { animation: none; opacity: 1; }
}

/* Mobile: JS widens the panel to nearly the demo card; keep touch targets tall
   and let the trigger shrink to the row. */
@media (max-width: 560px) {
  .dls, .dls-trigger { max-width: 100%; }
  .dls-opt { min-height: 44px; }
}

/* ============================================================
   Light theme corrections
   The dark theme keeps every original value (the rules above are
   left untouched); the rules below only match when there is no
   data-theme="dark" on <html>, i.e. the light theme. They swap the
   handful of hardcoded colours that assumed a dark surface.
   ============================================================ */
:root:not([data-theme="dark"]) ::-webkit-scrollbar-thumb { background: #cfcfc6; }
:root:not([data-theme="dark"]) ::-webkit-scrollbar-thumb:hover { background: #bcbcb2; }
:root:not([data-theme="dark"]) .nav { background: rgba(246, 246, 242, 0.72); }
:root:not([data-theme="dark"]) .pill { background: rgba(0, 0, 0, 0.03); }
:root:not([data-theme="dark"]) .btn.ghost:hover { background: rgba(0, 0, 0, 0.04); }
:root:not([data-theme="dark"]) .window {
  background: linear-gradient(180deg, #ffffff, #f4f4ef);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
:root:not([data-theme="dark"]) .winbar .dot { background: #d7d7ce; }
:root:not([data-theme="dark"]) .winbadge { border-color: #ffffff; }
:root:not([data-theme="dark"]) .kbd { background: #eeeee7; border-color: rgba(0, 0, 0, 0.16); }
:root:not([data-theme="dark"]) .toc a:hover { background: rgba(0, 0, 0, 0.05); }
:root:not([data-theme="dark"]) .sticker {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}
:root:not([data-theme="dark"]) .dls-trigger:hover { background: rgba(0, 0, 0, 0.02); }
:root:not([data-theme="dark"]) .dls-opt:hover,
:root:not([data-theme="dark"]) .dls-opt.is-active { background: rgba(0, 0, 0, 0.05); }

/* Brand yellow works as a fill behind dark text (marks, buttons, badges), but
   as a thin foreground (icons, small labels, links, tick marks) #ffd400 is far
   too pale on the light surface. The light theme renders those foregrounds in a
   dark gold that still reads as the brand accent; the dark theme keeps pure
   #ffd400. Yellow fills are left untouched in both themes. */
:root:not([data-theme="dark"]) .ico,
:root:not([data-theme="dark"]) .step .num,
:root:not([data-theme="dark"]) .wl-step .num,
:root:not([data-theme="dark"]) .demo-pro,
:root:not([data-theme="dark"]) .demo-fuzzynote,
:root:not([data-theme="dark"]) .legal h2.ver { color: #7a6200; }
:root:not([data-theme="dark"]) .demo-pro { border-color: rgba(122, 98, 0, 0.5); }
:root:not([data-theme="dark"]) .legal h2.ver { border-color: rgba(122, 98, 0, 0.4); }
:root:not([data-theme="dark"]) p a,
:root:not([data-theme="dark"]) li a,
:root:not([data-theme="dark"]) .a a { color: #7a6200; text-decoration-color: rgba(122, 98, 0, 0.55); }
:root:not([data-theme="dark"]) p a:hover,
:root:not([data-theme="dark"]) li a:hover,
:root:not([data-theme="dark"]) .a a:hover { text-decoration-color: #7a6200; }
:root:not([data-theme="dark"]) .faq summary:hover { color: #7a6200; }
:root:not([data-theme="dark"]) .plan li::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a6200' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
:root:not([data-theme="dark"]) .faq summary::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a6200' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 900px) {
  :root:not([data-theme="dark"]) .toc a { background: rgba(0, 0, 0, 0.04); }
}
@media (max-width: 780px) {
  :root:not([data-theme="dark"]) .nav .links {
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
  }
}

/* ============================================================
   Theme toggle (sun / moon pill). Copied verbatim; theme-correct
   as-is: light = blue sky with the sun on the left, dark = night
   sky with the moon on the right.
   ============================================================ */
#theme-toggle{position:relative;width:64px;height:30px;border-radius:30px;border:none;cursor:pointer;flex-shrink:0;padding:0;overflow:hidden;background:linear-gradient(180deg,#87cefa 0%,#b3d9f0 100%);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.2);transition:background 0.5s ease}
[data-theme="dark"] #theme-toggle{background:linear-gradient(180deg,#1a1f3a 0%,#2d2d3d 100%)}
.toggle-clouds{position:absolute;inset:0;pointer-events:none;transition:opacity 0.4s,transform 0.5s}
.toggle-clouds::before,.toggle-clouds::after{content:'';position:absolute;background:rgba(255,255,255,0.85);border-radius:50%}
.toggle-clouds::before{width:14px;height:8px;top:16px;right:8px;box-shadow:-4px -2px 0 -1px rgba(255,255,255,0.85),6px -1px 0 -2px rgba(255,255,255,0.85)}
.toggle-clouds::after{width:10px;height:6px;top:6px;right:18px;box-shadow:-6px 2px 0 -1px rgba(255,255,255,0.7)}
[data-theme="dark"] .toggle-clouds{opacity:0;transform:translateX(20px)}
.toggle-stars{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity 0.4s 0.1s,transform 0.5s;transform:translateX(-20px)}
.toggle-stars::before,.toggle-stars::after{content:'';position:absolute;background:#fff;border-radius:50%;width:2px;height:2px}
.toggle-stars::before{top:8px;left:10px;box-shadow:6px 6px 0 -0.5px #fff,14px 2px 0 -0.5px #fff,4px 16px 0 -0.5px #fff,18px 14px 0 -0.5px rgba(255,255,255,0.7)}
.toggle-stars::after{top:14px;left:22px;width:1.5px;height:1.5px;box-shadow:-8px 4px 0 -0.5px rgba(255,255,255,0.6)}
[data-theme="dark"] .toggle-stars{opacity:1;transform:translateX(0)}
.toggle-disc{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#ffe066 0%,#ffcc33 60%,#f5b800 100%);box-shadow:0 2px 4px rgba(0,0,0,0.25),inset -1px -2px 3px rgba(180,120,0,0.3);transform:translateX(0);will-change:transform;transition:transform 0.45s cubic-bezier(0.68,-0.55,0.265,1.55),background 0.4s}
[data-theme="dark"] .toggle-disc{transform:translateX(34px);background:radial-gradient(circle at 35% 35%,#e8e8e8 0%,#b8b8b8 65%,#888 100%);box-shadow:0 2px 4px rgba(0,0,0,0.4),inset -1px -2px 3px rgba(40,40,40,0.4)}
.toggle-disc::before,.toggle-disc::after{content:'';position:absolute;border-radius:50%;background:rgba(100,100,100,0.5);opacity:0;transition:opacity 0.3s 0.2s}
.toggle-disc::before{width:5px;height:5px;top:6px;left:7px}
.toggle-disc::after{width:3px;height:3px;top:14px;left:14px;box-shadow:-7px -2px 0 -0.5px rgba(100,100,100,0.5)}
[data-theme="dark"] .toggle-disc::before,[data-theme="dark"] .toggle-disc::after{opacity:1}
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}
::view-transition-old(root){z-index:1}
::view-transition-new(root){z-index:9999}
.toggle-disc{view-transition-name:theme-toggle-disc}
::view-transition-group(theme-toggle-disc){animation-duration:0.45s}
/* Line the pill up with the other nav items (row on desktop, column on mobile). */
.nav .links #theme-toggle { align-self: center; }

