@font-face {
  font-family: "LCD";
  src: url("/fonts/lcd.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #0b101b;
  --page-deep: #070b13;
  --panel: #111827;
  --panel-raised: #172033;
  --panel-soft: #0f1624;
  --line: #2d3950;
  --line-strong: #46536b;
  --text: #edf3f4;
  --text-soft: #b0bbc8;
  --text-dim: #7f8b9b;
  --green: #a6f493;
  --green-strong: #7ee56b;
  --green-dark: #183a1a;
  --amber: #ffc857;
  --danger: #ff8c85;
  --lcd: #a8ed8f;
  --lcd-dim: #8ed87b;
  --lcd-dark: #173318;
  --phone-body: #303a4d;
  --phone-edge: #505d74;
  --phone-key: #3b465c;
  --shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.35);
  --shell: 78rem;
  --radius-xs: 0.35rem;
  --radius-sm: 0.55rem;
  --radius: 0.9rem;
  --radius-lg: 1.35rem;
  --font-ui: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(166, 244, 147, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 244, 147, 0.022) 1px, transparent 1px),
    radial-gradient(70rem 38rem at 80% -12%, rgba(126, 229, 107, 0.1), transparent 66%),
    radial-gradient(44rem 36rem at -8% 18%, rgba(255, 200, 87, 0.06), transparent 68%),
    var(--page);
  background-size: 3rem 3rem, 3rem 3rem, auto, auto, auto;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 11, 19, 0) 0%, rgba(7, 11, 19, 0.5) 100%);
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 {
  max-width: 17ch;
  margin-bottom: 0;
  font-size: clamp(2.15rem, 5.6vw, 4.4rem);
  font-weight: 710;
}

h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 690;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
}

p {
  margin-bottom: 1rem;
}

button,
textarea,
select,
input {
  font: inherit;
}

button,
select {
  color: inherit;
}

button {
  border: 0;
}

button:not(:disabled),
select:not(:disabled),
summary {
  cursor: pointer;
}

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

a {
  color: var(--green);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--green-strong);
}

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

::selection {
  background: var(--green);
  color: var(--green-dark);
}

.shell {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.kicker {
  margin-bottom: 0.55rem;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--amber);
  color: #191405;
  font-weight: 750;
  text-decoration: none;
  transition: top 0.16s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(70, 83, 107, 0.62);
  background: rgba(11, 16, 27, 0.84);
  backdrop-filter: blur(16px) saturate(120%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  min-height: 4.25rem;
  gap: 1.1rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 780;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.brand__mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 1px solid rgba(166, 244, 147, 0.48);
  border-radius: 0.52rem;
  background: var(--green);
  box-shadow: 0 0 1.25rem rgba(166, 244, 147, 0.22);
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 850;
}

.brand__name {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  min-width: 0;
  margin-left: auto;
  gap: clamp(0.75rem, 2.1vw, 1.6rem);
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  position: relative;
  padding-block: 1.4rem 1.28rem;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 640;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--green);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="location"] {
  color: var(--text);
}

.site-nav a[aria-current="location"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-install {
  flex: 0 0 auto;
  min-height: 2.35rem;
  padding: 0.4rem 0.78rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.header-install:hover {
  border-color: var(--green);
  color: var(--green);
}

/* --------------------------------------------------------- shared controls */

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-raised);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 740;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

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

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

.button--primary {
  border-color: var(--green);
  background: var(--green);
  color: var(--green-dark);
}

.button--primary:hover {
  border-color: var(--green-strong);
  background: var(--green-strong);
  color: var(--green-dark);
}

.button--quiet {
  background: transparent;
}

.text-button {
  min-height: 2.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.text-button:hover {
  background: rgba(166, 244, 147, 0.08);
  color: var(--green);
}

/* ------------------------------------------------------------- workbench */

.workbench-section {
  padding: clamp(2.4rem, 5vw, 4.6rem) 0 clamp(4rem, 7vw, 6.5rem);
}

.workbench-intro {
  display: grid;
  align-items: end;
  gap: 1.35rem 3rem;
  margin-bottom: clamp(1.7rem, 4vw, 2.8rem);
}

.workbench-intro__support {
  max-width: 38rem;
}

.workbench-intro__support > p {
  margin-bottom: 0.8rem;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}

.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.2rem;
  margin: 0;
  padding: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  list-style: none;
  text-transform: uppercase;
}

.trust-line li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.trust-line li::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0.55rem rgba(166, 244, 147, 0.52);
}

.workbench-grid {
  display: grid;
  gap: 1.2rem;
  align-items: start;
}

.tool-console,
.phone-console {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(15, 22, 36, 0.94);
  box-shadow: var(--shadow);
}

.tool-console {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tool-console__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 4.2rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--page-deep);
}

.tool-tabs {
  display: flex;
  min-width: 0;
  gap: 0.35rem;
}

.tool-tab {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.78rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  font-size: clamp(0.78rem, 2vw, 0.9rem);
  font-weight: 730;
  white-space: nowrap;
}

.tool-tab:hover {
  color: var(--text);
}

.tool-tab.is-active {
  border-color: var(--line-strong);
  background: var(--panel-raised);
  color: var(--green);
}

.tool-tab__index {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
}

.tool-pane {
  padding: clamp(1rem, 2.7vw, 1.45rem);
}

.field-block {
  margin-bottom: 1rem;
}

.field-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.field-label {
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.field {
  display: block;
  width: 100%;
  min-height: 8.5rem;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: 0;
  background: #090f1a;
  color: var(--text);
  caret-color: var(--green);
  font-family: var(--font-mono);
  line-height: 1.55;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field--hero {
  padding: 1rem;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.field::placeholder {
  color: #687588;
}

.field:hover {
  border-color: #627087;
}

.field:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(166, 244, 147, 0.11);
}

.field-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  min-height: 1.4rem;
  margin-top: 0.42rem;
  color: var(--text-dim);
  font-size: 0.71rem;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.examples__label {
  margin-right: 0.12rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.examples button {
  min-height: 2.15rem;
  padding: 0.35rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.examples button:hover {
  border-color: var(--green);
  color: var(--green);
}

.format-bar {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0.8rem;
  border-block: 1px solid var(--line);
  background: rgba(7, 11, 19, 0.38);
}

.format-bar label {
  display: grid;
  grid-template-columns: minmax(7.6rem, auto) minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 660;
}

.format-bar select {
  width: 100%;
  min-height: 2.45rem;
  padding: 0.42rem 2rem 0.42rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--panel);
  color: var(--text);
  font-size: 0.78rem;
}

.result-stack,
.decoder-grid {
  display: grid;
  gap: 0.75rem;
}

.result-block {
  min-width: 0;
  padding: clamp(0.9rem, 2.4vw, 1.15rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.result-block--primary {
  border-color: rgba(166, 244, 147, 0.48);
  background:
    linear-gradient(135deg, rgba(166, 244, 147, 0.07), transparent 54%),
    var(--panel);
}

.result-block--dictionary {
  min-height: 10rem;
}

.result-block__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.result-block__eyebrow {
  margin-bottom: 0.08rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-block__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 760;
  letter-spacing: -0.01em;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.38rem;
}

.result-actions button,
.result-block__head > button {
  min-height: 2.15rem;
  padding: 0.35rem 0.62rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 720;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.result-actions button:hover:not(:disabled),
.result-block__head > button:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

.result-actions button.is-done,
.result-block__head > button.is-done,
.copy-button.is-done {
  border-color: var(--green);
  background: rgba(166, 244, 147, 0.12);
  color: var(--green);
}

.result-value {
  display: block;
  min-height: 2.5rem;
  overflow-wrap: anywhere;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: clamp(1.22rem, 3vw, 1.8rem);
  line-height: 1.45;
  letter-spacing: 0.045em;
  white-space: pre-wrap;
}

.result-value:empty::before,
.decoded-output__value:empty::before {
  content: "Waiting for input";
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.result-value--secondary {
  color: var(--amber);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
}

.result-note {
  margin: 0.55rem 0 0;
  color: var(--text-dim);
  font-size: 0.7rem;
  line-height: 1.45;
}

.press-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.75rem;
  border-block: 1px solid var(--line);
}

.press-metrics > div {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
  padding: 0.72rem 0.6rem;
  text-align: center;
}

.press-metrics > div + div {
  border-left: 1px solid var(--line);
}

.press-metrics__value {
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.press-metrics__label {
  color: var(--text-dim);
  font-size: 0.65rem;
  line-height: 1.25;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.tool-status {
  min-height: 1.35rem;
  margin: 0;
  padding: 0 1.45rem 0.9rem;
  color: var(--green);
  font-size: 0.72rem;
}

.match-list {
  display: grid;
  gap: 0.8rem;
}

.match-group {
  display: grid;
  gap: 0.35rem;
}

.match-group__code {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.match-group__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.chip {
  min-height: 2.15rem;
  padding: 0.35rem 0.62rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

button.chip:hover,
.chip--top {
  border-color: var(--green);
  background: rgba(166, 244, 147, 0.1);
  color: var(--green);
}

.chip--missing {
  display: inline-flex;
  align-items: center;
  border-style: dashed;
  color: var(--text-dim);
}

.decoded-output {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: rgba(166, 244, 147, 0.06);
}

.decoded-output > div:first-child {
  min-width: 0;
}

.decoded-output__value {
  display: block;
  min-height: 1.7rem;
  overflow-wrap: anywhere;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.7vw, 1.4rem);
}

.noscript-note {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--amber);
  border-radius: var(--radius-sm);
  color: var(--amber);
}

/* -------------------------------------------------------------- phone HUD */

.phone-console {
  border-radius: var(--radius-lg);
}

.phone-console__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--page-deep);
}

.phone-console__label {
  margin: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.phone-console__context {
  margin: 0.08rem 0 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.phone-console__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-transform: uppercase;
}

.phone-console__live span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0.65rem currentColor;
}

.phone-stage {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  padding: clamp(1rem, 2.7vw, 1.5rem) 0.75rem 1rem;
  perspective: 1400px;
}

.phone-stage:focus-within {
  outline: 1px solid rgba(166, 244, 147, 0.38);
  outline-offset: 0.35rem;
}

.challenge-dock {
  width: min(18rem, 78vw);
  padding: 0.8rem 0.85rem;
  border: 1px solid rgba(166, 244, 147, 0.28);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(166, 244, 147, 0.08), rgba(12, 18, 30, 0.92)),
    rgba(9, 14, 24, 0.92);
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.3);
}

.challenge-dock__head,
.challenge-dock__stats,
.challenge-dock__actions,
.phone-stage__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.challenge-dock__head {
  gap: 1rem;
}

.challenge-dock__state,
.challenge-dock__progress-label {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.challenge-dock__phrase {
  margin: 0.45rem 0 0.6rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.98rem;
  line-height: 1.35;
}

.challenge-dock__progress {
  width: 100%;
  height: 0.36rem;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(166, 244, 147, 0.14);
  appearance: none;
}

.challenge-dock__progress::-webkit-progress-bar {
  background: rgba(166, 244, 147, 0.14);
}

.challenge-dock__progress::-webkit-progress-value,
.challenge-dock__progress::-moz-progress-bar {
  background: var(--green);
}

.challenge-dock__stats {
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.challenge-dock__stats > div {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.challenge-dock__stats strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.challenge-dock__stats span {
  color: var(--text-dim);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.challenge-dock__summary {
  margin: 0.6rem 0 0;
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1.4;
}

.challenge-dock__actions {
  justify-content: flex-end;
  margin-top: 0.65rem;
}

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

.phone-stage__actions {
  width: min(18rem, 78vw);
  justify-content: flex-end;
  min-height: 2rem;
}

.phone-stage__stop {
  min-height: 2rem;
  padding-inline: 0.8rem;
}

.phone {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  width: min(18rem, 78vw);
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.phone__body {
  position: relative;
  padding: 0.85rem 0.85rem 1rem;
  border: 1px solid rgba(139, 155, 186, 0.34);
  border-radius: 1.75rem;
  background: linear-gradient(155deg, var(--phone-edge), var(--phone-body) 38%, #252d3e 100%);
  box-shadow:
    0 1.8rem 3.5rem rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -4px 10px rgba(0, 0, 0, 0.28);
  transform-style: preserve-3d;
}

.phone__body::before {
  content: "T9";
  position: absolute;
  right: 1.2rem;
  top: 0.62rem;
  color: rgba(255, 255, 255, 0.19);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.phone__body::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 34%, transparent 68%, rgba(255, 255, 255, 0.04));
}

.phone__speaker {
  width: 3rem;
  height: 0.32rem;
  margin: 0.16rem auto 0.7rem;
  border-radius: 999px;
  background: #171e2d;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.phone__screen {
  padding: 0.42rem;
  border-radius: 0.9rem;
  background: #161d2b;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.78), 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lcd {
  position: relative;
  display: flex;
  min-height: 9rem;
  flex-direction: column;
  gap: 0.25rem;
  overflow: hidden;
  padding: 0.5rem 0.6rem 0.45rem;
  border-radius: 0.58rem;
  background: linear-gradient(180deg, var(--lcd), var(--lcd-dim));
  color: var(--lcd-dark);
  font-family: "LCD", var(--font-mono);
  box-shadow: inset 0 0 1.25rem rgba(23, 51, 24, 0.12);
}

.lcd::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(23, 51, 24, 0.075) 0 1px, transparent 1px 3px);
}

.lcd__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.18rem;
  border-bottom: 1px solid rgba(23, 51, 24, 0.22);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.lcd__text {
  display: block;
  flex: 1;
  min-height: 3.2rem;
  overflow-wrap: anywhere;
  font-size: 1.28rem;
  line-height: 1.27;
  white-space: pre-wrap;
}

.lcd__text::after {
  content: "_";
  animation: caret 1.05s steps(2, start) infinite;
}

.lcd__pending {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.lcd__candidates {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-top: 0.22rem;
  border-top: 1px solid rgba(23, 51, 24, 0.22);
}

.lcd__candidates-label {
  flex: 0 0 auto;
}

.candidate-list {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 0.22rem;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.candidate-list::-webkit-scrollbar {
  display: none;
}

.candidate-list li {
  flex: 0 0 auto;
}

.candidate-list button {
  padding: 0.05rem 0.25rem;
  border-radius: 0.2rem;
  background: transparent;
  color: var(--lcd-dark);
  font-family: inherit;
  font-size: 0.95rem;
}

.candidate-list li.is-active button {
  background: var(--lcd-dark);
  color: var(--lcd);
}

.lcd__hint {
  min-height: 1rem;
  margin: 0;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone__controls {
  position: relative;
  z-index: 1;
  margin-top: 0.68rem;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.2rem;
  border: 1px solid rgba(139, 155, 186, 0.24);
  border-radius: 0.58rem;
  background: #20283a;
}

.mode-switch__option {
  min-height: 2.15rem;
  padding: 0.35rem;
  border-radius: 0.4rem;
  background: transparent;
  color: #aab5c8;
  font-size: 0.68rem;
  font-weight: 730;
}

.mode-switch__option.is-active {
  background: #435068;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.phone__softkeys {
  display: grid;
  grid-template-columns: 1fr 2.3rem 1fr;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.softkey {
  min-height: 2.2rem;
  padding: 0.35rem;
  border: 1px solid rgba(139, 155, 186, 0.32);
  border-radius: 999px;
  background: linear-gradient(#4c5870, #354055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 2px 3px rgba(0, 0, 0, 0.2);
  color: #f3f5f8;
  font-size: 0.66rem;
  font-weight: 720;
}

.softkey:active,
.softkey.is-done {
  transform: translateY(1px);
  background: #2f394c;
}

.keypad {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.48rem 0.55rem;
  margin-top: 0.62rem;
}

.key {
  position: relative;
  display: grid;
  min-height: 3rem;
  place-items: center;
  gap: 0;
  padding: 0.18rem 0.2rem;
  border: 1px solid rgba(139, 155, 186, 0.32);
  border-radius: 0.72rem 0.72rem 0.88rem 0.88rem;
  background: linear-gradient(180deg, #536079, var(--phone-key));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 3px 0 #252d3d,
    0 5px 8px rgba(0, 0, 0, 0.22);
  color: #fff;
  overflow: hidden;
  touch-action: manipulation;
  transition: transform 80ms ease, box-shadow 80ms ease, border-color 80ms ease;
}

.key:hover {
  border-color: rgba(166, 244, 147, 0.6);
}

.key:active,
.key.is-pressed {
  transform: translateY(3px) scale(0.985);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25), 0 1px 0 #252d3d;
}

.key.is-pending {
  border-color: rgba(166, 244, 147, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(166, 244, 147, 0.24),
    0 3px 0 #252d3d,
    0 5px 8px rgba(0, 0, 0, 0.22);
}

.key.is-pending::after {
  content: "";
  position: absolute;
  inset: auto 0.38rem 0.22rem;
  height: 0.16rem;
  border-radius: 999px;
  background: rgba(166, 244, 147, 0.9);
  transform-origin: left center;
  animation: pending-window var(--pending-window, 900ms) linear forwards;
}

@keyframes pending-window {
  to {
    opacity: 0.35;
    transform: scaleX(0);
  }
}

.key--fn {
  background: linear-gradient(180deg, #46526a, #313b4e);
}

.key__digit {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
}

.key__letters {
  color: #c3cad7;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.phone-stage__toggles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 1rem;
}

.toggle {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  gap: 0.42rem;
  color: var(--text-soft);
  font-size: 0.7rem;
  user-select: none;
}

.toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--green);
}

.phone-stage__status {
  min-height: 0.9rem;
  margin: -0.42rem 0 0;
  color: var(--text-dim);
  font-size: 0.65rem;
  text-align: center;
}

.phone-stage[aria-busy="true"] .phone {
  filter: drop-shadow(0 0 0.65rem rgba(166, 244, 147, 0.22));
}

/* --------------------------------------------------------- page sections */

.section {
  padding: clamp(4.2rem, 8vw, 7.2rem) 0;
  border-top: 1px solid rgba(70, 83, 107, 0.42);
  content-visibility: auto;
  contain-intrinsic-size: auto 48rem;
}

.section-heading {
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.section-heading--split {
  display: grid;
  gap: 1.2rem 3rem;
  align-items: end;
}

.section-heading h2 {
  max-width: 19ch;
  margin-bottom: 0;
}

.section-heading > p,
.section-heading--split > p {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--text-soft);
}

.section--keymap {
  background: rgba(7, 11, 19, 0.46);
}

.keymap-layout {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}

.keymap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.48rem, 1.2vw, 0.75rem);
  max-width: 43rem;
}

.map-key {
  display: grid;
  min-height: clamp(5.1rem, 11vw, 7.2rem);
  place-items: center;
  align-content: center;
  gap: 0.2rem;
  border: 1px solid var(--line-strong);
  border-bottom-width: 3px;
  border-radius: clamp(0.7rem, 2vw, 1rem);
  background: linear-gradient(155deg, rgba(80, 93, 116, 0.38), rgba(17, 24, 39, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.map-key strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  line-height: 1;
}

.map-key span {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: clamp(0.55rem, 1.6vw, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.map-key--function span {
  color: var(--amber);
  letter-spacing: 0.04em;
}

.worked-example {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.1rem);
  border-left: 2px solid var(--green);
  background: linear-gradient(90deg, rgba(166, 244, 147, 0.06), transparent 75%);
}

.worked-example__label {
  margin-bottom: 0.35rem;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.worked-example h3 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.worked-example dl {
  margin: 1.2rem 0;
}

.worked-example dl > div {
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}

.worked-example dl > div:last-child {
  border-bottom: 1px solid var(--line);
}

.worked-example dt {
  margin-bottom: 0.24rem;
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
}

.worked-example dd {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.74rem;
}

.code-string {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.worked-example > p:not(.worked-example__label) {
  color: var(--text-soft);
}

.worked-example .button {
  align-self: flex-start;
}

/* ------------------------------------------------------------ challenge */

.section--challenge {
  background:
    radial-gradient(40rem 30rem at 78% 45%, rgba(166, 244, 147, 0.08), transparent 70%),
    var(--page-deep);
}

.challenge-layout {
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.challenge-copy {
  max-width: 34rem;
}

.challenge-copy > p:not(.kicker) {
  color: var(--text-soft);
}

.challenge-steps {
  display: grid;
  gap: 0.75rem;
  margin: 1.6rem 0 0;
  padding: 0;
  counter-reset: challenge-step;
  list-style: none;
}

.challenge-steps li {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  align-items: start;
  gap: 0.7rem;
  color: var(--text-soft);
  font-size: 0.86rem;
  counter-increment: challenge-step;
}

.challenge-steps li::before {
  content: counter(challenge-step, decimal-leading-zero);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.challenge-console {
  min-width: 0;
  padding: clamp(1rem, 3.5vw, 1.65rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.challenge-settings {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.control-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.button-group button {
  min-height: 2.45rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.button-group button:hover,
.button-group button.is-active {
  border-color: var(--green);
  background: rgba(166, 244, 147, 0.1);
  color: var(--green);
}

.challenge-target {
  margin: 1rem 0;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid rgba(166, 244, 147, 0.42);
  border-radius: var(--radius);
  background: rgba(166, 244, 147, 0.055);
}

.challenge-target__label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.challenge__phrase {
  min-height: 3rem;
  margin-bottom: 0.8rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 3.1vw, 1.45rem);
  line-height: 1.45;
}

.challenge__phrase .is-done {
  color: var(--green);
}

.challenge-target progress {
  display: block;
  width: 100%;
  height: 0.42rem;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
  appearance: none;
}

.challenge-target progress::-webkit-progress-bar {
  background: var(--line);
}

.challenge-target progress::-webkit-progress-value {
  background: var(--green);
}

.challenge-target progress::-moz-progress-bar {
  background: var(--green);
}

.challenge__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.stat {
  display: grid;
  gap: 0.12rem;
  padding: 0.78rem 0.4rem;
  text-align: center;
}

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

.stat__value {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  font-weight: 780;
}

.stat__label {
  color: var(--text-dim);
  font-size: 0.62rem;
}

.challenge__best,
.challenge__status {
  min-height: 1.3rem;
  margin: 0.75rem 0 0;
  color: var(--text-dim);
  font-size: 0.73rem;
}

.challenge__status {
  color: var(--green);
}

.challenge-results {
  display: grid;
  gap: 0.55rem;
  margin: 0.85rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--line);
}

.challenge-results > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.challenge-results dt {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.challenge-results dd {
  margin: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-align: right;
}

.challenge__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

/* --------------------------------------------------------------- guide */

.guide-grid {
  display: grid;
  margin-bottom: clamp(2.4rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}

.guide-story {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: clamp(0.75rem, 2vw, 1.1rem);
  padding: clamp(1.2rem, 3vw, 1.75rem) 0;
  border-bottom: 1px solid var(--line);
}

.guide-story__number {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.guide-story p {
  max-width: 54rem;
  margin-bottom: 0;
  color: var(--text-soft);
}

.comparison-wrap {
  margin-bottom: clamp(3rem, 7vw, 5rem);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.comparison-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  background: var(--panel-soft);
  font-size: 0.84rem;
}

.comparison-table caption {
  padding: 0.8rem 1rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.comparison-table th,
.comparison-table td {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-table tbody th {
  color: var(--text);
  font-weight: 700;
}

.comparison-table td {
  color: var(--text-soft);
}

.use-case-list {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
  border-top: 1px solid var(--line);
}

.use-case-list__intro {
  grid-row: 1 / span 4;
  padding: 1.3rem 2rem 1.3rem 0;
  border-right: 1px solid var(--line);
}

.use-case-list__intro h3 {
  max-width: 13ch;
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
}

.use-case-row {
  display: grid;
  grid-template-columns: minmax(10rem, 0.7fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1.15rem 0 1.15rem 2rem;
  border-bottom: 1px solid var(--line);
}

.use-case-row strong {
  color: var(--text);
  font-size: 0.84rem;
}

.use-case-row span {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.privacy-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(2.8rem, 7vw, 5rem);
  padding: clamp(1rem, 3vw, 1.45rem);
  border: 1px solid rgba(166, 244, 147, 0.38);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(166, 244, 147, 0.075), transparent 60%);
}

.privacy-strip > div {
  min-width: 0;
  margin-right: auto;
}

.privacy-strip__title {
  margin-bottom: 0.18rem;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 780;
}

.privacy-strip > div > p:last-child {
  max-width: 48rem;
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
}

/* ------------------------------------------------------------------- FAQ */

.section--faq {
  background: rgba(7, 11, 19, 0.48);
}

.faq-layout {
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.faq-intro {
  max-width: 30rem;
}

.faq-intro > p:last-child {
  color: var(--text-soft);
}

.faq {
  border-top: 1px solid var(--line-strong);
}

.faq details {
  border-bottom: 1px solid var(--line-strong);
}

.faq summary {
  position: relative;
  padding: 1.15rem 3rem 1.15rem 0;
  color: var(--text);
  font-size: clamp(0.93rem, 2vw, 1.05rem);
  font-weight: 730;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 400;
  transform: translateY(-50%);
}

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

.faq details[open] summary {
  color: var(--green);
}

.faq details p {
  max-width: 46rem;
  padding: 0 2rem 1.25rem 0;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--page-deep);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2.4rem;
}

.brand--footer .brand__mark {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 0.72rem;
}

.site-footer__note {
  margin: 0.55rem 0 0;
  color: var(--text-dim);
  font-size: 0.76rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem 1.3rem;
}

.site-footer__links a {
  color: var(--text-soft);
  font-size: 0.78rem;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--green);
}

/* ----------------------------------------------------------- legal modal */

.legal-dialog {
  width: min(43rem, calc(100% - 1.5rem));
  max-height: min(48rem, calc(100dvh - 1.5rem));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  color: var(--text);
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.65);
}

.legal-dialog::backdrop {
  background: rgba(4, 7, 12, 0.78);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  max-height: inherit;
  overflow: hidden;
  animation: dialog-in 0.2s ease-out both;
}

.legal-dialog.is-closing .dialog-shell {
  animation: dialog-out 0.18s ease-in both;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(0.7rem) scale(0.985);
  }
}

@keyframes dialog-out {
  to {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.99);
  }
}

.dialog-header {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--page-deep);
}

.dialog-header .kicker {
  margin: 0;
}

.icon-button {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  font-size: 1.45rem;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.legal-dialog__body {
  max-height: calc(100dvh - 6rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.legal-dialog__body h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.legal-dialog__body h3 {
  margin-top: 1.75rem;
  font-size: 1.05rem;
}

.legal-dialog__body p,
.legal-dialog__body li {
  color: var(--text-soft);
  font-size: 0.86rem;
}

/* ---------------------------------------------------------- legal pages */

.legal-page {
  display: grid;
  min-height: 100dvh;
  place-items: start center;
  padding: clamp(1.2rem, 5vw, 4rem) 1rem;
  background:
    radial-gradient(44rem 32rem at 50% -10%, rgba(166, 244, 147, 0.09), transparent 70%),
    var(--page);
}

.legal-page__content {
  width: min(100%, 47rem);
  padding: clamp(1.25rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 22, 36, 0.94);
  box-shadow: var(--shadow);
}

.legal-page__content h1 {
  max-width: none;
  margin-bottom: 1.8rem;
  font-size: clamp(2.1rem, 6vw, 3.3rem);
}

.legal-page__content section {
  margin-top: 1.8rem;
}

.legal-page__content h2 {
  margin-bottom: 0.55rem;
  font-size: 1.2rem;
}

.legal-page__content p,
.legal-page__content li {
  color: var(--text-soft);
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.6rem;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

/* ------------------------------------------------------------- responsive */

@media (min-width: 44rem) {
  .workbench-intro,
  .section-heading--split {
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  }

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

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

  .keymap-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  }

  .faq-layout {
    grid-template-columns: minmax(15rem, 0.6fr) minmax(0, 1.4fr);
  }
}

@media (min-width: 62rem) {
  .workbench-grid {
    grid-template-columns: minmax(0, 1.48fr) minmax(19rem, 0.62fr);
  }

  .phone-console {
    position: sticky;
    top: 5.25rem;
  }

  .challenge-layout {
    grid-template-columns: minmax(18rem, 0.65fr) minmax(0, 1.35fr);
  }

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

  .guide-story {
    grid-template-columns: 2rem 1fr;
    padding-right: 1.6rem;
    border-bottom: 0;
  }

  .guide-story + .guide-story {
    padding-left: 1.6rem;
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 61.99rem) {
  .phone-console {
    max-width: 32rem;
    margin-inline: auto;
  }

  .challenge-dock,
  .phone-stage__actions {
    width: min(17rem, 74vw);
  }

  .phone {
    width: min(17rem, 74vw);
  }
}

@media (max-width: 47.99rem) {
  .site-header__inner {
    min-height: 3.8rem;
  }

  .brand__name {
    display: none;
  }

  .site-nav {
    margin-left: 0;
  }

  .site-nav a {
    padding-block: 1.16rem 1.08rem;
    font-size: 0.78rem;
  }

  .site-nav a:nth-child(4),
  .site-nav a:nth-child(5) {
    display: none;
  }

  .header-install {
    margin-left: auto;
  }

  .workbench-section {
    padding-top: 1.8rem;
  }

  .tool-console__topbar {
    align-items: stretch;
  }

  .tool-tabs {
    flex: 1;
  }

  .tool-tab {
    flex: 1;
    justify-content: center;
    padding-inline: 0.45rem;
  }

  .tool-tab__index {
    display: none;
  }

  .tool-console__topbar > .text-button {
    align-self: center;
  }

  .result-block__head,
  .decoded-output {
    align-items: stretch;
    flex-direction: column;
  }

  .result-actions {
    justify-content: flex-start;
  }

  .decoded-output .result-actions {
    margin-top: 0.2rem;
  }

  .tool-actions .button,
  .challenge__actions .button {
    flex: 1 1 11rem;
  }

  .use-case-list {
    display: block;
  }

  .use-case-list__intro {
    padding-right: 0;
    border-right: 0;
  }

  .use-case-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding-left: 0;
  }

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

  .privacy-strip .button {
    width: 100%;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 31.99rem) {
  h1 {
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

  .shell {
    padding-inline: 0.85rem;
  }

  .tool-console__topbar,
  .phone-console__head {
    padding-inline: 0.55rem;
  }

  .tool-pane {
    padding-inline: 0.75rem;
  }

  .tool-status {
    padding-inline: 0.75rem;
  }

  .tool-console__topbar > .text-button {
    display: none;
  }

  .field--hero {
    min-height: 7.8rem;
    padding: 0.8rem;
  }

  .format-bar label {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .press-metrics__label {
    font-size: 0.58rem;
  }

  .phone {
    width: min(16.2rem, 82vw);
  }

  .challenge-dock,
  .phone-stage__actions {
    width: min(16.2rem, 82vw);
  }

  .phone-stage {
    padding-inline: 0.35rem;
  }

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

  .stat:nth-child(3) {
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .map-key {
    min-height: 4.7rem;
  }
}

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

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

  .phone {
    transform: none !important;
  }

  .key.is-pending::after {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .phone-console,
  .challenge-dock,
  .tool-actions,
  .challenge__actions,
  .site-footer,
  .header-install {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .tool-console,
  .result-block,
  .challenge-console {
    border-color: #999;
    background: #fff;
    box-shadow: none;
    color: #111;
  }
}
