:root {
  color-scheme: dark;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #0b2632;
  color: #edf8f6;
  --muted: #b6d1d0;
  --edge: #396870;
  --mint: #9eeadd;
}

* { box-sizing: border-box }
[hidden] { display: none !important }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 100% 50%, #1a665649, transparent 62%),
    radial-gradient(ellipse at 0% 0%, #113f5b, transparent 57%),
    repeating-radial-gradient(ellipse at 78% 132%, transparent 0 35px, #93e2cd12 36px 37px, transparent 38px 52px) bottom / 100% 190px no-repeat,
    linear-gradient(156deg, #0d2634 10%, #0a3436 95%);
}
.shell {
  width: min(100%, 530px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 18px max(26px, env(safe-area-inset-bottom));
}
.masthead { display: flex; align-items: center; gap: 10px; padding: 3px 1px 13px }
h1, h2, p { margin: 0 }
h1 { font-size: clamp(1.38rem, 6vw, 1.65rem); line-height: 1.2; letter-spacing: -.025em }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round }
.masthead svg { color: #82e1c9; width: 27px; flex: 0 0 27px }
.hero { border: 1px solid #588982; background: #183e40; border-radius: 24px; overflow: hidden; aspect-ratio: 1020 / 574 }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block }
.hero-fallback {
  height: 100%;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 22px;
  background: linear-gradient(148deg, #124d48, #1d7766);
}
.hero-fallback strong { font-size: clamp(1.65rem, 8vw, 2.4rem) }
.hero-fallback span { color: #ddf4e4 }

.card {
  --pulse: #79e8a9;
  --badge-bg: #184a43;
  --badge-stroke: #2f6c61;
  --badge-ink: #c1f4d7;
  margin-top: 14px;
  padding: 17px;
  border: 1px solid var(--edge);
  border-radius: 24px;
  background: #102d36;
  box-shadow: 0 12px 26px #00171e36;
}
.card[data-state="loading"], .card[data-state="outside"] {
  --pulse: #81dbc9; --badge-bg: #1b484e; --badge-stroke: #387477; --badge-ink: #c5eae5;
}
.card[data-state="new"], .card[data-state="pending"], .card[data-state="issuing"],
.card[data-state="revoking"], .card[data-state="enabling"] {
  --pulse: #f2ca7d; --badge-bg: #4a3a27; --badge-stroke: #7b6540; --badge-ink: #fbe1aa;
}
.card[data-state="error"], .card[data-state="expired"], .card[data-state="rejected"], .card[data-state="revoked"] {
  --pulse: #ffab9f; --badge-bg: #4b3338; --badge-stroke: #795159; --badge-ink: #ffd8d0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 33px;
  padding: 4px 11px;
  border: 1px solid var(--badge-stroke);
  border-radius: 99px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-size: .81rem;
  font-weight: 650;
}
.signal { position: relative; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--pulse) }
.signal::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1px solid var(--pulse);
  border-radius: inherit;
  animation: pulse 2.16s ease-out infinite;
}
@keyframes pulse { from { transform: scale(1); opacity: .65 } 80%,to { transform: scale(1.8); opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .signal::after { animation: none; opacity: .28 } }
.card h2 { margin-top: 13px; font-size: clamp(1.26rem, 5.6vw, 1.58rem); line-height: 1.2; letter-spacing: -.025em }
.card p { margin-top: 5px; color: var(--muted); font-size: .89rem }
.term {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px;
  min-height: 42px; margin-top: 14px; padding: 8px 11px;
  border-radius: 12px; background: #163b44; font-size: .79rem; color: #b6d4d1;
}
.term svg { width: 19px; color: #83c5b2; flex: none }
.term strong { margin-inline-start: auto; white-space: nowrap; font-size: .84rem; color: #e2f6ed }
.button {
  display: flex; width: 100%; align-items: center; justify-content: center;
  min-height: 49px; padding: 10px 35px; border-radius: 15px;
  position: relative; border: 0; text-align: center; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.button svg { position: absolute; right: 12px; width: 19px; stroke-width: 2 }
.primary { margin-top: 11px; background: linear-gradient(180deg,#a4f2c5,#74dfbc); color: #0b3029 }
.primary:active { background: #a5eed4 }
.secondary { padding-inline: 12px; margin-top: 8px; background: #21515a; color: #e3f7f4 }

details { margin-top: 10px; border-top: 1px solid #34545c }
summary {
  display: flex; align-items: center; justify-content: space-between; gap: 7px;
  list-style: none; min-height: 42px; padding: 8px 7px 2px;
  color: #c7e6e1; cursor: pointer; font-size: .87rem; font-weight: 650;
}
summary::-webkit-details-marker { display: none }
summary svg { flex: 0 0 20px }
details[open] summary svg { transform: rotate(180deg) }
details p { font-size: .83rem }
textarea {
  width: 100%; min-height: 74px; margin-top: 8px; padding: 8px 10px;
  border: 1px solid #507c80; border-radius: 9px; background: #0b252d;
  color: #e6f9f4; resize: vertical; font-size: 1rem;
}
.feedback { color: #bdedce !important }
.download { display: inline-flex; align-items: center; min-height: 42px; color: var(--mint); font-size: .87rem }

.services { margin-top: 19px }
.services h2 { font-size: 1.12rem; line-height: 1.3 }
.services-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 8px }
.tile {
  min-height: 65px; display: flex; align-items: center; gap: 7px;
  padding: 7px 8px; border: 1px solid var(--edge); border-radius: 17px;
  color: #e4f6f4; background: #133b44; text-decoration: none; font-size: .81rem;
}
.tile-icon {
  flex: 0 0 33px; height: 33px; display: grid; place-items: center;
  background: #20565a; color: var(--mint); border-radius: 11px;
}
.tile-icon svg { width: 19px; height: 19px }
.next { margin-inline-start: auto; color: #9bd5d1; font-size: 1.2rem }
:focus-visible { outline: 2px solid #b2ffd8; outline-offset: 3px }
@media (max-width: 360px) {
  .shell { padding-inline: 13px }
  .card { padding: 14px }
  .tile { gap: 6px; font-size: .77rem }
  .tile-icon { flex-basis: 27px; height: 30px }
}
@media (max-width: 305px) { .services-grid { grid-template-columns: 1fr } }
