/* Atlas Cloud — Atlas Suite design language (docs/ATLAS_DESIGN_LANGUAGE.md).
   Tokens are the family's single source; Control Tower is the anchor. */
:root {
  --ink: #111;
  --text-2: #374151;
  --text-3: #6b7280;
  --text-4: #9ca3af;
  --bg: #f9fafb;
  --surface: #fff;
  --line: #e5e7eb;
  --ok-text: #166534; --ok-bg: #dcfce7; --ok-dot: #16a34a;
  --warn-text: #92400e; --warn-bg: #fef3c7;
  --bad-text: #991b1b; --bad-bg: #fee2e2;
  --info-text: #1d4ed8; --info-bg: #eff6ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f3f4f6; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.88em; }

/* Header (family: dark #111 bar, wordmark = bold + light area) */
header { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.5rem; background: var(--ink); color: #fff; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; }
.brand span { font-weight: 300; opacity: 0.85; }
nav { display: flex; align-items: center; gap: 1.1rem; }
nav a { color: #d1d5db; text-decoration: none; font-size: 0.92rem; }
nav a:hover { color: #fff; }
nav a.btn { background: #fff; color: var(--ink); padding: 0.35rem 0.85rem; border-radius: 6px; font-weight: 600; }
.nav-user { color: var(--text-4); font-size: 0.85rem; }
form.inline { display: inline; margin: 0; }
button.linklike { background: none; border: none; color: #d1d5db; cursor: pointer; font-size: 0.92rem; padding: 0; }
button.linklike:hover { color: #fff; }

main { max-width: 860px; margin: 2.2rem auto; padding: 0 1.5rem; }
footer { max-width: 860px; margin: 3rem auto 2rem; padding: 1rem 1.5rem 0; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.82rem; }
h1 { font-size: 1.7rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.15rem; margin: 1.8rem 0 0.6rem; }
p.lede { color: var(--text-2); font-size: 1.05rem; margin-top: 0; }
.muted { color: var(--text-3); font-size: 0.9rem; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.3rem; margin: 0.9rem 0; }
.card h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.card .muted { color: var(--text-3); font-size: 0.9rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem; }

/* Pills & badges — semantic, from the family status palette */
.pill { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: #f3f4f6; color: var(--text-2); }
.pill.current { background: var(--ink); color: #fff; }
.badge { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.12rem 0.45rem; border-radius: 4px; }
.badge.sample { background: var(--warn-bg); color: var(--warn-text); }

/* Forms */
label { display: block; margin: 0.9rem 0 0.25rem; font-weight: 600; font-size: 0.9rem; }
input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%; max-width: 26rem; padding: 0.5rem 0.6rem;
  border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.95rem; background: var(--surface);
}
button[type="submit"], a.button {
  display: inline-block; margin-top: 1.1rem; background: var(--ink); color: #fff;
  border: none; border-radius: 6px; padding: 0.55rem 1.2rem; font-size: 0.95rem;
  font-weight: 600; cursor: pointer; text-decoration: none;
}
button:disabled, button.launch:disabled { background: var(--text-4); cursor: not-allowed; }

/* Notices */
.error { background: var(--bad-bg); border: 1px solid #fecaca; color: var(--bad-text); border-radius: 6px; padding: 0.6rem 0.9rem; margin: 0.9rem 0; font-size: 0.92rem; }
.notice { background: var(--info-bg); border: 1px solid #dbeafe; border-radius: 6px; padding: 0.6rem 0.9rem; margin: 0.9rem 0; font-size: 0.92rem; color: var(--text-2); }

/* Tables (family: uppercase muted heads on white) */
table { border-collapse: collapse; width: 100%; margin: 0.6rem 0; background: var(--surface); }
th, td { text-align: left; padding: 0.45rem 0.7rem; border-bottom: 1px solid #f3f4f6; font-size: 0.92rem; }
th { color: var(--text-3); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.tier-current { background: var(--info-bg); font-weight: 700; }

/* Stepper */
ol.stepper { list-style: none; padding: 0; margin: 1rem 0; }
ol.stepper li { padding: 0.55rem 0.9rem 0.55rem 2.2rem; position: relative; border-left: 2px solid var(--line); margin-left: 0.6rem; color: var(--text-3); }
ol.stepper li::before { content: ""; position: absolute; left: -7px; top: 0.95rem; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
ol.stepper li.done { color: var(--text-2); }
ol.stepper li.done::before { background: var(--ok-dot); }
ol.stepper li.current { color: var(--ink); font-weight: 700; }
ol.stepper li.current::before { background: #fff; border: 3px solid var(--ink); left: -9px; top: 0.85rem; }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 1.2rem; }

/* Subnav (platform tabs) */
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.subnav-inner { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 1.4rem; }
.subnav-company { font-weight: 700; font-size: 0.95rem; padding: 0.7rem 0; color: var(--ink); }
.subnav a { color: var(--text-3); text-decoration: none; font-size: 0.92rem; padding: 0.7rem 0.15rem; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* Tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.3rem; text-decoration: none; color: inherit; transition: border-color 0.12s, box-shadow 0.12s; }
.tile:hover { border-color: var(--text-4); box-shadow: 0 1px 4px rgba(17, 17, 17, 0.06); }
.tile h3 { margin: 0 0 0.5rem; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.tile-stats { margin: 0.2rem 0 0.5rem; font-size: 0.95rem; color: var(--text-2); }
.tile-stats strong { font-size: 1.15rem; color: var(--ink); }
.tile-cta { margin: 0.6rem 0 0; font-size: 0.85rem; font-weight: 600; color: var(--ink); }

/* Launch + hero */
.hero-launch { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-launch h1 { margin-bottom: 0.3rem; }
.button.launch, button.launch { background: var(--ink); color: #fff; border: none; border-radius: 6px; padding: 0.75rem 1.6rem; font-size: 1.02rem; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.score { font-size: 2.1rem; font-weight: 700; margin: 0.3rem 0 1rem; }
.score span { font-size: 1.1rem; color: var(--text-3); font-weight: 400; }

/* Overview */
.eyebrow { margin: 0 0 0.15rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.overview-head { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.overview-head h1 { margin: 0; }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.status-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.status-list li { padding: 0.3rem 0; font-size: 0.95rem; display: flex; align-items: center; gap: 0.55rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-4); flex-shrink: 0; }
.dot.ok { background: var(--ok-dot); }
.stat-row { display: flex; gap: 1.6rem; flex-wrap: wrap; margin: 0.7rem 0 0.3rem; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.7rem; line-height: 1.15; }
.stat span { font-size: 0.8rem; color: var(--text-3); }
.activity-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.activity-list li { padding: 0.35rem 0; font-size: 0.9rem; border-bottom: 1px solid #f3f4f6; }
.activity-list li:last-child { border-bottom: none; }
.activity-list .when { color: var(--text-4); font-size: 0.8rem; margin-right: 0.5rem; font-variant-numeric: tabular-nums; }
.quicklinks { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.quicklink { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 1rem; font-size: 0.88rem; color: var(--text-2); text-decoration: none; }
.quicklink:hover { border-color: var(--text-4); color: var(--ink); }

/* Assessment (executive document) */
.assessment h2 { margin-top: 2rem; }
.improvements { padding-left: 1.2rem; }
.improvements li { margin: 0.7rem 0; }
.upgrade-cta { border: 2px solid var(--ink); margin-top: 1.6rem; }
.q-row { display: block; margin: 0.55rem 0; font-weight: 400; font-size: 0.98rem; }
.q-row input { margin-right: 0.5rem; }

@media print {
  header, .subnav, footer, form, .no-print, button { display: none !important; }
  body { background: #fff; }
  main { max-width: 100%; margin: 0; }
  .card, .tile { border: 1px solid #ccc; box-shadow: none; }
}

/* ── Calm-enterprise pass (Linear/Stripe/GitHub register) ──────────────
   Bigger type hierarchy, more whitespace, quieter chrome. Overrides only —
   markup, navigation and functionality untouched. */
main { max-width: 880px; margin: 2.8rem auto 3.5rem; }
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 0.5rem; }
h2 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.005em; margin: 2.4rem 0 0.8rem; color: var(--ink); }
p.lede { font-size: 1.02rem; line-height: 1.65; max-width: 46rem; }
header { padding: 0.8rem 1.6rem; }
.brand { font-size: 1rem; }
.subnav-inner { max-width: 880px; }
.subnav a { padding: 0.8rem 0.15rem; }
footer { max-width: 880px; font-size: 0.8rem; line-height: 1.6; }

.card { padding: 1.3rem 1.5rem; margin: 1rem 0; border-radius: 8px; }
.card h3 { font-size: 0.95rem; font-weight: 650; }
.tile { padding: 1.3rem 1.5rem; }
.tile:hover { box-shadow: none; border-color: var(--text-3); }
.card-grid, .tile-grid { gap: 1rem; margin-top: 1.4rem; }

/* Tables: no boxes-in-boxes — a hairline top rule and generous rows */
table { border: none; border-top: 1px solid var(--line); background: transparent; }
th { padding: 0.65rem 0.9rem 0.45rem; font-size: 0.72rem; }
td { padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--surface); }

button[type="submit"], a.button { border-radius: 6px; padding: 0.5rem 1.1rem; font-size: 0.92rem; }
button[type="submit"]:hover, a.button:hover, .button.launch:hover, button.launch:hover { background: #000; }
input[type="text"], input[type="email"], input[type="password"], select { padding: 0.55rem 0.7rem; }
input:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }

.notice { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--info-text); }
.error { border-left: 3px solid var(--bad-text); }
.stat strong { font-size: 1.9rem; letter-spacing: -0.02em; }
.score { letter-spacing: -0.02em; }
.eyebrow { color: var(--text-4); }
.quicklink { padding: 0.3rem 0.95rem; font-size: 0.85rem; }

/* ── Cockpit pass: full-width App-style operational panel ── */
main { max-width: 1560px; width: 96%; margin: 1.6rem auto 3rem; }
.subnav-inner, footer { max-width: 1560px; width: 96%; }
header { padding: 0.7rem 2%; }
.brand { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; }
.hero-band { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--ink); border-radius: 4px; padding: 1.4rem 1.6rem; margin-bottom: 1.8rem; }
.hero-band h1 { font-size: 2rem; }
.hero-meta { display: grid; grid-template-columns: auto auto; gap: 0.3rem 1.6rem; align-content: start; text-align: left; font-size: 0.85rem; }
.hero-meta div { display: flex; gap: 0.6rem; justify-content: space-between; }
.hero-meta span { color: var(--text-3); }
.hero-meta .button { grid-column: 1 / -1; justify-self: end; margin-top: 0.6rem; }
.eyebrow-section { margin: 2.2rem 0 0.7rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.9rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0.9rem 1.1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.kpi-label { font-size: 0.74rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi strong { font-size: 2rem; letter-spacing: -0.02em; line-height: 1.1; }
.kpi strong em { font-style: normal; font-size: 1rem; color: var(--text-3); }
.kpi-sub { font-size: 0.78rem; color: var(--text-3); }
.eco-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.9rem; }
.card.eco { display: flex; align-items: center; gap: 0.7rem; margin: 0; padding: 0.9rem 1.1rem; }
.card.eco a { color: var(--ink); font-size: 0.85rem; font-weight: 600; margin-left: auto; }
.card.dashed { border-style: dashed; color: var(--text-3); background: transparent; }
.pipeline { display: flex; align-items: stretch; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; }
.stage { min-width: 130px; flex: 1; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.stage-head { padding: 0.45rem 0.6rem; font-size: 0.74rem; font-weight: 600; text-align: center; color: var(--text-3); }
.stage.done .stage-head { background: var(--ok-bg); color: var(--ok-text); }
.stage.current { border-color: var(--ink); }
.stage.current .stage-head { background: var(--ink); color: #fff; }
.stage-arrow { align-self: center; color: var(--text-4); }
.overview-grid { margin-top: 0.4rem; }

/* ── Authenticated-website pass: Cloud IS the Atlas website, signed in ── */
:root { --navy: #1e2a44; --accent: #3b5bdb; }
body { background: #f5f6f8; }
header { background: #fff; border-bottom: 1px solid var(--line); color: var(--ink); padding: 0.85rem 2%; }
.brand { color: var(--ink); text-transform: none; letter-spacing: -0.01em; font-size: 1.15rem; font-weight: 700; }
.brand span { color: var(--text-3); font-weight: 400; }
nav a { color: var(--text-2); }
nav a:hover { color: var(--ink); }
nav a.btn { background: var(--navy); color: #fff; }
.nav-user { color: var(--text-4); }
button.linklike { color: var(--text-2); }
button.linklike:hover { color: var(--ink); }
.subnav { background: #fff; }
.button.launch, button.launch, button[type="submit"], a.button { background: var(--navy); }
button[type="submit"]:hover, a.button:hover, .button.launch:hover, button.launch:hover { background: #16203a; }
.pill.current, .stage.current .stage-head { background: var(--navy); }
.stage.current { border-color: var(--navy); }
.eyebrow, .eyebrow-section { color: var(--accent); }
.hero-band { border: 1px solid var(--line); border-radius: 8px; padding: 2rem 2.2rem; }
.hero-band h1 { font-size: 2.3rem; letter-spacing: -0.02em; }
input:focus, select:focus { outline-color: var(--navy); border-color: var(--navy); }
.subnav a.active { border-bottom-color: var(--navy); }
.upgrade-cta { border-color: var(--navy); }

/* ── One-shell architecture: permanent left anchor + swapping content ── */
.workspace { display: flex; max-width: 1560px; width: 96%; margin: 0 auto; align-items: flex-start; gap: 2rem; }
.sidenav { width: 220px; flex-shrink: 0; padding: 1.4rem 0; position: sticky; top: 0; }
.side-company { font-weight: 700; font-size: 0.95rem; margin: 0 0 0.8rem; }
.side-item { display: block; padding: 0.32rem 0.6rem; color: var(--text-2); text-decoration: none; font-size: 0.9rem; border-radius: 6px; }
.side-item:hover { background: #eef0f3; color: var(--ink); }
.side-section { margin: 0.35rem 0; }
.side-section summary { cursor: pointer; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding: 0.35rem 0.6rem; list-style: none; }
.side-section summary::-webkit-details-marker { display: none; }
.side-section .side-item { padding-left: 1.1rem; }
main.content { flex: 1; margin: 1.4rem 0 3rem; max-width: none; width: auto; padding: 0; min-width: 0; }

/* ── Shell polish: active item, density, alignment ── */
.side-item.active { background: #e8ebf1; color: var(--ink); font-weight: 600; }
.sidenav { padding: 1.6rem 0 2rem; }
.side-company { font-size: 0.9rem; padding: 0 0.6rem; margin-bottom: 1rem; }
.side-section summary { margin-top: 0.6rem; }
main.content { margin: 1.6rem 0 3.5rem; }
main.content h1 { font-size: 1.45rem; margin-bottom: 0.35rem; }
main.content p.lede { font-size: 0.95rem; max-width: 42rem; }
.hero-band { padding: 1.4rem 1.6rem; }
.hero-band h1 { font-size: 1.7rem; }
.card, .tile { margin: 0.8rem 0; }
th, td { padding: 0.5rem 0.75rem; }
h2 { margin-top: 1.9rem; }

/* ── Scale pass: substantial, calm, premium — dense not cramped ── */
html { font-size: 17px; }               /* scales every rem: type, padding, panels */
body { line-height: 1.6; }
main.content h1 { font-size: 1.65rem; font-weight: 700; }
h2 { font-size: 1.12rem; font-weight: 700; }
.card, .tile { padding: 1.5rem 1.7rem; }
.card h3, .tile h3 { font-size: 1.02rem; }
.muted { font-size: 0.92rem; }
p.lede { font-size: 1rem; }
button[type="submit"], a.button { padding: 0.6rem 1.35rem; font-size: 0.95rem; }
.button.launch, button.launch { padding: 0.8rem 1.7rem; font-size: 1rem; }
input[type="text"], input[type="email"], input[type="password"], select { padding: 0.6rem 0.75rem; font-size: 0.97rem; }
th, td { padding: 0.6rem 0.85rem; font-size: 0.94rem; }
.sidenav { width: 240px; }
.side-item { padding: 0.48rem 0.7rem; font-size: 0.95rem; }
.side-section summary { font-size: 0.8rem; padding: 0.45rem 0.7rem; margin-top: 0.75rem; }
.side-company { font-size: 1rem; }
.hero-band { padding: 1.7rem 1.9rem; }
.hero-band h1 { font-size: 1.9rem; }
.card.eco { padding: 1.1rem 1.3rem; }
.stage-head { padding: 0.55rem 0.7rem; font-size: 0.78rem; }
.pill { font-size: 0.8rem; padding: 0.14rem 0.68rem; }
.eyebrow-section { font-size: 0.75rem; }
.plan-features { padding-left: 1.1rem; margin: 0.7rem 0; }
.plan-features li { margin: 0.3rem 0; font-size: 0.92rem; }
.plan-focus { border: 2px solid var(--navy); }
.plan-current { background: var(--info-bg); }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; max-width: 28rem; }
.progress-fill { height: 100%; background: var(--navy); }
.status-panel { border-left: 3px solid var(--navy); }
.badge.fact { background: var(--info-bg); color: var(--info-text); }
.badge.insight { background: #ede9fe; color: #5b21b6; }
.pill.ok-pill { background: var(--ok-bg); color: var(--ok-text); }
.dim-null td { opacity: 0.75; }
.filter-bar { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin: 0.8rem 0 0.4rem; }
.filter-bar select { width: auto; max-width: 12rem; }
.filter-dead { border: 1px dashed var(--line); border-radius: 999px; padding: 0.25rem 0.9rem; color: var(--text-4); font-size: 0.85rem; cursor: not-allowed; }
.insight-list li { margin: 0.5rem 0; }
