/* Strategy Research Workbench — isolated front-end prototype */
.rw-app {
  --rw-bg: #0a0e17;
  --rw-surface: #0f172a;
  --rw-surface-2: #111827;
  --rw-surface-3: #1e293b;
  --rw-text: #e8eef7;
  --rw-muted: #a8b6c9;
  --rw-faint: #91a3bc;
  --rw-border: #2b3a53;
  --rw-border-strong: #7186a3;
  --rw-accent: #75a7ff;
  --rw-accent-strong: #9bc0ff;
  --rw-accent-bg: #17335f;
  --rw-positive: #7dd3a7;
  --rw-positive-bg: #12372a;
  --rw-caution: #f3c66d;
  --rw-caution-bg: #3a2b12;
  --rw-danger: #ff9eaa;
  --rw-danger-bg: #411d27;
  --rw-focus: #b8d3ff;
  --rw-shadow: 0 14px 38px rgba(1, 8, 19, .26);
  width: 100%;
  height: 100vh;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--rw-text);
  background: var(--rw-bg);
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

body.light-theme .rw-app {
  --rw-bg: #f3f6fa;
  --rw-surface: #ffffff;
  --rw-surface-2: #f7f9fc;
  --rw-surface-3: #edf2f8;
  --rw-text: #172238;
  --rw-muted: #52627a;
  --rw-faint: #5d6e85;
  --rw-border: #d7e0eb;
  --rw-border-strong: #70829c;
  --rw-accent: #255db5;
  --rw-accent-strong: #194b99;
  --rw-accent-bg: #e6effd;
  --rw-positive: #12633e;
  --rw-positive-bg: #e2f4e9;
  --rw-caution: #845600;
  --rw-caution-bg: #fff0c9;
  --rw-danger: #a1263b;
  --rw-danger-bg: #fee9ec;
  --rw-focus: #184f9f;
  --rw-shadow: 0 14px 38px rgba(31, 50, 76, .11);
}

.rw-app *, .rw-app *::before, .rw-app *::after { box-sizing: border-box; }
.rw-app ::selection { color: #081222; background: #a8c9ff; }
.rw-app button, .rw-app input, .rw-app select, .rw-app textarea { font: inherit; }
.rw-app button, .rw-app summary, .rw-app select, .rw-app input[type="range"] { cursor: pointer; }
.rw-app button:disabled { cursor: not-allowed; opacity: .5; }
body:not(.light-theme) .rw-app button:disabled { opacity: .68; }
.rw-app :where(button, input, select, textarea, summary, [tabindex="0"]):focus-visible {
  outline: 3px solid var(--rw-focus);
  outline-offset: 3px;
}
.rw-app :where(h1, h2, h3, p, dl, dd, ul, figure) { margin-top: 0; }
.rw-app svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rw-app time, .rw-number, .rw-detail-metrics dd, .rw-context strong, .rw-ab-board { font-variant-numeric: tabular-nums; }
.rw-app a { color: var(--rw-accent-strong); text-underline-offset: 3px; }
.rw-app select, .rw-app input, .rw-app textarea {
  color: var(--rw-text);
  background: var(--rw-surface-2);
  border: 1px solid var(--rw-border-strong);
  border-radius: 8px;
}
.rw-app input::placeholder, .rw-app textarea::placeholder { color: var(--rw-faint); opacity: 1; }

.rw-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.rw-skip {
  position: fixed;
  z-index: 10000;
  top: 10px;
  left: 258px;
  padding: 10px 14px;
  color: #07111f !important;
  background: #d8e7ff;
  border-radius: 8px;
  box-shadow: var(--rw-shadow);
  transform: translateY(-180%);
  transition: transform 140ms ease-out;
}
.rw-skip:focus { transform: translateY(0); }

.rw-header {
  min-height: 78px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--rw-border);
  background: var(--rw-surface);
}
.rw-title-block { min-width: 0; }
.rw-title-block h1 { margin-bottom: 2px; font-size: clamp(21px, 2vw, 27px); line-height: 1.25; letter-spacing: -.025em; }
.rw-title-row { display: flex; align-items: center; gap: 9px; margin-bottom: 2px; }
.rw-title-row h1 { margin-bottom: 0; }
.rw-beta {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  color: var(--rw-accent-strong);
  background: var(--rw-accent-bg);
  border: 1px solid var(--rw-accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}
.rw-title-block p { margin-bottom: 0; color: var(--rw-muted); font-size: 13px; }
.rw-header-meta { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.rw-prototype, .rw-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}
.rw-prototype { color: var(--rw-accent-strong); background: var(--rw-accent-bg); }
.rw-prototype span, .rw-state > span, .rw-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.rw-a11y-note { position: relative; }
.rw-a11y-note summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  color: var(--rw-muted);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
.rw-a11y-note[open] summary { color: var(--rw-text); background: var(--rw-surface-2); }
.rw-a11y-note p {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 32px));
  margin: 0;
  padding: 14px;
  color: var(--rw-text);
  background: var(--rw-surface);
  border: 1px solid var(--rw-border-strong);
  border-radius: 10px;
  box-shadow: var(--rw-shadow);
  font-size: 13px;
}

.rw-sections {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-height: 48px;
  padding: 0 24px;
  overflow-x: auto;
  border-bottom: 1px solid var(--rw-border);
  background: var(--rw-surface);
  scrollbar-width: thin;
  scrollbar-color: var(--rw-border-strong) transparent;
}
.rw-sections button {
  position: relative;
  min-width: max-content;
  min-height: 44px;
  padding: 0 14px;
  color: var(--rw-muted);
  background: transparent;
  border: 0;
  font-weight: 700;
}
.rw-sections button:hover { color: var(--rw-text); background: var(--rw-surface-2); }
.rw-sections button.is-active { color: var(--rw-accent-strong); }
.rw-sections button.is-active::after { content: ""; position: absolute; right: 12px; bottom: 0; left: 12px; height: 2px; background: var(--rw-accent); }

.rw-context {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) repeat(3, minmax(145px, 1fr)) minmax(150px, .8fr);
  gap: 0;
  border-bottom: 1px solid var(--rw-border);
  background: var(--rw-surface-2);
}
.rw-context > * { min-width: 0; min-height: 64px; padding: 9px 16px; border-right: 1px solid var(--rw-border); }
.rw-context > *:last-child { border-right: 0; }
.rw-context label, .rw-context div { display: flex; flex-direction: column; justify-content: center; gap: 2px; margin: 0; color: var(--rw-faint); font-size: 11px; font-weight: 700; }
.rw-context select { width: 100%; min-height: 34px; padding: 4px 30px 4px 8px; }
.rw-context strong { overflow: hidden; color: var(--rw-text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.rw-context .rw-data-state { display: grid; grid-template-columns: 10px 1fr; align-content: center; column-gap: 7px; }
.rw-data-state .rw-dot { grid-row: 1 / 3; align-self: center; color: var(--rw-caution); }
.rw-data-state small { color: var(--rw-muted); font-size: 11px; }

.rw-view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scroll-padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--rw-border-strong) transparent;
}
.rw-view::-webkit-scrollbar { width: 10px; height: 10px; }
.rw-view::-webkit-scrollbar-thumb { background: var(--rw-border-strong); border: 2px solid var(--rw-bg); border-radius: 10px; }
.rw-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.rw-section-head h2 { margin-bottom: 4px; color: var(--rw-text); font-size: 20px; letter-spacing: -.02em; }
.rw-section-head p { margin-bottom: 0; color: var(--rw-muted); font-size: 13px; }
.rw-section-head > span { flex: 0 0 auto; color: var(--rw-muted); font-size: 13px; font-weight: 700; }

.rw-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid var(--rw-border-strong);
  font-size: 13px;
  font-weight: 800;
}
.rw-button-primary { color: #07111f; background: #9bc0ff; border-color: #9bc0ff; }
body.light-theme .rw-button-primary { color: #fff; background: #255db5; border-color: #255db5; }
.rw-button-primary:hover:not(:disabled) { filter: brightness(1.07); }
.rw-text-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  color: var(--rw-accent-strong);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}
.rw-text-button:hover { background: var(--rw-accent-bg); }
.rw-text-button svg { width: 16px; height: 16px; }

/* Workbench */
.rw-dashboard { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; padding: 28px; }
.rw-desk { min-width: 0; }
.rw-review-list { border-top: 1px solid var(--rw-border); }
.rw-review-list > button {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  color: var(--rw-text);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rw-border);
}
.rw-review-list > button:hover { background: var(--rw-surface-2); }
.rw-review-list > button > svg { color: var(--rw-faint); }
.rw-review-list button span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rw-review-list strong { font-size: 14px; }
.rw-review-list small { color: var(--rw-muted); font-size: 12px; }
.rw-review-list time { color: var(--rw-faint); font-size: 12px; }
.rw-review-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; }
.rw-review-icon svg { width: 17px; height: 17px; }
.rw-review-warn { color: var(--rw-caution); background: var(--rw-caution-bg); }
.rw-review-info { color: var(--rw-accent-strong); background: var(--rw-accent-bg); }
.rw-review-pending { color: var(--rw-muted); background: var(--rw-surface-3); }
.rw-mandate { align-self: start; padding: 22px; background: var(--rw-surface); box-shadow: var(--rw-shadow); border-radius: 12px; }
.rw-mandate h2 { margin-bottom: 18px; color: var(--rw-muted); font-size: 13px; }
.rw-mandate > strong { display: block; margin-bottom: 7px; font-size: 19px; }
.rw-mandate > p { color: var(--rw-muted); font-size: 13px; }
.rw-mandate dl { margin: 22px 0; padding: 12px 0; border-top: 1px solid var(--rw-border); border-bottom: 1px solid var(--rw-border); }
.rw-mandate dl div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 12px; }
.rw-mandate dt { color: var(--rw-faint); }
.rw-mandate dd { margin: 0; text-align: right; }

/* Strategy library */
.rw-library { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.rw-catalog { min-width: 0; padding: 24px 26px 90px; }
.rw-detail { min-width: 0; padding: 24px; border-left: 1px solid var(--rw-border); background: var(--rw-surface); }
.rw-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.rw-search { position: relative; width: min(340px, 100%); margin: 0; }
.rw-search svg { position: absolute; top: 50%; left: 12px; width: 17px; height: 17px; color: var(--rw-faint); transform: translateY(-50%); pointer-events: none; }
.rw-search input { min-height: 42px; padding: 8px 12px 8px 39px; }
.rw-filter-chips { display: flex; gap: 5px; overflow-x: auto; }
.rw-filter-chips button {
  min-width: max-content;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--rw-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.rw-filter-chips button:hover { color: var(--rw-text); background: var(--rw-surface-2); }
.rw-filter-chips button.is-active { color: var(--rw-accent-strong); background: var(--rw-accent-bg); border-color: var(--rw-accent); }
.rw-table-scroll { max-width: 100%; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--rw-border-strong) transparent; }
.rw-table-scroll:focus-visible { outline-offset: 2px; }
.rw-table-scroll table { width: 100%; border-collapse: collapse; }
.rw-scroll-hint { display: none; margin: -4px 0 8px; color: var(--rw-faint); font-size: 11px; }
.rw-strategy-table { min-width: 780px; }
.rw-strategy-table th, .rw-strategy-table td { padding: 11px 7px; border-bottom: 1px solid var(--rw-border); text-align: left; vertical-align: middle; }
.rw-strategy-table thead th { position: sticky; z-index: 1; top: 0; color: var(--rw-faint); background: var(--rw-bg); font-size: 11px; font-weight: 800; white-space: nowrap; }
.rw-strategy-table tbody tr:hover, .rw-strategy-table tbody tr.is-current { background: var(--rw-surface-2); }
.rw-strategy-table tbody tr.is-current .rw-strategy-link strong { color: var(--rw-accent-strong); }
.rw-select-cell { width: 40px; }
.rw-select-cell label { width: 36px; min-height: 38px; display: grid; place-items: center; margin: 0; }
.rw-select-cell input { width: 18px; height: 18px; accent-color: var(--rw-accent); }
.rw-strategy-link { min-height: 42px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0; color: var(--rw-text); text-align: left; background: transparent; border: 0; border-radius: 5px; }
.rw-strategy-link strong { font-size: 13px; }
.rw-strategy-link span { color: var(--rw-muted); font-size: 11px; font-weight: 500; }
.rw-strategy-table td { color: var(--rw-muted); font-size: 12px; }
.rw-strategy-table .rw-number { color: var(--rw-text); text-align: right; white-space: nowrap; }
.rw-state { border: 1px solid currentColor; }
.rw-state-review { color: var(--rw-positive); background: var(--rw-positive-bg); }
.rw-state-caution { color: var(--rw-caution); background: var(--rw-caution-bg); }
.rw-state-blocked { color: var(--rw-danger); background: var(--rw-danger-bg); }
.rw-compare-bar {
  position: sticky;
  z-index: 3;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 11px 12px 11px 16px;
  background: var(--rw-surface);
  border: 1px solid var(--rw-border-strong);
  border-radius: 12px;
  box-shadow: var(--rw-shadow);
}
.rw-compare-bar > div { min-width: 0; display: flex; flex-direction: column; }
.rw-compare-bar strong { font-size: 13px; }
.rw-compare-bar span { overflow: hidden; color: var(--rw-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rw-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.rw-detail-head > div > span { color: var(--rw-faint); font-size: 11px; font-weight: 800; }
.rw-detail-head h2 { margin: 3px 0 0; font-size: 21px; }
.rw-hypothesis { margin-bottom: 20px; color: var(--rw-muted); font-size: 13px; }
.rw-detail-metrics { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 20px; border-top: 1px solid var(--rw-border); border-bottom: 1px solid var(--rw-border); }
.rw-detail-metrics div { padding: 12px 0; }
.rw-detail-metrics div:nth-child(odd) { padding-right: 14px; border-right: 1px solid var(--rw-border); }
.rw-detail-metrics div:nth-child(even) { padding-left: 14px; }
.rw-detail-metrics div:nth-child(-n+2) { border-bottom: 1px solid var(--rw-border); }
.rw-detail-metrics dt { color: var(--rw-faint); font-size: 11px; }
.rw-detail-metrics dd { margin: 4px 0 0; font-size: 17px; font-weight: 800; }
.rw-evidence-block { margin: 0 0 10px; padding: 13px; background: var(--rw-surface-2); border-radius: 9px; }
.rw-evidence-block h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font-size: 12px; }
.rw-evidence-block h3 svg { width: 16px; height: 16px; color: var(--rw-positive); }
.rw-evidence-block p { margin: 0; color: var(--rw-muted); font-size: 12px; }
.rw-evidence-risk h3 svg { color: var(--rw-caution); }
.rw-evidence-more { margin: 14px 0; border-top: 1px solid var(--rw-border); border-bottom: 1px solid var(--rw-border); }
.rw-evidence-more summary, .rw-data-disclosure summary { min-height: 42px; display: flex; align-items: center; color: var(--rw-accent-strong); font-size: 12px; font-weight: 800; }
.rw-evidence-more dl { margin: 0; padding-bottom: 12px; }
.rw-evidence-more dl div { margin-bottom: 9px; }
.rw-evidence-more dt { color: var(--rw-faint); font-size: 11px; }
.rw-evidence-more dd { margin: 2px 0 0; color: var(--rw-muted); font-size: 12px; }
.rw-next { margin-bottom: 16px; }
.rw-next span { color: var(--rw-faint); font-size: 11px; font-weight: 800; }
.rw-next p { margin: 3px 0 0; font-size: 13px; }
.rw-detail > .rw-button { width: 100%; }

/* Compare */
.rw-compare-view, .rw-experiment, .rw-records { padding: 26px 28px 42px; }
.rw-compare-summary { margin: 2px 0 22px; padding: 16px 18px; background: var(--rw-accent-bg); border-radius: 10px; }
.rw-compare-summary strong { display: block; margin-bottom: 4px; color: var(--rw-accent-strong); }
.rw-compare-summary p { margin: 0; color: var(--rw-text); font-size: 13px; }
.rw-compare-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(390px, .75fr); gap: 22px; align-items: start; }
.rw-chart { min-width: 0; margin-bottom: 0; padding: 18px; background: var(--rw-surface); border-radius: 12px; box-shadow: var(--rw-shadow); }
.rw-chart figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.rw-chart figcaption strong { font-size: 14px; }
.rw-chart figcaption span { color: var(--rw-faint); font-size: 11px; }
.rw-chart > svg { width: 100%; height: 230px; overflow: visible; }
.rw-chart-grid { fill: none; stroke: var(--rw-border); stroke-width: 1; }
.rw-chart-line { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; }
.rw-line-baseline { stroke: var(--rw-faint); }
.rw-line-1 { stroke: #75a7ff; }
.rw-line-2 { stroke: #f1c56b; }
.rw-line-3 { stroke: #7dd3a7; }
body.light-theme .rw-line-1 { stroke: #255db5; }
body.light-theme .rw-line-2 { stroke: #9a6200; }
body.light-theme .rw-line-3 { stroke: #187149; }
.rw-chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; color: var(--rw-muted); font-size: 11px; }
.rw-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rw-chart-legend i { width: 20px; height: 3px; display: block; background: currentColor; }
.rw-chart-legend .rw-line-baseline { color: var(--rw-faint); }
.rw-chart-legend .rw-line-1 { color: #75a7ff; }
.rw-chart-legend .rw-line-2 { color: #f1c56b; background-image: linear-gradient(90deg, currentColor 50%, transparent 50%); background-size: 6px 3px; }
.rw-chart-legend .rw-line-3 { color: #7dd3a7; }
body.light-theme .rw-chart-legend .rw-line-1 { color: #255db5; }
body.light-theme .rw-chart-legend .rw-line-2 { color: #9a6200; }
body.light-theme .rw-chart-legend .rw-line-3 { color: #187149; }
.rw-data-disclosure { margin-top: 10px; border-top: 1px solid var(--rw-border); }
.rw-data-disclosure table { min-width: 420px; font-size: 12px; }
.rw-data-disclosure th, .rw-data-disclosure td { padding: 7px 9px; border-bottom: 1px solid var(--rw-border); text-align: right; }
.rw-data-disclosure th:first-child { text-align: left; }
.rw-metric-table { min-width: 520px; background: var(--rw-surface); }
.rw-metric-table th, .rw-metric-table td { padding: 12px 13px; border-bottom: 1px solid var(--rw-border); text-align: right; font-size: 12px; }
.rw-metric-table th:first-child { text-align: left; }
.rw-metric-table thead th { color: var(--rw-muted); background: var(--rw-surface-2); }
.rw-metric-table tbody th { color: var(--rw-muted); font-weight: 600; }
.rw-decision-form { display: grid; grid-template-columns: minmax(190px, .7fr) 145px minmax(280px, 1.5fr) 170px auto; gap: 13px; align-items: end; margin-top: 24px; padding: 18px; background: var(--rw-surface); border-radius: 12px; box-shadow: var(--rw-shadow); }
.rw-decision-form h3 { margin-bottom: 3px; font-size: 15px; }
.rw-decision-form p { margin: 0; color: var(--rw-faint); font-size: 11px; }
.rw-decision-form label { display: flex; flex-direction: column; gap: 6px; margin: 0; color: var(--rw-muted); font-size: 11px; font-weight: 800; }
.rw-decision-form select, .rw-decision-form input, .rw-decision-form textarea { min-height: 42px; padding: 8px 10px; resize: vertical; }

/* Experiment */
.rw-experiment-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px; }
.rw-experiment-controls { padding-right: 24px; border-right: 1px solid var(--rw-border); }
.rw-experiment-controls > h3 { margin-bottom: 5px; font-size: 17px; }
.rw-experiment-controls > p { color: var(--rw-muted); font-size: 12px; }
.rw-experiment-controls > label { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 24px 0 20px; color: var(--rw-text); font-size: 13px; }
.rw-experiment-controls output { color: var(--rw-accent-strong); font-weight: 800; }
.rw-experiment-controls input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--rw-accent); }
.rw-experiment-controls fieldset { margin: 0; padding: 14px; border: 1px solid var(--rw-border); border-radius: 9px; }
.rw-experiment-controls legend { padding: 0 5px; color: var(--rw-muted); font-size: 12px; font-weight: 800; }
.rw-experiment-controls fieldset label { min-height: 36px; display: flex; align-items: center; gap: 8px; margin: 0; color: var(--rw-text); font-size: 12px; }
.rw-experiment-controls fieldset input { width: 18px; height: 18px; accent-color: var(--rw-accent); }
.rw-experiment-warning { display: flex; gap: 10px; margin-top: 18px; padding: 13px; color: var(--rw-caution); background: var(--rw-caution-bg); border-radius: 9px; }
.rw-experiment-warning svg { flex: 0 0 auto; margin-top: 2px; }
.rw-experiment-warning p { margin: 0; color: var(--rw-text); font-size: 12px; }
.rw-experiment-warning strong { display: block; color: var(--rw-caution); }
.rw-ab-board { background: var(--rw-surface); border-radius: 12px; box-shadow: var(--rw-shadow); overflow: hidden; }
.rw-ab-table { min-width: 560px; }
.rw-ab-table caption { padding: 13px 18px; color: var(--rw-muted); text-align: left; font-size: 12px; font-weight: 700; }
.rw-ab-table th, .rw-ab-table td { min-height: 52px; padding: 14px 18px; border-bottom: 1px solid var(--rw-border); text-align: right; }
.rw-ab-table thead th { color: var(--rw-faint); background: var(--rw-surface-2); font-size: 11px; font-weight: 800; white-space: nowrap; }
.rw-ab-table th:first-child { text-align: left; }
.rw-ab-table tbody th { color: var(--rw-text); font-size: 13px; }
.rw-ab-table tbody td { color: var(--rw-muted); }
.rw-ab-table em { color: var(--rw-accent-strong); font-style: normal; font-weight: 800; }
.rw-ab-board > section { padding: 18px; }
.rw-ab-board > section h3 { margin-bottom: 8px; font-size: 14px; }
.rw-ab-board > section ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; margin: 0; padding-left: 18px; color: var(--rw-muted); font-size: 12px; }
.rw-ab-board > .rw-button { margin: 0 18px 18px; }

/* Records and empty states */
.rw-records { max-width: 960px; margin: 0 auto; }
.rw-record { position: relative; padding: 19px 20px; border-top: 1px solid var(--rw-border); }
.rw-record:last-of-type { border-bottom: 1px solid var(--rw-border); }
.rw-record-example { background: var(--rw-surface-2); border-radius: 10px 10px 0 0; }
.rw-record-status { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--rw-faint); font-size: 11px; font-weight: 800; }
.rw-record h3 { margin-bottom: 5px; font-size: 16px; }
.rw-record > p { max-width: 74ch; margin-bottom: 14px; color: var(--rw-muted); font-size: 13px; }
.rw-record dl { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.rw-record dl div { display: flex; gap: 7px; font-size: 11px; }
.rw-record dt { color: var(--rw-faint); }
.rw-record dd { margin: 0; }
.rw-delete { margin-top: 10px; color: var(--rw-danger); }
.rw-record-empty { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 20px; color: var(--rw-muted); }
.rw-record-empty p { margin: 0; }
.rw-empty { max-width: 520px; margin: 9vh auto 0; padding: 32px; text-align: center; }
.rw-empty-mark { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 16px; color: var(--rw-faint); background: var(--rw-surface-2); border-radius: 50%; font-size: 24px; }
.rw-empty h2 { margin-bottom: 7px; font-size: 20px; }
.rw-empty p { margin-bottom: 18px; color: var(--rw-muted); }

@media (max-width: 1220px) {
  .rw-library { grid-template-columns: minmax(600px, 1fr) 320px; }
  .rw-context { grid-template-columns: 190px repeat(3, minmax(130px, 1fr)); }
  .rw-context .rw-data-state { display: none; }
  .rw-compare-grid { grid-template-columns: 1fr; }
  .rw-decision-form { grid-template-columns: 1fr 1fr; }
  .rw-decision-form > div, .rw-decision-form label:nth-of-type(2) { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .rw-app { height: auto; min-height: 100vh; overflow: visible; }
  .rw-view { overflow: visible; }
  .rw-header { padding: 14px 18px; }
  .rw-sections { padding: 0 12px; }
  .rw-context { grid-template-columns: 1fr 1fr; }
  .rw-context > * { border-bottom: 1px solid var(--rw-border); }
  .rw-context > *:nth-child(even) { border-right: 0; }
  .rw-context .rw-data-state { display: grid; }
  .rw-library { display: block; }
  .rw-catalog { padding: 22px 18px 24px; }
  .rw-detail { border-top: 1px solid var(--rw-border); border-left: 0; }
  .rw-dashboard { grid-template-columns: 1fr; padding: 22px 18px; }
  .rw-mandate { order: -1; }
  .rw-experiment-layout { grid-template-columns: 1fr; }
  .rw-experiment-controls { padding: 0 0 22px; border-right: 0; border-bottom: 1px solid var(--rw-border); }
}

@media (max-width: 720px) {
  .rw-skip { left: 12px; }
  .rw-header { align-items: flex-start; }
  .rw-title-block p { max-width: 34ch; }
  .rw-header-meta { align-items: flex-end; flex-direction: column; gap: 2px; }
  .rw-prototype { min-height: 26px; font-size: 11px; }
  .rw-a11y-note summary { min-height: 36px; padding: 5px; }
  .rw-context { grid-template-columns: 1fr; }
  .rw-context > * { min-height: 54px; border-right: 0; }
  .rw-context > div:not(.rw-data-state) { display: none; }
  .rw-filters { align-items: stretch; flex-direction: column; }
  .rw-search { width: 100%; }
  .rw-filter-chips { padding-bottom: 4px; }
  .rw-catalog, .rw-detail, .rw-compare-view, .rw-experiment, .rw-records { padding-right: 14px; padding-left: 14px; }
  .rw-review-list > button { grid-template-columns: 34px minmax(0, 1fr) 16px; }
  .rw-review-list time { display: none; }
  .rw-compare-bar { align-items: stretch; flex-direction: column; bottom: 8px; }
  .rw-compare-bar { position: static; }
  .rw-compare-bar .rw-button { width: 100%; }
  .rw-detail-head { flex-direction: column; }
  .rw-chart { padding: 13px; }
  .rw-chart > svg { height: 190px; }
  .rw-chart figcaption { align-items: flex-start; flex-direction: column; gap: 2px; }
  .rw-decision-form { grid-template-columns: 1fr; padding: 14px; }
  .rw-decision-form > div, .rw-decision-form label:nth-of-type(2) { grid-column: auto; }
  .rw-scroll-hint { display: block; }
  .rw-ab-board > section ul { grid-template-columns: 1fr; }
  .rw-record-empty { align-items: stretch; flex-direction: column; }
}

@media (max-width: 430px) {
  .rw-header { flex-direction: column; gap: 8px; }
  .rw-header-meta { width: 100%; align-items: center; flex-direction: row; justify-content: space-between; }
  .rw-a11y-note p { right: -2px; }
  .rw-title-block h1 { font-size: 21px; }
  .rw-sections button { padding: 0 11px; }
  .rw-detail-metrics { grid-template-columns: 1fr; }
  .rw-detail-metrics div { padding: 10px 0 !important; border-right: 0 !important; border-bottom: 1px solid var(--rw-border); }
  .rw-ab-board > section { min-width: 0; }
}

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

@media (prefers-contrast: more) {
  .rw-app { --rw-border: var(--rw-border-strong); }
  .rw-state, .rw-filter-chips button.is-active { border-width: 2px; }
}

@media (forced-colors: active) {
  .rw-app { forced-color-adjust: auto; }
  .rw-prototype span, .rw-state > span, .rw-dot { border: 1px solid currentColor; }
  .rw-chart-line { stroke: CanvasText; }
  .rw-line-2 { stroke-dasharray: 3 4; }
  .rw-line-3 { stroke-dasharray: 10 4; }
}

/* 与其它全宽研究页共用页面身份栏；本文件后加载，因此在这里确认最终优先级。 */
.rw-header.ak-page-head { min-height: 0; gap: 18px; padding: 14px 20px; border-bottom-color: var(--ak-dark-border); background: var(--ak-dark-surface); }
.rw-header.ak-page-head .ak-page-title { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--ak-dark-text); font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.rw-header.ak-page-head .ak-page-beta { min-height: 0; padding: 1px 9px; border-color: rgba(117, 167, 255, .48); background: rgba(117, 167, 255, .12); color: var(--ak-dark-focus); font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: .04em; }
.rw-header.ak-page-head .ak-page-sub { margin: 4px 0 0; color: var(--ak-dark-text-muted); font-size: 13px; line-height: 1.5; }
body.light-theme .rw-header.ak-page-head { border-bottom-color: #d7e0eb; background: #fff; }
body.light-theme .rw-header.ak-page-head .ak-page-title { color: #172238; }
body.light-theme .rw-header.ak-page-head .ak-page-sub { color: #52627a; }
body.light-theme .rw-header.ak-page-head .ak-page-beta { border-color: rgba(37, 93, 181, .38); background: #dce9fb; color: #255db5; }
@media (max-width: 720px) {
  .rw-header.ak-page-head { align-items: stretch; gap: 10px; padding: 12px 14px; }
  .rw-header.ak-page-head .ak-page-title { font-size: 21px; }
  .rw-header.ak-page-head .rw-header-meta { justify-content: space-between; }
}
