/* ============================================================================
   BULWARK PARTNER PORTAL — DESIGN TOKENS
   Single source of truth for colour, type, spacing, radius, elevation, motion.
   Derived from Bulwark's supplied identity (champagne gold on black).

   RULE: no component may hard-code a hex value, font family, or pixel radius.
   Everything comes from these custom properties. If a value is missing here,
   add it here first — do not inline it downstream.
   ========================================================================== */

:root {
  /* ---------------------------------------------------------------- CORE */
  /* Surfaces. Void is the app canvas; it is NOT pure black — pure black is
     reserved for the logo plate only. */
  --surface-void:      #08080A;
  --surface-ink:       #101013;
  --surface-ink-2:     #141418;
  --surface-slate:     #191920;
  --surface-raise:     #212128;

  /* Hairlines. The system is drawn with borders, not shadows. */
  --line:              #28282F;
  --line-strong:       #35353D;

  /* Text */
  --text-primary:      #EDEDEF;   /* 15.8:1 on void */
  --text-secondary:    #C6C6CD;
  --text-tertiary:     #828385;   /* wordmark grey — 4.9:1 minimum */
  --text-label:        #8A8B92;   /* uppercase micro-labels on dark */
  --text-muted:        #70727A;
  --text-ghost:        #5D5E62;   /* tagline grey — decorative only, never body */

  /* ------------------------------------------------------------- BRAND */
  /* Champagne gold. Accent and authority ONLY — never a large fill,
     never a decorative gradient wash, never a semantic meaning. */
  --brand:             #D1B362;
  --brand-light:       #EADCB4;
  --brand-deep:        #A8853B;
  --brand-rgb:         209, 179, 98;

  /* ---------------------------------------------------------- SEMANTIC */
  /* These carry meaning. Gold must never be substituted for any of them. */
  --state-active:      #3FBF8F;   --state-active-rgb:     63, 191, 143;
  --state-competing:   #5FA8E8;   --state-competing-rgb:  95, 168, 232;
  --state-provisional: #8B8CF0;   --state-provisional-rgb: 139, 140, 240;
  --state-expiring:    #E8934A;   --state-expiring-rgb:   232, 147, 74;
  --state-lost:        #E0685F;   --state-lost-rgb:       224, 104, 95;
  --state-lapsed:      #70727A;   --state-lapsed-rgb:     112, 114, 122;

  /* On-colour for gold buttons */
  --on-brand:          #191308;

  /* ----------------------------------------------------------- TYPOGRAPHY */
  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui:      "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Type scale — mobile reference 390pt, desktop 1440pt */
  --fs-cover:        60px;   --lh-cover: 1.04;
  --fs-h1:           33px;   --lh-h1:    1.18;
  --fs-h2:           24px;   --lh-h2:    1.24;
  --fs-screen-title: 15px;   --lh-screen-title: 1.2;
  --fs-body-l:       15px;   --lh-body-l: 1.62;
  --fs-body:         13px;   --lh-body:   1.68;
  --fs-body-s:       12.5px; --lh-body-s: 1.6;
  --fs-label:        12px;   --lh-label:  1.4;
  --fs-micro:        10.5px; --lh-micro:  1.4;
  --fs-chip:         9.5px;  --lh-chip:   1.5;
  --fs-mono:         11.5px; --lh-mono:   1.5;

  --tracking-display: -0.03em;
  --tracking-heading: -0.02em;
  --tracking-label:    0.14em;
  --tracking-micro:    0.16em;
  --tracking-mono:     0.02em;

  --weight-light: 300;
  --weight-reg:   400;
  --weight-med:   500;
  --weight-semi:  600;

  /* --------------------------------------------------------------- SPACE */
  /* 4px base. Use the scale; do not invent intermediate values. */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  40px;
  --space-9:  48px;
  --space-10: 64px;

  /* -------------------------------------------------------------- RADIUS */
  --radius-xs:  5px;
  --radius-sm:  8px;
  --radius-md:  11px;
  --radius-lg:  14px;
  --radius-xl:  16px;
  --radius-sheet: 20px;
  --radius-pill: 999px;

  /* ----------------------------------------------------------- ELEVATION */
  /* Shadows are used sparingly — only for floating sheets and the phone
     frame in reference art. Cards use hairlines, never shadows. */
  --shadow-sheet: 0 -18px 48px -24px rgba(0, 0, 0, 0.9);
  --shadow-brand: 0 8px 22px -12px rgba(var(--brand-rgb), 0.8);

  /* --------------------------------------------------------------- MOTION */
  --dur-instant: 90ms;
  --dur-fast:    180ms;
  --dur-base:    240ms;
  --dur-slow:    600ms;
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* --------------------------------------------------------------- SIZING */
  --tap-min:        44px;   /* minimum touch target */
  --shutter:        76px;   /* capture shutter — sized for one-handed site use */
  --ring-sm:        38px;
  --ring-md:        54px;
  --ring-lg:        96px;
  --appbar-h:       56px;
  --tabbar-h:       62px;
  --field-h:        46px;
  --content-max:    1280px;
}

/* Respect the OS setting. Every motion token collapses to a cut. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-instant: 0ms;
    --dur-fast:    0ms;
    --dur-base:    0ms;
    --dur-slow:    0ms;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================================
   BASE
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--surface-void);
}

body {
  margin: 0;
  background: var(--surface-void);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(var(--brand-rgb), 0.28); }

/* Visible keyboard focus, everywhere. Never remove without replacement. */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

img, svg { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

/* ============================================================================
   TYPOGRAPHY UTILITIES
   ========================================================================== */

.t-display {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  font-size: clamp(28px, 5.2vw, var(--fs-cover));
  line-height: var(--lh-cover);
  letter-spacing: var(--tracking-display);
  margin: 0;
}

.t-h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-med);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--tracking-heading);
  margin: 0;
}

.t-h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-med);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--tracking-heading);
  margin: 0;
}

/* App bar title. One line only — never wrap. */
.t-screen {
  font-family: var(--font-display);
  font-weight: var(--weight-med);
  font-size: var(--fs-screen-title);
  line-height: var(--lh-screen-title);
  letter-spacing: -0.01em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t-body   { font-size: var(--fs-body-l); line-height: var(--lh-body-l); color: var(--text-secondary); margin: 0; }
.t-body-s { font-size: var(--fs-body-s); line-height: var(--lh-body-s); color: var(--text-secondary); margin: 0; }
.t-label  { font-size: var(--fs-label); font-weight: var(--weight-med); line-height: var(--lh-label); color: var(--text-secondary); margin: 0; }

/* Uppercase micro-label. Used for eyebrows, tile labels, section markers. */
.t-micro {
  font-family: var(--font-ui);
  font-size: var(--fs-micro);
  font-weight: var(--weight-semi);
  line-height: var(--lh-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-label);
  margin: 0;
}

.t-micro-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: var(--weight-med);
  line-height: var(--lh-micro);
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--text-label);
  margin: 0;
}

/* THE EVIDENCE FACE. Every timestamp, claim reference, dispute reference,
   coordinate and config key uses this. The server timestamp is the partner's
   proof of priority — it must look like evidence, not decoration. */
.t-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: var(--weight-reg);
  line-height: var(--lh-mono);
  letter-spacing: var(--tracking-mono);
  font-variant-numeric: tabular-nums;
}

.t-num {
  font-family: var(--font-display);
  font-weight: var(--weight-semi);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   STATUS CHIPS — the closed vocabulary. Seven statuses, no additions.
   Colour is never the only signal: every chip carries its word.
   ========================================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid;
  font-family: var(--font-ui);
  font-size: var(--fs-chip);
  font-weight: var(--weight-semi);
  line-height: var(--lh-chip);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 5px;
}

.chip--provisional { color: var(--state-provisional); border-color: rgba(var(--state-provisional-rgb), 0.42); background: rgba(var(--state-provisional-rgb), 0.12); }
.chip--active      { color: var(--state-active);      border-color: rgba(var(--state-active-rgb), 0.42);      background: rgba(var(--state-active-rgb), 0.12); }
.chip--competing   { color: var(--state-competing);   border-color: rgba(var(--state-competing-rgb), 0.42);   background: rgba(var(--state-competing-rgb), 0.12); }
.chip--expiring    { color: var(--state-expiring);    border-color: rgba(var(--state-expiring-rgb), 0.42);    background: rgba(var(--state-expiring-rgb), 0.12); }
.chip--lost,
.chip--void        { color: var(--state-lost);        border-color: rgba(var(--state-lost-rgb), 0.42);        background: rgba(var(--state-lost-rgb), 0.12); }
.chip--expired     { color: var(--state-lapsed);      border-color: rgba(var(--state-lapsed-rgb), 0.5);       background: rgba(var(--state-lapsed-rgb), 0.14); }
.chip--won         { color: var(--state-active);      border-color: rgba(var(--state-active-rgb), 0.42);      background: rgba(var(--state-active-rgb), 0.12); }
.chip--brand       { color: var(--brand);             border-color: rgba(var(--brand-rgb), 0.42);             background: rgba(var(--brand-rgb), 0.1); }
.chip--ghost       { color: var(--text-tertiary);     border-color: var(--line-strong);                       background: transparent; }

/* ============================================================================
   BUTTONS
   There is almost no disabled state in this product. A disabled button with no
   explanation is a "silent stop" — forbidden. The only exception is a
   field-level validation gate, where the button is ABSENT, not greyed.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: var(--weight-semi);
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-instant) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  color: var(--on-brand);
  box-shadow: var(--shadow-brand);
}

.btn--secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-primary);
}

.btn--secondary:hover { border-color: var(--text-ghost); }

/* Quiet action. Always available — e.g. "Raise a dispute", which must be
   reachable on every claim including after a decision. */
.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--brand);
  padding-inline: 6px;
}

/* Destructive. Requires a confirmation sheet with a written reason. */
.btn--destructive {
  background: rgba(var(--state-lost-rgb), 0.12);
  border-color: rgba(var(--state-lost-rgb), 0.4);
  color: var(--state-lost);
}

.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 32px; padding: 7px 12px; font-size: 11px; border-radius: var(--radius-sm); }
.btn--lg { min-height: 54px; padding: 15px 20px; font-size: 13px; }

/* ============================================================================
   FIELDS
   Validation is live, never on submit.
   ========================================================================== */

.field { margin-bottom: var(--space-4); }
.field:last-child { margin-bottom: 0; }

.field__label {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 7px;
  font-size: var(--fs-label);
  font-weight: var(--weight-med);
  line-height: var(--lh-label);
  color: var(--text-secondary);
}

.field__req { color: var(--brand); font-size: 11px; }
.field__opt { color: var(--text-muted); font-size: 11px; font-weight: var(--weight-reg); }

.input,
.select {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--field-h);
  padding: 12px 14px;
  background: var(--surface-slate);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13.5px;
  line-height: 1.2;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.input::placeholder { color: var(--text-ghost); }

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.14);
}

.input[aria-invalid="true"] {
  border-color: var(--state-lost);
  box-shadow: 0 0 0 3px rgba(var(--state-lost-rgb), 0.12);
}

.input--mono { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; }
.input--readonly { color: var(--text-tertiary); }

/* Live counter, e.g. 10/10 on the mobile field */
.input__counter {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-med);
  color: var(--text-ghost);
}

.hint {
  margin: 7px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-tertiary);
}

.hint--error { color: var(--state-lost); }
.hint--ok    { color: var(--state-active); }

/* Segmented control — Email / Mobile toggle */
.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--surface-slate);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}

.segmented__item {
  flex: 1;
  padding: 9px 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  font-size: 11.5px;
  font-weight: var(--weight-semi);
  text-align: center;
  cursor: pointer;
}

.segmented__item[aria-selected="true"] {
  background: var(--surface-raise);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Checkbox row — used for consent, which always states its purpose */
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  cursor: pointer;
}

.check__box {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  background: var(--surface-slate);
  display: grid;
  place-items: center;
  color: var(--on-brand);
  font-size: 11px;
  font-weight: var(--weight-semi);
}

.check input:checked + .check__box {
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  border-color: var(--brand);
}

/* ============================================================================
   OTP ENTRY — six single-digit boxes
   ========================================================================== */

.otp { display: flex; gap: 7px; justify-content: center; }

.otp__box {
  flex: 1;
  max-width: 40px;
  height: 50px;
  display: grid;
  place-items: center;
  background: var(--surface-slate);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: var(--weight-med);
  color: var(--text-primary);
  text-align: center;
  caret-color: var(--brand);
}

.otp__box:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.14);
}

.otp__box[data-error="true"] { border-color: rgba(var(--state-lost-rgb), 0.55); }

/* ============================================================================
   COUNTDOWN RING — the signature element
   Derived from the emblem's segmented circle. Every live claim carries one.
   Colours: brand = healthy · expiring = 15/7-day warning ·
            provisional = 7-day clock · lapsed = expired (grey, NEVER red).
   The ring is NOT rendered on won, lost or void claims — those clocks stopped.
   ========================================================================== */

.ring {
  --p: 100;                 /* percent remaining, 0–100 */
  --ring-stroke: var(--brand);
  width: var(--ring-md);
  height: var(--ring-md);
  flex: 0 0 auto;
}

.ring__track { fill: none; stroke: var(--line-strong); stroke-width: 3.4; }

.ring__value {
  fill: none;
  stroke: var(--ring-stroke);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-dasharray: 116.24;
  stroke-dashoffset: calc(116.24px - 116.24px * var(--p) / 100);
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset var(--dur-slow) var(--ease-out);
}

.ring__days { fill: var(--text-primary); font-family: var(--font-ui); font-size: 10.5px; font-weight: var(--weight-semi); text-anchor: middle; font-variant-numeric: tabular-nums; }
.ring__unit { fill: var(--text-ghost); font-family: var(--font-mono); font-size: 5.6px; font-weight: var(--weight-med); letter-spacing: 0.1em; text-anchor: middle; }

.ring--healthy     { --ring-stroke: var(--brand); }
.ring--expiring    { --ring-stroke: var(--state-expiring); }
.ring--provisional { --ring-stroke: var(--state-provisional); }
.ring--lapsed      { --ring-stroke: var(--state-lapsed); }
.ring--lg { width: var(--ring-lg); height: var(--ring-lg); }
.ring--lg .ring__days { font-size: 17px; }
.ring--lg .ring__unit { font-size: 6.6px; }
.ring--sm { width: var(--ring-sm); height: var(--ring-sm); }
.ring--sm .ring__days { font-size: 9px; }

/* ============================================================================
   STATUS BANNERS
   Every banner names the state, explains it in plain words, and ends with
   exactly ONE next action.
   ========================================================================== */

.banner {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: 12px 13px;
  border: 1px solid;
  border-radius: var(--radius-lg);
}

.banner__icon { font-size: 14px; line-height: 1.3; }
.banner__body { flex: 1; min-width: 0; }
.banner__title { font-size: 11.8px; font-weight: var(--weight-semi); line-height: 1.35; letter-spacing: -0.005em; }
.banner__text  { margin-top: 3px; font-size: 11px; line-height: 1.5; color: var(--text-secondary); }
.banner__action {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: var(--weight-semi);
  color: var(--brand);
  text-decoration: none;
}

.banner--info { border-color: rgba(var(--brand-rgb), 0.32);             background: rgba(var(--brand-rgb), 0.09); }
.banner--info .banner__title { color: var(--brand-light); }
.banner--warn { border-color: rgba(var(--state-expiring-rgb), 0.4);    background: rgba(var(--state-expiring-rgb), 0.1); }
.banner--warn .banner__title { color: var(--state-expiring); }
.banner--ok   { border-color: rgba(var(--state-active-rgb), 0.4);      background: rgba(var(--state-active-rgb), 0.09); }
.banner--ok .banner__title { color: var(--state-active); }
.banner--stop { border-color: rgba(var(--state-lost-rgb), 0.42);       background: rgba(var(--state-lost-rgb), 0.1); }
.banner--stop .banner__title { color: var(--state-lost); }
.banner--pro  { border-color: rgba(var(--state-provisional-rgb), 0.4); background: rgba(var(--state-provisional-rgb), 0.1); }
.banner--pro .banner__title { color: var(--state-provisional); }

/* ============================================================================
   CARDS & SURFACES
   ========================================================================== */

.card {
  background: var(--surface-ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.card--tight  { padding: var(--space-4); }
.card--flat   { background: var(--surface-ink-2); }
.card--brand  {
  border-color: rgba(var(--brand-rgb), 0.34);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.07), rgba(var(--brand-rgb), 0.015));
}
/* Inline guidance. Left border reads as an annotation, not a component. */
.card--note {
  background: var(--surface-ink-2);
  border-left: 2px solid var(--brand);
  border-radius: var(--radius-xs) var(--radius-lg) var(--radius-lg) var(--radius-xs);
  padding: 13px 15px;
  font-size: 12.6px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ============================================================================
   APP SHELL
   ========================================================================== */

.appbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--appbar-h);
  padding: 5px var(--space-4) 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.appbar__titles { flex: 1; min-width: 0; }
.appbar__sub {
  font-family: var(--font-mono);
  font-size: 9.6px;
  font-weight: var(--weight-reg);
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-label);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appbar__avatar {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-raise);
  font-size: 10px;
  font-weight: var(--weight-semi);
  color: var(--brand);
}

.tabbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--tabbar-h);
  padding: 9px var(--space-2) 13px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--text-label);
  font-size: 8.6px;
  font-weight: var(--weight-med);
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}

.tabbar__item[aria-current="page"] { color: var(--brand); }

/* Register is the hero: centre of the bar, gold, oversized, ALWAYS enabled.
   It is the only action that starts a partner's clock. */
.tabbar__item--register { color: var(--brand); }
.tabbar__item--register .tabbar__icon { font-size: 19px; }

/* ============================================================================
   LIST ROWS
   ========================================================================== */

.row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.row:last-child { border-bottom: 0; }
.row__body { flex: 1; min-width: 0; }
.row__title { font-size: 12.5px; font-weight: var(--weight-semi); line-height: 1.3; }
.row__sub { font-size: 10.5px; line-height: 1.5; color: var(--text-tertiary); }
.row__meta { margin-top: 3px; font-family: var(--font-mono); font-size: 9.6px; color: var(--text-label); letter-spacing: 0.02em; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================================
   TIMELINE — the component the platform is really selling
   Append-only. No edit or delete affordance exists, for any role.
   ========================================================================== */

.timeline__item {
  display: flex;
  gap: var(--space-3);
  position: relative;
  padding-bottom: var(--space-4);
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 20px;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}

.timeline__item:last-child { padding-bottom: 0; }
.timeline__item:last-child::before { display: none; }

.timeline__dot {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-ink);
  font-size: 10px;
  z-index: 1;
}

.timeline__dot--brand  { border-color: rgba(var(--brand-rgb), 0.5);             color: var(--brand); }
.timeline__dot--active { border-color: rgba(var(--state-active-rgb), 0.5);      color: var(--state-active); }
.timeline__dot--comp   { border-color: rgba(var(--state-competing-rgb), 0.5);   color: var(--state-competing); }
.timeline__dot--warn   { border-color: rgba(var(--state-expiring-rgb), 0.5);    color: var(--state-expiring); }
.timeline__dot--lost   { border-color: rgba(var(--state-lost-rgb), 0.5);        color: var(--state-lost); }

/* Timestamp line: mono, seconds and IST. Seconds matter — two registrations
   20 seconds apart go to a human. */
.timestamp {
  font-family: var(--font-mono);
  font-size: 9.6px;
  font-weight: var(--weight-med);
  letter-spacing: 0.02em;
  color: var(--text-label);
}

/* ============================================================================
   DATA DISPLAY (admin console)
   ========================================================================== */

.table { width: 100%; border-collapse: collapse; font-size: 11.4px; }

.table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 9.4px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-label);
  white-space: nowrap;
}

.table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: 0; }
.table__em { color: var(--text-primary); font-weight: var(--weight-med); }

/* KPI tile. Every tile is a link — no metric without a drill-down. */
.kpi { background: var(--surface-ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 13px; }
.kpi__value { display: block; font-family: var(--font-display); font-size: 25px; font-weight: var(--weight-semi); line-height: 1; letter-spacing: -0.025em; }
.kpi__label { display: block; margin-top: 6px; font-size: 9.6px; font-weight: var(--weight-med); letter-spacing: 0.11em; text-transform: uppercase; color: var(--text-label); }
.kpi__delta { font-family: var(--font-mono); font-size: 9.6px; font-weight: var(--weight-med); color: var(--state-active); }
.kpi__delta--down { color: var(--state-lost); }

/* ============================================================================
   BRAND MARK — circular lockup
   The emblem is inset at a FIXED 65% of the circle diameter, and that inset is
   baked into the asset. Do not crop, stretch or re-inset it. Use these sizes
   and these sizes only.
   ========================================================================== */

.mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background-color: #000;
  background-image: url("../assets/bulwark-mark-circle.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

.mark--md { width: 44px; height: 44px; flex: 0 0 44px; }
.mark--lg { width: 56px; height: 56px; flex: 0 0 56px; }

/* ============================================================================
   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;
}

.stack   { display: flex; flex-direction: column; }
.stack-2 { gap: var(--space-2); }
.stack-3 { gap: var(--space-3); }
.stack-4 { gap: var(--space-4); }
.stack-6 { gap: var(--space-6); }

.grid-2 { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: var(--space-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: var(--space-3); grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.divider { height: 1px; background: var(--line); border: 0; margin: var(--space-6) 0; }

.muted   { color: var(--text-tertiary); }
.dim     { color: var(--text-muted); }
.text-brand { color: var(--brand); }
