:root {
  --ink: #12213a;
  --ink-soft: #52637a;
  --blue: #2166f3;
  --blue-dark: #174cb6;
  --blue-soft: #eaf2ff;
  --cyan-soft: #e9f8fb;
  --cream: #fff8e8;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --line: #dce4ee;
  --line-strong: #c5d0dd;
  --success: #18794e;
  --warning: #9a5b00;
  --warning-bg: #fff7df;
  --shadow: 0 18px 52px rgba(24, 48, 82, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --page: min(1160px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--blue-dark);
}

.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;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(33, 102, 243, 0.34);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 228, 238, 0.8);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: var(--page);
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 22px rgba(33, 102, 243, 0.22);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.preview-badge {
  border: 1px solid #bfd1f4;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #405168;
  font-size: 0.94rem;
  font-weight: 650;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--blue-dark);
}

.nav-cta {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.hero {
  overflow: hidden;
  position: relative;
  padding: 24px 0 22px;
  background:
    radial-gradient(circle at 84% 18%, rgba(96, 186, 255, 0.18), transparent 30%),
    radial-gradient(circle at 8% 76%, rgba(247, 203, 95, 0.16), transparent 26%),
    linear-gradient(180deg, #f7faff 0%, #ffffff 92%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(33, 102, 243, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 72%);
}

.hero-grid,
.section,
.page-hero,
.article-shell,
.footer-shell {
  width: var(--page);
  margin-inline: auto;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 6vw, 5.25rem);
  font-weight: 780;
}

.hero h1 {
  max-width: 650px;
  margin-bottom: 14px;
  font-size: clamp(2.85rem, 4vw, 3.45rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.15rem);
}

h3 {
  font-size: 1.18rem;
}

.hero-copy {
  max-width: 680px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
}

.search-panel {
  position: relative;
  max-width: 720px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 9px 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-form svg {
  flex: 0 0 auto;
  color: #6a7d94;
}

.search-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 9px 2px;
  color: var(--ink);
  background: transparent;
}

.search-form button,
.button-primary {
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  padding: 11px 17px;
  color: #fff;
  background: var(--blue);
  font-weight: 720;
  text-decoration: none;
}

.search-form button:hover,
.button-primary:hover {
  color: #fff;
  background: var(--blue-dark);
}

.search-hint {
  margin: 11px 4px 0;
  color: #718198;
  font-size: 0.88rem;
}

.search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(24, 48, 82, 0.17);
}

.search-results[hidden] {
  display: none;
}

.search-result {
  display: block;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover,
.search-result:focus-visible {
  color: var(--ink);
  background: var(--blue-soft);
}

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

.search-result span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.search-empty {
  padding: 19px;
  color: var(--ink-soft);
}

.device-visual {
  position: relative;
  min-height: 260px;
}

.phone {
  position: absolute;
  width: 145px;
  height: 255px;
  border: 6px solid var(--ink);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(21, 51, 94, 0.18);
}

.phone::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 52px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--ink);
}

.phone-one {
  top: 4px;
  left: 10px;
  transform: rotate(-8deg);
  background: linear-gradient(160deg, #f7fbff 0 44%, #dceeff 44% 100%);
}

.phone-two {
  right: 10px;
  bottom: 0;
  transform: rotate(8deg);
  background: linear-gradient(160deg, #fffdf8 0 44%, #ffe9b5 44% 100%);
}

.section {
  padding-block: 84px;
}

.direction-section {
  padding-block: 32px 42px;
}

.direction-section .section-heading {
  margin-bottom: 16px;
}

.direction-section .section-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.section + .section {
  border-top: 1px solid #eef2f6;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

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

.direction-card,
.answer-card,
.lose-card,
.stage-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.direction-card {
  position: relative;
  min-height: 200px;
  padding: 24px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.direction-card:hover {
  color: var(--ink);
  transform: translateY(-4px);
  border-color: #9dbcf7;
  box-shadow: var(--shadow);
}

.direction-card:nth-child(1) {
  background: linear-gradient(145deg, #f7fbff, #eaf3ff);
}

.direction-card:nth-child(2) {
  background: linear-gradient(145deg, #f9fbff, #edf7fb);
}

.direction-card:nth-child(3) {
  background: linear-gradient(145deg, #fffdf8, #fff4d6);
}

.card-kicker {
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 790;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.direction-card h3 {
  margin: 28px 0 10px;
  font-size: 1.42rem;
}

.direction-card p {
  margin: 0;
  color: var(--ink-soft);
}

.card-arrow {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.86);
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.stage-card {
  min-height: 148px;
  padding: 21px;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease;
}

a.stage-card:hover {
  color: var(--ink);
  border-color: #9dbcf7;
  background: var(--blue-soft);
}

.stage-card.is-unavailable {
  border-style: dashed;
  color: #6f7f90;
  background: var(--surface-alt);
}

.stage-number {
  display: block;
  margin-bottom: 24px;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.stage-card strong {
  display: block;
  line-height: 1.3;
}

.stage-availability {
  display: block;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 46px;
  align-items: center;
  padding: 44px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #fff;
}

.feature-panel p {
  color: #c7d4e5;
}

.feature-panel .button-primary {
  display: inline-block;
  margin-top: 10px;
  background: #fff;
  color: var(--ink);
}

.mini-checklist {
  display: grid;
  gap: 12px;
}

.mini-check {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.mini-check span:first-child {
  color: #8ec6ff;
  font-weight: 900;
}

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

.answer-card {
  display: block;
  padding: 24px;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.answer-card:hover {
  color: var(--ink);
  transform: translateY(-3px);
  border-color: #a9c2ee;
  box-shadow: 0 16px 38px rgba(24, 48, 82, 0.08);
}

.answer-card h3 {
  margin: 16px 0 9px;
}

.answer-card p {
  margin: 0;
  color: var(--ink-soft);
}

.meta-row,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.chip {
  color: #496078;
  background: #eef3f8;
}

.status-chip {
  color: var(--warning);
  background: var(--warning-bg);
}

.page-hero {
  padding-block: 72px 46px;
}

.page-hero h1 {
  max-width: 880px;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
}

.page-hero > p:not(.eyebrow) {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 1.14rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-alt);
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 760;
}

.field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 38px 8px 12px;
  color: var(--ink);
  background: #fff;
}

.button-secondary {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 9px 15px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.results-summary {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.browse-empty {
  padding: 38px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--ink-soft);
  text-align: center;
}

.lose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.lose-column {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
}

.lose-column h2 {
  font-size: 1.8rem;
}

.lose-column > p {
  color: var(--ink-soft);
}

.lose-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.lose-card {
  padding: 18px;
  background: #fff;
}

.lose-card a {
  font-weight: 730;
}

.lose-card p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.breadcrumbs {
  width: var(--page);
  margin: 28px auto 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #9aa8b9;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 70px;
  padding-block: 48px 88px;
}

.article-header {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin-top: 18px;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.direct-answer {
  margin: 0;
  padding-left: 22px;
  border-left: 4px solid var(--blue);
  color: #2f4661;
  font-size: 1.2rem;
}

.article-body section {
  padding-top: 38px;
}

.article-body h2 {
  margin-bottom: 18px;
  font-size: 1.65rem;
}

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.steps-list li {
  position: relative;
  min-height: 44px;
  margin-bottom: 14px;
  padding-left: 52px;
  counter-increment: steps;
}

.steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: -3px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-weight: 800;
}

.notice {
  padding: 20px 22px;
  border: 1px solid #ead9aa;
  border-radius: 16px;
  background: var(--warning-bg);
}

.notice strong {
  display: block;
  margin-bottom: 6px;
  color: #744500;
}

.source-list,
.related-list {
  padding-left: 20px;
}

.source-list li,
.related-list li {
  margin-bottom: 10px;
}

.article-aside {
  align-self: start;
  position: sticky;
  top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-alt);
}

.article-aside h2 {
  margin-bottom: 18px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.detail-list {
  margin: 0;
}

.detail-list div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.detail-list dt {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 760;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 3px 0 0;
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  padding-block: 34px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.footer-shell p {
  max-width: 600px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

@media (max-width: 900px) {
  .hero-grid,
  .feature-panel,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .device-visual {
    display: none;
  }

  .stage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .article-shell {
    gap: 32px;
  }

  .article-aside {
    position: static;
  }

  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  :root {
    --page: min(100% - 28px, 1160px);
  }

  .nav-shell {
    min-height: auto;
    padding-block: 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    flex-wrap: wrap;
  }

  .site-nav {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 3px;
    white-space: nowrap;
  }

  .nav-cta {
    padding: 0;
    border: 0;
  }

  .hero {
    padding: 28px 0 24px;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.5rem);
  }

  .hero h1 {
    margin-bottom: 12px;
    font-size: clamp(2.2rem, 10.5vw, 2.8rem);
  }

  .hero-copy {
    margin-bottom: 16px;
    font-size: 1rem;
  }

  .search-form {
    padding-left: 14px;
  }

  .search-form button {
    padding-inline: 12px;
  }

  .cards-grid,
  .answer-grid,
  .lose-grid,
  .stage-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: 58px;
  }

  .direction-section {
    padding-block: 28px 42px;
  }

  .direction-section .section-heading {
    margin-bottom: 16px;
  }

  .direction-section .section-heading > p:not(.eyebrow) {
    display: none;
  }

  .direction-card {
    min-height: 168px;
    padding: 22px;
  }

  .direction-card h3 {
    margin-top: 22px;
  }

  .feature-panel,
  .lose-column {
    padding: 24px;
  }

  .page-hero {
    padding-top: 54px;
  }

  .article-shell {
    padding-top: 34px;
  }

  .footer-shell {
    flex-direction: column;
  }
}
