/* Derived from examples/static/style.css. Animation behavior and geometry are preserved. */
:root {
  --bg: #edf1f4;
  --surface: #ffffff;
  --surface-muted: #f6f8fa;
  --surface-strong: #e7edf1;
  --ink: #112232;
  --muted: #586878;
  --line: rgba(17, 34, 50, 0.14);
  --frame: #d6dde3;
  --hero-bg: #0f1f2d;
  --hero-bg-2: #183245;
  --accent: #1f7a59;
  --accent-strong: #14543d;
  --accent-soft: rgba(31, 122, 89, 0.12);
  --signal-speed: #1d6f90;
  --signal-vibration: #bb6435;
  --shadow: 0 18px 45px rgba(17, 34, 50, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(247, 249, 250, 0.98), rgba(235, 240, 244, 0.98)),
    radial-gradient(circle at top left, rgba(29, 111, 144, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(31, 122, 89, 0.08), transparent 26%),
    var(--bg);
}

body.modal-open {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.intro-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.intro-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
}

.intro-panel {
  position: relative;
  width: min(100%, 620px);
  padding: 32px 36px 26px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.intro-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 0 12px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(31, 122, 89, 0.1);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.intro-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.05rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.intro-copy {
  margin: 16px 0 0;
  color: var(--ink);
  line-height: 1.75;
}

.intro-points {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: #304257;
  font-size: 0.95rem;
}

.intro-points li {
  position: relative;
  padding-left: 26px;
  line-height: 1.55;
}

.intro-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 43%, #ffffff 44% 55%, transparent 56%),
    var(--accent);
  box-shadow: 0 4px 10px rgba(31, 122, 89, 0.18);
}

.intro-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
}

.intro-actions-end {
  justify-content: flex-end;
}

.intro-optout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.intro-optout input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.intro-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  margin: 0;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(31, 122, 89, 0.25);
}

.page {
  min-height: 100dvh;
  display: grid;
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 20px 48px;
}

.hero {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 26px 28px 28px;
  background:
    linear-gradient(180deg, rgba(18, 36, 50, 0.96), rgba(14, 28, 40, 0.98)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  box-shadow: 0 24px 50px rgba(12, 20, 28, 0.22);
}

.hero-topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.hero-brand {
  min-width: 0;
}

.hero-statusline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(234, 240, 244, 0.92);
  font-size: 0.92rem;
}

.status-chip strong {
  font-weight: 600;
  color: #ffffff;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  padding-top: 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(197, 212, 223, 0.78);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: #f4f8fb;
  font-size: clamp(2.1rem, 4vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 10.5em;
}

.lead {
  margin: 0;
  max-width: 56rem;
  color: rgba(220, 231, 237, 0.88);
  font-size: 1rem;
  line-height: 1.9;
}

.hero-aside {
  display: grid;
  gap: 12px;
}

.hero-metric {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
}

.hero-metric span {
  display: block;
  color: rgba(197, 212, 223, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.hero-metric strong {
  display: block;
  margin-top: 10px;
  color: #f7fbfd;
  font-size: 1rem;
  line-height: 1.6;
  word-break: break-word;
}

.panel {
  border: 1px solid var(--frame);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 250, 0.96));
  box-shadow: var(--shadow);
  padding: 26px;
}

.panel-head,
.section-head,
.preview-head,
.result-main,
.actions,
.wave-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-head {
  align-items: end;
  margin-bottom: 20px;
}

.panel-kicker,
.section-kicker {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-head h2,
.section-head h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.panel-head h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}

.section-head h3 {
  font-size: 1.24rem;
}

.panel-note,
.section-meta,
.file-meta,
.status,
.hint,
.result-label,
.detail-title,
.preview-meta,
.wave-head span {
  color: var(--muted);
}

.panel-note,
.section-meta {
  margin: 0;
  line-height: 1.75;
}

.section-head {
  align-items: end;
  margin-bottom: 16px;
}

.section-meta {
  max-width: 22rem;
  text-align: right;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: start;
}

.upload-column,
.preview-column {
  min-width: 0;
}

.dropzone,
.preview-card,
.result,
.details > div,
.wave-panel {
  border: 1px solid var(--frame);
  background: var(--surface);
}

.dropzone {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 276px;
  padding: 30px 24px;
  border-radius: 18px;
  border-style: dashed;
  background:
    linear-gradient(180deg, rgba(248, 250, 251, 0.98), rgba(242, 246, 248, 0.98));
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(17, 34, 50, 0.1);
}

.drop-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(17, 34, 50, 0.1);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.drop-title {
  margin-top: 18px;
  font-size: 1.48rem;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.02em;
}

.drop-subtitle {
  max-width: 34rem;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.actions {
  align-items: center;
  margin-top: 16px;
}

.model-mode {
  display: grid;
  gap: 3px;
  min-width: min(100%, 270px);
}

.model-mode-label {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.model-mode strong {
  color: #102030;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.model-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
}

.model-mode-toggle {
  justify-self: start;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.model-mode-toggle[aria-pressed="true"] {
  color: #8a3f31;
}

.model-mode-toggle:not(:disabled):hover {
  transform: none;
  box-shadow: none;
  color: #0f3f2d;
}

.model-mode-toggle[aria-pressed="true"]:not(:disabled):hover {
  color: #6f2f25;
}

.model-mode-help {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #c9d8d4;
  border-radius: 999px;
  background: #f8faf9;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  user-select: none;
}

.model-mode-help::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: 286px;
  padding: 10px 12px;
  border: 1px solid #dbe5ea;
  border-radius: 12px;
  background: #ffffff;
  color: #31475a;
  box-shadow: 0 14px 28px rgba(17, 34, 50, 0.12);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.65;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 5px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 4;
}

.model-mode-help::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 10px;
  height: 10px;
  border-right: 1px solid #dbe5ea;
  border-bottom: 1px solid #dbe5ea;
  background: #ffffff;
  opacity: 0;
  transform: translate(-50%, 5px) rotate(45deg);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 3;
}

.model-mode-help:hover::after,
.model-mode-help:hover::before,
.model-mode-help:focus-visible::after,
.model-mode-help:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.model-mode-help:focus-visible {
  outline: 2px solid rgba(31, 107, 76, 0.28);
  outline-offset: 2px;
}

.thinking-chat-entry,
.batch-process-entry {
  min-height: auto;
  margin: 4px 0 14px 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.thinking-chat-entry:not(:disabled):hover,
.batch-process-entry:not(:disabled):hover {
  transform: none;
  box-shadow: none;
  color: #0f3f2d;
}

body.thinking-chat-open .page,
body.thinking-chat-open .intro-modal,
body.batch-modal-open .page,
body.batch-modal-open .intro-modal {
  filter: blur(7px);
  transition: filter 180ms ease;
}

body.thinking-chat-open,
body.batch-modal-open {
  overflow: hidden;
}

.thinking-chat-modal,
.batch-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.thinking-chat-backdrop,
.batch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 48, 0.28);
  backdrop-filter: blur(2px);
}

.thinking-chat-panel,
.batch-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  border: 1px solid rgba(219, 229, 234, 0.96);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 249, 0.98)),
    #ffffff;
  box-shadow: 0 28px 70px rgba(17, 34, 50, 0.22);
  padding: 24px;
}

.thinking-chat-close,
.batch-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: auto;
  padding: 0;
  border: 1px solid #dbe5ea;
  border-radius: 999px;
  background: #ffffff;
  color: #31475a;
  box-shadow: none;
  font-size: 1.2rem;
  line-height: 1;
}

.thinking-chat-close:not(:disabled):hover,
.batch-close:not(:disabled):hover {
  color: #102030;
  background: #f4f7f6;
  box-shadow: none;
}

.thinking-chat-kicker {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.thinking-chat-panel h2 {
  margin: 0;
  color: #102030;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.thinking-chat-subtitle {
  max-width: 30rem;
  margin: 8px 0 0;
  color: #607285;
  font-size: 0.92rem;
  line-height: 1.65;
}

.thinking-chat-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 420px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #dbe5ea;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(248, 250, 249, 0.78)),
    #f5f8f7;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.thinking-chat-message {
  max-width: min(84%, 520px);
  padding: 12px 15px;
  border: 1px solid rgba(17, 34, 50, 0.06);
  border-radius: 18px;
  color: #213244;
  line-height: 1.72;
  white-space: pre-wrap;
}

.thinking-chat-message-assistant {
  border-top-left-radius: 6px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 34, 50, 0.08);
}

.thinking-chat-message-user {
  margin-left: auto;
  border-top-right-radius: 6px;
  border-color: rgba(31, 107, 76, 0.18);
  background: #1f6b4c;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(31, 107, 76, 0.18);
}

.thinking-chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.thinking-chat-input input {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dbe5ea;
  border-radius: 16px;
  background: #ffffff;
  color: #102030;
  font: inherit;
}

.thinking-chat-input button {
  border-radius: 16px;
}

.thinking-chat-input input:focus {
  border-color: rgba(31, 107, 76, 0.45);
  outline: 3px solid rgba(31, 107, 76, 0.12);
}

.thinking-chat-input button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.batch-dropzone {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 24px;
  border: 1px dashed #c7d5db;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(17, 34, 50, 0.022) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 34, 50, 0.022) 1px, transparent 1px),
    #f8faf9;
  background-size: 28px 28px;
  cursor: pointer;
}

.batch-dropzone.dragover {
  border-color: var(--accent);
  background-color: #f3f8f5;
}

.batch-dropzone span {
  color: #102030;
  font-size: 1.04rem;
  font-weight: 750;
}

.batch-dropzone strong {
  color: #607285;
  font-size: 0.88rem;
  font-weight: 600;
}

.batch-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.batch-summary span {
  color: #607285;
  font-size: 0.92rem;
}

.batch-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.batch-download-link {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.batch-download-link:not(:disabled):hover {
  transform: none;
  box-shadow: none;
  color: #0f3f2d;
}

.batch-download-link:disabled {
  color: #9aa8ad;
  opacity: 1;
  cursor: not-allowed;
}

.batch-summary button {
  min-width: 108px;
}

.batch-results {
  display: grid;
  gap: 8px;
  min-height: 184px;
  max-height: 300px;
  margin-top: 14px;
  overflow-y: auto;
}

.batch-empty {
  margin: 0;
  padding: 18px;
  border: 1px solid #dbe5ea;
  border-radius: 14px;
  background: #f8faf9;
  color: #607285;
}

.batch-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(150px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dbe5ea;
  border-radius: 14px;
  background: #ffffff;
}

.batch-row span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #edf3f5;
  color: #607285;
  font-family: "Fira Code", monospace;
  font-size: 0.76rem;
  font-weight: 700;
}

.batch-row strong {
  min-width: 0;
  overflow: hidden;
  color: #102030;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-row em {
  display: inline-flex;
  justify-content: flex-end;
  gap: 10px;
  color: #607285;
  font-style: normal;
  text-align: right;
}

.batch-row.done em b {
  color: #102030;
  font-style: normal;
}

.batch-row.done em small {
  color: var(--accent-strong);
  font-family: "Fira Code", monospace;
  font-size: 0.86rem;
  font-weight: 800;
}

.batch-row.running {
  background: #f8faf9;
}

.batch-row.error {
  border-color: rgba(170, 64, 48, 0.22);
  background: #fbf1ef;
}

.file-meta,
.status,
.hint,
.section-meta,
.preview-meta,
.confidence strong {
  font-variant-numeric: tabular-nums;
}

.file-meta {
  font-size: 0.94rem;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(20, 84, 61, 0.22);
}

button:not(:disabled):active {
  transform: translateY(0);
}

.status {
  min-height: 24px;
  margin-top: 16px;
  padding-left: 2px;
  line-height: 1.6;
}

.result {
  margin-top: 22px;
  width: 100%;
  border-radius: 20px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98)),
    radial-gradient(circle at top right, rgba(31, 122, 89, 0.05), transparent 26%);
  box-shadow: 0 16px 38px rgba(17, 34, 50, 0.08);
}

.result-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.78fr);
  align-items: stretch;
  gap: 18px;
}

.result-summary {
  min-width: 0;
  padding-right: 6px;
}

.result-label {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.result-main h2 {
  margin: 8px 0 0;
  font-size: 2rem;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.result-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.result-english {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.55;
  text-transform: uppercase;
  word-break: break-word;
}

.result-description {
  max-width: 100%;
  margin: 14px 0 0;
  color: var(--ink);
  line-height: 1.82;
}

.result-context-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.confidence {
  min-width: 170px;
  padding: 14px 16px;
  border: 1px solid rgba(17, 34, 50, 0.09);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(244, 248, 250, 0.98), rgba(233, 239, 243, 0.98));
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.confidence span {
  color: var(--muted);
  font-size: 0.84rem;
}

.confidence strong {
  display: block;
  margin-top: 6px;
  color: var(--accent-strong);
  font-size: 1.72rem;
}

.result-meta-card {
  padding: 14px 16px;
  border: 1px solid rgba(17, 34, 50, 0.09);
  border-radius: 14px;
  background: rgba(247, 249, 251, 0.9);
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.details > div {
  border-radius: 14px;
  padding: 15px 16px 14px;
  background: rgba(247, 249, 251, 0.88);
}

.detail-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

#top-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.95;
}

.input-shape-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 0;
  padding: 7px 11px;
  border: 1px solid rgba(17, 34, 50, 0.08);
  border-radius: 999px;
  background: rgba(247, 249, 251, 0.9);
}

.input-shape-inline span {
  color: var(--muted);
  font-size: 0.78rem;
}

.input-shape-inline strong {
  color: var(--ink);
  font-family: "Fira Code", "IBM Plex Sans", monospace;
  font-size: 0.88rem;
  font-weight: 700;
}

.explain-link {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.explain-link:not(:disabled):hover {
  transform: none;
  box-shadow: none;
  color: #0f3f2d;
}

.explain-link:disabled {
  color: #8a9a94;
  opacity: 1;
  cursor: wait;
}

.thinking-explanation {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(31, 107, 76, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(242, 248, 246, 0.88)),
    #f8faf9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.thinking-explanation-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.thinking-explanation-head span {
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.thinking-explanation-head strong {
  color: #102030;
  font-size: 0.96rem;
}

.thinking-explanation p {
  margin: 0;
  color: #213244;
  line-height: 1.85;
  white-space: pre-line;
}

.feature-summary-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 2px 0 0;
  overflow: hidden;
  border: 1px solid rgba(17, 34, 50, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.feature-summary-panel div {
  min-width: 0;
  padding: 10px 8px;
  border-right: 1px solid rgba(17, 34, 50, 0.07);
}

.feature-summary-panel div:last-child {
  border-right: 0;
}

.feature-summary-panel dt {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.feature-summary-panel dd {
  margin: 0;
  padding-top: 4px;
  color: var(--ink);
  font-family: "Fira Code", "IBM Plex Sans", monospace;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.preview-head {
  align-items: center;
  margin-bottom: 12px;
}

.preview-current {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.preview-card {
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(250, 251, 252, 0.98), rgba(243, 246, 248, 0.98));
}

.preview-empty {
  min-height: 470px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(17, 34, 50, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 251, 0.86));
  padding: 20px;
}

.preview-empty-title {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 600;
}

.preview-empty-copy {
  max-width: 24rem;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.preview-charts {
  display: grid;
  gap: 12px;
}

.wave-panel {
  border-radius: 14px;
  padding: 12px 12px 10px;
}

.wave-head {
  align-items: center;
  margin-bottom: 10px;
}

.wave-head strong {
  font-size: 0.96rem;
  font-weight: 600;
}

.wave-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px;
  border: 1px solid rgba(17, 34, 50, 0.1);
  border-radius: 9px;
  background: #f4f7f9;
}

.wave-zoom-button {
  min-width: 38px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.wave-zoom-button.active {
  background: #162532;
  color: #f7fbfd;
}

.wave-zoom-button:not(:disabled):hover {
  transform: translateY(0);
  box-shadow: none;
  color: var(--ink);
}

.wave-zoom-button.active:not(:disabled):hover {
  color: #f7fbfd;
}

.wave-zoom-button:not(:disabled):active {
  transform: scale(0.97);
}

.wave-plot {
  display: block;
  width: 100%;
  height: 180px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #f7fafc, #f2f6f8);
  shape-rendering: geometricPrecision;
}

.signal-switch {
  display: inline-flex;
  gap: 8px;
  margin-top: 12px;
}

.signal-tab {
  min-width: 82px;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface-muted);
  color: var(--muted);
  border: 1px solid rgba(17, 34, 50, 0.1);
  box-shadow: none;
}

.signal-tab.active {
  background: linear-gradient(180deg, #162532, #0f1f2d);
  color: #f7fbfd;
  border-color: rgba(15, 31, 45, 0.9);
}

.signal-tab:not(:disabled):hover {
  transform: translateY(0);
  box-shadow: none;
}

.signal-tab:not(:disabled):active {
  transform: scale(0.98);
}

.wave-grid-line {
  stroke: rgba(17, 34, 50, 0.08);
  stroke-width: 0.9;
}

.wave-zero-line {
  stroke: rgba(17, 34, 50, 0.22);
  stroke-width: 1.15;
}

.wave-axis-line {
  stroke: rgba(17, 34, 50, 0.32);
  stroke-width: 1;
}

.wave-tick {
  stroke: rgba(17, 34, 50, 0.26);
  stroke-width: 1;
}

.wave-tick-label {
  fill: rgba(17, 34, 50, 0.62);
  font-size: 11px;
  font-family: "IBM Plex Sans", sans-serif;
}

.hint {
  margin: 18px 0 0;
  font-size: 0.92rem;
}

.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-top: 18px;
}

.panel-footer .hint {
  margin: 0;
}

.demo-link-button,
.demo-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(17, 34, 50, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(245, 248, 250, 0.98), rgba(234, 239, 242, 0.98));
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, background 220ms ease;
}

.demo-link-button:hover,
.demo-back-link:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 122, 89, 0.34);
  background: linear-gradient(180deg, rgba(247, 250, 252, 1), rgba(237, 243, 246, 1));
}

.demo-link-button:active,
.demo-back-link:active {
  transform: scale(0.98);
}

/* Initial page redesign: restrained industrial diagnosis terminal. */
body:not(.demo-page-body) {
  font-family: "Fira Sans", "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(180deg, rgba(248, 250, 251, 0.98), rgba(238, 243, 246, 0.98)),
    radial-gradient(circle at 12% 0%, rgba(31, 107, 76, 0.06), transparent 34%),
    var(--bg);
}

body:not(.demo-page-body) .page {
  gap: 18px;
  padding-top: 24px;
}

body:not(.demo-page-body) .hero {
  border-radius: 20px;
  padding: 24px 26px 26px;
  background: linear-gradient(180deg, rgba(20, 35, 49, 0.98), rgba(17, 31, 43, 0.99));
  box-shadow: 0 18px 38px rgba(12, 20, 28, 0.18);
}

body:not(.demo-page-body) .hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 22px;
}

body:not(.demo-page-body) .eyebrow {
  color: #9fb4c5;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
}

body:not(.demo-page-body) .hero h1 {
  max-width: 14em;
  color: #f8fbfd;
  font-size: clamp(2rem, 3.6vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

body:not(.demo-page-body) .hero-copy-label {
  margin: 0 0 10px;
  color: #d7e4ec;
  font-weight: 700;
}

body:not(.demo-page-body) .lead {
  max-width: 48rem;
  font-size: 1.02rem;
  color: rgba(220, 231, 237, 0.88);
}

body:not(.demo-page-body) .status-chip {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.86rem;
}

.process-panel {
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.process-panel h2 {
  margin: 0 0 8px;
  color: #d7e4ec;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.process-list {
  display: grid;
}

.process-item {
  display: grid;
  grid-template-columns: 42px 96px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.process-no {
  color: #8db6cc;
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
}

.process-item strong {
  color: #ffffff;
  font-size: 0.92rem;
}

.process-item p {
  margin: 0;
  color: #b7c8d4;
  font-size: 0.88rem;
  line-height: 1.5;
}

body:not(.demo-page-body) .panel {
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(17, 34, 50, 0.06);
  padding: 24px;
}

body:not(.demo-page-body) .panel-head h2 {
  font-size: clamp(1.65rem, 2.4vw, 1.9rem);
}

body:not(.demo-page-body) .panel-kicker,
body:not(.demo-page-body) .section-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

body:not(.demo-page-body) .section-head h3 {
  font-size: 1.18rem;
}

.workbench-header {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 20px;
  row-gap: 10px;
  align-items: start;
}

.workbench-desc {
  grid-column: 1 / -1;
  max-width: 920px;
  font-size: 0.96rem;
  line-height: 1.75;
  color: #475569;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.workbench-state {
  margin: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(31, 107, 76, 0.16);
  border-radius: 999px;
  background: rgba(31, 107, 76, 0.08);
  color: #18563d;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

body:not(.demo-page-body) .workspace-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
}

.input-meta {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #e1e8ec;
  border-radius: 14px;
  background: #f6f9fa;
}

.input-block-title {
  margin: 0 0 10px;
  color: #233648;
  font-size: 0.92rem;
  font-weight: 800;
}

.input-meta div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: baseline;
}

.input-meta dt {
  color: #6b7c88;
  font-size: 0.82rem;
}

.input-meta dd {
  margin: 0;
  color: #102030;
  font-size: 0.86rem;
  font-weight: 700;
}

body:not(.demo-page-body) .dropzone {
  min-height: 210px;
  padding: 26px 22px;
  border-radius: 16px;
}

body:not(.demo-page-body) .drop-title {
  font-size: 1.2rem;
}

body:not(.demo-page-body) .drop-subtitle {
  max-width: 28rem;
}

.file-summary {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #dde5e2;
  border-radius: 14px;
  background: #f8faf9;
}

.file-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.file-summary-head .input-block-title {
  margin-bottom: 8px;
}

.sample-upload-link {
  position: relative;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.sample-upload-link::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid #dbe5ea;
  border-radius: 10px;
  background: #ffffff;
  color: #31475a;
  box-shadow: 0 12px 24px rgba(17, 34, 50, 0.12);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 3;
}

.sample-upload-link::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: calc(100% + 4px);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-right: 1px solid #dbe5ea;
  border-bottom: 1px solid #dbe5ea;
  transform: rotate(45deg) translateY(4px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 2;
}

.sample-upload-link:hover::after,
.sample-upload-link:hover::before,
.sample-upload-link:focus-visible::after,
.sample-upload-link:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.sample-upload-link:not(:disabled):hover {
  transform: none;
  box-shadow: none;
  color: #0f3f2d;
}

.sample-upload-link:disabled {
  color: #8a9a94;
  opacity: 1;
  cursor: wait;
}

.file-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #667887;
  font-size: 0.9rem;
  line-height: 1.85;
}

.file-summary-row strong {
  max-width: 220px;
  color: #102030;
  text-align: right;
  overflow-wrap: anywhere;
}

body:not(.demo-page-body) #detect-btn,
body:not(.demo-page-body) .intro-confirm {
  background: linear-gradient(180deg, #1f6b4c, #18563d);
}

body:not(.demo-page-body) #detect-btn:disabled {
  background: #c9d6d1;
  opacity: 1;
  box-shadow: none;
}

body:not(.demo-page-body) .preview-card {
  background: #ffffff;
}

body:not(.demo-page-body) .preview-empty {
  min-height: 300px;
}

.wave-title-group {
  display: grid;
  gap: 4px;
}

.wave-title-group span {
  font-size: 0.78rem;
}

body:not(.demo-page-body) .result {
  margin-top: 18px;
  padding: 18px;
  background: #ffffff;
  box-shadow: none;
}

body:not(.demo-page-body) .result-main h2 {
  font-size: 1.65rem;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.result-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-download-link {
  position: relative;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.result-download-link::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid #dbe5ea;
  border-radius: 10px;
  background: #ffffff;
  color: #31475a;
  box-shadow: 0 12px 24px rgba(17, 34, 50, 0.12);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 3;
}

.result-download-link::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: calc(100% + 4px);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-right: 1px solid #dbe5ea;
  border-bottom: 1px solid #dbe5ea;
  transform: rotate(45deg) translateY(4px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 2;
}

.result-download-link:hover::after,
.result-download-link:hover::before,
.result-download-link:focus-visible::after,
.result-download-link:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.result-download-link:not(:disabled):hover {
  transform: none;
  box-shadow: none;
  color: #0f3f2d;
}

.result-download-link:not(:disabled):active {
  transform: translateY(1px);
}

.result-head h3 {
  margin: 6px 0 0;
  font-size: 1.08rem;
}

.result-demo-link {
  min-height: 36px;
  white-space: nowrap;
}

body:not(.demo-page-body) .confidence strong {
  font-size: 1.95rem;
}

#top-list {
  padding-left: 0;
  list-style: none;
}

.candidate-row {
  display: grid;
  grid-template-columns: 92px minmax(80px, 1fr) 64px;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  font-size: 0.88rem;
}

.candidate-name {
  color: #102030;
  font-weight: 650;
}

.candidate-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e9ec;
}

.candidate-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1f6b4c;
}

.candidate-score {
  color: #475569;
  text-align: right;
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
}

.result-skeleton {
  display: inline-block;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef1;
  vertical-align: middle;
}

.result-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: skeleton-sweep 1.45s ease-in-out infinite;
}

.result-skeleton-title {
  width: 150px;
  height: 38px;
}

.result-skeleton-short {
  width: 132px;
  height: 18px;
}

.result-skeleton-number {
  width: 136px;
  height: 42px;
}

.result-skeleton-label {
  width: 34px;
  height: 12px;
}

.result-skeleton-value {
  width: 48px;
  height: 16px;
}

.result-skeleton-candidate {
  width: 78px;
  height: 18px;
}

.result-skeleton-score {
  width: 48px;
  height: 14px;
  justify-self: end;
}

.candidate-bar-fill.loading {
  width: 42%;
  animation: thinking-bar 1.2s ease-in-out infinite alternate;
}

.typing-ellipsis {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #607285;
  font-weight: 650;
}

.typing-ellipsis span {
  animation: typing-dot 1.1s ease-in-out infinite;
}

.typing-ellipsis span:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-ellipsis span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes skeleton-sweep {
  100% {
    transform: translateX(100%);
  }
}

@keyframes thinking-bar {
  0% {
    width: 22%;
    opacity: 0.45;
  }
  100% {
    width: 62%;
    opacity: 0.95;
  }
}

@keyframes typing-dot {
  0%, 80%, 100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

body:not(.demo-page-body) .panel-footer {
  align-items: center;
}

.demo-page-body {
  --drag-focus-x: 50vw;
  --drag-focus-y: 50vh;
  --drag-focus-radius: 160px;
  min-height: 100dvh;
  font-family: "Fira Sans", "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 14% 8%, rgba(31, 122, 89, 0.12), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(17, 34, 50, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(236, 241, 244, 0.98)),
    var(--bg);
}

.demo-page-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  background: rgba(8, 18, 28, 0.48);
  -webkit-mask-image: radial-gradient(circle var(--drag-focus-radius) at var(--drag-focus-x) var(--drag-focus-y), transparent 0 72%, rgba(0, 0, 0, 0.45) 78%, #000 100%);
  mask-image: radial-gradient(circle var(--drag-focus-radius) at var(--drag-focus-x) var(--drag-focus-y), transparent 0 72%, rgba(0, 0, 0, 0.45) 78%, #000 100%);
  backdrop-filter: saturate(0.82) blur(1.5px);
  transition: opacity 180ms ease;
}

.demo-page-body.demo-drag-focus::after {
  opacity: 1;
}

.demo-page-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 26px;
}

.demo-page-panel {
  width: min(100%, 1360px);
  min-height: calc(100dvh - 52px);
  padding: 30px;
  border: 1px solid rgba(17, 34, 50, 0.11);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96)),
    radial-gradient(circle at 18% 0%, rgba(31, 122, 89, 0.05), transparent 30%);
  box-shadow: 0 28px 70px rgba(17, 34, 50, 0.1);
}

.demo-page-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(17, 34, 50, 0.08);
}

.demo-page-head h1 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.demo-page-lead {
  max-width: 44rem;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.78;
}

.demo-page-head .section-kicker {
  color: var(--accent-strong);
}

.demo-back-link {
  background: linear-gradient(180deg, rgba(245, 248, 250, 0.98), rgba(234, 239, 242, 0.98));
  border-color: rgba(17, 34, 50, 0.12);
  color: var(--ink);
}

.demo-back-link:hover {
  border-color: rgba(31, 122, 89, 0.34);
  background: linear-gradient(180deg, rgba(247, 250, 252, 1), rgba(237, 243, 246, 1));
}

.demo-workbench {
  display: block;
  padding-top: 24px;
}

.demo-stage-panel {
  border: 1px solid rgba(17, 34, 50, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.94));
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.demo-control-strip {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 18px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.demo-control-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(220px, 0.8fr);
  gap: 14px;
  flex: 1 1 auto;
}

.demo-control-block {
  min-width: 0;
}

.demo-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding: 5px;
  border: 1px solid rgba(17, 34, 50, 0.1);
  border-radius: 14px;
  background: #ffffff;
  transition: opacity 220ms ease;
}

.demo-segmented.muted {
  opacity: 0.68;
}

.demo-segment-button,
.demo-capture-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(17, 34, 50, 0.12);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(239, 244, 247, 0.98));
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: none;
}

.demo-segment-button {
  flex: 1 1 auto;
  min-width: 74px;
  background: transparent;
  border-color: transparent;
}

.demo-segment-button.active {
  background: linear-gradient(180deg, #253646, #132431);
  border-color: rgba(19, 36, 49, 0.95);
  color: #f7fbfd;
  box-shadow: 0 8px 18px rgba(17, 34, 50, 0.12);
}

.demo-segment-button:hover,
.demo-capture-button:hover {
  transform: translateY(-1px);
}

.demo-segment-button:active,
.demo-capture-button:active {
  transform: scale(0.98);
}

.demo-capture-button {
  min-width: 132px;
  min-height: 54px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 44%),
    linear-gradient(180deg, #237c5e, #14543d);
  border-color: rgba(20, 84, 61, 0.9);
  color: #ffffff;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 26px rgba(20, 84, 61, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.demo-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.demo-stage-head h2 {
  margin: 8px 0 0;
  font-size: 1.38rem;
  letter-spacing: -0.02em;
}

.demo-stage-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(17, 34, 50, 0.1);
  border-radius: 999px;
  background: rgba(31, 122, 89, 0.08);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 600;
}

.demo-stage-frame {
  width: 100%;
  min-height: 590px;
  display: grid;
  gap: 18px;
  margin-top: 18px;
  border: 1px solid rgba(17, 34, 50, 0.08);
  border-radius: 24px;
  background: #ffffff;
  padding: 20px;
}

.demo-diagnostic-row {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 172px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.demo-detect-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  min-width: 0;
  padding: 18px 14px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(17, 34, 50, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 34, 50, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #fbfcfd, #eef4f1);
  background-size: 18px 18px, 18px 18px, auto;
  border: 1px solid rgba(31, 122, 89, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 14px 28px rgba(17, 34, 50, 0.06);
}

.demo-detect-panel::before {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: rgba(31, 122, 89, 0.44);
}

.demo-detect-panel p {
  max-width: 8.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.demo-interaction-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(324px, 350px);
  gap: 18px;
  align-items: stretch;
}

.gearbox-composition {
  min-width: 0;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(17, 34, 50, 0.07);
  border-radius: 24px;
  background: #ffffff;
  padding: 18px 22px 22px;
}

.gearbox-composition::before {
  content: none;
}

.gearbox-composition-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.gearbox-composition-head h3 {
  margin: 8px 0 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.gearbox-composition-copy {
  max-width: 24rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.68;
  text-align: right;
}

.fault-part-tray {
  align-self: stretch;
  margin-top: 0;
  min-height: 100%;
  padding: 14px;
  border: 1px solid rgba(17, 34, 50, 0.08);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  display: grid;
  grid-template-rows: auto 1fr;
}

.fault-tray-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
  margin-bottom: 12px;
}

.fault-tray-head h4 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.fault-tray-head span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: right;
  max-width: 8.2rem;
}

.fault-part-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-height: 0;
}

.fault-part-card {
  display: grid;
  position: relative;
  justify-items: center;
  align-content: center;
  gap: 7px;
  min-height: 0;
  padding: 10px 6px;
  border: 1px solid rgba(17, 34, 50, 0.1);
  border-radius: 15px;
  background:
    radial-gradient(circle at 12% 18%, rgba(31, 122, 89, 0.06), transparent 30%),
    #ffffff;
  color: var(--ink);
  cursor: grab;
  user-select: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.fault-part-card:hover,
.fault-part-card:focus-visible {
  border-color: rgba(31, 122, 89, 0.34);
  box-shadow: 0 14px 28px rgba(17, 34, 50, 0.09);
  transform: translateY(-1px);
  outline: none;
}

.fault-part-card.dragging {
  z-index: 35;
  cursor: grabbing;
  opacity: 0.96;
  transform: scale(1.04);
  border-color: rgba(31, 122, 89, 0.44);
  box-shadow: 0 24px 58px rgba(8, 18, 28, 0.28), 0 0 0 8px rgba(31, 122, 89, 0.12);
}

.fault-part-copy {
  display: grid;
  justify-items: center;
  gap: 2px;
  overflow: hidden;
  text-align: center;
}

.fault-part-copy strong {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fault-part-copy em {
  color: #9c4b3c;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.normal-part .fault-part-copy em {
  color: var(--accent-strong);
}

.fault-part-shape {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 32px;
}

.shape-inner,
.shape-outer {
  border-radius: 50%;
}

.shape-inner {
  border: 7px solid #3d4f63;
}

.shape-outer {
  border: 0;
  background: #7a8795;
  clip-path: polygon(
    44% 0,
    56% 0,
    58% 18%,
    66% 21%,
    80% 9%,
    91% 20%,
    79% 34%,
    82% 42%,
    100% 44%,
    100% 56%,
    82% 58%,
    79% 66%,
    91% 80%,
    80% 91%,
    66% 79%,
    58% 82%,
    56% 100%,
    44% 100%,
    42% 82%,
    34% 79%,
    20% 91%,
    9% 80%,
    21% 66%,
    18% 58%,
    0 56%,
    0 44%,
    18% 42%,
    21% 34%,
    9% 20%,
    20% 9%,
    34% 21%,
    42% 18%
  );
}

.shape-outer::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(17, 34, 50, 0.08);
}

.shape-roller {
  width: 28px;
  height: 28px;
  margin-left: 2px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cbd6df 58%, #8e9daa);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.shape-broken::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  width: 14px;
  height: 22px;
  border-left: 3px solid #b5483a;
  transform: rotate(28deg);
}

.shape-wear::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 2px;
  height: 5px;
  border-radius: 999px;
  background: rgba(181, 72, 58, 0.64);
}

.gearbox-composition-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(250px, 0.72fr);
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  min-height: 392px;
}

.gearbox-machine {
  position: relative;
  min-height: 240px;
  display: grid;
  place-items: center;
}

.gearbox-image-card {
  position: relative;
  width: min(100%, 520px);
  margin-inline: auto;
  display: grid;
  justify-items: center;
  grid-template-rows: 310px auto auto;
  transform: none;
  border-radius: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gearbox-image-visual {
  position: relative;
  width: 100%;
  height: 310px;
  display: grid;
  place-items: center;
  transform: translateY(-4px);
}

.gearbox-reference-image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  mix-blend-mode: multiply;
  padding: 0;
  filter: contrast(0.98) drop-shadow(0 12px 18px rgba(17, 34, 50, 0.05));
}

.gearbox-image-title {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.gearbox-image-legend {
  margin-top: 8px;
}

.gearbox-zoom-bridge,
.gearbox-zoom-arrow {
  display: none;
}

.gearbox-housing {
  position: relative;
  width: min(100%, 560px);
  height: 176px;
  border: 12px solid #728290;
  border-radius: 34px;
  background: linear-gradient(180deg, #e9eef2, #d7e0e7);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.46), 0 18px 34px rgba(17, 34, 50, 0.08);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px;
}

.gearbox-window {
  position: relative;
  border: 1px solid rgba(17, 34, 50, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(250, 252, 253, 0.98), rgba(241, 246, 249, 0.98));
  overflow: hidden;
}

.gearbox-shaft {
  position: absolute;
  top: 50%;
  width: 110px;
  height: 20px;
  margin-top: -10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #b1bcc7, #8897a7);
}

.gearbox-shaft-left { left: 6px; }
.gearbox-shaft-right { right: 6px; }

.gearbox-gear {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 10px solid #5f7285;
  background: radial-gradient(circle at 35% 35%, #ffffff, #d7e0e8 68%, #9bacbc);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.46);
  animation: gearbox-spin 5.2s linear infinite;
}

.gearbox-gear-large {
  width: 92px;
  height: 92px;
  margin-left: -46px;
  margin-top: -46px;
}

.gearbox-gear-small {
  width: 58px;
  height: 58px;
  margin-left: 10px;
  margin-top: -2px;
  animation-duration: 4.4s;
  animation-direction: reverse;
}

.gearbox-gear-medium {
  width: 76px;
  height: 76px;
  margin-left: -38px;
  margin-top: -38px;
  animation-duration: 4.8s;
}

.gearbox-gear-output {
  width: 88px;
  height: 88px;
  margin-left: -44px;
  margin-top: -44px;
  animation-duration: 4.6s;
}

.gearbox-bearing-focus {
  position: absolute;
  top: 54%;
  left: 46%;
  width: 66px;
  height: 66px;
  margin-left: -33px;
  margin-top: -33px;
  border: 3px solid rgba(31, 122, 89, 0.88);
  border-radius: 50%;
  background: rgba(31, 122, 89, 0.05);
  box-shadow: 0 0 0 8px rgba(31, 122, 89, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.86);
  animation: bearing-focus-pulse 2.8s ease-in-out infinite;
}

.gearbox-bearing-focus::before,
.gearbox-bearing-focus::after {
  content: "";
  position: absolute;
  background: rgba(31, 122, 89, 0.86);
}

.gearbox-bearing-focus::before {
  left: 50%;
  top: -10px;
  bottom: -10px;
  width: 2px;
  transform: translateX(-50%);
}

.gearbox-bearing-focus::after {
  left: -10px;
  right: -10px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
}

.gearbox-machine[data-fault-family="inner"] .gearbox-window-center,
.gearbox-machine[data-fault-family="outer"] .gearbox-window-right,
.gearbox-machine[data-fault-family="roller"] .gearbox-window-right {
  box-shadow: inset 0 0 0 2px rgba(191, 114, 85, 0.26);
}

.gearbox-machine[data-fault-family="inner"] .gearbox-window-center .gearbox-gear,
.gearbox-machine[data-fault-family="outer"] .gearbox-window-right .gearbox-gear,
.gearbox-machine[data-fault-family="roller"] .gearbox-window-right .gearbox-gear {
  border-color: #9c4b3c;
}

.gearbox-machine[data-fault-level="wear"] .gearbox-window-right,
.gearbox-machine[data-fault-level="wear"] .gearbox-window-center {
  filter: saturate(0.92);
}

.gearbox-viewport {
  position: relative;
  z-index: 2;
  min-height: 326px;
  display: grid;
  grid-template-rows: 310px auto;
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: 0 0 4px;
  background: transparent;
  box-shadow: none;
}

.gearbox-viewport-title {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.gearbox-viewport-caption {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 14px;
}

.gearbox-shell {
  position: relative;
  z-index: 2;
  width: min(82%, 276px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gearbox-shell.drag-over {
  transform: scale(1.02);
  box-shadow: 0 0 0 10px rgba(31, 122, 89, 0.08);
}

.demo-page-body.demo-drag-focus .gearbox-shell {
  transform: scale(1.04);
  box-shadow: 0 24px 58px rgba(8, 18, 28, 0.28), 0 0 0 12px rgba(31, 122, 89, 0.16);
}

.demo-page-body.demo-drag-focus .fault-part-card.dragging {
  position: relative;
  z-index: 35;
}

.gearbox-ring {
  position: absolute;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.gearbox-outer {
  width: 100%;
  height: 100%;
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.gearbox-outer-gear {
  position: absolute;
  z-index: 0;
  inset: -9px;
  overflow: visible;
  filter: drop-shadow(0 18px 35px rgba(17, 34, 50, 0.08));
  pointer-events: none;
}

.gearbox-outer-gear .gear-shape {
  fill: #788696;
  stroke: rgba(85, 101, 118, 0.32);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.gearbox-outer::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 38%, rgba(255, 255, 255, 0.88), rgba(214, 221, 227, 0.94) 62%, rgba(151, 165, 178, 0.86));
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.42);
}

.gearbox-inner {
  width: 54%;
  height: 54%;
  border: 22px solid #3d4f63;
  background:
    radial-gradient(circle at 42% 38%, rgba(255, 255, 255, 0.86), rgba(199, 210, 220, 0.9) 64%, rgba(125, 141, 154, 0.82));
  animation: gearbox-spin 4.4s linear infinite;
  z-index: 7;
  cursor: grab;
}

.gearbox-rollers {
  position: absolute;
  inset: 0;
  z-index: 6;
  animation: gearbox-spin 5.3s linear infinite reverse;
  cursor: grab;
}

.roller {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16%;
  height: 16%;
  margin-left: -8%;
  margin-top: -8%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cbd6df 58%, #8e9daa);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.5), 0 8px 16px rgba(17, 34, 50, 0.12);
  cursor: grab;
}

.roller-1 { transform: translate(0, -78px); }
.roller-2 { transform: translate(55px, -55px); }
.roller-3 { transform: translate(78px, 0); }
.roller-4 { transform: translate(55px, 55px); }
.roller-5 { transform: translate(0, 78px); }
.roller-6 { transform: translate(-55px, 55px); }
.roller-7 { transform: translate(-78px, 0); }
.roller-8 { transform: translate(-55px, -55px); }

.gearbox-core {
  width: 36%;
  height: 36%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f9fbfc, #d5dee6 68%, #96a5b1);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.52);
}

.bearing-crack {
  position: absolute;
  z-index: 8;
  opacity: 0;
  width: 82px;
  height: 42px;
  pointer-events: none;
}

.bearing-crack::before,
.bearing-crack::after {
  content: "";
  position: absolute;
  height: 3px;
  border-radius: 999px;
  background: #b5483a;
  transform-origin: left center;
}

.bearing-crack::before {
  width: 56px;
  transform: rotate(28deg);
}

.bearing-crack::after {
  left: 36px;
  top: 18px;
  width: 38px;
  transform: rotate(-34deg);
}

.bearing-crack-inner {
  top: 38%;
  left: 51%;
}

.bearing-crack-outer {
  top: 18%;
  left: 57%;
}

.gearbox-shell[data-fault-family="inner"] .gearbox-inner {
  border-color: #9c4b3c;
}

.gearbox-shell[data-fault-family="inner"][data-fault-level="broken"] .bearing-crack-inner {
  opacity: 1;
}

.gearbox-shell[data-fault-family="outer"] .gearbox-outer {
  background: transparent;
}

.gearbox-shell[data-fault-family="outer"] .gearbox-outer-gear .gear-shape {
  fill: #9c4b3c;
  stroke: rgba(127, 58, 48, 0.42);
}

.gearbox-shell[data-fault-family="outer"][data-fault-level="broken"] .bearing-crack-outer {
  opacity: 1;
}

.gearbox-shell[data-fault-family="roller"] .roller {
  background: radial-gradient(circle at 38% 35%, #fff0ec, #e9b5a3 64%, #bf7255);
}

.gearbox-shell[data-fault-level="broken"] .gearbox-inner,
.gearbox-shell[data-fault-level="broken"] .roller {
  box-shadow: 0 0 0 4px rgba(191, 114, 85, 0.18), inset 0 0 0 3px rgba(255, 255, 255, 0.38);
}

.gearbox-shell[data-fault-level="broken"] .gearbox-outer-gear {
  filter: drop-shadow(0 0 8px rgba(191, 114, 85, 0.22));
}

.gearbox-shell[data-fault-family="inner"][data-fault-level="missing"] .gearbox-inner::after,
.gearbox-shell[data-fault-family="outer"][data-fault-level="missing"] .gearbox-outer::after,
.gearbox-shell[data-fault-family="roller"][data-fault-level="missing"] .gearbox-rollers::after {
  content: "";
  position: absolute;
  width: 18%;
  height: 18%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  transform: translate(96px, -22px);
}

.gearbox-shell[data-fault-family="inner"][data-fault-level="missing"] .gearbox-inner {
  opacity: 0.18;
  border-style: dashed;
  filter: grayscale(0.3);
}

.gearbox-shell[data-fault-family="outer"][data-fault-level="missing"] .gearbox-outer-gear .gear-shape {
  opacity: 0.22;
}

.gearbox-shell[data-fault-family="outer"][data-fault-level="missing"] .gearbox-outer::after {
  opacity: 0.35;
}

.gearbox-shell[data-fault-family="roller"][data-fault-level="missing"] .roller {
  opacity: 0.12;
  transform-origin: center;
}

.shell-part-dragging {
  cursor: grabbing;
  opacity: 0.42 !important;
  filter: saturate(0.8);
}

.gearbox-shell[data-fault-family="inner"][data-fault-level="missing"] .gearbox-inner::after {
  width: 22%;
  height: 22%;
  transform: translate(34px, -10px);
}

.gearbox-shell[data-fault-family="outer"][data-fault-level="missing"] .gearbox-outer::after {
  width: 16%;
  height: 16%;
}

.gearbox-shell[data-fault-family="roller"][data-fault-level="missing"] .gearbox-rollers::after {
  width: 14%;
  height: 14%;
  transform: translate(92px, -92px);
}

.gearbox-shell[data-fault-level="wear"] .gearbox-inner,
.gearbox-shell[data-fault-level="wear"] .gearbox-outer {
  filter: saturate(0.9);
}

.gearbox-shell[data-fault-level="wear"] .roller {
  filter: brightness(0.92);
}

.gearbox-shell[data-inner-state="broken"] .gearbox-inner {
  border-color: #9c4b3c;
  box-shadow: 0 0 0 4px rgba(191, 114, 85, 0.18), inset 0 0 0 3px rgba(255, 255, 255, 0.38);
}

.gearbox-shell[data-inner-state="broken"] .bearing-crack-inner,
.gearbox-shell[data-outer-state="broken"] .bearing-crack-outer {
  opacity: 1;
}

.gearbox-shell[data-inner-state="wear"] .gearbox-inner {
  border-color: #ad7153;
  background:
    radial-gradient(circle at 42% 38%, rgba(255, 251, 245, 0.9), rgba(218, 190, 170, 0.92) 64%, rgba(160, 116, 86, 0.82));
  filter: saturate(0.95) brightness(0.98);
}

.gearbox-shell[data-inner-state="missing"] .gearbox-inner {
  opacity: 0.1;
  filter: grayscale(0.8);
}

.gearbox-shell[data-outer-state="broken"] .gearbox-outer-gear .gear-shape {
  fill: #9c4b3c;
  stroke: rgba(127, 58, 48, 0.42);
}

.gearbox-shell[data-outer-state="broken"] .gearbox-outer-gear {
  filter: drop-shadow(0 0 8px rgba(191, 114, 85, 0.22));
}

.gearbox-shell[data-outer-state="wear"] .gearbox-outer-gear .gear-shape {
  fill: #a8785c;
  stroke: rgba(130, 85, 58, 0.38);
  filter: saturate(0.92) brightness(0.96);
}

.gearbox-shell[data-outer-state="missing"] .gearbox-outer-gear .gear-shape {
  opacity: 0.12;
}

.gearbox-shell[data-outer-state="missing"] .gearbox-outer::after {
  opacity: 0.14;
}

.gearbox-shell[data-roller-state="broken"] .roller {
  background: radial-gradient(circle at 38% 35%, #fff0ec, #e9b5a3 64%, #bf7255);
  box-shadow: 0 0 0 4px rgba(191, 114, 85, 0.18), inset 0 0 0 3px rgba(255, 255, 255, 0.38);
}

.gearbox-shell[data-roller-state="wear"] .roller {
  background: radial-gradient(circle at 36% 32%, #fff8ef, #dcb999 60%, #a8785c);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.42), 0 8px 16px rgba(130, 85, 58, 0.16);
  filter: saturate(0.96) brightness(0.98);
}

.gearbox-shell[data-roller-state="missing"] .roller {
  opacity: 0.1;
  filter: grayscale(0.75);
}

.gearbox-shell[data-inner-state="missing"] .bearing-crack-inner,
.gearbox-shell[data-outer-state="missing"] .bearing-crack-outer {
  opacity: 0;
}

.gearbox-shell[data-assembly-state="error"] {
  box-shadow: 0 18px 45px rgba(121, 63, 50, 0.14);
}

.wave-error-text {
  fill: #9c3428;
  font-family: "Fira Code", "IBM Plex Sans", monospace;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.16em;
  animation: scope-error-blink 1.8s steps(2, end) infinite;
  filter: drop-shadow(0 0 5px rgba(156, 52, 40, 0.22));
}

.gearbox-legend {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.gearbox-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}

.legend-outer { background: #7a8795; }
.legend-inner { background: #3d4f63; }
.legend-roller { background: #a8b7c4; }
.legend-focus {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(47, 138, 104, 0.9);
  background: rgba(47, 138, 104, 0.06);
  box-shadow: 0 0 0 4px rgba(47, 138, 104, 0.08);
}

.legend-focus::before,
.legend-focus::after {
  content: "";
  position: absolute;
  background: rgba(47, 138, 104, 0.88);
}

.legend-focus::before {
  left: 50%;
  top: -5px;
  bottom: -5px;
  width: 1.5px;
  transform: translateX(-50%);
}

.legend-focus::after {
  left: -5px;
  right: -5px;
  top: 50%;
  height: 1.5px;
  transform: translateY(-50%);
}

.demo-stage-side {
  min-width: 0;
  display: grid;
  gap: 18px;
  align-content: start;
}

.demo-live-card,
.demo-capture-card {
  border: 1px solid rgba(17, 34, 50, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 253, 0.96));
  padding: 16px;
  box-shadow: 0 14px 30px rgba(17, 34, 50, 0.045);
}

.demo-live-head,
.demo-capture-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.demo-signal-switch {
  flex: 0 0 auto;
  margin: 0;
}

.demo-live-head h3,
.demo-capture-head h3 {
  margin: 8px 0 0;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.demo-live-title-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-live-title-line h3 {
  margin: 8px 0 0;
}

.demo-sample-rate {
  color: #5c6c7c;
  font-family: "Fira Code", "IBM Plex Sans", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.demo-live-file {
  display: none;
}

.demo-wave-plot,
.demo-capture-plot {
  display: block;
  width: 100%;
  margin-top: 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(17, 34, 50, 0.08);
}

.demo-diagnostic-row .demo-wave-plot {
  height: 130px;
}

.demo-signal-source {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 122, 89, 0.14);
  border-radius: 12px;
  background: rgba(248, 251, 250, 0.82);
  color: #4b5e70;
  line-height: 1.35;
}

.demo-signal-source strong {
  flex: 0 0 auto;
  color: #1f5f46;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.demo-signal-source span {
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.demo-diagnostic-row .demo-capture-plot {
  height: 108px;
}

.demo-capture-empty {
  min-height: 122px;
  margin-top: 14px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(31, 122, 89, 0.2);
  border-radius: 12px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 50%, rgba(31, 122, 89, 0.05), transparent 48%),
    rgba(248, 251, 250, 0.72);
}

.demo-capture-result {
  margin-top: 14px;
}

.demo-capture-meta {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding-top: 12px;
}

.demo-capture-label,
.demo-capture-english {
  margin: 0;
}

.demo-capture-label {
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 600;
}

.demo-capture-english {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-capture-feature {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(31, 122, 89, 0.64);
  border-radius: 10px;
  background: rgba(31, 122, 89, 0.055);
  color: #304257;
  font-size: 0.88rem;
  line-height: 1.65;
}

.demo-capture-feature.is-fault {
  border-left-color: rgba(181, 72, 58, 0.72);
  background: rgba(181, 72, 58, 0.09);
  color: #71372f;
}

/* Animation demo refinement: keep alignment stable, reduce template-like labels. */
.demo-page-body .demo-page-shell {
  padding: 22px;
}

.demo-page-body .demo-page-panel {
  width: min(100%, 1280px);
  min-height: calc(100dvh - 44px);
  padding: 26px 30px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(17, 34, 50, 0.08);
}

.demo-page-body .demo-page-head h1 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  letter-spacing: -0.035em;
}

.demo-page-body .demo-page-lead {
  max-width: 42rem;
  font-size: 0.98rem;
  line-height: 1.7;
}

.demo-page-body .section-kicker,
.demo-page-body .demo-stage-label {
  color: #1f5f46;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
}

.demo-page-body .demo-stage-panel {
  border-radius: 20px;
  padding: 18px;
  background: #f8faf9;
}

.demo-page-body .demo-stage-frame {
  min-height: 0;
  border-radius: 18px;
  gap: 16px;
  padding: 16px;
  background: #ffffff;
}

.demo-page-body .demo-diagnostic-row {
  grid-template-columns: minmax(0, 1.1fr) 172px minmax(0, 0.95fr);
  gap: 14px;
}

.demo-page-body .demo-live-card,
.demo-page-body .demo-capture-card,
.demo-page-body .demo-detect-panel,
.demo-page-body .gearbox-composition,
.demo-page-body .fault-part-tray {
  border-color: #dde5e2;
  border-radius: 16px;
  box-shadow: none;
}

.demo-page-body .demo-detect-panel {
  background:
    linear-gradient(90deg, rgba(17, 34, 50, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 34, 50, 0.035) 1px, transparent 1px),
    #f8faf9;
  background-size: 18px 18px, 18px 18px, auto;
}

.demo-page-body .demo-capture-button {
  min-width: 142px;
  font-size: 0.88rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 44%),
    linear-gradient(180deg, #1f6b4c, #18563d);
}

.demo-page-body .demo-wave-plot {
  height: 144px;
}

.demo-page-body .demo-capture-empty {
  min-height: 134px;
}

.demo-page-body .demo-interaction-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 328px);
  gap: 16px;
}

.demo-page-body .gearbox-composition {
  padding: 18px 20px 20px;
}

.demo-page-body .fault-tray-head h4 {
  font-size: 1.05rem;
}

.demo-page-body .fault-tray-head span {
  max-width: 11rem;
  font-size: 0.76rem;
}

.demo-page-body .fault-part-card {
  border-radius: 13px;
  background: #ffffff;
}

.demo-page-body .fault-part-copy strong {
  font-size: 0.82rem;
}

.demo-page-body .fault-part-copy em {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.demo-page-body .normal-part .fault-part-copy em {
  color: #1f7a55;
}

.demo-page-body .fault-part-card:not(.normal-part) .fault-part-copy em {
  color: #b45309;
}

.demo-page-body .fault-part-card[data-level="broken"] .fault-part-copy em {
  color: #b42318;
}

.demo-page-body .signal-tab {
  min-width: 96px;
  padding-inline: 12px;
}

.demo-stage-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: "Fira Code", "IBM Plex Sans", monospace;
}

.demo-page-body .section-kicker,
.demo-page-body .demo-stage-label {
  color: #1f5f46;
  font-family: "Fira Sans", "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
}

.demo-stage-copy {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.9;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(17, 34, 50, 0.07);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.95em;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Reference-link redesign pass: product-demo clarity with data-workbench density. */
body:not(.demo-page-body) {
  background:
    linear-gradient(180deg, rgba(247, 249, 250, 0.98), rgba(235, 240, 243, 0.98)),
    radial-gradient(circle at 8% 2%, rgba(31, 107, 76, 0.08), transparent 32%),
    radial-gradient(circle at 92% 12%, rgba(17, 34, 50, 0.06), transparent 28%),
    #edf1f4;
}

body:not(.demo-page-body) .page {
  max-width: 1380px;
  gap: 20px;
  padding: 24px 22px 44px;
}

body:not(.demo-page-body) .hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(17, 34, 50, 0.12);
  border-radius: 28px;
  padding: 28px;
  background:
    radial-gradient(circle at 82% -18%, rgba(191, 216, 212, 0.22), transparent 34%),
    linear-gradient(135deg, #101d29 0%, #142838 52%, #0f1d29 100%);
  box-shadow: 0 24px 60px rgba(12, 20, 28, 0.2);
}

body:not(.demo-page-body) .hero::before {
  content: "";
  position: absolute;
  inset: auto -8% -54% 38%;
  height: 260px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  transform: rotate(-4deg);
  pointer-events: none;
}

body:not(.demo-page-body) .hero-topbar,
body:not(.demo-page-body) .hero-grid {
  position: relative;
  z-index: 1;
}

body:not(.demo-page-body) .hero-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body:not(.demo-page-body) .hero h1 {
  max-width: 12.5em;
  font-size: clamp(2.25rem, 4vw, 3.2rem);
  letter-spacing: -0.045em;
}

body:not(.demo-page-body) .hero-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  gap: 28px;
}

body:not(.demo-page-body) .lead {
  max-width: 44rem;
  color: rgba(225, 235, 241, 0.9);
  font-size: 1.04rem;
}

.capability-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.capability-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: #dbe8ee;
  font-size: 0.84rem;
  font-weight: 600;
}

body:not(.demo-page-body) .process-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.055));
  backdrop-filter: blur(10px);
}

body:not(.demo-page-body) .process-item {
  grid-template-columns: 38px 86px 1fr;
}

body:not(.demo-page-body) .panel {
  border-radius: 26px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 251, 0.98));
  box-shadow: 0 18px 42px rgba(17, 34, 50, 0.07);
}

body:not(.demo-page-body) .workspace-grid {
  grid-template-columns: minmax(330px, 0.78fr) minmax(0, 1.22fr);
  gap: 24px;
}

body:not(.demo-page-body) .upload-column,
body:not(.demo-page-body) .preview-column {
  padding: 18px;
  border: 1px solid #e0e7eb;
  border-radius: 20px;
  background: #ffffff;
}

body:not(.demo-page-body) .preview-column {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

body:not(.demo-page-body) .uploader {
  display: grid;
  gap: 14px;
}

body:not(.demo-page-body) .input-meta,
body:not(.demo-page-body) .file-summary {
  margin: 0;
  border-color: #e3eaee;
  background: #f8faf9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body:not(.demo-page-body) .dropzone {
  min-height: 232px;
  border-color: #d4dee4;
  background:
    radial-gradient(circle at 50% 0%, rgba(31, 107, 76, 0.07), transparent 40%),
    linear-gradient(180deg, #fbfcfd, #f2f6f8);
}

body:not(.demo-page-body) .dropzone:hover {
  border-color: rgba(31, 107, 76, 0.34);
  transform: translateY(-1px);
}

.run-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.run-summary div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e1e8ec;
  border-radius: 13px;
  background: #f8faf9;
}

.run-summary span,
.run-summary strong {
  display: block;
}

.run-summary span {
  color: var(--muted);
  font-size: 0.72rem;
}

.run-summary strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.82rem;
  white-space: nowrap;
}

body:not(.demo-page-body) .preview-card,
body:not(.demo-page-body) .result {
  border-color: #e0e7eb;
  border-radius: 18px;
}

body:not(.demo-page-body) .preview-card {
  padding: 16px;
  background:
    linear-gradient(180deg, #fbfcfd, #f5f8fa);
}

body:not(.demo-page-body) .preview-empty {
  min-height: 324px;
  background:
    linear-gradient(90deg, rgba(17, 34, 50, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 34, 50, 0.035) 1px, transparent 1px),
    #ffffff;
  background-size: 22px 22px, 22px 22px, auto;
}

body:not(.demo-page-body) .wave-panel {
  border-color: #dfe7eb;
  background: #ffffff;
}

body:not(.demo-page-body) .wave-plot {
  background: #ffffff;
}

body:not(.demo-page-body) .result {
  padding: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(31, 107, 76, 0.055), transparent 34%),
    #ffffff;
}

body:not(.demo-page-body) .confidence,
body:not(.demo-page-body) .result-meta-card,
body:not(.demo-page-body) .details > div {
  border-color: #dde6ea;
  background: #f8faf9;
}

body:not(.demo-page-body) .confidence {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), transparent 46%),
    #edf3f5;
}

body:not(.demo-page-body) .feature-summary-panel {
  background: #ffffff;
}

body:not(.demo-page-body) .candidate-row {
  grid-template-columns: 92px minmax(110px, 1fr) 64px;
}

body:not(.demo-page-body) .demo-link-button,
body:not(.demo-page-body) .signal-tab,
body:not(.demo-page-body) .wave-zoom-button,
body:not(.demo-page-body) #detect-btn {
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

/* Taste-skill refinement: reduce generic AI surfaces, keep diagnostic workflow unchanged. */
body:not(.demo-page-body) {
  background:
    linear-gradient(180deg, rgba(244, 247, 248, 0.98), rgba(232, 237, 240, 0.98)),
    radial-gradient(circle at 12% 8%, rgba(31, 107, 76, 0.06), transparent 22%),
    var(--bg);
}

body:not(.demo-page-body) .hero,
body:not(.demo-page-body) .panel,
body:not(.demo-page-body) .intro-panel,
body:not(.demo-page-body) .thinking-chat-panel {
  border-radius: 18px;
}

body:not(.demo-page-body) .hero {
  background:
    linear-gradient(135deg, rgba(16, 31, 45, 0.98), rgba(21, 45, 57, 0.98) 54%, rgba(18, 32, 43, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 48px);
  box-shadow: 0 18px 42px rgba(12, 20, 28, 0.18);
}

body:not(.demo-page-body) .panel {
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(17, 34, 50, 0.055);
}

body:not(.demo-page-body) .dropzone {
  min-height: 248px;
  border-color: #cbd7dc;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(17, 34, 50, 0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 34, 50, 0.025) 1px, transparent 1px),
    #fbfcfc;
  background-size: 32px 32px;
}

body:not(.demo-page-body) .drop-badge,
body:not(.demo-page-body) .intro-kicker {
  border-radius: 8px;
  text-transform: none;
}

body:not(.demo-page-body) .file-summary,
body:not(.demo-page-body) .preview-card,
body:not(.demo-page-body) .wave-panel,
body:not(.demo-page-body) .details > div,
body:not(.demo-page-body) .confidence,
body:not(.demo-page-body) .result-meta-card {
  border-radius: 12px;
  background: #fbfcfc;
}

body:not(.demo-page-body) .result {
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(17, 34, 50, 0.055);
}

body:not(.demo-page-body) .confidence {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), transparent 54%),
    #eef3f5;
}

body:not(.demo-page-body) .feature-summary-panel {
  border-radius: 9px;
  background: #ffffff;
}

body:not(.demo-page-body) .wave-plot {
  background: #ffffff;
}

body:not(.demo-page-body) .thinking-chat-panel {
  width: min(720px, calc(100vw - 36px));
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(17, 34, 50, 0.2);
}

body:not(.demo-page-body) .thinking-chat-body {
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(17, 34, 50, 0.022) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 34, 50, 0.022) 1px, transparent 1px),
    #f7f9f8;
  background-size: 28px 28px;
}

body:not(.demo-page-body) .thinking-chat-message {
  border-radius: 14px;
}

body:not(.demo-page-body) .thinking-chat-message-assistant {
  box-shadow: none;
}

body:not(.demo-page-body) .thinking-chat-message-user {
  background: #23674b;
  box-shadow: none;
}

body:not(.demo-page-body) .thinking-chat-input input {
  border-radius: 12px;
  background: #fbfcfc;
}

body:not(.demo-page-body) .thinking-chat-input button {
  border-radius: 12px;
}

body:not(.demo-page-body) button:not(:disabled):active,
body:not(.demo-page-body) .demo-link-button:active,
body:not(.demo-page-body) .signal-tab:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
}

body:not(.demo-page-body) .batch-process-entry {
  display: inline;
  width: fit-content;
  min-height: auto;
  margin: 4px 0 14px 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

body:not(.demo-page-body) .batch-process-entry:not(:disabled):hover {
  transform: none;
  box-shadow: none;
  color: #0f3f2d;
}

body:not(.demo-page-body) .batch-download-link {
  min-width: 0;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

body:not(.demo-page-body) .batch-download-link:not(:disabled):hover {
  transform: none;
  box-shadow: none;
  color: #0f3f2d;
}

body:not(.demo-page-body) .batch-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

body:not(.demo-page-body) .batch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 48, 0.28);
  backdrop-filter: blur(2px);
}

body:not(.demo-page-body) .batch-panel {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 36px));
  padding: 24px;
  border: 1px solid rgba(219, 229, 234, 0.96);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(17, 34, 50, 0.2);
}

body:not(.demo-page-body) .batch-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: auto;
  padding: 0;
  border: 1px solid #dbe5ea;
  border-radius: 999px;
  background: #ffffff;
  color: #31475a;
  box-shadow: none;
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 1080px) {
  body:not(.demo-page-body) .hero-grid,
  body:not(.demo-page-body) .workspace-grid {
    grid-template-columns: 1fr;
  }

  body:not(.demo-page-body) .upload-column,
  body:not(.demo-page-body) .preview-column {
    padding: 16px;
  }
}

@media (max-width: 720px) {
  body:not(.demo-page-body) .page {
    padding-inline: 12px;
  }

  body:not(.demo-page-body) .hero,
  body:not(.demo-page-body) .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .run-summary {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  body {
    background: #ffffff !important;
  }

  body * {
    visibility: hidden !important;
  }

  #result-card,
  #result-card * {
    visibility: visible !important;
  }

  #result-card {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 22px !important;
    border: 1px solid #d9e2e7 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .result-actions,
  .result-download-link,
  .result-demo-link {
    display: none !important;
  }

  .candidate-bar,
  .candidate-bar-fill {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

@media (max-width: 1320px) {
  .demo-diagnostic-row {
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  }

  .demo-interaction-grid {
    grid-template-columns: minmax(0, 1fr) minmax(316px, 336px);
  }

  .gearbox-composition-body {
    grid-template-columns: minmax(340px, 1fr) minmax(220px, 0.7fr);
    gap: 12px;
    min-height: 372px;
  }

  .gearbox-composition {
    padding-inline: 18px;
  }

  .fault-part-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fault-part-card {
    justify-items: center;
    text-align: center;
    min-height: 0;
    padding: 9px 6px;
  }

  .gearbox-shell {
    width: min(80%, 260px);
  }

  .roller-1 { transform: translate(0, -74px); }
  .roller-2 { transform: translate(52px, -52px); }
  .roller-3 { transform: translate(74px, 0); }
  .roller-4 { transform: translate(52px, 52px); }
  .roller-5 { transform: translate(0, 74px); }
  .roller-6 { transform: translate(-52px, 52px); }
  .roller-7 { transform: translate(-74px, 0); }
  .roller-8 { transform: translate(-52px, -52px); }
}

@media (max-width: 1080px) {
  .hero-grid,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  body:not(.demo-page-body) .hero-grid,
  body:not(.demo-page-body) .workspace-grid {
    grid-template-columns: 1fr;
  }

  .panel-state-block {
    justify-items: start;
  }

  .workbench-header {
    grid-template-columns: 1fr;
  }

  .workbench-desc {
    grid-column: auto;
  }

  .demo-control-grid {
    grid-template-columns: 1fr;
  }

  .demo-diagnostic-row {
    grid-template-columns: 1fr;
  }

  .demo-detect-panel {
    min-height: 112px;
  }

  .demo-interaction-grid {
    grid-template-columns: 1fr;
  }

  .gearbox-composition-body {
    grid-template-columns: minmax(320px, 1fr) minmax(220px, 0.74fr);
    gap: 14px;
  }

  .fault-part-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fault-part-card {
    grid-template-columns: 42px minmax(0, 1fr);
    justify-items: stretch;
    text-align: left;
    min-height: 68px;
    padding: 8px 10px;
  }

  .gearbox-viewport {
    min-height: 320px;
  }

  .result-main {
    grid-template-columns: 1fr;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .feature-summary-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-summary-panel div {
    border-right: 0;
    border-bottom: 1px solid rgba(17, 34, 50, 0.07);
  }

  .section-meta,
  .preview-meta {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .intro-modal {
    padding: 14px;
  }

  .intro-panel {
    padding: 22px 18px 20px;
    border-radius: 18px;
  }

  .intro-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .intro-confirm {
    width: 100%;
  }

  .page {
    padding: 16px 12px 32px;
  }

  body:not(.demo-page-body) .hero,
  body:not(.demo-page-body) .panel {
    padding: 18px;
  }

  .process-item {
    grid-template-columns: 36px 1fr;
  }

  .process-item p {
    grid-column: 2;
  }

  .input-meta div {
    grid-template-columns: 76px 1fr;
  }

  .result-head,
  .file-summary-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .file-summary-row strong {
    max-width: 100%;
    text-align: left;
  }

  .candidate-row {
    grid-template-columns: 1fr 56px;
  }

  .candidate-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 18px;
  }

  .hero-topbar {
    padding-bottom: 16px;
  }

  .hero h1 {
    font-size: 1.86rem;
  }

  .dropzone {
    min-height: 220px;
    padding: 24px 18px;
  }

  .drop-title {
    font-size: 1.28rem;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .panel-footer,
  .demo-page-head,
  .demo-control-strip,
  .gearbox-overview-head,
  .gearbox-section-head,
  .gearbox-composition-head,
  .demo-live-head,
  .demo-capture-head,
  .demo-capture-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .confidence {
    width: 100%;
    text-align: left;
  }

  .result-summary {
    padding-right: 0;
  }

  .preview-empty {
    min-height: 260px;
  }

  .wave-plot {
    height: 160px;
  }

  .signal-switch {
    width: 100%;
  }

  .signal-tab {
    flex: 1;
  }

  .demo-page-shell {
    padding: 12px;
  }

  .demo-page-panel {
    min-height: calc(100dvh - 24px);
    padding: 18px;
    border-radius: 20px;
  }

  .demo-stage-frame {
    min-height: 360px;
    padding: 24px 18px;
  }

  .demo-control-grid {
    width: 100%;
  }

  .demo-capture-button {
    width: 100%;
  }

  .gearbox-composition-body {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
  }

  .gearbox-composition {
    padding: 18px;
  }

  .fault-tray-head {
    align-items: start;
    flex-direction: column;
  }

  .fault-tray-head span {
    text-align: left;
  }

  .fault-part-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fault-part-card {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 58px;
  }

  .gearbox-zoom-bridge,
  .gearbox-zoom-arrow,
  .gearbox-zoom-line,
  .gearbox-zoom-line::before,
  .gearbox-zoom-line::after {
    content: none;
    display: none;
  }

  .gearbox-image-card {
    width: min(100%, 420px);
    margin-inline: auto;
    transform: none;
    grid-template-rows: 260px auto auto;
  }

  .gearbox-image-visual {
    height: 260px;
    transform: translateY(-2px);
  }

  .gearbox-image-title {
    margin-top: 0;
  }

  .gearbox-bearing-focus {
    width: 54px;
    height: 54px;
    margin-left: -27px;
    margin-top: -27px;
  }

  .gearbox-housing {
    height: 152px;
    padding: 14px;
  }

  .gearbox-shaft {
    width: 62px;
  }

  .gearbox-composition-copy,
  .gearbox-section-copy {
    max-width: none;
    text-align: left;
  }

  .gearbox-shell {
    width: min(84%, 248px);
  }

  .gearbox-viewport {
    min-height: 300px;
    grid-template-rows: 260px auto;
  }

  .roller-1 { transform: translate(0, -64px); }
  .roller-2 { transform: translate(45px, -45px); }
  .roller-3 { transform: translate(64px, 0); }
  .roller-4 { transform: translate(45px, 45px); }
  .roller-5 { transform: translate(0, 64px); }
  .roller-6 { transform: translate(-45px, 45px); }
  .roller-7 { transform: translate(-64px, 0); }
  .roller-8 { transform: translate(-45px, -45px); }
}

@keyframes gearbox-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bearing-focus-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(31, 122, 89, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.82);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 16px rgba(31, 122, 89, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  }
}

@keyframes scope-error-blink {
  0%, 54% {
    opacity: 1;
  }
  55%, 100% {
    opacity: 0.32;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gearbox-inner,
  .gearbox-rollers,
  .gearbox-gear,
  .gearbox-bearing-focus,
  .wave-error-text {
    animation: none;
  }
}

.remote-api-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.remote-api-entry a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.remote-api-entry a:hover {
  color: #0f3f2d;
}

.api-docs-body {
  min-height: 100dvh;
  background: #ffffff;
}

.api-docs-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 220px auto;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 62px;
  padding: 0 28px;
  border-bottom: 1px solid #e6edf1;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.api-docs-brand {
  color: #102030;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.api-docs-topnav {
  display: inline-flex;
  align-items: center;
  gap: 24px;
}

.api-docs-topnav a,
.api-docs-back {
  color: #4e6173;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.api-docs-topnav a:hover,
.api-docs-back:hover {
  color: #102030;
}

.api-docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 780px);
  gap: 36px;
  width: min(1060px, calc(100% - 44px));
  margin: 0 auto;
  padding: 38px 0 70px;
  align-items: start;
}

.api-docs-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 8px;
  color: #607285;
  font-size: 0.88rem;
}

.api-docs-sidebar p {
  margin: 0 0 8px;
  color: #102030;
  font-size: 0.82rem;
  font-weight: 800;
}

.api-docs-sidebar a {
  padding: 7px 0;
  color: #607285;
  text-decoration: none;
  border-radius: 8px;
}

.api-docs-sidebar a:hover {
  color: #14543d;
}

.api-docs-main {
  min-width: 0;
}

.api-docs-title {
  padding-bottom: 28px;
  border-bottom: 1px solid #e6edf1;
}

.api-docs-kicker,
.api-section-head p {
  margin: 0 0 10px;
  color: #14543d;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.api-docs-title h1 {
  max-width: 720px;
  margin: 0;
  color: #102030;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.api-docs-title > p {
  max-width: 68ch;
  margin: 18px 0 0;
  color: #405366;
  line-height: 1.8;
}

.api-doc-section {
  scroll-margin-top: 86px;
  padding: 34px 0;
  border-bottom: 1px solid #e6edf1;
}

.api-docs-title {
  scroll-margin-top: 86px;
}

#batch,
#examples,
#response {
  padding-top: 15px;
}

.api-key-panel {
  position: static;
  border: 1px solid #dce6eb;
  border-radius: 16px;
  padding: 22px;
  background: #fbfcfd;
}

.api-section-head h2 {
  margin: 0;
  color: #102030;
  font-size: 1.24rem;
  letter-spacing: -0.03em;
}

.api-key-label {
  display: block;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.api-key-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 8px;
}

.api-key-form input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #dbe5ea;
  border-radius: 12px;
  background: #fbfcfd;
  color: #102030;
  font: inherit;
}

.api-key-form input:focus {
  outline: 2px solid rgba(31, 107, 76, 0.18);
  border-color: rgba(31, 107, 76, 0.44);
}

.api-key-form button {
  min-height: 44px;
  border-radius: 12px;
  white-space: nowrap;
}

.api-key-list p {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.api-key-list {
  margin-top: 18px;
}

.api-key-list ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.api-key-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #e1e8ec;
  border-radius: 12px;
  background: #ffffff;
}

.api-key-list li span {
  display: block;
  color: #102030;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-key-list li em {
  display: block;
  margin-top: 4px;
  color: #607285;
  font-family: "Fira Code", monospace;
  font-size: 0.76rem;
  font-style: normal;
  white-space: nowrap;
}

.api-key-delete-button {
  min-height: auto;
  padding: 4px 8px;
  border: 1px solid #ead4cf;
  border-radius: 8px;
  background: #fff7f5;
  color: #9a3412;
  box-shadow: none;
  font-size: 0.74rem;
  font-weight: 700;
}

.api-key-delete-button:not(:disabled):hover {
  background: #fdece8;
  box-shadow: none;
  transform: none;
}

.api-key-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}

.api-key-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(4px);
}

.api-key-modal-panel {
  position: relative;
  z-index: 1;
  width: min(468px, 100%);
  padding: 28px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.api-key-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #263443;
  box-shadow: none;
  font-size: 1.6rem;
  line-height: 1;
}

.api-key-modal-panel h2 {
  margin: 0;
  color: #102030;
  font-size: 1.36rem;
  letter-spacing: -0.03em;
}

.api-key-modal-panel p {
  margin: 18px 0 0;
  color: #69798a;
  line-height: 1.75;
}

.api-key-modal-value {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f1f1f1;
  color: #0f172a;
  font-family: "Fira Code", monospace;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.api-key-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

.api-key-modal-secondary,
.api-key-modal-primary,
.api-key-delete-confirm {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  box-shadow: none;
}

.api-key-modal-secondary {
  border: 0;
  background: transparent;
  color: #102030;
}

.api-key-modal-primary {
  background: #0f172a;
}

.api-key-delete-confirm {
  background: #9a3412;
}

.api-docs-content {
  display: grid;
  gap: 16px;
}

.api-doc-copy {
  margin: 14px 0 0;
  color: #304257;
  line-height: 1.75;
}

.api-doc-section h3 {
  margin: 28px 0 0;
  color: #102030;
  font-size: 1.05rem;
}

.api-doc-section pre {
  margin: 16px 0 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid #dbe5ea;
  border-radius: 12px;
  background: #ffffff;
  color: #102030;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.api-doc-section code {
  display: block;
  font-family: "Fira Code", monospace;
  font-size: 0.86rem;
  line-height: 1.75;
  background: transparent;
}

.api-code-tabs {
  position: relative;
  margin-top: 16px;
}

.api-code-tabbar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 42px;
  border-bottom: 1px solid #e1e8ec;
}

.api-code-tabbar button {
  position: relative;
  min-height: 42px;
  padding: 0 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #405366;
  font-size: 0.95rem;
  font-weight: 800;
}

.api-code-tabbar button:not(:disabled):hover {
  transform: none;
  background: transparent;
  box-shadow: none;
  color: #14543d;
}

.api-code-tabbar button.active {
  color: #14543d;
}

.api-code-tabbar button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: #1f6b4c;
}

.api-code-panel {
  display: none;
}

.api-code-panel.active {
  display: block;
}

.endpoint-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #dbe5ea;
  border-radius: 14px;
  background: #f8faf9;
}

.endpoint-row span {
  padding: 5px 9px;
  border-radius: 8px;
  background: #1f6b4c;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
}

.endpoint-row code {
  min-width: 0;
  color: #102030;
  overflow-wrap: anywhere;
}

.api-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.api-param-grid div {
  padding: 12px;
  border: 1px solid #e1e8ec;
  border-radius: 12px;
  background: #fbfcfd;
}

.api-param-grid dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.api-param-grid dd {
  margin: 6px 0 0;
  color: #102030;
  font-weight: 800;
}

.api-docs-note {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #dce6eb;
  border-radius: 14px;
  background: #f8faf9;
}

.api-docs-note span {
  color: #607285;
  font-size: 0.78rem;
}

.api-docs-note strong {
  display: block;
  margin-top: 4px;
  color: #14543d;
}

.api-docs-note p {
  margin: 8px 0 0;
  color: #607285;
  line-height: 1.6;
  font-weight: 500;
}

@media (max-width: 860px) {
  .api-docs-topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 18px;
  }

  .api-docs-topnav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .api-docs-layout {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 760px);
    padding-top: 26px;
  }

  .api-docs-sidebar,
  .api-docs-toc {
    display: none;
  }

  .api-key-form {
    grid-template-columns: 1fr;
  }

  .panel-footer {
    align-items: flex-start;
  }

  .remote-api-entry {
    white-space: normal;
  }
}



/* ==========================================================================
   Project palette adaptation — preserve the example animation and geometry.
   ========================================================================== */
.demo-page-body {
  --bg: #f5f2ec;
  --surface: #fffefb;
  --surface-muted: #f8f5ef;
  --surface-strong: #ece8df;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.14);
  --frame: rgba(60, 60, 67, 0.18);
  --accent: #66715c;
  --accent-strong: #4f5b49;
  --accent-soft: rgba(102, 113, 92, 0.1);
  --signal-speed: #607987;
  --signal-vibration: #a66f55;
  --shadow: 0 18px 45px rgba(42, 37, 30, 0.08);
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(102, 113, 92, 0.08), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(96, 121, 135, 0.055), transparent 28%),
    linear-gradient(180deg, #f8f6f1, #f5f2ec);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.demo-page-body::after {
  background: rgba(29, 29, 31, 0.42);
}

.demo-page-body .demo-page-panel {
  border-color: rgba(60, 60, 67, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(248, 245, 239, 0.97)),
    radial-gradient(circle at 18% 0%, rgba(102, 113, 92, 0.04), transparent 30%);
  box-shadow: 0 24px 64px rgba(42, 37, 30, 0.09);
}

.demo-page-body .demo-page-head {
  border-color: rgba(60, 60, 67, 0.1);
}

.demo-page-body .demo-page-head h1,
.demo-page-body .demo-stage-head h2,
.demo-page-body .gearbox-composition-head h3,
.demo-page-body .fault-tray-head h4,
.demo-page-body .demo-live-head h3,
.demo-page-body .demo-capture-head h3,
.demo-page-body .gearbox-image-title,
.demo-page-body .gearbox-viewport-title {
  color: var(--ink);
}

.demo-page-body .demo-page-lead,
.demo-page-body .gearbox-composition-copy,
.demo-page-body .fault-tray-head span,
.demo-page-body .demo-detect-panel p,
.demo-page-body .demo-signal-source span,
.demo-page-body .demo-capture-feature {
  color: var(--muted);
}

.demo-page-body .section-kicker,
.demo-page-body .demo-stage-label {
  color: #918d86;
}

.demo-page-body .demo-back-link {
  border-color: rgba(60, 60, 67, 0.14);
  color: #5f5d59;
  background: rgba(255, 254, 251, 0.78);
  box-shadow: 0 1px 2px rgba(42, 37, 30, 0.04);
}

.demo-page-body .demo-back-link:hover {
  border-color: rgba(60, 60, 67, 0.22);
  color: var(--ink);
  background: #fffefb;
}

.demo-page-body .demo-stage-panel {
  border-color: rgba(60, 60, 67, 0.12);
  background: rgba(248, 245, 239, 0.8);
}

.demo-page-body .demo-stage-frame,
.demo-page-body .demo-live-card,
.demo-page-body .demo-capture-card,
.demo-page-body .gearbox-composition,
.demo-page-body .fault-part-tray {
  border-color: rgba(60, 60, 67, 0.12);
  background: #fffefb;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.82);
}

.demo-page-body .demo-detect-panel {
  border-color: rgba(102, 113, 92, 0.18);
  background:
    linear-gradient(90deg, rgba(60, 60, 67, 0.032) 1px, transparent 1px),
    linear-gradient(180deg, rgba(60, 60, 67, 0.032) 1px, transparent 1px),
    linear-gradient(180deg, #fcfbf7, #f2efe8);
  background-size: 18px 18px, 18px 18px, auto;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.82), 0 12px 26px rgba(42, 37, 30, 0.055);
}

.demo-page-body .demo-detect-panel::before {
  background: rgba(102, 113, 92, 0.42);
}

.demo-page-body .demo-capture-button {
  border-color: #1d1d1f;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 44%),
    linear-gradient(180deg, #3a3a3c, #1d1d1f);
  box-shadow: 0 14px 24px rgba(29, 29, 31, 0.16), inset 0 1px rgba(255, 255, 255, 0.16);
}

.demo-page-body .demo-capture-button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 44%),
    linear-gradient(180deg, #474749, #252527);
}

.demo-page-body .signal-tab {
  border-color: rgba(60, 60, 67, 0.14);
  color: #5f5d59;
  background: rgba(118, 118, 128, 0.08);
  box-shadow: none;
}

.demo-page-body .signal-tab.active {
  border-color: rgba(60, 60, 67, 0.16);
  color: var(--ink);
  background: #fffefb;
  box-shadow: 0 1px 5px rgba(42, 37, 30, 0.12), inset 0 1px rgba(255, 255, 255, 0.9);
}

.demo-page-body .demo-wave-plot,
.demo-page-body .demo-capture-plot,
.demo-page-body .demo-capture-empty,
.demo-page-body .gearbox-image-card,
.demo-page-body .gearbox-viewport {
  border-color: rgba(60, 60, 67, 0.12);
  background: #fbfaf6;
}

.demo-page-body .gearbox-reference-image {
  mix-blend-mode: multiply;
  filter: contrast(0.96) drop-shadow(0 12px 18px rgba(42, 37, 30, 0.045));
}

.demo-page-body .gearbox-bearing-focus {
  border-color: rgba(102, 113, 92, 0.86);
  background: rgba(102, 113, 92, 0.045);
  box-shadow: 0 0 0 8px rgba(102, 113, 92, 0.075), inset 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.demo-page-body .gearbox-bearing-focus::before,
.demo-page-body .gearbox-bearing-focus::after {
  background: rgba(102, 113, 92, 0.84);
}

.demo-page-body .fault-part-card {
  border-color: rgba(60, 60, 67, 0.13);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(102, 113, 92, 0.055), transparent 30%),
    #fffefb;
}

.demo-page-body .fault-part-card:hover,
.demo-page-body .fault-part-card:focus-visible {
  border-color: rgba(102, 113, 92, 0.34);
  box-shadow: 0 12px 26px rgba(42, 37, 30, 0.08);
}

.demo-page-body .fault-part-copy em {
  color: #9b5e48;
}

.demo-page-body .normal-part .fault-part-copy em {
  color: var(--accent-strong);
}

.demo-page-body .shape-inner {
  border-color: #56636b;
}

.demo-page-body .shape-outer {
  background: #7a858b;
}

.demo-page-body .shape-roller {
  background: radial-gradient(circle at 35% 30%, #ffffff, #d3d9da 58%, #929d9f);
}

.demo-page-body .shape-broken::after {
  border-color: #b0524d;
}

.demo-page-body .shape-wear::after {
  background: rgba(166, 111, 85, 0.68);
}

.demo-page-body .gearbox-shell.drag-over {
  box-shadow: 0 0 0 10px rgba(102, 113, 92, 0.08);
}

.demo-page-body.demo-drag-focus .gearbox-shell {
  box-shadow: 0 24px 58px rgba(42, 37, 30, 0.22), 0 0 0 12px rgba(102, 113, 92, 0.14);
}

.demo-page-body .legend-focus {
  background: var(--accent);
}

.demo-page-body button:focus-visible,
.demo-page-body a:focus-visible,
.demo-page-body [tabindex]:focus-visible {
  outline-color: rgba(102, 113, 92, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .demo-page-body *,
  .demo-page-body *::before,
  .demo-page-body *::after {
    scroll-behavior: auto !important;
  }
}
