/* =============================================================================
   K-Data Lab — styles.css
   No external fonts, no CDN, no build step. System stack only.
   ========================================================================== */

/* ---------- design tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #080b11;
  --bg-elev: #0d121b;
  --panel: #101724;
  --panel-2: #131c2b;
  --border: #1e2839;
  --border-strong: #2c3a51;

  --text: #e7eefb;
  --text-dim: #9aa8bd;
  --text-faint: #6c7a90;

  --accent: #3ddc97;
  --accent-ink: #04231a;
  --accent-soft: rgba(61, 220, 151, 0.12);
  --blue: #7aa2f7;
  --blue-soft: rgba(122, 162, 247, 0.12);
  --amber: #f4b942;
  --amber-soft: rgba(244, 185, 66, 0.12);
  --red: #f2777a;
  --red-soft: rgba(242, 119, 122, 0.12);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, "Cascadia Code", "Liberation Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --max: 1180px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9fc;
  --bg-elev: #ffffff;
  --panel: #ffffff;
  --panel-2: #f2f6fb;
  --border: #dfe6f0;
  --border-strong: #c3cfe0;
  --text: #0f1726;
  --text-dim: #4d5d75;
  --text-faint: #75849b;
  --accent: #0f9d63;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15, 157, 99, 0.1);
  --blue: #2f5fd0;
  --blue-soft: rgba(47, 95, 208, 0.09);
  --amber: #a86b00;
  --amber-soft: rgba(168, 107, 0, 0.1);
  --red: #c23a3f;
  --red-soft: rgba(194, 58, 63, 0.09);
  --shadow: 0 1px 2px rgba(15, 23, 38, 0.04), 0 14px 30px -22px rgba(15, 23, 38, 0.35);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f7f9fc;
    --bg-elev: #ffffff;
    --panel: #ffffff;
    --panel-2: #f2f6fb;
    --border: #dfe6f0;
    --border-strong: #c3cfe0;
    --text: #0f1726;
    --text-dim: #4d5d75;
    --text-faint: #75849b;
    --accent: #0f9d63;
    --accent-ink: #ffffff;
    --accent-soft: rgba(15, 157, 99, 0.1);
    --blue: #2f5fd0;
    --blue-soft: rgba(47, 95, 208, 0.09);
    --amber: #a86b00;
    --amber-soft: rgba(168, 107, 0, 0.1);
    --red: #c23a3f;
    --red-soft: rgba(194, 58, 63, 0.09);
    --shadow: 0 1px 2px rgba(15, 23, 38, 0.04), 0 14px 30px -22px rgba(15, 23, 38, 0.35);
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 12% -8%, var(--accent-soft), transparent 70%),
    radial-gradient(760px 380px at 88% -12%, var(--blue-soft), transparent 72%);
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 680; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.15rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2rem); }
h3 { font-size: 1.08rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin: 0.25em 0; }
code, kbd, pre { font-family: var(--mono); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; position: relative; z-index: 1; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 650;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

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

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(150%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.03rem;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), #2bb6d6);
  color: #04231a;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav a {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a[aria-current="true"] { color: var(--accent); background: var(--accent-soft); }

.header-tools { display: flex; align-items: center; gap: 8px; margin-left: 4px; }

.icon-btn {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; }
:root[data-theme="light"] .icon-sun { display: none; }
:root:not([data-theme="light"]) .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .icon-moon { display: inline; }
}

@media (max-width: 820px) {
  .nav { display: none; }
  .header-inner { min-height: 58px; }
}

@media (max-width: 560px) {
  .header-tools .btn { display: none; }
  .brand small { display: none; }
  .header-inner { gap: 10px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 11px; font-size: 0.82rem; border-radius: 8px; }
.btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 7vw, 92px) 0 26px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 6px 11px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 { margin-bottom: 18px; }
.hero h1 .grad {
  background: linear-gradient(96deg, var(--accent), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.13rem);
  color: var(--text-dim);
  max-width: 60ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.stat b { display: block; font-size: 1.4rem; letter-spacing: -0.03em; line-height: 1.2; }
.stat span { font-size: 0.78rem; color: var(--text-faint); }

.hero-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-elev));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 0.78rem;
  color: var(--text-faint);
  font-family: var(--mono);
}
.traffic { display: inline-flex; gap: 5px; margin-right: 4px; }
.traffic i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.hero-card pre { margin: 0; padding: 16px 16px 18px; font-size: 0.79rem; line-height: 1.65; overflow-x: auto; }
.hero-card-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* ---------- sections ---------- */
.section { padding: clamp(40px, 5.5vw, 68px) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 68ch; margin-bottom: 26px; }
.section-head p { color: var(--text-dim); margin-bottom: 0; }
.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 680;
  margin-bottom: 8px;
}

/* ---------- source strip ---------- */
.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.source-chip {
  font-size: 0.75rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ---------- filters ---------- */
.filters {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 22px;
}
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-row + .filter-row { margin-top: 12px; }
.filter-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 650;
  min-width: 74px;
}
.chip {
  font: inherit;
  font-size: 0.84rem;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.14s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 620;
}
.chip .count { opacity: 0.65; font-size: 0.78em; margin-left: 3px; }

.search-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-field {
  position: relative;
  flex: 1 1 260px;
  display: flex;
  align-items: center;
}
.search-field svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  padding: 11px 40px 11px 36px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}
.search-field input::placeholder { color: var(--text-faint); }
.search-field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-clear {
  position: absolute;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  border-radius: 6px;
  cursor: pointer;
  display: none;
  place-items: center;
}
.search-clear.show { display: grid; }
.search-clear:hover { color: var(--text); background: var(--panel-2); }

.result-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 2px 16px;
  font-size: 0.86rem;
  color: var(--text-dim);
}
.result-bar b { color: var(--text); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-faint); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- catalog grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
@media (max-width: 560px) { .grid { grid-template-columns: minmax(0, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.16s ease, transform 0.16s ease;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.card:hover { border-color: var(--border-strong); }
.card:hover::after { opacity: 1; }
.card[data-status="upcoming"]::after, .card[data-status="paused"]::after { background: linear-gradient(90deg, var(--amber), transparent 70%); opacity: 1; }

.card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--bg-elev);
}
.platform-badge svg { width: 12px; height: 12px; }
.platform-badge[data-platform="rapidapi"] { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, var(--border)); background: var(--blue-soft); }
.platform-badge[data-platform="apify"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: var(--accent-soft); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 680;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-badge i { width: 6px; height: 6px; border-radius: 50%; }
.status-badge[data-status="live"] { color: var(--accent); background: var(--accent-soft); }
.status-badge[data-status="live"] i { background: var(--accent); }
.status-badge[data-status="upcoming"] { color: var(--amber); background: var(--amber-soft); }
.status-badge[data-status="upcoming"] i { background: var(--amber); }
.status-badge[data-status="paused"] { color: var(--text-dim); background: var(--panel-2); }
.status-badge[data-status="paused"] i { background: var(--text-dim); }

.card h3 { margin-bottom: 6px; font-size: 1.06rem; }
.card-tagline { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 10px; }
.card-summary {
  font-size: 0.865rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-note {
  font-size: 0.82rem;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 25%, transparent);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin-bottom: 12px;
}

.meta-list {
  display: grid;
  gap: 6px;
  font-size: 0.79rem;
  margin-bottom: 12px;
  padding: 10px 0 0;
  border-top: 1px dashed var(--border);
}
.meta-list div { display: flex; gap: 8px; }
.meta-list dt { color: var(--text-faint); min-width: 52px; flex: 0 0 auto; }
.meta-list dd { margin: 0; color: var(--text-dim); overflow-wrap: anywhere; }

.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 4px;
}
.price-tag .p-main { color: var(--accent); font-weight: 650; }
.price-detail { font-size: 0.76rem; color: var(--text-faint); margin: 0 0 12px; }

.endpoints { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.endpoint {
  font-family: var(--mono);
  font-size: 0.71rem;
  color: var(--text-dim);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 4px; }
.card-actions .btn { flex: 1 1 0; min-width: 0; }
.card-actions .btn-primary { flex: 1 1 100%; }

.card-verified {
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ---------- empty state ---------- */
.empty {
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 48px 24px;
  color: var(--text-dim);
  background: var(--panel);
}
.empty h3 { color: var(--text); }
.empty p { margin-bottom: 16px; }

/* ---------- quick start ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

.qs-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.qs-picker label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 650;
  flex: 0 0 auto;
}
.qs-picker select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  font: inherit;
  font-size: 0.88rem;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
}
.qs-picker select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.qs-note { font-size: 0.8rem; color: var(--text-faint); margin-top: 10px; }

.tab {
  font: inherit;
  font-size: 0.86rem;
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  cursor: pointer;
}
.tab[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 620;
}

.code-block {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-block header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 0.76rem;
  color: var(--text-faint);
  font-family: var(--mono);
}
.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.7;
  tab-size: 2;
}
.code-block pre code { white-space: pre; }

.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(18px, 3vw, 34px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  margin-bottom: 16px;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
}
.steps b { color: var(--text); }

/* ---------- trust / tables ---------- */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--panel);
}
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
caption { text-align: left; padding: 12px 14px; color: var(--text-faint); font-size: 0.8rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); background: var(--panel-2); font-weight: 650; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td a { overflow-wrap: anywhere; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.pillar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.pillar h3 { font-size: 0.96rem; display: flex; align-items: center; gap: 8px; }
.pillar h3 svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
.pillar p { margin: 0; font-size: 0.86rem; color: var(--text-dim); }

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}
.price-card h3 { margin-bottom: 2px; }
.price-card .sub { font-size: 0.8rem; color: var(--text-faint); margin-bottom: 14px; }
.price-line { display: flex; justify-content: space-between; gap: 10px; font-size: 0.86rem; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.price-line:last-of-type { border-bottom: 0; }
.price-line span:first-child { color: var(--text-dim); }
.price-line span:last-child { font-family: var(--mono); font-size: 0.82rem; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
}
.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 620;
  font-size: 0.94rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details > p { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 14px; }
.faq details > p:last-child { margin-bottom: 16px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-top: 20px;
  color: var(--text-faint);
  font-size: 0.84rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 26px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-grid h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 5px 0; }
.footer-grid a { color: var(--text-dim); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  margin-top: 26px;
  padding-top: 18px;
  font-size: 0.78rem;
}

/* ---------- dialog ---------- */
dialog {
  width: min(840px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}
dialog::backdrop {
  background: rgba(4, 7, 12, 0.66);
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  position: sticky;
  top: 0;
  z-index: 2;
}
.dialog-head h2 { font-size: 1.05rem; margin: 0 0 3px; }
.dialog-head p { margin: 0; font-size: 0.8rem; color: var(--text-faint); }
.dialog-head .icon-btn { margin-left: auto; width: 34px; height: 34px; }
.dialog-body { overflow: auto; max-height: calc(86vh - 130px); }
.dialog-body pre {
  margin: 0;
  padding: 16px 18px 22px;
  font-size: 0.79rem;
  line-height: 1.65;
  overflow-x: auto;
}
.dialog-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
}
.loading { padding: 34px 18px; color: var(--text-faint); font-size: 0.88rem; text-align: center; }

/* JSON syntax colours */
.tok-key { color: var(--blue); }
.tok-str { color: var(--accent); }
.tok-num { color: var(--amber); }
.tok-bool { color: #c792ea; }
.tok-null { color: var(--text-faint); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- print ---------- */
@media print {
  .site-header, .hero-card, .filters, .card-actions, .toast, dialog { display: none !important; }
  body::before { display: none; }
  body { background: #fff; color: #000; }
  .card { break-inside: avoid; border-color: #ccc; box-shadow: none; }
}
