/* Spacehub v2 plan — shared styles */
:root {
  --bg: #0b1020;
  --bg-soft: #131a30;
  --bg-card: #182040;
  --border: #2a3463;
  --fg: #e6e9f5;
  --fg-muted: #9aa3c7;
  --accent: #7aa2ff;
  --accent-soft: #2b3a78;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --grey: #64748b;
  --mono: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fc;
    --bg-soft: #ffffff;
    --bg-card: #ffffff;
    --border: #d8dcec;
    --fg: #1a1f3a;
    --fg-muted: #5b6385;
    --accent: #3b5bdb;
    --accent-soft: #dbe4ff;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 15px;
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
}

.sidebar {
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin: 16px 0 8px 0;
  font-weight: 600;
}

.sidebar h2:first-child { margin-top: 0; }

.sidebar a {
  display: block;
  padding: 6px 10px;
  color: var(--fg);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  margin: 1px 0;
}

.sidebar a:hover { background: var(--bg-card); }
.sidebar a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar .brand {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 4px;
  display: block;
  color: var(--fg);
  text-decoration: none;
}
.sidebar .tagline {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 24px;
}

main {
  padding: 40px clamp(20px, 5vw, 60px);
  max-width: 1100px;
}

h1 { font-size: 32px; margin: 0 0 8px 0; letter-spacing: -0.02em; }
h2 { font-size: 22px; margin: 36px 0 12px 0; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 24px 0 8px 0; }
h4 { font-size: 14px; margin: 16px 0 6px 0; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-muted); }

p { margin: 0 0 12px 0; }

a { color: var(--accent); }

code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-card);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: transparent;
  padding: 0;
  border: 0;
  font-size: inherit;
}

.lead {
  font-size: 17px;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 32px 0;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tag.pending { background: rgba(100, 116, 139, 0.2); color: var(--grey); }
.tag.research { background: rgba(251, 191, 36, 0.2); color: var(--amber); }
.tag.ready { background: rgba(74, 222, 128, 0.2); color: var(--green); }
.tag.critical { background: rgba(248, 113, 113, 0.2); color: var(--red); }
.tag.phase0 { background: var(--accent-soft); color: var(--accent); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 16px 0;
}

.card h3:first-child { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  color: var(--fg);
  display: block;
  transition: border-color 0.15s;
}
.feature:hover { border-color: var(--accent); }
.feature h3 { margin: 0 0 4px 0; font-size: 16px; }
.feature .desc { font-size: 13px; color: var(--fg-muted); margin: 0; }
.feature .tag { margin-top: 8px; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0 24px 0;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  font-weight: 600;
  color: var(--fg-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tr:hover td { background: var(--bg-soft); }

ul, ol { margin: 0 0 16px 0; padding-left: 24px; }
li { margin: 4px 0; }
li > p { margin: 0; }
li ul, li ol { margin: 4px 0 8px 0; }

blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  padding: 12px 16px;
  margin: 16px 0;
  color: var(--fg-muted);
  border-radius: 0 6px 6px 0;
}
blockquote p { margin: 0; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps > li {
  counter-increment: step;
  padding: 12px 12px 12px 56px;
  position: relative;
  border-left: 2px solid var(--border);
  margin-left: 20px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -16px;
  top: 12px;
  width: 30px;
  height: 30px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}
.steps > li strong { display: block; margin-bottom: 4px; font-size: 15px; }

.checklist {
  list-style: none;
  padding: 0;
}
.checklist > li {
  padding-left: 28px;
  position: relative;
  margin: 6px 0;
}
.checklist > li::before {
  content: "☐";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--fg-muted);
  font-size: 18px;
}
.checklist > li.done::before { content: "☑"; color: var(--green); }

.footer {
  margin: 60px 0 20px 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 13px;
}

.kbd {
  font-family: var(--mono);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  margin: 16px 0;
  font-size: 14px;
}
.callout.warn { border-left-color: var(--amber); background: rgba(251, 191, 36, 0.1); }
.callout.danger { border-left-color: var(--red); background: rgba(248, 113, 113, 0.1); }
.callout strong { color: var(--fg); }
