@font-face {
  font-family: "Roboto";
  src: url("/assets/v1/fonts/roboto-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("/assets/v1/fonts/roboto-latin-700-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #000;
  --sunken: #020a11;
  --footer: #0b0f14;
  --surface: #111923;
  --card: #1a2437;
  --card-hover: #202d45;
  --muted-border: #2e3a52;
  --strong-border: #404b60;
  --text: #f6f8fa;
  --text-soft: #dfe5e8;
  --text-muted: #8896a7;
  --cyan: #14e4c9;
  --cyan-soft: rgba(20, 228, 201, 0.14);
  --gold: #d4a557;
  --gold-bright: #f1d096;
  --success: #4dd67c;
  --danger: #f56f78;
  --radius-lg: 24px;
  --radius-md: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--black);
  color: var(--text);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button,
summary {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header,
.gateway-shell {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.source-logo {
  position: relative;
  display: block;
  overflow: hidden;
}

.source-logo img {
  position: absolute;
  display: block;
  max-width: none;
}

.source-logo--header {
  width: 185px;
  height: 27px;
}

.source-logo--header img {
  top: -12.66px;
  left: -4.16px;
  width: 193.3px;
  height: auto;
}

.source-logo--hero {
  width: 170px;
  height: 112px;
  margin: 0 auto 12px;
}

.source-logo--hero img {
  top: -43.1px;
  left: -18.9px;
  width: 201.5px;
  height: auto;
}

.gateway-shell {
  width: min(720px, calc(100% - 32px));
  min-height: calc(100vh - 86px);
  margin: 0 auto;
  padding: 54px 0 42px;
  display: grid;
  place-items: center;
}

.gateway-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(111, 131, 160, 0.38);
  border-radius: var(--radius-lg);
  background: var(--sunken);
}

.card-heading,
.state-panel {
  position: relative;
  z-index: 1;
}

.card-heading {
  padding: 38px 56px 25px;
  text-align: center;
}

.result-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 13px;
  color: var(--gold-bright);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.23em;
}

.card-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.85rem, 5vw, 2.55rem);
  line-height: 1.13;
  letter-spacing: -0.035em;
}

.card-heading p {
  max-width: 510px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.state-panel {
  min-height: 270px;
  margin: 0;
  padding: 36px 32px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.state-panel--wide {
  padding-inline: 26px;
}

.state-panel h2 {
  margin: 17px 0 7px;
  font-size: clamp(1.28rem, 4vw, 1.6rem);
  line-height: 1.2;
}

.state-panel > p:not(.result-kicker, .inline-error) {
  max-width: 440px;
  margin: 0;
  color: var(--text-muted);
}

.orb-loader {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 228, 201, 0.25);
  border-radius: 50%;
}

.orb-loader::before,
.orb-loader::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid transparent;
  border-top-color: var(--cyan);
  border-right-color: rgba(20, 228, 201, 0.16);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.orb-loader::after {
  inset: 18px;
  border-width: 1px;
  border-top-color: var(--gold);
  animation-direction: reverse;
  animation-duration: 1.5s;
}

.orb-loader span:first-child {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-bright);
}

.state-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 19px;
}

.state-icon svg {
  width: 35px;
  height: 35px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.state-icon--shield {
  border: 1px solid rgba(20, 228, 201, 0.25);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.state-icon--success {
  border: 1px solid rgba(77, 214, 124, 0.25);
  background: rgba(77, 214, 124, 0.1);
  color: var(--success);
}

.state-icon--warning {
  border: 1px solid rgba(245, 111, 120, 0.28);
  background: rgba(245, 111, 120, 0.08);
  color: var(--danger);
  font-size: 1.7rem;
  font-weight: 400;
}

.turnstile-shell {
  position: relative;
  min-height: 76px;
  min-width: min(100%, 300px);
  margin: 25px 0 6px;
  display: grid;
  place-items: center;
}

.turnstile-shell #turnstile-widget {
  transition: opacity 160ms ease;
}

.turnstile-shell::after {
  content: attr(data-status);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.turnstile-shell.is-retrying #turnstile-widget {
  opacity: 0;
  pointer-events: none;
}

.turnstile-shell.is-retrying::after {
  opacity: 1;
}

.inline-error {
  margin: 10px 0 0;
  color: #ff9aa1;
  font-size: 0.82rem;
}

.scan-symbol {
  position: relative;
  width: 70px;
  height: 70px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.scan-symbol img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  opacity: 0.95;
}

.scan-symbol > span {
  position: absolute;
  top: 0;
  left: 4px;
  width: calc(100% - 8px);
  height: 1px;
  background: var(--cyan);
  animation: scan 1.8s ease-in-out infinite;
}

.mirror-list {
  width: 100%;
  margin-top: 25px;
  display: grid;
  gap: 8px;
}

.mirror-row {
  min-height: 63px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(74, 91, 116, 0.46);
  border-radius: var(--radius-md);
  background: rgba(26, 36, 55, 0.62);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.mirror-row__order {
  color: #66768c;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mirror-row__copy {
  display: flex;
  align-items: center;
}

.mirror-row__copy strong {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.mirror-row__status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8290a2;
  font-size: 0.7rem;
}

.mirror-row__status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.mirror-row__status b {
  font-weight: 400;
}

.mirror-row.is-checking {
  border-color: rgba(20, 228, 201, 0.38);
  background: rgba(20, 228, 201, 0.055);
}

.mirror-row.is-checking .mirror-row__status {
  color: var(--cyan);
}

.mirror-row.is-checking .mirror-row__status span {
  animation: pulse 1s ease-in-out infinite;
}

.mirror-row.is-available {
  border-color: rgba(77, 214, 124, 0.34);
  background: rgba(77, 214, 124, 0.06);
}

.mirror-row.is-available .mirror-row__status {
  color: var(--success);
}

.mirror-row.is-unavailable {
  opacity: 0.58;
}

.mirror-row.is-unavailable .mirror-row__status {
  color: var(--danger);
}

.result-kicker {
  margin-top: 20px;
  margin-bottom: 0;
  color: var(--success);
}

.redirect-line {
  width: min(290px, 85%);
  height: 2px;
  margin-top: 29px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--muted-border);
}

.redirect-line span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left;
  background: linear-gradient(90deg, var(--cyan), var(--success));
  animation: redirect-progress 600ms ease-out both;
}

.button {
  min-height: 48px;
  margin-top: 26px;
  padding: 0 27px;
  border: 1px solid var(--strong-border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button--primary {
  background: var(--card);
}

.button:hover {
  border-color: rgba(20, 228, 201, 0.6);
  background: var(--card-hover);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:focus-visible,
.manual-access summary:focus-visible,
.manual-link:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.manual-access {
  width: min(430px, 100%);
  margin-top: 12px;
}

.manual-access summary {
  padding: 12px;
  cursor: pointer;
  color: #9ba7b7;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  list-style: none;
}

.manual-access summary::-webkit-details-marker {
  display: none;
}

.manual-access summary::after {
  content: "+";
  margin-left: 9px;
  color: var(--cyan);
}

.manual-access[open] summary::after {
  content: "−";
}

.manual-access__links {
  display: grid;
  gap: 7px;
}

.manual-link {
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--muted-border);
  border-radius: 9px;
  background: rgba(26, 36, 55, 0.65);
  color: var(--text-soft);
  font-size: 0.82rem;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.manual-link::after {
  content: "↗";
  color: var(--cyan);
}

.manual-link:hover {
  border-color: rgba(20, 228, 201, 0.5);
  background: var(--card);
}

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

@keyframes scan {
  0%, 100% { transform: translateY(5px); opacity: 0.25; }
  50% { transform: translateY(59px); opacity: 1; }
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

@keyframes redirect-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 640px) {
  .site-header {
    width: min(100% - 28px, 1180px);
    min-height: 72px;
  }

  .gateway-shell {
    width: min(100% - 20px, 720px);
    min-height: calc(100vh - 150px);
    padding: 26px 0 30px;
  }

  .gateway-card {
    border-radius: 19px;
  }

  .source-logo--hero {
    width: 135px;
    height: 89px;
    margin-bottom: 10px;
  }

  .source-logo--hero img {
    top: -34.2px;
    left: -15px;
    width: 160px;
  }

  .card-heading {
    padding: 36px 24px 23px;
  }

  .card-heading p {
    font-size: 0.8rem;
  }

  .card-heading h1 {
    font-size: 1.7rem;
  }

  .state-panel {
    min-height: 260px;
    padding: 30px 17px;
  }

  .state-panel > p:not(.result-kicker, .inline-error) {
    max-width: 285px;
    font-size: 0.9rem;
  }

  .mirror-row {
    grid-template-columns: 30px 1fr;
    gap: 9px;
  }

  .mirror-row__status {
    grid-column: 2;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
