:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef4f2;
  --ink: #152033;
  --muted: #64748b;
  --line: #d7e0ea;
  --teal: #0f766e;
  --teal-2: #115e59;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --blue: #2457a7;
  --shadow: 0 18px 45px rgba(21, 32, 51, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

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

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 16px;
  background: #0f1f2f;
  color: #dce8f5;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.1;
}

.brand strong {
  font-size: 18px;
}

.brand img {
  flex: 0 0 auto;
}

.side-nav nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: #b9c8d8;
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b9c8d8;
  font-size: 13px;
}

.state-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.18);
}

.state-dot.is-set {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.main-view {
  min-width: 0;
  max-width: 100vw;
  padding: 22px;
}

.top-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
}

h1 {
  font-size: 28px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.top-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.contact-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--teal-2);
  background: #e8f5f2;
  border: 1px solid #bfddd7;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.contact-button:hover {
  background: #d9eee9;
  transform: translateY(-1px);
}

.advanced-api {
  position: relative;
}

.advanced-api summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.advanced-api[open] summary {
  border-color: var(--teal);
  color: var(--teal-2);
}

.advanced-api-body {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 20;
  width: min(560px, calc(100vw - 44px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.advanced-api-body .endpoint-field {
  width: 100%;
  box-shadow: none;
}

.advanced-api-body .icon-button {
  grid-column: 2;
}

.endpoint-field {
  width: min(420px, 48vw);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(21, 32, 51, 0.05);
}

.endpoint-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.endpoint-field input::placeholder {
  color: #8a99aa;
}

.key-field {
  width: min(280px, 34vw);
}

.demo-notice {
  position: relative;
  display: grid;
  grid-template-columns: 116px minmax(280px, 1fr) minmax(420px, 0.95fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid #c6d7e6;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36, 87, 167, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, #fbfdff 0%, #eef6fb 58%, #eef8f4 100%);
  background-size: 44px 44px, 44px 44px, auto;
  box-shadow: 0 16px 38px rgba(21, 32, 51, 0.08);
}

.demo-notice::before {
  position: absolute;
  inset: 0;
  width: 36%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.54), transparent);
  transform: translateX(-120%);
  animation: noticeScan 7s ease-in-out infinite;
  pointer-events: none;
}

.notice-signal {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border: 1px solid #c6d7e6;
  border-radius: var(--radius);
  background: #102235;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.notice-signal::before,
.notice-signal::after,
.notice-signal span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, #73d3c6 24%, #9ec5ff 52%, #f6c177 76%, transparent);
  opacity: 0.72;
}

.notice-signal::before {
  top: 26px;
  transform: skewY(-4deg);
}

.notice-signal::after {
  bottom: 26px;
  transform: skewY(4deg);
}

.notice-signal span:nth-child(1) {
  top: 46px;
}

.notice-signal span:nth-child(2) {
  top: 62px;
  opacity: 0.46;
}

.notice-signal span:nth-child(3) {
  top: 80px;
}

.notice-copy {
  position: relative;
  display: grid;
  align-content: center;
  gap: 7px;
}

.notice-copy h2 {
  max-width: 720px;
  font-size: 21px;
}

.notice-copy p:last-child {
  max-width: 760px;
  margin: 0;
  color: #40536c;
  line-height: 1.5;
}

.notice-status-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.notice-status {
  min-width: 0;
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 13px;
  color: #24364d;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(174, 196, 217, 0.82);
  border-radius: var(--radius);
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.notice-status svg {
  color: var(--teal);
}

.notice-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.notice-status strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.notice-link:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

@keyframes noticeScan {
  0%,
  64% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(320%);
  }
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 58px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid #c9d4e1;
  border-radius: 999px;
  color: #415269;
  background: #f7fafc;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.panel-head .pill {
  max-width: 100%;
}

.pill-good {
  color: #14532d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(420px, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.workspace-grid > *,
.lower-grid > * {
  min-width: 0;
}

.upload-panel {
  display: flex;
  flex-direction: column;
}

.drop-zone {
  margin: 8px 18px 16px;
  min-height: 182px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 20px;
  border: 1.5px dashed #9fb2c7;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36, 87, 167, 0.08) 1px, transparent 1px),
    #fbfdff;
  background-size: 28px 28px;
  cursor: pointer;
  text-align: center;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--teal);
  background-color: #f2fbf9;
}

.drop-zone input,
.sidecar-input input,
.secondary-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--teal);
  background: #e8f5f2;
  border: 1px solid #c4dfd9;
}

.drop-icon svg {
  width: 26px;
  height: 26px;
}

.drop-title {
  font-size: 18px;
  font-weight: 800;
}

.drop-meta {
  max-width: 32rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.field-grid,
.sidecar-grid {
  display: grid;
  gap: 12px;
  padding: 0 18px;
}

.field-grid {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}

.field-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field-grid select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid #cbd7e5;
  border-radius: var(--radius);
}

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

.sidecar-input {
  position: relative;
  min-height: 84px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 5px;
  padding: 12px;
  border: 1px solid #cbd7e5;
  border-radius: var(--radius);
  background: #fbfdff;
  cursor: pointer;
}

.sidecar-input:hover {
  border-color: var(--teal);
}

.sidecar-input svg {
  color: var(--blue);
}

.sidecar-input span {
  font-weight: 800;
}

.sidecar-input small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 18px 0;
}

.format-strip span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  color: #415269;
  background: #f8fbfd;
  font-size: 12px;
  font-weight: 700;
}

.form-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 18px;
}

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.primary-button {
  min-height: 44px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--teal);
}

.primary-button:hover {
  background: var(--teal-2);
  transform: translateY(-1px);
}

.secondary-button {
  position: relative;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: #f8fbfd;
  border-color: #cbd7e5;
  text-decoration: none;
}

.secondary-button:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.icon-button {
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.icon-button:hover {
  border-color: var(--teal);
  color: var(--teal-2);
  transform: translateY(-1px);
}

.visual-panel {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

#signal-canvas {
  width: calc(100% - 36px);
  height: auto;
  aspect-ratio: 2.1 / 1;
  margin: 8px 18px 14px;
  display: block;
  border: 1px solid #cbd7e5;
  border-radius: var(--radius);
  background: #102235;
}

.visual-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.visual-stats div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 16px;
  background: #fbfdff;
}

.visual-stats span {
  overflow: hidden;
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-stats small {
  color: var(--muted);
}

.lower-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(420px, 1fr) minmax(300px, 0.72fr);
  gap: 18px;
  align-items: stretch;
}

.job-list,
.download-list,
.decision-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.job-row,
.download-row,
.decision-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: var(--radius);
  background: #fbfdff;
}

.job-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.job-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--blue);
  background: #eaf1fb;
}

.job-row strong,
.download-row strong,
.decision-row strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-row small,
.download-row small,
.decision-row small {
  color: var(--muted);
}

.status-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-enhanced {
  color: #14532d;
  background: #dcfce7;
}

.status-review {
  color: #78350f;
  background: #fef3c7;
}

.status-no-safe-improvement,
.status-error {
  color: #7f1d1d;
  background: #fee2e2;
}

.status-waiting,
.status-running {
  color: #1e3a8a;
  background: #dbeafe;
}

.result-message {
  min-height: 62px;
  margin: 0 18px 14px;
  padding: 12px;
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #eff6ff;
  color: #26384f;
  line-height: 1.45;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 18px 16px;
}

.metric-tile {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 13px;
  border: 1px solid #d9e2ec;
  border-radius: var(--radius);
  background: #fbfdff;
}

.metric-tile small,
.metric-tile span {
  color: var(--muted);
}

.metric-tile strong {
  font-size: 26px;
  line-height: 1.1;
}

.download-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.download-row a,
.download-row button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: #ffffff;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.download-row a:hover,
.download-row button:hover {
  background: #1d4a8f;
}

.control-band {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: 0 12px 28px rgba(21, 32, 51, 0.06);
}

.control-band div {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  color: #2b3d52;
  font-weight: 800;
}

.control-band svg {
  color: var(--teal);
  flex: 0 0 auto;
}

.control-band a {
  color: var(--teal-2);
  font-weight: 900;
  text-decoration: none;
}

.control-band a:hover {
  text-decoration: underline;
}

.doc-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.doc-nav .brand {
  color: var(--ink);
}

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  color: var(--teal-2);
  background: #e8f5f2;
  border: 1px solid #bfddd7;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 800;
}

.doc-hero {
  display: grid;
  gap: 10px;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--line);
}

.doc-hero h1 {
  max-width: 800px;
  font-size: 38px;
}

.doc-hero p {
  max-width: 820px;
  margin: 0;
  color: #40536c;
  font-size: 17px;
  line-height: 1.55;
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 0.45fr);
  gap: 22px;
  margin-top: 24px;
  align-items: start;
}

.doc-section {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.doc-section h2 {
  font-size: 24px;
}

.doc-section p,
.doc-section li {
  color: #334155;
  line-height: 1.58;
}

.doc-section ul,
.doc-section ol {
  margin: 0;
  padding-left: 22px;
}

.doc-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(21, 32, 51, 0.06);
}

.doc-card h3 {
  margin: 0 0 8px;
}

.doc-card p {
  margin: 0;
}

.doc-image {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.metric-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.metric-table th,
.metric-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.metric-table th {
  background: #f1f5f9;
  color: #1e293b;
}

.metric-table tr:last-child td {
  border-bottom: 0;
}

.notice-box {
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #effaf7;
}

.doc-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .brand span,
  .nav-link span,
  .nav-footer span:not(.state-dot) {
    display: none;
  }

  .brand,
  .nav-link {
    justify-content: center;
  }

  .workspace-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .demo-notice {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .notice-status-grid {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .doc-shell {
    padding: 18px 14px;
  }

  .doc-hero h1 {
    font-size: 28px;
  }

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

  .app-shell {
    display: block;
  }

  .side-nav {
    position: static;
    height: auto;
    max-width: 100vw;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
  }

  .side-nav nav {
    display: flex;
    gap: 8px;
  }

  .nav-footer {
    margin-left: auto;
    margin-top: 0;
  }

  .main-view {
    width: 100%;
    max-width: 100vw;
    padding: 14px;
  }

  .workspace-grid,
  .lower-grid,
  .control-band {
    max-width: 100%;
  }

  .panel-head {
    align-items: flex-start;
  }

  .upload-panel .pill {
    display: none;
  }

  .drop-meta {
    max-width: 260px;
  }

  .top-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .endpoint-field,
  .advanced-api {
    width: 100%;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .contact-button {
    width: 100%;
  }

  .advanced-api summary {
    width: 100%;
    justify-content: center;
  }

  .advanced-api-body {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .advanced-api-body .endpoint-field {
    min-width: 0;
    padding-right: 12px;
  }

  .advanced-api-body .icon-button {
    justify-self: end;
  }

  .field-grid,
  .sidecar-grid,
  .metric-grid,
  .visual-stats,
  .control-band,
  .demo-notice,
  .notice-status-grid {
    grid-template-columns: 1fr;
  }

  .demo-notice {
    padding: 12px;
  }

  .notice-signal {
    min-height: 84px;
  }

  .notice-copy h2 {
    font-size: 18px;
  }

  .notice-status {
    min-height: 86px;
  }

  .form-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  h1 {
    font-size: 24px;
  }
}

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

  .demo-notice::before,
  .notice-link:hover {
    animation: none;
    transform: none;
  }
}
