@font-face {
  font-family: "Albert Sans";
  src: url("/fonts/AlbertSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("/fonts/AlbertSans-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("/fonts/AlbertSans-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Mongolian";
  src: url("/fonts/NotoSansMongolian-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f7f9fa;
  --surface: #ecf0f2;
  --surface-strong: #dfe6e9;
  --ink: #1f3038;
  --muted: #35474f;
  --accent: #0d7480;
  --accent-ink: #ffffff;
  --deep: #183d43;
  --white: #ffffff;
  --font-ui: "Albert Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mn: "Noto Sans Mongolian", "Mongolian Baiti", serif;
  --text-xs: 0.8125rem;
  --text-body: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  --text-lead: 1.5rem;
  --text-head: 2.8125rem;
  --text-display: clamp(3.25rem, 2.15rem + 4.6vw, 5.25rem);
  --page-pad: clamp(1rem, 2vw, 1.75rem);
  --section-gap: clamp(6rem, 12vw, 11rem);
  --content: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
}

button {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

[lang="mn"] {
  font-family: var(--font-mn);
  font-feature-settings: "ccmp", "locl", "rlig", "calt";
  unicode-bidi: plaintext;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

.site-header {
  position: relative;
  z-index: 10;
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 1.5rem var(--page-pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.wordmark-mark {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mn);
  font-size: 1.2rem;
}

.site-header nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(1rem, 2.4vw, 2.4rem);
  font-size: var(--text-xs);
}

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

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

.service-state {
  min-width: 7.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  color: var(--muted);
  font-size: var(--text-xs);
}

.service-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.service-state[data-state="ready"] .service-dot {
  background: var(--accent);
}

.service-state[data-state="error"] .service-dot {
  background: #a43b32;
}

.hero {
  position: relative;
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: clamp(5rem, 9vw, 8.5rem) 0 var(--section-gap);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(50rem, calc(100% - (var(--page-pad) * 2)));
  margin-left: var(--page-pad);
}

.hero h1 {
  margin: 0;
  max-width: 11ch;
  font-size: var(--text-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-copy > p {
  max-width: 39ch;
  margin: 1.75rem 0 1.4rem;
  color: var(--muted);
  font-size: var(--text-body);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.32em;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 44rem;
  margin-top: 2.25rem;
  margin-left: clamp(1rem, 29vw, 27rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 0 clamp(1rem, 5vw, 4.5rem);
  background: var(--accent);
  clip-path: polygon(4rem 0, 100% 0, 100% 100%, 0 100%, 0 4rem);
}

.stage-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 64rem;
  margin: 0 3.5rem 0.9rem 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-xs);
}

.translator {
  width: min(68rem, calc(100vw - clamp(1rem, 29vw, 27rem) - clamp(1rem, 5vw, 4.5rem)));
  min-width: 46rem;
  background: var(--white);
  border-radius: 0;
  clip-path: inset(0);
  animation: shutter-reveal 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes shutter-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0);
  }
}

.translator-head {
  min-height: 3.5rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--ink);
  color: var(--white);
}

.language-pair {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  font-size: var(--text-xs);
  font-weight: 500;
}

.language-pair [lang="mn"] {
  font-size: var(--text-xs);
}

.pair-arrow {
  color: rgba(255, 255, 255, 0.55);
}

.model-badge {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--text-xs);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.93fr);
  background: var(--surface-strong);
  gap: 1px;
}

.editor-pane {
  min-width: 0;
  padding: 1rem;
  background: var(--white);
}

.pane-head {
  min-height: 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: var(--text-xs);
}

.pane-head label {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.target-head {
  align-items: center;
}

#sourceText {
  width: 100%;
  min-height: 17rem;
  resize: vertical;
  padding: 1rem;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-body);
  line-height: 1.75;
}

#sourceText::placeholder {
  color: #849198;
}

#sourceText:focus {
  outline: 0;
  border-color: var(--accent);
}

.example-row {
  min-height: 2.8rem;
  padding-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.example-button,
.view-button,
.copy-button,
.plain-button {
  min-height: 2.3rem;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-xs);
  cursor: pointer;
}

.example-button:hover,
.view-button:hover,
.copy-button:hover,
.plain-button:hover {
  background: var(--surface-strong);
}

.target-tools {
  display: flex;
  gap: 0.25rem;
}

.view-button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.copy-button {
  margin-left: 0.25rem;
  color: var(--accent);
}

.result-wrap {
  min-height: 20.5rem;
  max-height: 20.5rem;
  margin-top: 0.5rem;
  padding: 0.9rem 0;
  overflow: auto;
  background: var(--surface);
}

.result-text {
  min-width: 100%;
  margin: 0;
  padding: 1rem;
  color: var(--ink);
  font-family: var(--font-mn);
  font-size: var(--text-lead);
  line-height: 1.9;
  letter-spacing: 0.015em;
}

.result-text.is-vertical,
.mini-target.is-vertical,
.state-mn.is-vertical,
.glyph-stage [lang="mn"] {
  writing-mode: vertical-lr;
  text-orientation: upright;
  unicode-bidi: plaintext;
}

.result-text.is-vertical {
  width: max-content;
  height: 18rem;
  min-width: calc(100% - 2rem);
}

.result-text.is-horizontal,
.mini-target.is-horizontal,
.state-mn.is-horizontal {
  writing-mode: horizontal-tb;
}

.result-meta {
  min-height: 2.1rem;
  padding-top: 0.45rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: var(--text-xs);
}

#resultNotice {
  color: var(--accent);
  text-align: right;
}

.translate-action {
  min-height: 4.5rem;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
}

.primary-button {
  position: relative;
  min-width: 12rem;
  min-height: 3rem;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  cursor: pointer;
}

.primary-button:hover {
  background: #09636d;
}

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

.primary-button[disabled] {
  cursor: wait;
}

.button-progress {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--white);
  transform: translateX(-100%);
}

.primary-button.is-loading .button-progress {
  animation: progress 1.1s ease-in-out infinite;
}

@keyframes progress {
  0% {
    transform: translateX(-100%);
  }
  60% {
    transform: translateX(20%);
  }
  100% {
    transform: translateX(100%);
  }
}

.shortcut-hint {
  color: var(--muted);
  font-size: var(--text-xs);
}

.glossary {
  background: var(--surface);
}

.glossary summary {
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.glossary summary::-webkit-details-marker {
  display: none;
}

.summary-note {
  color: var(--muted);
  font-size: var(--text-xs);
}

.glossary-body {
  padding: 0 1rem 1rem;
}

.glossary-body label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--text-xs);
}

#glossaryInput {
  width: 100%;
  min-height: 6.5rem;
  resize: vertical;
  padding: 0.75rem;
  border: 1px solid #bcc8cd; /* taste-skill-ignore: real textarea form field */
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-mn);
  font-size: 1rem;
  line-height: 1.65;
}

.glossary-footer {
  min-height: 2.4rem;
  padding-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: var(--text-xs);
}

.section-intro,
.proof-head,
.faq,
.showcase,
.capabilities,
.how,
.proof {
  width: min(100%, var(--content));
  margin: 0 auto;
}

.showcase,
.capabilities,
.how,
.proof {
  padding: 0 var(--page-pad) var(--section-gap);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(16rem, 7fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.5rem;
}

.section-intro h2,
.proof-head h2,
.faq h2,
.how h2 {
  margin: 0;
  max-width: 13ch;
  font-size: var(--text-head);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-intro p,
.proof-head p,
.faq-heading p {
  max-width: 45ch;
  margin: 0;
  color: var(--muted);
}

.showcase-board {
  padding: 0.75rem;
  background: var(--ink);
}

.showcase-item + .showcase-item {
  margin-top: 4px;
}

.showcase-row {
  width: 100%;
  min-height: 4.5rem;
  padding: 0.8rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 5rem;
  align-items: center;
  gap: 1rem;
  border: 0;
  border-radius: 0;
  background: #2b3f47;
  color: var(--white);
  text-align: left;
  cursor: pointer;
}

.showcase-row:hover {
  background: #354c55;
}

.showcase-source {
  overflow: hidden;
  font-size: var(--text-body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showcase-tag,
.showcase-state {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-xs);
}

.showcase-state {
  text-align: right;
}

.showcase-item.is-open .showcase-row {
  background: var(--accent);
  color: var(--accent-ink);
}

.showcase-item.is-open .showcase-tag,
.showcase-item.is-open .showcase-state {
  color: rgba(255, 255, 255, 0.8);
}

.showcase-detail {
  min-height: 15rem;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: minmax(12rem, 0.65fr) minmax(18rem, 1.35fr);
  gap: 2rem;
  background: var(--accent);
  color: var(--white);
  overflow-x: auto;
}

.mini-source {
  margin: 0;
  font-size: var(--text-lead);
  line-height: 1.55;
}

.mini-target {
  margin: 0;
  min-height: 13rem;
  font-size: var(--text-lead);
  line-height: 1.85;
}

.mini-target.is-vertical {
  width: max-content;
  height: 13rem;
}

.capabilities {
  padding-top: var(--section-gap);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 21rem 19rem;
  gap: 8px;
}

.feature {
  overflow: hidden;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  background: var(--surface);
}

.feature h3,
.step h3 {
  margin: 0 0 0.8rem;
  font-size: var(--text-lead);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.feature p,
.step p {
  margin: 0;
  max-width: 45ch;
  color: var(--muted);
  font-size: var(--text-body);
}

.feature-type {
  grid-column: 1 / span 7;
  grid-row: 1 / span 2;
  background: var(--ink);
  color: var(--white);
}

.feature-type p {
  color: rgba(255, 255, 255, 0.88);
}

.feature-terms {
  grid-column: 8 / span 5;
  grid-row: 1;
}

.feature-length {
  grid-column: 8 / span 5;
  grid-row: 2;
}

.glyph-stage {
  min-height: 18rem;
  display: flex;
  justify-content: flex-end;
  gap: clamp(1rem, 4vw, 4rem);
  overflow: hidden;
}

.glyph-stage [lang="mn"] {
  height: 16rem;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.4;
  color: var(--white);
}

.term-demo {
  display: grid;
  gap: 4px;
  background: var(--surface-strong);
}

.split-demo {
  background: var(--white);
}

.term-demo > div {
  min-height: 3.8rem;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: minmax(6rem, auto) 1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
}

.term-demo strong {
  font-weight: 400;
  font-size: var(--text-body);
  text-align: right;
}

.split-demo {
  padding: 1rem;
}

.split-demo p {
  color: var(--ink);
  font-size: var(--text-body);
}

.split-track {
  margin-top: 1rem;
  display: flex;
  gap: 4px;
}

.split-track span {
  padding: 0.45rem 0.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--text-xs);
}

.how {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(24rem, 7fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: start;
  padding-top: var(--section-gap);
}

.how-copy {
  padding-top: 0.5rem;
}

.step-list {
  margin-top: 3.5rem;
}

.step {
  min-height: 17rem;
  padding: 2rem 0;
  color: var(--muted);
}

.step.is-active {
  color: var(--ink);
}

.step.is-active h3 {
  color: var(--ink);
}

.step p {
  color: currentColor;
}

.how-stage {
  position: sticky;
  top: 12vh;
  min-height: 34rem;
  background: var(--deep);
  color: var(--white);
}

.how-state {
  position: absolute;
  inset: 0;
  min-height: 34rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--deep);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}

.how-state.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.state-label,
.state-note {
  color: rgba(255, 255, 255, 0.84);
  font-size: var(--text-xs);
}

.how-state > p:not(.state-mn) {
  max-width: 18ch;
  margin: 1rem 0 0;
  font-size: var(--text-lead);
}

.state-line {
  width: 75%;
  height: 0.7rem;
  background: rgba(255, 255, 255, 0.18);
}

.state-line-short {
  width: 48%;
}

.state-mn {
  margin: 0;
  font-size: var(--text-lead);
  line-height: 1.85;
}

.state-mn.is-vertical {
  height: 22rem;
  width: max-content;
}

.demo-copy {
  width: fit-content;
  margin-top: auto;
  background: var(--white);
  color: var(--deep);
}

.proof {
  padding-top: var(--section-gap);
}

.proof-head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(16rem, 6fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.5rem;
}

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

.proof-tile {
  min-height: 14rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
}

.proof-tile-lead {
  grid-column: span 2;
  background: var(--accent);
  color: var(--accent-ink);
}

.proof-tile span,
.proof-tile p {
  margin: 0;
  color: currentColor;
  font-size: var(--text-xs);
}

.proof-tile strong {
  font-size: var(--text-head);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.faq {
  padding: var(--section-gap) var(--page-pad);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(20rem, 8fr);
  gap: clamp(2rem, 7vw, 7rem);
}

.faq-heading {
  position: sticky;
  top: 6rem;
  align-self: start;
}

.faq-heading p {
  margin-top: 1rem;
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq details {
  background: var(--surface);
}

.faq summary {
  min-height: 4.5rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--text-body);
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] {
  background: var(--accent);
  color: var(--accent-ink);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 52ch;
  margin: 0;
  padding: 0 1.25rem 1.35rem;
  color: currentColor;
  font-size: var(--text-body);
}

.site-footer {
  width: 100%;
  padding: 0 max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  display: grid;
  gap: 8px;
}

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

.footer-grid > div {
  min-height: 13rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.footer-statement {
  grid-column: span 4;
  justify-content: space-between;
}

.footer-statement p {
  max-width: 22ch;
  margin: 0;
  font-size: var(--text-lead);
  line-height: 1.25;
}

.footer-statement span,
.footer-model span,
.footer-font span,
.footer-model p,
.footer-font p {
  color: var(--muted);
  font-size: var(--text-xs);
}

.footer-links {
  grid-column: span 3;
  gap: 0.55rem;
}

.footer-links a {
  width: fit-content;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-model,
.footer-font {
  grid-column: span 2;
  justify-content: space-between;
}

.footer-model strong,
.footer-font strong {
  font-size: var(--text-lead);
  line-height: 1.2;
}

.footer-model p,
.footer-font p {
  margin: 0;
}

.footer-mark {
  min-height: 18rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  background: var(--ink);
  color: var(--white);
}

.footer-mark a {
  max-width: 8ch;
  font-size: var(--text-display);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.footer-mark p {
  max-width: 18ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.footer-legal {
  margin: 0;
  padding: 0.4rem 0.25rem 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.toast {
  position: fixed;
  z-index: 80;
  right: 1rem;
  bottom: 1rem;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-size: 0.95rem;
}

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .stage {
    margin-left: var(--page-pad);
  }

  .translator {
    width: calc(100vw - (var(--page-pad) * 2) - clamp(1rem, 5vw, 4.5rem));
    min-width: 0;
  }

  .stage-caption {
    margin-right: var(--page-pad);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 1rem;
  }

  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .section-intro,
  .proof-head,
  .how,
  .faq {
    grid-template-columns: 1fr;
  }

  .how-stage {
    position: relative;
    top: auto;
  }

  .faq-heading {
    position: relative;
    top: auto;
  }

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

  .showcase-detail .mini-target.is-vertical {
    width: auto;
    height: auto;
    writing-mode: horizontal-tb;
  }

  .proof-tile-lead {
    grid-column: span 2;
  }

  .footer-statement,
  .footer-links {
    grid-column: span 6;
  }

  .footer-model,
  .footer-font {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  :root {
    --section-gap: 6.5rem;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .stage {
    min-height: 0;
    margin-top: 2rem;
    margin-right: 0;
    margin-left: var(--page-pad);
    padding: 2.5rem 0 0 1.25rem;
    clip-path: polygon(4.5rem 0, 100% 0, 100% 100%, 0 100%, 0 4.5rem);
  }

  .stage-caption {
    margin-right: var(--page-pad);
    font-size: 0.75rem;
  }

  .translator {
    width: calc(100vw - var(--page-pad) - 1.25rem);
    clip-path: inset(0);
    animation: none;
  }

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

  #sourceText {
    min-height: 12rem;
  }

  .result-wrap {
    min-height: 18rem;
    max-height: 18rem;
  }

  .result-text.is-vertical {
    height: 15.5rem;
  }

  .translate-action {
    flex-wrap: wrap;
  }

  .primary-button {
    width: 100%;
  }

  .section-intro {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .feature-type,
  .feature-terms,
  .feature-length {
    grid-column: auto;
    grid-row: auto;
  }

  .feature-type {
    min-height: 40rem;
  }

  .feature-terms,
  .feature-length {
    min-height: 25rem;
  }

  .glyph-stage {
    justify-content: center;
  }

  .showcase-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 4rem;
  }

  .showcase-tag {
    display: none;
  }

  .showcase-source {
    white-space: normal;
  }

  .showcase-detail {
    grid-template-columns: 1fr;
    min-height: 24rem;
  }

  .mini-target.is-vertical {
    height: 16rem;
  }

  .mini-target {
    font-size: var(--text-body);
  }

  .step {
    min-height: 13rem;
  }

  .how-state,
  .how-stage {
    min-height: 30rem;
  }

  .state-mn.is-vertical {
    height: 18rem;
  }

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

  .proof-tile-lead {
    grid-column: auto;
  }

  .proof-tile {
    min-height: 11rem;
  }

  .faq {
    padding-top: 0;
  }

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

  .footer-statement,
  .footer-links,
  .footer-model,
  .footer-font {
    grid-column: span 1;
  }

  .footer-statement,
  .footer-mark {
    grid-column: 1 / -1;
  }

  .footer-mark {
    min-height: 15rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
  }
}

@media (max-width: 430px) {
  .site-header nav {
    gap: 1rem;
    font-size: 0.78rem;
  }

  .service-state {
    min-width: auto;
  }

  .hero-copy > p {
    font-size: 1rem;
  }

  .target-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .showcase-board {
    padding: 0.35rem;
  }

  .showcase-row {
    padding: 0.75rem;
  }

  .showcase-detail {
    padding: 1rem;
  }

  .glossary summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .translator {
    clip-path: inset(0);
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
