/* App styles (Kinetic, docs/design/FlexYield_DesignSystem_final). Tokens
   live in tokens.css (dual seam) — every color routes through them. App
   pages have NO scroll motion: hover states only. */

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 1.15;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* App shell (never applies to the marketing pages — those ship their own system) */
body:not(.landing) {
  font-family: var(--font-body);
  line-height: 1.55;
  margin: 0;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

body:not(.landing) a {
  color: var(--accent);
}

.app-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line-10);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header__nav {
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.topbar__crumb {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar__crumb-sep { color: var(--ink3); }

.topbar__crumb-name {
  color: var(--ink2);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__chip {
  background: var(--accent-14);
  border: 1px solid var(--accent-35);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body:not(.landing) .theme-toggle,
.landing .theme-toggle {
  background: transparent;
  border: 1px solid var(--line-18);
  color: var(--ink2);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  font-family: inherit;
  transition: color 150ms ease-out, border-color 150ms ease-out;
}

body:not(.landing) .theme-toggle:hover,
.landing .theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: transparent;
}

body:not(.landing) a.app-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
}

.app-header__brand svg {
  display: block;
  width: 28px;
  height: 28px;
}

.app-header__links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

body:not(.landing) .app-header__links a {
  color: var(--ink2);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 150ms ease-out;
}

body:not(.landing) .app-header__links a:hover {
  color: var(--accent);
}

/* Two-column signed-in shell: the sidebar hugs the left screen edge and
   owns section navigation; content flows in the remaining column. */
.app-shell--with-sidebar {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.app-sidebar {
  border-right: 1px solid var(--line-10);
  padding: 24px 16px;
  position: sticky;
  top: 61px;
  align-self: start;
  /* Fixed (not max-) height: margin-top:auto pins the plan card to the
     bottom-left of the viewport regardless of nav length or scroll. */
  height: calc(100dvh - 61px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

/* Plan card pinned at the sidebar's bottom (Kinetic dashboard spec). */
.plan-card {
  margin-top: auto;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: linear-gradient(180deg, var(--accent-08), var(--line-4));
  border-radius: 12px;
  padding: 16px;
}

.plan-card__name {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  font-family: var(--font-body);
}

.plan-card__limit {
  margin: 0 0 12px;
  color: var(--ink2);
  font-size: 13px;
}

body:not(.landing) .plan-card__cta {
  display: block;
  text-align: center;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

body:not(.landing) .plan-card__cta:hover {
  background: var(--accent-hov);
  color: var(--on-accent);
}

.app-sidebar nav + nav {
  margin-top: 1.25rem;
}

.app-sidebar__title {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
}

body:not(.landing) .app-sidebar a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink2);
  text-decoration: none;
  font-size: 14px;
  transition: background 150ms ease-out, color 150ms ease-out;
}

body:not(.landing) .app-sidebar a:hover {
  color: var(--ink);
  background: var(--line-4);
}

body:not(.landing) .app-sidebar a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-14);
  font-weight: 600;
}

@media (max-width: 860px) {
  /* Data tables scroll inside their own box on phones — wide content must
     never stretch the page sideways (mobile pass 2026-07-25).
     position: relative anchors the absolutely-positioned .visually-hidden
     header spans inside the scroll box; otherwise they escape it and pan
     the page anyway. */
  .app-main table {
    display: block;
    overflow-x: auto;
    position: relative;
  }

  .app-shell--with-sidebar {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto; /* base rule pins a fixed dvh height for the plan card */
    max-height: none;
    display: flex;
    gap: 0.5rem 2rem;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--line-8);
    padding: 1rem 1.5rem;
  }

  .plan-card {
    margin-top: 0;
    flex-basis: 100%;
  }

  .app-sidebar nav + nav {
    margin-top: 0;
  }

  body:not(.landing) .app-sidebar a {
    display: inline-block;
  }
}

/* Main column: Kinetic app spec — 36px 40px padding, max 960px. */
.app-main {
  max-width: 960px;
  margin-inline: auto;
  padding: 36px 40px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.app-shell--with-sidebar .app-main {
  margin-inline: 0;
}

@media (max-width: 860px) {
  .app-main {
    padding: 20px 16px;
  }
}

/* Profile menu: avatar trigger, hover/focus card with account + sign out. */
.profile-menu {
  position: relative;
}

body:not(.landing) button.profile-menu__trigger {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  background: var(--accent-14);
  color: var(--accent);
  border: 1px solid var(--accent-35);
  font-weight: 700;
  font-size: 13px;
}

body:not(.landing) button.profile-menu__trigger:hover {
  background: var(--accent-14);
  border-color: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 20%, transparent);
}

.profile-menu__card {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  padding-top: 0.45rem; /* hover bridge between trigger and panel */
  z-index: 20;
}

.profile-menu:hover .profile-menu__card,
.profile-menu:focus-within .profile-menu__card {
  display: block;
}

.profile-menu__panel {
  min-width: 15rem;
  background: var(--surface);
  border: 1px solid var(--line-18);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: 0 12px 32px var(--shadow-c);
}

.profile-menu__name {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.profile-menu__email {
  margin: 0.15rem 0 0.75rem;
  color: var(--ink3);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.app-main main > section {
  margin-block: 1.5rem;
}

/* ---- Forms (Kinetic: input-bg fields, 12px radius, accent focus) ---- */

body:not(.landing) :is(input[type="text"], input[type="email"], input[type="password"],
    input[type="number"], input[type="date"], input[type="search"], select) {
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--line-18);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 14px;
}

body:not(.landing) textarea {
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--line-18);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 14px;
}

body:not(.landing) :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

body:not(.landing) :is(input[type="submit"], button) {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.3rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease-out, box-shadow 150ms ease-out;
}

body:not(.landing) :is(input[type="submit"], button):hover {
  background: var(--accent-hov);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 25%, transparent);
}

body:not(.landing) .button--subtle :is(input[type="submit"], button),
body:not(.landing) button.button--subtle,
body:not(.landing) input[type="submit"].button--subtle {
  background: transparent;
  color: var(--ink2);
  border: 1px solid var(--line-18);
  font-weight: 500;
}

body:not(.landing) .button--subtle :is(input[type="submit"], button):hover,
body:not(.landing) button.button--subtle:hover,
body:not(.landing) input[type="submit"].button--subtle:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-35);
  box-shadow: none;
}

/* Small outlined row action (table rows, card heads). Destructive variant
   shifts to --err on hover per the design system. */
body:not(.landing) button.btn-pill,
body:not(.landing) input[type="submit"].btn-pill {
  background: transparent;
  border: 1px solid var(--line-18);
  color: var(--ink2);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
}

body:not(.landing) button.btn-pill:hover,
body:not(.landing) input[type="submit"].btn-pill:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-35);
  box-shadow: none;
}

body:not(.landing) button.btn-pill--danger:hover,
body:not(.landing) input[type="submit"].btn-pill--danger:hover {
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 40%, transparent);
}

body:not(.landing) form {
  margin: 0;
}

body:not(.landing) label {
  color: var(--ink2);
  font-size: 0.9rem;
  margin-right: 0.4rem;
}

/* Inline form rows (create key, invite, cost inputs, date filters). */
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Two-column profile form (Kinetic profile spec). */
.form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 18px;
  align-items: start;
}

.form-cols__col {
  display: grid;
  gap: 14px;
  align-content: start;
}

.form-cols__col--divided {
  border-left: 1px solid var(--line-10);
  padding-left: 32px;
}

.form-actions {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line-10);
  padding-top: 18px;
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  .form-cols {
    grid-template-columns: 1fr;
  }

  .form-cols__col--divided {
    border-left: none;
    padding-left: 0;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.25rem 1.5rem;
}

.form-grid__wide {
  grid-column: 1 / -1;
}

.form-grid input[type="text"],
.form-grid input[type="email"],
.form-grid textarea,
.form-cols input[type="text"],
.form-cols input[type="email"],
.form-cols textarea {
  width: 100%;
  box-sizing: border-box;
}

.cap-form input[type="number"] {
  width: 6.5rem;
}

/* Flash messages (app pages) */
.flash {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.flash--notice {
  background: var(--accent-14);
  color: var(--accent);
  border: 1px solid var(--accent-35);
}

.flash--alert {
  background: color-mix(in srgb, var(--err) 12%, transparent);
  color: var(--err);
  border: 1px solid color-mix(in srgb, var(--err) 30%, transparent);
}

/* Email-confirmation banner (unverified users, transactional mail live) */
.verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.92rem;
  margin-bottom: 1rem;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}

.verify-banner form {
  margin: 0;
}

.verify-banner__resend {
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  background: transparent;
  color: var(--warn);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.verify-banner__resend:hover {
  background: color-mix(in srgb, var(--warn) 18%, transparent);
}

.status-ok { color: var(--ok); font-weight: 600; }
.status-warn { color: var(--warn); font-weight: 600; }
.status-critical { color: var(--err); font-weight: 600; }
.status-muted { color: var(--ink3); font-weight: 600; }

/* ---- Page scaffolding ---- */

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

body:not(.landing) .page-head h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  margin: 0;
}

.page-head__meta {
  color: var(--ink3);
  font-size: 13px;
}

/* ---- Cards ---- */

.k-card {
  background: var(--surface);
  border: 1px solid var(--line-10);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.k-card--accent {
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

/* Paused/disabled things drop to the muted layer (Kinetic Providers tab). */
.k-card--muted,
.row--muted {
  color: var(--ink3);
}

.k-card--muted h2,
.k-card--muted h3 {
  color: var(--ink2);
}

.row--muted td,
.row--muted td .cell-muted,
.row--muted td code {
  color: var(--ink3);
}

.k-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

body:not(.landing) .k-card__head h2,
body:not(.landing) .k-card__head h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  margin: 0;
}

.k-card__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Micro-label above card content (Kinetic: 12px uppercase, wide tracking). */
.k-card__label {
  display: block;
  color: var(--ink3);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
}

.k-card__note {
  color: var(--ink3);
  font-size: 13px;
  margin: 12px 0 0;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card-grid-2 > .k-card { margin-bottom: 0; }
.card-grid-2 { margin-bottom: 16px; }

@media (max-width: 860px) {
  .card-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ---- KPI stat tiles (Kinetic stat cards) ---- */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 16px;
  margin: 0 0 16px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--line-10);
  border-radius: 14px;
  padding: 20px;
  margin: 0;
}

.stat-tile dt {
  color: var(--ink3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  white-space: nowrap;
}

.stat-tile dd {
  margin: 0;
}

.stat-value {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-value--accent {
  color: var(--accent);
}

.stat-unit {
  font-size: 15px;
  color: var(--ink2);
  font-weight: 400;
  font-family: var(--font-body);
}

.stat-secondary {
  display: block;
  color: var(--ink3);
  font-size: 13px;
}

/* ---- Charts (SVG attributes carry the data — no inline styles) ---- */

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line-10);
  border-radius: 14px;
  padding: 20px 20px 14px;
  margin: 0 0 16px;
}

.chart-bar {
  fill: var(--accent);
}

/* The main volume chart carries its own gradient defs. */
svg.chart .chart-bar {
  fill: url(#volume-bar-grad);
}

/* Vertical day bars use the accent gradient (Kinetic bar charts). */
.bar-grad-start { stop-color: var(--accent); }
.bar-grad-end { stop-color: var(--accent); stop-opacity: 0.35; }

.day-chart__bar { fill: url(#traffic-bar-grad); }

.chart-grid {
  stroke: var(--line-8);
  stroke-width: 1;
}

.chart-baseline {
  stroke: var(--line-18);
  stroke-width: 1;
}

.chart-tick {
  fill: var(--ink3);
  font-size: 11px;
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}

/* Horizontal share bars: semantic <progress>, styled as the Kinetic pill
   track (8px, accent fill) — widths come from value/max, never styles. */
progress.meter {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  display: block;
  width: 100%;
  height: 8px;
  background: var(--line-8);
  border-radius: 999px;
  overflow: hidden;
}

progress.meter::-webkit-progress-bar {
  background: var(--line-8);
  border-radius: 999px;
}

progress.meter::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}

progress.meter::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

progress.meter--lg {
  height: 10px;
}

.meter-cell {
  min-width: 8rem;
}

/* Label · bar · count rows (by chain, accounts by plan). */
.share-rows {
  display: grid;
  gap: 10px;
}

.share-row {
  display: grid;
  grid-template-columns: minmax(7rem, 160px) 1fr minmax(4rem, 90px);
  align-items: center;
  gap: 14px;
}

.share-row__name {
  font-size: 14px;
  color: var(--ink2);
}

.share-row__count {
  font-size: 13px;
  color: var(--ink3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Progress + big figure (founding reservations). */
.progress-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-line__figure {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- Tables ---- */

th,
td {
  padding: 12px 14px 12px 0;
  text-align: left;
  font-size: 14px;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

thead th {
  border-bottom: 1px solid var(--line-10);
  color: var(--ink3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

tbody td {
  border-bottom: 1px solid var(--line-8);
}

tbody tr:last-child td {
  border-bottom: none;
}

tfoot th,
tfoot td {
  border-top: 1px solid var(--line-10);
  font-weight: 700;
}

td.numeric,
th.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.k-card--table { overflow-x: auto; }

.k-card--table table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

/* ---- Chips ---- */

.chip {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.chip--accent {
  color: var(--accent);
  background: var(--accent-14);
  border-color: var(--accent-35);
}

.chip--ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}

.chip--warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border-color: color-mix(in srgb, var(--warn) 35%, transparent);
}

.chip--err {
  color: var(--err);
  background: color-mix(in srgb, var(--err) 12%, transparent);
  border-color: color-mix(in srgb, var(--err) 35%, transparent);
}

.chip--muted {
  color: var(--ink3);
  background: var(--line-4);
  border-color: var(--line-18);
}

.cell-muted { color: var(--ink2); }
.cell-dim { color: var(--ink3); font-size: 13px; }
.cell-ok { color: var(--ok); font-weight: 600; }
.cell-err { color: var(--err); font-weight: 600; }

.cell-truncate {
  max-width: 26rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Filters ---- */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar input[type="search"] {
  min-width: 18rem;
}

/* Segmented pill control for time windows / periods. */
body:not(.landing) .window-selector {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--line-10);
  border-radius: 999px;
  padding: 0.25rem;
  margin: 0 0 16px;
}

body:not(.landing) .window-selector a {
  color: var(--ink2);
  text-decoration: none;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: color 150ms ease-out, background 150ms ease-out;
}

body:not(.landing) .window-selector a:hover {
  color: var(--ink);
}

body:not(.landing) .window-selector a[aria-current="page"] {
  background: var(--accent-14);
  color: var(--accent);
  font-weight: 600;
}

.breakdowns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 16px;
}

.breakdowns > .k-card { margin-bottom: 0; }

/* ---- Onboarding checklist (dashboard first-run) ---- */

.onboarding {
  background: var(--surface);
  border: 1px solid var(--line-10);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

body:not(.landing) .onboarding h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  margin: 0 0 14px;
}

.onboarding__steps {
  margin: 0 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 15px;
}

.onboarding__steps li::marker {
  color: var(--accent);
  font-weight: 700;
}

.onboarding__step--done {
  color: var(--ink3);
}

.onboarding__step--done::marker {
  color: var(--ok);
}

/* ---- Code blocks ---- */

.onboarding__curl,
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--line-10);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.4rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
}

.onboarding__curl code,
.code-block code {
  background: none;
  color: var(--code-ink);
  padding: 0;
}

/* One-time token reveal (API keys): code + copy button. */
.token-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.token-row code {
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid var(--line-10);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* ---- Billing plan blocks ---- */

.plan-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  margin: 0 0 4px;
}

.plan-desc {
  color: var(--ink2);
  font-size: 14px;
  margin: 0 0 16px;
}

.plan-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-8);
  flex-wrap: wrap;
}

.plan-option:last-of-type {
  border-bottom: none;
}

body:not(.landing) .plan-option h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  margin: 0;
}

.plan-option p {
  margin: 2px 0 0;
  color: var(--ink2);
  font-size: 13px;
  flex-basis: 100%;
}

/* ---- Kinetic polish round (2026-07-18 feedback) ---- */

/* The orbit logo animates and carries the accent everywhere, not only on
   the landing (keyframes are global, defined in landing.css). */
.fy-logo { color: var(--accent); }
.fy-logo__outer { animation: fy-spin 14s linear infinite; transform-origin: 22px 22px; }
.fy-logo__inner { animation: fy-spin-rev 9s linear infinite; transform-origin: 22px 22px; }

@media (prefers-reduced-motion: reduce) {
  .fy-logo__outer, .fy-logo__inner { animation: none; }
}

/* Light seam: the sidebar Upgrade CTA rests greyish (design-system --band)
   and turns ultraviolet on hover. Dark seam keeps the filled accent. */
body.fy-light:not(.landing) .plan-card__cta {
  background: var(--band);
  color: var(--ink);
}

body.fy-light:not(.landing) .plan-card__cta:hover {
  background: var(--accent);
  color: var(--on-accent);
}

/* Profile menu polish: calm trigger transition + focus ring, panel items
   as proper rows with hover states (prototype behavior: opens on hover,
   which .profile-menu:hover / :focus-within already provides). */
body:not(.landing) button.profile-menu__trigger {
  cursor: pointer;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

body:not(.landing) button.profile-menu__trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-menu__email {
  border-bottom: 1px solid var(--line-8);
  padding-bottom: 0.75rem;
}

.profile-menu__panel p { margin: 0.15rem 0; }

body:not(.landing) .profile-menu__panel a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--ink2);
  text-decoration: none;
  font-size: 14px;
}

body:not(.landing) .profile-menu__panel a:hover {
  color: var(--accent);
  background: var(--line-4);
}

.profile-menu__panel form { margin-top: 0.5rem; }

/* ---- Reliability incident cards (admin) ---- */

.incident-list { margin-bottom: 16px; }

body:not(.landing) .incident-list__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  margin: 0 0 10px;
}

.incident-list > .k-card { margin-bottom: 10px; }

.incident__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

body:not(.landing) .incident__head h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.incident__time {
  margin-left: auto;
  color: var(--ink3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.incident__summary {
  margin: 8px 0 0;
  color: var(--ink2);
  font-size: 14px;
}

.incident__reason { color: var(--ink); }

/* ADR-009 pre-live supply disclosure (billing side). */
.supply-disclosure {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  background: color-mix(in srgb, var(--warn) 8%, transparent);
  border-radius: 12px;
  color: var(--ink2);
  font-size: 13.5px;
}
