/* Shared styles for ALL pages. Design tokens below are the source of truth;
   see DESIGN.md for rationale. Matches approved mockup C. */

/* Brand fonts (LICENSED — Gazpacho display + TT Norms Pro body), self-hosted
   from static/fonts/. No third-party font CDN. Only the weights the UI uses are
   wired (400/700/800 display; 400/500/700/800 body); 600 maps to the nearest
   heavier face. Italics are browser-synthesized if ever needed. */
@font-face { font-family: "Gazpacho"; src: url("../fonts/Gazpacho-Regular.67de0b26c0b8.woff2") format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gazpacho"; src: url("../fonts/Gazpacho-Bold.6873c8531075.woff2") format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gazpacho"; src: url("../fonts/Gazpacho-Black.01c605a51cc1.woff2") format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: "TT Norms Pro"; src: url("../fonts/TTNormsPro-Regular.bdcddb9e1eed.woff2") format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: "TT Norms Pro"; src: url("../fonts/TTNormsPro-Medium.bdbc604d7a1c.woff2") format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: "TT Norms Pro"; src: url("../fonts/TTNormsPro-Bold.571095c8bcf2.woff2") format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: "TT Norms Pro"; src: url("../fonts/TTNormsPro-ExtraBold.51605e1cdd76.woff2") format('woff2'); font-weight: 800; font-display: swap; }
:root {
  /* Type — brand fonts first, graceful fallback until licensed files land. */
  --font-display: "Gazpacho", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "TT Norms Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Color — maroon is the only loud color (= brand / primary action). */
  --page: #f4ebe0;          /* warm cream page */
  --panel: #f1e7d9;         /* tinted panel (slightly deeper cream) */
  --brand: #380008;         /* OFFICIAL Hershey maroon (sampled from the logo) */
  --brand-hover: #5a3522;   /* primary button hover */
  --brand-ink: #380008;     /* headlines */
  --accent-silver: #a0a8a8; /* OFFICIAL Hershey secondary silver */
  --arc: #380008;           /* progress ring arc = brand */
  --muted: #8a7c6d;
  --surface: #ffffff;       /* content cards */
  --line: #eae0d1;
  --track: #e7dcc9;         /* ring track */

  /* Semantic */
  --done: #2f7d4f; --done-bg: #e7f3ec;
  --error: #b3261e; --error-bg: #fdeceb; --error-line: #f3c9c6;
  --warning: #8a5a00; --warning-bg: #fff8e1; --warning-line: #f3d98b;

  /* Radius scale */
  --radius-sm: 8px; --radius-md: 11px; --radius-lg: 16px; --radius-full: 9999px;
  --radius: var(--radius-lg);   /* legacy alias */

  /* Spacing scale (4px base) */
  --space-2xs: 2px; --space-xs: 4px; --space-sm: 8px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;

  /* Motion */
  --dur-micro: 80ms; --dur-short: 200ms; --dur-medium: 320ms; --dur-long: 500ms;
  --ease-enter: ease-out; --ease-exit: ease-in; --ease-move: ease-in-out;

  --shadow: 0 10px 30px rgba(67, 39, 26, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-display);
  color: var(--brand-ink);
  min-height: 100vh;
  display: flex; flex-direction: column;
  /* Light cream base (unchanged) + the Hershey line-art motif. Per-page variants below. */
  background-color: var(--page);
  background-attachment: fixed; background-size: cover; background-position: center; background-repeat: no-repeat;
  background-image: url("../img/onboarding-bg.2b8342249159.png");
}
body.bg-2 { background-image: url("../img/onboarding-bg-2.016e7c31a8de.png"); }
body.bg-3 { background-image: url("../img/onboarding-bg-3.271deabec05c.png"); }

/* ---------- Header (consistent everywhere) ---------- */
.brandbar { background: var(--brand); padding: 14px 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* Official Hershey reverse logo (made for dark backgrounds) — no filter needed. */
.brand-logo { height: 30px; display: block; }

/* ---------- Footer (consistent everywhere) ---------- */
.support {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); padding: 20px; font-family: var(--font-sans); font-size: .9rem;
}
.support-icon { width: 16px; height: 16px; }
.support a { color: var(--arc); }

/* Inline text button that reads as a hyperlink (footer "IT Service Desk"). */
.link-inline {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--arc); text-decoration: underline;
}
.link-inline:hover { color: var(--brand); }

/* ---------- IS Support Center modal ---------- */
.support-modal {
  width: min(720px, calc(100vw - 32px)); border: none; border-radius: var(--radius);
  padding: 0; box-shadow: var(--shadow); color: var(--brand-ink);
  font-family: var(--font-sans);
}
.support-modal::backdrop { background: rgba(56, 0, 8, .45); }
.support-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand); color: #fff; padding: 16px 22px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.support-modal-head h2 { margin: 0; font-size: 1.15rem; color: #fff; }
.support-close {
  background: none; border: none; color: #fff; font-size: 1.6rem; line-height: 1;
  cursor: pointer; padding: 0 4px;
}
.support-grid {
  display: grid; grid-template-columns: 1fr; gap: 22px; padding: 24px 22px;
}
@media (min-width: 620px) { .support-grid { grid-template-columns: repeat(3, 1fr); } }
.support-block h3 {
  margin: 0 0 10px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.support-block p { margin: 4px 0; font-size: .95rem; line-height: 1.45; }
.support-region { font-weight: 600; color: var(--brand-ink); }
.support-block a { color: var(--arc); text-decoration: none; }
.support-block a:hover { text-decoration: underline; }

.shell { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 26px 44px; }
/* Auth pages (landing, verify): center the box vertically + horizontally so
   sizing is identical across screen sizes. */
body.auth .shell { display: flex; align-items: center; justify-content: center; }
.messages { margin-bottom: 16px; font-family: var(--font-sans); max-width: 460px; margin-left: auto; margin-right: auto; }
.msg { border-radius: 12px; padding: 10px 14px; border: 1px solid transparent; }
.msg--success { background: var(--done-bg); color: var(--done); border-color: #bfe0cb; }
.msg--info { background: var(--panel); color: var(--brand-ink); border-color: var(--line); }
.msg--warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-line); }
.msg--error { background: var(--error-bg); color: var(--error); border-color: var(--error-line); }

/* clean sans for body/controls; serif (display) stays for headlines */
.lede, .field-label, .authform, .tile-status, .badge, .btn, .linkbtn, .chip, .almost, .note, .trust, .otp-box { font-family: var(--font-sans); }

/* Global keyboard-focus ring (accessibility). */
:focus-visible { outline: 2px solid var(--arc); outline-offset: 2px; }

/* ---------- Auth pages (landing / OTP) ---------- */
.card {
  max-width: 460px; margin: 36px auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 34px; box-shadow: var(--shadow);
}
.card h1 { font-size: 2rem; margin: 0 0 8px; color: var(--brand-ink); }
.card .lede { color: var(--muted); margin: 0 0 24px; line-height: 1.5; }
.authform { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field-label { font-weight: 600; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.authform input[type=text], .authform input:not(.otp-box) {
  width: 100%; padding: 13px 15px; font-size: 1rem; min-height: 48px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--brand-ink);
}
.authform input:focus { outline: 2px solid var(--arc); border-color: var(--arc); }
.field-error { color: var(--error); font-size: .85rem; }

/* Segmented 6-box OTP (verify mockup) */
.otp-boxes { display: flex; gap: 10px; }
.otp-box {
  width: 100%; aspect-ratio: 3 / 4; min-height: 52px; text-align: center;
  font-size: 1.5rem; font-weight: 700; color: var(--brand-ink);
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
}
.otp-box:focus { outline: 2px solid var(--arc); border-color: var(--arc); }

.trust {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 20px;
  color: var(--muted); font-size: .84rem; line-height: 1.5;
}
.trust svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--arc); }

/* ---------- Onboarding error screen ---------- */
.error-card { max-width: 600px; text-align: center; }
.error-badge {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%; background: var(--error-bg); color: var(--error);
}
.error-badge svg { width: 34px; height: 34px; }
.error-card h1 { font-size: 1.9rem; margin: 0 0 10px; }
.error-card .lede { color: var(--muted); }
.ticket {
  display: inline-flex; align-items: baseline; gap: 10px; margin: 6px auto 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 12px 18px; font-family: var(--font-sans);
}
.ticket-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ticket-id { font-size: 1.25rem; letter-spacing: .04em; color: var(--brand-ink); }
.error-next { color: var(--muted); font-family: var(--font-sans); font-size: .9rem; line-height: 1.55; margin: 0 0 22px; }
.support-center { text-align: left; border-top: 1px solid var(--line); padding-top: 18px; }
.support-center-title { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-family: var(--font-sans); }
.error-back { margin: 18px 0 0; font-family: var(--font-sans); font-size: .9rem; }
.error-back a { color: var(--arc); }

/* ---------- Landing (editorial split) ---------- */
/* Landing: ONE bounded box holding welcome + form. Split on desktop, stacked on
   mobile. Fixed max-width + centered => consistent sizing on every screen. */
.landing {
  width: 100%; max-width: 940px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 720px) { .landing { grid-template-columns: 1fr 1fr; } }

/* Left: brand image pane with the welcome message over a maroon scrim. */
.welcome-pane {
  position: relative; min-height: 420px; padding: 40px 36px; color: #fff;
  background: var(--brand) url("../img/welcome-photo.d41848df89a9.png") center / cover no-repeat;
  display: flex; flex-direction: column; justify-content: flex-start;
}
/* Desktop: anchor the crop low so more of the Kisses show and the empty space
   between the headline and the Kisses shrinks. */
@media (min-width: 720px) { .welcome-pane { min-height: 480px; background-position: center 75%; } }
.welcome-pane::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(56,0,8,.82) 0%, rgba(56,0,8,.45) 40%, rgba(56,0,8,0) 72%);
}
.welcome-pane > * { position: relative; }
.welcome-pane h1 { font-size: 2.3rem; line-height: 1.08; font-weight: 800; margin: 0 0 14px; color: #fff; }
.welcome-pane .lede { color: rgba(255,255,255,.92); font-size: 1.02rem; line-height: 1.55; margin: 0; }
.welcome-note { margin: 16px 0 0; color: rgba(255,255,255,.8); font-size: .9rem; font-style: italic; }

.form-pane { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.card-eyebrow { font-size: 1.35rem; margin: 0 0 6px; color: var(--brand-ink); }
.card-sub { color: var(--muted); margin: 0 0 20px; font-family: var(--font-sans); font-size: .92rem; line-height: 1.5; }

/* "or" divider + Microsoft sign-in (landing form pane) */
.or-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-family: var(--font-sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-ms {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 12px 18px;
  background: #fff; color: #2f2f2f; border: 1px solid #c4c4c4; border-radius: var(--radius-md);
  font-family: var(--font-sans); font-weight: 600; font-size: .95rem; cursor: pointer;
}
.btn-ms:hover { background: #f6f6f6; border-color: #adadad; }
.ms-logo { width: 18px; height: 18px; display: block; }
.recover-line { margin: 14px 0 0; text-align: center; color: var(--muted); font-family: var(--font-sans); font-size: .85rem; line-height: 1.5; }

/* ---------- Dashboard (ONE bounded box, like the landing) ---------- */
.dashboard {
  width: 100%; max-width: 980px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 820px) { .dashboard { grid-template-columns: 340px 1fr; } }

/* Logout button, top-right of the header (light-on-maroon). */
.logout-form { margin: 0; }
.logout-btn {
  background: transparent; border: 1px solid rgba(255, 255, 255, .45); border-radius: var(--radius-full);
  color: #fff; font-family: var(--font-sans); font-size: .8rem; font-weight: 600;
  padding: 7px 16px; cursor: pointer; white-space: nowrap;
}
.logout-btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .8); }

.dash-hero { background: var(--panel); padding: 36px 30px; border-bottom: 1px solid var(--line); }

/* Profile bar (top of the left hero column): photo + name > title > UPN > email */
.profile-bar { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; position: relative;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-family: var(--font-sans); font-weight: 700; font-size: 1.1rem; letter-spacing: .02em;
}
.avatar::before { content: attr(data-initials); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-meta { min-width: 0; font-family: var(--font-sans); line-height: 1.3; }
.profile-name { font-weight: 700; font-size: 1.02rem; color: var(--brand-ink); }
.profile-title { font-size: .85rem; color: var(--muted); }
.profile-upn, .profile-email { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-upn { margin-top: 4px; }
.profile-hire { margin-top: 6px; font-size: .8rem; font-weight: 600; color: var(--brand-ink); }
@media (min-width: 820px) { .dash-hero { border-bottom: none; border-right: 1px solid var(--line); } }
.dash-hero h1 { font-size: 2rem; line-height: 1.1; margin: 0 0 10px; color: var(--brand-ink); }
.dash-hero .lede { color: var(--muted); margin: 0 0 18px; font-size: .98rem; line-height: 1.5; }

.ring {
  --p: 0; width: 140px; height: 140px; border-radius: 50%; margin: 6px 0 16px;
  background:
    radial-gradient(closest-side, var(--panel) 78%, transparent 79% 100%),
    conic-gradient(var(--arc) calc(var(--p) * 1%), var(--track) 0);
  display: grid; place-items: center;
}
.ring-center { text-align: center; }
.ring-center strong { font-size: 2rem; color: var(--brand-ink); display: block; line-height: 1; }
.ring-center span { color: var(--muted); font-size: .72rem; letter-spacing: .16em; }

.chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px; font-size: .9rem; color: var(--brand-ink); }
.almost { color: var(--muted); margin: 14px 0 0; }
.almost.done { color: var(--done); font-weight: 700; }

/* Checklist = rows inside the box (no floating cards). */
.dash-list { display: flex; flex-direction: column; }
.tile { display: flex; align-items: center; gap: 16px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.dash-list .tile:last-child { border-bottom: none; }
.tile--done { background: #f6faf6; }
.tile--locked { opacity: .55; }
.tile-status.is-locked { color: var(--muted); }
.tile-status.is-locked .lock { font-size: .9em; }
.tile-icon { flex: none; width: 24px; height: 24px; color: var(--brand-ink); }
.tile-icon svg { width: 100%; height: 100%; }
.tile--done .tile-icon { color: var(--done); }
.tile-body { flex: 1; min-width: 0; }
.tile-title { font-weight: 700; font-size: 1.02rem; color: var(--brand-ink); }
.tile-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .85rem; margin-top: 3px; }
.tile-status.is-done { color: var(--done); font-weight: 600; }
.tile-status .dot { width: 13px; height: 13px; border: 2px solid var(--track); border-radius: 50%; }
.note { color: var(--muted); font-size: .82rem; margin: 4px 0 0; }
.tile-action { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* Narrow screens: let the title use the full width and drop the action below it
   so long labels ("Request your company card") don't crush into 3 lines. */
@media (max-width: 520px) {
  .tile { flex-wrap: wrap; }
  .tile-body { flex-basis: calc(100% - 40px); }
  .tile-action { width: 100%; flex-direction: row; justify-content: flex-start; align-items: center; gap: 16px; padding-left: 40px; }
}

.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; text-decoration: none; padding: 12px 18px; border-radius: 11px; font-weight: 600; min-height: 48px; border: none; cursor: pointer; font-size: .95rem; white-space: nowrap; }
.btn:hover { background: var(--brand-hover); }
.btn .chev { font-size: 1.1em; line-height: 1; }
.btn-block { width: 100%; justify-content: center; }
.linkbtn { background: none; border: none; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 4px 0; font-size: .82rem; }
.badge { font-size: .82rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.badge--done { color: var(--done); background: var(--done-bg); }

/* ---------- Resources & next steps ---------- */
.resources {
  width: 100%; max-width: 980px; margin: 20px auto 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden; padding: 28px 30px;
}
.resources-title { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 16px; color: var(--brand-ink); }
.res-group + .res-group { margin-top: 22px; }
.res-group-title { font-family: var(--font-sans); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.res-item { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.res-group .res-item:last-child { border-bottom: none; }
.res-main { flex: 1; min-width: 0; }
.res-title { font-family: var(--font-sans); font-weight: 600; font-size: .98rem; color: var(--brand-ink); display: inline-flex; align-items: center; gap: 7px; }
.res-star { color: #d9ad33; font-size: .9em; cursor: help; }
.res-note { font-family: var(--font-sans); font-size: .82rem; color: var(--muted); margin: 3px 0 0; line-height: 1.45; }
.res-actions { flex: none; display: flex; align-items: center; gap: 12px; }
.res-link { font-family: var(--font-sans); font-size: .85rem; color: var(--arc); white-space: nowrap; }
.btn-sm { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; text-decoration: none; padding: 8px 14px; border-radius: var(--radius-md); font-family: var(--font-sans); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.btn-sm:hover { background: var(--brand-hover); }
@media (max-width: 520px) {
  .res-item { flex-wrap: wrap; }
  .res-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- MFA setup wizard modal ---------- */
.mfa-modal {
  width: min(460px, calc(100vw - 28px)); border: none; border-radius: var(--radius-lg);
  padding: 0; box-shadow: var(--shadow); color: var(--brand-ink); font-family: var(--font-sans);
}
.mfa-modal::backdrop { background: rgba(56, 0, 8, .45); }
.mfa-modal form { position: relative; padding: 30px 32px 24px; }
.mfa-x { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
.mfa-step h2 { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; margin: 0 28px 18px 0; color: var(--brand-ink); }
.mfa-art { display: block; max-width: 130px; max-height: 130px; margin: 4px auto 20px; }
.mfa-art-gif { max-width: 170px; max-height: 200px; border-radius: var(--radius-md); }
.mfa-step p, .mfa-step li { font-size: .92rem; line-height: 1.55; margin: 0 0 12px; }
.mfa-steps { padding-left: 20px; margin: 0 0 12px; }
.mfa-steps li { margin-bottom: 8px; }
.mfa-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.mfa-actions form { margin: 0; }
.btn-ghost { background: #f0eee9; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 11px 22px; font: inherit; font-weight: 600; color: var(--brand-ink); cursor: pointer; min-height: 44px; }
.btn-ghost:hover { background: #e7e2d8; }
.mfa-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 4px 0 6px; }
.mfa-store { display: inline-flex; }
.mfa-store img { height: 44px; width: auto; display: block; }
.mfa-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 14px; }
.mfa-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 12px; text-align: center; }
.mfa-card strong { display: block; font-size: .9rem; margin-bottom: 6px; }
.mfa-card img { display: block; max-width: 84px; max-height: 84px; margin: 8px auto; }
.mfa-card p { font-size: .82rem; margin: 0; color: var(--muted); }
.tap { margin: 16px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.tap-help { font-size: .85rem; color: var(--muted); margin: 0 0 10px; }
.tap-result { margin-top: 12px; }
.tap-row { display: flex; gap: 8px; margin-top: 6px; }
.tap-input { flex: 1; min-width: 0; padding: 11px 13px; font-size: 1rem; min-height: 44px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--brand-ink);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .04em; }
.tap-note { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }
.tap-error { color: var(--error); font-size: .85rem; margin: 8px 0 0; }
.mfa-error { color: var(--error); font-family: var(--font-sans); font-size: .88rem; margin: 14px 0 0; }

/* Set-password modal */
.pw-modal h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 0 28px 8px 0; color: var(--brand-ink); }
.pw-intro { font-size: .9rem; color: var(--muted); margin: 0 0 16px; }
.pw-modal .field { display: grid; gap: 7px; margin-bottom: 14px; }
.pw-input { width: 100%; padding: 12px 14px; min-height: 46px; font-size: 1rem; font-family: var(--font-sans);
  border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--brand-ink); }
.pw-input:focus { outline: 2px solid var(--arc); border-color: var(--arc); }
.pw-reqs { list-style: none; padding: 0; margin: 6px 0 0; font-family: var(--font-sans); font-size: .85rem; }
.pw-reqs li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--muted); }
.pw-reqs li::before { content: "•"; width: 1em; text-align: center; }
.pw-reqs li.is-pass { color: var(--done); }
.pw-reqs li.is-pass::before { content: "✓"; }
.pw-reqs li.is-fail { color: var(--error); }
.pw-reqs li.is-fail::before { content: "✕"; }
.pw-error { color: var(--error); font-size: .85rem; margin: 12px 0 0; }

/* Laptop tracking modal */
.track-modal h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 0 28px 12px 0; color: var(--brand-ink); }
.track-modal { width: min(480px, calc(100vw - 28px)); padding: 30px 32px 24px; position: relative; }
.track-meta { font-family: var(--font-sans); font-size: .88rem; color: var(--muted); line-height: 1.7; margin: 0 0 20px; }
.track-meta strong { color: var(--brand-ink); }
.track-carrier { display: inline-flex; align-items: center; gap: 8px; }
.track-logo { height: 20px; width: auto; vertical-align: middle; }
.track-steps { list-style: none; display: flex; justify-content: space-between; padding: 0; margin: 6px 0 20px; position: relative; }
.track-steps::before { content: ""; position: absolute; top: 9px; left: 8%; right: 8%; height: 2px; background: var(--line); z-index: 0; }
.track-step { position: relative; z-index: 1; flex: 1; text-align: center; font-family: var(--font-sans); }
.track-dot { display: block; width: 20px; height: 20px; margin: 0 auto 8px; border-radius: 50%; background: #fff; border: 2px solid var(--track); }
.track-label { font-size: .74rem; color: var(--muted); line-height: 1.2; display: block; padding: 0 2px; }
.track-step.is-done .track-dot { background: var(--done); border-color: var(--done); }
.track-step.is-done .track-dot::after { content: "✓"; color: #fff; font-size: .7rem; line-height: 16px; display: block; }
.track-step.is-done .track-label { color: var(--brand-ink); }
.track-step.is-current .track-dot { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(56,0,8,.12); }
.track-step.is-current .track-label { color: var(--brand-ink); font-weight: 700; }
.track-note { font-family: var(--font-sans); font-size: .88rem; color: var(--muted); margin: 0 0 4px; }

/* DEV-only OTP toast (temporary; remove with the dev_otp banner). */
.dev-toast {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: center; gap: 10px;
  background: #fff8e1; color: #6b4e00; border: 1px solid #f3d98b; border-radius: 12px;
  padding: 10px 16px; box-shadow: var(--shadow); font-family: var(--font-sans); font-size: .9rem;
  animation: devpop .25s ease-out;
}
.dev-toast strong { background: #6b4e00; color: #fff8e1; padding: 2px 7px; border-radius: 6px; font-size: .68rem; letter-spacing: .08em; }
.dev-toast .dev-code { font-weight: 800; font-size: 1.05rem; letter-spacing: .12em; }
.dev-toast small { color: #9a7b22; }
@keyframes devpop { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Blocking loading overlay (slow actions like the live MFA check). */
#loading-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: rgba(56, 0, 8, .45); }
#loading-overlay[hidden] { display: none; }
.loading-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: var(--radius-lg); padding: 20px 26px; box-shadow: var(--shadow);
  font-family: var(--font-sans); font-weight: 600; color: var(--brand-ink);
}
.spinner { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 3px solid var(--track); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Hershey Kiss loader: a real foil kiss that bobs with a foil-shine sweep. */
.kiss-spin { position: relative; width: 46px; height: 50px; flex: none; display: block; animation: kissBob 1.5s ease-in-out infinite; }
.kiss-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.kiss-spin::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url("../img/kiss-loader.acd9bb6280f0.png") center / contain no-repeat;
  mask: url("../img/kiss-loader.acd9bb6280f0.png") center / contain no-repeat;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.7) 50%, transparent 62%);
  background-size: 250% 100%;
  animation: kissShine 1.6s linear infinite;
}
@keyframes kissBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}
@keyframes kissShine {
  0% { background-position: 140% 0; }
  100% { background-position: -140% 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  /* Keep the loading indicator moving even under reduced-motion — it's a brief,
     contained progress signal, not decorative motion. */
  .kiss-spin { animation: kissBob 1.5s ease-in-out infinite !important; }
  .kiss-spin::after { animation: kissShine 1.6s linear infinite !important; }
  .spinner { animation: spin .8s linear infinite !important; }
}
