:root {
  --color-background: #f4f0e8;
  --color-surface: rgba(255, 252, 246, 0.76);
  --color-surface-strong: rgba(255, 252, 246, 0.92);
  --color-border: rgba(26, 26, 26, 0.14);
  --color-text: #1a1a1a;
  --color-muted: rgba(26, 26, 26, 0.62);
  --color-accent: #0d5f8d;
  --color-accent-soft: rgba(13, 95, 141, 0.12);
  --color-shadow: rgba(21, 19, 17, 0.12);
  --font-heading: "Playfair Display", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-input: "Cormorant Garamond", Georgia, Cambria, "Times New Roman", Times, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --color-input: #2a2520;
  --color-input-muted: rgba(42, 37, 32, 0.45);
  --radius: 28px;
  --radius-small: 18px;
  --content-width: min(100%, 72rem);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-duration: 0.45s;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(183, 205, 218, 0.4), transparent 34%),
    radial-gradient(circle at bottom right, rgba(212, 196, 170, 0.5), transparent 32%),
    linear-gradient(180deg, #f7f2e8 0%, #efe8db 100%);
  color: var(--color-text);
  font-family: var(--font-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.3), transparent 42%),
    linear-gradient(320deg, rgba(255, 255, 255, 0.26), transparent 45%);
  pointer-events: none;
}

.page-noise,
.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.page-noise {
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 4px 4px;
  mask-image: radial-gradient(circle at center, black 25%, transparent 100%);
}

.page-glow--one {
  background: radial-gradient(circle at 15% 18%, rgba(13, 95, 141, 0.1), transparent 28%);
}

.page-glow--two {
  background: radial-gradient(circle at 85% 72%, rgba(163, 128, 78, 0.14), transparent 30%);
}

.site-logo {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.site-logo:hover {
  opacity: 0.75;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 24px 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.header-meta {
  display: grid;
  gap: 8px;
  justify-items: center;
  grid-column: 2;
}

.meta-label,
.meta-count,
.eyebrow,
.card-label,
.review-label,
.success-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  color: var(--color-muted);
}

.progress-track {
  width: min(34vw, 240px);
  height: 2px;
  background: rgba(26, 26, 26, 0.12);
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(13, 95, 141, 0.2), var(--color-accent));
  transition: width var(--transition-duration) var(--ease-out-expo);
}

.progress-fill.progress-fill--pulse {
  animation: progress-pulse 0.6s var(--ease-out-expo);
}

@keyframes progress-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.stage {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 320px;
}

.view {
  width: 100%;
  max-width: 960px;
  padding: 52px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-surface-strong) 0%, var(--color-surface) 100%);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 70px var(--color-shadow);
  border-radius: var(--radius);
  transform: translateY(0);
  opacity: 1;
  animation: stage-in 0.55s var(--ease-out-expo);
}

.view[hidden] {
  display: none;
}

/* Section slide transitions */
.view--exiting {
  transition: transform var(--transition-duration) var(--ease-out-expo),
    opacity var(--transition-duration) var(--ease-out-expo);
  pointer-events: none;
}

.view--exiting-left {
  transform: translateX(-22%);
  opacity: 0;
}

.view--exiting-right {
  transform: translateX(22%);
  opacity: 0;
}

.view--entering {
  transition: transform var(--transition-duration) var(--ease-out-expo),
    opacity var(--transition-duration) var(--ease-out-expo);
}

.view--entering-from-right {
  transform: translateX(22%);
  opacity: 0;
}

.view--entering-from-right.view--entering-active {
  transform: translateX(0);
  opacity: 1;
}

.view--entering-from-left {
  transform: translateX(-22%);
  opacity: 0;
}

.view--entering-from-left.view--entering-active {
  transform: translateX(0);
  opacity: 1;
}

/* Staggered content reveal */
.view--stagger > * {
  animation: stagger-in 0.5s var(--ease-out-expo) forwards;
  opacity: 0;
}

.view--stagger > *:nth-child(1) { animation-delay: 0ms; }
.view--stagger > *:nth-child(2) { animation-delay: 50ms; }
.view--stagger > *:nth-child(3) { animation-delay: 100ms; }
.view--stagger > *:nth-child(4) { animation-delay: 150ms; }
.view--stagger > *:nth-child(5) { animation-delay: 200ms; }
.view--stagger > *:nth-child(6) { animation-delay: 250ms; }
.view--stagger > *:nth-child(7) { animation-delay: 300ms; }

@keyframes stagger-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Review list items stagger */
.view--stagger .review-section-title,
.view--stagger .review-item {
  animation: stagger-in 0.4s var(--ease-out-expo) forwards;
  opacity: 0;
}

.view--stagger .review-list > *:nth-child(1) { animation-delay: 200ms; }
.view--stagger .review-list > *:nth-child(2) { animation-delay: 240ms; }
.view--stagger .review-list > *:nth-child(3) { animation-delay: 280ms; }
.view--stagger .review-list > *:nth-child(4) { animation-delay: 320ms; }
.view--stagger .review-list > *:nth-child(5) { animation-delay: 360ms; }
.view--stagger .review-list > *:nth-child(6) { animation-delay: 400ms; }
.view--stagger .review-list > *:nth-child(7) { animation-delay: 440ms; }
.view--stagger .review-list > *:nth-child(8) { animation-delay: 480ms; }
.view--stagger .review-list > *:nth-child(9) { animation-delay: 520ms; }
.view--stagger .review-list > *:nth-child(10) { animation-delay: 560ms; }
.view--stagger .review-list > *:nth-child(n+11) { animation-delay: 600ms; }

/* Form fields stagger */
.view--stagger .field-region > .section-field-group {
  animation: stagger-in 0.4s var(--ease-out-expo) forwards;
  opacity: 0;
}

.view--stagger .field-region > .section-field-group:nth-child(1) { animation-delay: 220ms; }
.view--stagger .field-region > .section-field-group:nth-child(2) { animation-delay: 280ms; }
.view--stagger .field-region > .section-field-group:nth-child(3) { animation-delay: 340ms; }
.view--stagger .field-region > .section-field-group:nth-child(4) { animation-delay: 400ms; }
.view--stagger .field-region > .section-field-group:nth-child(5) { animation-delay: 460ms; }
.view--stagger .field-region > .section-field-group:nth-child(n+6) { animation-delay: 520ms; }

/* Success panel stagger */
.view--stagger .success-panel > * {
  animation: stagger-in 0.4s var(--ease-out-expo) forwards;
  opacity: 0;
}

.view--stagger .success-panel > *:nth-child(1) { animation-delay: 280ms; }
.view--stagger .success-panel > *:nth-child(2) { animation-delay: 340ms; }
.view--stagger .success-panel > *:nth-child(3) { animation-delay: 400ms; }
.view--stagger .success-panel > *:nth-child(4) { animation-delay: 460ms; }
.view--stagger .success-panel > *:nth-child(5) { animation-delay: 520ms; }
.view--stagger .success-panel > *:nth-child(6) { animation-delay: 580ms; }

.view--intro,
.view--success {
  display: grid;
  gap: 24px;
}

.view--form,
.view--review {
  display: grid;
  gap: 28px;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 13ch;
  font-size: clamp(3.2rem, 10vw, 6.4rem);
}

h2 {
  max-width: 15ch;
  font-size: clamp(2.6rem, 8vw, 5rem);
}

.lead,
.card-text,
.review-value,
.success-copy {
  margin: 0;
  max-width: 50rem;
  color: rgba(26, 26, 26, 0.82);
  font-size: clamp(1rem, 2.1vw, 1.24rem);
  line-height: 1.7;
}

.lead--compact {
  max-width: 42rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.intro-card,
.review-item,
.success-panel {
  padding: 22px 24px;
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.44);
}

.intro-card {
  display: grid;
  gap: 10px;
  min-height: 160px;
}

.intro-actions {
  display: grid;
  gap: 18px;
  align-items: start;
  max-width: 520px;
}

.intro-note {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.94rem;
}

.field-region {
  display: grid;
  gap: 28px;
}

.section-field-group {
  display: grid;
  gap: 10px;
}

.section-field-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-muted);
}

.field-hint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-muted);
}

.field-stack {
  display: grid;
  gap: 18px;
}

.field-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.18);
  border-radius: 0;
  background: transparent;
  padding: 0 0 18px;
  color: var(--color-input);
  font-family: var(--font-input);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
  outline: none;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.field-input::placeholder {
  color: var(--color-input-muted);
}

.field-input:focus {
  border-color: rgba(42, 37, 32, 0.5);
}

.field-input:-webkit-autofill,
.field-input:-webkit-autofill:hover,
.field-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-input);
  -webkit-box-shadow: 0 0 0 1000px #fcfcf8 inset;
}

.field-input--secondary {
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-family: var(--font-body);
  color: var(--color-text);
}

textarea.field-input {
  min-height: 9rem;
  resize: vertical;
}

input[type="date"].field-input,
input[type="number"].field-input {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.field-input--file {
  font-size: 1rem;
  font-family: var(--font-body);
  padding: 12px 0;
  color: var(--color-text);
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice-grid--compact {
  margin-top: 8px;
}

.choice-chip {
  appearance: none;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--color-text);
  padding: 14px 18px;
  cursor: pointer;
  font: inherit;
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    background-color 0.24s ease,
    color 0.24s ease;
}

.choice-chip:hover,
.choice-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(13, 95, 141, 0.3);
}

.choice-chip[data-selected="true"] {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
  transform: scale(1.02);
}

.field-error,
.error-banner {
  margin: 0;
  color: #8c2f2f;
  font-size: 0.96rem;
}

.review-list {
  display: grid;
  gap: 24px;
}

.review-section-title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  grid-column: 1 / -1;
}

.review-list .review-item {
  margin: 0;
}

.review-item {
  display: grid;
  gap: 12px;
}

.review-value {
  white-space: pre-wrap;
}

.success-panel {
  display: grid;
  gap: 18px;
  max-width: 36rem;
}

.success-instructions {
  margin: 0;
  padding-left: 1.25rem;
  color: rgba(26, 26, 26, 0.82);
  font-size: clamp(1rem, 2.1vw, 1.15rem);
  line-height: 1.75;
}

.success-instructions li {
  margin-bottom: 0.5em;
}

.success-instructions li:last-child {
  margin-bottom: 0;
}

.success-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: fit-content;
}

.footer-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 0.24s ease,
    opacity 0.24s ease,
    background-color 0.24s ease,
    color 0.24s ease,
    border-color 0.24s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: progress;
  opacity: 0.6;
  transform: none;
}

.button--primary {
  background: var(--color-text);
  color: #f8f8f4;
  font-size: 1.05rem;
  padding: 18px 32px;
}

.button--secondary {
  background: rgba(255, 255, 255, 0.66);
  color: var(--color-text);
  border: 1px solid rgba(26, 26, 26, 0.12);
}

.button--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(26, 26, 26, 0.12);
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================================
   GATEWAY — ACCESS CODE / VAULT KEYPAD
   ============================================================ */

/* App shell is invisible until unlocked — avoids a flash-of-content */
body:not([data-unlocked]) .app-shell {
  opacity: 0;
  pointer-events: none;
}

body[data-unlocked] .app-shell {
  animation: brief-reveal 0.42s var(--ease-out-expo) both;
}

@keyframes brief-reveal {
  from {
    opacity: 0;
    transform: scale(0.985) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.gateway {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(183, 205, 218, 0.45), transparent 38%),
    radial-gradient(circle at 85% 80%, rgba(212, 196, 170, 0.55), transparent 36%),
    linear-gradient(180deg, #f7f2e8 0%, #efe8db 100%);
  animation: stage-in 0.7s var(--ease-out-expo) both;
  will-change: opacity, transform;
}

.gateway[hidden] {
  display: none;
}

.gateway--unlocking {
  animation: gateway-exit 0.36s var(--ease-out-expo) forwards;
  pointer-events: none;
}

@keyframes gateway-exit {
  to {
    opacity: 0;
    transform: scale(1.01);
  }
}

/* Panel card */
.gateway-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 52px 44px 44px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-surface-strong) 0%, var(--color-surface) 100%);
  backdrop-filter: blur(10px);
  box-shadow:
    0 32px 80px var(--color-shadow),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  border-radius: var(--radius);
  min-width: 320px;
  animation: stage-in 0.6s var(--ease-out-expo) 0.08s both;
  will-change: opacity, transform;
}

/* Lock SVG icon */
.gateway-lock-wrap {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  border: 1px solid rgba(13, 95, 141, 0.15);
  border-radius: 50%;
  margin-bottom: 2px;
  box-shadow: 0 4px 18px rgba(13, 95, 141, 0.1);
}

.gateway-lock-icon {
  width: 40px;
  height: 40px;
}

.lock-body {
  fill: rgba(13, 95, 141, 0.1);
  stroke: var(--color-accent);
  stroke-width: 2.2;
  transition: fill 0.5s ease;
}

.lock-shackle {
  stroke: var(--color-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
  transition: transform 0.52s var(--ease-out-expo), opacity 0.35s ease;
  transform-box: fill-box;
  transform-origin: 15px 22px;
}

.lock-keyhole {
  fill: rgba(13, 95, 141, 0.5);
  stroke: none;
  transition: opacity 0.3s ease;
}

.lock-keyhole-stem {
  stroke: var(--color-accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  transition: opacity 0.3s ease;
}

/* Lock open state */
.lock-icon--open .lock-shackle {
  transform: translateY(-9px) rotate(12deg);
  opacity: 0;
}

.lock-icon--open .lock-body {
  fill: rgba(13, 95, 141, 0.2);
}

/* Headings */
.gateway-heading {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--color-text);
  line-height: 1;
}

.gateway-sub {
  margin: -6px 0 0;
  font-size: 0.82rem;
  color: var(--color-muted);
  letter-spacing: 0.06em;
  text-align: center;
}

/* Dots row */
.gateway-dots-wrap {
  padding: 6px 0 2px;
}

.gateway-dots {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.gateway-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: transparent;
  transition:
    background 0.2s var(--ease-out-expo),
    border-color 0.2s ease,
    transform 0.2s var(--ease-out-expo);
}

.gateway-dot[data-filled="true"] {
  background: var(--color-accent);
  transform: scale(1.18);
}

.gateway-dot[data-error="true"] {
  border-color: #8c2f2f;
  background: #8c2f2f;
  transform: scale(1.15);
}

.gateway-dot[data-success="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent);
  transform: scale(1.22);
  box-shadow: 0 0 0 3px rgba(13, 95, 141, 0.18);
}

/* Shake animation on wrong code */
.gateway-dots-wrap--shake {
  animation: keypad-shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes keypad-shake {
  0%, 100% { transform: translateX(0); }
  12%       { transform: translateX(-9px); }
  25%       { transform: translateX(8px); }
  37%       { transform: translateX(-7px); }
  50%       { transform: translateX(6px); }
  62%       { transform: translateX(-4px); }
  75%       { transform: translateX(3px); }
  87%       { transform: translateX(-2px); }
}

/* Error message */
.gateway-error {
  margin: -4px 0 0;
  font-size: 0.85rem;
  color: #8c2f2f;
  text-align: center;
  letter-spacing: 0.015em;
  animation: error-appear 0.22s ease both;
}

@keyframes error-appear {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Keypad grid */
.gateway-keypad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 11px;
  margin-top: 6px;
}

/* Individual keys */
.gateway-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(255, 252, 246, 0.72);
  cursor: pointer;
  gap: 1px;
  padding: 0;
  transition:
    background-color 0.14s ease,
    border-color 0.14s ease,
    transform 0.14s ease,
    box-shadow 0.14s ease;
  box-shadow: 0 2px 8px rgba(21, 19, 17, 0.07);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.gateway-key:hover,
.gateway-key:focus-visible {
  background: var(--color-accent-soft);
  border-color: rgba(13, 95, 141, 0.28);
  box-shadow: 0 4px 18px rgba(13, 95, 141, 0.13);
  transform: translateY(-1px);
}

.gateway-key:active,
.gateway-key--pressed {
  background: rgba(13, 95, 141, 0.16);
  border-color: rgba(13, 95, 141, 0.4);
  transform: scale(0.93);
  box-shadow: 0 1px 4px rgba(13, 95, 141, 0.08);
}

.key-num {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1;
}

.key-sub {
  font-family: var(--font-body);
  font-size: 0.42rem;
  letter-spacing: 0.22em;
  color: var(--color-muted);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
}

/* Delete key */
.gateway-key--delete {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.gateway-key--delete:hover,
.gateway-key--delete:focus-visible {
  background: rgba(26, 26, 26, 0.05);
  border-color: transparent;
  box-shadow: none;
}

.gateway-key--delete svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-muted);
  transition: stroke 0.15s ease;
}

.gateway-key--delete:hover svg,
.gateway-key--delete:focus-visible svg {
  stroke: var(--color-text);
}

/* Empty spacer cell */
.gateway-key-spacer {
  width: 72px;
  height: 72px;
}

/* ============================================================
   END GATEWAY
   ============================================================ */

@media (max-width: 900px) {
  .app-shell {
    padding: 20px 16px 16px;
  }

  .site-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    position: static;
    background: #fff;
    margin-left: -16px;
    margin-right: -16px;
    margin-top: -20px;
    padding: 16px 16px 20px;
    border-radius: 0;
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
  }

  .header-meta {
    flex: 1;
    min-width: 0;
    justify-items: flex-end;
    grid-column: auto;
  }

  .progress-track {
    width: min(140px, 40vw);
  }

  .view {
    padding: 32px 24px;
  }

  .intro-grid,
  .review-list {
    grid-template-columns: 1fr;
  }

  .footer-actions {
    width: 100%;
    justify-content: stretch;
  }

  .button {
    flex: 1 1 180px;
  }
}

@media (max-width: 560px) {
  .gateway-panel {
    padding: 40px 28px 36px;
    min-width: 0;
    width: calc(100vw - 32px);
    max-width: 360px;
    gap: 16px;
  }

  .gateway-keypad {
    grid-template-columns: repeat(3, 68px);
    gap: 9px;
  }

  .gateway-key,
  .gateway-key-spacer {
    width: 68px;
    height: 68px;
  }

  .site-logo {
    font-size: 1.1rem;
  }

  .progress-track {
    width: min(120px, 38vw);
  }

  .wordmark {
    letter-spacing: 0.18em;
  }

  .view {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .field-input {
    font-size: clamp(1.7rem, 9vw, 2.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
