/* =====================================================================
   ANTAEUS — web design tokens (Slate)
   ---------------------------------------------------------------------
   A port of src/theme/colors.ts and docs/design-reference/SLATE_SPEC.md.
   The app is the source of truth: when a token changes there, change it
   here with the same role. This file introduces NO colour the app does
   not have.

   What changed from tokens-10.css (the Ledger port), 2026-10-09:
     · ONE family, Mona Sans (OFL, self-hosted, unmodified woff2). Semi
       Condensed for figures and display, normal width for prose and
       labels. Barlow and Plex Mono are retired.
     · Labels are sentence case, no tracking, no text-transform.
     · The coach's tick is teal (`tip`), not amber.
     · Light climbs TOWARD white: canvas #EEEEF1 -> card #F9F9FB -> #FFF.
     · Groups are rounded panels (20), actions 12, small controls <=10.
   Class names are kept from tokens-10 so the Build Log renderer
   (functions/_lib/render.js) and the tools pages keep working.
   ===================================================================== */

@font-face {
  font-family: 'Mona Sans';
  src: url('/fonts/MonaSans-Regular-1.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Mona Sans';
  src: url('/fonts/MonaSans-Medium-1.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Mona Sans';
  src: url('/fonts/MonaSans-SemiBold-1.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Mona Sans SC';
  src: url('/fonts/MonaSansSemiCondensed-SemiBold-1.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --f-sys: 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-display: 'Mona Sans SC', 'Mona Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  /* Kept as a NAME so older rules resolve; it is no longer a monospace.
     Figures get tabular numerals from font-variant-numeric instead. */
  --f-mono: var(--f-sys);

  --s-xxs: 2px;
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 20px;
  --s-xxl: 24px;
  --s-xxxl: 32px;
  --s-huge: 48px;
  --s-giant: 96px;

  /* Corner discipline (SLATE §2): groups 20, actions 12, controls <=10. */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 20px;

  --maxw: 1160px;
  --gutter: 32px;

  /* Legacy chassis names, still read by board-11.css and the doc pages. */
  --mgn: 0px;
  --mgn-pad: 0px;
  --tick-w: 3px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* LIGHT — the app's lightPalette. */
:root {
  --bg: #eeeef1;
  --surface: #ffffff;
  --card: #f9f9fb;
  --card-el: #ffffff;
  --border: #e0e0e3;
  --border-sub: #ececef;
  --hairline: #e5e5ea;

  --t1: #0a0a0b;
  --t2: #52525a;
  --t3: #6b6b73;

  --accent: #1b7a33;
  --accent-soft: rgba(27, 122, 51, 0.1);
  --accent-fill: #1b7a33;
  --accent-fill-text: #ffffff;
  /* "Past target" on the muscle map: a deeper step of the same green. */
  --accent-deep: #0d5c24;

  --danger: #b83b3b;
  --warn: #8f6404;
  --warn-soft: rgba(143, 100, 4, 0.1);
  --tip: #0f6d64;
  --info: #3460c2;
  --ring-train: #b8355c;

  --ghost: rgba(10, 10, 11, 0.58);
  --ghost-outline: rgba(10, 10, 11, 0.45);
  --tick: #d4d4d9;
  --lift: #e6e6ec;
  --control: #e9e9eb;
  --inverse: #0a0a0b;
  --inverse-text: #f4f4f5;
  /* Workout white is the INK in light (a white disc on a pale ground
     would vanish); the app draws it as the primary text colour there. */
  --kind-workout: #0a0a0b;
  --silhouette: #e6e6ec;
  --not-hit: #d4d4d9;

  --overlay: rgba(0, 0, 0, 0.25);
  --focal-shadow: none;
  --catch: inset 0 1px 0 rgba(255, 255, 255, 0.7);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #09090b;
    --surface: #0f0f12;
    --card: #141417;
    --card-el: #1a1a1e;
    --border: #222226;
    --border-sub: #1a1a1e;
    --hairline: #2c2c2e;
    --t1: #f2f2f4;
    --t2: #a1a1a8;
    --t3: #8a8a92;
    --accent: #86e07b;
    --accent-soft: rgba(134, 224, 123, 0.1);
    --accent-fill: #86e07b;
    --accent-fill-text: #000000;
    --accent-deep: #4a8542;
    --danger: #e0655a;
    --warn: #e0a64b;
    --warn-soft: rgba(224, 166, 75, 0.12);
    --tip: #27a296;
    --info: #6e9bdd;
    --ring-train: #e4589b;
    --ghost: rgba(242, 242, 244, 0.55);
    --ghost-outline: rgba(242, 242, 244, 0.38);
    --tick: #2a2a2f;
    --lift: #17171b;
    --control: #2c2c2e;
    --inverse: #f2f2f4;
    --inverse-text: #0b0b0d;
    --kind-workout: #f2f2f4;
    --silhouette: #1f1f24;
    --not-hit: #2c2c2e;
    --overlay: rgba(0, 0, 0, 0.4);
    --focal-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    --catch: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #09090b;
  --surface: #0f0f12;
  --card: #141417;
  --card-el: #1a1a1e;
  --border: #222226;
  --border-sub: #1a1a1e;
  --hairline: #2c2c2e;
  --t1: #f2f2f4;
  --t2: #a1a1a8;
  --t3: #8a8a92;
  --accent: #86e07b;
  --accent-soft: rgba(134, 224, 123, 0.1);
  --accent-fill: #86e07b;
  --accent-fill-text: #000000;
  --accent-deep: #4a8542;
  --danger: #e0655a;
  --warn: #e0a64b;
  --warn-soft: rgba(224, 166, 75, 0.12);
  --tip: #27a296;
  --info: #6e9bdd;
  --ring-train: #e4589b;
  --ghost: rgba(242, 242, 244, 0.55);
  --ghost-outline: rgba(242, 242, 244, 0.38);
  --tick: #2a2a2f;
  --lift: #17171b;
  --control: #2c2c2e;
  --inverse: #f2f2f4;
  --inverse-text: #0b0b0d;
  --kind-workout: #f2f2f4;
  --silhouette: #1f1f24;
  --not-hit: #2c2c2e;
  --overlay: rgba(0, 0, 0, 0.4);
  --focal-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  --catch: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color-scheme: dark;
}

/* =====================================================================
   RESET + BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--t2);
  font-family: var(--f-sys);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a {
  color: var(--t1);
  text-decoration-color: var(--ghost-outline);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible {
  outline: 2px solid var(--t1);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
::selection { background: var(--accent-soft); color: var(--t1); }
h1, h2, h3 { color: var(--t1); }

/* =====================================================================
   TYPE REGISTERS
   ===================================================================== */
.display {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t1);
  margin: 0;
}
.metric, .metric-lg, .agate, .ghost-fig, .lrow .lrow-val {
  font-family: var(--f-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--t1);
}
.metric { font-size: 20px; line-height: 24px; }
.metric-lg { font-size: 30px; line-height: 34px; }
.agate { font-size: 14px; line-height: 20px; color: var(--t2); }
.ghost-fig { font-size: 20px; line-height: 24px; color: var(--ghost); }
.exercise {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 26px;
  color: var(--t1);
}

/* The label register (SLATE type law 2026-10-08): 12-13, semibold,
   sentence case, NO tracking, NO text-transform. `.mono` keeps its name
   for the renderer; it is the label now. */
.mono, .mono-13 {
  font-family: var(--f-sys);
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  color: var(--t3);
}
.lede { font-size: 18px; line-height: 28px; color: var(--t2); }
.cap { font-size: 14px; line-height: 20px; color: var(--t2); font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; color: var(--t1); font-variant-numeric: tabular-nums; }

/* =====================================================================
   SHARED GRAMMAR (kept names, Slate material)
   ===================================================================== */
.rule {
  display: flex;
  align-items: flex-end;
  gap: var(--s-sm);
  padding-bottom: var(--s-sm);
  border-bottom: 1px solid var(--hairline);
  margin: 0 0 var(--s-md);
}
.rule > .mono:first-child { color: var(--t1); }
.rule .rule-cap { margin-left: auto; text-align: right; font-size: 13px; color: var(--t3); }

.lrow {
  display: flex;
  align-items: baseline;
  gap: var(--s-md);
  min-height: 28px;
  padding: var(--s-xs) 0;
}
.lrow > .mono:first-child { width: 132px; flex: none; }
.lrow .lrow-val { font-size: 20px; line-height: 24px; }
.lrow .lrow-suffix { margin-left: var(--s-xs); }

.entries > * + * { border-top: 1px solid var(--hairline); }
.entry {
  display: flex;
  gap: var(--s-md);
  padding: var(--s-md) 0;
  align-items: flex-start;
  position: relative;
}
.tick { width: 2px; height: 14px; background: var(--t1); flex: none; margin-top: 3px; border-radius: 1px; }
.tick.ok { background: var(--accent); }
.tick.warn { background: var(--warn); }
.tick.over { background: var(--danger); }
.tick.none { background: var(--tick); }

/* Actions (SLATE): the ONE filled action is accentFill, green in both
   themes; the dismiss/secondary is an outline in one neutral colour. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--t1);
  font-family: var(--f-sys);
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, opacity 160ms ease;
}
.btn:hover { background: var(--lift); }
.btn:active { transform: scale(0.97); }
.btn.primary {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--accent-fill-text);
}
.btn.primary:hover { background: var(--accent-fill); opacity: 0.9; }
.btn.accent { border-color: var(--accent); color: var(--accent); }
.btn.ghost { border-color: transparent; padding-left: 0; padding-right: 0; }
.btn.ghost:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn.lg { min-height: 52px; padding: 14px 22px; font-size: 16px; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; pointer-events: none; }

.empty {
  border: 1px dashed var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-xs);
}
.empty h3 { margin: 0; font-size: 16px; font-weight: 600; }
.empty p { margin: 0; font-size: 14px; line-height: 20px; color: var(--t3); max-width: 46ch; }

/* The coach (SLATE §8): a leading teal tick + one caption, inline. Only
   the coach wears it; quoted words and receipts use `.aside`. */
.callout {
  position: relative;
  padding: var(--s-xs) 0 var(--s-xs) calc(var(--tick-w) + 12px);
}
.callout::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: var(--tick-w);
  border-radius: 2px;
  background: var(--tip);
}
.callout p { margin: var(--s-xxs) 0 0; color: var(--t1); font-weight: 600; }
.callout .cap { font-weight: 400; color: var(--t2); }

.aside { padding: var(--s-xs) 0 var(--s-xs) var(--s-md); border-left: 1px solid var(--hairline); }
.aside p { margin: var(--s-xxs) 0 0; color: var(--t1); }
.aside .cap { color: var(--t2); }

.field {
  width: 100%;
  background: var(--card-el);
  color: var(--t1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  font-family: var(--f-sys);
  font-size: 16px;
  line-height: 22px;
  min-height: 48px;
}
.field::placeholder { color: var(--t3); }
.field:focus-visible { outline: 2px solid var(--t1); outline-offset: 1px; }
textarea.field { min-height: 104px; resize: vertical; }
select.field {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--t3) 50%),
    linear-gradient(135deg, var(--t3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

/* =====================================================================
   LAYOUT + CHROME
   ===================================================================== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--hairline);
}
.nav-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--gutter);
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: var(--s-lg);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--t1); }
.brand svg { width: 22px; height: 22px; }
.brand span { font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: 0; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--t2);
  text-decoration: none;
  padding: 8px 0;
}
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--t1); }
.nav-links a[aria-current='page'] { box-shadow: inset 0 -2px 0 var(--t1); }
/* The one green on the bar: the action the whole site is for. */
.nav-links a[href='/#join'] { color: var(--accent); font-weight: 600; }

.theme-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--r-md);
  background: var(--control);
}
.theme-toggle button {
  min-width: 34px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--t3);
  cursor: pointer;
  padding: 0 8px;
}
.theme-toggle button[aria-pressed='true'] { color: var(--t1); background: var(--card-el); }
.theme-toggle svg { width: 15px; height: 15px; }

.navmenu { position: relative; margin-left: auto; display: none; }
.navmenu > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--r-md);
  background: var(--control);
  color: var(--t1);
  font-size: 14px;
  font-weight: 600;
}
.navmenu > summary::-webkit-details-marker { display: none; }
.navmenu > summary::marker { content: ''; }
.navmenu > summary .mono { color: inherit; font-size: 14px; }
.navmenu-bars, .navmenu-bars::before, .navmenu-bars::after {
  display: block; width: 14px; height: 1.5px; background: currentColor; content: ''; border-radius: 1px;
}
.navmenu-bars { position: relative; }
.navmenu-bars::before { position: absolute; top: -5px; }
.navmenu-bars::after { position: absolute; top: 5px; }
.navmenu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: var(--card-el);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.navmenu-panel a {
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--t1);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.navmenu-panel a:last-of-type { border-bottom: 0; }
.navmenu-panel .btn { margin-top: 8px; border-bottom: 1px solid var(--accent-fill); }
.navmenu-panel a.btn { background: var(--accent-fill); color: var(--accent-fill-text); justify-content: center; }

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: var(--s-huge);
  padding: var(--s-xxxl) 0 var(--s-huge);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s-lg) var(--s-xxl); align-items: baseline; }
.site-footer .mono { color: var(--t2); font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-left: auto; }
.site-footer a { font-size: 14px; color: var(--t3); text-decoration: none; padding: 6px 0; }
.site-footer a:hover { color: var(--t1); }

/* =====================================================================
   UTILITIES
   ===================================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--card-el); color: var(--t1);
  padding: var(--s-md); z-index: 100; border: 1px solid var(--t1); border-radius: var(--r-sm);
}
.skip:focus { left: var(--s-md); top: var(--s-md); }
.ok { color: var(--accent); }
.warn-c { color: var(--warn); }
.over-c { color: var(--danger); }
.muted { color: var(--t3); }
.t2 { color: var(--t2); }
.t1 { color: var(--t1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html, body { max-width: 100%; overflow-x: clip; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
html { scroll-padding-top: 76px; }

@media (max-width: 860px) {
  :root { --gutter: 20px; }
  .rule { flex-wrap: wrap; }
  .rule .rule-cap { margin-left: 0; text-align: left; flex-basis: 100%; }
  .nav-in { gap: var(--s-sm); }
  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }
  .navmenu { display: block; margin-left: 0; }
  html { scroll-padding-top: 68px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .site-footer nav { margin-left: 0; }
}
@media (max-width: 420px) { :root { --gutter: 16px; } }
