/* ------------------------------------------------------------------
   Free Sandbox Index — design tokens
------------------------------------------------------------------ */
:root {
  --bg: #07090b;
  --bg-soft: #0a0e11;
  --panel: #0f1418;
  --panel-2: #12181d;
  --line: rgba(232, 237, 231, 0.09);
  --line-strong: rgba(232, 237, 231, 0.17);
  --text: #e8ede7;
  --muted: #97a39a;
  --faint: #66716a;
  --lime: #c8f56a;
  --lime-ink: #101408;
  --mint: #7fe0c3;
  --blue: #8ab4ff;
  --amber: #ffc46b;
  --coral: #f59e9e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --max: 1240px;
  --font-sans: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f1e9;
    --bg-soft: #ebe8dd;
    --panel: #faf8f1;
    --panel-2: #f6f3ea;
    --line: rgba(23, 26, 22, 0.11);
    --line-strong: rgba(23, 26, 22, 0.21);
    --text: #171a16;
    --muted: #5b645c;
    --faint: #8a938b;
    --lime: #4d7300;
    --lime-ink: #f7ffe9;
    --mint: #0f7a62;
    --blue: #2f5fb3;
    --amber: #9a5b00;
    --coral: #a33d3d;
    --shadow: 0 24px 70px rgba(40, 35, 20, 0.13);
  }
}

:root[data-theme="light"] {
  --bg: #f3f1e9;
  --bg-soft: #ebe8dd;
  --panel: #faf8f1;
  --panel-2: #f6f3ea;
  --line: rgba(23, 26, 22, 0.11);
  --line-strong: rgba(23, 26, 22, 0.21);
  --text: #171a16;
  --muted: #5b645c;
  --faint: #8a938b;
  --lime: #4d7300;
  --lime-ink: #f7ffe9;
  --mint: #0f7a62;
  --blue: #2f5fb3;
  --amber: #9a5b00;
  --coral: #a33d3d;
  --shadow: 0 24px 70px rgba(40, 35, 20, 0.13);
}

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

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
  opacity: 0.4;
}

main,
.site-nav,
.footer { position: relative; z-index: 1; }

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

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

a { color: inherit; }

button,
input,
select { font: inherit; }

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

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

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

.nav-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  color: var(--lime);
}

.brand-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.brand-tag {
  padding: 2px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.icon-link,
.theme-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.icon-link:hover,
.theme-btn:hover {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line);
}
.icon-link svg { width: 17px; height: 17px; }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .icon-sun { display: none; }

:root[data-theme="light"] .theme-btn .icon-sun { display: block; }
:root[data-theme="light"] .theme-btn .icon-moon { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .icon-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-btn .icon-moon { display: none; }
}

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 80px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -320px;
  left: -240px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lime) 11%, transparent), transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -300px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--blue) 8%, transparent), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 12%, transparent);
}

.kicker-slash { color: var(--faint); }

.hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 7.2vw, 6.2rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.hl { color: var(--lime); }

.lede {
  max-width: 53ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, filter 0.2s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--lime-ink);
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--muted);
  background: var(--panel);
}

.btn-arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.7;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 40px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.stats > div {
  padding-right: 16px;
  border-right: 1px solid var(--line);
}
.stats > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.stats dt {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats dd {
  margin: 5px 0 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.stat-date { color: var(--lime) !important; }

/* Terminal — intentionally dark in both themes */
.terminal {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: #0a0e11;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at 82% 0%, rgba(200, 245, 106, 0.08), transparent 60%);
  pointer-events: none;
}

.terminal-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.term-dots { display: flex; gap: 5px; }
.term-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #343c42;
}
.term-dots i:nth-child(1) { background: #ff6b6b; }
.term-dots i:nth-child(2) { background: #ffc46b; }
.term-dots i:nth-child(3) { background: #7fe0c3; }

.term-title {
  color: #8b9790;
  font-family: var(--font-mono);
  font-size: 10px;
}

.term-badge {
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid rgba(200, 245, 106, 0.25);
  border-radius: 4px;
  background: rgba(200, 245, 106, 0.06);
  color: #c8f56a;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.terminal-body {
  position: relative;
  padding: 18px 18px 16px;
  overflow-x: auto;
  color: #d9e2da;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 2.05;
  white-space: nowrap;
}

.t-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.t-prompt { color: #c8f56a; }
.t-cmd { color: #f0f4ee; }
.t-flag { color: #8ab4ff; }
.t-ok { color: #7fe0c3; }
.t-name { width: 78px; color: #f0f4ee; }
.t-spec { width: 62px; color: #ffc46b; }
.t-note { color: #8b9790; }
.t-dim { color: #8b9790; }
.t-sep { color: #3a4248; }

.t-spacer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10px;
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: #c8f56a;
  animation: blink 1.1s step-end infinite;
}

/* ------------------------------------------------------------------
   Sections
------------------------------------------------------------------ */
.section {
  position: relative;
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 430px);
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head .kicker { margin-bottom: 14px; }

.section-sub {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

/* ------------------------------------------------------------------
   Toolbar
------------------------------------------------------------------ */
.toolbar {
  position: sticky;
  top: 64px;
  z-index: 30;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 420px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 10%, transparent);
}
.search svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--faint);
}
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.search input::placeholder { color: var(--faint); }

.sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.sort select {
  height: 42px;
  padding: 0 32px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%2397a39a' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  appearance: none;
  cursor: pointer;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.chip.is-active {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}
.chip-count {
  font-size: 9px;
  opacity: 0.55;
}

.result-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px 12px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ------------------------------------------------------------------
   Comparison table
------------------------------------------------------------------ */
.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.cmp-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.col-product { width: 25%; }
.col-type { width: 12%; }
.col-quota { width: 21%; }
.col-specs { width: 18%; }
.col-signup { width: 15%; }
.col-score { width: 9%; }
.col-toggle { width: 40px; }

.cmp-table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.cmp-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.product-row { transition: background 0.2s; }
.product-row:hover td { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.product-row.is-open td { background: color-mix(in srgb, var(--lime) 3%, transparent); }

.product-inner {
  display: flex;
  align-items: center;
  gap: 11px;
}

.monogram {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--tone) 24%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--tone) 10%, transparent);
  color: var(--tone);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.product-text { min-width: 0; }

.product-name {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.product-tagline {
  display: block;
  max-width: 30ch;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 8%, transparent);
  color: var(--tone);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}
.type-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.quota-main {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}

.quota-note,
.spec-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.spec-main {
  font-size: 12px;
  line-height: 1.45;
}

.signup-main {
  font-size: 11.5px;
  line-height: 1.5;
}

.card-badge {
  display: inline-flex;
  width: max-content;
  margin-top: 6px;
  padding: 3px 6px;
  border: 1px solid;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
}

.card-no {
  border-color: color-mix(in srgb, var(--mint) 30%, transparent);
  background: color-mix(in srgb, var(--mint) 7%, transparent);
  color: var(--mint);
}
.card-optional {
  border-color: color-mix(in srgb, var(--amber) 32%, transparent);
  background: color-mix(in srgb, var(--amber) 7%, transparent);
  color: var(--amber);
}
.card-yes {
  border-color: color-mix(in srgb, var(--coral) 32%, transparent);
  background: color-mix(in srgb, var(--coral) 7%, transparent);
  color: var(--coral);
}

.score-cell { min-width: 92px; }
.score-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.score-row + .score-row { margin-top: 5px; }

.score-label {
  width: 24px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.score-bars {
  display: flex;
  gap: 2px;
}

.bar {
  width: 7px;
  height: 4px;
  border-radius: 1px;
  background: var(--line-strong);
}
.bar.filled { background: var(--lime); }

.toggle-cell { text-align: right; }

.toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.toggle:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.toggle svg {
  width: 13px;
  height: 13px;
  transition: transform 0.22s;
}
.toggle[aria-expanded="true"] {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}
.toggle[aria-expanded="true"] svg { transform: rotate(45deg); }

/* ------------------------------------------------------------------
   Detail panel
------------------------------------------------------------------ */
.detail-row td {
  padding: 0 !important;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.detail {
  padding: 26px 28px 28px;
  animation: detailIn 0.22s ease;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.detail-tagline {
  max-width: 62ch;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.verified {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.quickstart { flex: none; }

.quickstart-label {
  display: block;
  margin-bottom: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-align: right;
}

.code-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
}

.code-chip code {
  color: var(--text);
  font-size: 11px;
  white-space: nowrap;
}

.copy-btn {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.copy-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.copy-btn.copied {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 24px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-label {
  display: block;
  margin-bottom: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.caveat-block {
  margin-top: 22px;
  padding: 14px 16px;
  border-left: 2px solid var(--coral);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--coral) 5%, transparent);
}

.caveat-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0 0 0 16px;
}
.caveat-list li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.caveat-list li::marker { color: var(--coral); }

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.link-pill:hover {
  border-color: var(--line-strong);
  background: var(--panel);
  color: var(--text);
}
.link-pill span { color: var(--faint); }

/* ------------------------------------------------------------------
   Mobile cards
------------------------------------------------------------------ */
.mobile-list {
  display: none;
  gap: 12px;
}

.m-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.m-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
}
.m-head .toggle { margin-left: auto; flex: none; }

.m-name {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.m-tagline {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.m-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 14px;
}

.m-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 16px;
}

.m-field {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.m-field-label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.m-field-value {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.5;
}

.m-detail { border-top: 1px solid var(--line); }
.m-detail .detail { padding: 16px; }
.m-detail .detail-head { flex-direction: column; gap: 16px; }
.m-detail .quickstart { width: 100%; }
.m-detail .quickstart-label { text-align: left; }
.m-detail .detail-grid { grid-template-columns: 1fr 1fr; }

.empty {
  padding: 60px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.empty-mark {
  display: block;
  margin-bottom: 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 32px;
}

/* ------------------------------------------------------------------
   Guide
------------------------------------------------------------------ */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.guide-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  transition: transform 0.25s, border-color 0.25s;
}
.guide-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at 100% 0%, color-mix(in srgb, var(--tone) 9%, transparent), transparent 70%);
  pointer-events: none;
}
.guide-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--tone) 42%, var(--line));
}

.guide-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.guide-icon {
  color: var(--tone);
  font-size: 14px;
}

.guide-card h3 {
  position: relative;
  margin: 18px 0 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.guide-card p {
  position: relative;
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.guide-card code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.9em;
}

.text-link {
  position: relative;
  display: inline-flex;
  gap: 6px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tone);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.text-link span { transition: transform 0.2s; }
.text-link:hover span { transform: translateX(3px); }

/* ------------------------------------------------------------------
   Free types
------------------------------------------------------------------ */
.type-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.type-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--tone);
  border-radius: 14px;
  background: var(--panel);
}

.type-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.type-count {
  color: var(--tone);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.type-label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-align: right;
}

.type-card h3 {
  margin: 14px 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.type-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.type-ex {
  margin-top: 10px !important;
  color: var(--faint) !important;
  font-family: var(--font-mono);
  font-size: 9.5px !important;
  line-height: 1.6 !important;
}

/* ------------------------------------------------------------------
   Pitfalls
------------------------------------------------------------------ */
.pitfall-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  border-top: 1px solid var(--line);
}

.pitfall {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.pitfall-num {
  flex: none;
  padding-top: 3px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11px;
}

.pitfall h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.pitfall p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.callout {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--lime) 28%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--lime) 6%, transparent);
}

.callout-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--lime-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.callout p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.callout strong { color: var(--text); }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.footer-brand .brand-mark {
  width: 20px;
  height: 20px;
  color: var(--lime);
}

.footer-note {
  margin: 0;
  color: var(--faint);
  font-size: 11.5px;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--lime); }

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}

/* ------------------------------------------------------------------
   Tone helpers
------------------------------------------------------------------ */
.tone-lime { --tone: var(--lime); }
.tone-mint { --tone: var(--mint); }
.tone-blue { --tone: var(--blue); }
.tone-amber { --tone: var(--amber); }
.tone-coral { --tone: var(--coral); }

/* ------------------------------------------------------------------
   Motion
------------------------------------------------------------------ */
@keyframes blink { 50% { opacity: 0; } }

@keyframes detailIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero-copy > *,
.terminal {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-copy > *:nth-child(2) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.1s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.2s; }
.terminal { animation-delay: 0.18s; }

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 1060px) {
  .table-shell { display: none; }
  .mobile-list { display: grid; }
}

@media (max-width: 900px) {
  .type-grid { grid-template-columns: repeat(3, 1fr); }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .terminal { max-width: 620px; }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-inner { gap: 16px; }

  .toolbar { position: static; }

  .hero { padding: 64px 0 56px; }

  .section { padding: 56px 0; }

  .section-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .type-grid { grid-template-columns: repeat(2, 1fr); }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }

  .brand-text { font-size: 10px; }
  .brand-tag { display: none; }

  .hero h1 { font-size: clamp(2.8rem, 14vw, 4rem); }

  .lede { font-size: 14.5px; }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 0;
  }
  .stats > div {
    padding-right: 0;
    border-right: 0;
  }
  .stats > div:nth-child(odd) {
    padding-right: 14px;
    border-right: 1px solid var(--line);
  }

  .toolbar-top {
    flex-direction: column;
    align-items: stretch;
  }
  .search { max-width: none; }
  .sort { justify-content: space-between; }
  .sort select { flex: 1; }

  .result-note { display: none; }

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

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

  .detail-grid { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; }
  .quickstart-label { text-align: left; }
  .code-chip code {
    white-space: normal;
    word-break: break-all;
  }

  .terminal-body { font-size: 10.5px; }
  .t-name { width: 66px; }
  .t-spec { width: 54px; }

  .footer-links { flex-wrap: wrap; }
}

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