:root {
  --accent: #0025cc;
  --accent-hover: #001a99;
  --bg: #ffffff;
  --fg: #111111;
  --muted: #666666;
  --border: #e5e5e5;
  --surface: #fafafa;
  --danger: #b00020;
  --success: #1f7a3f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.75rem; }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

button, .button {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  display: inline-block;
}

button:hover, .button:hover { background: var(--accent-hover); }
button:disabled, .button:disabled { opacity: 0.6; cursor: not-allowed; }

input, textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  /* R-497 STEP 1B: iOS Safari zooms the page on tap for any input
   * whose computed font-size is < 16px. `font: inherit` SHOULD
   * resolve to 16px via html/body but iOS has been observed to
   * ignore it and use its native 11pt (~14.7px) sizing in form
   * controls. Pin 1rem explicitly so no input (first_name,
   * last_name, email at index.html; email and code at signin.html;
   * the enrolled.html address block; admin.html surfaces) drops
   * below the iOS-zoom threshold. */
  font-size: 1rem;
  background: var(--bg);
  color: var(--fg);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 37, 204, 0.15);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field { margin-bottom: 1rem; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

footer a { color: var(--muted); }

.hero { text-align: center; padding: 1rem 0 1.5rem; }
.hero-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto 1.25rem;
}
.hero-banner {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto 1.25rem;
}
/* R-441: sample-covers content image inside the landing page's
   "What this is" section. Scoped to this one image on purpose --
   the stylesheet has no bare `img { ... }` rule, and adding one
   would style every future image on the site. Minimal shape:
   fit to the section's content width and preserve aspect ratio. */
.sample-covers-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 1rem auto 1.5rem;
}
.hero-sub {
  color: var(--fg);
  font-size: 1.0625rem;
  font-weight: normal;
  max-width: 560px;
  margin: 0.5rem auto 1.5rem;
}
.hero-cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.hero-cta {
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  display: inline-block;
}
.hero-cta:hover { text-decoration: none; }
.hero-cta-row .cta-subtext { margin: 0; }

.copy { margin: 2rem 0; }
.copy h2 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
.copy p { margin: 0.25rem 0 1rem; }

.howitworks {
  margin: 0.5rem 0 1.25rem;
  padding-left: 1.25rem;
}
.howitworks li {
  margin-bottom: 0.5rem;
}

.enroll-help {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

#rwa-vsl { margin: 1rem 0 2rem; }
#rwa-vsl:empty { display: none; }

.enroll { margin-top: 1.5rem; }
.enroll button { width: 100%; padding: 0.9rem; font-size: 1.05rem; }
.cta-subtext {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

.form-error {
  color: var(--danger);
  background: #fdecef;
  border: 1px solid #f5c2cb;
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  margin-top: 0.75rem;
}

.enrolled-state { margin-top: 1.5rem; }

.link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.link-card h2 { margin-top: 0; font-size: 1.05rem; }
.link-card p { margin: 0.25rem 0 0.5rem; color: var(--muted); }

.copy-row { display: flex; gap: 0.5rem; align-items: stretch; margin-top: 0.5rem; }
.copy-row input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.875rem; }
.copy-row button { flex: 0 0 auto; padding: 0.55rem 1rem; }

.callout {
  background: #fff8e0;
  border: 1px solid #f0d97a;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-align: center;
}

.confirm-banner {
  background: #e6f4ea;
  border: 1px solid #b5d8c0;
  color: var(--success);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}
.confirm-banner strong { color: inherit; }

.section-heading {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}
.section-heading:first-of-type { margin-top: 0.5rem; }
.section-sub {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.875rem;
}

.field-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
}
.field-help {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  background: var(--bg);
  color: var(--fg);
}
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 37, 204, 0.15);
}

#complete-submit { width: 100%; padding: 0.9rem; font-size: 1.05rem; margin-top: 1.5rem; }

.dashboard { max-width: 820px; }

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.dash-header h1 { margin: 0 0 0.35rem; font-size: 1.5rem; }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}
/* R-621 §2d: the dashboard sets data-status=<rwa_drivers.status>
   verbatim, which for a live-active operator is "enrollment_completed",
   not "active" -- so the ACTIVE badge was falling through to the base
   grey style on live.  Mirror the green styling onto the actual
   underlying status value. */
.status-badge[data-status="active"],
.status-badge[data-status="enrollment_completed"] { background: #e6f4ea; border-color: #b5d8c0; color: var(--success); }
.status-badge[data-status="deactivated"] { background: #fdecef; border-color: #f5c2cb; color: var(--danger); }
.status-badge[data-status="paused"] { background: #fff8e0; border-color: #f0d97a; color: #7a5a00; }
.status-badge[data-status="kit_shipped"],
.status-badge[data-status="enrolled"],
.status-badge[data-status="pending"] { background: #eef2ff; border-color: #c6ceff; color: var(--accent); }

button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
button.ghost:hover { background: var(--accent); color: #ffffff; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}
@media (max-width: 540px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  text-align: center;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-value { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; }

.conv-section { margin-top: 2rem; }
.conv-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.conv-table th, .conv-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.conv-table th {
  background: var(--surface);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.muted { color: var(--muted); }

.withdraw-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.withdraw-section .muted { font-size: 0.875rem; margin-top: 0.75rem; }

/* T-013 LOUD fulfillment-alert banner. Cannot be missed: full
   width at the top of admin.html, red field, white text, prominent
   count. Hidden when the /api/admin/fulfillment-alerts endpoint
   reports total=0. */
.fulfillment-alert {
  background: #b00020;
  color: #ffffff;
  border: 3px solid #6b0014;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  box-shadow: 0 4px 16px rgba(176, 0, 32, 0.25);
}
.fulfillment-alert-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.fulfillment-alert-count {
  font-size: 1.5rem;
  font-weight: 700;
  background: #ffffff;
  color: #b00020;
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  min-width: 1.6rem;
  text-align: center;
}
.fulfillment-alert a { color: #ffffff; text-decoration: underline; }
.fulfillment-alert .muted { color: rgba(255, 255, 255, 0.78); }
.fulfillment-alert h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0.75rem 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fulfillment-bucket ul { margin: 0 0 0.5rem 1rem; padding: 0; }
.fulfillment-bucket li { margin: 0.2rem 0; }
.fulfillment-bucket-error {
  margin: 0.25rem 0;
  font-style: italic;
}

/* T-377 v2 recruiting landing -- live-text hero, two-column
   squeeze comparison, FAQ, consent gate UI, asterisk footnote. */

.hero-v2 { padding: 1.5rem 0 1rem; }
.hero-v2 .hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}
.hero-v2 .tm {
  font-size: 0.55em;
  vertical-align: super;
  font-weight: 700;
  margin-left: 0.05em;
}
.hero-v2 .hero-line {
  margin: 0.1rem 0;
  font-size: 1.0625rem;
  line-height: 1.35;
}
.hero-v2 .hero-line-keyed {
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 0.25rem;
}
.hero-v2 .hero-line-promise {
  font-weight: 600;
  margin-top: 0.35rem;
}
.hero-v2 .hero-line-domain {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}
.hero-asterisk {
  color: #0a8b8b;
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.05em;
  vertical-align: super;
  font-size: 0.65em;
}
.hero-asterisk:hover { text-decoration: none; }

.hero-v2 .hero-subhead {
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--fg);
  margin: 1.5rem auto 1.25rem;
  max-width: 560px;
  font-weight: 500;
}

.cta-subtext-fineprint {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* "What we pay" inline disclaimer + page-bottom asterisk footnote.
   Same wording, two locations per T-377 spec. */
.disclaimer-inline {
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
  margin: 0.25rem 0 1rem;
}

.disclosure-footnote {
  margin: 2.5rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--border);
}
.disclosure-footnote p {
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}
.disclosure-footnote .hero-asterisk {
  font-style: normal;
  margin-right: 0.15em;
}

/* Two-column squeeze-vs-RWA comparison. Stacks on narrow viewports. */
.two-col-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.5rem 0 0.5rem;
}
.two-col-compare .col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.two-col-compare .col-rwa {
  background: #eef2ff;
  border-color: #c6ceff;
}
.two-col-compare h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
  color: var(--muted);
}
.two-col-compare .col-rwa h3 { color: var(--accent); }
.two-col-compare ul {
  margin: 0;
  padding-left: 1.1rem;
}
.two-col-compare li { margin: 0.35rem 0; font-size: 0.95rem; }
.two-col-footer {
  text-align: center;
  font-weight: 600;
  margin: 1rem 0 0;
}
@media (max-width: 540px) {
  .two-col-compare { grid-template-columns: 1fr; }
}

/* R-569/R-571: order-page path picker.  TWO STACKED cards on every
   screen size (R-571: no side-by-side on desktop).  Each card is a
   large, tappable surface with an "Option" label and a prominent
   headline.  Nothing is pre-selected unless a rep code arrives in
   the URL; the selected card is clearly highlighted via a thick
   accent border + tinted background. */
.path-cards {
  border: 0;
  padding: 0;
  margin: 0 0 1rem 0;
}
.path-cards .visually-hidden,
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.path-cards-stack {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.path-cards-stack > li {
  margin: 0;
  padding: 0;
}
.path-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1.4;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.path-card input[type="radio"] {
  width: auto;
  margin: 0.3rem 0 0 0;
  flex: 0 0 auto;
  accent-color: var(--accent, #4458ff);
  transform: scale(1.25);
  transform-origin: left center;
}
.path-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.path-card-label {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #666);
}
.path-card-headline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text, #111);
}
.path-card:hover {
  border-color: #a7b1ff;
}
.path-card:has(input[type="radio"]:checked) {
  border-color: var(--accent, #4458ff);
  background: #eef2ff;
  box-shadow: 0 1px 0 var(--accent, #4458ff) inset;
}
.path-card:has(input[type="radio"]:checked) .path-card-label {
  color: var(--accent, #4458ff);
}
.path-card:focus-within {
  outline: 2px solid var(--accent, #4458ff);
  outline-offset: 2px;
}
.path-card-code-row {
  margin-top: 0.9rem;
}
.path-card-code-row input[type="text"] {
  font-family: monospace;
  letter-spacing: 0.1em;
  font-size: 16px;
  padding: 0.6em;
  width: 9em;
  max-width: 100%;
}
.path-card-code-help {
  font-size: 0.9rem;
  margin: 0.35em 0 0 0;
}
.path-card-code-msg {
  margin: 0.5em 0 0 0;
  font-size: 0.95rem;
}

/* FAQ rendered Q&A. */
.faq { margin: 0.5rem 0 0; }
.faq dt {
  font-weight: 700;
  margin: 1rem 0 0.25rem;
}
.faq dt:first-child { margin-top: 0.25rem; }
.faq dd { margin: 0 0 0.5rem; }

/* Consent gate UI. Three checkboxes (T-381), each with a linked legal
   document label. Stacked in a single bordered block; all three must
   be checked to enable the $47 button. */
.consent-block {
  margin: 0.5rem 0 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.consent-block .consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.4rem 0;
  background: transparent;
  border: 0;
  margin: 0;
}
.consent-block .consent-row + .consent-row {
  border-top: 1px dashed var(--border);
}
.consent-row input[type="checkbox"] {
  width: auto;
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  min-width: 1rem;
  min-height: 1rem;
}
.consent-label {
  font-weight: 400;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Static legal pages -- operator-agreement, terms, privacy. Wider
   reading column, plain typographic hierarchy, ALL-CAPS legal blocks
   left untransformed. */
.legal-page {
  max-width: 760px;
}
.legal-page h1 {
  font-size: 1.5rem;
  margin: 0.25rem 0 0.25rem;
}
.legal-page h2 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}
.legal-page h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.25rem;
  font-weight: 700;
}
.legal-page p {
  margin: 0 0 0.85rem;
}
.legal-revised {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}
.legal-back {
  font-size: 0.875rem;
  margin: 0 0 1rem;
}
.legal-summary {
  font-style: italic;
  color: var(--muted);
  margin: 0.25rem 0 0.75rem;
}
.legal-trademark,
.legal-copy {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1.25rem;
}
.legal-copy { margin-top: 0.25rem; }

.form-fineprint {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}
.privacy-line {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

/* R-043 operator dashboard: status row, activity/money zones,
   condensed stat rows. Visually separates the pacifier activity
   number from the money numbers. */
.dash-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin-top: 0.35rem;
}
.zone {
  margin-top: 1.75rem;
}
.zone-heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.6rem;
  font-weight: 700;
}
.stats-row {
  display: grid;
  gap: 0.75rem;
}
.stats-row-activity {
  grid-template-columns: 1fr;
}
.stats-row-money {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 480px) {
  .stats-row-money { grid-template-columns: 1fr; }
}
.stat-activity .stat-value {
  color: var(--muted);
  font-weight: 500;
  font-size: 1.35rem;
}
.stat-money .stat-value {
  color: var(--fg);
  font-weight: 700;
  font-size: 1.65rem;
}
.stat-hint {
  font-size: 0.75rem;
  margin-top: 0.3rem;
  line-height: 1.35;
}
.dash-support-line {
  margin-top: 2rem;
  font-size: 0.9rem;
  text-align: center;
}

/* R-051 return-path: top-right corner sign-in link on the landing,
   inline sign-in prompt inside the enroll form, and the sign-in
   page's main column. */
.top-nav {
  max-width: 640px;
  margin: 0 auto;
  padding: 0.9rem 1rem 0;
  text-align: right;
  font-size: 0.9rem;
}
.top-nav-signin {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.top-nav-signin:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.enroll-signin-line {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.enroll-signin-line a { color: var(--accent); }

.signin-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.signin-main h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
.signin-main p {
  margin: 0 0 1rem;
}
.signin-main button {
  width: 100%;
  padding: 0.85rem;
  font-size: 1.05rem;
  margin-top: 0.5rem;
}
.signin-support-line {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.9rem;
}
#resend-status:empty { display: none; }
#resend-status {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}
/* R-493 / R-635: six-digit code-entry input, shared across every
 * page that asks for an emailed sign-in code -- signin.html (#code),
 * index.html (#enroll-code), rep.html (#rep-signin-token).  Width
 * inherits from the global `input` rule (100%, same as the email
 * input on each form), so the code box is the same width as every
 * other sign-in input on the same page.  1.5rem font keeps the input
 * above iOS Safari's 16px zoom threshold with headroom.  Centered
 * tabular digits + letter-spacing visually separate each character
 * of a 4-10 digit OTP at thumb-and-glance speed.  autocomplete=
 * "one-time-code" on the input itself hands the OS a hint to surface
 * the code above the keyboard. */
#code,
#enroll-code,
#rep-signin-token {
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: 0.25em;
  text-align: center;
  padding: 0.7rem 0.5rem;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
/* R-497 STEP 1B: STATE 2 email echo + edit affordance. Shows the
 * subscriber the address we sent to so a typo is visible at a glance.
 * Large readable text (1.125rem) sits between header and code input;
 * tabular-nums for digit-heavy addresses; break-all so long emails
 * wrap cleanly on a phone. The Edit button sits on its own line as
 * a text-only affordance (not a primary button) so the Verify
 * button stays the dominant action. */
/* R-509: selectors extend to the enrollment code screen on
 * index.html so Edit and the resend affordance read the same on
 * both surfaces: Edit as a small inline text link, resend as a
 * secondary outlined button. Only the primary CTA ("Send code",
 * "Verify", "Verify and continue to payment") stays blue-filled. */
#code-sent-to,
#enroll-code-sent-to {
  margin: 0.75rem 0 0.25rem;
}
#code-screen-email,
#enroll-code-screen-email {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  word-break: break-all;
  margin: 0.25rem 0 0.75rem;
}
#code-typo-hint,
#enroll-code-typo-hint {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}
#code-edit-btn,
#enroll-code-edit-btn {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 0 0.25rem;
  width: auto;
  font-weight: 600;
  text-decoration: underline;
  margin: 0;
  font-size: inherit;
}
#code-edit-btn:hover,
#enroll-code-edit-btn:hover { background: transparent; }
#code-resend-help:empty,
#enroll-code-resend-help:empty { display: none; }
#code-resend-help,
#enroll-code-resend-help {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}
#resend-btn,
#enroll-resend-btn,
#enroll-resume-startover {
  /* R-585 adds #enroll-resume-startover alongside the resend buttons:
   * secondary affordance on the Resume prompt, same outlined look as
   * resend so the primary Continue reads as primary and this reads
   * as "escape hatch." The resend affordance is secondary to the
   * primary verify button; keep it visible but not loud. Width
   * matches the primary button so the two land on the same vertical
   * rhythm. R-497 STEP 1B: #enroll-resend-btn is hidden by `hidden`
   * until the ~60-second help-text timer fires. */
  margin-top: 0.5rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ---------------------------------------------------------------------------
 * R-389: RO dashboard phone pass.
 *
 * Presentation only. Content order and data source unchanged. All
 * dashboard-specific tweaks are scoped to `.dashboard .foo` so admin.html
 * (which also uses <main class="dashboard">) is not touched. The global
 * button min-height + phone-scoped font-size bumps are shared with every
 * page under styles.css; admin already reflows correctly at phone width
 * per R-389 §1 finding, so those globals only improve it.
 *
 * Existing breakpoints stay unchanged: `.stats-row-money` already reflows
 * to a single column at max-width 480px (line 636 above).
 * ------------------------------------------------------------------------- */

/* Copy button "copied" state -- visible feedback beyond the text swap.
 * dashboard.html's copy handler adds the .copied class alongside the
 * 'Copied!' textContent flash so the confirmation is legible on the
 * small dashboard tap target, and stays legible while the native
 * mobile text-selection UI briefly overlays the input. Rule is global
 * (not scoped to .dashboard) so any future page using .copy-row +
 * data-copy inherits the same feedback shape. */
.copy-row button.copied {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}
.copy-row button.copied:hover {
  background: var(--success);
}

@media (max-width: 640px) {
  /* Base bumps -- one nudge propagates through the rest of the sheet.
   * 17px root keeps the same relative scale everything else was drawn
   * against; nothing breaks that already fit at the smaller size. */
  html { font-size: 17px; }

  /* Thumb-sized touch targets. Applied to every <button> and .button
   * across styles.css so signin, enroll, admin, and dashboard all
   * inherit at the same threshold. */
  button, .button {
    min-height: 44px;
  }

  /* Slightly tighter main padding so the visible content fits more of
   * the 375px-ish viewport without horizontal whitespace waste. */
  main {
    padding: 1.5rem 1rem;
  }

  /* --- dashboard-specific: stack ------------------------------------ */

  /* Stack the header. Log out drops below welcome + badge instead of
   * crowding it. Ghost button stays visually secondary via align-self. */
  .dashboard .dash-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .dashboard .dash-header > div { min-width: 0; }
  .dashboard .dash-header button.ghost {
    align-self: flex-start;
  }
  .dashboard .dash-header h1 {
    font-size: 1.65rem;
  }

  /* Copy row stacks vertically -- input above, button full-width below
   * so both are thumb-sized rather than crowded side-by-side. */
  .dashboard .copy-row {
    flex-direction: column;
    gap: 0.6rem;
  }
  .dashboard .copy-row input {
    font-size: 1rem;
    padding: 0.85rem 0.9rem;
  }
  .dashboard .copy-row button {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  /* Stat values readable at arm's length. Money in particular is the
   * one number the operator glances at between fares -- large enough
   * to read without a zoom pinch. */
  .dashboard .stat-money .stat-value {
    font-size: 2.15rem;
  }
  .dashboard .stat-activity .stat-value {
    font-size: 1.75rem;
  }
  .dashboard .stat-label {
    font-size: 0.9rem;
  }
  .dashboard .stat-hint {
    font-size: 0.85rem;
  }
  .dashboard .zone-heading {
    font-size: 0.85rem;
  }
  .dashboard .zone {
    margin-top: 1.5rem;
  }

  /* Link-card gets slightly more breathing room since it now holds a
   * stacked copy-row (input + full-width button). */
  .dashboard .link-card {
    padding: 1.1rem 1.15rem;
  }
  .dashboard .link-card h2 {
    font-size: 1.15rem;
  }

  /* Status badge -- one notch larger so it registers next to the
   * bigger welcome heading. */
  .dashboard .status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.7rem;
  }

  /* Support-line spacing so the Need help? anchor is comfortably
   * tap-reachable without landing on the money numbers. */
  .dashboard .dash-support-line {
    margin-top: 2.25rem;
    font-size: 1rem;
  }
}
