/*
 * Drawbridge — MCP Auth Gateway demo dashboard.
 * Rimini Street brand styling. Self-contained: no webfonts, no CDN, no images.
 *
 * THREE-TIER TOKEN ENGINE — components consume TIER 2 (and the TIER 3 scope) ONLY.
 * No raw colour/size literal may appear outside the :root / scope blocks below.
 *
 *   tier 1  --rs-*   raw brand primitives, straight from the Rimini Street brand kit
 *   tier 2  --color-* / --state-* / --lane-* / --space-* / --text-* …  semantic tokens
 *   tier 3  [data-surface="inverse"]  rebinds tier-2 semantics for the charcoal masthead
 *
 * TYPE: riministreet.com sets `proxima-nova, "Helvetica Neue", Arial, Corbel, sans-serif`.
 * Proxima Nova is a licensed Adobe face and this page makes zero external requests, so the
 * licensed face is deliberately omitted and the rest of the stack is used verbatim.
 */

/* ---------------------------------------------------------- TIER 1 — brand primitives */

:root {
  /* signature accent */
  --rs-yellow: #fbe700;
  --rs-yellow-alt: #fce500;

  /* secondary brand hues */
  --rs-purple: #874fa0;
  --rs-teal: #1292b2;
  --rs-teal-dark: #005e7a;

  /* neutrals */
  --rs-ink: #393939;
  --rs-slate: #646c7e;
  --rs-neutral-050: #f8f8f9;
  --rs-neutral-100: #f7f7f7;
  --rs-neutral-300: #d4d4d4;
  --rs-wash: #f3fbff;
  --rs-wash-strong: #e8f7ff;
  --rs-charcoal: #4a4441;
  --rs-white: #ffffff;
  --rs-black: #000000;

  /*
   * FUNCTIONAL hue — NOT a Rimini Street brand colour. The brand kit carries no red, and a
   * failure state must not be signalled by an off-semantic brand hue. Kept desaturated so
   * yellow + charcoal stay dominant. 6.5:1 on white.
   */
  --fn-red: #b3261e;

  /* ---------------------------------------------------------- TIER 2 — semantic tokens */

  /* surfaces */
  --color-canvas: var(--rs-neutral-050);
  --color-surface: var(--rs-white);
  --color-surface-muted: var(--rs-neutral-100);
  --color-surface-inset: var(--rs-wash);
  --color-surface-inset-strong: var(--rs-wash-strong);
  --color-surface-inverse: color-mix(in srgb, var(--rs-charcoal) 74%, var(--rs-black));
  --color-surface-inverse-raised: color-mix(in srgb, var(--rs-charcoal) 92%, var(--rs-white));

  /* lines */
  --color-border: var(--rs-neutral-300);
  --color-border-strong: color-mix(in srgb, var(--rs-slate) 55%, var(--rs-white));
  --color-divider: color-mix(in srgb, var(--rs-neutral-300) 60%, var(--rs-white));

  /* text */
  --color-text: var(--rs-ink);
  --color-text-muted: color-mix(in srgb, var(--rs-slate) 78%, var(--rs-ink));
  --color-text-faint: var(--rs-slate);
  --color-text-inverse: var(--rs-white);
  --color-text-inverse-faint: color-mix(in srgb, var(--rs-neutral-300) 82%, var(--rs-charcoal));

  /* accent — yellow is a FILL and a RULE, never text on light ground (1.3:1) */
  --color-accent: var(--rs-yellow);
  --color-accent-hover: var(--rs-yellow-alt);
  --color-accent-ink: var(--rs-ink);
  --color-accent-wash: color-mix(in srgb, var(--rs-yellow) 16%, var(--rs-white));
  --color-accent-line: color-mix(in srgb, var(--rs-yellow) 62%, var(--rs-ink));

  /* focus — two-tone so it reads on white AND on charcoal */
  --focus-ring: 0 0 0 2px var(--color-accent), 0 0 0 4px var(--color-text);

  /* states — every state also carries a text label in the markup, never colour alone */
  --state-ok: var(--rs-teal-dark);
  --state-ok-surface: var(--rs-wash-strong);
  --state-ok-border: var(--rs-teal);

  --state-fail: var(--fn-red);
  --state-fail-surface: color-mix(in srgb, var(--fn-red) 8%, var(--rs-white));
  --state-fail-border: color-mix(in srgb, var(--fn-red) 45%, var(--rs-white));

  --state-pending: var(--color-accent-ink);
  --state-pending-surface: var(--rs-yellow);
  --state-pending-border: var(--color-accent-line);

  --state-active: var(--rs-purple);
  --state-active-surface: color-mix(in srgb, var(--rs-purple) 10%, var(--rs-white));
  --state-active-border: color-mix(in srgb, var(--rs-purple) 50%, var(--rs-white));

  --state-idle: var(--rs-slate);
  --state-idle-surface: var(--rs-neutral-100);
  --state-idle-border: var(--rs-neutral-300);

  /* auth lanes */
  --lane-client: var(--rs-teal-dark);
  --lane-upstream: var(--rs-purple);
  --lane-legacy: var(--rs-charcoal);

  /* type */
  --font-sans: "Helvetica Neue", Helvetica, Arial, Corbel, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --text-3xl: 30px;
  --text-2xl: 22px;
  --text-xl: 18px;
  --text-lg: 16px;
  --text-md: 15px;
  --text-sm: 13.5px;
  --text-xs: 12px;
  --text-2xs: 11px;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --weight-black: 800;

  --tracking-caps: 0.08em;
  --tracking-lockup: 0.02em;
  --leading-tight: 1.2;
  --leading-body: 1.5;

  /* space */
  --space-0: 2px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* shape — corporate and sharp, not pill-soft */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-pill: 999px;

  --rule-hair: 1px;
  --rule-thin: 2px;
  --rule-thick: 4px;
  --rule-heavy: 6px;

  --shadow-card: 0 1px 2px color-mix(in srgb, var(--rs-ink) 10%, transparent);
  --shadow-hero: 0 2px 4px color-mix(in srgb, var(--rs-ink) 12%, transparent),
    0 12px 28px color-mix(in srgb, var(--rs-ink) 10%, transparent);

  --layout-max: 1320px;
  --ledger-col-min: 260px;
  --ledger-col-max: 340px;
  --text-inline-code: 0.92em;
  --lane-events-min: 104px;
  --feed-min: 64px;
  --feed-max: 380px;
}

/* ------------------------------------------- TIER 3 — surface scope: charcoal masthead */

[data-surface="inverse"] {
  --color-surface: var(--color-surface-inverse);
  --color-surface-muted: var(--color-surface-inverse-raised);
  --color-text: var(--color-text-inverse);
  --color-text-muted: var(--color-text-inverse-faint);
  --color-text-faint: var(--color-text-inverse-faint);
  --color-border: color-mix(in srgb, var(--rs-white) 22%, transparent);
  --color-border-strong: color-mix(in srgb, var(--rs-white) 42%, transparent);
  --state-idle: var(--color-text-inverse-faint);
  --state-idle-surface: transparent;
  --state-idle-border: color-mix(in srgb, var(--rs-white) 30%, transparent);
  --state-ok: var(--rs-white);
  --state-ok-surface: color-mix(in srgb, var(--rs-teal) 42%, transparent);
  --state-ok-border: var(--rs-teal);
  --state-fail-surface: color-mix(in srgb, var(--fn-red) 34%, transparent);
  --state-fail: var(--rs-white);
  --state-fail-border: var(--fn-red);
  --focus-ring: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-accent);
}

/* -------------------------------------------------------------------------- base */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: var(--font-sans);
}

body {
  font-size: var(--text-md);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: var(--font-mono);
  font-size: var(--text-inline-code);
  color: var(--color-text);
  background: var(--color-surface-muted);
  border: var(--rule-hair) solid var(--color-divider);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-1);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

.eyebrow {
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: 0;
}

/* -------------------------------------------------------------------------- masthead */

.masthead {
  background: var(--color-surface);
  color: var(--color-text);
  border-bottom: var(--rule-hair) solid var(--color-border);
}

.masthead__inner {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: var(--space-5) var(--space-5);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}

/*
 * Typographic lockup — wordmark + tagline over the signature yellow rule.
 * This deliberately does NOT reproduce, trace or approximate the Rimini Street logo:
 * the brand guide requires the supplied electronic artwork and forbids recreation.
 */
.lockup {
  border-bottom: var(--rule-thick) solid var(--color-accent);
  padding-bottom: var(--space-2);
  min-width: 0;
}

.lockup__word {
  margin: 0;
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-lockup);
  line-height: var(--leading-tight);
  text-transform: uppercase;
}

.lockup__tag {
  margin: var(--space-1) 0 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.masthead__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  flex-wrap: wrap;
}

/* cross-page nav — dashboard <-> architecture */
.masthead__link {
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: var(--rule-thin) solid var(--color-accent);
  padding-bottom: var(--space-0);
  white-space: nowrap;
}
.masthead__link:hover {
  color: var(--color-accent);
}

/* -------------------------------------------------------------------------- buttons */

.btn {
  appearance: none;
  border: var(--rule-hair) solid var(--color-border-strong);
  background: transparent;
  color: var(--color-text);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-lockup);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 18%, transparent);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  box-shadow: var(--shadow-card);
}
.btn--primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-ink);
}

.btn--small {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

/* -------------------------------------------------------------------------- badges + chips */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  border: var(--rule-hair) solid var(--state-idle-border);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.badge--muted {
  color: var(--color-text-faint);
}
.badge--ok {
  color: var(--state-ok);
  background: var(--state-ok-surface);
  border-color: var(--state-ok-border);
}
.badge--fail {
  color: var(--state-fail);
  background: var(--state-fail-surface);
  border-color: var(--state-fail-border);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-0) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  border: var(--rule-hair) solid var(--state-idle-border);
  color: var(--state-idle);
  background: var(--state-idle-surface);
  white-space: nowrap;
}
.chip[data-state="idle"] {
  color: var(--state-idle);
  border-color: var(--state-idle-border);
  background: var(--state-idle-surface);
}
.chip[data-state="active"] {
  color: var(--state-active);
  border-color: var(--state-active-border);
  background: var(--state-active-surface);
}
.chip[data-state="ok"] {
  color: var(--state-ok);
  border-color: var(--state-ok-border);
  background: var(--state-ok-surface);
}
.chip[data-state="fail"] {
  color: var(--state-fail);
  border-color: var(--state-fail-border);
  background: var(--state-fail-surface);
}
.chip[data-state="pending"] {
  color: var(--state-pending);
  border-color: var(--state-pending-border);
  background: var(--state-pending-surface);
}

/* -------------------------------------------------------------------------- layout */

.app {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.row {
  display: grid;
  gap: var(--space-5);
}
.row--split {
  grid-template-columns: minmax(var(--ledger-col-min), var(--ledger-col-max)) 1fr;
  align-items: start;
}

.card {
  background: var(--color-surface);
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: var(--rule-hair) solid var(--color-divider);
}

.card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin: 0;
  color: var(--color-text);
  letter-spacing: var(--tracking-lockup);
}

/* -------------------------------------------------------------------------- status line */

.sr-status {
  position: absolute;
  width: var(--rule-hair);
  height: var(--rule-hair);
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sr-status.sr-status--visible {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  white-space: normal;
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--rule-hair) solid var(--color-border);
  border-left: var(--rule-thick) solid var(--color-accent);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}
.sr-status.sr-status--error {
  border-left-color: var(--state-fail);
  background: var(--state-fail-surface);
  color: var(--state-fail);
}

/* -------------------------------------------------------------------------- lanes */

.lane {
  position: relative;
  background: var(--color-surface);
  border: var(--rule-hair) solid var(--color-border);
  border-top: var(--rule-heavy) solid var(--state-idle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.lane[data-lane="client-oauth"] {
  border-top-color: var(--lane-client);
}
.lane[data-lane="upstream-oauth"] {
  border-top-color: var(--lane-upstream);
}
.lane[data-lane="sap-legacy"] {
  border-top-color: var(--lane-legacy);
}

/* decorative pipeline chevron sitting in the gutter between lane columns */
.lane:not(:last-child)::after {
  content: "";
  position: absolute;
  top: var(--space-6);
  right: calc(-1 * var(--space-3));
  width: var(--space-2);
  height: var(--space-2);
  border-top: var(--rule-thin) solid var(--color-border-strong);
  border-right: var(--rule-thin) solid var(--color-border-strong);
  transform: rotate(45deg);
}

.lane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.lane__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-5);
  height: var(--space-5);
  flex: none;
  margin-right: var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-xs);
  font-weight: var(--weight-black);
}

.lane__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin: 0;
  display: flex;
  align-items: center;
  min-width: 0;
  letter-spacing: var(--tracking-lockup);
}

.lane__subtitle {
  margin: var(--space-2) 0 var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

/* -------------------------------------------------------------------------- flow nodes */

.flow {
  display: flex;
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  gap: var(--space-1);
}

.flow__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.flow__node {
  width: 100%;
  height: var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--state-idle-surface);
  border: var(--rule-hair) solid var(--state-idle-border);
}
.flow__node[data-state="active"] {
  background: var(--state-active);
  border-color: var(--state-active);
}
.flow__node[data-state="ok"] {
  background: var(--state-ok);
  border-color: var(--state-ok);
}
.flow__node[data-state="fail"] {
  background: var(--state-fail);
  border-color: var(--state-fail);
}

.flow__label {
  font-size: var(--text-2xs);
  text-align: center;
  color: var(--color-text-faint);
  line-height: var(--leading-tight);
}
.flow__step[data-touched="true"] .flow__label {
  color: var(--color-text);
  font-weight: var(--weight-medium);
}

.flow__status {
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-text-faint);
  line-height: var(--leading-tight);
}
.flow__step[data-node-state="active"] .flow__status {
  color: var(--state-active);
}
.flow__step[data-node-state="ok"] .flow__status {
  color: var(--state-ok);
}
.flow__step[data-node-state="fail"] .flow__status {
  color: var(--state-fail);
}

/* -------------------------------------------------------------------------- event rows */

.lane__events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: var(--lane-events-min);
}

.event {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: var(--rule-hair) solid var(--color-divider);
  font-size: var(--text-xs);
}
.lane__events .event:last-child {
  border-bottom: none;
}

.event__mark {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-lockup);
  padding: 0 var(--space-1);
  border-radius: var(--radius-sm);
  border: var(--rule-hair) solid;
}
.event__mark--ok {
  color: var(--state-ok);
  border-color: var(--state-ok-border);
  background: var(--state-ok-surface);
}
.event__mark--fail {
  color: var(--state-fail);
  border-color: var(--state-fail-border);
  background: var(--state-fail-surface);
}

.event__lane-tag {
  flex: none;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  color: var(--color-text-faint);
  text-transform: uppercase;
}

.event__body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  overflow: hidden;
}

.event__step {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  white-space: nowrap;
}

.event__detail {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event__time {
  flex: none;
  font-family: var(--font-mono);
  color: var(--color-text-faint);
  font-size: var(--text-2xs);
}

/* -------------------------------------------------------------------------- ledger stepper */

/*
 * Vertical: the ledger card is the narrow column of the split row, and a horizontal
 * three-step rail clips its last label at any card width a laptop will actually give it.
 */
.stepper {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.stepper__step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: none;
}

.stepper__dot {
  width: var(--space-6);
  height: var(--space-6);
  border-radius: var(--radius-pill);
  border: var(--rule-thin) solid var(--state-idle-border);
  background: var(--state-idle-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  color: var(--state-idle);
  flex: none;
}
.stepper__step[data-state="active"] .stepper__dot {
  border-color: var(--state-pending-border);
  background: var(--state-pending-surface);
  color: var(--state-pending);
}
.stepper__step[data-state="done"] .stepper__dot {
  border-color: var(--state-ok);
  background: var(--state-ok-surface);
  color: var(--state-ok);
}
.stepper__step[data-state="fail"] .stepper__dot {
  border-color: var(--state-fail);
  background: var(--state-fail-surface);
  color: var(--state-fail);
}

.stepper__label {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  white-space: nowrap;
  letter-spacing: var(--tracking-lockup);
}
.stepper__step[data-state="active"] .stepper__label,
.stepper__step[data-state="done"] .stepper__label,
.stepper__step[data-state="fail"] .stepper__label {
  font-weight: var(--weight-bold);
}
.stepper__step[data-state="active"] .stepper__label {
  color: var(--color-text);
}
.stepper__step[data-state="done"] .stepper__label {
  color: var(--state-ok);
}
.stepper__step[data-state="fail"] .stepper__label {
  color: var(--state-fail);
}

.stepper__connector {
  flex: none;
  width: var(--rule-thin);
  height: var(--space-4);
  background: var(--state-idle-border);
  margin: var(--space-1) 0 var(--space-1) calc(var(--space-4) - var(--rule-hair));
}
.stepper__connector[data-state="done"] {
  background: var(--state-ok);
}

/* -------------------------------------------------------------------------- ceremony (hero) */

.card--hero {
  border-top: var(--rule-heavy) solid var(--color-accent);
  box-shadow: var(--shadow-hero);
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.card--hero .card__title {
  font-size: var(--text-2xl);
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-6);
  height: var(--space-6);
  flex: none;
  margin-right: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}
.hero-mark svg {
  width: var(--space-4);
  height: var(--space-4);
  display: block;
}

.card--hero .card__head {
  align-items: flex-start;
}

.hero-headline {
  display: flex;
  align-items: center;
  min-width: 0;
}

.hero-note {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.proposal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.proposal-empty,
.meta-empty {
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  padding: var(--space-3);
  background: var(--color-surface-muted);
  border: var(--rule-hair) dashed var(--color-border);
  border-radius: var(--radius-md);
}

.proposal {
  border: var(--rule-hair) solid var(--color-border);
  border-left: var(--rule-heavy) solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-surface-inset);
  padding: var(--space-4);
}

.proposal__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.proposal__head strong {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-lockup);
}

.proposal__op {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Ribbon across the top of a pending proposal — the decisive yellow, ink text on top. */
.proposal__flag {
  flex-basis: 100%;
  order: -1;
  font-size: var(--text-xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--state-pending);
  background: var(--state-pending-surface);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}

/*
 * Write-effective fields, legible at a glance: labels on row 1, values on row 2, one column
 * per field. Column flow keeps each <dt>/<dd> pair vertically aligned without extra markup.
 */
.proposal__fields {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: auto auto;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--space-1) var(--space-5);
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-md);
}
.proposal__fields dt {
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.proposal__fields dd {
  margin: 0;
  color: var(--color-text);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  overflow-wrap: anywhere;
}

.proposal__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.proposal__status {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
}

/* -------------------------------------------------------------------------- meta / digests */

.meta-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  font-size: var(--text-xs);
  align-items: baseline;
}
.meta-list--tight {
  font-size: var(--text-xs);
}
.meta-list dt {
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.meta-list dd {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.meta-list .meta-empty {
  grid-column: 1 / -1;
}

/* -------------------------------------------------------------------------- feed */

.feed__list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: var(--feed-min);
  max-height: var(--feed-max);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
/* holds the card's shape before the first event and after a reset (no layout jump) */
.feed__list:empty::before {
  content: "Waiting for auth events\2026";
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  padding: var(--space-3);
  background: var(--color-surface-muted);
  border: var(--rule-hair) dashed var(--color-border);
  border-radius: var(--radius-md);
}

.feed__list .event {
  padding: var(--space-2) var(--space-3);
  border-left: var(--rule-thick) solid var(--state-idle-border);
}
.feed__list .event--client-oauth {
  border-left-color: var(--lane-client);
}
.feed__list .event--upstream-oauth {
  border-left-color: var(--lane-upstream);
}
.feed__list .event--sap-legacy {
  border-left-color: var(--lane-legacy);
}
.feed__list .event:nth-child(even) {
  background: var(--color-surface-muted);
}

/* -------------------------------------------------------------------------- footer */

.app-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--rule-thick) solid var(--color-accent);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.legend-swatch {
  display: inline-block;
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-sm);
  margin-right: var(--space-1);
  vertical-align: baseline;
}
.legend-swatch--client-oauth {
  background: var(--lane-client);
}
.legend-swatch--upstream-oauth {
  background: var(--lane-upstream);
}
.legend-swatch--sap-legacy {
  background: var(--lane-legacy);
}

.app-footer__sep {
  color: var(--color-border);
}

.app-footer__disclaimer {
  flex-basis: 100%;
  color: var(--color-text-faint);
  font-size: var(--text-2xs);
}

/* -------------------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .lanes {
    grid-template-columns: 1fr 1fr;
  }
  .lane:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 900px) {
  .lanes,
  .row--split {
    grid-template-columns: 1fr;
  }
  .proposal__fields {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: max-content 1fr;
    gap: var(--space-2) var(--space-4);
    align-items: baseline;
  }
  .proposal__fields dd {
    font-size: var(--text-xl);
  }
  .lockup__word {
    font-size: var(--text-2xl);
  }
  .masthead__inner {
    padding: var(--space-4);
  }
  .app {
    padding: var(--space-4) var(--space-4) var(--space-6);
  }
}

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