:root {
  --bg: #0b0e14;
  --bg-elevated: #111622;
  --bg-card: #151b29;
  --bg-code: #0d111a;
  --border: #252f42;
  --border-strong: #364460;
  --text: #eef2f8;
  --text-muted: #98a4bc;
  --text-dim: #6f7c96;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --sky: #38bdf8;
  --sky-soft: rgba(56, 189, 248, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, 0.15);
  --radius: 10px;
  --radius-sm: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "Fira Code", SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

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;
}

a {
  color: var(--sky);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 14, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent-soft);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
}

.brand-sub {
  font-weight: 500;
  color: var(--text-dim);
  font-size: 13px;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

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

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.lang-toggle button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  background: #34d399;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
}

.btn-sky {
  background: var(--sky-soft);
  color: var(--sky);
  border-color: rgba(56, 189, 248, 0.35);
}

.btn-sky:hover {
  background: rgba(56, 189, 248, 0.22);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

/* Hero */
.hero {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 360px at 50% -120px, rgba(16, 185, 129, 0.11), transparent 70%),
    linear-gradient(to bottom, rgba(21, 27, 41, 0.35), transparent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  font-family: var(--font-mono);
  margin-bottom: 18px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 820px;
}

.hero-sub {
  margin: 0 0 24px;
  font-size: 17px;
  color: var(--text-muted);
  max-width: 720px;
}

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

.cli-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--bg-code);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
}

.cli-pill .prompt {
  color: var(--accent);
  user-select: none;
}

.copy-mini {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 3px 8px;
  cursor: pointer;
}

.copy-mini:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.ide-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 12.5px;
  font-family: var(--font-mono);
}

.ide-badge {
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 680px;
}

/* Calculator */
.privacy-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 920px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panel-title {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.preset-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  cursor: pointer;
}

.preset-btn:hover,
.preset-btn.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

textarea.code-input {
  width: 100%;
  min-height: 360px;
  padding: 14px;
  background: var(--bg-code);
  color: #dbe6f5;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
  tab-size: 2;
}

textarea.code-input:focus {
  outline: none;
  border-color: var(--sky);
}

.parse-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--rose-soft);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
  font-size: 13px;
  font-family: var(--font-mono);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 560px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }
}

.kpi {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tone-good {
  color: var(--accent);
}
.tone-warn {
  color: var(--amber);
}
.tone-bad {
  color: var(--rose);
}

/* Slider controls */
.slider-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.slider-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 13px;
}

.slider-top input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.cache-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
}

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

@media (max-width: 560px) {
  .cost-grid {
    grid-template-columns: 1fr;
  }
}

.cost-card {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
}

.cost-model {
  font-size: 12px;
  color: var(--text-muted);
}

.cost-amount {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

.cost-note {
  font-size: 11px;
  color: var(--text-dim);
}

/* Bar chart */
.bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 124px 1fr 86px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}

.bar-name {
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.bar-fill.high {
  background: var(--rose);
}
.bar-fill.med {
  background: var(--amber);
}
.bar-fill.low {
  background: var(--accent);
}

.bar-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

/* Findings */
.findings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.finding {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 13px;
}

.finding.critical,
.finding.high {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.08);
}

.finding.medium {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.07);
}

.finding-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-weight: 600;
}

.sev-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.sev-critical,
.sev-high {
  background: var(--rose-soft);
  color: #fda4af;
}

.sev-medium {
  background: var(--amber-soft);
  color: #fcd34d;
}

.sev-low {
  background: var(--sky-soft);
  color: #7dd3fc;
}

.finding-fix {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 3px;
}

.clean-banner {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-size: 13px;
}

/* YAML preview */
.yaml-pre {
  margin: 0;
  padding: 14px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  color: #cbd5e1;
  overflow-x: auto;
  max-height: 280px;
}

/* Feature grid & Tables */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 860px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

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

th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--bg-elevated);
}

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

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.price-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.price-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.price-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.price-num {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.price-period {
  color: var(--text-muted);
  font-size: 13.5px;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
  color: var(--text-muted);
  flex-grow: 1;
}

.price-list li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

.claim-box {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.claim-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.claim-form input {
  flex: 1;
  min-width: 240px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-code);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.claim-result {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* Prose / Docs / Legal */
.prose {
  padding: 48px 0 64px;
}

.prose h1 {
  font-size: 32px;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

.prose .meta {
  color: var(--text-dim);
  font-size: 13.5px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
}

.prose h2 {
  font-size: 20px;
  margin: 30px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose pre {
  padding: 14px 16px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 13px;
  color: #dbe6f5;
}

/* Footer */
.site-footer {
  padding: 36px 0 48px;
  color: var(--text-dim);
  font-size: 13.5px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

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