:root {
  color-scheme: light;
  --ink: #18212b;
  --muted: #5b6773;
  --line: #d8e0e5;
  --line-strong: #aebbc4;
  --soft: #f4f7f8;
  --surface: #ffffff;
  --brand: #e43d30;
  --brand-dark: #bd2f25;
  --navy: #173d5c;
  --success: #12715b;
  --success-soft: #eaf7f2;
  --info: #176a9b;
  --info-soft: #edf7fb;
  --error: #b42318;
  --error-soft: #fef3f2;
  --focus: #1769aa;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--surface); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

main { flex: 1; }

button, input { font: inherit; letter-spacing: 0; }

.content-width,
.header-inner,
.footer-inner {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .98);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo-window {
  position: relative;
  display: block;
  width: 146px;
  height: 42px;
  overflow: hidden;
}

.brand-logo-window img {
  position: absolute;
  top: -50px;
  left: -32px;
  width: 192px;
  height: 115px;
  max-width: none;
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.secure-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.lookup-section {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.intro-block { max-width: 780px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

h1, h2, h3 { margin: 0; letter-spacing: 0; line-height: 1.2; }
h1 { max-width: 760px; font-size: 46px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }

.lead {
  max-width: 680px;
  margin: 14px 0 30px;
  color: var(--muted);
  font-size: 18px;
}

.lookup-tool {
  max-width: 780px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(24, 33, 43, .07);
}

.tool-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

.tool-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.step-number {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-weight: 750;
}

form { width: 100%; }
label { display: block; margin-bottom: 8px; font-weight: 700; }

.lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface);
  text-transform: uppercase;
}

input::placeholder { color: #8a96a0; }

input:focus,
button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 28%, transparent);
  outline-offset: 2px;
}

button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 750;
}

#lookup-button {
  min-height: 52px;
  color: #fff;
  background: var(--brand);
}

#lookup-button:hover { background: var(--brand-dark); }
button:disabled { cursor: wait; opacity: .72; }

.status {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 18px;
  border: 1px solid #b9dbe9;
  border-radius: 6px;
  padding: 14px;
  color: #174b68;
  background: var(--info-soft);
}

.status[hidden] { display: none; }
.status.error { border-color: #f1b4ae; color: #7a271a; background: var(--error-soft); }
.status.success { border-color: #a9ddca; color: #105a47; background: var(--success-soft); }

.status-indicator {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: status-spin .9s linear infinite;
}

.status.error .status-indicator,
.status.success .status-indicator {
  display: grid;
  place-items: center;
  border: 0;
  animation: none;
}

.status.error .status-indicator::before { content: "!"; font-weight: 800; }
.status.success .status-indicator::before { content: "✓"; font-weight: 800; }

.status-copy { min-width: 0; }
.status-copy strong { display: block; color: inherit; }
.status-copy p { margin: 2px 0 0; color: inherit; }
.status-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }

.trust-row {
  max-width: 780px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

.result-section { padding: 44px 0 72px; }

.ready-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  border: 1px solid #a9ddca;
  border-radius: 8px;
  padding: 15px 18px;
  color: #105a47;
  background: var(--success-soft);
}

.ready-banner div { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.ready-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  font-weight: 800;
}

.result-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}

.success-eyebrow { color: var(--success); }
.result-note { max-width: 600px; margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.order-reference { color: var(--muted); font-size: 13px; text-align: right; }
.order-reference span, .order-reference strong { display: block; }
.order-reference strong { color: var(--ink); font-size: 15px; }

.esim-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.esim-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(24, 33, 43, .06);
}

.esim-card-header {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.esim-card-header h3 { overflow-wrap: anywhere; }
.unit-label {
  flex: 0 0 auto;
  align-self: flex-start;
  border: 1px solid #b9dbe9;
  border-radius: 999px;
  padding: 3px 8px;
  color: #174b68;
  background: var(--info-soft);
  font-size: 12px;
  white-space: nowrap;
}

.variation { margin-top: 4px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

.qr-panel {
  width: min(100%, 316px);
  margin: 20px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  background: #fbfcfc;
}

.qr-panel span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.qr-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  image-rendering: pixelated;
}

.detail-list {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 9px 12px;
  margin: 0;
  font-size: 14px;
}

.detail-list dt { color: var(--muted); }
.detail-list dd { min-width: 0; margin: 0; font-weight: 650; overflow-wrap: anywhere; }

.activation-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.activation-row strong { font-size: 14px; }
.activation-code {
  display: block;
  max-height: 76px;
  margin-top: 7px;
  overflow: auto;
  color: #344054;
  font: 12px/1.45 Consolas, monospace;
  overflow-wrap: anywhere;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.secondary-button { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.secondary-button:hover { background: var(--soft); }

footer {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--soft);
  font-size: 13px;
}

.footer-inner { display: flex; justify-content: space-between; gap: 16px; }
.footer-inner strong { color: var(--ink); }

@keyframes status-spin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
  .content-width, .header-inner, .footer-inner { width: min(100% - 24px, 1040px); }
  .header-inner { min-height: 68px; }
  .brand-logo-window { width: 136px; }
  .secure-label {
    max-width: 104px;
    font-size: 11px;
    line-height: 1.2;
    text-align: right;
  }
  .lookup-section { padding: 42px 0 30px; }
  h1 { font-size: 34px; }
  h2 { font-size: 21px; }
  .lead { margin-bottom: 24px; font-size: 16px; }
  .lookup-tool { padding: 18px; }
  .lookup-row { grid-template-columns: 1fr; }
  .trust-row { display: grid; gap: 8px; }
  .result-heading { align-items: start; flex-direction: column; }
  .order-reference { text-align: left; }
  .esim-list { grid-template-columns: minmax(0, 1fr); }
  .card-actions { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
