/* Loopwit SSO. Monochrome instrument; one indigo indicator. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/jetbrains-mono.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: swap;
}

@property --a {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
@property --sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 360deg;
}

:root {
  color-scheme: light;
  --bg: oklch(1 0 0);
  --surface: oklch(0.975 0.004 270);
  --line: oklch(0.91 0.006 270);
  --line-strong: oklch(0.84 0.008 270);
  --ink: oklch(0.2 0.012 270);
  --ink-2: oklch(0.46 0.015 270);
  --ink-3: oklch(0.56 0.014 270);
  --on-ink: oklch(0.99 0 0);
  --accent: oklch(0.47 0.19 270);
  --accent-wash: oklch(0.47 0.19 270 / 0.14);
  --danger: oklch(0.53 0.19 25);
  --danger-wash: oklch(0.53 0.19 25 / 0.12);
  --success: oklch(0.52 0.12 155);
  --shadow-btn: inset 0 1px 0 oklch(1 0 0 / 0.12), 0 1px 2px oklch(0.2 0.012 270 / 0.18);
  --shadow-toast: 0 1px 2px oklch(0.2 0.012 270 / 0.08), 0 12px 32px -8px oklch(0.2 0.012 270 / 0.22);

  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);

  --radius: 12px;
  --z-toast: 40;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: oklch(0.145 0 0);
    --surface: oklch(0.185 0.006 270);
    --line: oklch(0.27 0.01 270);
    --line-strong: oklch(0.35 0.012 270);
    --ink: oklch(0.965 0.004 270);
    --ink-2: oklch(0.74 0.014 270);
    --ink-3: oklch(0.64 0.014 270);
    --on-ink: oklch(0.16 0.008 270);
    --accent: oklch(0.74 0.13 270);
    --accent-wash: oklch(0.74 0.13 270 / 0.2);
    --danger: oklch(0.72 0.16 25);
    --danger-wash: oklch(0.72 0.16 25 / 0.16);
    --success: oklch(0.75 0.13 155);
    --shadow-btn: inset 0 1px 0 oklch(1 0 0 / 0.5), 0 1px 2px oklch(0 0 0 / 0.4);
    --shadow-toast: 0 0 0 1px var(--line), 0 16px 40px -8px oklch(0 0 0 / 0.6);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 0.9375rem/1.55 var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-wash);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Shell ─────────────────────────────────────────────── */

.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.top,
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 40px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: 8px;
}

.logo {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}
.logo-dot {
  fill: var(--accent);
  stroke: none;
}

.foot {
  font: 400 0.75rem/1.4 var(--mono);
  color: var(--ink-3);
  flex-wrap: wrap;
}
.foot-scope {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.foot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(40px, 7vw, 120px);
  padding: 24px clamp(16px, 9vw, 152px) 40px;
}

.panel {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

/* ── Type ─────────────────────────────────────────────── */

.title {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 32px;
  color: var(--ink-2);
  max-width: 38ch;
  text-wrap: pretty;
}
.lede strong,
.addr {
  color: var(--ink);
  font-weight: 500;
}

.context {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.context strong {
  color: var(--ink);
  font-weight: 600;
}
.context-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 0.6875rem;
  font-weight: 600;
}

/* ── Fields ───────────────────────────────────────────── */

.form {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}

.control {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}
.control:hover {
  border-color: var(--ink-3);
}
.control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}

.control input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 500 1rem var(--font);
  letter-spacing: -0.005em;
  padding: 0 14px;
}
.control input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

/* The domain is part of the field, not a rule to read. Without JS it sits
   at the right edge; with JS it follows the text like an inline completion. */
.control-email input {
  padding-right: calc(14px + var(--suffix-w, 7.5em));
}
.suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  translate: 0 -50%;
  font: 500 1rem var(--font);
  letter-spacing: -0.005em;
  color: var(--ink-3);
  pointer-events: none;
  white-space: nowrap;
  transition: color 160ms var(--ease-out);
}
.control-email.is-enhanced input {
  padding-right: 14px;
}
.control-email.is-enhanced .suffix {
  right: auto;
  left: 0;
  translate: var(--suffix-x, 14px) -50%;
  transition:
    translate 140ms var(--ease-out),
    color 160ms var(--ease-out);
}
.control-email.has-value .suffix {
  color: var(--ink-2);
}
.control-email.is-overflowing .suffix,
.control-email.has-domain .suffix {
  opacity: 0;
}
.measure {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  font: 500 1rem var(--font);
  letter-spacing: -0.005em;
}

.error {
  margin: 0;
  min-height: 0;
  font-size: 0.8125rem;
  color: var(--danger);
}
.error:empty {
  display: none;
}

.control.is-invalid,
.otp.is-invalid .slot,
.otp.is-invalid .otp-input {
  border-color: var(--danger);
}
.control.is-invalid:focus-within {
  box-shadow: 0 0 0 4px var(--danger-wash);
}
.is-invalid {
  animation: shake 420ms var(--ease-out);
}

/* ── One-time code ────────────────────────────────────── */

.otp {
  position: relative;
}
.otp-input {
  width: 100%;
  height: 60px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: 600 1.625rem var(--mono);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-align: center;
  outline: 0;
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}
.otp-input::placeholder {
  color: var(--line-strong);
}
.otp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}

/* Enhanced: the real input stays on top, invisible, and drives six slots. */
.otp.is-enhanced .otp-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  height: 100%;
  opacity: 0;
  caret-color: transparent;
  font-size: 1px;
}
.otp-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 14px repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}
.otp-sep {
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}
.slot {
  position: relative;
  display: grid;
  place-items: center;
  height: 62px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font: 600 1.625rem/1 var(--mono);
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    background-color 160ms var(--ease-out);
}
.slot.is-filled {
  background: var(--bg);
  border-color: var(--ink-3);
}
.otp.is-focused .slot.is-active {
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.otp.is-focused .slot.is-active:not(.is-filled)::after {
  content: "";
  width: 2px;
  height: 26px;
  border-radius: 2px;
  background: var(--accent);
  animation: caret 1.05s steps(1) infinite;
}
.slot-digit {
  animation: digit-in 220ms var(--ease-expo);
}
.otp.is-checking .slot {
  border-color: var(--ink-3);
  animation: slot-pulse 900ms var(--ease-out) infinite;
}
.otp.is-checking .slot:nth-child(2) { animation-delay: 60ms; }
.otp.is-checking .slot:nth-child(3) { animation-delay: 120ms; }
.otp.is-checking .slot:nth-child(5) { animation-delay: 180ms; }
.otp.is-checking .slot:nth-child(6) { animation-delay: 240ms; }
.otp.is-checking .slot:nth-child(7) { animation-delay: 300ms; }

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.meta-row form {
  margin: 0;
}
.timer {
  margin: 0;
  font: 400 0.8125rem/1.4 var(--mono);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.timer.is-low {
  color: var(--danger);
}

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 600 0.9375rem/1 var(--font);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    scale 120ms var(--ease-out);
}
.btn:active {
  scale: 0.98;
}
.btn:disabled {
  cursor: default;
}

.btn-primary {
  width: 100%;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: color-mix(in oklch, var(--ink) 88%, var(--accent));
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--ink-3);
  background: var(--surface);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover {
  color: var(--ink);
  background: var(--surface);
}

.btn-face {
  display: grid;
}
.btn-label,
.btn-busy {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    opacity 200ms var(--ease-out),
    translate 260ms var(--ease-expo),
    filter 200ms var(--ease-out);
}
.btn-busy {
  opacity: 0;
  translate: 0 8px;
  filter: blur(3px);
}
.btn-arrow {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate 200ms var(--ease-out);
}
.btn:hover .btn-arrow {
  translate: 3px 0;
}

.btn[data-busy] .btn-label {
  opacity: 0;
  translate: 0 -8px;
  filter: blur(3px);
}
.btn[data-busy] .btn-busy {
  opacity: 1;
  translate: 0 0;
  filter: none;
}

.dots {
  display: inline-flex;
  gap: 4px;
}
.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: dot 1s var(--ease-out) infinite;
}
.dots i:nth-child(2) { animation-delay: 140ms; }
.dots i:nth-child(3) { animation-delay: 280ms; }

/* A mask sweep, not a gradient fill: the text stays one solid colour. */
.shimmer {
  -webkit-mask-image: linear-gradient(100deg, #000 35%, rgb(0 0 0 / 0.4) 50%, #000 65%);
  mask-image: linear-gradient(100deg, #000 35%, rgb(0 0 0 / 0.4) 50%, #000 65%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}

.btn-text {
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 0.8125rem/1.4 var(--font);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: text-decoration-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.btn-text:hover {
  text-decoration-color: currentColor;
}
.btn-text:disabled {
  color: var(--ink-3);
  text-decoration: none;
  cursor: default;
}

.link {
  display: inline-block;
  margin-top: 28px;
  color: var(--ink-2);
  font-size: 0.875rem;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: color 160ms var(--ease-out), text-decoration-color 160ms var(--ease-out);
}
.link:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.actions .btn {
  width: auto;
  flex: 1 1 160px;
}

/* ── Facts ────────────────────────────────────────────── */

.facts {
  margin: 0 0 32px;
  border-top: 1px solid var(--line);
}
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--ink-2);
}
.facts dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.detail {
  margin: -16px 0 0;
}
.detail code {
  font: 400 0.8125rem/1.5 var(--mono);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 8px;
  overflow-wrap: anywhere;
}

/* ── The loop ─────────────────────────────────────────── */

.ring {
  --a: 86;
  --stroke: 1.6;
  position: relative;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: min(500px, 60vh, 100%);
  aspect-ratio: 1;
}
.ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ring-dial line {
  stroke: var(--line-strong);
  stroke-width: 0.6;
  stroke-linecap: round;
}
.ring-dial line.major {
  stroke: var(--ink-3);
  stroke-width: 0.8;
}
.ring-dial {
  -webkit-mask-image: conic-gradient(#000 var(--sweep), transparent 0);
  mask-image: conic-gradient(#000 var(--sweep), transparent 0);
  animation: dial-sweep 1200ms var(--ease-expo) backwards;
}
.ring-track {
  fill: none;
  stroke: var(--line);
  stroke-width: var(--stroke);
}
.ring-arc {
  fill: none;
  stroke: var(--ink);
  stroke-width: var(--stroke);
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: calc(100 - var(--a));
  transition: stroke 300ms var(--ease-out);
}
.ring-head {
  transform-box: view-box;
  transform-origin: 100px 100px;
  rotate: calc(var(--a) * 3.6deg);
  fill: var(--accent);
  transition: opacity 300ms var(--ease-out), fill 300ms var(--ease-out);
}
.ring-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.monogram {
  font-size: clamp(1.5rem, 8vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  animation: core-in 700ms var(--ease-expo) 650ms backwards;
}

/* open: waiting for you; the loop draws itself in, leaving a gap */
.ring[data-mode="open"] {
  animation: ring-draw 1200ms var(--ease-expo) backwards;
}

/* busy: the indicator runs the loop while a request is in flight */
body[data-busy] .ring-head {
  animation: orbit 950ms cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
body[data-busy] .ring-arc {
  stroke: var(--ink-3);
}

/* count: the arc is the code's remaining life */
.ring[data-mode="count"] {
  --a: 100;
}
.ring[data-mode="count"][data-live] {
  animation: ring-count linear forwards;
  animation-duration: calc(var(--remaining) * 1s);
}
.ring[data-low] .ring-arc {
  stroke: var(--danger);
}
.ring[data-low] .ring-head {
  fill: var(--danger);
}

/* closed: signed in, the loop completes and the indicator settles in */
.ring[data-mode="closed"] {
  --a: 100;
  animation: ring-close 900ms var(--ease-expo) 150ms backwards;
  transition: --a 420ms var(--ease-out);
}
.ring[data-mode="closed"] .ring-head {
  opacity: 0;
  animation: head-settle 1050ms var(--ease-out) backwards;
}
/* Hovering "Sign out" previews it: the loop starts to open. */
body:has([data-signout]:is(:hover, :focus-visible)) .ring[data-mode="closed"] {
  --a: 90;
}
body:has([data-signout]:is(:hover, :focus-visible)) .ring[data-mode="closed"] .ring-head {
  opacity: 1;
}

/* unwind: signed out, the loop opens back up */
.ring[data-mode="unwind"] {
  --a: 32;
  animation: ring-unwind 1500ms var(--ease-expo) 120ms backwards;
}

/* broken: something went wrong */
.ring[data-mode="broken"] {
  --a: 62;
  animation: ring-draw 900ms var(--ease-expo) backwards;
}
.ring[data-mode="broken"] .ring-arc {
  stroke: var(--danger);
}
.ring[data-mode="broken"] .ring-head {
  fill: var(--danger);
}
.ring[data-mode="broken"] .ring-loop {
  animation: wobble 520ms var(--ease-out) 700ms;
}

/* ── Toast ────────────────────────────────────────────── */

.toast {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  top: 18px;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-toast);
  pointer-events: none;
  animation:
    toast-in 520ms var(--ease-expo) backwards,
    toast-out 260ms var(--ease-in) 4200ms forwards;
}
.toast svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--success);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Entrances ────────────────────────────────────────── */

.rise {
  animation: rise 640ms var(--ease-expo) backwards;
}
.d0 { animation-delay: 0ms; }
.d1 { animation-delay: 40ms; }
.d2 { animation-delay: 90ms; }
.d3 { animation-delay: 150ms; }
.d4 { animation-delay: 210ms; }

/* ── Keyframes ────────────────────────────────────────── */

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 8px;
    filter: blur(6px);
  }
}
@keyframes ring-draw {
  from { --a: 0; }
}
@keyframes ring-close {
  from { --a: 86; }
}
@keyframes ring-unwind {
  from { --a: 100; }
}
@keyframes ring-count {
  from { --a: var(--start, 100); }
  to { --a: 0; }
}
@keyframes dial-sweep {
  from { --sweep: 0deg; }
}
@keyframes head-settle {
  0%, 60% { opacity: 1; }
}
@keyframes orbit {
  to { transform: rotate(360deg); }
}
@keyframes core-in {
  from {
    opacity: 0;
    scale: 0.92;
    filter: blur(8px);
  }
}
@keyframes wobble {
  20% { rotate: -4deg; }
  45% { rotate: 3deg; }
  70% { rotate: -1.5deg; }
}
@keyframes shake {
  20% { translate: -5px 0; }
  40% { translate: 4px 0; }
  60% { translate: -3px 0; }
  80% { translate: 1px 0; }
}
@keyframes caret {
  50% { opacity: 0; }
}
@keyframes digit-in {
  from {
    opacity: 0;
    translate: 0 6px;
    filter: blur(4px);
  }
}
@keyframes slot-pulse {
  50% { background-color: var(--surface); border-color: var(--line-strong); }
}
@keyframes dot {
  0%, 100% { opacity: 0.3; scale: 0.8; }
  40% { opacity: 1; scale: 1; }
}
@keyframes shimmer {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
@keyframes toast-in {
  from {
    opacity: 0;
    translate: -50% -14px;
    scale: 0.96;
    filter: blur(6px);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    translate: -50% -8px;
    scale: 0.98;
    visibility: hidden;
  }
}

/* ── Small screens: the dial becomes an emblem ────────── */

@media (max-width: 899px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding: clamp(16px, 7vh, 72px) 16px 32px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
  }
  .ring {
    --stroke: 9;
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    width: 64px;
    margin-bottom: 28px;
  }
  .ring-dial {
    display: none;
  }
  .ring-head circle {
    r: 11;
  }
  .monogram {
    font-size: 1.125rem;
  }
  .panel {
    grid-column: 1;
    grid-row: auto;
  }
  .title {
    font-size: 1.75rem;
  }
  .top,
  .foot {
    padding-inline: 16px;
  }
}

@media (max-width: 380px) {
  .otp-slots {
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 8px repeat(3, minmax(0, 1fr));
  }
  .slot {
    height: 56px;
    font-size: 1.375rem;
  }
}

/* ── Reduced motion: keep state, drop movement ─────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  /* The countdown is information, not movement: it keeps running. */
  .ring[data-mode="count"][data-live] {
    animation-duration: calc(var(--remaining) * 1s) !important;
  }
  body[data-busy] .ring-head {
    animation: none !important;
    opacity: 0.5;
  }
  .dots i,
  .shimmer,
  .otp.is-checking .slot {
    animation: none !important;
  }
  .toast {
    animation: toast-out 0.01ms linear 4200ms forwards !important;
  }
}
