/* flywheel.rycolston.com — operating cockpit
   Styles authored against design-system tokens (tokens/tokens.css, synced at deploy).
   Respects the six constitutional rules: olive-only CTA, Fraunces + DM Sans,
   warm shadows, pill controls, accents are personality (status uses olive/ink tones,
   never coral/yellow/brick), no dark mode. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--p-font-body);
  color: var(--s-text-primary);
  background: var(--s-surface-base);
  line-height: var(--p-lh-body);
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--s-surface-sunken);
  padding: 0.1em 0.4em;
  border-radius: var(--s-radius-subtle);
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--s-space-gutter); }

/* ---------- top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--s-border-subtle);
  background: var(--s-surface-base);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--s-space-md); padding-bottom: var(--s-space-md);
  gap: var(--s-space-md); flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s-space-sm);
  font-family: var(--p-font-display); font-weight: 600; font-size: 1.15rem;
  color: var(--s-text-primary);
}
.brand:hover { text-decoration: none; }
.brand__mark {
  display: inline-grid; place-items: center;
  width: 1.9rem; height: 1.9rem;
  background: var(--s-action-primary-bg); color: var(--s-action-primary-fg);
  border-radius: var(--p-radius-pill);
  font-size: 0.95rem; font-weight: 700;
}
.topbar__date { color: var(--s-text-muted); font-size: 0.85rem; }

/* ---------- hero ---------- */
.hero { padding: var(--s-space-2xl) 0 var(--s-space-xl); }
.hero__title {
  font-family: var(--p-font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: var(--p-lh-tight);
  letter-spacing: var(--p-ls-tight);
  margin: 0 0 var(--s-space-md);
}
.hero__title em { font-style: italic; color: var(--s-text-brand); }
.hero__thesis {
  max-width: 64ch; margin: 0 0 var(--s-space-xl);
  font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--s-text-secondary);
}

.northstar {
  display: inline-flex; flex-direction: column; gap: 0.35rem;
  padding: var(--s-space-lg) var(--s-space-xl);
  background: var(--s-surface-raised);
  border: 1px solid var(--s-border-subtle);
  border-radius: var(--s-radius-card);
  box-shadow: var(--s-shadow-md);
}
.northstar__label {
  text-transform: uppercase; letter-spacing: var(--p-ls-wider);
  font-size: 0.72rem; font-weight: 600; color: var(--s-text-muted);
}
.northstar__value {
  font-family: var(--p-font-display); font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500; color: var(--s-text-primary);
}

/* ---------- chips ---------- */
.chip {
  display: inline-block; width: fit-content;
  font-size: 0.74rem; font-weight: 600;
  padding: 0.25rem 0.7rem; border-radius: var(--p-radius-pill);
}
.chip--gap {
  color: var(--s-text-secondary);
  background: var(--s-surface-sunken);
  border: 1px dashed var(--s-border-strong);
}
.chip--clock {
  color: var(--s-action-primary-fg);
  background: var(--s-action-primary-bg);
}

/* ---------- legend ---------- */
.legend {
  display: flex; align-items: center; gap: var(--s-space-lg);
  flex-wrap: wrap;
  padding: var(--s-space-md) 0 var(--s-space-xl);
  font-size: 0.85rem; color: var(--s-text-secondary);
}
.legdot { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend__hint { color: var(--s-text-muted); font-style: italic; }

/* ---------- status dots (olive/ink only — rule 5) ---------- */
.dot {
  display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%;
  flex: 0 0 auto; vertical-align: middle;
}
.dot--on { background: var(--p-olive-700); }
.dot--partial {
  background: linear-gradient(90deg, var(--p-olive-700) 0 50%, var(--p-cream-300) 50% 100%);
  border: 1px solid var(--p-olive-700);
}
.dot--off { background: transparent; border: 1.5px solid var(--p-ink-300); }

/* ---------- the flywheel ---------- */
.flywheel {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: var(--s-space-md);
}

.stage {
  display: flex; flex-direction: column;
  background: var(--s-surface-raised);
  border: 1px solid var(--s-border-subtle);
  border-radius: var(--s-radius-card);
  box-shadow: var(--s-shadow-sm);
  padding: var(--s-space-xl);
}
.stage__head { display: flex; align-items: flex-start; gap: var(--s-space-md); margin-bottom: var(--s-space-lg); }
.stage__num {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 2.2rem; height: 2.2rem;
  background: var(--s-action-primary-bg); color: var(--s-action-primary-fg);
  border-radius: var(--p-radius-pill);
  font-family: var(--p-font-display); font-weight: 700; font-size: 1.1rem;
}
.stage__name {
  font-family: var(--p-font-display); font-weight: 600;
  font-size: 1.5rem; margin: 0; line-height: 1.1;
}
.stage__role { margin: 0.2rem 0 0; color: var(--s-text-secondary); font-size: 0.9rem; }

.metric {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: var(--s-space-md) 0;
  border-top: 1px solid var(--s-border-subtle);
  border-bottom: 1px solid var(--s-border-subtle);
  margin-bottom: var(--s-space-md);
}
.metric__label {
  text-transform: uppercase; letter-spacing: var(--p-ls-wider);
  font-size: 0.68rem; font-weight: 600; color: var(--s-text-muted);
}
.metric__value { font-weight: 600; color: var(--s-text-primary); }

.systems { list-style: none; margin: 0 0 var(--s-space-lg); padding: 0; flex: 1 1 auto; }
.systems li {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline;
  gap: 0.55rem; padding: 0.4rem 0;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--s-border-subtle);
}
.systems li:last-child { border-bottom: 0; }
.systems .dot { align-self: center; }
.sys__note { grid-column: 2; color: var(--s-text-muted); font-size: 0.78rem; }

.lever {
  background: var(--s-surface-sunken);
  border-radius: var(--s-radius-panel);
  padding: var(--s-space-md);
}
.lever__tag {
  display: inline-block;
  text-transform: uppercase; letter-spacing: var(--p-ls-wider);
  font-size: 0.66rem; font-weight: 700; color: var(--s-text-brand);
  margin-bottom: 0.4rem;
}
.lever__text { margin: 0 0 var(--s-space-md); font-size: 0.9rem; color: var(--s-text-primary); }

/* ---------- arrows between stages ---------- */
.arrow {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.3rem; color: var(--s-text-muted);
}
.arrow__label {
  text-transform: uppercase; letter-spacing: var(--p-ls-wider);
  font-size: 0.6rem; font-weight: 700;
}
.arrow__glyph { font-size: 1.6rem; color: var(--s-text-brand); line-height: 1; }

/* ---------- buttons (pill, olive — rules 1 & 4) ---------- */
.btn {
  display: inline-block;
  background: var(--s-action-primary-bg); color: var(--s-action-primary-fg);
  font-weight: 600; font-size: 0.9rem;
  padding: 0.6rem 1.2rem; border-radius: var(--p-radius-pill);
  transition: background var(--p-duration-fast) var(--p-ease-standard);
}
.btn:hover { background: var(--s-action-primary-bg-hover); text-decoration: none; }
.btn--lg { font-size: 1rem; padding: 0.8rem 1.6rem; }

/* ---------- today's one move ---------- */
.onemove {
  margin: var(--s-space-3xl) 0 var(--s-space-xl);
  padding: var(--s-space-2xl);
  background: var(--s-surface-inverse);
  color: var(--s-text-inverse);
  border-radius: var(--s-radius-card);
  box-shadow: var(--s-shadow-lg);
}
.onemove__tag {
  text-transform: uppercase; letter-spacing: var(--p-ls-wider);
  font-size: 0.72rem; font-weight: 700; opacity: 0.8;
}
.onemove__title {
  font-family: var(--p-font-display); font-weight: 500;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  margin: var(--s-space-sm) 0 var(--s-space-md); line-height: 1.15;
}
.onemove__body { max-width: 70ch; margin: 0 0 var(--s-space-lg); opacity: 0.9; }
.onemove .btn { background: var(--s-surface-base); color: var(--s-text-brand); }
.onemove .btn:hover { background: var(--p-cream-200); }

.foot {
  color: var(--s-text-muted); font-size: 0.82rem; font-style: italic;
  padding-bottom: var(--s-space-3xl); text-align: center;
}

/* ---------- responsive: stack on smaller screens ---------- */
@media (max-width: 900px) {
  .flywheel { grid-template-columns: 1fr; }
  .arrow { flex-direction: row; gap: 0.5rem; padding: 0.2rem 0; }
  .arrow__glyph { transform: rotate(90deg); }
}
