/* The page a shared passport opens on in a browser. The app's own paper,
   ink and stamp colours; flat, like the icon. */
:root {
  --sky: #d5e2f6;
  --haze: #f2f0f6;
  --paper: #fbfbf9;
  --ink: #172240;
  --muted: #586175;
  --rule: #e2eaf8;
  --carmine: #e03940;
  --cobalt: #2266e0;
  --teal: #0a8d77;
  --violet: #7551e0;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(var(--sky), var(--haze)) fixed;
  color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  display: grid;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand img { border-radius: 11px; box-shadow: 0 2px 8px rgb(23 34 64 / 0.14); }

.card {
  background: var(--paper);
  border-radius: 24px;
  padding: 24px 22px;
  box-shadow: 0 12px 32px rgb(23 34 64 / 0.10);
}

.label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.quiet { color: var(--muted); margin: 4px 0 0; }
.small { font-size: 14px; }

.figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 22px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.figures dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.figures dd {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.figures dd.date { font-size: 17px; padding-top: 7px; }

/* Each country as a stamp: an outline in one of the four inks, never quite square. */
.stamps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
}

.stamps li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 10px;
  border: 2.5px solid currentColor;
  outline: 1px solid currentColor;
  outline-offset: -6px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stamps li:nth-child(4n + 1) { color: var(--carmine); transform: rotate(-2deg); border-radius: 999px; }
.stamps li:nth-child(4n + 2) { color: var(--cobalt); transform: rotate(1.5deg); }
.stamps li:nth-child(4n + 3) { color: var(--teal); transform: rotate(-1deg); border-radius: 999px; }
.stamps li:nth-child(4n + 4) { color: var(--violet); transform: rotate(2deg); }

.stamps .flag { font-size: 18px; line-height: 1; }

.actions { display: grid; gap: 10px; text-align: center; }

.button {
  display: block;
  padding: 16px 20px;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  color: var(--ink);
  background: rgb(255 255 255 / 0.7);
  box-shadow: inset 0 0 0 1px rgb(23 34 64 / 0.10);
}

.button.primary { background: var(--ink); color: white; box-shadow: none; }
.button:active { transform: scale(0.98); }
.button:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

footer { text-align: center; padding: 0 8px; }
footer p { margin: 0; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .card, .actions { animation: arrive 0.35s ease-out both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(8px); } }
}
