:root {
  --ink: #12172f;
  --ink-soft: #3f4664;
  --blue: #3154e8;
  --blue-dark: #1e3ab9;
  --blue-wash: #e4e9ff;
  --orange: #ff633f;
  --orange-wash: #ffe4dc;
  --aqua: #bfe9e6;
  --canvas: #eef2f8;
  --paper: #fbfcff;
  --white: #ffffff;
  --line: #cad2e3;
  --line-dark: #9ba7c0;
  --success: #087f68;
  --danger: #b72f2f;
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 24px 70px rgba(27, 39, 81, 0.13);
  --shadow-small: 0 10px 30px rgba(27, 39, 81, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(49, 84, 232, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 84, 232, 0.038) 1px, transparent 1px),
    var(--canvas);
  background-size: 32px 32px;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
}

img,
svg {
  display: block;
}

button {
  color: inherit;
}

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

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1440px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(155, 167, 192, 0.7);
  background: rgba(238, 242, 248, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand svg {
  width: 34px;
  height: 34px;
  padding: 4px;
  border-radius: 9px;
  color: var(--white);
  background: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar nav a {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.topbar nav a:hover {
  color: var(--blue);
}

.model-chip {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pulse-dot,
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
  width: min(1320px, calc(100% - 64px));
  min-height: 690px;
  margin: 0 auto;
  padding: 80px 0 96px;
}

.hero-copy {
  max-width: 730px;
  animation: hero-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow,
.section-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  color: var(--blue-dark);
}

.eyebrow-rule {
  width: 48px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(56px, 6.7vw, 102px);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.hero h1 span {
  color: var(--blue);
}

.hero-lede {
  max-width: 630px;
  margin: 34px 0 0;
  color: var(--ink-soft);
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.button-primary {
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(49, 84, 232, 0.25);
}

.button-primary:hover:not(:disabled) {
  background: var(--blue-dark);
  box-shadow: 0 14px 30px rgba(49, 84, 232, 0.3);
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

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

.button-quiet {
  padding-inline: 10px;
  color: var(--ink-soft);
  background: transparent;
}

.text-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.hero-disclaimer {
  max-width: 560px;
  margin: 22px 0 0;
  color: #68708c;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
}

.hero-proof {
  position: relative;
  min-height: 560px;
  animation: hero-proof-in 800ms 140ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.proof-card {
  position: absolute;
  width: min(76%, 390px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.proof-source {
  top: 0;
  left: 0;
  transform: rotate(-3deg);
}

.proof-source img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.proof-output {
  right: 0;
  bottom: 4px;
  min-height: 280px;
  padding-bottom: 24px;
  transform: rotate(2deg);
}

.proof-label {
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  background: rgba(251, 252, 255, 0.94);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.typeset-sample {
  display: grid;
  gap: 12px;
  padding: 38px 34px 24px;
  font-family: Georgia, serif;
  font-size: 22px;
}

.preserved-line {
  position: relative;
  display: inline-block;
  width: fit-content;
}

.preserved-line::after {
  position: absolute;
  right: -4px;
  bottom: -6px;
  left: -4px;
  height: 3px;
  border-radius: 3px;
  background: var(--orange);
  content: "";
  transform: rotate(-1deg);
}

.preserved-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 20px 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #7b321f;
  background: var(--orange-wash);
  font-size: 14px;
  font-weight: 700;
}

.proof-connector {
  position: absolute;
  z-index: 3;
  top: 48%;
  left: 43%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  transform: rotate(-16deg);
}

.connector-line {
  width: 68px;
  height: 2px;
  background: currentColor;
}

.connector-glyph {
  font-size: 28px;
}

.scan-rail {
  position: absolute;
  z-index: 4;
  top: 4%;
  bottom: 3%;
  left: 53%;
  width: 2px;
  background: linear-gradient(transparent, var(--orange) 14%, var(--orange) 86%, transparent);
  box-shadow: 0 0 22px rgba(255, 99, 63, 0.5);
  animation: scan-drift 4.8s ease-in-out infinite alternate;
}

.scan-rail::before,
.scan-rail::after {
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  background: var(--canvas);
  content: "";
  transform: translateX(-50%);
}

.scan-rail::before {
  top: 12%;
}

.scan-rail::after {
  bottom: 12%;
}

.principle-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.principle-strip p {
  min-height: 86px;
  margin: 0;
  padding: 25px 28px;
  color: var(--ink-soft);
  font-size: 15px;
}

.principle-strip p + p {
  border-left: 1px solid var(--line-dark);
}

.principle-strip strong {
  color: var(--ink);
}

.workspace-section,
.evaluation-section {
  width: min(1440px, calc(100% - 40px));
  margin: 110px auto 0;
}

.workspace-section {
  position: relative;
  padding: clamp(28px, 4vw, 58px);
  border: 1px solid var(--line-dark);
  border-radius: 34px;
  background: rgba(251, 252, 255, 0.95);
  box-shadow: var(--shadow);
}

.workspace-section::before,
.workspace-section::after {
  position: absolute;
  width: 24px;
  height: 24px;
  content: "";
}

.workspace-section::before {
  top: 20px;
  left: 20px;
  border-top: 2px solid var(--orange);
  border-left: 2px solid var(--orange);
}

.workspace-section::after {
  right: 20px;
  bottom: 20px;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  align-items: flex-end;
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--blue-dark);
}

.section-heading h2 {
  max-width: 880px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 70px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.runtime-badge {
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-wash);
}

.runtime-badge span,
.runtime-badge strong {
  display: block;
}

.runtime-badge span {
  color: var(--blue-dark);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runtime-badge strong {
  margin-top: 3px;
  font-size: 15px;
}

.process-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}

.process-rail li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--line-dark);
}

.process-rail li:not(:last-child)::after {
  position: absolute;
  top: 19px;
  right: 18px;
  left: 52px;
  height: 1px;
  background: var(--line);
  content: "";
}

.process-rail li > span {
  position: relative;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.process-rail strong,
.process-rail small {
  display: block;
}

.process-rail strong {
  color: var(--ink-soft);
  font-size: 14px;
}

.process-rail small {
  font-size: 12px;
}

.process-rail li.is-current,
.process-rail li.is-complete {
  color: var(--blue);
}

.process-rail li.is-current > span {
  color: var(--white);
  background: var(--blue);
}

.process-rail li.is-complete > span {
  color: var(--white);
  background: var(--success);
}

.process-rail li.is-current strong,
.process-rail li.is-complete strong {
  color: var(--ink);
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.5fr);
  gap: 18px;
  margin-top: 34px;
}

.drop-zone {
  position: relative;
  display: flex;
  min-height: 150px;
  align-items: center;
  gap: 20px;
  padding: 26px;
  border: 2px dashed var(--line-dark);
  border-radius: 18px;
  background: var(--white);
  cursor: pointer;
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--blue);
  background: #f5f7ff;
  transform: translateY(-2px);
}

.drop-icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  color: var(--blue);
  background: var(--blue-wash);
}

.drop-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.drop-zone strong,
.drop-zone p,
.drop-zone small {
  display: block;
}

.drop-zone strong {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.drop-zone p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.drop-zone p span {
  color: var(--blue-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drop-zone small {
  position: absolute;
  right: 18px;
  bottom: 13px;
  color: #6f7892;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.upload-controls {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f6f8fc;
}

.control-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  min-height: 36px;
  place-items: center;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}

.segmented-control input:checked + span {
  color: var(--white);
  background: var(--ink);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.transcribe-button {
  width: 100%;
}

.sample-button {
  border: 0;
  color: var(--blue-dark);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.file-bar {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.file-identity,
.file-status {
  display: flex;
  align-items: center;
}

.file-identity {
  min-width: 0;
  gap: 12px;
}

.file-type {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--blue-dark);
  background: var(--blue-wash);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
}

.file-identity strong,
.file-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-identity strong {
  max-width: 48vw;
  font-size: 14px;
}

.file-identity small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12px;
}

.file-status {
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.file-status.is-processing .status-dot {
  animation: status-pulse 1s ease-in-out infinite;
}

.file-status.is-done .status-dot {
  background: var(--success);
}

.file-status.is-error .status-dot {
  background: var(--danger);
}

.error-banner {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #eaa6a6;
  border-radius: 10px;
  color: #761f1f;
  background: #fff0f0;
  font-size: 14px;
  font-weight: 700;
}

.mobile-tabs {
  display: none;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 1fr);
  min-height: 560px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background: var(--white);
}

.workbench-pane {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.workbench-pane + .workbench-pane {
  border-left: 1px solid var(--line-dark);
}

.pane-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.pane-header > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pane-header h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.pane-index {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  color: var(--blue-dark);
  background: var(--white);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

.pane-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pane-tools button {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-family: var(--mono);
  cursor: pointer;
}

.pane-tools button:hover {
  border-color: var(--line);
  background: var(--white);
}

.pane-tools button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.pane-tools span {
  min-width: 42px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.source-stage {
  position: relative;
  display: grid;
  min-height: 500px;
  flex: 1;
  overflow: auto;
  place-items: center;
  background: #dfe5ef;
}

.source-grid {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(49, 84, 232, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 84, 232, 0.12) 1px, transparent 1px);
  background-size: 20px 20px;
}

.source-stage img,
.source-stage object {
  position: relative;
  z-index: 2;
  width: calc(100% - 42px);
  max-width: 540px;
  height: auto;
  max-height: 450px;
  border: 1px solid var(--line-dark);
  background: var(--white);
  box-shadow: var(--shadow-small);
  object-fit: contain;
  transform: rotate(var(--source-rotation, 0deg)) scale(var(--source-scale, 1));
  transform-origin: center;
  transition: transform 180ms ease;
}

.source-stage object {
  height: 440px;
}

.active-scan-line {
  position: absolute;
  z-index: 4;
  top: 12%;
  right: 10%;
  left: 10%;
  height: 3px;
  opacity: 0;
  background: var(--orange);
  box-shadow: 0 0 14px rgba(255, 99, 63, 0.7);
}

.active-scan-line.is-scanning {
  opacity: 1;
  animation: workbench-scan 2.3s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.editor-pane textarea {
  width: 100%;
  min-height: 455px;
  flex: 1;
  resize: none;
  padding: 24px 20px;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: #dce2ff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    #161c38;
  background-size: 28px 100%;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  tab-size: 2;
}

.editor-pane textarea:focus-visible {
  box-shadow: inset 0 0 0 3px var(--orange);
}

.live-label,
.preview-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-label span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.editor-footer,
.preview-footer {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px;
  color: #777f99;
  background: #f7f9fc;
  font-family: var(--mono);
  font-size: 9px;
}

.rendered-preview {
  display: grid;
  min-height: 455px;
  flex: 1;
  padding: 24px;
  overflow: auto;
  place-items: center;
  background: #e7ebf3;
}

.preview-paper {
  position: relative;
  display: grid;
  width: min(100%, 440px);
  min-height: 390px;
  padding: 34px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.preview-paper::before {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--orange);
  border-right: 2px solid var(--orange);
  content: "";
}

.math-output {
  width: 100%;
  overflow-x: auto;
  color: var(--ink);
  font-size: 20px;
  text-align: center;
}

.math-output mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.preview-footer {
  justify-content: flex-start;
}

.proof-mark {
  color: var(--orange);
  font-size: 17px;
}

.output-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 4px 0;
}

.output-actions p {
  max-width: 650px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.output-actions p strong {
  color: var(--ink);
}

.output-actions > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.evaluation-section {
  margin-bottom: 120px;
}

.evaluation-heading {
  align-items: flex-end;
}

.evaluation-heading > p {
  max-width: 430px;
  margin: 0;
  color: var(--ink-soft);
}

.paired-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.paired-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.paired-heading > p {
  max-width: 430px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.paired-heading {
  margin-top: 48px;
}

.paired-heading h3 {
  font-size: clamp(28px, 3.5vw, 42px);
}

.benchmark-stack {
  display: grid;
  gap: 28px;
  margin-top: 48px;
}

.benchmark-card {
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.benchmark-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.65fr);
  gap: 28px;
  align-items: end;
  padding: 24px;
  border-bottom: 1px solid var(--line-dark);
  background: #f7f9fc;
}

.protocol-chip {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 8px;
  border: 1px solid #acb9db;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--blue-wash);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.benchmark-card-header h4 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.benchmark-card-header p {
  max-width: 440px;
  margin: 0;
  justify-self: end;
  color: var(--ink-soft);
  font-size: 13px;
}

.checkpoint-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

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

.checkpoint-score {
  position: relative;
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 26px;
  background: var(--white);
}

.checkpoint-score-primary {
  color: var(--white);
  background: var(--blue);
}

.checkpoint-score-page {
  background: #e7f4f2;
}

.checkpoint-score-win {
  background: #edf8f5;
  box-shadow: inset 0 4px 0 var(--success);
}

.checkpoint-score-win .score-glyph {
  color: #056754;
  background: #d8f0e9;
}

.checkpoint-score-reference {
  color: var(--white);
  background: var(--ink);
}

.score-glyph {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--blue-dark);
  background: var(--blue-wash);
  font-family: Georgia, serif;
  font-size: 19px;
}

.checkpoint-score-primary .score-glyph {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
}

.checkpoint-score-reference .score-glyph {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.checkpoint-score p {
  margin: 34px 0 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.checkpoint-score-primary p {
  color: rgba(255, 255, 255, 0.8);
}

.checkpoint-score-reference p {
  color: rgba(255, 255, 255, 0.8);
}

.checkpoint-score > strong {
  font-family: var(--display);
  font-size: clamp(42px, 4vw, 58px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.checkpoint-score > small {
  margin-top: auto;
  padding-top: 22px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-transform: uppercase;
}

.checkpoint-score-primary > small {
  color: rgba(255, 255, 255, 0.76);
}

.checkpoint-score-reference > small {
  color: rgba(255, 255, 255, 0.72);
}

.frontier-scorecard .protocol-chip {
  border-color: #c6ad8d;
  color: #733725;
  background: var(--orange-wash);
}

.comparison-scroll {
  max-width: 100%;
  overflow-x: auto;
  background: var(--white);
  scrollbar-color: var(--line-dark) #eef1f6;
  scrollbar-width: thin;
}

.comparison-scroll:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -4px;
}

.comparison-shell {
  width: 100%;
  min-width: 840px;
  border-spacing: 0;
  border-collapse: separate;
  table-layout: fixed;
  background: var(--white);
}

.compact-comparison {
  min-width: 760px;
}

.golden-comparison {
  min-width: 1080px;
}

.comparison-shell .metric-column {
  width: 27%;
}

.comparison-shell th,
.comparison-shell td {
  border-bottom: 1px solid var(--line);
}

.comparison-shell tr > * + * {
  border-left: 1px solid var(--line);
}

.comparison-shell tbody tr:last-child > * {
  border-bottom: 0;
}

.comparison-header,
.comparison-metric,
.comparison-value {
  padding: 22px 24px;
  text-align: left;
}

.comparison-header {
  height: 138px;
  vertical-align: bottom;
}

.comparison-metric-header {
  position: sticky;
  z-index: 3;
  left: 0;
  color: var(--ink-soft);
  background: #f5f7fb;
  box-shadow: 8px 0 16px -16px rgba(18, 23, 47, 0.7);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.specialist-header {
  color: var(--white);
  background: var(--blue);
  box-shadow: inset 0 -4px 0 var(--orange);
}

.frontier-header {
  background: #e9edf5;
}

.base-header {
  background: var(--blue-wash);
}

.trained-header {
  background: #e7f4f2;
}

.delta-header {
  background: var(--orange-wash);
}

.comparison-header strong,
.comparison-header small,
.comparison-header span {
  display: block;
}

.column-kicker {
  margin-bottom: 13px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.8;
  text-transform: uppercase;
}

.comparison-header strong {
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: -0.035em;
}

.comparison-header small {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.75;
}

.comparison-metric {
  position: sticky;
  z-index: 2;
  left: 0;
  background: #f9fafc;
  box-shadow: 8px 0 16px -16px rgba(18, 23, 47, 0.7);
  vertical-align: middle;
}

.comparison-metric strong,
.comparison-metric span {
  display: block;
}

.comparison-metric strong {
  font-size: 15px;
}

.comparison-metric span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.comparison-value {
  height: 118px;
  vertical-align: middle;
}

.comparison-value > strong,
.comparison-value > span {
  display: block;
}

.comparison-value > strong {
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: -0.04em;
}

.comparison-value > strong + span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.specialist-value {
  background: #f3f5ff;
}

.specialist-value strong {
  color: var(--blue-dark);
}

.improvement-value {
  background: #edf8f5;
}

.score-transition {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 9px;
  align-items: end;
  margin-bottom: 13px;
}

.score-point {
  display: grid;
  gap: 1px;
}

.score-point small,
.score-point em {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.score-point strong {
  font-family: var(--display);
  font-size: 25px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.score-arrow {
  padding-bottom: 13px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 17px;
}

.delta-badge,
.reference-tag {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.25;
  text-transform: uppercase;
}

.delta-positive {
  border-color: #86c6b7;
  color: #056754;
  background: #ddf3ed;
}

.delta-negative {
  border-color: #e4aaaa;
  color: #9a2929;
  background: #fdeaea;
}

.delta-neutral,
.reference-tag {
  border-color: #b8c1d3;
  color: var(--ink-soft);
  background: #eef1f6;
}

.cell-caveat {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.35;
}

.reference-value .reference-tag {
  margin-top: 12px;
}

.benchmark-takeaway {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: #f7f9fc;
}

.benchmark-takeaway-gain {
  background: #edf8f5;
}

.takeaway-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: var(--white);
  background: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
}

.benchmark-takeaway-gain .takeaway-symbol {
  background: var(--success);
}

.benchmark-takeaway p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.benchmark-takeaway strong {
  color: var(--ink);
}

.evaluation-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px 22px;
  border: 1px solid #f2b7a9;
  border-radius: 16px;
  color: #733725;
  background: var(--orange-wash);
}

.evaluation-note-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--orange);
}

.evaluation-note p {
  margin: 0;
  font-size: 14px;
}

.evaluation-note a {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-underline-offset: 4px;
}

.specialist-reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.specialist-reasons article {
  min-height: 220px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(251, 252, 255, 0.84);
}

.reason-glyph {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: var(--blue-dark);
  background: var(--blue-wash);
  font-family: Georgia, serif;
  font-size: 26px;
}

.specialist-reasons h3 {
  margin: 34px 0 8px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.specialist-reasons p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 28px;
  align-items: center;
  width: min(1440px, calc(100% - 40px));
  min-height: 120px;
  margin: 0 auto;
  border-top: 1px solid var(--line-dark);
  color: var(--ink-soft);
  font-size: 13px;
}

.footer-brand {
  font-size: 18px;
}

.footer-brand svg {
  width: 30px;
  height: 30px;
}

footer p {
  margin: 0;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-proof-in {
  from {
    opacity: 0;
    transform: translateX(26px) rotate(1deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
}

@keyframes scan-drift {
  from {
    transform: translateX(-18px);
  }
  to {
    transform: translateX(18px);
  }
}

@keyframes workbench-scan {
  0% {
    top: 12%;
  }
  50% {
    top: 82%;
  }
  100% {
    top: 12%;
  }
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 99, 63, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 99, 63, 0);
  }
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr 430px;
    gap: 42px;
    width: min(100% - 40px, 1180px);
  }

  .hero h1 {
    font-size: clamp(54px, 7vw, 82px);
  }

  .hero-proof {
    min-height: 510px;
  }

  .workspace-section,
  .evaluation-section {
    width: calc(100% - 28px);
  }

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

  .preview-pane {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-dark);
    border-left: 0 !important;
  }

  .rendered-preview,
  .preview-paper {
    min-height: 320px;
  }

}

@media (max-width: 860px) {
  body {
    background-size: 24px 24px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    width: calc(100% - 28px);
  }

  .topbar nav {
    display: none;
  }

  .model-chip {
    font-size: 9px;
  }

  .hero {
    grid-template-columns: 1fr;
    width: calc(100% - 32px);
    min-height: 0;
    padding: 68px 0 74px;
  }

  .hero h1 {
    font-size: clamp(52px, 14vw, 82px);
  }

  .hero-proof {
    width: min(100%, 580px);
    min-height: 560px;
    margin: 12px auto 0;
  }

  .principle-strip {
    grid-template-columns: 1fr;
    width: calc(100% - 28px);
  }

  .principle-strip p + p {
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }

  .workspace-section,
  .evaluation-section {
    margin-top: 72px;
  }

  .workspace-section {
    padding: 28px 18px;
    border-radius: 24px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .runtime-badge {
    width: 100%;
  }

  .process-rail li div {
    display: none;
  }

  .process-rail li:not(:last-child)::after {
    left: 46px;
  }

  .upload-row {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    min-height: 172px;
    align-items: flex-start;
  }

  .drop-zone small {
    right: auto;
    left: 26px;
  }

  .file-bar,
  .output-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-status {
    padding-left: 54px;
  }

  .mobile-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 18px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #edf0f6;
  }

  .mobile-tabs button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    color: var(--ink-soft);
    background: transparent;
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-tabs button.is-active {
    color: var(--white);
    background: var(--ink);
  }

  .workbench {
    display: block;
    min-height: 520px;
    margin-top: 8px;
  }

  .workbench-pane {
    display: none;
    min-height: 520px;
  }

  .workbench-pane.is-active {
    display: flex;
  }

  .workbench-pane + .workbench-pane {
    border-top: 0;
    border-left: 0;
  }

  .source-stage,
  .editor-pane textarea,
  .rendered-preview {
    min-height: 456px;
  }

  .output-actions > div {
    width: 100%;
    justify-content: flex-start;
  }

  .benchmark-card {
    border-radius: 16px;
  }

  .benchmark-card-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px 18px;
  }

  .benchmark-card-header p {
    max-width: none;
    justify-self: start;
  }

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

  .checkpoint-score {
    min-height: 220px;
  }

  .glm-comparison {
    min-width: 800px;
  }

  .golden-comparison {
    min-width: 1020px;
  }

  .paired-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .comparison-header,
  .comparison-metric,
  .comparison-value {
    padding: 18px;
  }

  .evaluation-note {
    grid-template-columns: auto 1fr;
  }

  .evaluation-note a {
    grid-column: 2;
  }

  .specialist-reasons {
    grid-template-columns: 1fr;
  }

  .specialist-reasons article {
    min-height: 0;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 32px 0;
  }
}

@media (max-width: 520px) {
  .topbar {
    min-height: 64px;
  }

  .brand {
    font-size: 19px;
  }

  .brand svg {
    width: 30px;
    height: 30px;
  }

  .model-chip {
    max-width: 150px;
    padding: 7px 9px;
    line-height: 1.2;
  }

  .hero h1 {
    font-size: 50px;
  }

  .hero-lede {
    font-size: 18px;
  }

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

  .hero-proof {
    min-height: 490px;
  }

  .proof-card {
    width: 82%;
  }

  .proof-output {
    min-height: 248px;
  }

  .typeset-sample {
    padding: 28px 24px 18px;
    font-size: 18px;
  }

  .section-heading h2 {
    font-size: 40px;
  }

  .drop-zone {
    flex-direction: column;
  }

  .drop-zone small {
    bottom: 12px;
  }

  .file-identity strong {
    max-width: 230px;
  }

  .button-secondary {
    width: 100%;
  }

  .output-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .output-actions .button-quiet {
    grid-column: 1 / -1;
  }

  .evaluation-note {
    grid-template-columns: 1fr;
  }

  .evaluation-note a {
    grid-column: auto;
  }

  .benchmark-takeaway {
    grid-template-columns: 1fr;
  }

  .checkpoint-score-grid {
    grid-template-columns: 1fr;
  }

  .checkpoint-score {
    min-height: 210px;
  }
}

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

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