/* Boostle Operating System — mobile-first internal docs */

:root {
  --bg: #0b0d12;
  --bg-alt: #11151d;
  --surface: #171c27;
  --surface-2: #1e2533;
  --border: #2a3344;
  --text: #e8ecf4;
  --muted: #9aa6bc;
  --faint: #6b7689;
  --accent: #6ee7b7;
  --accent-2: #60a5fa;
  --accent-3: #fbbf24;
  --danger: #f87171;
  --boostle: #6ee7b7;
  --factory: #60a5fa;
  --signals: #c4b5fd;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: min(1120px, calc(100% - 2rem));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  color: var(--accent-2);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #04120c;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  min-height: 3.5rem;
}

.wordmark {
  flex-shrink: 0;
  width: 120px;
  height: auto;
  opacity: 0.95;
}
.wordmark.sm {
  width: 90px;
  opacity: 0.7;
}

.toc {
  display: none;
  gap: 0.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.toc a {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
}
.toc a:hover,
.toc a:focus-visible {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 2.75rem 0 2rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(110, 231, 183, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(96, 165, 250, 0.08), transparent 50%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 750;
}

.subtitle {
  margin: 0;
  max-width: 36rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

/* Sections */
.section {
  padding: 3rem 0;
}
.section.alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 36rem;
}
.section-head .num {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
}
.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  letter-spacing: -0.02em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
}

/* Front door diagram */
.door-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.door-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
  min-width: 7.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.door-node.chris {
  border-color: var(--accent-3);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2);
}
.door-node.cos {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.25);
}
.door-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.door-node.chris .door-icon {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-3);
}
.door-node.cos .door-icon {
  background: rgba(110, 231, 183, 0.15);
  color: var(--accent);
}
.door-node strong {
  font-size: 0.95rem;
}
.door-node small {
  color: var(--faint);
  font-size: 0.75rem;
}

.door-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.door-link.fan {
  transform: rotate(90deg);
  margin: 0.25rem 0;
}

.door-fan {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 28rem;
}
.chip {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

.callouts {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.callouts li {
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}
.callouts strong {
  color: var(--text);
}
.callouts time {
  font-family: var(--mono);
  color: var(--accent);
}

/* Channels */
.channel-grid {
  display: grid;
  gap: 1rem;
}

.channel-card {
  position: relative;
  padding: 1.35rem 1.25rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.channel-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
}
.channel-card.boostle::before { background: var(--boostle); }
.channel-card.factory::before { background: var(--factory); }
.channel-card.signals::before { background: var(--signals); }

.channel-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.65rem;
}
.boostle .channel-badge {
  color: #04120c;
  background: var(--boostle);
}
.factory .channel-badge {
  color: #041018;
  background: var(--factory);
}
.signals .channel-badge {
  color: #12081f;
  background: var(--signals);
}

.channel-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.channel-tag {
  margin: 0 0 1rem;
  color: var(--faint);
  font-size: 0.85rem;
}

.who {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.who li {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.channel-card .does,
.channel-card .not {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}
.channel-card .does strong { color: var(--accent); }
.channel-card .not strong { color: var(--danger); }

/* Specialists */
.spec-grid {
  display: grid;
  gap: 0.85rem;
}

.spec-card {
  padding: 1.15rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.spec-card.muted {
  opacity: 0.72;
}
.spec-card h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}
.spec-job {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}
.spec-card ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.spec-card li + li {
  margin-top: 0.35rem;
}
.spec-card time {
  font-family: var(--mono);
  color: var(--accent-2);
  font-size: 0.85em;
}

/* Core flow */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: none;
}

.flow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 0.85rem 0;
  position: relative;
}
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 2.6rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--border), transparent);
}

.flow-n {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
}

.flow-step strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}
.flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Rules */
.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.rules li {
  position: relative;
  padding: 0.85rem 1rem 0.85rem 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--text);
}
.rules li::before {
  content: "✕";
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
  font-size: 0.65rem;
  font-weight: 800;
}

/* Timeline / cadence */
.timeline {
  position: relative;
  padding-left: 0.25rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4.1rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border);
}

.t-item {
  display: grid;
  grid-template-columns: 3.6rem auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.7rem 0;
  position: relative;
}
.t-item time {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  padding-top: 0.15rem;
}
.t-dot {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.3rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  z-index: 1;
}
.t-dot.scout {
  border-color: var(--signals);
  background: rgba(196, 181, 253, 0.25);
  box-shadow: 0 0 0 4px rgba(196, 181, 253, 0.1);
}
.t-item.span {
  background: rgba(196, 181, 253, 0.06);
  border: 1px dashed rgba(196, 181, 253, 0.35);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  margin: 0.35rem 0;
}
.t-item strong {
  display: block;
  font-size: 0.92rem;
}
.t-item small {
  display: block;
  color: var(--faint);
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.footer-inner p {
  margin: 0;
  color: var(--faint);
  font-size: 0.85rem;
}

/* —— 768+ —— */
@media (min-width: 768px) {
  :root {
    --wrap: min(1120px, calc(100% - 3rem));
  }

  .toc {
    display: flex;
  }

  .hero {
    padding: 3.5rem 0 2.75rem;
  }

  .door-diagram {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    padding: 2rem;
  }
  .door-link.fan {
    transform: none;
  }
  .door-fan {
    width: 100%;
    max-width: none;
    margin-top: 0.5rem;
  }

  .channel-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

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

  .flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
  .flow-step {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .flow-step:not(:last-child)::after {
    display: none;
  }

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

  .timeline {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* —— 1280+ —— */
@media (min-width: 1280px) {
  .spec-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .flow {
    grid-template-columns: repeat(3, 1fr);
  }

  .door-diagram {
    gap: 1rem;
  }
  .door-fan {
    width: auto;
    flex: 1;
    justify-content: flex-start;
    max-width: 22rem;
    margin-top: 0;
  }
}
