/* Tá na Porta — the courier flow and the public consultation, on the
 * brandbook (v1.0, out/2026).
 *
 * The same tokens as `panel.css`, under the same names, so the product reads
 * as one system: Onest, Azul Portal as the one accent, Grafite and the Base
 * neutrals around it, and the brandbook's three state colours — Verde
 * confirms (the door closed, the delivery registered), Âmbar asks for
 * attention (the door is open, the address is wrong, wait a moment), Aço is
 * the neutral (unavailable, waiting). No red: this flow has no destructive
 * action, and red is the repo's colour for those alone.
 *
 * Both schemes are designed. The light one is `:root`; `html.dark` redefines
 * the tokens. Which applies follows the phone's setting until the footer
 * toggle records an explicit choice (`static/theme.js`, key `theme`) — a
 * courier at a building's door in full sun and one at night both get the
 * scheme they asked for.
 *
 * Phone first: 16px inputs (no zoom on focus), 44px+ touch targets, the
 * brand's Âmbar focus ring (a step darker on the light scheme, so it keeps
 * 3:1 against the page). The file is new under this name on purpose:
 * HTML is never held by the edge, so a stylesheet URL nobody has cached
 * cannot be served stale after a deploy. */

@font-face {
  font-family: "Onest";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/Onest-400.ttf") format("truetype");
}
@font-face {
  font-family: "Onest";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/Onest-500.ttf") format("truetype");
}
@font-face {
  font-family: "Onest";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/Onest-600.ttf") format("truetype");
}
@font-face {
  font-family: "Onest";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/Onest-700.ttf") format("truetype");
}

/* ── Tokens ───────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --surface-3: #e4e9f0;
  --line: #dce3ec;
  --line-strong: #c9d4e3;
  --text: #0c1523;
  --text-2: #3a4656;
  --muted: #5b6878;
  --primary: #1f5bff;
  --primary-hover: #1a4fe0;
  --primary-soft: rgba(31, 91, 255, 0.1);
  --primary-ink: #1a4fe0;
  --ok: #19e08a;
  --ok-ink: #0b6b43;
  --ok-soft: #e8fcf3;
  --warn: #ffb020;
  --warn-ink: #7a5a12;
  --warn-soft: #fff4de;
  --warn-line: rgba(255, 176, 32, 0.45);
  --steel: #8b98a8;
  --steel-ink: #5b6878;
  --steel-soft: #eef1f5;
  --input-bg: #ffffff;
  --scrim: rgba(12, 21, 35, 0.55);
  --shadow-card: 0 1px 2px rgba(12, 21, 35, 0.06), 0 8px 24px rgba(12, 21, 35, 0.06);
  --shadow-pop: 0 24px 64px rgba(12, 21, 35, 0.22);
  /* Focus rings need 3:1 against what they sit on (WCAG 1.4.11). Âmbar
   * gives 1.7:1 on this page, so the light scheme takes its darker step in
   * the brandbook, Sunrise 300: 3.8:1 on --bg, 4.1:1 on white, above 3.2:1
   * on every tint here. */
  --focus: #a47600;
  /* Third-party marks keep their own colours. */
  --correios-bg: #ffcc00;
  --correios-text: #003478;
  --whatsapp: #25d366;
  --instagram: #e4405f;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
}
html.dark {
  color-scheme: dark;
  --bg: #0c1523;
  --surface: #131f31;
  --surface-2: #16243a;
  --surface-3: #1c2c45;
  --line: rgba(244, 247, 251, 0.08);
  --line-strong: rgba(244, 247, 251, 0.16);
  --text: #f4f7fb;
  --text-2: #b7c3d4;
  --muted: #8b98a8;
  --primary-hover: #2e68ff;
  --primary-soft: rgba(31, 91, 255, 0.16);
  --primary-ink: #8faeff;
  --ok-ink: #19e08a;
  --ok-soft: rgba(25, 224, 138, 0.14);
  --warn-ink: #ffb020;
  --warn-soft: rgba(255, 176, 32, 0.14);
  --warn-line: rgba(255, 176, 32, 0.32);
  --steel-ink: #b7c3d4;
  --steel-soft: rgba(139, 152, 168, 0.14);
  --input-bg: #0c1523;
  --scrim: rgba(5, 10, 20, 0.72);
  --shadow-card: none;
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, 0.55);
  --focus: #ffb020;
}

/* ── Reset ────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: none;
  cursor: pointer;
}
a {
  color: inherit;
}
img,
svg {
  display: block;
  max-width: 100%;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
[x-cloak] {
  display: none !important;
}

/* ── Entrance animations ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.animate-fadeIn {
  animation: fadeIn 0.15s ease-out;
}
.animate-scaleIn {
  animation: scaleIn 0.15s ease-out;
}
.animate-slideInRight {
  animation: slideInRight 0.2s ease-out;
}
.animate-spin {
  animation: spin 1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .animate-fadeIn,
  .animate-scaleIn,
  .animate-slideInRight {
    animation: none;
  }
}

/* ── Page scaffolding ─────────────────────────────────────────────────── */
.page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  background: var(--bg);
}
/* Wizard variant: fixed viewport, inner content scrolls. */
.page-wizard {
  height: 100dvh;
  min-height: auto;
  overflow: hidden;
}

/* The horizontal signature, at the brandbook's digital minimum (110px wide)
 * or above: the positive version on light, the negative one on dark. */
.logo-band {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6) 0;
}
.logo-band .brand-logo {
  height: 52px;
  width: auto;
}
.logo-band--small .brand-logo {
  height: 46px;
}
.brand-logo-dark {
  display: none;
}
html.dark .brand-logo-light {
  display: none;
}
html.dark .brand-logo-dark {
  display: block;
}

.center-fill {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-6);
  text-align: center;
}
/* A centered column: heroes, the confirmation, the result pages. */
.stack-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.result-page {
  padding: var(--space-10) var(--space-6);
}
.confirmation-hero {
  padding: var(--space-8) 0;
}

/* Icon-in-circle heroes */
.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}
.icon-circle svg {
  stroke-width: 1.75;
}
.icon-circle--primary {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.icon-circle--amber {
  background: var(--warn-soft);
  color: var(--warn-ink);
}
.icon-circle--gray {
  background: var(--steel-soft);
  color: var(--steel-ink);
}
.icon-circle--green {
  background: var(--ok-soft);
  color: var(--ok-ink);
}
.icon-circle-20 {
  height: 80px;
  width: 80px;
}
.icon-circle-20 svg {
  height: 40px;
  width: 40px;
}
.icon-circle-16 {
  height: 64px;
  width: 64px;
}
.icon-circle-16 svg {
  height: 32px;
  width: 32px;
}
.spinner-lg {
  height: 40px;
  width: 40px;
  color: var(--primary-ink);
}
.spinner-lg svg {
  height: 100%;
  width: 100%;
}

/* ── Type ─────────────────────────────────────────────────────────────── */
.h-page {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-align: center;
}
.h-page--bold {
  font-weight: 700;
}
.h-state {
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
}
.h-state--bold {
  font-weight: 700;
}
.h-section {
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
}
.subtext {
  font-size: 1rem;
  color: var(--muted);
}
.body-text {
  font-size: 1rem;
  color: var(--text-2);
}
.text-center {
  text-align: center;
}
.link {
  color: var(--primary-ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn-primary {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-radius: var(--r);
  background: var(--primary);
  padding: var(--space-3) var(--space-5);
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition:
    background 0.15s,
    transform 0.15s;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}
.btn-primary svg {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
}
.btn-outline {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-radius: var(--r);
  border: 1.5px solid var(--primary);
  background: transparent;
  padding: var(--space-3) var(--space-4);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-ink);
  text-decoration: none;
  transition: background 0.15s;
}
.btn-outline:hover {
  background: var(--primary-soft);
}
.btn-outline svg {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
}
.btn-outline--sm {
  font-size: 0.875rem;
}
/* A button sized by its label, in a centered column. */
.btn--inline {
  width: auto;
  padding: var(--space-3) var(--space-6);
}
.btn-ghost-neutral {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  padding: var(--space-3) var(--space-6);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.15s;
}
.btn-ghost-neutral:hover {
  background: var(--surface-2);
}
.actions-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

/* Delivery-type buttons */
.delivery-actions {
  padding: 0 var(--space-6) var(--space-8);
}
.delivery-actions-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.btn-delivery {
  display: flex;
  height: 64px;
  width: 100%;
  align-items: center;
  gap: var(--space-4);
  border-radius: var(--r);
  padding: 0 var(--space-4);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition:
    filter 0.15s,
    transform 0.15s;
}
.btn-delivery:hover {
  filter: brightness(1.04);
}
.btn-delivery:active {
  transform: translateY(1px);
}
.btn-delivery--correios {
  background: var(--correios-bg);
  color: var(--correios-text);
}
.btn-delivery--carrier {
  background: var(--primary);
  color: #ffffff;
}
.btn-delivery-icon {
  display: flex;
  height: 40px;
  width: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.btn-delivery--carrier .btn-delivery-icon {
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
}
.btn-delivery--carrier .btn-delivery-icon svg {
  height: 20px;
  width: 20px;
}
.btn-delivery-label {
  flex: 1;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
}
.btn-delivery--correios .btn-delivery-label {
  font-weight: 700;
}
.btn-delivery .chevron {
  height: 20px;
  width: 20px;
  opacity: 0.7;
}

/* ── Wizard chrome ────────────────────────────────────────────────────── */
.wizard-header {
  z-index: 10;
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: var(--space-3) var(--space-4);
}
.wizard-header--sticky {
  position: sticky;
  top: 0;
}
.wizard-header-row {
  display: flex;
  align-items: center;
}
.wizard-back {
  display: flex;
  height: 44px;
  width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  color: var(--text-2);
  text-decoration: none;
  transition:
    color 0.15s,
    background 0.15s;
}
.wizard-back:hover {
  color: var(--primary-ink);
  background: var(--primary-soft);
}
.wizard-back svg {
  height: 22px;
  width: 22px;
}
.wizard-title {
  flex: 1;
  text-align: center;
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
}
.wizard-spacer {
  width: 44px;
}

.search-wrap {
  position: relative;
  margin-top: var(--space-3);
}
.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  height: 18px;
  width: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  min-height: 48px;
  border-radius: var(--r);
  border: 1.5px solid var(--line-strong);
  background: var(--input-bg);
  padding: var(--space-3) var(--space-3) var(--space-3) 44px;
  font-size: 1rem;
  color: var(--text);
}
.search-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search-input::placeholder {
  color: var(--muted);
}

/* The scroller stacks content, action bar and footer. On a short page the
   content takes the slack, so the bar and the footer rest at the bottom of
   the screen instead of floating mid-page; on a long one nothing changes. */
.wizard-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--space-6) var(--space-4) 0;
}
.wizard-main > :first-child {
  flex: 1 0 auto;
}
/* Edge to edge, like the bar above it: the side padding is the content's. */
.wizard-main > .site-footer {
  margin-inline: calc(-1 * var(--space-4));
}

/* Option cards (navigate levels) */
.option-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.option-card {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  gap: var(--space-4);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.option-card:hover {
  border-color: var(--primary);
}
.option-card:active {
  transform: translateY(1px);
}
.option-card .icon-circle {
  height: 40px;
  width: 40px;
  flex-shrink: 0;
}
.option-card .icon-circle svg {
  height: 20px;
  width: 20px;
}
.option-label {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.option-card .chevron {
  height: 20px;
  width: 20px;
  color: var(--muted);
}

/* On a wide screen the walker reads as one column: the header row, the
 * search, the destinations and the action bar share a measure, while the
 * header and bar surfaces and the footer stay edge to edge. */
.page-walker .wizard-header > *,
.page-walker .wizard-main > :first-child,
.page-walker .sticky-bar-row {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
}

/* Deliverable tiles: every one the same Azul Portal button. A grouped level
 * is one section per floor, headed "Andar 8". All of them share one grid:
 * a tile has a minimum width and the line holds as many columns as fit (4
 * at 390px), so every floor gets the same columns — 101 over 201 — and a
 * floor with more apartments than fit on a line wraps under them, whatever
 * the count. */
.tile-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.tile-group-label {
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 10px;
}
/* In the 36rem desktop column, 4.5rem would make seven small keys a line. */
@media (min-width: 640px) {
  .tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  }
}
.tile {
  position: relative;
  min-height: 52px;
  border-radius: var(--r);
  padding: var(--space-3) var(--space-2);
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  color: #ffffff;
  background: var(--primary);
  transition:
    background 0.15s,
    transform 0.15s;
}
.tile:hover {
  background: var(--primary-hover);
}
.tile:active {
  transform: translateY(1px);
}
/* How many deliveries the courier has marked here, the chips' badge. It
 * comes from `data-count`, never from text in the button: with a stale
 * stylesheet a text "2" after "804" would read "8042". */
.tile[data-count]::after {
  content: attr(data-count);
  position: absolute;
  right: -6px;
  top: -6px;
  display: flex;
  height: 20px;
  min-width: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-ink);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--primary);
}
.empty-note {
  margin-top: var(--space-6);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Destination chips + count badge */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chips--center {
  justify-content: center;
}
.chip {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: var(--space-1);
  border-radius: 9999px;
  background: var(--primary-soft);
  padding: var(--space-1) var(--space-3);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-ink);
}
.chip svg {
  height: 14px;
  width: 14px;
}
.chip-badge {
  position: absolute;
  right: -6px;
  top: -6px;
  display: flex;
  height: 20px;
  min-width: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--primary);
  padding: 0 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}
/* Chip forms submit − / × without looking like forms. */
.chip-form {
  display: inline-flex;
  margin: 0;
}

/* Sticky bottom action bar inside the scrolling main */
.sticky-bar {
  position: sticky;
  bottom: 0;
  margin: var(--space-6) calc(-1 * var(--space-4)) 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: var(--space-3) var(--space-4);
}
.sticky-bar-row {
  display: flex;
  gap: var(--space-3);
}
.sticky-bar-row > * {
  flex: 1;
}

/* ── Modals / popups ──────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--scrim);
}
.modal-card {
  margin: 0 var(--space-4);
  display: flex;
  max-height: 80vh;
  width: 100%;
  max-width: 24rem;
  flex-direction: column;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: var(--space-6);
  box-shadow: var(--shadow-pop);
}
.modal-title {
  margin-bottom: var(--space-4);
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.modal-title--tight {
  margin-bottom: var(--space-2);
}
.modal-message {
  margin-bottom: var(--space-6);
  text-align: center;
  color: var(--text-2);
  white-space: pre-line;
}
.modal-chips {
  margin-bottom: var(--space-5);
  display: flex;
  max-height: 10rem;
  justify-content: center;
  overflow-y: auto;
  /* room for the count badge, which overflows the chip */
  padding: var(--space-2) var(--space-2) 0;
}
.modal-actions-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.modal-actions-row {
  display: flex;
  gap: var(--space-3);
}
.modal-actions-center {
  display: flex;
  justify-content: center;
}
.modal-icon {
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: center;
}
.modal-icon svg {
  height: 48px;
  width: 48px;
  stroke-width: 1.75;
}
.modal-icon--amber svg {
  color: var(--warn-ink);
}
.btn-modal-cancel {
  flex: 1;
  min-height: 44px;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  padding: var(--space-2) var(--space-4);
  font-weight: 600;
  color: var(--text-2);
  transition: background 0.15s;
}
.btn-modal-cancel:hover {
  background: var(--surface-2);
}
.btn-modal-cancel:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn-modal-confirm {
  display: flex;
  flex: 1;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  background: var(--primary);
  padding: var(--space-2) var(--space-4);
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-modal-confirm:hover {
  background: var(--primary-hover);
}
.btn-modal-confirm:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn-modal-confirm--solo {
  flex: 0 1 auto;
  padding: var(--space-2) var(--space-6);
}

/* ── Forms ────────────────────────────────────────────────────────────── */
.field {
  margin-bottom: var(--space-4);
}
.field:last-child {
  margin-bottom: 0;
}
.field-label {
  margin-bottom: var(--space-1);
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
}
.field-label--medium {
  font-weight: 500;
}
.text-input {
  width: 100%;
  min-height: 48px;
  border-radius: var(--r);
  border: 1.5px solid var(--line-strong);
  background: var(--input-bg);
  padding: var(--space-2) var(--space-3);
  font-size: 1rem;
  color: var(--text);
}
.text-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.text-input::placeholder {
  color: var(--muted);
}

/* Lookup: the TNP prefix drawn over the field's padding */
.protocol-input-wrap {
  position: relative;
}
.protocol-prefix {
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  height: 100%;
  align-items: center;
  padding-left: var(--space-4);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
}
.protocol-input {
  width: 100%;
  min-height: 56px;
  border-radius: var(--r);
  border: 1.5px solid var(--line-strong);
  background: var(--input-bg);
  padding: var(--space-3) var(--space-4) var(--space-3) 72px;
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--text);
}
.protocol-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.protocol-input::placeholder {
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

/* ── Info blocks ──────────────────────────────────────────────────────── */
/* Precautions: what must not go in the box — attention, so Âmbar. */
.warning-box {
  border-radius: var(--r);
  border: 1px solid var(--warn-line);
  background: var(--warn-soft);
  padding: var(--space-4);
}
.warning-box-head {
  margin-bottom: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.warning-box-head svg {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
  color: var(--warn-ink);
}
.warning-box-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--warn-ink);
}
.warning-box-text {
  font-size: 1rem;
  color: var(--text-2);
}

/* Door status (confirmation page) */
.status-pill {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-radius: var(--r);
  padding: var(--space-4) var(--space-5);
}
.status-pill svg {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
}
.status-pill--wait {
  background: var(--steel-soft);
}
.status-pill--wait span {
  font-size: 0.875rem;
  color: var(--text-2);
}
.status-pill--wait svg {
  color: var(--primary-ink);
}
.status-pill--ok {
  background: var(--ok-soft);
}
.status-pill--ok span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ok-ink);
}
.status-pill--ok svg {
  color: var(--ok-ink);
}

/* Detail rows (correios review, confirmation, consultation pages) */
.detail-card {
  width: 100%;
  max-width: 24rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.detail-rows > * + * {
  border-top: 1px solid var(--line);
}
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
}
.detail-row--plain {
  padding: var(--space-3) 0;
}
.detail-row--stacked {
  display: block;
  padding: var(--space-3) 0;
}
.detail-row--link {
  min-height: 48px;
  text-decoration: none;
  transition: background 0.15s;
}
.detail-row--link:hover {
  background: var(--surface-2);
}
.detail-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
.detail-value {
  font-size: 0.875rem;
  text-align: right;
  color: var(--text);
}
.detail-key {
  font-size: 0.875rem;
  color: var(--text-2);
}
.detail-number {
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.detail-number--link {
  color: var(--primary-ink);
}
.badge-green {
  border-radius: 9999px;
  background: var(--ok-soft);
  padding: var(--space-1) var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ok-ink);
}

/* The protocol(s) under the confirmation, and the result pages' heading */
.protocol-line {
  font-size: 0.875rem;
  color: var(--muted);
}
.protocol-line-number {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.protocol-heading {
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--primary-ink);
}
.list-caption {
  font-size: 0.875rem;
  text-align: center;
  color: var(--muted);
}

/* The receipt code: the batch's recovery key, set apart */
.receipt-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.receipt-block-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
}
.receipt-code {
  border-radius: var(--r);
  border: 1.5px dashed var(--primary);
  background: var(--primary-soft);
  padding: var(--space-3) var(--space-5);
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--primary-ink);
  text-align: center;
}
.receipt-hint {
  font-size: 0.8125rem;
  text-align: center;
  color: var(--muted);
}

/* ── Footer (institutional) ───────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: var(--space-6);
}
.site-footer-inner {
  margin: 0 auto;
  max-width: 28rem;
  text-align: center;
}
.site-footer-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.site-footer-sub {
  margin-top: var(--space-1);
  font-size: 0.8125rem;
  color: var(--muted);
}
.site-footer-links {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}
.footer-whatsapp {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: var(--space-2);
  border-radius: 9999px;
  background: var(--whatsapp);
  padding: var(--space-2) var(--space-4);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: filter 0.15s;
}
.footer-whatsapp:hover {
  filter: brightness(0.95);
}
.footer-whatsapp svg {
  height: 16px;
  width: 16px;
}
.footer-instagram {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-instagram:hover {
  color: var(--instagram);
}
.footer-instagram svg {
  height: 16px;
  width: 16px;
}
.site-footer-legal {
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}
.site-footer-copy {
  font-size: 0.6875rem;
  color: var(--muted);
}
.theme-toggle {
  display: inline-flex;
  height: 44px;
  width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: var(--muted);
  transition:
    color 0.15s,
    background 0.15s;
}
.theme-toggle:hover {
  color: var(--primary-ink);
  background: var(--primary-soft);
}
.theme-toggle svg {
  height: 18px;
  width: 18px;
}
/* Sun shows in dark mode (tap → light), moon in light mode. */
.theme-toggle .icon-sun {
  display: none;
}
html.dark .theme-toggle .icon-sun {
  display: block;
}
html.dark .theme-toggle .icon-moon {
  display: none;
}

/* Timed reveals (slow-connect softening; manual confirmation fallback).
   Pure CSS: hidden until the animation delay elapses. */
.reveal-10s,
.reveal-30s {
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}
.reveal-10s {
  animation-delay: 10s;
}
.reveal-30s {
  animation-delay: 30s;
}

/* ── Utility helpers used by templates ────────────────────────────────── */
.mt-1 {
  margin-top: var(--space-1);
}
.mt-2 {
  margin-top: var(--space-2);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-1 {
  margin-bottom: var(--space-1);
}
.mb-2 {
  margin-bottom: var(--space-2);
}
.mb-3 {
  margin-bottom: var(--space-3);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-6 {
  margin-bottom: var(--space-6);
}
.mb-8 {
  margin-bottom: var(--space-8);
}
.w-full {
  width: 100%;
}
.max-w-sm {
  max-width: 24rem;
}
.hidden {
  display: none;
}
