:root {
  --bg: #0d1f3a;
  --panel: #16305c;
  --accent: #e63946;
  --accent-2: #f5c842;
  --accent-2-text: #16305c;
  --text: #ffffff;
  --muted: #a9bcdb;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--bg), #060f22);
  color: var(--text);
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

header img.logo {
  height: 96px;
  width: auto;
}

header h1 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: 0.02em;
}

header p {
  color: var(--muted);
  margin: 0;
}

.header-promo {
  color: var(--accent-2);
  font-weight: 700;
}

.disclaimer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin: -1rem 0 0;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#appContent {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.gate-panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.gate-panel h2 {
  margin: 0 0 0.5rem;
}

.gate-copy {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.step-reassurance {
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  margin: 0 0 1rem;
}

.package-cta {
  color: var(--accent-2);
  font-weight: 700;
  margin: 1.25rem 0 0.75rem;
}

.commercial-intro {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  text-align: left;
  color: var(--text);
  line-height: 1.6;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  font-weight: 400;
  padding: 0.4rem;
}

.link-btn:hover {
  color: var(--text);
  opacity: 1;
}

.gate-zip {
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.gate-zip-row {
  display: flex;
  gap: 0.5rem;
}

.gate-zip-row button {
  white-space: nowrap;
  flex-shrink: 0;
}

.gate-zip-row input {
  flex: 1;
  font-size: 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--muted);
  background: #0f2452;
  color: var(--text);
  text-align: center;
}

.gate-msg {
  min-height: 1.2rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

.gate-msg.error {
  color: var(--accent);
}

.progress-bar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.progress-label {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-steps {
  display: flex;
  align-items: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 4.5rem;
  flex-shrink: 0;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: #0f2452;
  border: 2px solid var(--muted);
  color: var(--muted);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.step-name {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  transition: color 0.3s ease;
}

.progress-step.completed {
  cursor: pointer;
}

.progress-step.completed .step-circle {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: var(--accent-2-text);
  transition: transform 0.15s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.progress-step.completed:hover .step-circle {
  transform: scale(1.12);
  box-shadow: 0 0 0 4px rgba(245, 200, 66, 0.25);
}

.progress-step.completed .step-name {
  color: var(--text);
}

.progress-step.completed:hover .step-name {
  text-decoration: underline;
}

.progress-step.active .step-circle {
  border-color: var(--accent-2);
  color: var(--text);
  box-shadow: 0 0 0 4px rgba(245, 200, 66, 0.2);
}

.progress-step.active .step-name {
  color: var(--text);
  font-weight: 700;
}

.progress-connector {
  flex: 1 1 auto;
  height: 3px;
  background: rgba(169, 188, 219, 0.25);
  border-radius: 999px;
  margin-top: 14px;
  transition: background 0.4s ease;
}

.progress-connector.completed {
  background: var(--accent-2);
}

@media (max-width: 480px) {
  .step-name {
    font-size: 0.6rem;
  }

  .step-circle {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  .progress-connector {
    margin-top: 12px;
  }
}

.controls {
  background: var(--panel);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.upload-box {
  flex: 1 1 260px;
  border: 2px dashed var(--muted);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.upload-box:hover {
  border-color: var(--accent);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
}

.address-field {
  position: relative;
}

.address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0.25rem 0 0;
  padding: 0.25rem;
  list-style: none;
  background: #0f2452;
  border: 1px solid var(--muted);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.address-suggestions li {
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

.address-suggestions li:hover,
.address-suggestions li.active {
  background: var(--accent-2);
  color: var(--accent-2-text);
}

select,
button {
  font-size: 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--muted);
  background: #0f2452;
  color: var(--text);
}

button {
  background: var(--accent-2);
  color: var(--accent-2-text);
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: opacity 0.2s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  opacity: 0.9;
}

.status {
  width: 100%;
  min-height: 1.2rem;
  color: var(--muted);
  margin: 0;
}

.status.error {
  color: var(--accent);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .style-grid {
    grid-template-columns: 1fr;
  }
}

.style-card {
  background: var(--panel);
  border-radius: 12px;
  padding: 1rem;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.style-card.selected {
  border-color: var(--accent-2);
}

.style-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

.style-card img {
  width: 100%;
  border-radius: 8px;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.style-card img:hover {
  opacity: 0.85;
}

.choose-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  background: var(--accent);
  color: var(--text);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 15, 34, 0.9);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1000px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  color: var(--text);
  font-weight: 700;
  margin: 1rem 0 0;
  font-size: 1.1rem;
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent-2);
  color: var(--accent-2-text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.approval-panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.approval-panel h2 {
  margin: 0 0 1rem;
}

.approval-preview {
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.approval-preview img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.approval-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.customize-panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.customize-panel h2 {
  margin: 0 0 0.5rem;
}

.decor-palette {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
}

.decor-add-btn {
  background: #0f2452;
  color: var(--text);
  border: 1px solid var(--muted);
}

.decor-canvas-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
  touch-action: none;
}

.decor-canvas-wrap img {
  width: 100%;
  display: block;
}

.decor-item {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  min-width: 20px;
  min-height: 20px;
}

.decor-item.dragging {
  cursor: grabbing;
  opacity: 0.85;
}

.decor-item.resizing {
  opacity: 0.85;
}

.decor-item svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

.decor-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text);
  font-size: 0.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.decor-resize-handle {
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent-2);
  border: 2px solid var(--panel);
  cursor: nwse-resize;
  touch-action: none;
}

.customize-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.package-panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.package-panel h2 {
  margin: 0 0 0.5rem;
}

.package-hero {
  max-width: 820px;
  margin: 1.5rem auto;
  position: relative;
}

/* Numbered callouts on the example picture; colours/numbers come from FEATURE_LEGEND so they match the
   badges on the package cards below. */
.hero-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(22px, 4.6vw, 38px);
  height: clamp(22px, 4.6vw, 38px);
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 800;
  font-size: clamp(12px, 2.5vw, 20px);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.package-hero img {
  width: 100%;
  border-radius: 12px;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.package-card {
  background: #0f2452;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.package-card:hover {
  transform: translateY(-2px);
}

.package-card.selected {
  border-color: var(--accent-2);
}

.package-card .package-badge {
  display: inline-block;
  background: var(--accent-2);
  color: var(--accent-2-text);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.package-card h4 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--text);
}

.package-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.package-card li {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.feature-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.package-card.selected li {
  color: var(--text);
}

.package-card li::before {
  content: "✓ ";
  color: var(--accent-2);
  font-weight: 700;
}

.lead-panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.lead-panel h2 {
  margin: 0 0 0.5rem;
}

.lead-panel h3 {
  margin: 0 0 0.5rem;
}

.promo-banner {
  background: linear-gradient(135deg, var(--accent), #b3212c);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 0 0 1.5rem;
}

.promo-badge {
  display: inline-block;
  background: var(--accent-2);
  color: var(--accent-2-text);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.promo-banner h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.promo-copy {
  margin: 0;
  color: var(--text);
}

.promo-fine-print {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

.thankyou-panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.thankyou-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.thankyou-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
}

.thankyou-next-step {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 1.75rem;
}

.thankyou-offer-banner {
  background: linear-gradient(135deg, var(--accent), #b3212c);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.5rem;
}

.thankyou-offer-banner p {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.thankyou-summary {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.lead-form {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.lead-form input {
  width: 100%;
  font-size: 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--muted);
  background: #0f2452;
  color: var(--text);
}

.contact-pref-field {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-pref-field legend {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0;
  margin-bottom: 0.35rem;
}

.contact-pref-option {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.6rem;
  row-gap: 0.15rem;
  align-items: start;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--muted);
  background: #0f2452;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-pref-option:has(input:checked) {
  border-color: var(--accent-2);
  background: rgba(245, 200, 66, 0.1);
}

.contact-pref-option input[type="radio"] {
  width: auto;
  grid-row: 1 / 3;
  margin-top: 0.2rem;
  accent-color: var(--accent-2);
}

.contact-pref-title {
  font-weight: 700;
  color: var(--text);
}

.contact-pref-copy {
  font-size: 0.85rem;
  color: var(--muted);
}

.lead-form button {
  margin-top: 0.5rem;
}

.placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #0f2452;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 1rem;
}

.style-placeholder {
  font-size: 0.9rem;
}

/* On phones, once the customer is inside the wizard, shrink the page header so each step's
   heading, instructions and the 50% offer line sit in the first screen instead of below the fold. */
@media (max-width: 640px) {
  body.in-wizard header {
    padding: 1rem 1rem 0.25rem;
    gap: 0.4rem;
  }

  body.in-wizard header img.logo {
    height: 64px;
  }

  body.in-wizard header h1 {
    font-size: 1.3rem;
  }

  body.in-wizard header > p:not(.header-promo) {
    display: none;
  }

  body.in-wizard main {
    padding-top: 1rem;
  }
}

/* ---------- Bot trap: invisible to people, tempting to form-filling bots. ---------- */
.hp-field {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Mobile / touch optimization ---------- */

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

button,
a,
.progress-step,
.package-card,
.upload-box,
.contact-pref-option {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Let a thumb swipe over the photo scroll the page; only the decorations themselves capture touch. */
.decor-canvas-wrap {
  touch-action: pan-y;
}

/* Close button pinned to the screen corner so it can never sit off-screen on a tall image. */
.lightbox-close {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  z-index: 2;
}

.package-continue-top {
  display: none;
}

@media (max-width: 640px) {
  .gate-zip-row input {
    min-width: 0;
  }

  main {
    padding: 1rem 0.75rem;
    gap: 1.25rem;
  }

  #appContent {
    gap: 1.25rem;
  }

  /* Win back horizontal room: panels were inset ~56px per side, leaving ~263px for form fields. */
  .gate-panel,
  .approval-panel,
  .customize-panel,
  .package-panel,
  .lead-panel {
    padding: 1.25rem 1rem;
  }

  .thankyou-panel {
    padding: 1.75rem 1.25rem;
  }

  .controls {
    padding: 1.1rem;
  }

  .promo-banner {
    padding: 1.1rem;
  }

  /* The progress bar was wider than a phone screen (5 x 72px steps) and made the page scroll sideways. */
  .progress-step {
    width: 3.4rem;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }

  .step-name {
    font-size: 0.68rem;
  }

  .progress-connector {
    min-width: 4px;
    margin-top: 14px;
  }

  /* Bigger tap area for the clickable (completed) steps without changing the layout. */
  .progress-step {
    position: relative;
  }

  .progress-step.completed::after {
    content: "";
    position: absolute;
    inset: -8px -2px -6px;
  }

  .package-continue-top {
    display: block;
    width: 100%;
    margin: 0.9rem 0 0;
  }

  .package-continue-top[hidden] {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .progress-step {
    width: 3.1rem;
  }

  .step-name {
    font-size: 0.64rem;
  }

  header h1 {
    font-size: 1.5rem;
  }
}

/* Touch devices and phones: comfortable tap targets (Apple/Google recommend at least 44px). */
@media (max-width: 640px), (pointer: coarse) {
  button,
  .lead-form input,
  .gate-zip-row input {
    min-height: 44px;
  }

  .link-btn {
    min-height: 44px;
    padding: 0.7rem 1rem;
  }

  .address-suggestions li {
    padding: 0.8rem 0.75rem;
    min-height: 44px;
  }

  .decor-remove {
    /* the blanket 44px button rule above would stretch this into an oval */
    min-width: 0;
    min-height: 0;
    width: 28px;
    height: 28px;
    top: -12px;
    right: -12px;
    font-size: 0.85rem;
  }

  .decor-resize-handle {
    width: 28px;
    height: 28px;
    bottom: -12px;
    right: -12px;
  }

  .decor-remove::after,
  .decor-resize-handle::after {
    content: "";
    position: absolute;
    inset: -8px;
  }
}


/* ==========================================================================
   Device polish: tablets, landscape phones, very large screens, keyboards,
   touch vs. mouse, notches and reduced motion. Kept last so it wins ties.
   ========================================================================== */

/* Mobile browsers' toolbars make 100vh taller than the visible area; dvh tracks what's really visible. */
body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Phones with a notch / rounded corners (the pages ask for viewport-fit=cover). */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}
.lightbox-close {
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
}

/* Keyboard users (desktops, tablets with keyboards) must be able to see where they are. */
:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
}
.package-card:focus-visible,
.progress-step.completed:focus-visible {
  outline-offset: 3px;
  border-radius: 12px;
}

/* People who ask their device for less motion get none. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* A tap leaves a phone/tablet "hovering" until the next tap — don't leave things stuck raised or glowing. */
@media (hover: none) {
  .package-card:hover {
    transform: none;
  }
  .progress-step.completed:hover .step-circle {
    transform: none;
    box-shadow: none;
  }
  .progress-step.completed:hover .step-name {
    text-decoration: none;
  }
}

/* Readable progress-bar labels (they were 10.9px). Phones keep them compact only on very small screens. */
@media (min-width: 361px) {
  .step-name {
    font-size: 0.75rem;
  }
}
@media (min-width: 641px) {
  .step-name {
    font-size: 0.85rem;
  }
}

/* Tablets (and anything up to 1024px): comfortable 44px touch targets. Before, only phone widths and
   "coarse pointer" devices got them, so an iPad with a keyboard/trackpad — or a small laptop window —
   got phone-sized-or-smaller buttons. */
@media (max-width: 1024px), (pointer: coarse) {
  button,
  select,
  textarea,
  .lead-form input,
  .gate-zip-row input,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="date"] {
    min-height: 44px;
  }

  /* links styled as buttons (e.g. "Daily numbers", "Back to the Design Studio") need to be block-like to take a height */
  a.link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
  }

  /* these small controls keep their own size; they carry enlarged invisible touch areas instead */
  .decor-remove,
  .decor-resize-handle {
    min-width: 0;
    min-height: 0;
  }
}

/* Tablets: use the extra room a little more generously. */
@media (min-width: 641px) and (max-width: 1024px) {
  main {
    padding: 1.75rem 2rem;
  }
  header {
    padding-top: 2.25rem;
  }
}

/* Phones held sideways: the full header would fill the whole screen and push the form out of sight. */
@media (max-height: 520px) and (orientation: landscape) {
  header {
    padding: 0.6rem 1rem 0.3rem;
    gap: 0.25rem;
  }
  header img.logo {
    height: 44px;
  }
  header h1 {
    font-size: 1.25rem;
  }
  header p:not(.header-promo) {
    display: none;
  }
  .header-promo {
    font-size: 0.85rem;
  }
  main {
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 1rem;
  }
  .gate-panel,
  .controls,
  .approval-panel,
  .customize-panel,
  .package-panel,
  .lead-panel {
    padding: 1rem 1.25rem;
  }
  .progress-bar {
    margin-bottom: 0.5rem;
  }
}

/* Big monitors: scale everything up with the screen instead of leaving a small island in a wide page. */
@media (min-width: 1800px) {
  html {
    font-size: 112.5%;
  }
  main {
    max-width: 60rem;
  }
  header img.logo {
    height: 6rem;
  }
}
@media (min-width: 2400px) {
  html {
    font-size: 125%;
  }
}

.package-card .package-badge {
  font-size: 0.78rem;
}
