@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Unbounded:wght@500;600;700&display=swap");

:root {
  color-scheme: light;
  --paper: #f4f0e6;
  --paper-deep: #e9e2d3;
  --ink: #171714;
  --muted: #716e66;
  --line: rgba(23, 23, 20, 0.17);
  --line-strong: rgba(23, 23, 20, 0.55);
  --accent: #3158ee;
  --accent-soft: #dfe5ff;
  --signal: #ff5a36;
  --success: #177a56;
  --error: #c33723;
  --shadow: 0 28px 80px rgba(36, 30, 17, 0.11);
  --radius: 22px;
  --font-display: "Unbounded", "Arial Narrow", sans-serif;
  --font-body: "Manrope", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 79% 5%, rgba(255, 90, 54, 0.13), transparent 22rem),
    linear-gradient(180deg, #f8f5ed 0%, var(--paper) 62%, #ece5d7 100%);
  color: var(--ink);
  font-family: var(--font-body);
  transition: background-color 300ms ease, color 300ms ease;
}

body[data-effort="light"] {
  --accent: #3e776c;
  --accent-soft: #dcebe4;
  --signal: #e88f79;
  --radius: 28px;
}

body[data-effort="ultra"] {
  --accent: #e83c21;
  --accent-soft: #ffd8ce;
  --signal: #ff3a1e;
  --radius: 3px;
}

button,
textarea,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible + span,
input:focus-visible ~ span {
  outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

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

.page-grid {
  position: fixed;
  z-index: -3;
  inset: 0;
  background-image:
    linear-gradient(rgba(23, 23, 20, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 20, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

.signal-orbit {
  position: absolute;
  z-index: -2;
  border: 1px solid rgba(23, 23, 20, 0.11);
  border-radius: 50%;
  pointer-events: none;
}

.signal-orbit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--signal) 14%, transparent);
}

.signal-orbit--one {
  top: 84px;
  right: -190px;
  width: 520px;
  height: 520px;
  animation: orbit 18s linear infinite;
}

.signal-orbit--two {
  top: 210px;
  right: -95px;
  width: 310px;
  height: 310px;
  animation: orbit 13s linear infinite reverse;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  border-radius: 11px 11px 2px 11px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: -0.08em;
  transition: border-radius 250ms ease, transform 250ms ease;
}

body[data-effort="ultra"] .brand__mark {
  border-radius: 0;
  transform: skewX(-5deg);
  box-shadow: 5px 5px 0 var(--signal);
}

.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand__lockup {
  display: grid;
  gap: 4px;
}

.brand__by {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.api-state {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.api-state__lamp {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aaa69d;
  box-shadow: 0 0 0 4px rgba(23, 23, 20, 0.06);
}

.api-state[data-state="checking"] .api-state__lamp {
  animation: pulse 1.3s infinite;
}

.api-state[data-state="ready"] .api-state__lamp {
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 12%, transparent);
}

.api-state[data-state="missing"] .api-state__lamp {
  background: #d28a13;
}

.api-state[data-state="error"] .api-state__lamp {
  background: var(--error);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.58fr);
  gap: 36px;
  align-items: end;
  padding: 76px 0 52px;
}

.eyebrow {
  grid-column: 1 / -1;
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  margin-right: 10px;
  padding: 4px 7px;
  background: var(--ink);
  color: var(--paper);
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 6.2vw, 92px);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.hero h1 em {
  color: var(--accent);
  font-family: inherit;
  font-style: normal;
  transition: color 250ms ease;
}

body[data-effort="ultra"] .hero h1 em {
  display: inline-block;
  transform: skewX(-7deg);
  text-decoration: underline;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.1em;
}

.hero__lead {
  max-width: 400px;
  margin: 0 0 7px;
  color: #514f49;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.55;
}

.hero__index {
  position: absolute;
  top: 86px;
  right: 0;
  display: flex;
  width: min(280px, 24vw);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9px;
}

.hero__index i {
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.translator-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(250, 248, 242, 0.88);
  box-shadow: var(--shadow);
  transition: border-radius 300ms ease, box-shadow 300ms ease, transform 300ms ease;
  backdrop-filter: blur(20px);
}

body[data-effort="light"] .translator-shell {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 30px 90px rgba(62, 119, 108, 0.13);
}

body[data-effort="ultra"] .translator-shell {
  border: 2px solid var(--ink);
  box-shadow: 11px 11px 0 var(--ink), 17px 17px 0 var(--signal);
}

.shell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 21px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.direction-switch {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-deep);
}

.direction-option {
  cursor: pointer;
}

.direction-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.direction-option span {
  display: block;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: 180ms ease;
}

.direction-option input:checked + span {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 13px rgba(23, 23, 20, 0.14);
}

.direction-switch__track {
  display: grid;
  width: 36px;
  place-items: center;
}

.direction-switch__track svg {
  width: 25px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform 250ms ease;
}

body:has(input[name="direction"][value="simplify"]:checked) .direction-switch__track svg {
  transform: rotate(180deg);
}

.shortcut-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

kbd {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
}

.workbench {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 650px;
}

.control-deck {
  display: flex;
  flex-direction: column;
  padding: 28px 23px 22px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.63), transparent 45%),
    var(--paper-deep);
}

.control-group {
  min-width: 0;
  padding: 0;
  margin: 0 0 28px;
  border: 0;
}

.control-group legend {
  width: 100%;
  padding: 0 0 13px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.control-group legend span {
  margin-right: 8px;
  color: var(--accent);
}

.dialect-options {
  display: grid;
  gap: 7px;
}

.dialect-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr 12px;
  gap: 11px;
  align-items: center;
  min-height: 72px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) * 0.45);
  cursor: pointer;
  transition: 180ms ease;
}

.dialect-card:hover {
  background: rgba(255, 255, 255, 0.6);
}

.dialect-card:has(input:checked) {
  border-color: var(--ink);
  background: #fff;
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--accent) 65%, transparent);
}

.dialect-card[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.34;
}

.dialect-card input,
.effort-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dialect-card__code {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 9px;
}

.dialect-card:has(input:checked) .dialect-card__code {
  background: var(--accent);
}

.dialect-card__copy {
  display: grid;
  gap: 3px;
}

.dialect-card__copy strong {
  font-size: 13px;
  line-height: 1.15;
}

.dialect-card__copy small {
  color: var(--muted);
  font-size: 10px;
}

.dialect-card__dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.dialect-card:has(input:checked) .dialect-card__dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.effort-scale {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 2px;
}

.effort-scale::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 8px;
  width: 1px;
  background: var(--line-strong);
}

.effort-option {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 13px;
  align-items: center;
  min-height: 53px;
  padding: 7px 10px 7px 0;
  cursor: pointer;
}

.effort-option__tick {
  width: 14px;
  height: 14px;
  border: 2px solid var(--paper-deep);
  border-radius: 50%;
  background: #a6a197;
  box-shadow: 0 0 0 1px var(--line-strong);
  transition: 180ms ease;
}

.effort-option:has(input:checked) .effort-option__tick {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-soft);
  transform: scale(1.08);
}

.effort-option > span:last-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 9px;
  border-radius: 8px;
  transition: 180ms ease;
}

.effort-option:has(input:checked) > span:last-child {
  background: color-mix(in srgb, var(--accent-soft) 78%, white);
}

.effort-option strong {
  font-size: 12px;
}

.effort-option small {
  color: var(--muted);
  font-size: 9px;
}

.effort-option--ultra:has(input:checked) > span:last-child {
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  transform: skewX(-3deg);
}

.effort-option--ultra:has(input:checked) small {
  color: #ff9d88;
}

.control-group--effort.is-locked .effort-scale {
  opacity: 0.28;
  filter: grayscale(1);
}

.reverse-note {
  display: none;
  padding: 10px 11px;
  margin: 10px 0 0;
  border-left: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.reverse-note.is-visible {
  display: block;
}

.mode-readout {
  display: grid;
  gap: 7px;
  padding: 15px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.45);
  background: var(--ink);
  color: var(--paper);
}

.mode-readout span {
  color: #aaa79f;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mode-readout strong {
  font-family: var(--font-display);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.editor-deck {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 46px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 25px;
}

.text-panel {
  display: grid;
  grid-template-rows: auto minmax(130px, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.7);
  background: rgba(255, 255, 255, 0.72);
  transition: border 200ms ease, box-shadow 200ms ease, border-radius 200ms ease;
}

.text-panel:focus-within {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--ink));
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.text-panel--result {
  position: relative;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 56%, white), rgba(255, 255, 255, 0.78));
}

body[data-effort="ultra"] .text-panel--result {
  border: 2px solid var(--ink);
  background: #fff4f0;
  box-shadow: 5px 5px 0 var(--accent);
}

body[data-effort="light"] .text-panel--result {
  background: linear-gradient(135deg, #eef7f3, #fffaf5);
}

.text-panel.has-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--error) 13%, transparent);
}

.text-panel.has-success {
  border-color: var(--success);
}

.text-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 67px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.text-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.icon-button,
.copy-button,
.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: 160ms ease;
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.copy-button {
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.share-button {
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 72%, white);
  font-size: 10px;
  font-weight: 700;
}

.result-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.icon-button:hover,
.copy-button:hover:not(:disabled),
.share-button:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.copy-button.is-copied {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.icon-button svg,
.copy-button svg,
.share-button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.text-panel textarea {
  width: 100%;
  height: 100%;
  min-height: 145px;
  padding: 18px 18px 12px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.68;
}

.text-panel textarea::placeholder {
  color: #9c988f;
}

.result-field {
  position: relative;
  min-height: 0;
}

.text-panel--result textarea {
  font-weight: 500;
}

.text-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.input-note {
  text-align: right;
}

.is-near-limit {
  color: var(--error);
}

.request-status {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  max-width: 70%;
  text-align: right;
}

.request-status i {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9b978e;
}

.request-status[data-state="loading"] i {
  background: var(--accent);
  animation: pulse 1s infinite;
}

.request-status[data-state="success"] i {
  background: var(--success);
}

.request-status[data-state="error"] {
  color: var(--error);
}

.request-status[data-state="error"] i {
  background: var(--error);
}

.loading-scan {
  position: absolute;
  inset: 18px;
  display: none;
  align-content: center;
  gap: 13px;
  pointer-events: none;
}

.text-panel.is-loading .loading-scan {
  display: grid;
}

.loading-scan span {
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(23, 23, 20, 0.06), var(--accent-soft), rgba(23, 23, 20, 0.06));
  background-size: 240% 100%;
  animation: scan 1.2s linear infinite;
}

.loading-scan span:nth-child(2) {
  width: 88%;
  animation-delay: 100ms;
}

.loading-scan span:nth-child(3) {
  width: 61%;
  animation-delay: 200ms;
}

.transfer-rail {
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  gap: 9px;
  align-items: center;
  color: var(--muted);
}

.transfer-rail span {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 10px);
}

.transfer-rail svg {
  width: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
  transition: transform 250ms ease;
}

body:has(input[name="direction"][value="simplify"]:checked) .transfer-rail svg {
  transform: rotate(180deg);
}

.translate-button {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 27px;
  gap: 15px;
  align-items: center;
  width: 100%;
  min-height: 65px;
  padding: 14px 18px;
  margin-top: 18px;
  overflow: hidden;
  border: 0;
  border-radius: calc(var(--radius) * 0.6);
  background: var(--ink);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, background 250ms ease, border-radius 250ms ease;
}

.translate-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
  transition: width 260ms ease;
}

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

.translate-button:hover:not(:disabled)::before {
  width: 100%;
}

.translate-button > * {
  position: relative;
  z-index: 1;
}

.translate-button__label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.translate-button__mode {
  color: #aaa79f;
  font-family: var(--font-display);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-align: right;
}

.translate-button svg {
  width: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: transform 180ms ease;
}

.translate-button:hover:not(:disabled) svg {
  transform: translateX(4px);
}

.translate-button.is-loading svg {
  animation: arrow-work 900ms ease-in-out infinite alternate;
}

body[data-effort="ultra"] .translate-button {
  border-radius: 0;
  background: var(--accent);
  box-shadow: 5px 5px 0 var(--ink);
  transform: skewX(-1deg);
}

body[data-effort="ultra"] .translate-button::before {
  background: #ffca33;
}

body[data-effort="light"] .translate-button {
  background: #315f57;
}

.examples {
  padding: 110px 0 95px;
}

.examples__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.examples__head .eyebrow {
  margin-bottom: 9px;
}

.examples h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 45px);
  letter-spacing: -0.045em;
}

.examples__number {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 12px;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.example-card {
  position: relative;
  min-height: 215px;
  padding: 27px 54px 27px 25px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 200ms ease;
}

.example-card:first-child {
  border-left: 1px solid var(--line);
}

.example-card:hover {
  z-index: 1;
  background: #fff;
  box-shadow: 0 22px 45px rgba(36, 30, 17, 0.1);
  transform: translateY(-5px);
}

.example-card--ultra:hover {
  background: #231b17;
  color: #fff;
  box-shadow: 7px 7px 0 var(--signal);
}

.example-card__meta {
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.example-card strong {
  display: block;
  margin-top: 24px;
  font-family: var(--font-display);
  font-size: 16px;
}

.example-card p {
  max-width: 250px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.example-card--ultra:hover p {
  color: #c9c4bb;
}

.example-card__arrow {
  position: absolute;
  top: 25px;
  right: 25px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 14px;
  transition: 180ms ease;
}

.example-card:hover .example-card__arrow {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  transform: rotate(12deg);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 25px 0 34px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer span {
  margin: 0 6px;
  color: var(--accent);
}

.site-footer a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--accent);
}

body.is-telegram {
  padding-bottom: max(0px, var(--tg-safe-area-inset-bottom, 0px));
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  50% { opacity: 0.35; transform: scale(0.72); }
}

@keyframes scan {
  to { background-position: -140% 0; }
}

@keyframes arrow-work {
  to { transform: translateX(7px); }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 60px;
  }

  .hero__lead {
    max-width: 620px;
  }

  .hero__index {
    display: none;
  }

  .workbench {
    grid-template-columns: 245px minmax(0, 1fr);
  }

  .control-deck {
    padding-inline: 17px;
  }

  .editor-deck {
    padding: 18px;
  }

  .effort-option > span:last-child {
    display: grid;
    gap: 2px;
  }
}

@media (max-width: 760px) {
  .signal-orbit {
    display: none;
  }

  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1320px);
  }

  .api-state__text {
    display: none;
  }

  .api-state {
    width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
  }

  .hero {
    gap: 19px;
    padding: 45px 0 34px;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 66px);
  }

  .hero__lead {
    font-size: 14px;
  }

  .shell-head {
    justify-content: center;
    padding: 12px;
  }

  .shortcut-hint {
    display: none;
  }

  .direction-switch {
    width: 100%;
    justify-content: space-between;
  }

  .direction-option span {
    padding-inline: 10px;
    font-size: 10px;
  }

  .workbench {
    display: block;
  }

  .control-deck {
    display: block;
    padding: 20px 15px 17px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dialect-options {
    grid-template-columns: repeat(3, 1fr);
  }

  .dialect-card {
    display: flex;
    min-width: 0;
    min-height: 84px;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    padding: 8px 5px;
    text-align: center;
  }

  .dialect-card__code {
    width: 27px;
    height: 27px;
    font-size: 7px;
  }

  .dialect-card__copy strong {
    font-size: 10px;
  }

  .dialect-card__copy small,
  .dialect-card__dot {
    display: none;
  }

  .control-group {
    margin-bottom: 21px;
  }

  .effort-scale {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 0;
  }

  .effort-scale::before,
  .effort-option__tick {
    display: none;
  }

  .effort-option {
    display: block;
    min-height: 54px;
    padding: 0;
  }

  .effort-option > span:last-child {
    display: grid;
    min-height: 54px;
    align-content: center;
    gap: 3px;
    border: 1px solid var(--line);
    text-align: center;
  }

  .effort-option small {
    font-size: 7px;
  }

  .mode-readout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 13px;
  }

  .editor-deck {
    grid-template-rows: auto 38px auto auto;
    padding: 14px;
  }

  .text-panel textarea {
    min-height: 180px;
    font-size: 15px;
  }

  .input-note {
    max-width: 55%;
  }

  .translate-button {
    position: sticky;
    z-index: 4;
    bottom: 10px;
  }

  body[data-effort="ultra"] .translator-shell {
    box-shadow: 6px 6px 0 var(--ink), 10px 10px 0 var(--signal);
  }

  .examples {
    padding: 78px 0 65px;
  }

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

  .example-card,
  .example-card:first-child {
    min-height: 170px;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .site-footer {
    display: grid;
    gap: 8px;
    line-height: 1.5;
  }
}

@media (max-width: 430px) {
  .brand__mark {
    width: 42px;
    height: 42px;
  }

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

  .direction-switch__track {
    width: 22px;
  }

  .direction-switch__track svg {
    width: 19px;
  }

  .direction-option span {
    padding-inline: 8px;
    font-size: 9px;
  }

  .text-panel__head,
  .text-panel__foot {
    padding-inline: 12px;
  }

  .copy-button span,
  .share-button span {
    display: none;
  }

  .copy-button,
  .share-button {
    width: 34px;
    padding: 0;
  }

  .request-status {
    max-width: 64%;
  }

  .translate-button__mode {
    display: none;
  }

  .translate-button {
    grid-template-columns: 1fr 27px;
  }
}

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