:root {
  --bg: #090b0d;
  --panel: #101317;
  --panel-2: #15191e;
  --line: #292f35;
  --line-soft: #1e2328;
  --text: #f5f4ed;
  --muted: #979da3;
  --accent: #e6ff57;
  --accent-dark: #14190a;
  --danger: #ff8f70;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 75% 12%, rgba(230, 255, 87, 0.06), transparent 24rem),
    linear-gradient(180deg, #080a0c 0%, #0b0e11 55%, #080a0c 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.14em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  padding: 7px;
  border: 1px solid #3a4148;
  border-radius: 9px;
}

.brand-mark i {
  display: block;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.brand-mark i:nth-child(1) { height: 42%; }
.brand-mark i:nth-child(2) { height: 72%; }
.brand-mark i:nth-child(3) { height: 100%; }

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #b9bec3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(230, 255, 87, 0.7);
}

.hero { padding: 78px 0 72px; }

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 980px;
  margin: 18px 0 22px;
  font-size: clamp(54px, 8.5vw, 108px);
  line-height: 0.91;
  letter-spacing: -0.065em;
  font-weight: 900;
}

.hero-copy {
  max-width: 620px;
  margin: 0 0 42px;
  color: #b2b7bc;
  font-size: 18px;
  line-height: 1.55;
}

.search-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 18, 22, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.72fr 1fr 1fr;
}

.field {
  min-width: 0;
  padding: 24px 25px 23px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.field:last-child { border-right: 0; }

.field > span,
.strategy-label,
.panel-label {
  display: block;
  margin-bottom: 12px;
  color: #7e858b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 18px;
  font-weight: 800;
}

.field select { cursor: pointer; }
.field select option { background: #15191e; }
.field input[type="datetime-local"] { color-scheme: dark; }

.money-input {
  display: flex;
  align-items: center;
  gap: 5px;
}

.money-input b {
  color: var(--accent);
  font-size: 19px;
}

.strategy-block {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 18px;
  padding: 20px 25px;
  border-bottom: 1px solid var(--line);
}

.strategy-label { margin: 0; }

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode {
  padding: 10px 13px;
  border: 1px solid #323941;
  border-radius: 999px;
  background: #11151a;
  color: #a9afb5;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: 150ms ease;
}

.mode:hover { border-color: #555f69; color: #fff; }
.mode.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #0d1007;
}

.search-footer {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px 18px 25px;
}

.search-footer p {
  margin: 0;
  color: #777f86;
  font-size: 12px;
}

.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.06em;
  transition: transform 150ms ease, background 150ms ease;
}

.primary-button {
  min-width: 246px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 16px 0 20px;
  border-radius: 13px;
  background: var(--accent);
  color: #0d1007;
  font-size: 12px;
}

.primary-button:hover { transform: translateY(-2px); }
.primary-button:disabled { opacity: 0.6; cursor: wait; transform: none; }
.button-arrow { font-size: 20px; line-height: 1; }

.secondary-button {
  padding: 12px 15px;
  border: 1px solid #384048;
  border-radius: 11px;
  background: transparent;
  color: #d7dade;
  font-size: 10px;
}
.secondary-button:hover { border-color: var(--accent); color: var(--accent); }

.loading {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 80px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.loading-orbit {
  position: relative;
  width: 56px;
  height: 56px;
  animation: rotate 1.4s linear infinite;
}
.loading-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.loading-orbit span:nth-child(1) { top: 0; left: 23px; }
.loading-orbit span:nth-child(2) { right: 3px; bottom: 8px; opacity: 0.7; }
.loading-orbit span:nth-child(3) { left: 3px; bottom: 8px; opacity: 0.35; }
.loading strong { display: block; margin-bottom: 6px; font-size: 18px; }
.loading p { margin: 0; color: var(--muted); }
@keyframes rotate { to { transform: rotate(360deg); } }

.results { padding-bottom: 96px; }

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

.section-heading h2,
.section-heading h3 {
  margin: 7px 0 0;
  letter-spacing: -0.045em;
}
.section-heading h2 { font-size: clamp(34px, 5vw, 58px); }
.section-heading h3 { font-size: 28px; }
.section-heading.compact { margin-top: 44px; }

.route-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.route-top {
  display: grid;
  grid-template-columns: 0.8fr 1.7fr;
  min-height: 330px;
  border-bottom: 1px solid var(--line);
}

.score-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  background: var(--accent);
  color: #101309;
}

.match-number {
  font-size: clamp(100px, 15vw, 180px);
  line-height: 0.76;
  font-weight: 900;
  letter-spacing: -0.09em;
}

.match-word {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.score-panel p {
  max-width: 290px;
  margin: 28px 0 0;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}

.map-panel {
  min-width: 0;
  padding: 27px 29px 20px;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    #11151a;
  background-size: 34px 34px;
}

.route-map { min-height: 260px; }
.route-map svg { width: 100%; height: 260px; overflow: visible; }
.map-line-shadow { fill: none; stroke: rgba(230, 255, 87, 0.18); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.map-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 6 8; }
.map-point { fill: #11151a; stroke: var(--accent); stroke-width: 3; }
.map-point-home { fill: var(--accent); }
.map-label { fill: #f5f4ed; font-size: 11px; font-weight: 800; }
.map-country { fill: #7d858c; font-size: 8px; font-weight: 700; text-transform: uppercase; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 23px 25px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat span { display: block; color: #737b82; font-size: 9px; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; }
.stat strong { display: block; margin-top: 7px; font-size: 20px; letter-spacing: -0.025em; }

.route-body {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.7fr);
}

.route-body > div:first-child { padding: 32px; }

.timeline { margin-top: 10px; }

.travel-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 12px 0 12px 15px;
  margin-left: 17px;
  border-left: 1px dashed #3a4249;
}

.travel-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-left: -35px;
  border: 1px solid #3a4249;
  border-radius: 50%;
  background: #11151a;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.travel-main strong { display: block; font-size: 13px; }
.travel-main span { display: block; margin-top: 5px; color: #7f878e; font-size: 11px; }
.travel-price { color: #aab0b5; font-size: 12px; font-weight: 800; }
.travel-badge { color: var(--accent); }

.fixture-card {
  position: relative;
  display: grid;
  grid-template-columns: 98px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 20px;
  border: 1px solid #30373e;
  border-radius: 17px;
  background: #161a1f;
}

.fixture-time strong { display: block; color: var(--accent); font-size: 20px; }
.fixture-time span { display: block; margin-top: 5px; color: #81888f; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.fixture-main h4 { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.fixture-main p { margin: 8px 0 0; color: #858c92; font-size: 11px; }
.fixture-ticket { text-align: right; }
.fixture-ticket span { display: block; color: #727a80; font-size: 9px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.fixture-ticket strong { display: block; margin-top: 5px; font-size: 17px; }

.cost-panel {
  padding: 32px;
  border-left: 1px solid var(--line);
  background: #0f1317;
}

.cost-total {
  margin: 18px 0 28px;
  font-size: 64px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.07em;
}

.cost-row { margin-bottom: 18px; }
.cost-row-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 7px; font-size: 11px; }
.cost-row-head span { color: #90979d; }
.cost-row-head strong { color: #e8e9e4; }
.cost-bar { height: 4px; overflow: hidden; border-radius: 99px; background: #242a30; }
.cost-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.overnights {
  margin-top: 30px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.night-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  color: #9aa1a7;
  font-size: 11px;
}
.night-row strong { color: #e7e8e3; }

.estimate-note {
  margin: 28px 0 0;
  color: #656d74;
  font-size: 10px;
  line-height: 1.55;
}

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

.alternative-card {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #101317;
  cursor: pointer;
  transition: 160ms ease;
}
.alternative-card:hover { transform: translateY(-2px); border-color: #4c565f; }
.alternative-count { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-dark); color: var(--accent); font-size: 34px; font-weight: 900; }
.alternative-card h4 { margin: 0 0 7px; font-size: 16px; }
.alternative-card p { margin: 0; color: #7e868d; font-size: 11px; line-height: 1.45; }
.alternative-cost { font-size: 20px; font-weight: 900; }

.engine-note {
  display: grid;
  grid-template-columns: 120px minmax(0, 720px);
  gap: 30px;
  padding-top: 68px;
  padding-bottom: 100px;
  border-top: 1px solid var(--line-soft);
}
.engine-index { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: 0.18em; }
.engine-note h3 { margin: 0 0 14px; font-size: 32px; letter-spacing: -0.04em; }
.engine-note p { margin: 0; color: #949ba1; font-size: 15px; line-height: 1.7; }

.site-footer {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line-soft);
  color: #5f676e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(360px, calc(100% - 44px));
  padding: 13px 15px;
  border: 1px solid #3e474f;
  border-radius: 12px;
  background: #151a1f;
  color: #f1f1eb;
  font-size: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255, 143, 112, 0.55); color: #ffd1c4; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field:nth-child(2) { border-right: 0; }
  .route-top { grid-template-columns: 1fr; }
  .score-panel { min-height: 300px; }
  .route-body { grid-template-columns: 1fr; }
  .cost-panel { border-left: 0; border-top: 1px solid var(--line); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 650px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-header { height: 72px; }
  .demo-pill { display: none; }
  .hero { padding: 54px 0 52px; }
  h1 { font-size: clamp(49px, 15vw, 72px); }
  .hero-copy { font-size: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .field { border-right: 0; }
  .strategy-block { grid-template-columns: 1fr; }
  .mode-switch { display: grid; grid-template-columns: 1fr 1fr; }
  .search-footer { align-items: stretch; flex-direction: column; }
  .primary-button { width: 100%; }
  .section-heading { align-items: start; flex-direction: column; }
  .score-panel { padding: 30px; }
  .match-number { font-size: 120px; }
  .map-panel { padding-inline: 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 18px; }
  .route-body > div:first-child,
  .cost-panel { padding: 22px 18px; }
  .fixture-card { grid-template-columns: 78px 1fr; }
  .fixture-ticket { grid-column: 2; text-align: left; display: flex; align-items: center; gap: 8px; }
  .fixture-ticket strong { margin: 0; }
  .travel-row { grid-template-columns: 34px 1fr; }
  .travel-price { grid-column: 2; }
  .alternatives { grid-template-columns: 1fr; }
  .alternative-card { grid-template-columns: 64px 1fr; }
  .alternative-cost { grid-column: 2; }
  .engine-note { grid-template-columns: 1fr; gap: 12px; padding-bottom: 68px; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

.data-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px 0 18px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 21, 26, 0.86);
  color: #858d94;
  font-size: 11px;
  line-height: 1.45;
}
.data-notice strong {
  flex: 0 0 auto;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quality-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 3px 5px;
  border: 1px solid #414951;
  border-radius: 5px;
  color: #9fa6ac;
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.08em;
  vertical-align: 2px;
}
.quality-live,
.quality-converted_live {
  border-color: rgba(230, 255, 87, 0.55);
  color: var(--accent);
}
.quality-sandbox {
  border-color: #e6b257;
  color: #e6b257;
}

.mini-link {
  display: inline-block;
  margin-top: 7px;
  padding: 5px 7px;
  border: 1px solid #414951;
  border-radius: 6px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.mini-link:hover { border-color: var(--accent); }
.travel-price .mini-link { display: block; text-align: center; }

@media (max-width: 680px) {
  .data-notice { align-items: flex-start; flex-direction: column; }
}
