/* react-native-strx documentation site */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-subtle: #f8f9fb;
  --bg-inset: #f2f4f7;
  --fg: #0b1020;
  --fg-muted: #4a5266;
  --fg-faint: #667085;
  --line: #e7e9ef;
  --line-strong: #d3d8e2;
  --code-bg: #f6f7f9;
  --code-fg: #1f2433;
  --code-dim: #7a8296;
  --accent: #3552f0;
  --accent-hover: #2440d6;
  --accent-fg: #ffffff;
  --accent-soft: #eef1ff;
  --link: #2f4fe0;
  --t-preset: #1d4ed8;
  --t-preset-bg: #eff4ff;
  --t-key: #7c3aed;
  --t-key-bg: #f5f0ff;
  --t-layout: #0f766e;
  --t-layout-bg: #ecfbf8;
  --t-time: #b45309;
  --t-time-bg: #fff7e6;
  --t-exit: #be123c;
  --t-exit-bg: #fff0f3;
  --t-trans: #15803d;
  --t-trans-bg: #eefbf2;
  --t-preset-ring: #c9d9ff;
  --t-key-ring: #e2d5ff;
  --t-layout-ring: #bdede3;
  --t-time-ring: #f8dfa8;
  --t-exit-ring: #fbcad4;
  --t-trans-ring: #bfebcc;
  --ic-bg: #f3f4f8;
  --ic-ring: #e3e6ee;
  --prop: #0369a1;
  --type: #7c3aed;
  --type-bg: #f5f0ff;
  --type-ring: #e6dbff;
  --num: #c2410c;
  --kv-key: #be185d;
  --ink-bg: #0b1020;
  --ink-bar: #141a2e;
  --ink-ring: transparent;
  --ink-line: #1c2440;
  --t-bad: #b42318;
  --t-string: #8f5200;
  --t-comment: #8a91a3;
  --card: #ffffff;
  --phone: #f2f4f7;
  --phone-line: #d9dde6;
  --note-bg: #f5f7ff;
  --note-line: #c9d3ff;
  --warn-bg: #fff8eb;
  --warn-line: #f5d38f;
  --warn-fg: #92400e;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.08);
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 60px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0e17;
  --bg-subtle: #10141f;
  --bg-inset: #171c29;
  --fg: #eef0f6;
  --fg-muted: #aab1c3;
  --fg-faint: #7d859a;
  --line: #1f2535;
  --line-strong: #2c3346;
  --code-bg: #0f1320;
  --code-fg: #dfe3ee;
  --code-dim: #6f7890;
  --accent: #7b93ff;
  --accent-hover: #93a7ff;
  --accent-fg: #0b0e17;
  --accent-soft: #1a2142;
  --link: #93a7ff;
  --t-preset: #93c5fd;
  --t-preset-bg: #14203d;
  --t-key: #c4b5fd;
  --t-key-bg: #1e1838;
  --t-layout: #5eead4;
  --t-layout-bg: #0d2a2a;
  --t-time: #fcd34d;
  --t-time-bg: #2a2110;
  --t-exit: #fda4af;
  --t-exit-bg: #2e1520;
  --t-trans: #86efac;
  --t-trans-bg: #10261a;
  --t-preset-ring: #22345f;
  --t-key-ring: #33295a;
  --t-layout-ring: #164543;
  --t-time-ring: #4a3a16;
  --t-exit-ring: #4d2233;
  --t-trans-ring: #1c4029;
  --ic-bg: #161b29;
  --ic-ring: #262d40;
  --prop: #7dd3fc;
  --type: #c4b5fd;
  --type-bg: #1e1838;
  --type-ring: #33295a;
  --num: #fdba74;
  --kv-key: #f9a8d4;
  --ink-bg: #0f1424;
  --ink-bar: #141a2c;
  --ink-ring: #232a3f;
  --ink-line: #1a2238;
  --t-bad: #ff8a80;
  --t-string: #f5b84d;
  --t-comment: #6f7890;
  --card: #10141f;
  --phone: #171c29;
  --phone-line: #2c3346;
  --note-bg: #131a33;
  --note-line: #2b3770;
  --warn-bg: #2a1f0e;
  --warn-line: #5c4415;
  --warn-fg: #f5c46b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
}

code,
pre,
kbd,
.mono {
  font-family: var(--mono);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}

.topnav-inner {
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--fg);
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t-preset);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}

.topnav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.topnav-links > a {
  color: var(--fg-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}

.topnav-links > a:hover,
.topnav-links > a[aria-current='page'] {
  color: var(--fg);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.icon-btn:hover {
  background: var(--bg-inset);
  color: var(--fg);
}

.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  min-width: 200px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-subtle);
  color: var(--fg-faint);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.search-btn:hover {
  border-color: var(--line-strong);
}

.search-btn kbd {
  margin-left: auto;
  font-size: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--fg-faint);
  background: var(--bg);
}

.theme-toggle .icon-moon,
:root[data-theme='dark'] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .icon-moon {
  display: block;
}

.menu-btn {
  display: none;
}

@media (max-width: 860px) {
  .topnav-inner {
    padding: 0 16px;
    gap: 8px;
  }

  .topnav-links > a.hide-sm,
  .search-btn .search-label,
  .search-btn kbd {
    display: none;
  }

  .search-btn {
    min-width: 0;
    width: 36px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: transparent;
  }

  .menu-btn {
    display: inline-flex;
  }

  .brand .pill {
    display: none;
  }
}

@media (max-width: 380px) {
  .topnav-inner {
    padding: 0 10px;
    gap: 4px;
  }

  .topnav-links {
    gap: 0;
  }

  .brand {
    gap: 8px;
  }

  .brand-name {
    font-size: 14px;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color 150ms;
}

.btn:hover {
  background: var(--accent-hover);
  color: var(--accent-fg);
}

.btn-sm {
  font-size: 14px;
  padding: 9px 16px;
}

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms;
}

.ghost:hover {
  background: var(--bg-inset);
  color: var(--fg);
}

.ghost-lg {
  font-size: 15px;
  padding: 12px 22px;
}

.chip {
  font-family: var(--mono);
  font-size: 13px;
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg-muted);
  transition: background-color 150ms, border-color 150ms, color 150ms;
}

.chip:hover {
  color: var(--fg);
}

.chip[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------------------------------------------------------------- Landing */

.frame {
  max-width: 1200px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

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

.band.subtle {
  background: var(--bg-subtle);
}

.band-pad {
  padding: 80px 48px;
}

.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.h-display {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 700;
  max-width: 900px;
}

.h-display .dim {
  color: var(--fg-faint);
}

.h-section {
  margin: 0;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 640px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 700px;
}

.section-head p:not(.eyebrow) {
  margin: 0;
  font-size: 16px;
  color: var(--fg-muted);
}

.hero-top {
  padding: 96px 48px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-bottom: 1px dashed var(--line-strong);
}

.hero-actions {
  padding: 24px 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.install {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--code-fg);
  max-width: 100%;
}

.install .dollar {
  color: var(--code-dim);
}

.install .copy {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--bg);
  flex-shrink: 0;
}

.muted-note {
  font-size: 13px;
  color: var(--fg-faint);
}

/* Hero token sentence */

.hero-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 15px;
}

.tok {
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  font-family: var(--mono);
}

.tok.preset { background: var(--t-preset-bg); color: var(--t-preset); }
.tok.keyframe { background: var(--t-key-bg); color: var(--t-key); }
.tok.layout { background: var(--t-layout-bg); color: var(--t-layout); }
.tok.timing { background: var(--t-time-bg); color: var(--t-time); }
.tok.exit { background: var(--t-exit-bg); color: var(--t-exit); }
.tok.transition { background: var(--t-trans-bg); color: var(--t-trans); }
.tok.invalid { background: var(--warn-bg); color: var(--t-bad); text-decoration: underline wavy; }

.hero-tokens .tok {
  opacity: 0;
  transform: translateY(10px);
  animation: tokIn 520ms cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

@keyframes tokIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Grammar legend */

.legend {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.legend-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-item span:last-child {
  font-size: 13px;
  color: var(--fg-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
}

a.card {
  text-decoration: none;
  color: inherit;
  transition: border-color 150ms, transform 150ms;
}

a.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card .card-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--link);
}

/* Feature demo cards */

.feature {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--card);
}

.feature-stage {
  height: 210px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 20px;
}

.feature-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-body h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.feature-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
}

.feature-body .codeblock pre {
  font-size: 12.5px;
  padding: 12px 14px;
}

/* Steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--card);
}

.steps .step-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.steps .step-head span {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.steps h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.steps p {
  margin: 0;
  font-size: 14px;
  color: var(--fg-muted);
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.split > * {
  min-width: 0;
}

/* Editor mock */

.editor {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13.5px;
  box-shadow: var(--shadow);
}

.editor-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}

.editor-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.editor-bar span {
  margin-left: 8px;
  font-size: 12px;
  color: var(--fg-faint);
}

.editor-body {
  padding: 22px 20px;
  line-height: 1.8;
  color: var(--code-fg);
  overflow-x: auto;
}

.squiggle {
  text-decoration: underline wavy #d97706;
  text-underline-offset: 4px;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--accent);
  vertical-align: middle;
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.suggest {
  margin: 10px 0 0 min(120px, 10vw);
  max-width: 300px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.1);
  font-size: 12.5px;
}

.suggest div {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
}

.suggest div:first-child {
  background: var(--accent-soft);
}

.suggest span:last-child {
  color: var(--fg-faint);
}

.suggest p {
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font);
  color: var(--fg-muted);
  line-height: 1.5;
}

.editor-warn {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--warn-fg);
}

.cta {
  padding: 96px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}

.cta .h-section {
  font-size: clamp(34px, 5vw, 48px);
  max-width: 720px;
}

.cta p {
  margin: 0;
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 560px;
}

.footer {
  padding: 28px 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--fg-faint);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer a {
  color: var(--fg-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--fg);
}

@media (max-width: 720px) {
  .band-pad,
  .cta {
    padding: 56px 16px;
  }

  .hero-top {
    padding: 56px 16px 36px;
  }

  .hero-actions,
  .footer {
    padding: 20px 16px;
  }

  .frame {
    border-left: 0;
    border-right: 0;
  }

  .legend {
    padding: 20px;
  }

  .install {
    font-size: 12.5px;
  }
}

/* ---------------------------------------------------------------- Playground */

.playground {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  overflow: hidden;
}

.pg-controls {
  flex: 1 1 520px;
  min-width: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--line);
}

.pg-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pg-row > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
}

.pg-row > span small {
  font-weight: 400;
  color: var(--fg-faint);
  font-size: 13px;
}

.pg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pg-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.pg-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--code-bg);
  color: var(--code-fg);
}

.pg-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.pg-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
}

.pg-tokens .tok {
  font-size: 12.5px;
  padding: 4px 8px;
}

.pg-messages {
  font-size: 13px;
  color: var(--fg-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pg-messages .warn {
  color: var(--warn-fg);
}

.pg-messages button {
  font: inherit;
  border: 0;
  background: none;
  color: var(--link);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.pg-preview {
  flex: 1 1 340px;
  min-width: 0;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background-color: var(--bg-subtle);
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
}

.phone {
  width: 240px;
  height: 460px;
  border-radius: 36px;
  background: var(--phone);
  border: 1px solid var(--phone-line);
  padding: 14px;
  box-shadow: var(--shadow);
}

.phone-screen {
  height: 100%;
  border-radius: 26px;
  background: var(--bg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.bar {
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}

.bar.strong {
  height: 10px;
  background: var(--line-strong);
}

.demo-card {
  margin-top: 16px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform-origin: center;
}

.demo-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
}

.demo-card .title {
  font-weight: 600;
  font-size: 16px;
}

.demo-card .line {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
}

.phone-cta {
  margin-top: auto;
  border-radius: 12px;
  background: var(--fg);
  color: var(--bg);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 0;
}

.pg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

@media (max-width: 720px) {
  .pg-controls {
    padding: 20px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pg-preview {
    padding: 24px 16px;
  }
}

/* ---------------------------------------------------------------- Code */

/* Code blocks use a dark ink theme in both color schemes, like
   tailwindcss.com, so syntax colors stay vivid and consistent. */
.codeblock {
  position: relative;
  margin: 20px 0;
  border-radius: 14px;
  background: var(--ink-bg);
  box-shadow: inset 0 0 0 1px var(--ink-ring);
  overflow: hidden;
  color: #cbd5e1;
}

.codeblock-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 52px 0 16px;
  background: var(--ink-bar);
  border-bottom: 1px solid #1c2440;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #e2e8f0;
}

.codeblock-dots {
  display: flex;
  gap: 6px;
  margin-right: 4px;
}

.codeblock-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a3350;
}

.codeblock-lang {
  font-size: 11px;
  color: #7c879e;
  border: 1px solid #2a3350;
  border-radius: 999px;
  padding: 1px 8px;
}

.pm-tab {
  font: inherit;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  border: 0;
  background: none;
  padding: 11px 2px;
  margin-right: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: #7c879e;
}

.pm-tab:hover {
  color: #e2e8f0;
}

.pm-tab[aria-pressed='true'] {
  color: #f1f5f9;
  border-bottom-color: #7dd3fc;
}

.codeblock pre {
  margin: 0;
  padding: 16px 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.75;
  color: #cbd5e1;
  tab-size: 2;
}

.codeblock pre[hidden] {
  display: none;
}

.codeblock pre.numbered {
  padding-left: 0;
}

.codeblock .line {
  display: block;
  padding-right: 20px;
}

.codeblock .line.hl {
  background: var(--ink-line);
  box-shadow: inset 2px 0 0 #7dd3fc;
}

.codeblock .ln {
  display: inline-block;
  width: 28px;
  margin-right: 20px;
  text-align: right;
  color: #3e4763;
  user-select: none;
}

.codeblock .line.hl .ln {
  color: #7dd3fc;
}

.codeblock .copy-code {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: #7c879e;
  opacity: 0;
  transition: opacity 150ms, background-color 150ms;
}

.codeblock .copy-code:hover {
  background: #1c2440;
  color: #e2e8f0;
}

.codeblock:hover .copy-code,
.codeblock .copy-code:focus-visible,
.codeblock-title ~ .copy-code {
  opacity: 1;
}

.copy-code.copied {
  color: #86efac;
  opacity: 1;
}

/* Syntax colors inside code blocks */
.hl-k { color: #c084fc; }
.hl-s { color: #a5f3fc; }
.hl-c { color: #5f6b85; font-style: italic; }
.hl-n { color: #fdba74; }
.hl-t { color: #7dd3fc; }
.hl-p { color: #7c879e; }
.hl-a { color: #f0abfc; }
.hl-f { color: #fde68a; }

/* Token colors: text on light surfaces outside code blocks */
.tk-preset { color: var(--t-preset); font-weight: 600; }
.tk-keyframe { color: var(--t-key); font-weight: 600; }
.tk-layout { color: var(--t-layout); font-weight: 600; }
.tk-timing { color: var(--t-time); font-weight: 600; }
.tk-exit { color: var(--t-exit); font-weight: 600; }
.tk-transition { color: var(--t-trans); font-weight: 600; }

/* ...and on the dark ink of code blocks */
.codeblock .tk-preset { color: #93c5fd; }
.codeblock .tk-keyframe { color: #c4b5fd; }
.codeblock .tk-layout { color: #5eead4; }
.codeblock .tk-timing { color: #fcd34d; }
.codeblock .tk-exit { color: #fda4af; }
.codeblock .tk-transition { color: #86efac; }
.codeblock .squiggle { color: #fca5a5; }

/* ---------------------------------------------------------------- Docs */

.docs {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 232px;
}

.sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 28px 16px 48px 24px;
  border-right: 1px solid var(--line);
  font-size: 14px;
}

.sidebar h5 {
  margin: 22px 0 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
}

.sidebar h5:first-child {
  margin-top: 0;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
  margin-left: 10px;
}

.sidebar a {
  display: block;
  margin-left: -1px;
  padding: 5px 12px;
  border-left: 1px solid transparent;
  color: var(--fg-muted);
  text-decoration: none;
  line-height: 1.45;
}

.sidebar a:hover {
  color: var(--fg);
  border-left-color: var(--line-strong);
}

.sidebar a[aria-current='page'] {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

.content {
  min-width: 0;
  padding: 48px 56px 96px;
}

.article {
  max-width: 780px;
}

.toc {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 48px 24px 48px 8px;
  font-size: 13px;
}

.toc h5 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc a {
  display: block;
  padding: 4px 0;
  color: var(--fg-faint);
  text-decoration: none;
  line-height: 1.4;
}

.toc a.depth-3 {
  padding-left: 12px;
}

.toc a:hover {
  color: var(--fg);
}

.toc a.active {
  color: var(--accent);
}

.crumb {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.article h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.article .description {
  margin: 0 0 36px;
  font-size: 18px;
  color: var(--fg-muted);
}

.article h2 {
  margin: 56px 0 14px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.article h3 {
  margin: 36px 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.article h2 a.anchor,
.article h3 a.anchor {
  color: inherit;
  text-decoration: none;
}

.article h2 a.anchor:hover::after,
.article h3 a.anchor:hover::after {
  content: ' #';
  color: var(--fg-faint);
}

.article p,
.article li {
  color: var(--fg-muted);
}

.article strong {
  color: var(--fg);
  font-weight: 600;
}

.article ul,
.article ol {
  padding-left: 22px;
}

.article li {
  margin: 6px 0;
}

.article li::marker {
  color: var(--fg-faint);
}

.article :not(pre) > code {
  font-size: 0.86em;
  font-weight: 500;
  color: var(--fg);
  background: var(--ic-bg);
  box-shadow: inset 0 0 0 1px var(--ic-ring);
  border-radius: 6px;
  padding: 2px 6px;
  overflow-wrap: break-word;
}

.article a code {
  color: var(--link);
}

/* Animate tokens in prose and tables: colored badges by category */
.article :not(pre) > code[class*='tk-'] {
  font-weight: 600;
  padding: 2px 7px;
}

.article :not(pre) > code.tk-preset { color: var(--t-preset); background: var(--t-preset-bg); box-shadow: inset 0 0 0 1px var(--t-preset-ring); }
.article :not(pre) > code.tk-keyframe { color: var(--t-key); background: var(--t-key-bg); box-shadow: inset 0 0 0 1px var(--t-key-ring); }
.article :not(pre) > code.tk-layout { color: var(--t-layout); background: var(--t-layout-bg); box-shadow: inset 0 0 0 1px var(--t-layout-ring); }
.article :not(pre) > code.tk-timing { color: var(--t-time); background: var(--t-time-bg); box-shadow: inset 0 0 0 1px var(--t-time-ring); }
.article :not(pre) > code.tk-exit { color: var(--t-exit); background: var(--t-exit-bg); box-shadow: inset 0 0 0 1px var(--t-exit-ring); }
.article :not(pre) > code.tk-transition { color: var(--t-trans); background: var(--t-trans-bg); box-shadow: inset 0 0 0 1px var(--t-trans-ring); }

/* A whole animate string inline: one chip, tokens colored inside */
.article :not(pre) > code.tk-string span {
  font-weight: 600;
}

/* Reference tables */
.article code.prop,
.table-wrap code.prop {
  color: var(--prop);
  font-weight: 600;
  background: none;
  box-shadow: none;
  padding: 0;
}

.article :not(pre) > code.ty {
  color: var(--type);
  background: var(--type-bg);
  box-shadow: inset 0 0 0 1px var(--type-ring);
}

.ty-union {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.article :not(pre) > code.num {
  color: var(--num);
}

.kv-k {
  color: var(--kv-key);
}

.kv-v {
  color: var(--num);
}

.table-wrap {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-wrap th {
  text-align: left;
  padding: 11px 16px;
  font-weight: 600;
  color: var(--fg-muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table-wrap td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-muted);
  vertical-align: top;
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.table-wrap td:first-child code {
  white-space: nowrap;
}

.callout {
  margin: 20px 0;
  padding: 14px 18px;
  border: 1px solid var(--note-line);
  border-radius: 12px;
  background: var(--note-bg);
  font-size: 15px;
}

.callout p {
  margin: 0;
  color: var(--fg-muted);
}

.callout p + p {
  margin-top: 8px;
}

.callout.warning {
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.callout .callout-title {
  display: block;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.pager {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.pager a span {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-faint);
}

.pager a.next {
  margin-left: auto;
  text-align: right;
}

.edit-link {
  margin-top: 24px;
  font-size: 13px;
}

.edit-link a {
  color: var(--fg-faint);
}

/* Phones: each table row becomes a card, and each value gets its column
   name as a label (data-label is added by the site build). */
@media (max-width: 720px) {
  .table-wrap {
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: none !important;
  }

  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tr {
    margin-bottom: 10px;
    padding: 4px 14px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
  }

  .table-wrap tr:last-child {
    margin-bottom: 0;
  }

  .table-wrap td,
  .table-wrap tr:last-child td {
    display: grid;
    grid-template-columns: minmax(84px, 32%) minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
    padding: 5px 0;
    border: 0;
    font-size: 14px;
  }

  .table-wrap td::before {
    content: attr(data-label);
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--fg-faint);
  }

  .table-wrap td:first-child,
  .table-wrap td[data-label=''],
  .table-wrap tr:last-child td:first-child,
  .table-wrap tr:last-child td[data-label=''] {
    display: block;
  }

  .table-wrap td:first-child {
    padding: 8px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
    color: var(--fg);
    font-weight: 600;
  }

  .table-wrap td:first-child::before,
  .table-wrap td[data-label='']::before {
    content: none;
  }

  .table-wrap td:first-child code {
    white-space: normal;
  }
}

@media (max-width: 1180px) {
  .docs {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .docs {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    bottom: 0;
    width: min(300px, 86vw);
    height: auto;
    z-index: 30;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(0.33, 1, 0.68, 1);
    box-shadow: var(--shadow);
  }

  body.nav-open .sidebar {
    transform: none;
  }

  .scrim {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    z-index: 20;
    background: rgba(11, 16, 32, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms;
  }

  body.nav-open .scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .content {
    padding: 32px 16px 72px;
  }
}

/* ---------------------------------------------------------------- Demos */

.demo {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}

.demo-stage {
  min-height: 200px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background-color: var(--bg-subtle);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 16px 16px;
}

.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-faint);
}

.demo-bar .grow {
  flex: 1;
}

.demo-bar code {
  font-size: 12.5px;
  color: var(--code-fg);
  overflow-wrap: anywhere;
}

.box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent);
  flex-shrink: 0;
}

.box.sm {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.lanes {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lane {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-muted);
}

.lane-track {
  position: relative;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.lane-track .box.sm {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 40px;
  height: 40px;
}

.stack {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  color: var(--fg-muted);
}

.row-item i {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--t-preset);
  flex-shrink: 0;
}

.row-item b {
  height: 8px;
  flex: 1;
  border-radius: 4px;
  background: var(--line);
}

.row-item button {
  border: 0;
  background: none;
  color: var(--fg-faint);
  cursor: pointer;
  font: inherit;
  padding: 0 4px;
}

.expander {
  width: 260px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.expander .bar.head {
  height: 10px;
  width: 60%;
  background: var(--t-layout);
}

.switch-btn {
  min-width: 140px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.demo-input {
  width: 260px;
  font: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 2px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
  outline: none;
}

.timeline-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.coin {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--t-time);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15);
}

.scene-title {
  font-weight: 650;
  font-size: 18px;
}

.scene-btn {
  border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 22px;
}

.curve-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.curve {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.curve svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.curve span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-muted);
}

.curve .track {
  position: relative;
  height: 14px;
}

.curve .dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
}

.overlay-mock {
  font-family: var(--mono);
  font-size: 12px;
  width: 260px;
  border-radius: 14px;
  background: #0b1020;
  color: #e6e9f2;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overlay-mock .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.overlay-mock .row span:first-child {
  color: #8a93ab;
}

.overlay-mock .warn {
  color: #f5c46b;
}

/* ---------------------------------------------------------------- Search */

.search-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 96px));
  margin: 72px auto auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-dialog::backdrop {
  background: rgba(11, 16, 32, 0.4);
}

.search-dialog[open] {
  display: flex;
  flex-direction: column;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-faint);
}

.search-field input {
  flex: 1;
  height: 54px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
}

.search-results a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--fg);
  text-decoration: none;
}

.search-results a span {
  display: block;
  font-size: 13px;
  color: var(--fg-faint);
}

.search-results a:hover,
.search-results a.active {
  background: var(--accent-soft);
}

.search-empty {
  padding: 24px;
  text-align: center;
  color: var(--fg-faint);
  font-size: 14px;
}

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

/* Landing page: inline code and code blocks inside cards */
.steps p code,
.feature-body p code,
.card p code,
.section-head p code {
  font-family: var(--mono);
  font-size: 0.86em;
  font-weight: 500;
  color: var(--fg);
  background: var(--ic-bg);
  box-shadow: inset 0 0 0 1px var(--ic-ring);
  border-radius: 6px;
  padding: 1px 6px;
}

.steps .codeblock,
.feature-body .codeblock {
  margin: 0;
}

/* ---------------------------------------------------------------- Languages */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.lang-switch:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}

@media (max-width: 860px) {
  .lang-switch {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border: 0;
  }

  .lang-switch span {
    display: none;
  }
}

.lang-notice {
  font-size: 14px;
}

/* Korean: Pretendard for Hangul, no breaks inside words, gentler tracking */
:root:lang(ko) {
  --font: 'Geist', 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
}

:lang(ko) body,
:lang(ko) .article,
:lang(ko) .lead,
:lang(ko) .card p,
:lang(ko) .section-head p {
  word-break: keep-all;
  overflow-wrap: break-word;
}

:lang(ko) .h-display {
  letter-spacing: -0.035em;
  line-height: 1.12;
}

:lang(ko) .h-section,
:lang(ko) .article h1 {
  letter-spacing: -0.025em;
  line-height: 1.25;
}

:lang(ko) .article p,
:lang(ko) .article li {
  line-height: 1.8;
}

/* Korean labels: monospace and wide tracking don't suit Hangul */
:lang(ko) .eyebrow,
:lang(ko) .sidebar h5,
:lang(ko) .toc h5 {
  font-family: var(--font);
  letter-spacing: 0;
  font-weight: 600;
}

/* ------------------------------------------------------- editor demos */
/* A VS Code mock (Dark Modern) that keeps its look in both site themes. */

[data-editor-demo] { margin: 20px 0 24px; }
.ed-vs {
  background: #1e1e1e; border: 1px solid #2b2b2b; border-radius: 10px; color: #cccccc;
  font-family: var(--mono); font-size: 14px; box-shadow: 0 10px 30px rgba(10, 14, 30, 0.18); overflow: hidden;
}
.ed-tabbar { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 34px; background: #181818; border-bottom: 1px solid #2b2b2b; font-size: 12px; color: #9d9d9d; }
.ed-dot { width: 10px; height: 10px; border-radius: 50%; background: #3c3c3c; }
.ed-file { margin-left: 8px; color: #e0e0e0; display: flex; align-items: center; gap: 6px; }
.ed-file i { width: 8px; height: 8px; border-radius: 2px; background: #519aba; }
.ed-body { position: relative; padding: 14px 0 16px; }
.ed-body-completion { min-height: 480px; }
.ed-body-hover { min-height: 540px; }
.ed-line { display: flex; align-items: center; white-space: pre; line-height: 22px; padding-right: 12px; }
.ed-line.ed-flow { align-items: flex-start; }
.ed-code { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ed-ln { flex: none; width: 44px; padding-right: 14px; text-align: right; color: #6e7681; user-select: none; }
.ed-ind { display: inline-block; width: 2ch; flex: none; }
.ed-comp { color: #4ec9b0; } .ed-attr { color: #9cdcfe; } .ed-str { color: #ce9178; } .ed-pun { color: #808080; }

/* The animate value: an in-flow mirror sizes the box and draws squiggles;
   the textarea sits on top with the same font and wrapping. */
.ed-field { position: relative; display: inline-block; vertical-align: top; max-width: calc(100% - 11ch); min-width: 2ch; }
.ed-field textarea, .ed-marks {
  font: inherit; line-height: 22px; letter-spacing: 0; padding: 0; margin: 0; border: 0;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
}
.ed-field textarea {
  position: absolute; inset: 0; width: 100%; height: 100%; resize: none; overflow: hidden;
  color: #ce9178; background: transparent; outline: 0; caret-color: #aeafad; z-index: 2;
}
.ed-marks { display: block; color: transparent; pointer-events: none; min-height: 22px; }
.ed-marks .ed-q { color: #ce9178; }
.ed-bad { text-decoration: underline wavy #cca700; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.ed-suggest { position: absolute; z-index: 5; display: flex; align-items: flex-start; max-width: calc(100% - 16px); }
.ed-list, .ed-details, .ed-hovercard { background: #252526; border: 1px solid #454545; border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.ed-list { width: 250px; max-height: 210px; overflow-y: auto; padding-block: 2px; flex: none; }
.ed-item { display: flex; align-items: center; gap: 7px; padding: 0 8px; height: 22px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ed-item:hover { background: #2a2d2e; }
.ed-item.sel { background: #04395e; color: #fff; outline: 1px solid #2b79d9; outline-offset: -1px; }
.ed-ic { flex: none; width: 14px; height: 14px; border-radius: 3px; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #1e1e1e; }
.ed-label { flex: none; max-width: 70%; overflow: hidden; text-overflow: ellipsis; }
.ed-label b { color: #2aaaff; font-weight: 600; }
.ed-item.sel .ed-label b { color: #9fd3ff; }
.ed-meta { margin-left: auto; min-width: 0; color: #9d9d9d; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; }
.ed-details { width: 312px; margin-left: -1px; padding: 8px 12px 12px; font-family: var(--font); font-size: 13px; line-height: 1.5; max-height: 430px; overflow-y: auto; }
.ed-md p { margin: 0 0 8px; color: #cccccc; font-size: 13px; }
.ed-md .ed-head { color: #9d9d9d; font-family: var(--mono); font-size: 12px; margin-bottom: 6px; }
.ed-md code { font-family: var(--mono); font-size: 12px; background: #2b2b2b; border: 0; color: #d7ba7d; padding: 0 4px; border-radius: 3px; }
.ed-md b code { color: #fff; }
.ed-md img { display: block; max-width: 100%; height: auto; margin: 4px 0 2px; }
.ed-md hr { border: 0; border-top: 1px solid #454545; margin: 10px 0; }

.ed-panel { border-top: 1px solid #2b2b2b; background: #181818; font-family: var(--font); font-size: 13px; }
.ed-ptabs { display: flex; gap: 18px; padding: 6px 14px 0; font-size: 11px; letter-spacing: 0.04em; color: #9d9d9d; text-transform: uppercase; }
.ed-ptabs span { padding-bottom: 5px; }
.ed-ptabs .on { color: #e7e7e7; border-bottom: 1px solid #e7e7e7; }
.ed-count { display: inline-block; min-width: 16px; text-align: center; margin-left: 4px; border-radius: 8px; background: #4d4d4d; color: #fff; font-size: 10px; padding: 0 4px; }
.ed-panel ul { list-style: none; margin: 0; padding: 6px 0 10px; color: #cccccc; }
.ed-panel li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 3px 14px; margin: 0; }
.ed-warn { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #cca700; color: #1e1e1e; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.ed-src { color: #9d9d9d; font-family: var(--mono); font-size: 12px; }
.ed-panel button { font: 12px var(--font); color: #3794ff; background: none; border: 1px solid #3794ff66; border-radius: 4px; padding: 1px 8px; cursor: pointer; }
.ed-panel button:hover { background: #3794ff22; }
.ed-ok { padding: 8px 14px 12px; color: #9d9d9d; }

.ed-keys { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--fg-faint); }
.ed-keys li { margin: 0; }
.ed-keys kbd { font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--bg-subtle); color: var(--fg); }

.ed-tok { cursor: help; border-radius: 2px; }
.ed-tok:hover, .ed-tok.on { background: #ffffff18; }
.ed-hovercard { position: absolute; z-index: 5; width: 316px; max-width: calc(100% - 16px); padding: 8px 12px 10px; font-family: var(--font); font-size: 13px; line-height: 1.5; max-height: 500px; overflow-y: auto; }
.ed-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ed-examples button { font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--line-strong); background: var(--bg-subtle); color: var(--fg); border-radius: 8px; padding: 5px 10px; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.ed-examples button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

.ed-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ed-gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #1e1e1e; }
.ed-gallery img { display: block; width: 100%; height: auto; }
.ed-gallery figcaption { font-size: 12.5px; color: #b8bcc8; margin-top: 8px; line-height: 1.5; }
.ed-gallery figcaption code { background: #2b2b2b; border: 0; color: #d7ba7d; }

@media (max-width: 640px) {
  .ed-suggest { flex-direction: column; left: 8px !important; right: 8px; }
  .ed-list, .ed-details { width: 100%; margin-left: 0; }
  .ed-details { margin-top: -1px; max-height: 260px; }
  .ed-body-completion { min-height: 590px; }
  .ed-body-hover { min-height: 470px; }
}

/* Keep the article's prose styles out of the VS Code mock. */
.article .ed-panel li { color: #cccccc; margin: 0; line-height: 1.5; }
.article .ed-panel li > span:not(.ed-warn):not(.ed-src) { flex: 1 1 260px; min-width: 0; }
.article .ed-md p { color: #cccccc; line-height: 1.5; margin: 0 0 8px; }
.article .ed-md code,
.article .ed-gallery figcaption code {
  font-size: 12px; font-weight: 400; background: #2b2b2b; border: 0; box-shadow: none; color: #d7ba7d; padding: 0 4px; border-radius: 3px;
}
.article .ed-gallery figcaption { color: #b8bcc8; }
.article .ed-keys li { margin: 0; line-height: 1.6; }
