:root {
  --paper: #fffdf8;
  --paper-deep: #faf5ec;
  --ink: #11273f;
  --ink-soft: #314153;
  --muted: #5f625f;
  --red: #c8102e;
  --red-dark: #a90d25;
  --green: #5f8069;
  --green-light: #e8f0e9;
  --gold: #bd8738;
  --line: #dfd2bd;
  --line-strong: #cbb897;
  --navy-panel: #082039;
  --navy-panel-deep: #06182c;
  --white: #ffffff;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  --sans: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow: 0 18px 45px rgb(17 39 63 / 0.12), 0 2px 7px rgb(17 39 63 / 0.1);
  --radius: 7px;
  --content: 1180px;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.018'/%3E%3C/svg%3E");
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

button {
  font: inherit;
}

img,
svg {
  display: block;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

use[href="#icon-github"] {
  fill: currentColor;
  stroke: none;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--white);
  font-family: var(--sans);
  font-weight: 700;
  transform: translateY(-180%);
}

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

:focus-visible {
  outline: 3px solid #df9f31;
  outline-offset: 4px;
}

.section-shell,
.header-inner {
  width: min(calc(100% - 60px), var(--content));
  margin-inline: auto;
}

section[id] {
  scroll-margin-top: 24px;
}

main[tabindex="-1"]:focus,
section[tabindex="-1"]:focus {
  outline: none;
}

.site-header {
  position: relative;
  z-index: 20;
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand strong {
  color: var(--red);
  font-weight: 700;
}

.header-menu {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-left: clamp(26px, 5vw, 70px);
}

.main-nav,
.site-actions {
  display: flex;
  align-items: center;
}

.main-nav {
  gap: clamp(20px, 3.2vw, 45px);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
}

.main-nav a {
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.site-actions {
  flex: none;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 30px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.button-small {
  min-height: 37px;
  padding: 7px 14px;
  font-size: 0.82rem;
}

.button-primary {
  border-color: var(--red);
  color: var(--white);
  background: var(--red);
  box-shadow: 0 8px 20px rgb(200 16 46 / 0.17);
}

.button-primary:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
  box-shadow: 0 11px 24px rgb(169 13 37 / 0.22);
}

.button-outline {
  color: var(--ink);
  background: rgb(255 255 255 / 0.5);
}

.button-outline:hover {
  color: var(--white);
  background: var(--ink);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(390px, 1.06fr);
  gap: clamp(32px, 5vw, 74px);
  align-items: center;
  min-height: 550px;
  padding-block: 27px 32px;
}

.hero-copy {
  position: relative;
  align-self: stretch;
  padding-top: clamp(18px, 3.5vw, 48px);
}

.hero h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(2.55rem, 5vw, 3.65rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.018em;
  text-wrap: balance;
}

.hero h1 em {
  color: var(--red);
  font-style: normal;
}

.hero-lead {
  max-width: 570px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 1.55vw, 1.12rem);
  font-weight: 500;
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
}

.hero-actions .button {
  min-width: 154px;
}

.compatibility-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 23px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.compatibility-note svg {
  width: 24px;
  height: 24px;
  color: var(--green);
}

.library-linework {
  position: absolute;
  z-index: -1;
  bottom: -34px;
  left: -35px;
  width: min(440px, 112%);
  opacity: 0.72;
  pointer-events: none;
}

.proposal-figure {
  width: 100%;
  max-width: 562px;
  margin: 0;
}

.proposal-window {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: 34px minmax(318px, auto) 157px;
  overflow: hidden;
  min-height: 509px;
  border: 1px solid #17354e;
  border-radius: var(--radius);
  color: #ecf4f6;
  background: var(--navy-panel);
  box-shadow: var(--shadow);
}

.window-chrome {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  background: var(--navy-panel-deep);
}

.window-chrome i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5efe7;
}

.window-rail {
  display: flex;
  grid-row: 2 / 4;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  padding: 20px 0;
  border-right: 1px solid rgb(255 255 255 / 0.09);
  color: #9fb2be;
  background: #09233d;
}

.window-rail svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.25;
}

.window-rail svg:last-child {
  margin-top: auto;
}

.proposal-sheet {
  margin: 0;
  padding: 17px 18px 15px;
  color: var(--ink);
  background: #fffefa;
}

.proposal-sheet h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 700;
}

.proposal-list {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgb(255 255 255 / 0.45);
}

.proposal-list > div {
  display: grid;
  grid-template-columns: minmax(116px, 0.65fr) minmax(0, 1fr);
  min-height: 46px;
  align-items: center;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
}

.proposal-list > div:last-child {
  border-bottom: 0;
}

.proposal-list dt,
.proposal-list dd {
  margin: 0;
  font-size: 0.83rem;
}

.proposal-list dt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.proposal-list dt svg {
  width: 25px;
  height: 25px;
  color: #3f6550;
  stroke-width: 1.4;
}

.proposal-list dd {
  overflow: hidden;
  font-family: var(--sans);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proposal-confirm {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 13px;
  font-family: var(--sans);
}

.waiting {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: var(--muted);
  font-size: 0.8rem;
}

.waiting::before {
  width: 11px;
  height: 14px;
  border: 1.5px solid var(--green);
  border-radius: 50% 50% 40% 40%;
  content: "";
}

.mock-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.mock-button-primary {
  border-color: var(--red);
  color: var(--white);
  background: var(--red);
}

.proposal-code {
  overflow: hidden;
  margin: 0;
  padding: 13px 20px 15px;
  border-top: 4px solid #07172a;
  color: #f0e7d8;
  background: #071b31;
  font-family: var(--mono);
  font-size: clamp(0.57rem, 1.1vw, 0.72rem);
  line-height: 1.55;
  white-space: pre;
}

.proposal-code .code-line {
  display: inline-block;
  width: 20px;
  color: #70869a;
  user-select: none;
}

.proposal-code b {
  color: #e9a763;
  font-weight: 500;
}

.proposal-code i {
  color: #b6d7a5;
  font-style: normal;
}

.proposal-code strong {
  color: #8fd2d7;
  font-weight: 500;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.25vw, 2.55rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.015em;
}

.section-heading p {
  max-width: 930px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.ruled-heading {
  display: grid;
  grid-template-columns: minmax(55px, 1fr) auto minmax(55px, 1fr);
  gap: 30px;
  align-items: center;
  text-align: center;
}

.ruled-heading::before,
.ruled-heading::after {
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.ruled-heading::after {
  background: var(--line-strong);
}

.ruled-heading h2::after,
.section-heading-left h2::after {
  display: block;
  width: 38px;
  height: 2px;
  margin: 10px auto 0;
  background: var(--gold);
  content: "";
}

.section-heading-left h2::after {
  margin-left: 0;
}

.features {
  padding-block: 12px 20px;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1080px;
  margin-inline: auto;
}

.feature-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 15px;
  min-width: 0;
  padding: 6px 30px;
}

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

.feature-icon {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.feature-icon svg {
  width: 51px;
  height: 51px;
  stroke-width: 1.25;
}

.icon-pair {
  position: relative;
}

.icon-pair svg:first-child {
  width: 42px;
  height: 42px;
  transform: translate(-5px, -5px);
}

.icon-pair svg:last-child {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 31px;
  height: 31px;
  padding: 3px;
  background: var(--paper);
}

.feature-item h3 {
  margin: 0 0 7px;
  font-size: 1.14rem;
  font-weight: 700;
}

.feature-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.8;
}

.api-section {
  padding-block: 18px 22px;
}

.capability-table-wrap {
  overflow: hidden;
}

.capability-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.capability-table tr {
  border-bottom: 1px solid var(--line);
}

.capability-table th,
.capability-table td {
  padding: 5px 14px;
  text-align: left;
  vertical-align: middle;
}

.capability-table th {
  width: 31%;
  border-right: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 700;
}

.capability-table th svg {
  display: inline-block;
  width: 26px;
  height: 26px;
  margin-right: 28px;
  color: var(--green);
  stroke-width: 1.35;
  vertical-align: -7px;
}

.capability-table td {
  padding-left: 58px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.safety-section {
  padding-block: 14px 16px;
}

.safety-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 38px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.safety-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: 48px auto auto;
  column-gap: 14px;
  align-items: center;
}

.safety-steps li:not(:last-child)::after {
  position: absolute;
  top: 31px;
  right: -32px;
  width: 35px;
  border-top: 1.5px dashed var(--gold);
  content: "";
}

.safety-steps li:not(:last-child)::before {
  position: absolute;
  z-index: 1;
  top: 27px;
  right: -34px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--gold);
  border-right: 1.5px solid var(--gold);
  content: "";
  transform: rotate(45deg);
}

.step-number {
  display: inline-flex;
  width: 36px;
  height: 36px;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
}

.safety-steps li > svg {
  width: 45px;
  height: 45px;
  grid-column: 2;
  grid-row: 1;
  color: var(--ink);
  stroke-width: 1.35;
}

.safety-steps h3,
.safety-steps p {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
}

.safety-steps h3 {
  margin-top: 5px;
  font-size: 1.12rem;
}

.safety-steps p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.65;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
}

.guardrail-note {
  display: flex;
  max-width: 880px;
  align-items: flex-start;
  gap: 14px;
  margin: 0 auto;
  padding: 10px 20px;
  border: 1px solid var(--gold);
  border-radius: 5px;
  background: rgb(255 255 255 / 0.44);
}

.guardrail-note svg {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--green);
}

.guardrail-note p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
}

.guardrail-note strong,
.guardrail-note span {
  display: block;
  text-align: center;
}

.guardrail-note span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

.install-section {
  padding-block: 14px 18px;
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1090px;
  margin: 14px auto;
  padding: 0;
  list-style: none;
}

.install-steps > li {
  min-width: 0;
  padding: 0 35px;
}

.install-steps > li + li {
  border-left: 1px solid var(--line);
}

.install-title {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.install-title > span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
  font-family: var(--sans);
  font-weight: 700;
}

.install-title > svg {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--green);
}

.install-title h3 {
  overflow: hidden;
  margin: 0;
  font-size: clamp(0.83rem, 1.45vw, 1.04rem);
  font-weight: 700;
  text-overflow: ellipsis;
}

.mini-window {
  position: relative;
  overflow: hidden;
  width: 188px;
  height: 96px;
  margin: 10px auto 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: rgb(255 255 255 / 0.42);
}

.mini-chrome {
  display: flex;
  height: 18px;
  align-items: center;
  gap: 4px;
  padding-left: 8px;
  border-bottom: 1px solid var(--line);
}

.mini-chrome i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.install-window {
  display: grid;
  grid-template-columns: 55px 1fr;
  grid-template-rows: 18px 1fr;
  align-items: center;
  padding: 0 17px 0 12px;
}

.install-window .mini-chrome {
  grid-column: 1 / -1;
  margin-inline: -12px -17px;
}

.install-window img {
  width: 43px;
  height: 43px;
}

.install-window > div:last-child {
  display: grid;
  gap: 8px;
}

.install-window > div:last-child i,
.assistant-code i {
  display: block;
  height: 5px;
  border-radius: 4px;
  background: #d8d1c4;
}

.install-window > div:last-child i:nth-child(2) {
  width: 72%;
}

.install-window > div:last-child i:nth-child(3) {
  width: 43%;
}

.api-window {
  display: grid;
  grid-template-columns: 31px 1fr 38px;
  grid-template-rows: 18px 1fr;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
}

.api-window .mini-chrome {
  grid-column: 1 / -1;
  margin-inline: -12px;
}

.api-window > svg {
  width: 27px;
  height: 27px;
  color: var(--green);
}

.api-window strong {
  font-size: 0.68rem;
}

.toggle-on {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: var(--green);
}

.toggle-on::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.22);
  content: "";
}

.assistant-window {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: 18px 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}

.assistant-window .mini-chrome {
  grid-column: 1 / -1;
  margin-inline: -12px;
}

.bot-face {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--green);
  border-radius: 13px;
  color: var(--green);
  font-family: var(--sans);
  font-size: 1.7rem;
  font-weight: 700;
}

.assistant-code {
  display: grid;
  gap: 8px;
}

.assistant-code code {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.install-actions .button {
  min-width: 240px;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(290px, 1fr) auto;
  gap: 30px;
  align-items: center;
  margin-top: 8px;
  padding-block: 20px 27px;
  border-top: 1px solid var(--line-strong);
}

.pubmed-link {
  display: flex;
  align-items: center;
  gap: 15px;
}

.pubmed-link > svg {
  width: 42px;
  height: 42px;
  flex: none;
  color: var(--gold);
}

.pubmed-link p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.pubmed-link a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

.pubmed-link a::after {
  content: " →";
}

.site-footer nav {
  display: flex;
  align-items: center;
}

.site-footer nav a {
  padding: 0 24px;
  border-left: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer nav a:last-child {
  padding-right: 0;
}

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

@media (max-width: 1050px) {
  .section-shell,
  .header-inner {
    width: min(calc(100% - 60px), var(--content));
  }

  .header-menu {
    gap: 13px;
    margin-left: 28px;
  }

  .main-nav {
    gap: 19px;
    font-size: 0.84rem;
  }

  .button-small {
    padding-inline: 11px;
  }

  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
    gap: 32px;
  }

  .feature-item {
    grid-template-columns: 56px 1fr;
    padding-inline: 20px;
  }

  .feature-icon svg {
    width: 45px;
    height: 45px;
  }

  .install-steps > li {
    padding-inline: 23px;
  }

}

@media (max-width: 900px) and (min-width: 781px) {
  .brand {
    gap: 9px;
    font-size: 1.25rem;
  }

  .brand img {
    width: 31px;
    height: 31px;
  }

  .header-menu {
    margin-left: 20px;
  }

  .main-nav {
    gap: 16px;
    font-size: 0.78rem;
  }

  .site-actions .button-primary {
    max-width: 122px;
  }

  .hero {
    grid-template-columns: minmax(0, 0.88fr) minmax(382px, 1.12fr);
    gap: 23px;
  }

  .hero h1 {
    font-size: 2.62rem;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-actions .button {
    min-width: 134px;
    padding-inline: 20px;
  }

  .proposal-list > div {
    grid-template-columns: 107px 1fr;
  }

  .waiting {
    font-size: 0.68rem;
  }
}

@media (max-width: 780px) {
  .section-shell,
  .header-inner {
    width: min(calc(100% - 32px), var(--content));
  }

  .header-inner {
    position: relative;
    min-height: 68px;
    justify-content: space-between;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .header-menu {
    position: absolute;
    top: calc(100% - 1px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 17px;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line-strong);
    background: rgb(255 253 248 / 0.98);
    box-shadow: 0 16px 30px rgb(17 39 63 / 0.14);
  }

  .header-menu[data-open="true"] {
    display: flex;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  .main-nav a {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
  }

  .site-actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 31px;
    padding-block: 34px 30px;
  }

  .hero-copy {
    padding-top: 0;
    text-align: center;
  }

  .hero h1,
  .hero-lead {
    margin-inline: auto;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 10.5vw, 3.65rem);
  }

  .hero-actions,
  .compatibility-note {
    justify-content: center;
  }

  .library-linework {
    right: 0;
    bottom: -15px;
    left: auto;
    width: 380px;
    opacity: 0.22;
  }

  .proposal-figure {
    max-width: 590px;
    margin-inline: auto;
  }

  .features,
  .api-section,
  .safety-section,
  .install-section {
    padding-block: 28px;
  }

  .ruled-heading {
    grid-template-columns: minmax(22px, 1fr) minmax(0, auto) minmax(22px, 1fr);
    gap: 16px;
  }

  .feature-row {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .feature-item {
    grid-template-columns: 70px 1fr;
    padding: 21px 10px;
  }

  .feature-item + .feature-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .capability-table th {
    width: 39%;
  }

  .capability-table th svg {
    margin-right: 15px;
  }

  .capability-table td {
    padding-left: 23px;
  }

  .safety-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 54px;
    max-width: 560px;
    margin-inline: auto;
  }

  .safety-steps li:nth-child(2)::after,
  .safety-steps li:nth-child(2)::before {
    display: none;
  }

  .guardrail-note {
    max-width: 640px;
    margin-top: 28px;
  }

  .install-steps {
    grid-template-columns: 1fr;
    max-width: 500px;
    gap: 0;
  }

  .install-steps > li {
    padding: 24px 10px;
  }

  .install-steps > li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .site-footer nav {
    justify-content: center;
  }

  .site-footer nav a:first-child {
    border-left: 0;
  }

  .install-title {
    justify-content: center;
  }

  .install-title h3 {
    font-size: 1rem;
  }

  .site-footer nav {
    flex-wrap: wrap;
    row-gap: 14px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .brand {
    font-size: 1.22rem;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .site-actions {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
    line-height: 1.42;
  }

  .hero-lead {
    line-height: 1.85;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-inline: auto;
  }

  .compatibility-note {
    align-items: flex-start;
    font-size: 0.82rem;
    text-align: left;
  }

  .proposal-window {
    grid-template-columns: 43px minmax(0, 1fr);
    grid-template-rows: 30px minmax(315px, auto) 149px;
    min-height: 494px;
  }

  .window-rail {
    gap: 24px;
  }

  .window-rail svg {
    width: 20px;
    height: 20px;
  }

  .proposal-sheet {
    padding: 14px 10px 10px;
  }

  .proposal-list > div {
    grid-template-columns: 94px minmax(0, 1fr);
    min-height: 48px;
    padding-inline: 8px;
  }

  .proposal-list dt,
  .proposal-list dd {
    font-size: 0.68rem;
  }

  .proposal-list dt svg {
    width: 20px;
    height: 20px;
  }

  .waiting {
    display: none;
  }

  .proposal-confirm {
    gap: 7px;
  }

  .mock-button {
    padding-inline: 10px;
    font-size: 0.68rem;
  }

  .proposal-code {
    padding-inline: 11px;
    font-size: 0.53rem;
  }

  .ruled-heading {
    display: block;
  }

  .ruled-heading::before,
  .ruled-heading::after {
    display: none;
  }

  .section-heading h2 {
    font-size: 1.68rem;
  }

  .feature-item {
    grid-template-columns: 57px 1fr;
  }

  .capability-table th,
  .capability-table td {
    padding: 10px 9px;
    font-size: 0.82rem;
  }

  .capability-table th {
    width: 41%;
  }

  .capability-table th svg {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    vertical-align: -6px;
  }

  .capability-table td {
    padding-left: 13px;
  }

  .safety-steps {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 290px;
  }

  .safety-steps li {
    grid-template-columns: 42px 58px 1fr;
    grid-template-rows: auto auto;
    min-height: 90px;
    column-gap: 14px;
  }

  .safety-steps li:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -15px;
    left: 18px;
    width: 1px;
    height: 18px;
    border-top: 0;
    border-left: 1.5px dashed var(--gold);
  }

  .safety-steps li:not(:last-child)::before {
    display: none;
  }

  .step-number {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .safety-steps li > svg {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .safety-steps h3,
  .safety-steps p {
    grid-column: 3;
    text-align: left;
  }

  .safety-steps h3 {
    align-self: end;
    margin: 0;
  }

  .safety-steps p {
    align-self: start;
  }

  .safety-steps p br {
    display: none;
  }

  .guardrail-note {
    padding: 14px 15px;
  }

  .guardrail-note svg {
    width: 27px;
    height: 27px;
  }

  .install-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .install-actions .button {
    min-width: 0;
  }

  .site-footer {
    text-align: center;
  }

  .pubmed-link {
    flex-direction: column;
  }

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

  .site-footer nav a,
  .site-footer nav a:last-child {
    padding: 7px 10px;
    border: 0;
  }
}

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

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