:root {
  --bg: #07111f;
  --panel: rgba(15, 23, 42, 0.92);
  --panel-soft: rgba(15, 23, 42, 0.64);
  --border: rgba(148, 163, 184, 0.15);
  --surface-raised: #101b2d;
  --field-border: rgba(148, 163, 184, 0.22);
  --text: #e8f0fc;
  --muted: #96a8c3;
  --accent: #34d399;
  --accent-strong: #6ee7b7;
  --bad: #ef4444;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; color-scheme: dark; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 12% 0%, rgba(52, 211, 153, 0.17), transparent 30%),
    radial-gradient(circle at 95% 4%, rgba(34, 211, 238, 0.12), transparent 29%),
    linear-gradient(180deg, #08111f 0%, #0b1322 48%, #07111b 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 80%);
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.page {
  width: min(100% - 28px, 720px);
  margin: 0 auto;
  padding: 30px 0 56px;
}

.hero { padding: 8px 4px 22px; }

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hero-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.58);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.hero-home:hover { background: rgba(255, 255, 255, 0.075); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a7f3d0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.72);
}

h1 {
  margin: 12px 0 8px;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}

.step {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.step-number {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 50%;
  background: rgba(255,255,255,0.035);
  color: #c8d6e8;
  font-size: 0.75rem;
}

.step.active {
  color: var(--text);
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.08);
}

.step.active .step-number {
  border-color: transparent;
  color: #052e2b;
  background: var(--accent);
}

.card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.search-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.35);
}

.search-mode button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 100ms ease;
}

.search-mode button:active { transform: scale(0.985); }

.search-mode button.active {
  color: #052e2b;
  background: var(--accent-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.search-field { position: relative; }

.search-field input {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 15px;
  outline: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(18, 27, 45, 0.98), rgba(9, 14, 25, 0.98));
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-field input::placeholder { color: #7387a4; }

.search-field input:focus {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.11);
}

.trial-results {
  position: absolute;
  z-index: 10;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 315px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: #0a1322;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
}

.trial-result {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.trial-result:hover,
.trial-result:focus-visible {
  outline: none;
  background: rgba(52, 211, 153, 0.1);
}

.trial-result strong,
.trial-result span {
  display: block;
}

.trial-result strong { font-size: 0.9rem; font-weight: 750; }
.trial-result span { color: var(--muted); font-size: 0.86rem; line-height: 1.35; }

.selected-site {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 14px 15px;
  border: 1px solid rgba(52, 211, 153, 0.26);
  border-radius: 15px;
  background: rgba(52, 211, 153, 0.08);
}

.selected-site strong {
  color: #d1fae5;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.selected-site span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.selected-site .trial-limit-note {
  margin-top: 3px;
  color: #a7f3d0;
  font-size: 0.82rem;
  font-weight: 720;
}

.selected-site .trial-limit-note.bad {
  color: #fca5a5;
}

.site-help {
  margin: 14px 0 0;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 15px;
  background: rgba(2, 6, 23, 0.22);
}

.site-help summary {
  padding: 13px 15px;
  color: #dce8f7;
  font-size: 0.88rem;
  font-weight: 780;
  cursor: pointer;
  list-style: none;
}

.site-help summary::-webkit-details-marker { display: none; }
.site-help summary::after { content: "+"; float: right; color: var(--accent); font-size: 1.15rem; line-height: 1; }
.site-help[open] summary::after { content: "-"; }
.site-help .site-guide { margin: 0 12px 12px; }

.site-guide {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 250px) 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 18%, rgba(52, 211, 153, 0.11), transparent 38%),
    rgba(2, 6, 23, 0.32);
}

.site-guide-visual {
  position: relative;
  min-height: 290px;
  display: grid;
  place-items: center;
  padding: 30px 14px 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 15px;
  background: rgba(8, 15, 28, 0.52);
}

.site-guide img {
  width: min(210px, 100%);
  height: auto;
  max-height: 285px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.28));
}

.site-guide-marker {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 999px;
  color: #052e2b;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(52, 211, 153, 0.2);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-guide-marker::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--accent);
}

.site-guide-copy strong {
  display: block;
  margin-bottom: 7px;
  color: #e6eefb;
  font-size: 1rem;
}

.site-guide-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.site-guide-example {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 999px;
  color: #cfe0ef;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.76rem;
  font-weight: 750;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 11px 16px;
  border: 0;
  border-radius: 14px;
  color: #052e2b;
  background: var(--accent-strong);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: #86efac; }

.button.secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
}

.button.secondary:hover { background: rgba(255, 255, 255, 0.075); }
.button:disabled { opacity: 0.45; cursor: not-allowed; }

.claim-button {
  width: 100%;
  margin-top: 16px;
}

.trial-message {
  min-height: 1.35em;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.45;
  text-align: center;
}

.trial-message.bad { color: #fca5a5; }

.trial-state {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 26px 28px 30px;
  text-align: center;
}

.trial-state > strong {
  display: block;
  font-size: 1.18rem;
}

.trial-state.success {
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 15px;
  background: rgba(52, 211, 153, 0.07);
}

.state-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.support-note {
  margin: 18px 2px 0;
  color: #91a4bf;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.support-note a {
  color: #cdeefa;
  font-weight: 750;
  text-decoration: none;
}

.support-note a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .page {
    width: min(100% - 20px, 720px);
    padding-top: 20px;
  }

  .card {
    padding: 17px;
    border-radius: 12px;
  }

  .steps {
    gap: 5px;
  }

  .step {
    min-height: 50px;
    justify-content: center;
    padding: 8px 4px;
    font-size: 0.76rem;
  }

  .step-number {
    width: 22px;
    height: 22px;
  }

  .section-title-row {
    display: grid;
    gap: 5px;
  }

  .site-guide {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }

  .site-guide-visual {
    min-height: 310px;
    padding: 32px 14px 14px;
  }

  .site-guide img {
    width: min(225px, 100%, 72vw);
    max-height: 300px;
  }

  .site-guide-copy {
    text-align: center;
  }

  .site-guide-copy p {
    font-size: 0.86rem;
  }

  .state-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
}
