/* Design Profile 4.1: base styles, type styles and components.
   Every color is a token from tokens.css; class names take the ax- prefix. */

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/26px var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

[data-theme] { background: var(--bg); color: var(--ink); }

h1, h2, h3, h4, p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Type styles, part 05 */
.ax-display { font-size: 64px; line-height: 66px; font-weight: 800; letter-spacing: -0.045em; }
.ax-headline { font-size: 40px; line-height: 44px; font-weight: 800; letter-spacing: -0.03em; }
.ax-h2 { font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -0.02em; }
.ax-h3 { font-size: 18px; line-height: 24px; font-weight: 800; letter-spacing: -0.015em; }
.ax-h4 { font-size: 15px; line-height: 21px; font-weight: 700; }
.ax-lede { font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: var(--measure); }
.ax-body { font-size: 16px; line-height: 26px; max-width: var(--measure); }
.ax-body-sm { font-size: 14px; line-height: 22px; }
.ax-caption { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.ax-label { font: 600 12px/16px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--link); }
.ax-label-sm { font: 500 11px/14px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.ax-code { font: 400 13px/18px var(--font-mono); }
.ax-number-xl { font-size: 72px; line-height: 72px; font-weight: 800; letter-spacing: -0.045em; }
.ax-number-lg { font-size: 48px; line-height: 52px; font-weight: 800; letter-spacing: -0.04em; }
.ax-number-md { font-size: 32px; line-height: 36px; font-weight: 800; letter-spacing: -0.03em; }
.ax-number-sm { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -0.02em; }
.ax-tagline { font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; }
.ax-tagline em { font-style: normal; color: var(--accent); }

@media (max-width: 640px) {
  .ax-display { font-size: 44px; line-height: 48px; }
  .ax-headline { font-size: 32px; line-height: 36px; }
  .ax-number-xl { font-size: 56px; line-height: 56px; }
}

/* The band: a void strip at the top of reading pages, a hairline under */
.ax-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 64px;
  padding: 0 var(--gutter);
  background: var(--brand-void);
  color: var(--on-night);
  border-bottom: 1px solid var(--night-line);
}
.ax-band .ax-label-sm { color: var(--on-night-muted); }
.ax-band .ax-label-sm b { color: var(--brand-aurora); font-weight: 500; }

/* Logo: inline marks that follow the theme */
.ax-logo { display: block; height: 32px; width: auto; color: var(--mark); }

/* Section header: eyebrow with its number first, a title, a lede */
.ax-section-header { display: grid; gap: var(--space-3); }

/* Buttons: one primary per view, everything else clear */
.ax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-md);
  padding: 0 var(--space-6);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: 700 15px/20px var(--font);
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background var(--motion), box-shadow var(--motion);
}
.ax-btn:hover { background: var(--surface); }
.ax-btn--primary { background: var(--action); border-color: var(--action); color: var(--on-action); }
.ax-btn--primary:hover { background: var(--action-strong); border-color: var(--action-strong); }
.ax-btn--quiet { border-color: transparent; color: var(--link); }
.ax-btn--quiet:hover { background: var(--tint); }
.ax-btn--sm { height: var(--control-sm); padding: 0 var(--space-4); font-size: 14px; }
.ax-btn[disabled] { background: var(--surface); border-color: var(--line); color: var(--ink-faint); box-shadow: none; cursor: not-allowed; }

/* Field */
.ax-field { display: grid; gap: var(--space-2); max-width: 360px; }
.ax-field > span { font-size: 14px; line-height: 22px; font-weight: 600; }
.ax-input {
  height: var(--control-md);
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
  font: 400 16px var(--font);
}
.ax-input::placeholder { color: var(--ink-faint); }
.ax-field--error .ax-input { border-color: var(--red); }
.ax-field-error { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--red); }

/* Segmented control: how the Light Set collects numbers in bands */
.ax-seg { display: inline-flex; justify-self: start; max-width: 100%; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.ax-seg > span { padding: 0 var(--space-4); height: var(--control-sm); display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ax-seg > span + span { border-left: 1px solid var(--line); }
.ax-seg > .is-on { background: var(--tint); color: var(--ink); }

/* Panels and frames: corner brackets mark a panel of live data */
.ax-panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); padding: var(--space-6); }
.ax-frame { position: relative; padding: var(--space-6); border-radius: var(--radius-md); background: var(--surface-raised); --corner: var(--frame); }
.ax-frame--live { --corner: var(--accent); }
.ax-frame::before,
.ax-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  --c: var(--frame-corner);
  background:
    linear-gradient(var(--corner), var(--corner)) top left / var(--c) 1.5px,
    linear-gradient(var(--corner), var(--corner)) top left / 1.5px var(--c),
    linear-gradient(var(--corner), var(--corner)) top right / var(--c) 1.5px,
    linear-gradient(var(--corner), var(--corner)) top right / 1.5px var(--c);
  background-repeat: no-repeat;
}
.ax-frame::after { transform: scaleY(-1); }
.ax-on-night { --corner: var(--frame); }

/* Stat tile */
.ax-stat { display: grid; gap: var(--space-2); align-content: start; }
.ax-stat .ax-number-lg.is-live { color: var(--accent); }

/* Fit lights: a shape and a word, never color alone */
.ax-light { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; font-weight: 700; }
.ax-light i { width: 12px; height: 12px; border-radius: var(--radius-full); flex: none; }
.ax-light--green i { background: var(--light-green); }
.ax-light--yellow i { border: 2px solid var(--light-yellow-edge); background: linear-gradient(90deg, var(--light-yellow) 50%, transparent 50%); }
.ax-light--red i { border: 2px solid var(--light-red); }

/* Proof label: four steps, each with a rising four-bar meter */
.ax-proof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: var(--radius-xs);
  font: 500 11px/14px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ax-proof .meter { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; }
.ax-proof .meter i { width: 2.5px; background: currentColor; opacity: 0.25; }
.ax-proof .meter i:nth-child(1) { height: 4px; }
.ax-proof .meter i:nth-child(2) { height: 6px; }
.ax-proof .meter i:nth-child(3) { height: 8px; }
.ax-proof .meter i:nth-child(4) { height: 10px; }
.ax-proof[data-level="1"] .meter i:nth-child(-n + 1),
.ax-proof[data-level="2"] .meter i:nth-child(-n + 2),
.ax-proof[data-level="3"] .meter i:nth-child(-n + 3),
.ax-proof[data-level="4"] .meter i { opacity: 1; }
.ax-proof--claim { background: var(--amber-soft); color: var(--amber); }
.ax-proof--documented { background: var(--slate-soft); color: var(--slate); }
.ax-proof--verified { background: var(--signal-soft); color: var(--signal); }
.ax-proof--reconciled { background: var(--signal-soft); color: var(--signal); font-weight: 700; }

/* Statement tags: what kind of statement a line is */
.ax-tag {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-xs);
  font: 500 11px/14px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.ax-tag--fictional { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.ax-tag--decided { border-color: var(--signal); color: var(--signal); }
.ax-tag--proposed { border-style: dashed; }

/* Badge: round, chosen by a company or an investor */
.ax-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 var(--space-3); border-radius: var(--radius-full); background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }

/* Metric: label, proof, value, definition, source */
.ax-metric { display: grid; gap: var(--space-2); }
.ax-metric .row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

/* Callout */
.ax-callout { display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-6); border: 1px solid var(--line-strong); border-radius: var(--radius-xs); max-width: 420px; }
.ax-callout--flag { border: 1px dashed var(--amber); }
.ax-callout--flag .ax-label { color: var(--amber); }

/* Data table: ruled, not boxed */
.ax-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 22px; }
.ax-table th { background: var(--table-head); color: var(--on-table-head); text-align: left; padding: 8px 12px; font: 500 11px/14px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.ax-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ax-table tbody tr:last-child td { border-bottom: 1.5px solid var(--ink); }
.ax-table .num { text-align: right; font-weight: 800; }
.ax-table tfoot td { border-bottom: var(--border-double) double var(--ink); font-weight: 800; }

/* Decision Clock: business-day squares beside the date */
.ax-clock { display: inline-flex; align-items: center; gap: var(--space-3); font-size: 13px; font-weight: 600; }
.ax-clock .days { display: inline-flex; gap: 3px; }
.ax-clock .days i { width: 10px; height: 10px; border-radius: 2px; border: 1px solid var(--accent); }
.ax-clock .days i.is-used { background: var(--accent); }
.ax-clock--due .days i { border-color: var(--amber); }
.ax-clock--due .days i.is-used { background: var(--amber); }

/* Company card */
.ax-card { display: grid; gap: var(--space-4); }
.ax-card .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.ax-card .nums > div { background: var(--surface); border-radius: var(--radius-sm); padding: var(--space-3); display: grid; gap: 6px; }

/* Tombstone: the record of a closed round */
.ax-tombstone { display: grid; gap: var(--space-2); justify-items: center; text-align: center; }

/* Security by Design lockup */
.ax-sbd { display: inline-flex; align-items: center; gap: var(--space-3); }
.ax-sbd .rule { width: 1px; height: 24px; background: var(--line-strong); }

/* Footer control line */
.ax-control { display: flex; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-3); border-top: 1.5px solid var(--ink); }
