/* =========================================================================
   RollDate — site styles
   Palette matched to the RollDate widget: neutral dark gray + blue accent.
   ========================================================================= */

:root {
  /* Surfaces (neutral gray, matched to the widget's #323232 card) */
  --bg: #1a1a1a;
  --bg-elevated: #202020;
  --surface: #262626;
  --surface-2: #2e2e2e;

  /* Text */
  --text: #ededed;
  --text-muted: #9a9a9a;
  --text-faint: #6f6f6f;

  /* Accent — RollDate blue */
  --accent: #368cfd;
  --accent-hover: #609ef1;
  --accent-strong: #1e5093;
  --accent-soft: rgba(54, 140, 253, 0.12);
  --accent-ring: rgba(54, 140, 253, 0.35);

  /* Lines */
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Code panels stay dark in both themes */
  --code-bg: #1c1c1c;
  --code-bar: #242424;
  --code-text: #d7dde6;
  --code-muted: #9aa3b2;
  --code-border: rgba(255, 255, 255, 0.09);
  --code-border-strong: rgba(255, 255, 255, 0.18);

  /* Misc */
  --row-hover: rgba(255, 255, 255, 0.02);
  --shadow-showcase: 0 30px 80px -40px rgba(0, 0, 0, 0.8);

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1120px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code",
    Menlo, Consolas, monospace;

  color-scheme: dark;
}

/* ------------------------------------------------------------- light theme */
:root[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f5;

  --text: #1a1f29;
  --text-muted: #55606e;
  --text-faint: #8a929e;

  --accent: #2d7cff;
  --accent-hover: #1f5dc1;
  --accent-strong: #1f5dc1;
  --accent-soft: rgba(45, 124, 255, 0.1);
  --accent-ring: rgba(45, 124, 255, 0.28);

  --border: rgba(15, 25, 45, 0.1);
  --border-strong: rgba(15, 25, 45, 0.16);

  --row-hover: rgba(15, 25, 45, 0.03);
  --shadow-showcase: 0 24px 60px -36px rgba(20, 40, 80, 0.35);

  color-scheme: light;
}

/* ------------------------------------------------------------------ reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}

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

::selection {
  background: var(--accent);
  color: #fff;
}

/* --------------------------------------------------------------- layout */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: 64px;
}

.section--tight {
  padding-block: 52px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  margin-top: 14px;
}

.section-lead {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 18px;
  text-wrap: pretty;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--text-faint);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------- navbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  position: relative;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
}

.brand-mark svg {
  width: 17px;
  height: 17px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
}

/* --------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding-block: 96px 72px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      620px 340px at 78% 8%,
      rgba(54, 140, 253, 0.16),
      transparent 70%
    );
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--surface);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-brand {
  margin-top: 10px;
  font-size: clamp(48px, 8vw, 72px);
  letter-spacing: -0.04em;
}

.hero-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.hero h1,
.hero-brand {
  margin-top: 10px;
  font-size: clamp(48px, 8vw, 72px);
  letter-spacing: -0.04em;
}

.hero h1 .accent {
  color: var(--accent-hover);
}

.hero-tagline {
  margin-top: 18px;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  max-width: 28ch;
  text-wrap: pretty;
}

.hero-lead {
  margin-top: 16px;
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 46ch;
  text-wrap: pretty;
}

.hero-install {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.hero-install code {
  font-size: 13.5px;
  color: var(--code-text);
  white-space: nowrap;
  overflow-x: auto;
}

.hero-copy-btn {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.hero-cta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-trust {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-trust__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  margin-right: 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.hero-trust__link {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.hero-trust__link:hover {
  color: var(--text);
  border-bottom-color: var(--border-strong);
}

.hero-works {
  margin-top: 18px;
}

.hero-works__label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.hero-works__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-works__list li {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.hero-meta {
  margin-top: 30px;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.hero-meta div {
  display: flex;
  flex-direction: column;
}

.hero-meta .num {
  font-size: 22px;
  font-weight: 650;
  font-family: var(--font-mono);
  color: var(--text);
}

.hero-meta .lbl {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* Widget showcase panel */
.showcase {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg));
  padding: 20px;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
  max-width: 100%;
  min-width: 0;
}

.showcase-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px 16px;
  min-width: 0;
  flex-wrap: wrap;
}

.showcase-head .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface-2);
  flex-shrink: 0;
}

.showcase-head .label {
  margin-left: 4px;
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 120px;
}

.showcase-theme {
  margin-left: auto;
}

.showcase-stage {
  display: flex;
  justify-content: center;
  padding: 8px;
}

/* Keep the widget at its natural size — don't squeeze it in the frame. */
.showcase-stage > * {
  width: max-content;
  max-width: none;
}

/* --------------------------------------------------------------- features */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 52px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.card:hover {
  border-color: var(--accent-ring);
  transform: translateY(-2px);
}

.card .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  margin-bottom: 18px;
}

.card .ic svg {
  width: 20px;
  height: 20px;
}

.card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.card p {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------- examples */
.examples {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.examples .grid-3 {
  align-items: stretch;
}

.example-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  min-width: 0;
  height: 100%;
}

.example-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.example-card .tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.example-tabs {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  background: var(--bg);
}

.example-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.example-tab.is-active {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 7px;
}

.example-card h3 {
  font-size: 16px;
}

.example-card > p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
  min-height: 2.8em;
}

.example-stage {
  margin-top: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 44px;
}

.example-panel[data-panel="demo"] {
  min-height: 44px;
}

.example-panel[data-panel="code"] {
  display: none;
  flex: 1 1 auto;
}

.example-card.is-code .example-panel[data-panel="demo"] {
  display: none;
}

.example-card.is-code .example-panel[data-panel="code"] {
  display: flex;
  flex-direction: column;
}

.example-card.is-code .example-code-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.example-card.is-code .example-code-wrap pre {
  flex: 1 1 auto;
}

.field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.field-row .field {
  flex: 1;
  min-width: 0;
}

.example-icon-btn {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.example-icon-btn:hover {
  background: var(--accent-hover);
}

.example-icon-btn:active {
  transform: scale(0.96);
}

.example-icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.example-code-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  overflow: hidden;
}

.example-code-wrap .example-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  border: 1px solid var(--code-border);
  background: var(--code-bar);
  color: var(--code-muted);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
}

.example-code-wrap pre {
  margin: 0;
  padding: 14px 16px;
  padding-top: 40px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--code-text);
  white-space: pre;
}

.field {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  padding: 0 14px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field::placeholder {
  color: var(--text-faint);
}

.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* --------------------------------------------------------------- code / api */
.api {
  border-top: 1px solid var(--border);
}

.code-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
}

.code-panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.code-panel__bar .fname {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}

.copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--text-faint);
}

.copy-btn svg {
  width: 13px;
  height: 13px;
}

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  color: #d7dde6;
}

pre .tok-key {
  color: #609ef1;
}
pre .tok-str {
  color: #7bd88f;
}
pre .tok-num {
  color: #e0a458;
}
pre .tok-com {
  color: var(--text-faint);
  font-style: italic;
}
pre .tok-fn {
  color: #d7b3ff;
}

.install {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
  align-items: start;
}

.mcp-block {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  max-width: none;
}

.mcp-block__title {
  font-size: 22px;
  margin: 0 0 10px;
}

.mcp-block__lead {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 22px;
  line-height: 1.55;
  max-width: 720px;
}

.mcp-install {
  margin-top: 0;
}

.mcp-block__note {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--text-faint);
}

.mcp-block__note a {
  color: var(--accent-hover);
  text-decoration: none;
}

.mcp-block__note a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------- landing extras */
.stats-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  padding-block: 22px;
}

.stats-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: space-between;
}

.stats-bar__inner--big .stat strong {
  font-size: clamp(22px, 3vw, 30px);
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
}

.stats-bar__inner--big .stat span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pitch-section {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.pitch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.no-list--compact {
  margin-top: 18px;
}

.made-section {
  border-top: 1px solid var(--border);
}

.made-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.made-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.made-list strong {
  font-size: 15px;
}

.made-list span {
  font-size: 13.5px;
  color: var(--text-muted);
}

.playground-section {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.playground {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 20px;
  align-items: start;
}

.playground__controls {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  display: grid;
  gap: 16px;
  max-height: min(72vh, 640px);
  overflow: auto;
}

.pg-field {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.pg-field legend {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.pg-radio,
.pg-check,
.pg-select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
}

.pg-select-label {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.pg-select-label select {
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

.playground__stage {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.playground__widget {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  overflow: auto;
  display: flex;
  justify-content: center;
}

.playground__code {
  margin: 0;
}

.compare-table-wrap {
  margin-top: 28px;
}

.compare-table th:nth-child(2),
.compare-table td.yes {
  color: var(--accent-hover);
  font-weight: 600;
}

.compare-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-faint);
}

.compare-section .browser-list {
  margin-top: 28px;
}

@media (max-width: 900px) {
  .pitch-grid,
  .playground,
  .made-list {
    grid-template-columns: 1fr;
  }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
}

.stat strong {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 12.5px;
  color: var(--text-faint);
}

.why-grid {
  margin-top: 40px;
}

.why-grid .card .ic {
  display: none;
}

.features-section {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.feature-groups {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.feature-group h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.example-simple {
  max-width: 720px;
}

.example-simple__panel {
  margin-top: 28px;
}

.example-simple__actions {
  margin-top: 20px;
}

.config-section {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.config-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 18px 14px;
}

.config-card h3 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--accent-hover);
}

.config-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.config-card code {
  font-size: 13px;
  color: var(--text);
}

.compare-section {
  border-top: 1px solid var(--border);
}

.compare {
  max-width: 720px;
}

.no-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
}

.no-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text-muted);
  font-size: 15px;
}

.no-list li::before {
  content: "×";
  position: absolute;
  left: 0;
  top: -0.05em;
  color: #e07070;
  font-size: 1.25em;
  font-weight: 600;
}

.compare-punch {
  margin-top: 28px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.works-with {
  margin-top: 36px;
}

.works-with h3 {
  font-size: 14px;
  color: var(--text-faint);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.pill-list,
.browser-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-list li,
.browser-list li {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.browser-list {
  margin-top: 28px;
}

.install-extra {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.install-extra p {
  color: var(--text-muted);
  font-size: 14.5px;
}

.license-section {
  border-top: 1px solid var(--border);
  padding-block: 64px;
}

.text-link {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .feature-groups,
  .config-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .no-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .feature-groups,
  .config-grid,
  .no-list {
    grid-template-columns: 1fr;
  }

  .hero-install {
    width: 100%;
  }

  .stats-bar__inner {
    justify-content: flex-start;
  }
}

/* --------------------------------------------------------------- tables */
.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface);
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

td code,
th code,
.inline-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

td .muted-code {
  color: var(--text-muted);
  background: var(--surface-2);
}

.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-muted);
  margin-right: 6px;
}

/* --------------------------------------------------------------- docs layout */
.docs {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-block: 48px 96px;
  min-width: 0;
}

.docs-main {
  min-width: 0;
  max-width: 100%;
}

.docs-side {
  position: sticky;
  top: 86px;
  align-self: start;
}

.docs-side h4 {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.docs-nav {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--border);
}

.docs-nav a {
  display: block;
  padding: 7px 14px;
  font-size: 14px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.docs-nav a:hover {
  color: var(--text);
}

.docs-nav a.active {
  color: var(--accent-hover);
  border-left-color: var(--accent);
}

.docs-main > section {
  scroll-margin-top: 84px;
  margin-bottom: 56px;
}

.docs-main h1 {
  font-size: clamp(30px, 5vw, 42px);
}

.docs-main .subtitle {
  color: var(--text-muted);
  font-size: 17px;
  margin-top: 12px;
  margin-bottom: 8px;
}

.docs-main h2 {
  font-size: 24px;
  margin-bottom: 8px;
  padding-top: 4px;
}

.docs-main .h2-sub {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 20px;
}

.docs-main h3 {
  font-size: 15px;
  color: var(--text);
  margin: 28px 0 12px;
  font-family: var(--font-mono);
  font-weight: 550;
}

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 16px 18px;
  font-size: 14px;
  color: var(--text-muted);
  margin: 18px 0;
}

.doc-note,
.doc-example,
.doc-warn {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 14px 16px;
  margin: 16px 0 20px;
}

.doc-note {
  border-left: 3px solid var(--accent);
}

.doc-example {
  border-left: 3px solid #7bd88f;
}

.doc-warn {
  border-left: 3px solid #e0a458;
}

.doc-note strong,
.doc-example strong,
.doc-warn strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text-faint);
}

.doc-note p,
.doc-warn p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
}

.doc-example pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--code-text);
  overflow-x: auto;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.recipe-card {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.recipe-card:first-of-type {
  margin-top: 20px;
  padding-top: 0;
  border-top: 0;
}

.recipe-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text);
}

.recipe-card > p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.recipe-showcase {
  max-width: 420px;
  margin: 16px 0;
}

.recipe-card .doc-example {
  margin-top: 12px;
}

.callout code {
  font-family: var(--font-mono);
  color: var(--accent-hover);
}

/* --------------------------------------------------------------- cta / footer */
.cta {
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-box {
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(
      600px 240px at 50% -20%,
      rgba(54, 140, 253, 0.18),
      transparent 70%
    ),
    var(--bg-elevated);
  padding: 64px 24px;
}

.cta-box h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.cta-box p {
  margin: 16px auto 30px;
  max-width: 48ch;
  color: var(--text-muted);
  font-size: 18px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

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

.footer .copy {
  font-size: 13.5px;
  color: var(--text-faint);
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .install {
    grid-template-columns: 1fr;
  }
  .docs {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-side {
    position: static;
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 16px;
  }

  .section {
    padding-block: 60px;
  }

  .hero {
    padding-block: 56px 48px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: -16px;
    right: -16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
    margin: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.55);
    z-index: 60;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-toggle[aria-expanded="true"] {
    color: var(--accent);
  }

  .nav-actions .btn-ghost:not(.nav-toggle) {
    display: none;
  }

  .hero .container {
    padding-inline: 8px;
  }

  .showcase {
    width: fit-content;
    max-width: none;
    margin-inline: auto;
    padding: 6px;
    border-radius: 14px;
  }

  .showcase-head {
    padding: 2px 4px 8px;
  }

  .showcase-stage {
    padding: 0;
  }

  /* Do not override RollDate width — keep native ~360px calendar. */

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    gap: 22px;
  }

  .example-card__top {
    flex-direction: column;
    align-items: stretch;
  }

  .example-tabs {
    align-self: flex-start;
  }

  .field-row {
    flex-wrap: nowrap;
  }

  .table-wrap {
    margin-inline: 0;
    border-radius: 10px;
  }

  thead th,
  tbody td {
    padding: 11px 12px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
