/*
 * Standard Thinking — design consolidation
 *
 * Product UI uses Inter for clarity. Newsreader is reserved for the brand
 * wordmark and the italic phrase inside editorial headlines.
 */

:root {
  --header-h: 72px;
  --shell: 1200px;
  --space-section: clamp(104px, 7.5vw, 128px);
  --space-heading: clamp(48px, 4vw, 64px);
  --type-section-sm: clamp(36px, 2.2vw, 40px);
  --type-section: clamp(40px, 2.6vw, 48px);
  --type-display: clamp(52px, 3.6vw, 64px);
}

body {
  letter-spacing: -.008em;
}

h1,
h2,
h3,
h4 {
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  letter-spacing: -.045em;
}

h1 em,
h2 em,
h3 em {
  color: var(--accent);
  font-family: var(--brand-roman) !important;
  font-style: italic;
  font-weight: 300 !important;
  letter-spacing: -.035em;
}

/* Small taxonomy headings remain technical labels, not display type. */
.docs-sidebar h2,
.footer-grid h3 {
  font-family: var(--mono) !important;
  font-weight: 500 !important;
  letter-spacing: .1em;
}

/* Keep the logo exactly as the dedicated wordmark system. */
.brand-wordmark-standard,
.brand-finale-standard {
  font-family: var(--brand-sans) !important;
  font-style: normal;
  font-weight: 400 !important;
}

.brand-wordmark-thinking,
.brand-finale-thinking {
  font-family: var(--brand-roman) !important;
  font-style: italic;
  font-weight: 300 !important;
}

.site-header {
  box-shadow: none;
}

.brand-wordmark-compact {
  font-size: 18px;
}

.desktop-nav a,
.text-link {
  font-size: 14px;
}

.mobile-menu a:not(.button) {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.035em;
}

/* Buttons: flat, deliberate controls without a glossy top stripe. */
[data-theme] .button {
  min-height: 46px;
  padding-inline: 24px;
  border-radius: 11px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.012em;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

[data-theme] .button:hover,
[data-theme] .button:active {
  transform: none;
  box-shadow: none;
}

[data-theme] .button-small,
[data-theme] .models-custom-cta,
[data-theme] .dashboard-header-actions .button {
  min-height: 40px;
  border-radius: 9px;
}

[data-theme] .button-accent,
[data-theme] .button-dark,
[data-theme] .button-light {
  border-color: transparent;
}

[data-theme="dark"] .button-outline {
  background: transparent;
}

[data-theme="light"] .button-outline {
  background: #fff;
}

/* Homepage hero: stronger type, less empty height, tighter information flow. */
.models-hero {
  min-height: 760px;
  justify-content: center;
  padding-top: 112px;
  padding-bottom: 88px;
}

.models-hero::after {
  opacity: .55;
}

[data-theme="light"] .models-hero::after {
  display: none;
}

.models-hero-grid {
  gap: 52px;
}

.models-hero-primary {
  width: min(100%, 1000px);
}

.models-hero h1 {
  max-width: 1000px;
  font-size: clamp(62px, 6.15vw, 92px);
  line-height: .91;
}

.models-hero h1 em {
  display: inline-block;
}

.models-hero-copy > p {
  max-width: 670px;
  margin-top: 27px;
  font-size: 17px;
  line-height: 1.65;
}

.models-hero-actions {
  gap: 10px;
  margin-top: 30px;
}

.models-hero-rail {
  overflow: hidden;
  border-color: var(--line);
  background: transparent;
  box-shadow: none;
}

.models-hero-rail .hero-metrics > div,
.models-hero-rail .hero-metrics > div:first-child,
.models-hero-rail .hero-metrics > div:nth-child(2),
.models-hero-rail .hero-metrics > div:last-child {
  min-height: 106px;
  gap: 12px;
  padding: 22px 28px;
}

.models-hero-rail .hero-metrics > div:hover {
  background: transparent;
}

.hero-metrics strong,
.benchmark-metrics strong,
.page-stat-row strong,
.dashboard-metric strong,
.status-kpi strong,
.plan-price strong,
.uptime-number strong,
.usage-breakdown strong {
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  letter-spacing: -.04em;
}

.models-hero-rail .hero-metrics strong {
  font-size: 34px;
}

.models-library {
  padding-top: 108px;
  padding-bottom: 116px;
}

.models-library-intro {
  margin-bottom: 56px;
}

.models-library-intro h2 {
  font-size: clamp(38px, 3.2vw, 48px);
  line-height: 1;
}

.models-library-copy p,
.section-heading-copy,
.performance-copy p,
.section-intro p,
.page-hero-copy {
  line-height: 1.7;
}

/* Cards and panels: remove decorative top bars and layered gradients. */
.model-family-grid {
  gap: 16px;
  border: 0;
}

.model-family-card,
[data-theme="light"] .model-family-card,
[data-theme="light"] .model-family-card:nth-child(2),
[data-theme="light"] .model-family-card:nth-child(3) {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: none;
}

.model-family-card:hover,
[data-theme="light"] .model-family-card:hover {
  border-color: var(--line-strong);
  background: var(--panel-raised);
}

.model-family-card::before,
.custom-model-card::before {
  display: none;
}

.model-family-card header {
  min-height: 154px;
  padding: 30px 30px 25px;
  background: transparent;
}

.model-family-card h3 {
  margin-bottom: 14px;
  font-size: 24px;
  line-height: 1.08;
}

.custom-model-card,
.benchmark-panel,
.api-grid,
.cost-calculator,
.status-board,
.credit-note,
.contact-form-panel,
.dashboard-panel,
.dialog-panel {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: none;
}

.custom-model-card {
  margin-top: 16px;
}

.performance-section,
[data-theme="light"] .performance-section {
  background: var(--surface);
}

.performance-layout,
.section,
.content-section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.performance-intro h2,
.section-heading-title h2,
.status-header h2,
.section-intro h2,
.final-cta h2 {
  line-height: .98;
}

.performance-tabs,
.filter-row,
.catalogue-filters,
.segmented-control {
  box-shadow: none;
}

.filter-button.is-active,
.performance-tabs button.is-active,
.catalogue-filters button.is-active,
.segmented-control button.is-active {
  box-shadow: none;
}

.code-tabs button[aria-selected="true"],
.code-sample-tabs button[aria-selected="true"] {
  background: var(--accent-soft);
  box-shadow: none;
  color: var(--ink);
}

.quick-steps li:first-child,
[data-theme="light"] .quick-steps li:first-child {
  background: transparent;
}

.quick-steps li:first-child::before {
  display: none;
}

.final-cta {
  min-height: 420px;
  border-radius: 20px;
  box-shadow: none;
}

.final-cta::after {
  opacity: .55;
}

/* Interior pages and app surfaces use the same hierarchy. */
.page-hero {
  padding-top: 112px;
  padding-bottom: 96px;
}

.page-hero-compact {
  padding-top: 104px;
  padding-bottom: 88px;
}

.page-hero h1 {
  max-width: 760px;
  font-size: var(--type-display);
  line-height: .98;
}

.page-stat-row {
  margin-top: 52px;
}

.auth-visual {
  background: var(--surface);
}

.auth-visual::after {
  opacity: .5;
}

.auth-visual h1 {
  font-size: var(--type-display);
  line-height: .98;
}

.auth-card h2 {
  font-size: 32px;
  line-height: 1.1;
}

.auth-form input,
.auth-form textarea,
.auth-form select,
.auth-secondary {
  border-radius: 10px;
}

.dashboard-content {
  padding-top: 56px;
}

.dashboard-page-header h1 {
  font-size: 38px;
  line-height: 1.06;
}

.dashboard-metrics {
  gap: 12px;
  border: 0;
}

.dashboard-metric {
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.docs-lead h1 {
  line-height: 1.02;
}

.docs-article h2,
.legal-document h2,
.changelog-entry h2,
.dashboard-panel-head h2,
.settings-row h2 {
  letter-spacing: -.025em;
}

@media (max-width: 960px) {
  :root {
    --space-section: 92px;
    --space-heading: 48px;
  }

  .models-hero {
    min-height: auto;
    padding-top: 112px;
    padding-bottom: 88px;
  }

  .models-hero-grid {
    gap: 48px;
  }

  .models-library {
    padding-top: 92px;
    padding-bottom: 96px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 68px;
    --space-section: 76px;
    --space-heading: 40px;
  }

  .page-shell {
    padding-inline: 20px;
  }

  .models-hero {
    padding-top: 80px;
    padding-bottom: 72px;
  }

  .models-hero h1 {
    font-size: clamp(48px, 13.6vw, 64px);
    line-height: .94;
  }

  .models-hero-copy > p {
    margin-top: 23px;
    font-size: 16px;
  }

  .models-hero-actions {
    width: 100%;
    margin-top: 26px;
  }

  .models-hero-actions .button {
    flex: 1 1 calc(50% - 5px);
  }

  .models-hero-actions .button:last-child {
    flex-basis: 100%;
  }

  .models-hero-rail .hero-metrics > div,
  .models-hero-rail .hero-metrics > div:first-child,
  .models-hero-rail .hero-metrics > div:nth-child(2),
  .models-hero-rail .hero-metrics > div:last-child {
    min-height: 72px;
    padding: 18px 20px;
  }

  .models-hero-rail .hero-metrics strong {
    font-size: 27px;
  }

  .model-family-grid {
    gap: 12px;
  }

  .model-family-card header {
    min-height: auto;
  }

  .page-hero,
  .page-hero-compact {
    padding-top: 80px;
    padding-bottom: 72px;
  }

  .page-hero h1,
  .auth-visual h1 {
    font-size: var(--type-display);
  }

  .final-cta {
    min-height: 360px;
    padding: 52px 28px;
    border-radius: 16px;
  }

  .dashboard-content {
    padding: 40px 20px 80px;
  }

  .dashboard-page-header h1 {
    font-size: 34px;
  }
}

/* --------------------------------------------------------------------------
   Completion pass — richer product storytelling and wide-screen composition
   -------------------------------------------------------------------------- */

:root {
  --shell: 1440px;
  --panel-radius: 18px;
  --panel-shadow-light: 0 28px 80px rgba(18, 24, 40, .075);
  --panel-shadow-dark: 0 34px 90px rgba(0, 0, 0, .28);
}

.section-index,
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.3;
}

.hero-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(114, 201, 159, .1);
}

.section-index-on-accent {
  color: var(--accent-ink);
  opacity: .72;
}

/* Hero */
.models-hero {
  min-height: 1030px;
  justify-content: center;
  padding-top: 106px;
  padding-bottom: 82px;
  overflow: hidden;
}

.models-hero::before {
  position: absolute;
  inset: 0 28px;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(25% - .5px), var(--line) 25%, transparent calc(25% + .5px)),
    linear-gradient(90deg, transparent calc(75% - .5px), var(--line) 75%, transparent calc(75% + .5px));
  content: "";
  opacity: .28;
}

.models-hero::after {
  top: 6%;
  right: 8%;
  width: 760px;
  height: 680px;
  transform: none;
  background: radial-gradient(circle at 50% 45%, rgba(135, 149, 232, .11), transparent 66%);
  opacity: .8;
}

[data-theme="light"] .models-hero::after {
  display: block;
  background: radial-gradient(circle at 50% 45%, rgba(70, 89, 201, .075), transparent 66%);
}

.models-hero-grid {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(610px, .9fr) minmax(0, 1.1fr);
  gap: 54px clamp(56px, 4.5vw, 82px);
  align-items: center;
}

.models-hero-primary {
  width: 100%;
  max-width: 650px;
  align-self: center;
  align-items: flex-start;
  text-align: left;
}

.models-hero h1 {
  max-width: 620px;
  font-size: clamp(64px, 4.5vw, 80px);
  line-height: .92;
}

.models-hero-copy > p {
  max-width: 560px;
  margin-top: 29px;
  font-size: 17px;
  line-height: 1.68;
}

.models-hero-actions {
  justify-content: flex-start;
  margin-top: 32px;
}

.hero-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 12px;
}

.hero-assurance span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-assurance i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-product-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #0d0f13;
  box-shadow: var(--panel-shadow-dark);
}

.hero-product-stage::before {
  position: absolute;
  inset: 55px 0 auto;
  height: 310px;
  pointer-events: none;
  background:
    linear-gradient(rgba(135, 149, 232, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135, 149, 232, .05) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  mask-image: linear-gradient(to bottom, #000, transparent 94%);
}

[data-theme="light"] .hero-product-stage {
  background: #fff;
  box-shadow: var(--panel-shadow-light);
}

[data-theme="light"] .hero-product-stage::before {
  background:
    linear-gradient(rgba(70, 89, 201, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 89, 201, .07) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-product-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
}

.hero-product-toolbar span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.hero-product-toolbar i,
.hero-product-output > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 11px rgba(114, 201, 159, .45);
}

.hero-product-toolbar code {
  color: var(--dim);
  font: inherit;
}

.hero-product-canvas {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 270px;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1.1fr) 46px minmax(0, 1fr);
  align-items: center;
  padding: 44px 34px 38px;
}

.route-node {
  display: flex;
  min-width: 0;
  min-height: 132px;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 18, 23, .94);
}

[data-theme="light"] .route-node {
  background: rgba(255, 255, 255, .96);
}

.route-node span {
  margin-bottom: 20px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .11em;
}

.route-node strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-node small {
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-gateway {
  border-color: var(--accent-dark);
  background: linear-gradient(145deg, var(--accent-soft), rgba(16, 18, 23, .96));
  box-shadow: 0 0 0 5px rgba(135, 149, 232, .055);
}

[data-theme="light"] .route-gateway {
  background: linear-gradient(145deg, var(--accent-soft), #fff);
  box-shadow: 0 0 0 5px rgba(70, 89, 201, .045);
}

.route-gateway span,
.route-model span {
  color: var(--accent);
}

.route-connector {
  position: relative;
  height: 1px;
  overflow: visible;
  background: var(--line-strong);
}

.route-connector i {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(135, 149, 232, .55);
  animation: route-pulse 2.4s var(--ease) infinite;
}

.route-connector:nth-of-type(4) i {
  animation-delay: 1.2s;
}

@keyframes route-pulse {
  0% { opacity: 0; transform: translateX(0); }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translateX(40px); }
}

.hero-product-prompt {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 88px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .012);
}

[data-theme="light"] .hero-product-prompt {
  background: #fbfbfe;
}

.hero-product-prompt > span,
.hero-product-prompt > b {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .1em;
}

.hero-product-prompt > b {
  color: var(--accent);
}

.hero-product-prompt p {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-product-output {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 78px;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
}

.hero-product-output > * {
  display: flex;
  align-items: center;
  padding: 0 22px;
}

.hero-product-output > * + * {
  border-left: 1px solid var(--line);
}

.hero-product-output > span {
  gap: 9px;
  color: var(--success);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
}

.hero-product-output strong {
  justify-content: space-between;
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.04em;
}

.hero-product-output small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .06em;
}

.models-hero-rail {
  grid-column: 1 / -1;
  margin-top: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.models-hero-rail .hero-metrics > div,
.models-hero-rail .hero-metrics > div:first-child,
.models-hero-rail .hero-metrics > div:nth-child(2),
.models-hero-rail .hero-metrics > div:last-child {
  min-height: 102px;
  padding: 22px 28px;
}

/* Model catalogue */
.models-library {
  position: relative;
  padding-top: 126px;
  padding-bottom: 132px;
}

.models-library-title {
  min-width: 0;
}

.models-library-intro {
  grid-template-columns: minmax(300px, .85fr) minmax(360px, 1.1fr) auto;
  gap: 28px 64px;
  margin-bottom: 64px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.models-library-title .section-index {
  margin-bottom: 18px;
}

.models-library-intro h2 {
  font-size: clamp(46px, 3.5vw, 58px);
}

.model-family-grid {
  gap: 18px;
}

.model-family-card,
[data-theme="light"] .model-family-card,
[data-theme="light"] .model-family-card:nth-child(2),
[data-theme="light"] .model-family-card:nth-child(3) {
  border-radius: var(--panel-radius);
  transition: transform 260ms var(--ease), border-color 200ms ease, box-shadow 260ms ease, background 200ms ease;
}

.model-family-card:hover,
[data-theme="light"] .model-family-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(18, 24, 40, .09);
}

[data-theme="dark"] .model-family-card:hover {
  box-shadow: 0 28px 70px rgba(0, 0, 0, .25);
}

.model-family-card header {
  display: grid;
  min-height: 252px;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 28px;
  align-items: center;
  padding: 32px;
}

.model-family-copy {
  min-width: 0;
}

.model-family-copy > span {
  display: block;
  margin-bottom: 24px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .11em;
}

.model-family-card h3 {
  margin-bottom: 13px;
  font-size: 25px;
}

.model-card-visual {
  position: relative;
  width: 190px;
  height: 154px;
  justify-self: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background-color: var(--surface);
  transition: transform 300ms var(--ease), border-color 200ms ease;
}

.model-family-card:hover .model-card-visual {
  transform: translateY(-3px);
  border-color: var(--accent-dark);
}

.visual-reasoning {
  background:
    linear-gradient(32deg, transparent 49.4%, var(--line-strong) 50%, transparent 50.6%),
    linear-gradient(148deg, transparent 49.4%, var(--line-strong) 50%, transparent 50.6%),
    radial-gradient(circle at center, var(--accent-soft) 0 25px, transparent 26px),
    var(--surface);
}

.visual-reasoning i,
.visual-reasoning b {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--panel);
}

.visual-reasoning i:nth-child(1) { top: 24px; left: 28px; }
.visual-reasoning i:nth-child(2) { top: 24px; right: 28px; }
.visual-reasoning i:nth-child(3) { bottom: 24px; left: 28px; }
.visual-reasoning i:nth-child(4) { right: 28px; bottom: 24px; }
.visual-reasoning b { top: 57px; left: 75px; width: 40px; height: 40px; background: var(--accent); box-shadow: 0 0 0 8px var(--accent-soft); }

.visual-speed {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 9px;
  padding: 26px 24px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    var(--surface);
  background-size: 100% 31px;
}

.visual-speed i {
  width: 11px;
  border-radius: 7px 7px 2px 2px;
  background: var(--accent);
  transform-origin: bottom;
  animation: speed-bars 2.8s ease-in-out infinite alternate;
}

.visual-speed i:nth-child(1) { height: 28%; opacity: .35; }
.visual-speed i:nth-child(2) { height: 48%; opacity: .5; animation-delay: -.4s; }
.visual-speed i:nth-child(3) { height: 70%; opacity: .68; animation-delay: -.8s; }
.visual-speed i:nth-child(4) { height: 92%; animation-delay: -1.2s; }
.visual-speed i:nth-child(5) { height: 72%; opacity: .75; animation-delay: -1.6s; }
.visual-speed i:nth-child(6) { height: 52%; opacity: .58; animation-delay: -2s; }
.visual-speed i:nth-child(7) { height: 34%; opacity: .42; animation-delay: -2.4s; }

@keyframes speed-bars {
  to { transform: scaleY(.72); }
}

.visual-vision {
  background:
    linear-gradient(rgba(135, 149, 232, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135, 149, 232, .08) 1px, transparent 1px),
    var(--surface);
  background-size: 24px 24px;
}

.visual-vision i {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--accent);
  border-style: solid;
}

.visual-vision i:nth-child(1) { top: 25px; left: 26px; border-width: 2px 0 0 2px; }
.visual-vision i:nth-child(2) { top: 25px; right: 26px; border-width: 2px 2px 0 0; }
.visual-vision i:nth-child(3) { bottom: 25px; left: 26px; border-width: 0 0 2px 2px; }
.visual-vision i:nth-child(4) { right: 26px; bottom: 25px; border-width: 0 2px 2px 0; }
.visual-vision b { position: absolute; top: 30px; bottom: 30px; left: 50%; width: 1px; background: var(--accent); box-shadow: 0 0 14px rgba(135, 149, 232, .65); animation: scan-line 3s ease-in-out infinite alternate; }

@keyframes scan-line {
  from { transform: translateX(-45px); }
  to { transform: translateX(45px); }
}

.visual-vectors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  padding: 25px 30px;
  background:
    radial-gradient(circle at center, var(--accent-soft), transparent 64%),
    var(--surface);
}

.visual-vectors i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.visual-vectors i:nth-child(2),
.visual-vectors i:nth-child(4),
.visual-vectors i:nth-child(6),
.visual-vectors i:nth-child(8) { opacity: .48; transform: scale(.72); }
.visual-vectors i:nth-child(5) { transform: scale(1.55); }

.custom-model-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(110deg, var(--accent-soft), var(--panel) 44%);
}

/* Section rhythm and panel finish */
.performance-section,
[data-theme="light"] .performance-section,
.pricing-section,
[data-theme="light"] .pricing-section {
  background: var(--bg);
}

.performance-layout {
  grid-template-columns: minmax(340px, .74fr) minmax(0, 1.26fr);
  gap: 88px;
}

.performance-intro > .section-index {
  margin: 0 0 24px;
  color: var(--accent);
  font-size: 11px;
  line-height: 1.3;
}

.performance-intro > p:not(.section-index) {
  margin-top: 30px;
}

.performance-intro h2,
.section-heading-title h2,
.status-header h2 {
  font-size: clamp(52px, 4.2vw, 68px);
  line-height: .96;
}

.section-heading {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  align-items: end;
}

.section-heading-title .section-index {
  margin-bottom: 24px;
}

.section-heading-copy {
  max-width: 440px;
  font-size: 16px;
}

.benchmark-panel,
.code-window,
.cost-calculator,
.status-board {
  border-radius: var(--panel-radius);
}

[data-theme="light"] .benchmark-panel,
[data-theme="light"] .code-window,
[data-theme="light"] .cost-calculator,
[data-theme="light"] .status-board {
  box-shadow: var(--panel-shadow-light);
}

[data-theme="dark"] .benchmark-panel,
[data-theme="dark"] .code-window,
[data-theme="dark"] .cost-calculator,
[data-theme="dark"] .status-board {
  box-shadow: var(--panel-shadow-dark);
}

[data-theme="light"] .chart-grid path {
  stroke: #dfe3ea;
}

[data-theme="light"] .chart-line-primary {
  stroke: #16191f;
}

[data-theme="light"] .chart-points circle {
  fill: #fff;
}

.api-grid {
  border-radius: var(--panel-radius);
}

.plan-grid {
  gap: 16px;
  border: 0;
  background: transparent;
}

.plan-card,
[data-theme="light"] .plan-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  transition: transform 220ms var(--ease), border-color 180ms ease, box-shadow 220ms ease;
}

.plan-card:hover,
[data-theme="light"] .plan-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--panel-raised);
  box-shadow: 0 22px 58px rgba(18, 24, 40, .08);
}

.plan-card-featured,
[data-theme="light"] .plan-card-featured {
  border-color: var(--accent-dark);
  background: linear-gradient(180deg, var(--accent-soft), var(--panel) 54%);
}

.status-header {
  align-items: end;
}

[data-theme="light"] .status-board,
[data-theme="light"] .status-summary,
[data-theme="light"] .status-kpis,
[data-theme="light"] .uptime-monitor,
[data-theme="light"] .service-status-grid {
  background: #fff;
}

[data-theme="light"] .status-kpi {
  border-color: var(--line);
  background: #f8f9fc;
}

[data-theme="light"] .status-kpi strong,
[data-theme="light"] .status-kpi span,
[data-theme="light"] .status-kpi small,
[data-theme="light"] .uptime-monitor h3,
[data-theme="light"] .uptime-monitor p,
[data-theme="light"] .service-status span,
[data-theme="light"] .service-status b {
  color: var(--text);
}

[data-theme="light"] .status-kpi:last-child strong,
[data-theme="light"] .uptime-monitor-meta > strong {
  color: var(--success);
}

[data-theme="light"] .uptime-status-cta {
  border-color: var(--line-strong);
  color: var(--text);
}

[data-theme="light"] .uptime-status-cta:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.final-cta {
  min-height: 460px;
  padding: 74px 76px;
  box-shadow: 0 28px 78px rgba(70, 89, 201, .18);
}

.final-cta .section-index {
  margin-bottom: 28px;
}

@media (max-width: 1280px) {
  .models-hero {
    min-height: auto;
  }

  .models-hero-grid {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .models-hero-primary {
    max-width: 780px;
  }

  .models-hero h1,
  .models-hero-copy > p {
    max-width: 720px;
  }

  .hero-product-stage {
    width: 100%;
  }

  .models-hero-rail {
    grid-column: 1;
  }
}

@media (max-width: 1120px) {
  :root {
    --shell: 100%;
  }

  .model-family-card header {
    grid-template-columns: minmax(0, 1fr) 160px;
  }

  .model-card-visual {
    width: 160px;
  }

  .performance-layout {
    gap: 58px;
  }
}

@media (max-width: 960px) {
  .models-hero {
    padding-top: 96px;
    padding-bottom: 82px;
  }

  .models-hero::before {
    display: none;
  }

  .models-hero h1 {
    font-size: clamp(64px, 9vw, 82px);
  }

  .models-library-intro {
    grid-template-columns: 1fr 1fr;
  }

  .models-library-title {
    grid-column: 1;
  }

  .models-library-copy {
    grid-column: 2;
  }

  .models-library-intro .models-custom-cta,
  .models-library-intro .filter-row {
    grid-row: auto;
  }

  .models-library-intro .filter-row {
    grid-column: 1;
  }

  .models-library-intro .models-custom-cta {
    grid-column: 2;
    justify-self: end;
  }

  .model-family-card header {
    grid-template-columns: 1fr;
  }

  .model-card-visual {
    width: 100%;
    height: 132px;
    justify-self: stretch;
  }

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

@media (max-width: 760px) {
  .models-hero {
    padding-top: 74px;
    padding-bottom: 70px;
  }

  .models-hero-grid {
    gap: 42px;
  }

  .models-hero h1 {
    font-size: clamp(47px, 13.4vw, 62px);
  }

  .hero-assurance {
    display: grid;
    gap: 9px;
  }

  .hero-product-stage {
    border-radius: 16px;
  }

  .hero-product-canvas {
    min-height: 560px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 40px auto 40px auto;
    padding: 28px 24px;
  }

  .route-node {
    min-height: 112px;
  }

  .route-connector {
    width: 1px;
    height: 40px;
    justify-self: center;
  }

  .route-connector i {
    top: 0;
    left: -3px;
    animation-name: route-pulse-mobile;
  }

  @keyframes route-pulse-mobile {
    0% { opacity: 0; transform: translateY(0); }
    18% { opacity: 1; }
    82% { opacity: 1; }
    100% { opacity: 0; transform: translateY(34px); }
  }

  .hero-product-prompt {
    grid-template-columns: 1fr auto;
    gap: 9px 14px;
  }

  .hero-product-prompt p {
    grid-column: 1 / -1;
    grid-row: 2;
    white-space: normal;
  }

  .hero-product-output > * {
    padding-inline: 13px;
  }

  .hero-product-output strong {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    font-size: 20px;
  }

  .models-library {
    padding-top: 88px;
    padding-bottom: 92px;
  }

  .models-library-intro {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-bottom: 44px;
  }

  .models-library-title,
  .models-library-copy,
  .models-library-intro .filter-row,
  .models-library-intro .models-custom-cta {
    grid-column: 1;
    justify-self: start;
  }

  .model-family-card header {
    min-height: auto;
    padding: 26px;
  }

  .model-card-visual {
    height: 142px;
  }

  .performance-intro h2,
  .section-heading-title h2,
  .status-header h2 {
    font-size: clamp(46px, 12vw, 58px);
  }

  .section-heading-copy {
    font-size: 15px;
  }

  .plan-grid {
    gap: 12px;
  }

  .final-cta {
    min-height: 390px;
    padding: 52px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-connector i,
  .visual-speed i,
  .visual-vision b {
    animation: none;
  }
}

/* Square-corner system ----------------------------------------------------- */
:root {
  --panel-radius: 0px;
  --tab-indicator-radius: 0px;
}

[data-theme] * {
  border-radius: 0 !important;
}

/* Keep circles only where the shape communicates live state or data. */
[data-theme] .hero-kicker i,
[data-theme] .hero-assurance i,
[data-theme] .hero-product-toolbar i,
[data-theme] .hero-product-output > span i,
[data-theme] .route-connector i,
[data-theme] .visual-reasoning i,
[data-theme] .visual-reasoning b,
[data-theme] .visual-vectors i,
[data-theme] .code-footer i,
[data-theme] .model-picker-option > i,
[data-theme] .status-summary i,
[data-theme] .status-board dt i,
[data-theme] .service-status i,
[data-theme] .status-primary-card h2 i,
[data-theme] .dashboard-nav-foot b i {
  border-radius: 50% !important;
}

[data-theme] .sliding-tabs::before {
  border-radius: 0 !important;
}

/* High-contrast solid surface system --------------------------------------
   Decorative haze and layered gradients are removed in favor of one strong
   teal signal color, opaque surfaces, and sharper type hierarchy. */
[data-theme] body {
  background: var(--bg);
}

[data-theme] body::before,
[data-theme] .models-hero::before,
[data-theme] .models-hero::after,
[data-theme] .page-hero::after {
  display: none;
}

[data-theme] h1,
[data-theme] h2,
[data-theme] h3,
[data-theme] h4 {
  font-weight: 700 !important;
}

[data-theme] h1 em,
[data-theme] h2 em,
[data-theme] h3 em {
  font-weight: 500 !important;
}

/* Editorial italics carry the serif contrast, not the product colour. */
.detail-body h1 em,
.detail-body h2 em,
.auth-visual h1 em {
  color: inherit;
}

[data-theme] .section-index,
[data-theme] .hero-kicker,
[data-theme] .page-kicker {
  font-weight: 500;
}

[data-theme] .desktop-nav a,
[data-theme] .text-link {
  font-weight: 500;
}

[data-theme] .site-header,
[data-theme="dark"] .site-header,
[data-theme="light"] .site-header {
  border-bottom-color: var(--line);
  background: var(--bg);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme] .button-accent {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}

[data-theme] .button-accent:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: var(--accent-ink);
}

[data-theme] .button-outline {
  border-color: var(--line-strong);
  background: transparent;
}

[data-theme] .button-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

[data-theme] .hero-product-stage,
[data-theme] .model-family-card,
[data-theme] .custom-model-card,
[data-theme] .benchmark-panel,
[data-theme] .code-window,
[data-theme] .cost-calculator,
[data-theme] .plan-card,
[data-theme] .status-board,
[data-theme] .dashboard-panel,
[data-theme] .model-picker-panel,
[data-theme] .auth-panel,
[data-theme] .auth-card {
  background-color: var(--panel);
  background-image: none;
  box-shadow: none;
}

[data-theme] .model-family-card:hover,
[data-theme] .plan-card:hover,
[data-theme] .dashboard-panel:hover {
  background-color: var(--panel-raised);
  background-image: none;
  box-shadow: none;
}

[data-theme] .plan-card-featured {
  border-color: var(--accent-dark);
  background: var(--panel);
}

[data-theme] .quick-steps li,
[data-theme] .quick-steps li:first-child,
[data-theme] .quick-steps .docs-link-item,
[data-theme] .benchmark-toolbar,
[data-theme] .code-toolbar,
[data-theme] .status-summary,
[data-theme] .status-kpis {
  background: var(--panel);
}

[data-theme] .performance-section,
[data-theme] .pricing-section,
[data-theme] .detail-body,
[data-theme] .dashboard-body {
  background: var(--bg);
}

[data-theme] .final-cta {
  background: var(--ink);
  color: var(--bg);
  box-shadow: none;
}

[data-theme] .final-cta::after,
[data-theme] .final-cta .cta-grid,
[data-theme] .final-cta .cta-orb {
  display: none;
}

[data-theme] .final-cta h2,
[data-theme] .final-cta .section-index {
  color: var(--bg);
}

[data-theme] .final-cta .button-dark {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
}

[data-theme] .final-cta .button-dark:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

[data-theme] .final-cta .button-outline {
  border-color: color-mix(in srgb, var(--bg) 34%, transparent);
  color: var(--bg);
}

[data-theme] .final-cta .button-outline:hover {
  border-color: var(--bg);
  background: transparent;
  color: var(--bg);
}

[data-theme] .brand-finale,
[data-theme] .footer-grid > div,
[data-theme] .footer-brand {
  background: var(--bg-deep) !important;
}

[data-theme] .theme-toggle,
[data-theme] input,
[data-theme] select,
[data-theme] textarea {
  background-color: var(--panel);
  box-shadow: none;
}

[data-theme] .auth-visual {
  background: var(--surface);
}

[data-theme] .auth-visual::after {
  display: none;
}

[data-theme] .credit-note,
[data-theme] .model-catalogue-row,
[data-theme] .price-table-row,
[data-theme] .callout {
  background-color: var(--panel);
  background-image: none;
}

[data-theme] .dashboard-sidebar nav a[aria-current="page"] {
  background: var(--accent-soft);
}

[data-theme] .page-stat-row > div:hover,
[data-theme] .dashboard-model-list li:hover,
[data-theme] .dashboard-table tbody tr:hover,
[data-theme] .model-catalogue-row:hover,
[data-theme] .price-table-row:hover {
  background: var(--surface-2);
}

[data-theme] .dashboard-chart .area {
  fill: var(--accent-soft);
}

[data-theme] .dashboard-chart .line {
  stroke: var(--accent);
}

/* --------------------------------------------------------------------------
   Unified typography system
   Editorial serif for page/section statements, Inter for every supporting
   layer, and monospace only where the content is actually code.
   -------------------------------------------------------------------------- */

[data-theme] .desktop-nav a {
  font-size: 15px;
}

[data-theme] .section-index,
[data-theme] .hero-kicker,
[data-theme] .page-kicker,
.detail-body .page-eyebrow,
.detail-body .page-hero-copy strong {
  font-family: var(--sans);
  font-size: var(--type-label);
  font-weight: 600;
  letter-spacing: .08em;
}

[data-theme] .section-index,
[data-theme] .hero-kicker,
[data-theme] .page-kicker,
.detail-body .page-eyebrow {
  color: var(--muted);
}

.detail-body main h1,
.detail-body main h2 {
  font-family: var(--brand-roman) !important;
  font-weight: 400 !important;
  letter-spacing: -.045em;
}

.detail-body .docs-sidebar h2,
.detail-body .footer-grid h3 {
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  letter-spacing: .08em;
}

.detail-body .page-hero-copy,
.detail-body .section-intro p {
  color: var(--text);
  font-size: var(--type-body);
  line-height: 1.65;
}

.detail-body .detail-main :where(span, small, strong, b, dt, dd, th, td, label, time) {
  font-family: var(--sans);
}

.detail-body .detail-main :where(code, pre, kbd, samp),
.detail-body .detail-main :where(code, pre, kbd, samp) * {
  font-family: var(--mono);
}

.detail-body .page-stat-row span,
.detail-body .page-stat-row small,
.detail-body .spec-label,
.detail-body .catalogue-count,
.detail-body .model-catalogue-head,
.detail-body .model-identity > span,
.detail-body .model-identity small,
.detail-body .model-cell small,
.detail-body .model-status,
.detail-body .detail-index > span {
  font-size: var(--type-label);
  font-weight: 500;
  letter-spacing: .06em;
}

.detail-body .page-stat-row strong {
  font-family: var(--sans);
  font-size: var(--type-title-lg);
  font-weight: 500;
  letter-spacing: -.025em;
}

.detail-body .model-catalogue-head {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: .08em;
}

.detail-body .model-cell {
  font-family: var(--sans);
  font-size: var(--type-ui);
}

[data-theme] .footer-grid h3,
[data-theme] .footer-bottom {
  font-family: var(--sans) !important;
}

.auth-visual h1 {
  font-family: var(--brand-roman) !important;
  font-weight: 400 !important;
  letter-spacing: -.045em;
}

.dashboard-body .dashboard-shell :where(span, small, strong, b, dt, dd, th, td, label, time) {
  font-family: var(--sans);
}

.dashboard-body .dashboard-shell :where(code, pre, kbd, samp),
.dashboard-body .dashboard-shell :where(code, pre, kbd, samp) * {
  font-family: var(--mono);
}

.dashboard-body .dashboard-page-header h1 {
  font-family: var(--sans) !important;
  font-size: 32px;
  font-weight: 600 !important;
  letter-spacing: -.035em;
}

/* --------------------------------------------------------------------------
   Shared editorial frame
   Carry the homepage's vertical rails through every public subpage.
   -------------------------------------------------------------------------- */

.detail-body .detail-main {
  width: min(100%, var(--shell));
  margin-inline: auto;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--bg);
}

.detail-body .detail-main > .page-shell,
.detail-body .detail-main > .content-section > .page-shell {
  width: 100%;
}

/* Full-width notes use the page rails as their side edges. */
.detail-body .detail-main > .content-section > .page-shell.credit-note {
  border-right: 0;
  border-left: 0;
}

@media (min-width: 961px) {
  .detail-body .docs-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 25px);
    max-height: calc(100dvh - var(--header-h) - 50px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .detail-body .docs-sidebar::-webkit-scrollbar {
    display: none;
  }
}

.detail-body .docs-sidebar a {
  margin-left: -15px;
  padding-left: 14px;
  border-left: 1px solid transparent;
}

.detail-body .docs-sidebar a[aria-current] {
  border-left-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 1120px) {
  .detail-body .detail-main {
    border-right: 0;
    border-left: 0;
  }
}

@media (max-width: 960px) {
  .detail-body .docs-sidebar {
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .detail-body .docs-sidebar a {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .detail-body .model-id-box {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
  }

  .detail-body .model-id-box > div {
    min-width: 0;
  }

  .detail-body .model-id-box code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
