:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eff4fa;
  --ink: #0f172a;
  --muted: #334155;
  --line: #d4dfeb;
  --brand: #0f4fbf;
  --brand-ink: #0a357f;
  --danger: #9f1239;
  --radius: 14px;
  --shadow: 0 10px 26px rgba(2, 6, 23, 0.06);
  --font-ui: "Sora", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 380px at 0% -10%, rgba(15, 79, 191, 0.08), transparent 70%),
    radial-gradient(900px 360px at 100% -20%, rgba(59, 130, 246, 0.08), transparent 68%),
    var(--bg);
  font-family: var(--font-ui);
  line-height: 1.5;
}

.nav,
.hero,
main,
footer {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.nav {
  position: sticky;
  top: 0.5rem;
  z-index: 60;
  margin-top: 0.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  font-weight: 700;
  line-height: 1.15;
  flex: 0 1 auto;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.34rem;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-links a {
  text-decoration: none;
  color: #1e293b;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.3rem 0.56rem;
  font-size: 0.84rem;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-links a:hover {
  background: #ffffff;
  border-color: var(--line);
}

.hero {
  padding: 3.5rem 0 1.8rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(310px, 0.88fr);
  gap: 1rem;
  align-items: start;
}

.hero-main,
.hero-side {
  min-width: 0;
}

.kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  margin-top: 0.65rem;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-weight: 700;
}

.headline-emphasis {
  font-family: "Arial Black", "Sora", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900 !important;
  letter-spacing: -0.01em;
  color: #0a357f;
}

h2 {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-copy {
  margin: 0.95rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-note {
  margin: 0;
  color: #475569;
  font-size: 0.82rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.hero-metrics-compact {
  gap: 0.5rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.05rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.button-primary {
  color: #ffffff;
  background: var(--brand);
}

.button-primary:hover {
  background: var(--brand-ink);
}

.button-ghost {
  color: #1e293b;
  background: #ffffff;
  border-color: var(--line);
}

main {
  display: grid;
  gap: 1rem;
  padding-bottom: 2rem;
}

.copy,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  padding: 1.05rem;
}

.copy p,
.copy li,
.panel p,
.panel li {
  color: var(--muted);
}

.sample-metric-compact {
  padding: 0.62rem;
}

.mini-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  margin-right: 0.36rem;
  vertical-align: text-top;
  color: #334155;
}

.mini-icon svg {
  width: 100%;
  height: 100%;
}

.audience-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.72rem;
}

.audience-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.72rem;
  background: #fbfdff;
}

.audience-item h3 {
  font-size: 0.95rem;
}

.audience-item p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.audience-footnote {
  margin: 0.72rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.hero-image,
.section-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.hero-image {
  margin-top: 0.55rem;
}

.why-now-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 0.9rem;
  align-items: start;
}

.why-now-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.why-now-content {
  min-width: 0;
}

.signal-grid {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.72rem;
}

.signal-item h3 {
  font-size: 0.95rem;
}

.signal-item p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.signal-summary {
  margin: 0.72rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.media-panel .section-image + .section-image {
  margin-top: 0.7rem;
}

.media-panel p {
  margin: 0.6rem 0 0.7rem;
}

.demand-note {
  margin: 0.72rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.copy p {
  margin: 0.7rem 0 0;
  max-width: 76ch;
}

.copy-body {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.72rem;
}

.copy-body p {
  margin: 0;
}

.copy-columns .copy-body p {
  max-width: none;
}

.copy ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.42rem;
}

.note {
  margin: 0.45rem 0 0.72rem;
  color: #475569;
  font-size: 0.9rem;
}

.raw-json-link-wrap {
  margin: 0.85rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.raw-json-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 0.42rem 0.76rem;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.raw-json-link:hover {
  border-color: #9db5d8;
  background: #f8fbff;
}

.sample-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem;
  background: #ffffff;
}

.metric-value {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.metric-label {
  margin: 0.32rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.noscript-alert {
  margin: 1rem 0 0;
  border: 1px solid #f9a8d4;
  border-radius: 10px;
  padding: 0.65rem 0.72rem;
  background: #fff1f2;
  color: var(--danger);
  font-size: 0.93rem;
}

.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 22rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.24rem;
  overflow-x: auto;
  overflow-y: hidden;
}

.desktop-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.54rem;
  background: rgba(255, 255, 255, 0.88);
}

.desktop-view-toggle-label {
  margin: 0;
  color: #1e293b;
  font-size: 0.82rem;
  font-weight: 700;
}

.desktop-view-switch {
  border: 1px solid #9db5d8;
  background: #e2e8f0;
  width: 2.65rem;
  height: 1.5rem;
  border-radius: 999px;
  padding: 0.12rem;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.desktop-view-switch-knob {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  transform: translateX(0);
  transition: transform 0.2s ease;
}

.desktop-view-switch[aria-checked="true"] {
  background: var(--brand);
  border-color: var(--brand);
}

.desktop-view-switch[aria-checked="true"] .desktop-view-switch-knob {
  transform: translateX(1.1rem);
}

.desktop-view-switch:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.results-page.desktop-table-view .chart-wrap {
  display: none;
}

.results-page.desktop-table-view .mobile-table-wrap {
  display: block;
}

.mobile-table-wrap {
  display: none;
}

.mobile-table-scroll {
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.mobile-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.mobile-data-table th,
.mobile-data-table td {
  padding: 0.55rem 0.58rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}

.mobile-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e8eef6;
  color: #0f172a;
}

.mobile-data-table tbody tr:last-child td {
  border-bottom: 0;
}

canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.overall-marks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.72rem;
}

.overall-mark-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: #ffffff;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.overall-mark-link {
  text-decoration: none;
  color: inherit;
}

.overall-mark-link:hover {
  border-color: #9db5d8;
  transform: translateY(-1px);
}

.overall-mark-link:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.overall-mark-badge {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.16rem;
  letter-spacing: -0.03em;
  background: var(--mark-color);
}

.overall-mark-A {
  --mark-color: #15803d;
}

.overall-mark-B {
  --mark-color: #22a352;
}

.overall-mark-C {
  --mark-color: #ca8a04;
}

.overall-mark-D {
  --mark-color: #d97706;
}

.overall-mark-E {
  --mark-color: #ea580c;
}

.overall-mark-F {
  --mark-color: #dc2626;
}

.overall-mark-text h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.34;
  color: #172033;
}

.overall-mark-text p {
  margin: 0.26rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.overall-mark-text .overall-score {
  margin-top: 0.22rem;
  color: #172033;
  font-size: 0.96rem;
  font-weight: 700;
}

.overall-mark-text .overall-score span {
  margin-left: 0.08rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.55rem;
  color: #475569;
  font-size: 0.9rem;
}

footer p {
  margin: 0;
  color: #475569;
}

footer > a,
footer p a {
  color: #0f4fbf;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16rem;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18rem;
}

a:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.model-page .hero {
  padding-top: 3.8rem;
}

.model-page .hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  max-width: 16ch;
}

.model-page .hero-copy {
  margin-top: 0.95rem;
  font-size: 1rem;
  max-width: 58ch;
}

.model-summary {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 1rem;
  align-items: center;
}

.summary-label {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.summary-mark {
  width: 100px;
  height: 100px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 2.7rem;
  font-weight: 800;
}

.summary-score {
  margin: 0.45rem 0 0;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 700;
}

.summary-meta p {
  margin: 0.3rem 0;
  color: #334155;
}

.guidance-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.guidance-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: #ffffff;
}

.guidance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.guidance-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.guidance-mark {
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
}

.guidance-card p {
  margin: 0.3rem 0;
  color: #334155;
}

.model-page .metric-lines {
  margin-top: 0.82rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.model-page .metric-lines p {
  margin: 0;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.68rem 0.75rem;
  color: #334155;
}

@media (min-width: 900px) {
  .copy-columns .copy-columns-body {
    column-count: 2;
    column-gap: 1.2rem;
  }

  .copy-columns .copy-columns-body p {
    break-inside: avoid;
    margin-bottom: 0.72rem;
  }
}

@media (max-width: 840px) {
  .desktop-view-toggle {
    display: none;
  }

  .chart-wrap {
    display: none;
  }

  .mobile-table-wrap {
    display: block;
  }

  .nav {
    position: static;
    align-items: flex-start;
    gap: 0.56rem;
    padding: 0.62rem 0.68rem;
  }

  .brand {
    max-width: 40%;
    font-size: 0.75rem;
  }

  .nav-links {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 0.12rem;
    width: 60%;
    justify-content: flex-start;
    gap: 0.3rem;
  }

  .nav-links a {
    font-size: 0.78rem;
    padding: 0.26rem 0.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-side {
    margin-top: 0.35rem;
  }

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

  .audience-list {
    grid-template-columns: 1fr;
  }

  .why-now-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .model-summary {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.4rem;
  }
}

@media (max-width: 620px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    max-width: 100%;
  }

  .nav-links {
    width: 100%;
  }

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

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
}

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