:root {
  color-scheme: light;
  --ink: #102033;
  --muted: #5b6678;
  --line: #dde4ec;
  --paper: #fffaf3;
  --surface: #ffffff;
  --coral: #ff4f68;
  --coral-dark: #dc2848;
  --teal: #16bcb5;
  --lemon: #ffd84d;
  --blue: #184c7f;
  --shadow: 0 22px 60px rgba(16, 32, 51, 0.16);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(22, 188, 181, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 79, 104, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.45;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 250, 243, 0.92);
  border-bottom: 1px solid rgba(16, 32, 51, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.86rem;
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.2);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.top-nav a {
  border-bottom: 2px solid transparent;
}

.top-nav a:hover {
  color: var(--ink);
  border-color: var(--teal);
}

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  display: grid;
  align-items: center;
  padding: clamp(34px, 6vw, 76px) clamp(18px, 4vw, 54px);
  overflow: hidden;
  background: #ff6575;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(16, 32, 51, 0.62), rgba(16, 32, 51, 0.16) 52%, rgba(255, 255, 255, 0.04)),
    url("/assets/hero-match.png") center / cover no-repeat;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(330px, 470px);
  gap: clamp(28px, 5vw, 70px);
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero-copy {
  align-self: center;
  color: #fff;
  text-shadow: 0 4px 28px rgba(16, 32, 51, 0.26);
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow,
.result-card .eyebrow {
  color: var(--lemon);
}

h1,
h2,
h3 {
  overflow-wrap: break-word;
}

p {
  overflow-wrap: normal;
}

h1 {
  max-width: 830px;
  margin: 0;
  font-size: clamp(2.9rem, 7vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
  line-height: 1.55;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.stat-pill {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.tool-panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 30px);
}

.tool-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.tool-panel p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.match-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.88rem;
  font-weight: 850;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(22, 188, 181, 0.16);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 32, 51, 0.22);
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.12);
}

.button.primary {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.76);
}

.microcopy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.ad-slot {
  display: grid;
  place-items: center;
  gap: 7px;
  width: min(970px, calc(100% - 36px));
  min-height: 118px;
  margin: clamp(24px, 4vw, 44px) auto;
  border: 1px dashed rgba(16, 32, 51, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(240, 255, 252, 0.88));
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.ad-slot strong {
  color: var(--ink);
  font-size: 1rem;
}

.ad-slot small {
  max-width: 520px;
  line-height: 1.45;
}

.ad-label {
  color: var(--coral-dark);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ad-slot[data-ad-state="live"] {
  display: block;
  min-height: 90px;
  border: 0;
  background: transparent;
  padding: 0;
}

.result-shell > .ad-slot {
  margin-top: clamp(22px, 4vw, 38px);
}

.loading-body {
  background:
    linear-gradient(180deg, #fff8ec 0%, #f1fffc 48%, #fff8ec 100%);
}

.loading-shell {
  padding: clamp(26px, 5vw, 58px) clamp(18px, 4vw, 54px) 0;
}

.loading-card {
  width: min(960px, 100%);
  margin: 0 auto;
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 52px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(16, 32, 51, 0.9), rgba(16, 32, 51, 0.42)),
    url("/assets/hero-match.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.loading-card h1 {
  max-width: 820px;
  font-size: clamp(2.3rem, 6vw, 5.2rem);
  overflow-wrap: anywhere;
}

.loading-card p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.6;
}

.loading-meter {
  height: 12px;
  margin: 30px 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  overflow: hidden;
}

.loading-meter span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lemon), var(--teal));
  transition: width 180ms linear;
}

.loading-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.loading-steps li {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.74);
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 850;
}

.loading-steps li.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.loading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.loading-actions span {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.loading-details {
  padding-top: clamp(32px, 5vw, 58px);
}

.form-status {
  min-height: 22px;
  margin: -4px 0 0;
  color: var(--coral-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.content-band {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 82px) 0;
}

.content-band.wide {
  width: 100%;
  padding-inline: clamp(18px, 4vw, 54px);
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head.compact {
  max-width: 620px;
}

.section-head h2,
.content-band h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-head p:not(.eyebrow),
.content-band > p {
  color: var(--muted);
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.seo-card {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  box-shadow: 0 14px 34px rgba(16, 32, 51, 0.08);
}

.feature-card h3,
.seo-card h3 {
  margin: 0 0 10px;
  font-size: 1.22rem;
}

.feature-card p,
.seo-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.seo-band {
  background: var(--ink);
  color: #fff;
  padding: clamp(54px, 8vw, 94px) clamp(18px, 4vw, 54px);
}

.seo-band-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.seo-band .eyebrow {
  color: var(--lemon);
}

.seo-band h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.05;
}

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

.seo-list li {
  border-left: 4px solid var(--teal);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 16px 18px;
  line-height: 1.55;
}

.page-hero {
  padding: clamp(42px, 7vw, 86px) clamp(18px, 4vw, 54px);
  background:
    linear-gradient(90deg, rgba(16, 32, 51, 0.78), rgba(16, 32, 51, 0.3)),
    url("/assets/hero-match.png") center / cover no-repeat;
  color: #fff;
}

.page-hero-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
}

.page-hero-inner > *,
.result-hero > *,
.seo-band-inner > *,
.split > * {
  min-width: 0;
}

.page-hero h1 {
  max-width: 740px;
}

.page-hero p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
  line-height: 1.65;
}

.article {
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 82px) 0;
}

.article h2 {
  margin: 34px 0 10px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.article p,
.article li {
  color: var(--muted);
  line-height: 1.75;
}

.article a {
  color: var(--coral-dark);
  font-weight: 850;
}

.result-body {
  background:
    linear-gradient(180deg, #fff8ec 0%, #f0fffc 48%, #fff8ec 100%);
}

.result-shell {
  padding: clamp(24px, 4vw, 48px) clamp(18px, 4vw, 54px) 0;
}

.result-hero {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(20px, 4vw, 42px);
  align-items: start;
}

.result-card {
  min-height: 560px;
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 54px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(16, 32, 51, 0.88), rgba(16, 32, 51, 0.42)),
    url("/assets/hero-match.png") center / cover no-repeat;
  box-shadow: var(--shadow);
  display: grid;
  align-content: end;
}

.result-card h1 {
  font-size: clamp(2.4rem, 5vw, 5.6rem);
  overflow-wrap: anywhere;
}

.result-card h2 {
  margin: 28px 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1.1;
}

.result-card p {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.65;
}

.score-ring {
  display: inline-grid;
  place-items: center;
  align-content: center;
  width: clamp(154px, 20vw, 220px);
  aspect-ratio: 1;
  margin-top: 30px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(16, 32, 51, 0.24);
}

.score-ring strong {
  color: var(--coral);
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.9;
}

.score-ring span {
  max-width: 140px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
}

.share-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.share-canvas {
  width: 100%;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 45px rgba(16, 32, 51, 0.12);
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-actions .primary {
  grid-column: 1 / -1;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.metrics-grid li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.meter {
  height: 9px;
  margin: 14px 0 10px;
  border-radius: 999px;
  background: #edf2f6;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--coral));
}

.metrics-grid small {
  color: var(--muted);
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(20px, 5vw, 60px);
  align-items: start;
}

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

.fact-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px 18px;
  color: var(--muted);
  font-weight: 760;
}

.restart-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding: 28px 18px 42px;
  color: var(--muted);
  font-weight: 750;
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 920px) {
  .hero-grid,
  .page-hero-inner,
  .result-hero,
  .seo-band-inner,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .feature-grid,
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .share-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .top-nav {
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 4px;
    font-size: 0.9rem;
  }

  .hero,
  .page-hero {
    padding-inline: 16px;
  }

  .hero-grid {
    gap: 18px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .stat-pill {
    width: fit-content;
    max-width: 100%;
  }

  h1 {
    font-size: clamp(2.35rem, 14vw, 4.2rem);
  }

  .form-grid,
  .feature-grid,
  .metrics-grid,
  .share-actions,
  .loading-steps {
    grid-template-columns: 1fr;
  }

  .content-band {
    width: min(100% - 32px, 1120px);
  }

  .result-card {
    min-height: 520px;
  }

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