/* Broadcastr portal: shared styles. Mobile-first, zero dependencies.
   Contrast pairs verified >= 4.5:1 (WCAG AA): ink #1B2733 on paper #FFFFFF,
   muted #4C6B7A on paper, signal #B34700 on paper (buttons use white text). */

:root {
  --brand-ink: #1F4C5F;
  --brand-accent: #DA7B46;
  --brand-paper: #F6FAFA;
  --ink: var(--brand-ink);
  --muted: #4C6B7A;
  --paper: var(--brand-paper);
  --card: #FFFFFF;
  --line: #D7E4E4;
  --rule: #E3ECEC;
  --wire: #2F7A9D;
  --tint: #EEF5FB;
  --border: #E3ECEC;
  --signal: #9E5424;
  --ok: #1A6B3C;
  --warn-bg: #FFF3CD;
  --warn-ink: #5C4400;
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 14px 96px; /* bottom padding keeps thumb zone clear */
}

h1 { font-size: 1.35rem; margin: 0.6em 0 0.4em; }
h2 { font-size: 1.05rem; margin: 1em 0 0.4em; }

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

.muted { color: var(--muted); }

/* ---- forms and buttons: Fitts floor is global ---- */
input, select, textarea {
  font: inherit;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  margin: 6px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
}

label { display: block; font-weight: 600; margin-top: 8px; }

button, .btn {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 48px;
  padding: 10px 18px;
  margin: 6px 6px 6px 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
}

button.secondary { background: var(--paper); color: var(--ink);
                   border-color: var(--line); }
button.danger   { background: var(--paper); color: var(--signal);
                  border-color: var(--signal); }
button.ok       { background: var(--ok); }
button[disabled]{ opacity: 0.55; cursor: wait; }

button:focus-visible, a:focus-visible, input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

/* ---- form actions sit WITH their form (owner 2026-10-07) ----------------
   Was position:fixed; bottom:0; justify-content:flex-end. The owner could not
   find Run: pinned to the far right it sat beside the floating Support
   launcher and away from the fields it submits. The primary action of each
   form now renders in flow directly under its own fields, left aligned. ---- */
.actionbar {
  position: static;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 0 2px;
  background: transparent;
  border-top: 1px solid var(--line);
}
.actionbar button { min-width: 120px; }

/* ---- states: loading, error, empty, toast ---- */
.skeleton {
  border-radius: var(--radius);
  height: 84px;
  margin: 10px 0;
  background: linear-gradient(100deg, #EDF1F4 40%, #F7FAFC 50%, #EDF1F4 60%);
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.error-box, .empty-box {
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  margin: 14px 0;
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 88px;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 4px 14px rgba(27, 39, 51, 0.25);
}
.toast.err { background: var(--signal); }

.banner-stale {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 10px 0;
}

/* ---- approve wall cards ---- */
.post-card { display: flex; flex-direction: column; gap: 6px; }
.post-head { display: flex; align-items: center; gap: 8px; }
.chan { font-weight: 700; text-transform: capitalize; }
.when { color: var(--muted); font-size: 0.9rem; }
.post-card blockquote {
  margin: 4px 0;
  padding: 0;
  font-size: 0.98rem;
}
.post-card a { color: var(--signal); word-break: break-all; }
.pager { display: flex; justify-content: space-between; margin-top: 12px; }

/* ---- walkthrough wizard ---- */
.step[hidden] { display: none; }
.progressbar {
  height: 10px; border-radius: 999px; background: var(--line);
  overflow: hidden; margin: 12px 0 18px;
}
.progressbar > div {
  height: 100%; background: var(--ok); width: 0%;
  transition: width 240ms ease;
}
.color-row { display: flex; gap: 12px; align-items: center; }
.color-row input[type="color"] { min-height: 48px; min-width: 64px; }

/* ---- dashboard ---- */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.stage {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; min-height: 56px; cursor: pointer; text-align: left;
  background: var(--paper); width: 100%; color: var(--ink);
}
.stage .num { font-size: 1.15rem; font-weight: 700; }
.trend-up::after { content: " up"; color: var(--ok); font-size: 0.85rem; }
.trend-down::after { content: " down"; color: var(--signal); font-size: 0.85rem; }
.trend-flat::after { content: " flat"; color: var(--muted); font-size: 0.85rem; }

.spark { display: block; }

table.dim { width: 100%; border-collapse: collapse; }
table.dim td, table.dim th {
  text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line);
}
table.dim td:last-child, table.dim th:last-child { text-align: right; }

.combo-list { list-style: none; margin: 0; padding: 0; }
.combo-list li {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px;
}

.dial-wrap { display: flex; align-items: center; gap: 16px; }
.dial-num { font-size: 2rem; font-weight: 800; }

@media (min-width: 700px) {
  main { max-width: 900px; padding-top: 24px; }
  .funnel { display: grid; grid-template-columns: repeat(3, 1fr); }
  /* desktop expands the mobile layout; the action bar stays inline with its form */
  .actionbar { position: static; border-top: 0; padding-top: 10px;
    justify-content: flex-start; }
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.home-stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.home-stat b { display: block; font-size: 1.4rem; }
.home-stat span { font-size: 0.8rem; color: var(--muted); }
.chan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.source-row { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- shared page hierarchy ---- */
.page-header { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.page-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.eyebrow { margin: 0 0 3px; color: var(--signal, #9E5424); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lede { margin: 0 0 16px; color: var(--muted); max-width: 62ch; }
.setup-note { margin: 14px 0; padding: 12px 14px; border-left: 4px solid var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 10%, var(--paper)); border-radius: 0 var(--radius) var(--radius) 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin-top: 0; }
.status-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 9px; border-radius: 999px; background: #E8EDF1; color: var(--muted); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status-pill.good { background: #E4F3EA; color: #1A6B3C; }
.status-pill.bad { background: #FBE7E1; color: #8B2C1F; }
.account-list, .source-list { list-style: none; padding: 0; margin: 10px 0 0; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.account-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.account-copy strong { overflow-wrap: anywhere; }
.compact { min-height: 40px; padding: 7px 13px; margin: 0; }
.saved-source { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.source-kind { color: var(--signal, #9E5424); font-size: .75rem; font-weight: 800; letter-spacing: .06em; }
.source-value { color: var(--ink); }
.field-status { min-height: 1.45em; margin: 5px 0 0; color: var(--muted); }
.error-text { color: #8B2C1F; font-weight: 600; }
.color-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.color-grid label { margin: 0; }
.color-grid input[type="color"] { display: block; width: 100%; min-height: 52px; padding: 3px; margin-top: 7px; }

/* ---- complete approval cards ---- */
.post-card { gap: 12px; border-top: 4px solid var(--brand-accent); }
.post-head { align-items: flex-start; justify-content: space-between; }
.post-identity { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post-network { color: var(--signal, #9E5424); font-weight: 800; letter-spacing: .03em; }
.post-profile { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.post-schedule { color: var(--muted); font-size: .9rem; text-align: right; }
.post-label { margin: 3px 0 4px; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.post-body, .post-reply { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-body { font-size: 1.02rem; }
.post-body.empty { color: var(--muted); font-style: italic; }
.post-replies { padding: 10px 12px; border-left: 3px solid var(--line); background: color-mix(in srgb, var(--brand-ink) 5%, var(--paper)); }
.post-reply + .post-reply { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.post-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.post-media img, .post-media video { width: 100%; max-height: 640px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #111; }
.media-empty { color: var(--muted); font-style: italic; }
.post-link-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; }
.post-link-row a { overflow-wrap: anywhere; }
.draft-preview { border-top: 1px solid var(--line); padding-top: 9px; }
.draft-preview summary { cursor: pointer; color: var(--signal, #9E5424); font-weight: 800; }
.preview-note { color: var(--muted); font-size: .9rem; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.post-actions button { flex: 1 1 130px; margin: 0; }

@media (max-width: 620px) {
  .page-header { flex-direction: column; }
  .page-nav { justify-content: flex-start; }
  .post-head { flex-direction: column; }
  .post-schedule { text-align: left; }
  .color-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .home-grid { grid-template-columns: 1fr 1fr; }
}
/* ---------- Calendar strip + progress card styles (v20260902c) ----------
   Append to css/style.css. Uses the existing design tokens only. */

.progress-card { margin-top: 0.75rem; }
.progress-track {
  height: 10px;
  border-radius: 6px;
  background: var(--border, #e3ecec);
  overflow: hidden;
}
.progress-track > div {
  height: 100%;
  border-radius: 6px;
  transition: width 400ms ease;
  background: var(--accent, #3e9cc9);
}
.progress-track > div.done { background: #2e9e5b; }
.progress-track > div.failed { background: #c0392b; }

.cal-strip {
  display: flex;
  gap: 6px;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.cal-cell {
  flex: 1 1 0;
  min-width: 44px;
  min-height: 44px;           /* Fitts: touch-friendly */
  border: 1px solid var(--border, #e3ecec);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
}
/* DARK-MODE FIX 2026-10-13 (owner-confirmed): the day numbers used
   var(--muted-foreground, #5b6b7b) -- a phantom token, so they always
   painted #5b6b7b (about 2.9:1 on the dark card). --muted flips with the
   theme and holds AA on the card surface in both themes. */
.cal-cell .cal-day { font-size: 0.72em; color: var(--muted, #4C6B7A); }
.cal-cell b { font-size: 1.05em; }
.cal-cell.hot { border-color: #d9822b; background: rgba(218, 123, 70, 0.08); }

.cal-week { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.cal-day-block h2 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.cal-card .cal-snippet { white-space: pre-wrap; }

@media (max-width: 640px) {
  .cal-cell { min-width: 40px; min-height: 48px; }  /* thumb zone */
}

/* ---- login page: single-column, centered, glass panel over photo bg ---- */
body.login-page {
  background-color: var(--brand-ink); /* fallback while image loads */
  background-image:
    linear-gradient(rgba(31, 76, 95, 0.45), rgba(31, 76, 95, 0.45)),
    url("https://members.bestbusinesscoach.ca/wp-content/uploads/2026/09/Client-portal-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body.login-page main {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;          /* full-viewport centering (both axes) */
  min-height: 100svh;         /* mobile browser chrome safe */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: 100%;
}
/* Desktop override (>=700px) must NOT widen the login column. */
@media (min-width: 700px) {
  body.login-page main {
    max-width: 440px;
    padding-top: 24px;
  }
}
.auth-wrap {
  width: 100%;
  text-align: center;
}
/* Glassmorphism panel: translucent + blur + soft border/shadow. Text stays
   readable over the photo thanks to the dark veil + frosted surface. */
.auth-card.glass {
  background: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 18px 50px rgba(15, 42, 54, 0.45);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: left;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  color: #fff;
}
/* Heading + copy live INSIDE the card now. */
.auth-card.glass h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  color: #fff;
}
.auth-card.glass .auth-helper {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}
.auth-card.glass label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.92);
}
/* Translucent input fields on glass, white text. */
.auth-card.glass input {
  margin: 0 0 14px;
  width: 100%;
  /* measured: .18 input surface over the veil gave 4.18:1 for the typed email
     (first screen every buyer types into). .28 restores >=5.4:1. */
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
}
.auth-card.glass input::placeholder { color: rgba(255, 255, 255, 0.6); }
.auth-card.glass input:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}
/* Primary button: brand accent surface, brand INK label. White on the accent
   (#DA7B46) paints at 2.93:1, under the 4.5:1 WCAG AA floor for normal text
   and it was the one real contrast failure axe flagged on the first page every
   buyer touches. The accent itself is kept exactly; the label moves to the
   brand ink (#1F4C5F), which clears the floor at 4.75:1. */
.auth-card.glass .auth-primary {
  width: 100%;
  margin: 0;
  justify-content: center;
  /* WCAG, measured live both themes 2026-11-11: brand-ink on the raw accent
     computes 3.06:1 once the accent sits on the dark glass/veil (the earlier
     note measured the accent in isolation, not the composited surface). White
     on a darkened brand hue measures 4.77:1 on the button and >=6.2:1 where
     the veil shows through. The brand still owns the button; the shade moves. */
  background: #B35A24;
  color: #fff;
  border: 0;
}
.auth-card.glass .auth-primary:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}
.auth-reassure {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  line-height: 1.5;
}
body.login-page .error-box {
  margin: 14px auto 0;
  max-width: 400px;
  background: rgba(31, 76, 95, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
/* The in-card link had NO colour of its own, so it painted in the browser's
   default link blue (#0000EE) over the dark navy photo veil: measured 1.48:1,
   the lowest contrast anywhere on the buyer surface and a real axe failure.
   Give it an explicit brand colour. Paper on ink is 13.09:1. */
.auth-card a { color: var(--brand-paper, #F6FAFA); text-decoration: underline; }
.auth-card a:hover { color: #fff; }

/* ---- ready page: branded waiting experience ---- */
body.ready-page {
  background-color: var(--brand-ink);
  background-image:
    linear-gradient(rgba(31, 76, 95, 0.55), rgba(31, 76, 95, 0.55)),
    url("https://members.bestbusinesscoach.ca/wp-content/uploads/2026/09/Client-portal-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body.ready-page main {
  max-width: 520px;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: 100%;
}
.ready-panel {
  background: rgba(255, 255, 255, 0.13);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 18px 50px rgba(15, 42, 54, 0.45);
  border-radius: 18px;
  padding: 34px 30px;
  text-align: center;
  width: 100%;
  color: #fff;
}
.ready-logo {
  width: 132px;
  height: auto;
  display: block;
  margin: 0 auto 18px;
  border-radius: 8px;
}
.ready-head {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: #fff;
}
.ready-sub {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.98rem;
  line-height: 1.5;
}
.ready-when {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 14px 12px;
  margin: 0 0 16px;
}
.ready-when-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 4px;
}
.ready-when-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.ready-note {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  line-height: 1.5;
}
.ready-value {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.5;
}
.ready-meeting {
  display: inline-block;
  margin: 0 0 14px;
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}
.ready-cta {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  background: #2F7A9D;              /* solid blue: clear against glass */
  color: #fff;
  border: 0;
  margin: 4px 0 0;
  transition: background-color 160ms ease, transform 160ms ease,
              box-shadow 160ms ease;
}
.ready-cta:hover {
  background: #155BB5;              /* darker blue */
  transform: translateY(-1px);      /* slight lift */
  box-shadow: 0 8px 22px rgba(15, 42, 54, 0.4);
}
.ready-cta:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}
.ready-failopen {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}
/* Live countdown to the call start */
.ready-countdown {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 16px;
}
.ready-count-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums; /* digits don't jitter each second */
  letter-spacing: 0.02em;
}
.ready-panel .card { margin: 0; }

/* v20260903g additions: pagenav, chan-chips, family variants, bulk bar,
   net-card analytics, stat buttons. Appended to style.css. */

.pagenav { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; }
.pagenav a { padding: 6px 12px; border: 1px solid var(--border, #E3ECEC);
  border-radius: 8px; text-decoration: none; color: inherit; }
.pagenav a[aria-current="page"] { font-weight: 700;
  border-color: var(--accent, #DA7B46); }

.chan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chan-chip { display: inline-block; padding: 2px 10px; font-size: 0.8em;
  border-radius: 999px; background: var(--card, #fff);
  border: 1px solid var(--border, #E3ECEC); }

.family-variants { margin: 10px 0; }
/* brand wire (#3E9CC9) as a small-text colour on paper measures 3.19:1, under
   the 4.5 floor. Nearest compliant variant in the same blue family is the
   deeper #2F7A9D already used by the ready CTA, at 4.62:1. */
.family-variants summary { cursor: pointer; color: #2F7A9D; }
.variants-pane { padding: 8px 4px; }
.cut-row { display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-top: 1px solid var(--border, #E3ECEC); }
.cut-row .cut-chan { min-width: 120px; font-weight: 600; }
.cut-row .cut-body { flex: 1; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--muted, #556); }

.post-actions { display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; padding-bottom: 8px; }
.pick-family { width: 20px; height: 20px; }

.bulk-bar { position: sticky; bottom: 0; display: flex; gap: 10px;
  align-items: center; flex-wrap: wrap; padding: 12px;
  background: var(--card, #fff); border: 1px solid var(--border, #E3ECEC);
  border-radius: 10px; margin: 10px 0 90px; }

.net-card { border: 1px solid var(--border, #E3ECEC); border-radius: 8px;
  padding: 8px 12px; margin: 6px 0; }
.net-card summary { cursor: pointer; font-weight: 600; }

.stat-btn { margin-top: 6px; font-size: 0.85em; padding: 4px 10px; }

@media (max-width: 480px) {
  .cut-row { flex-wrap: wrap; }
  .bulk-bar { margin-bottom: 120px; }
  .post-actions button { flex: 1 1 auto; min-height: 44px; }
}

/* P2a calendar chips + expired archive */
.cal-chips { font-size: 0.82rem; margin: -0.25rem 0 0.5rem; }
.archive-section summary { cursor: pointer; color: var(--muted); }
.expired-card { opacity: 0.65; }
.foundation-sec { margin: 0.35rem 0; }
.foundation-line { margin: 0.15rem 0; font-size: 0.92rem; }

/* P1-B3: hint text belongs to the field above it (owner feedback 9/6) */
.field-hint { display: block; font-size: 0.78rem; margin: 0.25rem 0 0.75rem; }

/* ---- last-batch highlighting (2026-09-06; the redundant strip was removed
   2026-10-07, the NEW badge on the card remains) ---- */
.new-chip { display:inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--accent, #2563eb); color: #fff; font-size: 12px;
  font-weight: 600; letter-spacing: .02em; }
.new-batch-card { outline: 2px solid var(--accent, #2563eb); outline-offset: -2px; }

/* ---- last-batch details panel (2026-09-06, Run clips page) ---- */
.batch-details-card { margin: 10px 0 6px; padding: 0; }
.batch-details-card summary { cursor: pointer; font-weight: 600; padding: 10px 14px; }
.batch-details-pane { padding: 4px 14px 12px; }
.batch-detail-row { padding: 6px 0; border-top: 1px solid var(--border, #e5e7eb); font-size: 14px; }
.batch-detail-row:first-of-type { border-top: 0; }
.batch-detail-row a { margin-left: 8px; }

/* ---- Phase 1 multi-CTA editor (2026-09-06) ---- */
.cta-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cta-row .cta-label { flex: 1 1 38%; min-width: 0; }
.cta-row .cta-url { flex: 1 1 62%; min-width: 0; }
.cta-row .compact { flex: 0 0 auto; }
#cta-add { margin-top: 4px; }

/* ---- Heartbeat schedule page (2026-09-07 UX pass) ----
   Root fix for the reported misalignment: the global `input { width:100%;
   min-height:48px }` form rule stretches bare checkboxes into full-width
   slabs. Everything here sizes checkboxes explicitly and chunks the card:
   master toggle -> day chips -> field grid -> footer (Save + status). */
.hb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.hb-head h2 { margin: 0; }
.hb-form { display: block; }
.hb-master {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; margin-top: 6px; cursor: pointer; font-weight: 600;
}
.hb-master input[type="checkbox"] {
  width: 22px; height: 22px; min-height: 0; flex: 0 0 auto; margin: 0;
  accent-color: var(--signal); cursor: pointer;
}
.hb-master-text { flex: 1 1 auto; }
.hb-days { border: 0; padding: 0; margin: 12px 0 0; min-inline-size: 0; }
.hb-days legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.day-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.day-chip {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0; font-weight: 600;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 14px; min-height: 44px; cursor: pointer;
  background: var(--paper); user-select: none;
}
.day-chip input[type="checkbox"] {
  width: 18px; height: 18px; min-height: 0; margin: 0;
  accent-color: var(--signal); cursor: pointer;
}
.day-chip:has(input:checked) { border-color: var(--signal); background: color-mix(in srgb, var(--signal) 8%, var(--paper)); }
.hb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 14px; }
.hb-grid .hb-field label { margin-top: 0; }
.hb-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.hb-footer #hb-save { min-width: 160px; }
@media (max-width: 480px) {
  .hb-grid { grid-template-columns: 1fr; }
  .day-chip { padding: 9px 12px; }
}


/* ---- Calendar dual view (2026-09-07): toolbar, grid, details filters ---- */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 12px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { min-height: 40px; min-width: 44px; padding: 6px 12px; margin: 0; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 600; }
.seg button.active { background: var(--ink); color: var(--paper); }
.seg button:focus-visible { outline: 3px solid var(--signal); outline-offset: 1px; }
.cal-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; }
/* F3/F4 2026-09-09: clip modal + row-open affordance. */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 16px; overflow-y: auto;
}
.modal {
  background: var(--paper, #fff); color: inherit;
  border: 1px solid var(--line, #e3ecec);
  border-radius: 10px; max-width: 680px; width: 100%;
  box-shadow: 0 18px 50px rgba(2, 12, 27, 0.35);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line, #e3ecec);
}
/* DARK-MODE FIX 2026-10-13 (owner-reported: Close invisible in dark). The
   2026-10-07 fix hardcoded the fill (#fff) while the label followed the
   --ink token; when --ink flipped light in dark mode the label became light
   text on a white fill (1.1:1, invisible). Both now follow THEME tokens so
   they flip together. Measured: ink on paper both themes holds WCAG AA - the
   suite computes the real ratios (test_review_close_control_*). */
.modal-close { border: 1px solid var(--muted, #4C6B7A); background: var(--paper, #fff);
  color: var(--ink, #1F4C5F); border-radius: 6px; padding: 6px 12px;
  cursor: pointer; font-weight: 600; }
.modal-close:hover { background: var(--tint, #EEF5FB); }
.modal-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 16px 0; border-bottom: 1px solid var(--line, #e3ecec);
}
/* DARK-MODE FIX 2026-10-13: the labels used --foreground / --muted-foreground,
   tokens the app never defines, so they always painted the dark fallbacks
   (#111 / #555) and in dark mode sat dark-on-dark on the card. The real
   tokens --ink / --muted flip with the theme and hold AA in both. */
.modal-tabs .tab-btn {
  border: 1px solid var(--line, #e3ecec); border-bottom: 0;
  background: var(--paper, #fff); border-radius: 6px 6px 0 0;
  padding: 6px 12px; cursor: pointer; font: inherit;
  color: var(--muted, #4C6B7A);
}
.modal-tabs .tab-btn.active {
  color: var(--ink, #1F4C5F); font-weight: 600;
  background: var(--card, #fff);
  box-shadow: inset 0 -2px 0 var(--brand-accent, #3e9cc9);
}
.modal-body { padding: 14px 16px; max-height: 60vh; overflow-y: auto; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 12px 16px; border-top: 1px solid var(--line, #e3ecec);
}
.modal-cut-actions { display: flex; gap: 10px; margin-top: 12px; }
button.row-open {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: block;
}
button.row-open:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .modal-backdrop { padding: 2vh 8px; }
  .modal-foot { flex-direction: column; }
  .modal-foot .ok, .modal-foot .danger { width: 100%; }
}

table.cal-grid, table.cal-month { border-collapse: collapse; width: 100%; min-width: 640px; table-layout: fixed; }
table.cal-month { min-width: 320px; }
.cal-grid th, .cal-grid td, .cal-month th, .cal-month td { border: 1px solid var(--line); vertical-align: top; }
.cal-grid th.cal-hour-head, .cal-month th { background: var(--paper); font-size: .72rem; color: var(--muted); padding: 4px 6px; text-align: left; width: 64px; }
.cal-month th { width: auto; text-align: center; }
.cal-grid td { height: 34px; padding: 2px; }
.cal-month td { height: 64px; padding: 3px; }
.cal-grid .is-today, .cal-month .is-today { background: color-mix(in srgb, var(--brand-accent) 7%, var(--paper)); }
.cal-month .cal-out { background: color-mix(in srgb, var(--line) 35%, var(--paper)); }
.cal-daynum { font-size: .72rem; color: var(--muted); display: block; }
.cal-item { display: block; width: 100%; min-height: 0; height: auto; padding: 3px 6px; margin: 2px 0; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: .74rem; line-height: 1.25; text-align: left; cursor: pointer; }
.cal-item:hover { border-color: var(--signal); }
.cal-item.is-scheduled { border-left: 3px solid var(--ok); }
.cal-item.is-draft { border-left: 3px solid #B8860B; }
.cal-item.is-published { border-left: 3px solid var(--brand-accent); opacity: .8; }
.cal-item.is-other { border-left: 3px solid var(--line); }
.cal-count { display: block; width: 100%; min-height: 0; margin-top: 3px; padding: 2px 4px; border: 0; border-radius: 6px; font: inherit; font-size: .7rem; font-weight: 700; cursor: pointer; }
.cal-count.is-scheduled { background: #E4F3EA; color: #1A6B3C; }
.cal-count.is-draft { background: #FFF3CD; color: #5C4400; }
.cal-count.is-published { background: #E8EDF1; color: var(--muted); }
.cal-item:focus-visible, .cal-count:focus-visible { outline: 3px solid var(--signal); outline-offset: 1px; }
.status-pill.is-scheduled { background: #E4F3EA; color: #1A6B3C; }
.status-pill.is-draft { background: #FFF3CD; color: #5C4400; }
.status-pill.is-published { background: #E8EDF1; color: var(--muted); }
@media (max-width: 480px) {
  .seg { width: 100%; justify-content: flex-start; overflow-x: auto; }
}

/* F3b 2026-09-10: modal media responsiveness (owner report: clip too big
   inside popup, had to scroll around; fullscreen stays). */

/* Media always fits the modal: never wider than the dialog, never taller
   than the viewport band reserved for the body. Videos keep native
   fullscreen + controls (owner endorses). */
.modal-body .media-item {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 52vh;
  object-fit: contain;
  margin: 8px auto;
  border: 1px solid var(--line, #e3ecec);
  border-radius: 6px;
  background: #111;
}
.modal-body .media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.modal-body .media-grid .media-item { margin: 0; max-height: 40vh; }

/* Mobile: the modal becomes a full-viewport sheet. Tabs pinned at top
   (horizontally scrollable), foot pinned at bottom, body is the ONLY
   scroll region. No backdrop peeking, no double scrollbars. */
@media (max-width: 640px) {
  .modal-backdrop { padding: 0; align-items: stretch; }
  .modal {
    max-width: none; width: 100%; height: 100%;
    border: 0; border-radius: 0;
    display: flex; flex-direction: column;
  }
  .modal-head { flex: 0 0 auto; }
  .modal-tabs {
    flex: 0 0 auto; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    position: sticky; top: 0; background: var(--paper, #fff); z-index: 2;
  }
  .modal-tabs::-webkit-scrollbar { display: none; }
  .modal-tabs .tab-btn { flex: 0 0 auto; }
  .modal-body {
    flex: 1 1 auto; max-height: none; min-height: 0;
    -webkit-overflow-scrolling: touch;
  }
  .modal-foot { flex: 0 0 auto; flex-direction: column; }
  .modal-foot .ok, .modal-foot .danger, .modal-foot button { width: 100%; }
}

/* ---- posts-per-channel summary (2026-09-10) ---- */
#cal-network-summary { margin-top: 6px; }
.cal-net-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cal-net-row:last-of-type { border-bottom: 0; }
.cal-net-name { font-weight: 700; min-width: 96px; }
.cal-net-states { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cal-net-chip { font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.cal-net-chip.is-scheduled { background: #E4F3EA; color: #1A6B3C; }
.cal-net-chip.is-draft { background: #FFF3CD; color: #5C4400; }
.cal-net-chip.is-published { background: #E8EDF1; color: var(--muted); }
@media (max-width: 480px) {
  .cal-net-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cal-net-states { justify-content: flex-start; }
}

/* F3b-fix2 2026-09-10: first-comment line wraps instead of forcing the modal
   body wide (found by S13: cut-comment scrollWidth 875 > body 678). */
.cut-comment {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.modal-body, .modal-body td, .modal-body th { min-width: 0; }

/* ---- podcast console stages (2026-09-29) ---- */
.pk-run-stages, ol.run-stages {
  list-style: none; padding: 0; margin: 8px 0 12px 0;
  display: flex; flex-direction: column; gap: 4px;
}
.pk-stage {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--line, #ccc); margin-right: 8px; flex: none;
}
.pk-stage.done { background: var(--ok, #2e7d32); }
.pk-stage.live { background: var(--signal, #b3402a); animation: pkpulse 1.2s infinite; }
.pk-stage.todo { background: var(--line, #ccc); }
@keyframes pkpulse { 50% { opacity: 0.35; } }
ol.run-stages li.current { font-weight: 700; }
.run-banner {
  border: 1px solid var(--line, #ccc); border-radius: var(--radius, 6px);
  padding: 10px 12px; margin: 10px 0;
}
.run-banner.skip { border-color: var(--ok, #2e7d32); }
.run-banner.reject { border-color: var(--signal, #b3402a); }
.run-banner.fail { border-color: var(--signal, #b3402a); }

/* ---- episode thumbnail designer (2026-09-29) ---- */
.designer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; }
@media (max-width: 900px) { .designer-grid { grid-template-columns: 1fr; } }
.canvas-stage {
  position: relative; width: 100%; max-width: 640px; aspect-ratio: 1 / 1;
  background: repeating-conic-gradient(#eee 0% 25%, #f7f7f7 0% 50%) 0 0 / 24px 24px;
  border: 1px solid var(--line, #ccc); border-radius: var(--radius, 6px);
  container-type: inline-size; overflow: hidden;
}
.layer-box {
  position: absolute; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center; padding: 2%;
}
.layer-box.selected { outline: 2px dashed #DA7B46; outline-offset: 1px; }
.layer-box.missing {
  background-image: repeating-linear-gradient(45deg, #bbb 0 12px, #999 12px 24px);
}
.layer-box span {
  font-family: sans-serif; line-height: 1.15; word-break: break-word;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.designer-side h2 { font-size: 1rem; margin: 14px 0 6px; }
#layer-list { list-style: none; padding: 0; margin: 0 0 10px; max-height: 200px; overflow-y: auto; }
#layer-list li {
  padding: 6px 8px; border: 1px solid var(--line, #ccc); border-radius: 4px;
  margin-bottom: 4px; cursor: pointer; font-size: 0.9rem;
}
#layer-list li.current { border-color: #DA7B46; background: rgba(218, 123, 70,0.08); }
#layer-editor .source-row { flex-wrap: wrap; gap: 8px; }
#layer-editor input[type="number"] { width: 80px; }
#layer-editor input[type="color"] { width: 48px; height: 32px; padding: 0; border: none; background: none; }

/* ---- drag/resize + generate (2026-09-30) ---- */
.resize-handle {
  position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px;
  background: #DA7B46; border: 2px solid #fff; border-radius: 50%;
  cursor: nwse-resize; z-index: 5; touch-action: none;
}
.layer-box { touch-action: none; }
#gen-fields { flex-direction: column; align-items: flex-start; gap: 6px; }
#gen-fields input[type="text"] { width: 100%; max-width: 320px; }

/* ==========================================================================
   TOUCH TARGET FLOOR for the public pages that DO NOT load components.css
   (login, ready). The shell-wide block lives at the end of components.css;
   this is the same 44px law for the two shared pieces those pages carry, the
   disclosure <summary> and the policy footer links. Scoped to touch widths so
   the desktop layout is untouched. No em dashes.
   ========================================================================== */
@media (max-width: 859px), (pointer: coarse) {
  summary, .legal-foot-links a { min-height: 44px; }
  .legal-foot-links a { display: inline-flex; align-items: center; }
}
/* a long activation URL must WRAP, never push the page sideways. Measured on
   the sign-in page at 390 wide: 429px of content in a 390px viewport (39px of
   horizontal scroll) because one unbreakable host/path token would not break.
   overflow-wrap is inherited, so one rule on the card covers the anchor. */
.auth-wrap { min-width: 0; }
.auth-card, .auth-card a { overflow-wrap: anywhere; }

/* ==========================================================================
   LIGHT / DARK MODE (operator order 2026-10-11).
   The stamp data-theme="light|dark" on <html> is set by js/theme_boot.js
   BEFORE the stylesheets load, from localStorage("pc.theme") or the viewer's
   prefers-color-scheme, so the correct token set paints at first paint and
   no theme ever flashes. The toggle lives in the shell top bar (every page
   with the shell) and on the Settings page's Appearance card.

   HOW IT WORKS: the token VALUES flip under [data-theme="dark"]; every
   component keeps reading the SAME var(). The tenant brand colors
   (applyTheme in app.js) write --brand-ink/--brand-accent/--brand-paper
   inline on <html>; dark mode overrides --ink/--paper/--card directly, so
   a tenant's brand palette is respected in BOTH themes (accent stays the
   tenant's accent; --ink/--paper just stop chaining through --brand-*
   in dark so text/surfaces stay readable).
   ========================================================================== */
:root[data-theme="dark"] {
  --ink: #E8EEF4;
  --muted: #A3B1BF;
  --paper: #10161D;
  --card: #1A2430;
  --line: #33414F;
  --rule: #2A3644;
  --wire: #95C9E1;
  --tint: #16222E;
  --border: #33414F;
  --signal: #F5926B;
  --ok: #5BC97F;
  --warn-bg: #3A2E14;
  --warn-ink: #E8C46A;
  color-scheme: dark;
}

/* ---- theme-invariant surfaces in dark mode ----
   The mobile rail and the toast are INK-background surfaces: --ink flips
   light in dark mode, so they must stop following it or their white text
   dies. The rail keeps the tenant's brand navy in both themes; the toast
   keeps its own fixed dark chip with light text. */
[data-theme="dark"] .pc-rail { background: var(--brand-ink); }
[data-theme="dark"] .pc-toast, [data-theme="dark"] .toast {
  background: #2A3644; color: #E8EEF4;
}
[data-theme="dark"] .pc-toast.err, [data-theme="dark"] .toast.err {
  background: #8A2A00; color: #FFEDE0;
}

/* ---- hard-coded light surfaces that must flip in dark ---- */
[data-theme="dark"] .skeleton {
  background: linear-gradient(100deg, #1A2430 40%, #232F3D 50%, #1A2430 60%);
  background-size: 200% 100%;
}
[data-theme="dark"] .status-pill { background: #243140; color: #A3B1BF; }
[data-theme="dark"] .status-pill.good { background: #12331F; color: #7BD79A; }
[data-theme="dark"] .status-pill.bad { background: #3A1B14; color: #F0957F; }
[data-theme="dark"] .error-text { color: #F0957F; }
[data-theme="dark"] .banner-stale { background: #3A2E14; color: #E8C46A; border-color: #5C4400; }
[data-theme="dark"] .cal-cell.hot { border-color: #d9822b; background: rgba(218, 123, 70, 0.08); }
[data-theme="dark"] .cal-count.is-scheduled,
[data-theme="dark"] .status-pill.is-scheduled { background: #12331F; color: #7BD79A; }
[data-theme="dark"] .cal-count.is-draft,
[data-theme="dark"] .status-pill.is-draft { background: #3A2E14; color: #E8C46A; }
[data-theme="dark"] .cal-net-chip.is-scheduled { background: #12331F; color: #7BD79A; }
[data-theme="dark"] .cal-net-chip.is-draft { background: #3A2E14; color: #E8C46A; }
[data-theme="dark"] .family-variants summary { color: #95C9E1; }
[data-theme="dark"] .progress-track > div.done { background: #2E9E5B; }
[data-theme="dark"] .progress-track > div.failed { background: #C0392B; }

/* the unverified-session bar (js/unverified.js) paints itself with inline
   styles; in dark mode it keeps its warm paper treatment but reads against
   the dark page, so give it the dark pair (needs !important: inline style) */
[data-theme="dark"] #unverified-bar {
  background: #3A2E14 !important;
  color: #E8C46A !important;
  border-bottom-color: #5C4400 !important;
}
[data-theme="dark"] #unverified-bar button {
  background: #E8C46A !important;
  color: #3A2E14 !important;
  border-color: #E8C46A !important;
}

/* ---- thumbnails/canvas keep their own checkerboard in both themes ---- */

/* ---- the theme toggle in the shell top bar ---- */
.pc-theme-btn {
  min-width: 48px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 8px;
}

/* ---- credential connect form (Bluesky app password, Nostr key) ----
   Two networks have no OAuth screen. Their rows carry a small inline form so
   the buyer pastes the key they already own instead of meeting a dead
   "not available yet" line. */
.connect-cred-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  max-width: 420px;
}
.connect-cred-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.connect-cred-label {
  font-weight: 600;
  font-size: 0.92rem;
}
.connect-cred-hint {
  font-size: 0.82rem;
  line-height: 1.35;
}
.connect-cred-form input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rule, #E2E8ED);
  border-radius: 8px;
  background: var(--paper, #F6F8FA);
  color: var(--ink, #072F47);
  font: inherit;
}
[data-theme="dark"] .connect-cred-form input {
  background: #10222E;
  border-color: #2A4252;
  color: #E8EEF2;
}
.connect-cred-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- plan comparison table (owner feedback 2026-10-18) ----
   Plans are columns, facts are rows. Every number comes from the server's
   ladder, so the table and the metering cannot disagree. */
.compare-card { padding: 0; overflow: hidden; }
.compare-scroll { overflow-x: auto; }
.plan-compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.95rem;
}
.plan-compare th, .plan-compare td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule, #E2E8ED);
}
.plan-compare thead th { background: var(--paper, #F6F8FA); }
.plan-compare tbody th {
  font-weight: 600;
  color: var(--muted-foreground, #5A6B78);
  white-space: nowrap;
}
.compare-corner { font-weight: 600; }
.compare-plan { min-width: 140px; }
.compare-name { display: block; font-weight: 700; font-size: 1.02rem; }
.compare-price { display: block; font-weight: 600; margin-top: 2px; }
.compare-what {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.35;
  margin-top: 6px;
  color: var(--muted-foreground, #5A6B78);
}
.compare-buy td { border-bottom: 0; padding-top: 16px; }
.compare-buy .auth-primary { width: 100%; }
.compare-foot { margin: 0; padding: 14px 16px; font-size: 0.85rem; }
[data-theme="dark"] .plan-compare th,
[data-theme="dark"] .plan-compare td { border-bottom-color: #2A4252; }
[data-theme="dark"] .plan-compare thead th { background: #0E1C26; }

/* ==========================================================================
   LOGIN SURFACE LOCK (2026-11-11, measured live both themes).
   The sign-in page is a designed dark surface (photo veil + frosted card)
   in BOTH themes. Light-theme ink tokens are unreadable on it: the footer
   link computed #9E5424 on #1F4C5F = 1.66:1 and the glass card below 4.5:1.
   These rules pin the surfaces and text this page actually uses.
   ========================================================================== */
body.login-page footer { color: rgba(255, 255, 255, 0.85); }
body.login-page footer a { color: #F8A87E !important; } /* 4.65:1 on #1F4C5F; inline var() on the link is unmatchable otherwise */
body.login-page footer a:hover { color: #FFD9C2; }
body.login-page .auth-card.glass,
body.login-page .auth-card.glass h1 { color: #fff; }
/* check-email is the other veil page (same dark surface, same tokens). */
/* check-email.html carries body.login-page itself; one selector covers both
   veil pages (verified live 2026-11-11). */
body.login-page .auth-card.glass .auth-helper { color: rgba(255, 255, 255, 0.88); }
body.login-page .auth-card.glass label { color: rgba(255, 255, 255, 0.94); }
/* Skip link: keyboard users jump straight to the form. Hidden until focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: #1F4C5F;
  color: #fff;
  border-radius: 0 0 8px 0;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { left: 0; }
