:root {
  --paper: #f2eee5;
  --surface: #fffdf7;
  --ink: #171914;
  --muted: #6d736c;
  --line: #c8cdc5;
  --green: #008b72;
  --lime: #b5ff2d;
  --coral: #ff6855;
  --blue: #6d73f5;
  --yellow: #ffd86d;
  --soft: #e4e8e0;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 4% 5%, rgba(109, 115, 245, .09), transparent 28rem),
    radial-gradient(circle at 96% 8%, rgba(255, 104, 85, .08), transparent 27rem),
    var(--paper);
  font-family: "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
}

button, input, textarea, a { font: inherit; }
button { color: inherit; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 4px solid #1c5dff;
  outline-offset: 4px;
}

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

kbd {
  display: inline-grid;
  min-width: 28px;
  min-height: 27px;
  padding: 4px 7px;
  place-items: center;
  border: 1px solid #aeb4ad;
  border-bottom-width: 3px;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font: 800 11px/1 var(--mono);
}

.page {
  width: min(1620px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.hero {
  display: flex;
  min-height: 255px;
  padding: 12px 18px 28px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.hero-copy { min-width: 0; }

.eyebrow,
.section-heading p,
.control-label,
.monitor header p {
  margin: 0;
  color: var(--green);
  font: 900 12px/1.2 var(--mono);
  letter-spacing: .13em;
}

.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }

.eyebrow i {
  position: relative;
  width: 19px;
  height: 19px;
  border: 2px solid var(--blue);
  border-radius: 6px;
}

.eyebrow i::after {
  position: absolute;
  inset: 5px -7px -7px 5px;
  z-index: -1;
  border-radius: 6px;
  background: var(--lime);
  content: "";
}

h1 {
  margin: 0;
  font-size: min(6.15vw, 96px);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

h1 code {
  font: inherit;
}

.lead {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 25px);
  font-weight: 750;
}

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

.hero-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }

.hero-actions > button {
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.hero-actions > button.dark { border-color: var(--ink); background: var(--ink); color: white; }

.reader-badge {
  display: flex;
  min-height: 48px;
  padding: 0 12px;
  align-items: center;
  gap: 5px;
  border: 1px solid #add8cd;
  border-radius: 14px;
  background: #e4fff7;
  color: var(--green);
}

.reader-badge > i { width: 8px; height: 8px; margin-right: 3px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(0,139,114,.13); }
.reader-badge > b { margin-right: 5px; font: 900 10px/1 var(--mono); }
.reader-badge > span { color: var(--ink); font-size: 11px; font-weight: 900; }
.reader-badge kbd { min-width: 24px; min-height: 23px; padding: 3px 5px; font-size: 10px; }

.lab,
.implementation,
.decision-guide {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(23,25,20,.07);
}

.section-heading {
  display: flex;
  min-height: 104px;
  padding: 18px 28px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading.compact { min-height: 92px; }

.section-number {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--coral);
  color: white;
  font: 900 13px/1 var(--mono);
}

.section-number.blue { background: var(--blue); }
.section-number.green { background: var(--green); }

.section-heading h2 { margin: 4px 0 0; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.05; letter-spacing: 0; }

.heading-status { display: flex; margin-left: auto; gap: 8px; }
.heading-status span, .heading-status b { padding: 10px 12px; border-radius: 999px; background: #edf0ea; font: 900 10px/1 var(--mono); }
.heading-status span { color: var(--blue); }
.heading-status b { background: var(--lime); }
.heading-status b.is-assertive { background: var(--coral); color: white; }
.heading-status b.is-off { background: #d9ddd6; color: var(--muted); }

.lab-grid { display: grid; grid-template-columns: 310px minmax(500px, 1fr) 330px; min-height: 710px; }

.controls { border-right: 1px solid var(--line); background: #f8f5ed; }
.control-block { padding: 23px 24px; border-bottom: 1px solid var(--line); }
.control-block.compact { padding-block: 20px; }
.control-block h3 { margin: 7px 0 15px; font-size: 18px; letter-spacing: 0; }

.scenario-list { display: grid; gap: 7px; }

.scenario-list button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  min-height: 54px;
  padding: 8px 11px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.scenario-list button > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: #e8ebe5;
  color: var(--muted);
  font: 900 10px/1 var(--mono);
}

.scenario-list b, .scenario-list small { display: block; }
.scenario-list b { font-size: 13px; }
.scenario-list small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.scenario-list em { color: #a0a69e; font-style: normal; font-weight: 900; }
.scenario-list button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: white; }
.scenario-list button[aria-pressed="true"] > span { background: var(--lime); color: var(--ink); }
.scenario-list button[aria-pressed="true"] small { color: #bec3bb; }
.scenario-list button[aria-pressed="true"] em { color: var(--lime); }

.control-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.control-heading output { padding: 7px 9px; border-radius: 999px; background: #e6e9e3; color: var(--blue); font: 900 10px/1 var(--mono); }

.mode-switch { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #e7eae4; }
.mode-switch button { min-width: 0; min-height: 54px; padding: 7px 4px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; }
.mode-switch span, .mode-switch small { display: block; }
.mode-switch span { font: 900 10px/1 var(--mono); }
.mode-switch small { margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.mode-switch button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 2px 8px rgba(23,25,20,.12); }
.mode-switch button[data-mode="polite"][aria-pressed="true"] span { color: var(--green); }
.mode-switch button[data-mode="assertive"][aria-pressed="true"] { background: var(--coral); color: white; }
.mode-switch button[data-mode="assertive"][aria-pressed="true"] small { color: #fff1ee; }

.mode-description, .control-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.55; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.toggle-row h3 { margin-bottom: 3px; }
.toggle-row small { color: var(--blue); font: 900 10px/1 var(--mono); }
.toggle { position: relative; flex: 0 0 auto; width: 50px; height: 29px; padding: 0; border: 0; border-radius: 999px; background: #b8beb6; cursor: pointer; }
.toggle span { position: absolute; top: 4px; left: 4px; width: 21px; height: 21px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: transform .18s ease; }
.toggle[aria-checked="true"] { background: var(--blue); }
.toggle[aria-checked="true"] span { transform: translateX(21px); }

.reader-quick { display: flex; align-items: center; gap: 11px; margin-top: 10px; }
.reader-quick > span { display: grid; flex: 0 0 auto; width: 39px; height: 39px; place-items: center; border-radius: 50%; background: var(--lime); font-size: 13px; font-weight: 900; }
.reader-quick b, .reader-quick small { display: block; }
.reader-quick b { font-size: 12px; }
.reader-quick small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.control-block > a { display: flex; margin-top: 13px; align-items: center; justify-content: space-between; color: var(--ink); font-size: 11px; font-weight: 900; text-decoration: none; }

.preview-panel { min-width: 0; background: #dfe4dc; }
.browser-bar { display: flex; min-height: 49px; padding: 0 20px; align-items: center; justify-content: space-between; border-bottom: 1px solid #b8bfb6; background: #cfd5cd; color: #697069; font: 800 10px/1 var(--mono); }
.browser-bar p { display: flex; margin: 0; align-items: center; gap: 5px; }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.browser-bar i:nth-child(2) { background: var(--yellow); }
.browser-bar i:nth-child(3) { margin-right: 7px; background: #55c995; }
.browser-bar > span { padding: 8px 10px; border-radius: 999px; background: var(--ink); color: var(--lime); }

.app-stage {
  min-height: 610px;
  padding: 28px;
  background-color: #fbf9f3;
  background-image: linear-gradient(rgba(23,25,20,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(23,25,20,.055) 1px, transparent 1px);
  background-size: 27px 27px;
}

.demo-app { min-height: 552px; overflow: hidden; border: 2px solid var(--ink); border-radius: 22px; background: var(--surface); box-shadow: 8px 8px 0 rgba(23,25,20,.12); animation: stageIn .25s ease both; }

@keyframes stageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.demo-app-header { display: flex; min-height: 66px; padding: 0 22px; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 2px solid var(--ink); background: var(--surface); }
.demo-app-header > div:first-child { display: flex; align-items: center; gap: 12px; }
.app-logo { display: grid; width: 32px; height: 32px; place-items: center; border: 2px solid var(--ink); border-radius: 9px; background: var(--lime); font-weight: 900; }
.demo-app-header b, .demo-app-header small { display: block; }
.demo-app-header b { font-size: 13px; }
.demo-app-header small { margin-top: 2px; color: var(--muted); font: 800 10px/1 var(--mono); }
.demo-app-header nav { display: flex; gap: 16px; font-size: 10px; font-weight: 900; }

.demo-content { position: relative; min-height: 484px; padding: 38px; }
.demo-kicker { margin: 0; color: var(--green); font: 900 10px/1 var(--mono); letter-spacing: .11em; }
.demo-content h3 { margin: 10px 0 13px; font-size: clamp(34px, 3.5vw, 54px); line-height: .98; letter-spacing: 0; }
.demo-description { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; font-weight: 650; line-height: 1.6; }

.product-card { display: grid; grid-template-columns: 180px 1fr; gap: 24px; margin-top: 28px; }
.product-cover { position: relative; min-height: 185px; overflow: hidden; border: 2px solid var(--ink); border-radius: 16px; background: var(--blue); }
.product-cover::before { position: absolute; top: 28px; left: 40px; width: 105px; height: 105px; border: 2px solid var(--ink); border-radius: 50%; background: var(--lime); content: ""; }
.product-cover::after { position: absolute; right: -20px; bottom: 24px; width: 130px; height: 42px; border: 2px solid var(--ink); background: var(--coral); transform: rotate(-16deg); content: ""; }
.product-cover span { position: absolute; z-index: 1; right: 12px; top: 12px; padding: 6px 8px; border-radius: 999px; background: var(--ink); color: white; font: 900 10px/1 var(--mono); }
.product-info { display: flex; flex-direction: column; justify-content: center; }
.product-info > span { color: var(--green); font: 900 10px/1 var(--mono); }
.product-info h4 { margin: 8px 0 7px; font-size: 27px; letter-spacing: 0; }
.product-info p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.product-info button, .scenario-action { align-self: flex-start; min-height: 48px; margin-top: 21px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 11px; background: var(--coral); font-size: 12px; font-weight: 900; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; }

.visual-toast { position: absolute; right: 26px; bottom: 25px; display: flex; max-width: 390px; min-height: 62px; padding: 12px 15px; align-items: center; gap: 11px; border: 2px solid var(--ink); border-radius: 13px; background: var(--ink); color: white; box-shadow: 6px 6px 0 var(--lime); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.visual-toast.is-visible { opacity: 1; transform: none; }
.visual-toast > span { display: grid; flex: 0 0 auto; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: var(--lime); color: var(--ink); font-weight: 900; }
.visual-toast b, .visual-toast small { display: block; }
.visual-toast b { font-size: 12px; }
.visual-toast small { margin-top: 4px; color: #bdc3ba; font-size: 10px; }

.search-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 30px; }
.search-form label { grid-column: 1 / -1; font-size: 11px; font-weight: 900; }
.search-form input, .error-form input { min-width: 0; height: 50px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 11px; background: white; font-size: 14px; }
.search-form button { min-width: 95px; margin: 0; box-shadow: none; background: var(--blue); color: white; }
.result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 22px; }
.result-cards article { min-height: 115px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f1f3ee; }
.result-cards span { color: var(--blue); font: 900 10px/1 var(--mono); }
.result-cards b { display: block; margin-top: 35px; font-size: 13px; }

.editor-card { margin-top: 25px; overflow: hidden; border: 2px solid var(--ink); border-radius: 15px; }
.editor-toolbar { display: flex; min-height: 43px; padding: 0 14px; align-items: center; justify-content: space-between; background: var(--ink); color: white; }
.editor-toolbar span { font: 800 10px/1 var(--mono); }
.editor-toolbar b { color: var(--lime); font: 900 10px/1 var(--mono); }
.editor-card textarea { display: block; width: 100%; min-height: 155px; padding: 18px; resize: none; border: 0; background: #fffef9; color: var(--ink); font-size: 14px; line-height: 1.6; }
.save-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 15px; }
.save-row p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.save-row button { margin: 0; box-shadow: none; background: var(--blue); color: white; }

.error-form { display: grid; max-width: 510px; gap: 8px; margin-top: 27px; }
.error-form label { font-size: 11px; font-weight: 900; }
.error-form input[aria-invalid="true"] { border-color: var(--coral); background: #fff4f1; }
.field-hint { margin: 0; color: var(--muted); font-size: 10px; }
.inline-error { display: none; margin: 0; color: #c52f1c; font-size: 11px; font-weight: 800; }
.inline-error.is-visible { display: block; }
.error-form button { justify-self: start; background: var(--coral); }

.stage-footer { display: flex; min-height: 51px; padding: 0 20px; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #b8bfb6; background: #cfd5cd; }
.stage-footer p { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.stage-footer p span { margin-right: 7px; color: var(--green); font: 900 10px/1 var(--mono); }
.stage-footer > b { font: 900 10px/1 var(--mono); }

.monitor { border-left: 1px solid var(--line); background: #20231f; color: white; }
.monitor > header { display: flex; min-height: 72px; padding: 17px 19px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #3d413a; }
.monitor header p { color: white; font-size: 10px; }
.monitor header span { display: block; margin-top: 5px; color: #9da39a; font-size: 10px; font-weight: 700; }
.monitor header > b { padding: 8px 10px; border-radius: 999px; background: var(--lime); color: var(--ink); font: 900 10px/1 var(--mono); }
.monitor header > b.is-assertive { background: var(--coral); color: white; }
.monitor header > b.is-off { background: #555a52; color: white; }

.speech-queue { padding: 24px 19px; border-bottom: 1px solid #3d413a; }
.queue-track { height: 4px; overflow: hidden; border-radius: 999px; background: #3d423b; }
.queue-track i { display: block; width: 67%; height: 100%; background: var(--blue); transition: width .35s ease; }
.speech-item { position: relative; margin-top: 19px; padding: 14px; border: 1px solid #42463f; border-radius: 12px; background: #292c27; }
.speech-item span { color: #92988f; font: 900 10px/1 var(--mono); }
.speech-item p { margin: 9px 0 0; font-size: 13px; font-weight: 800; line-height: 1.45; }
.speech-item.incoming { border-color: var(--blue); background: #252946; transition: opacity .2s ease, transform .2s ease; }
.speech-item.incoming.is-muted { border-style: dashed; border-color: #555a52; background: transparent; opacity: .48; }
.speech-item.incoming.is-assertive { border-color: var(--coral); background: #482923; }
.mini-wave { display: flex; position: absolute; right: 12px; top: 15px; height: 17px; align-items: center; gap: 3px; }
.mini-wave i { width: 3px; height: 8px; border-radius: 999px; background: var(--blue); animation: wave .7s ease-in-out infinite alternate; }
.mini-wave i:nth-child(2) { height: 17px; animation-delay: -.2s; }
.mini-wave i:nth-child(3) { height: 12px; animation-delay: -.4s; }
.mini-wave i:nth-child(4) { height: 6px; animation-delay: -.1s; }
@keyframes wave { to { transform: scaleY(.45); } }
.queue-arrow { margin: 10px 0; color: var(--lime); text-align: center; font-weight: 900; }

.monitor-result { display: flex; padding: 22px 19px; align-items: flex-start; gap: 12px; border-bottom: 1px solid #3d413a; }
.monitor-result > span { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--lime); color: var(--ink); font-weight: 900; }
.monitor-result small { color: #91978e; font: 900 10px/1 var(--mono); }
.monitor-result strong { display: block; margin: 8px 0; font-size: 15px; }
.monitor-result p { margin: 0; color: #b8beb5; font-size: 10px; line-height: 1.5; }
.monitor-result.is-assertive > span { background: var(--coral); color: white; }
.monitor-result.is-off > span { background: #555a52; color: white; }

.monitor-note { display: flex; padding: 20px 19px; gap: 10px; }
.monitor-note > span { display: grid; flex: 0 0 auto; width: 27px; height: 27px; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--lime); font-weight: 900; }
.monitor-note p { margin: 0; color: #aeb4ab; font-size: 10px; line-height: 1.55; }
.monitor-note strong { display: block; color: white; font-size: 11px; }

.implementation { margin-top: 22px; }
.code-tabs { display: flex; margin-left: auto; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #e9ece6; }
.code-tabs button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 900; cursor: pointer; }
.code-tabs button[aria-selected="true"] { background: var(--ink); color: white; }

.implementation-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); }
.code-panel { min-width: 0; background: #20231f; color: white; }
.code-panel > header { display: flex; min-height: 62px; padding: 0 22px; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #3d413a; }
.code-panel > header div { display: flex; gap: 8px; }
.code-panel > header span, .code-panel > header b { padding: 7px 9px; border-radius: 999px; font: 900 10px/1 var(--mono); }
.code-panel > header span { background: var(--lime); color: var(--ink); }
.code-panel > header b { background: #353932; color: #c6ccc3; }
.code-panel > header button { min-height: 37px; padding: 0 12px; border: 1px solid #50554d; border-radius: 9px; background: #2c302a; color: white; font-size: 10px; font-weight: 900; cursor: pointer; }
.code-panel pre { min-height: 275px; margin: 0; padding: 26px; overflow: auto; white-space: pre-wrap; }
.code-panel code { color: #d9ff8c; font: 700 13px/1.7 var(--mono); }
.code-panel > footer { display: flex; min-height: 45px; padding: 0 22px; align-items: center; justify-content: space-between; border-top: 1px solid #3d413a; }
.code-panel > footer span, .code-panel > footer b { font: 900 10px/1 var(--mono); }
.code-panel > footer span { color: #858b82; }
.code-panel > footer b { color: var(--lime); }

.principles { padding: 27px; border-left: 1px solid var(--line); background: #f7f4ec; }
.principles ol { display: grid; gap: 0; margin: 18px 0 0; padding: 0; list-style: none; }
.principles li { display: flex; min-height: 88px; padding: 16px 0; gap: 12px; border-top: 1px solid var(--line); }
.principles li > span { display: grid; flex: 0 0 auto; width: 33px; height: 33px; place-items: center; border-radius: 9px; background: var(--ink); color: var(--lime); font: 900 10px/1 var(--mono); }
.principles b { font-size: 13px; }
.principles p { margin: 6px 0 0; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.5; }

.decision-guide { margin-top: 22px; }
.decision-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.decision-grid article { min-height: 245px; padding: 28px; border-right: 1px solid var(--line); }
.decision-grid article:last-child { border-right: 0; }
.decision-grid article > span { color: var(--green); font: 900 10px/1 var(--mono); letter-spacing: .1em; }
.decision-grid h3 { margin: 18px 0 16px; }
.decision-grid h3 code { font: 900 clamp(20px, 2vw, 29px)/1 var(--mono); }
.decision-grid p { max-width: 390px; margin: 0 0 24px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.65; }
.decision-grid article > b { display: inline-block; padding: 8px 10px; border-radius: 8px; background: #eef0eb; color: var(--blue); font: 900 10px/1 var(--mono); }

.spec-footer { display: flex; min-height: 65px; padding: 12px 28px; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); background: #eef0eb; }
.spec-footer p { margin: 0; color: var(--muted); font-size: 10px; font-weight: 650; }
.spec-footer a { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: 900 10px/1 var(--mono); text-decoration: none; }

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

@media (max-width: 1280px) {
  .lab-grid { grid-template-columns: 285px minmax(480px, 1fr); }
  .monitor { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.2fr 1fr; border-top: 1px solid var(--line); border-left: 0; }
  .monitor > header { grid-column: 1 / -1; }
  .speech-queue, .monitor-result { border-right: 1px solid #3d413a; border-bottom: 0; }
  .monitor-note { align-items: center; }
}

@media (max-width: 960px) {
  .page { width: min(100% - 24px, 780px); padding-top: 18px; }
  .hero { min-height: 205px; padding-inline: 8px; flex-direction: column; align-items: flex-start; }
  h1 { font-size: min(7.2vw, 65px); }
  .hero-actions { width: 100%; }
  .lab-grid { grid-template-columns: 1fr; }
  .controls { display: grid; grid-template-columns: 1fr 1fr; border-right: 0; border-bottom: 1px solid var(--line); }
  .control-block { border-right: 1px solid var(--line); }
  .control-block:nth-child(even) { border-right: 0; }
  .implementation-grid { grid-template-columns: 1fr; }
  .principles { border-top: 1px solid var(--line); border-left: 0; }
  .decision-grid { grid-template-columns: 1fr; }
  .decision-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 660px) {
  .page { width: min(100% - 16px, 520px); padding-bottom: 40px; }
  .hero { min-height: 178px; gap: 17px; }
  h1 { font-size: 6.3vw; }
  .lead { margin-top: 13px; font-size: 14px; }
  .reader-badge { display: none; }
  .hero-actions > button { min-height: 42px; padding: 0 12px; }
  .lab, .implementation, .decision-guide { border-radius: 18px; }
  .section-heading { min-height: 84px; padding: 14px; }
  .section-heading.compact { min-height: 80px; }
  .section-number { width: 42px; height: 42px; border-radius: 12px; }
  .section-heading h2 { font-size: 18px; }
  .section-heading p { font-size: 10px; }
  .heading-status span { display: none; }
  .controls { display: block; }
  .control-block { border-right: 0; }
  .app-stage { min-height: 0; padding: 10px; }
  .demo-app { min-height: 580px; }
  .demo-content { min-height: 514px; padding: 25px 20px; }
  .product-card { grid-template-columns: 1fr; }
  .product-cover { min-height: 170px; }
  .search-form { grid-template-columns: 1fr; }
  .search-form label { grid-column: auto; }
  .search-form button { width: 100%; }
  .result-cards { grid-template-columns: 1fr; }
  .result-cards article { min-height: 75px; }
  .result-cards b { margin-top: 20px; }
  .visual-toast { right: 15px; bottom: 16px; left: 15px; }
  .monitor { display: block; }
  .speech-queue, .monitor-result { border-right: 0; border-bottom: 1px solid #3d413a; }
  .code-tabs { margin-left: auto; }
  .code-panel pre { min-height: 230px; padding: 20px 15px; }
  .principles { padding: 22px 18px; }
  .decision-grid article { min-height: 0; padding: 23px 20px; }
  .spec-footer { align-items: flex-start; flex-direction: column; }
}

.series-nav {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.74);
}

.series-nav > p {
  display: flex;
  margin: 0;
  padding: 0 12px;
  align-items: center;
  color: var(--green);
  font: 900 10px/1.2 var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.series-nav a {
  display: grid;
  min-height: 48px;
  padding: 7px 12px 7px 46px;
  position: relative;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.series-nav a > span {
  display: grid;
  position: absolute;
  inset: 7px auto 7px 7px;
  width: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--soft);
  color: var(--green);
  font: 900 10px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}

.series-nav a b { font-size: 12px; line-height: 1.2; }
.series-nav a small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.2; }
.series-nav a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: white; }
.series-nav a[aria-current="page"] > span { background: var(--lime); color: var(--ink); }
.series-nav a[aria-current="page"] small { color: #c9cec7; }

@media (max-width: 700px) {
  .series-nav {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .series-nav > p {
    grid-column: 1 / -1;
    min-height: 22px;
    padding-inline: 4px;
  }
}
