:root {
  --ink: #0d1526;
  --paper: #f6f4ef;
  --card: #ffffff;
  --muted: rgba(13, 21, 38, 0.68);
  --line: rgba(13, 21, 38, 0.12);
  --accent: #6aa9ff;
  --accent-2: #3b82f6;
  --accent-3: #1d4ed8;
  --shadow: 0 16px 36px rgba(13, 21, 38, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 460px at -5% -10%, rgba(106, 169, 255, 0.24), transparent 70%),
    radial-gradient(980px 520px at 102% 0%, rgba(59, 130, 246, 0.2), transparent 68%),
    radial-gradient(820px 400px at 52% 120%, rgba(29, 78, 216, 0.08), transparent 72%),
    var(--paper);
}

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 38px;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 260px at 15% 22%, rgba(106, 169, 255, 0.22), transparent 72%),
    radial-gradient(520px 300px at 88% 18%, rgba(59, 130, 246, 0.18), transparent 74%);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.top-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.top-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.top-links a.strong {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  border: none;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
}

.hero-content {
  position: relative;
  z-index: 2;
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 22px;
}

.hero-copy {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(13, 21, 38, 0.08);
  backdrop-filter: blur(4px);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
}

.hero-copy h1 {
  margin: 14px 0 12px;
  font-family: "Fraunces", serif;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.02;
}

.hero-copy h1 span {
  display: inline-block;
  background: linear-gradient(130deg, var(--accent) 0%, var(--accent-2) 52%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  max-width: 62ch;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  appearance: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.35);
}

.btn.ghost {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.hero-card {
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(238, 246, 255, 0.92)),
    #fff;
  border: 1px solid rgba(59, 130, 246, 0.22);
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin: 0 0 14px;
  font-family: "Fraunces", serif;
  font-size: 26px;
}

.hero-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.hero-card li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(13, 21, 38, 0.09);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.hero-card i {
  color: var(--accent-2);
  font-size: 18px;
}

.section {
  padding: 32px 0;
}

.wizard {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 18px;
}

.wizard-nav,
.wizard-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.wizard-nav {
  padding: 20px;
}

.wizard-nav-head h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 32px;
}

.wizard-nav-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.step-list {
  list-style: none;
  margin: 18px 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.step-btn {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.step-btn:not([disabled]):hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 10px 18px rgba(13, 21, 38, 0.1);
}

.step-btn[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}

.step-btn.is-active {
  border-color: rgba(59, 130, 246, 0.58);
  background: linear-gradient(120deg, rgba(106, 169, 255, 0.12), rgba(59, 130, 246, 0.08));
}

.step-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 21, 38, 0.08);
  font-size: 12px;
}

.step-label {
  font-size: 13px;
  line-height: 1.25;
}

.step-state {
  font-size: 14px;
  color: var(--muted);
}

.progress-wrap {
  margin-top: 8px;
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(13, 21, 38, 0.12);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(130deg, var(--accent) 0%, var(--accent-2) 45%, var(--accent-3) 100%);
  transition: width 0.25s ease;
}

.progress-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.wizard-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wizard-card-head {
  border-bottom: 1px dashed var(--line);
  padding-bottom: 14px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #0f3f87;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 5px 11px;
}

.wizard-card h3 {
  margin: 12px 0 8px;
  font-family: "Fraunces", serif;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.06;
}

.wizard-card p {
  margin: 0;
  color: var(--muted);
}

.point-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 9px;
}

.point-list li {
  line-height: 1.45;
}

.tip-box {
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: linear-gradient(120deg, rgba(106, 169, 255, 0.14), rgba(59, 130, 246, 0.08));
  padding: 12px 14px;
  font-weight: 600;
}

.tip-box i {
  margin-right: 7px;
}

.match-guide-cta {
  border: 1px solid rgba(59, 130, 246, 0.32);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(228, 240, 255, 0.65), rgba(255, 255, 255, 0.92));
  padding: 12px;
}

.match-guide-cta.is-hidden {
  display: none;
}

.match-guide-cta h4 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 21px;
}

.match-guide-cta p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.match-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
}

.match-guide-modal.is-hidden {
  display: none;
}

.match-guide-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 19, 0.64);
}

.match-guide-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1240px, 80vw);
  height: min(920px, 80vh);
  margin: 10vh auto;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.34);
  background: linear-gradient(145deg, rgba(228, 240, 255, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 24px 56px rgba(4, 9, 19, 0.42);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.match-guide-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(13, 21, 38, 0.14);
}

.match-guide-modal-head h4 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 23px;
}

#matchGuideFrame,
#drawGuideFrame {
  width: 100%;
  height: 100%;
  border: 0;
}

#matchGuideFrame {
  background: #090c11;
}

#drawGuideFrame {
  background: #f6f4ef;
}

body.match-guide-open {
  overflow: hidden;
}

.wizard-actions {
  margin-top: auto;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.support-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
  box-shadow: var(--shadow);
}

.support-card h2 {
  margin: 0 0 14px;
  font-family: "Fraunces", serif;
  font-size: 30px;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-card h2 i {
  color: var(--accent-2);
}

.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.mini-list li {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.44;
}

.cta {
  margin-bottom: 44px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(130deg, rgba(226, 238, 255, 0.86), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cta h2 {
  margin: 0 0 7px;
  font-family: "Fraunces", serif;
  font-size: clamp(26px, 3.4vw, 38px);
}

.cta p {
  margin: 0;
  color: var(--muted);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1020px) {
  .hero-content,
  .wizard,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .wizard-nav {
    padding: 16px;
  }

  .step-list {
    max-height: 42vh;
    overflow: auto;
    padding-right: 2px;
  }

  .support-card h2 {
    font-size: 26px;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-links {
    width: 100%;
    flex-wrap: wrap;
  }

  .top-links a {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero-copy,
  .hero-card,
  .wizard-card,
  .support-card,
  .cta {
    border-radius: 16px;
  }

  .hero-copy {
    padding: 20px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions .btn,
  .wizard-actions .btn,
  .cta .btn {
    width: 100%;
  }

  .wizard-card {
    padding: 18px;
  }

  .match-guide-modal-dialog {
    width: min(1240px, 94vw);
    height: min(920px, 84vh);
    margin-top: 8vh;
  }

  .match-guide-modal-head {
    padding: 10px 12px;
  }

  .match-guide-modal-head h4 {
    font-size: 18px;
    line-height: 1.2;
  }

  .match-guide-modal-head .btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  .support-card h2 {
    font-size: 23px;
  }

  .cta {
    flex-direction: column;
    align-items: stretch;
  }
}
