:root {
  --bg: #0b0f1a;
  --card: #151b2b;
  --card-2: #1c2438;
  --border: #26314a;
  --text: #e8ecf5;
  --muted: #9aa4b8;
  --primary: #5b3ce6;
  --primary-hover: #4c2fd6;
  --accent: #22d3ee;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}

h1 { font-size: 36px; letter-spacing: -0.02em; }
h2 { font-size: 24px; letter-spacing: -0.01em; margin-top: 48px; margin-bottom: 16px; }
h3 { font-size: 18px; margin-top: 24px; margin-bottom: 8px; }

p { margin: 0 0 16px; max-width: 70ch; color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--card-2);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--accent);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 26, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
}

.brand-accent { color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.nav-link:hover, .nav-link.is-active {
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.site-main {
  flex: 1;
  padding: 32px 0 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.bc-sep { color: #475569; }
.bc-link { color: var(--muted); }
.bc-link:hover { color: var(--accent); }
.bc-current { color: var(--text); font-weight: 600; }

.hero-compact { margin-bottom: 32px; }
.kicker { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.lead { font-size: 17px; color: var(--muted); margin-top: 12px; margin-bottom: 24px; }
.lead-sub { font-size: 14px; color: var(--muted); margin-top: -8px; margin-bottom: 16px; }
.verified-line { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 8px; margin-bottom: 0; }
.tool-heading { font-size: 20px; margin-top: 24px; margin-bottom: 16px; }
.leonida-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.leonida-check-item { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 13px; }
.leonida-check-item strong { display: block; color: var(--text); margin-bottom: 2px; }
.leonida-check-item span { color: var(--muted); }


/* Spec Checker */
.checker-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.preset-label { font-size: 13px; color: var(--muted); }

.preset-btn {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.preset-btn:hover { border-color: var(--accent); }

.checker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 140px;
  gap: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.combo-wrap { position: relative; }

.combo-input, .ram-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 36px 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}

.ram-select { padding-right: 12px; }

.combo-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
}

.combo-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.combo-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.combo-option:hover { background: var(--border); }
.combo-score { font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; }
.combo-empty { padding: 10px; font-size: 13px; color: var(--muted); }

.checker-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--card-2); text-decoration: none; }
.status-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 20px;
}
.status-dl { margin: 0; }
.status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.status-row:last-child { border-bottom: 0; }
.status-row dt { color: var(--muted); font-weight: 600; }
.status-row dd { margin: 0; color: var(--text); font-weight: 600; }
.status-actions { margin-top: 16px; }
.mac-notice {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--bg);
  font-size: 14px;
  color: var(--text);
}
.checker-meta { font-size: 13px; color: var(--muted); }
.checker-error { margin-top: 12px; font-size: 13px; color: #fb7185; }

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

.result-card[data-tier="cannot-run"] { border-color: #f43f5e; }
.result-card[data-tier="low"] { border-color: #f59e0b; }
.result-card[data-tier="rec"] { border-color: var(--accent); }
.result-card[data-tier="high"] { border-color: #10b981; }

.result-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.result-title { margin: 0; font-size: 22px; }
.result-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--accent);
}
.result-summary { font-size: 15px; color: var(--muted); margin-bottom: 20px; }

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

.fps-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.fps-res { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.fps-val { font-family: var(--font-heading); font-size: 22px; font-weight: 700; margin-bottom: 2px; }
.fps-sub { font-size: 12px; color: var(--muted); margin: 0; }

.bars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.bar-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--muted); }
.bar-top strong { color: var(--text); }
.bar-track { position: relative; height: 10px; background: var(--card-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.25s ease; }
.bar-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, 0.45); }
.bar-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }

.upgrade-box {
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
}
.upgrade-kicker { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.upgrade-text { font-size: 14px; margin: 0; color: var(--text); }

.checker-disclaimer {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  max-width: none;
}

/* Content blocks, tables, cards, callouts */
.section-block { margin-top: 48px; }
.section-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.inline-cta { font-size: 14px; font-weight: 600; color: var(--accent); }

.callout-warn, .inline-disclaimer {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--muted);
  max-width: none;
  margin-top: 16px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.hub-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
}

.hub-card:hover { border-color: var(--accent); text-decoration: none; }
.hub-title { font-family: var(--font-heading); font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.hub-desc { font-size: 14px; color: var(--muted); margin: 0; }

.cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}

.prose-sections ul, .prose-sections ol { padding-left: 22px; margin: 0 0 16px; max-width: 70ch; }
.prose-sections li { margin-bottom: 8px; color: var(--text); }

.table-wrap, .prose-sections table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 16px 0 24px;
  font-size: 14px;
}

.prose-sections th, .prose-sections td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose-sections th {
  background: var(--card-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

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

.jump-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill-link {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.pill-link:hover { border-color: var(--accent); text-decoration: none; }
.pill-accent { border-color: var(--primary); }

/* Mission progress checkboxes */
.mission-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.mission-chk {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

tr.is-done td { opacity: 0.55; }
tr.is-done td:nth-child(2) { text-decoration: line-through; }

/* FAQ Accordion */
.faq-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
}

.faq-q::-webkit-details-marker { display: none; }
.faq-plus { color: var(--accent); font-size: 18px; flex-shrink: 0; }
.faq-a { padding: 0 20px 16px; margin: 0; font-size: 15px; color: var(--muted); max-width: 70ch; }

/* Data Source Box */
.datasource-box {
  margin-top: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 13px;
  color: var(--muted);
}

.datasource-box p { max-width: none; margin-bottom: 8px; color: var(--muted); }
.datasource-box p:last-child { margin-bottom: 0; }
.ds-title { font-weight: 600; color: var(--text) !important; font-size: 14px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 40px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}

.footer-brand { font-family: var(--font-heading); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.footer-desc, .footer-contact { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.footer-heading { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; font-size: 13px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom p { margin: 0; max-width: none; }
.legal-meta { font-size: 13px; color: var(--muted); margin-top: 8px; margin-bottom: 24px; }

@media (max-width: 768px) {
  .checker-grid, .hub-grid, .footer-grid, .bars-grid { grid-template-columns: 1fr; }
  .fps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .header-inner { flex-direction: column; align-items: flex-start; padding: 12px 0; }
  .btn-primary { width: 100%; }
  .prose-sections table { display: block; overflow-x: auto; }
}
