:root {
  color-scheme: light;
  --page: #f5f7fa;
  --surface: #ffffff;
  --soft: #edf1f6;
  --text: #202124;
  --muted: #666d76;
  --line: #d6dde6;
  --line-strong: #aeb8c5;
  --blue: #1a5fb4;
  --blue-soft: #e7f0fd;
  --green: #137333;
  --orange: #a54f0f;
  --grid: rgba(32, 33, 36, 0.045);
  --shadow: rgba(32, 33, 36, 0.16);
  --code: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #17181b;
  --surface: #202124;
  --soft: #292a2d;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --line: #3c4043;
  --line-strong: #5f6368;
  --blue: #8ab4f8;
  --blue-soft: #26374f;
  --green: #81c995;
  --orange: #f6a25f;
  --grid: rgba(232, 234, 237, 0.035);
  --shadow: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  transition: background-color 160ms ease, color 160ms ease;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 10px;
  background: var(--text);
  color: var(--page);
  transform: translateY(-160%);
}

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

.site-header,
.site-footer,
main {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  text-decoration: none;
}

.brand img {
  border-radius: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.site-nav a,
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover,
.text-link:hover {
  color: var(--text);
}

.theme-toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font: inherit;
  font-weight: 600;
}

.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
}

.theme-indicator {
  width: 11px;
  height: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(90deg, var(--text) 50%, var(--surface) 50%);
}

main {
  border-inline: 1px solid var(--line);
  background: var(--surface);
}

.grid-surface {
  background-color: var(--page);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.contrast-hero {
  overflow: hidden;
  min-height: 570px;
  padding: 76px 56px 160px;
  border-bottom: 1px solid var(--line);
}

.contrast-hero h1 {
  margin: 0;
  font-size: clamp(4.2rem, 10.5vw, 8.8rem);
  font-weight: 650;
  line-height: 0.82;
  letter-spacing: -0.078em;
}

.raw-line,
.answer-line {
  display: block;
}

.raw-line {
  color: var(--muted);
}

.answer-line {
  position: relative;
  z-index: 1;
  margin-left: clamp(42px, 13vw, 170px);
  color: var(--text);
}

.answer-line::after {
  content: "";
  position: absolute;
  right: 0.04em;
  bottom: 0.03em;
  left: 0;
  z-index: -1;
  height: 0.08em;
  background: var(--blue);
}

.hero-meta {
  display: grid;
  grid-template-columns: minmax(0, 650px) auto;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  margin-top: 46px;
}

.eyebrow,
.beta-note,
.section-index,
.stage-toolbar,
.map-token,
.diff-table,
.products-table,
.sdk-line,
.privacy-mark {
  font-family: var(--code);
}

.eyebrow,
.section-index {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.hero-summary {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
}

.hero-meta .button {
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 25px 0 15px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 5px;
  padding: 0 16px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--page);
}

:root[data-theme="dark"] .button.primary {
  color: #17181b;
}

.button.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--text);
}

.text-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.beta-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.feature-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  width: calc(100% - 112px);
  margin: -105px auto 78px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 25px 58px var(--shadow);
}

.feature-tabs {
  border-right: 1px solid var(--line);
  background: var(--soft);
}

.feature-tabs button {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 62px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
}

.feature-tabs button:hover {
  color: var(--text);
}

.feature-tabs button[aria-selected="true"] {
  box-shadow: inset 3px 0 0 var(--blue);
  background: var(--blue-soft);
  color: var(--text);
}

.stage-main {
  min-width: 0;
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  font-size: 13px;
}

.capture-state {
  color: var(--green);
}

.work-area[hidden] {
  display: none;
}

.stage-canvas {
  min-height: 385px;
  padding: 44px 48px 24px;
  background-image: radial-gradient(var(--line) 0.8px, transparent 0.8px);
  background-size: 16px 16px;
}

.dictionary-map {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) 42px minmax(180px, 1.25fr);
  align-items: center;
  gap: 13px;
  max-width: 660px;
  margin: 10px auto 48px;
}

.map-column {
  display: grid;
  gap: 11px;
}

.map-token {
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  font-weight: 650;
}

.map-token.resolved {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.map-arrow {
  color: var(--blue);
  font-size: 1.8rem;
  text-align: center;
}

.stage-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.stage-caption strong {
  color: var(--text);
}

.diff-table,
.products-table {
  max-width: 700px;
  margin: 0 auto 43px;
}

.diff-row,
.product-row {
  display: grid;
  gap: 14px;
  padding: 13px 6px;
  border-bottom: 1px solid var(--line);
}

.diff-row {
  grid-template-columns: minmax(100px, 0.7fr) minmax(130px, 1fr) minmax(130px, 1fr);
}

.product-row {
  grid-template-columns: minmax(120px, 1fr) minmax(90px, 0.65fr) minmax(70px, 0.55fr);
}

.diff-row.heading,
.product-row.heading,
.field-name {
  color: var(--muted);
}

.changed {
  margin: -4px;
  padding: 4px;
  border-radius: 4px;
  background: var(--blue-soft);
}

.product-row.emphasized {
  border-left: 3px solid var(--orange);
  padding-left: 12px;
}

.seo-section {
  display: block;
  padding: clamp(66px, 9vw, 108px) 56px;
  border-top: 1px solid var(--line);
}

.section-index {
  padding-top: 8px;
  color: var(--muted);
}

.seo-copy {
  max-width: 780px;
  margin-left: clamp(0px, 22vw, 240px);
}

.seo-copy h2,
.install-section h2,
.policy-content h2 {
  margin: 0;
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.seo-copy h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4.4vw, 3.7rem);
}

.seo-copy > p {
  max-width: 690px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.7;
}

.quiet-list {
  margin-top: 38px;
  border-top: 1px solid var(--line);
}

.quiet-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.quiet-list strong {
  font-weight: 650;
}

.quiet-list span {
  color: var(--muted);
}

.sdk-line {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  margin-top: 42px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}

.sdk-line span[aria-hidden="true"] {
  color: var(--blue);
}

.privacy-mark {
  display: grid;
  place-items: center;
  width: 176px;
  min-height: 84px;
  margin: 38px 0 24px;
  border: 1px solid var(--line-strong);
  color: var(--green);
  font-size: 1.75rem;
  font-weight: 650;
}

.install-section {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 390px;
  padding: 78px 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.install-section h2 {
  max-width: 760px;
  margin-top: 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.install-section > p:not(.eyebrow) {
  max-width: 600px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.install-section .button {
  margin-top: 28px;
}

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  min-height: 98px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.footer-brand {
  color: var(--text);
}

/* Privacy policy */
.policy-main {
  min-height: 70vh;
}

.policy-header {
  padding: 70px 56px 42px;
  border-bottom: 1px solid var(--line);
}

.policy-header h1 {
  margin: 12px 0 18px;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.lede {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
}

.policy-content {
  width: min(760px, calc(100% - 64px));
  margin-inline: auto;
  padding: 44px 0 70px;
}

.policy-content section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.policy-content h2 {
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.policy-content p,
.policy-content li {
  color: var(--muted);
  line-height: 1.7;
}

.policy-content code {
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--soft);
  color: var(--text);
  font-family: var(--code);
}

.policy-content a {
  color: var(--blue);
}

@media (max-width: 860px) {
  .contrast-hero {
    min-height: 530px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-stage {
    grid-template-columns: 1fr;
    width: calc(100% - 48px);
  }

  .feature-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-tabs button {
    min-height: 50px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    text-align: center;
  }

  .feature-tabs button:last-child {
    border-right: 0;
  }

  .feature-tabs button[aria-selected="true"] {
    box-shadow: inset 0 -3px 0 var(--blue);
  }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  main {
    width: 100%;
  }

  .site-header {
    padding-inline: 16px;
  }

  .site-nav {
    display: none;
  }

  .contrast-hero {
    min-height: 490px;
    padding: 58px 24px 142px;
  }

  .answer-line {
    margin-left: 0;
  }

  .feature-stage {
    width: calc(100% - 32px);
    margin-top: -90px;
    margin-bottom: 54px;
  }

  .stage-canvas {
    min-height: 0;
    padding: 32px 24px 22px;
  }

  .seo-section {
    padding: 64px 24px;
  }

  .seo-copy {
    margin-left: 0;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .policy-header {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .site-header {
    gap: 10px;
  }

  .theme-toggle [data-theme-label] {
    display: none;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .contrast-hero {
    min-height: 450px;
    padding: 48px 16px 125px;
  }

  .contrast-hero h1 {
    font-size: clamp(3.5rem, 18vw, 5rem);
  }

  .hero-meta {
    margin-top: 32px;
  }

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

  .button {
    width: 100%;
  }

  .feature-stage {
    width: calc(100% - 24px);
    margin-top: -75px;
  }

  .feature-tabs button {
    min-height: 46px;
    padding: 0 7px;
  }

  .stage-toolbar {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 10px 13px;
  }

  .stage-canvas {
    padding: 24px 16px 18px;
  }

  .dictionary-map {
    grid-template-columns: 1fr;
    margin-bottom: 28px;
  }

  .map-arrow {
    transform: rotate(90deg);
  }

  .stage-caption {
    display: block;
  }

  .stage-caption span {
    display: block;
    margin-top: 5px;
  }

  .diff-row,
  .product-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .diff-row.heading,
  .product-row.heading {
    display: none;
  }

  .quiet-list > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .sdk-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .sdk-line span[aria-hidden="true"] {
    transform: rotate(90deg);
  }

  .seo-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .policy-content {
    width: calc(100% - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body,
  .button {
    transition: none;
  }
}
