@charset "UTF-8";/* Chat and history scroll internally; entry motion must not create a shell scrollbar. */
.app-main.cs-main { overflow: hidden; }
.cs-page { display: flex; flex-direction: column; height: calc(var(--app-viewport-height, 100dvh) - var(--topbar-height, 56px)); min-height: 0; padding: 0; }
.cs-page .primary-button,.cs-page .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 15px; border-radius: 8px; border: 1px solid var(--line-strong); font: inherit; font-size: 14px; line-height: 1.4; }
.cs-page .primary-button { background: var(--accent); color: white; border-color: var(--accent); }
.cs-page .secondary-button { background: var(--surface); color: var(--ink); }
.cs-page button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 0; flex: 1; min-height: 0; background: var(--surface); }
.cs-history { display: flex; flex-direction: column; min-height: 0; background: var(--surface-soft); border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 18px 12px; }
.cs-new { justify-content: center; width: 100%; }.cs-admin-switch { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-top: 14px; }
.cs-search { display: flex; margin: 14px 0; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }.cs-search input { min-width: 0; flex: 1; border: 0; padding: 10px; background: transparent; font-size: 13px; }.cs-search button { border: 0; background: transparent; padding: 8px; color: var(--muted); }
.cs-session-list { overflow-y: auto; flex: 1; min-height: 60px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.cs-session-row { display: flex; align-items: center; gap: 2px; margin-bottom: 4px; border-radius: 9px; transition: background-color .18s ease; }
.cs-session-row.is-selected { background: var(--accent-pale); color: var(--accent); }
.cs-session-choice { display: block; flex: 1; min-width: 0; text-align: left; padding: 12px 8px; border: 0; background: transparent; border-radius: 8px; color: inherit; }
.cs-session-list strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 550; line-height: 1.6; overflow-wrap: anywhere; }
.cs-session-list small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.cs-session-more { display: flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 32px; margin-right: 4px; padding: 0; border: 0; background: transparent; border-radius: 6px; color: var(--muted); }
.cs-session-more[aria-expanded="true"] { background: var(--surface); color: var(--accent); }
.cs-empty-history { padding: 8px; }
.cs-session-menu { position: fixed; z-index: 180; width: 152px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 6px 20px rgba(26,42,75,.12); animation: cs-control-enter .14s ease both; }
.cs-session-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px; border: 0; border-radius: 6px; background: transparent; color: var(--danger); font: inherit; font-size: 13px; cursor: pointer; }
.cs-session-menu button:hover,.cs-session-menu button:focus-visible { background: var(--surface-soft); outline: 2px solid var(--accent-pale); }
@media (hover: hover) { .cs-session-row:hover { background: var(--surface); }.cs-session-row.is-selected:hover { background: var(--accent-pale); }.cs-session-more { opacity: 0; }.cs-session-row:hover .cs-session-more,.cs-session-row:focus-within .cs-session-more { opacity: 1; } }
.cs-conversation { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 0; border-radius: 0; background: var(--surface); overflow: hidden; }.cs-conversation-heading { min-height: 56px; padding: 14px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }.cs-conversation-heading span { font-size: 12px; color: var(--muted); }.cs-conversation-heading strong { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 24px; scroll-behavior: auto; }.cs-message { max-width: 880px; margin: 0 auto 26px; overflow-wrap: anywhere; }.cs-message-user { margin-left: auto; max-width: 80%; padding: 14px 18px; border-radius: 12px; background: var(--accent-pale); }.cs-message-user p { white-space: pre-wrap; line-height: 1.7; margin: 6px 0 0; }.cs-message-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.cs-markdown { color: var(--ink); font-size: 16px; line-height: 1.8; }.cs-markdown h1,.cs-markdown h2 { font-size: 21px; margin: 24px 0 10px; }.cs-markdown h3 { font-size: 18px; margin: 18px 0 8px; }.cs-markdown p { margin: 10px 0; }.cs-markdown pre { overflow: auto; background: var(--surface-soft); padding: 12px; }.cs-markdown img { max-width: 100%; }.cs-markdown ul,.cs-markdown ol { padding-left: 24px; }.cs-table-scroll { overflow-x: auto; margin: 15px 0; }.cs-markdown table { border-collapse: collapse; width: 100%; font-size: 14px; }.cs-markdown th,.cs-markdown td { padding: 10px 12px; border: 1px solid var(--line-strong); min-width: 100px; text-align: left; }.cs-markdown th { background: var(--surface-soft); }
.cs-sources { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.6; }.cs-sources-heading { margin: 0 0 6px; }.cs-sources ul { margin: 0; padding-left: 18px; }.cs-sources li { margin: 4px 0; overflow-wrap: anywhere; }.cs-answer-actions { display: flex; gap: 16px; margin-top: 12px; }
.cs-answer-actions button,.cs-direct { display: inline-flex; align-items: center; gap: 6px; padding: 7px 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 13px; }
.cs-composer { flex: 0 0 auto; padding: 14px 24px 18px; }
.cs-composer-shell { border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface); overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.cs-composer-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.cs-input-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cs-input-area { position: relative; min-width: 0; }
.cs-input-mirror,.cs-composer textarea { width: 100%; box-sizing: border-box; padding: 16px 18px 8px; font: inherit; font-size: 16px; line-height: 1.65; letter-spacing: inherit; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; tab-size: 8; }
.cs-input-mirror { min-height: 76px; max-height: min(320px,32dvh); visibility: hidden; pointer-events: none; overflow: hidden; }
.cs-composer textarea { position: absolute; inset: 0; height: 100%; min-height: 0; margin: 0; resize: none; border: 0; border-radius: 0; background: transparent; color: var(--ink); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.cs-composer textarea:focus { outline: none; box-shadow: none; }
.cs-composer textarea::placeholder { color: var(--muted); }
.cs-composer textarea:disabled { opacity: .65; }
.cs-composer-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 4px 12px 12px; }
.cs-composer-context { flex: 1; min-width: 0; }
.cs-composer-hint { color: var(--muted); font-size: 11px; }
.cs-composer-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.cs-composer-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; font: inherit; font-size: 13px; transition: background-color .18s ease, color .18s ease, transform .18s ease, opacity .18s ease; }
.cs-voice-button { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.cs-send-button { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--accent); color: white; }
.cs-page .cs-send-button:disabled { opacity: 1; background: var(--surface-soft); color: var(--muted); }
.cs-voice-state { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; animation: cs-control-enter .18s ease both; }
.cs-voice-state button { padding: 8px 10px; border-radius: 8px; background: transparent; }
.cs-composer-controls .cs-recording { color: var(--danger); background: var(--surface-soft); }
.cs-voice-cancel,.cs-transcribing { color: var(--muted); }
.cs-recording-status { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 18px 8px; color: var(--muted); font-size: 12px; line-height: 1.6; animation: cs-control-enter .18s ease both; }
.cs-recording-dot,.cs-transcribing-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); animation: cs-recording-pulse 1.4s ease-in-out infinite; }
.cs-transcribing { display: inline-flex; align-items: center; gap: 7px; }
.cs-transcribing-dot { background: var(--accent); }
.cs-composer-controls button:active:not(:disabled) { transform: scale(.94); }
.cs-direct { padding: 8px 6px; border-radius: 7px; transition: background-color .18s ease; }
@media (hover: hover) { .cs-voice-button:hover:not(:disabled),.cs-voice-cancel:hover,.cs-direct:hover:not(:disabled) { background: var(--accent-pale); color: var(--accent); }.cs-send-button:hover:not(:disabled) { transform: translateY(-1px); }.cs-recording:hover { opacity: .8; } }
@keyframes cs-control-enter { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cs-recording-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }
.cs-welcome { max-width: 880px; margin: clamp(24px,8vh,88px) auto 24px; text-align: center; color: var(--muted); }
.cs-welcome-symbol { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 16px; color: var(--accent); background: var(--accent-pale); }
.cs-welcome h2 { font-size: clamp(23px,2.1vw,30px); color: var(--ink); margin: 20px 0 12px; letter-spacing: -.5px; }
.cs-welcome p { max-width: 580px; margin: 0 auto; font-size: 14px; line-height: 1.8; }
.cs-starters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 32px; }
.cs-starters button { display: flex; align-items: flex-start; gap: 12px; padding: 19px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.cs-starters button > svg { flex: 0 0 auto; margin-top: 2px; color: var(--muted); }
.cs-starters button > svg:last-child { margin-left: auto; }
.cs-starters strong { display: block; margin-bottom: 7px; font-size: 14px; }
.cs-starters small { display: block; color: var(--muted); font-size: 12px; line-height: 1.7; }
.cs-starters-hint { display: block; margin-top: 16px; color: var(--muted); font-size: 11px; }
@media (hover: hover) { .cs-starters button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-pale); transform: translateY(-2px); } }
.cs-starters button:active:not(:disabled) { transform: translateY(0); }
.cs-progress { max-width: 880px; margin: 18px auto 24px; padding: 17px 20px; border-radius: 12px; background: var(--surface-soft); }
.cs-progress-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--ink); font-size: 13px; }
.cs-progress-heading strong { font-weight: 550; }.cs-progress-heading small { margin-left: auto; color: var(--muted); font-size: 11px; }
.cs-progress p { margin: 9px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.cs-thinking-dots { display: inline-flex; align-items: center; gap: 4px; height: 16px; }
.cs-thinking-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: cs-thinking 1.2s ease-in-out infinite; }
.cs-thinking-dots i:nth-child(2) { animation-delay: .15s; }.cs-thinking-dots i:nth-child(3) { animation-delay: .3s; }
.cs-progress-lines { display: grid; gap: 9px; }.cs-progress-lines span { display: block; height: 7px; width: 88%; border-radius: 4px; background: var(--line); animation: cs-skeleton 1.6s ease-in-out infinite; }.cs-progress-lines span:nth-child(2) { width: 70%; animation-delay: .15s; }.cs-progress-lines span:nth-child(3) { width: 48%; animation-delay: .3s; }
.cs-progress-compact { padding: 10px 0; background: transparent; }
@keyframes cs-thinking { 0%,70%,100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
@keyframes cs-skeleton { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
.cs-muted,.cs-phase { color: var(--muted); font-size: 13px; }.cs-error { color: var(--danger); font-size: 13px; padding: 10px 16px; margin: 0; line-height: 1.6; }.cs-error button { margin-left: 10px; background: none; border: 0; color: var(--accent); }.cs-filters { display: grid; gap: 8px; margin-bottom: 10px; font-size: 12px; }.cs-filters label { display: flex; gap: 6px; align-items: center; }.cs-filters input,.cs-filters select { min-width: 0; padding: 6px; border: 1px solid var(--line); border-radius: 6px; flex: 1; }.cs-pagination { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding-top: 10px; }.cs-pagination button { background: none; border: 0; color: var(--accent); }.cs-history-toggle,.cs-history-backdrop { display: none; }.cs-page button { cursor: pointer; }.cs-page button:disabled { cursor: default; opacity: .5; }
.cs-page .cs-history-toggle { display: none; }
.cs-filters .menu-select { min-width: 0; width: 100%; }
.cs-loading-button { height: 41px; background: var(--accent-pale); border-radius: 8px; }
.cs-loading-search { height: 37px; margin: 14px 0; border: 1px solid var(--line); border-radius: 8px; }
.cs-loading-line { height: 12px; width: 75%; margin: 12px 10px; border-radius: 4px; background: var(--surface-soft); }
.cs-loading-input { height: 76px; }
.cs-loading-actions { display: flex; justify-content: flex-end; padding: 4px 12px 12px; }
.cs-loading-actions > span { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-soft); }
.cs-startup-profile { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-soft); margin-left: auto; }
.cs-startup-nav { display: grid; gap: 28px; padding: 38px 20px; }
.cs-startup-nav > span { height: 14px; width: 70%; border-radius: 4px; background: #1b2739; }
@media (max-width: 600px) { .cs-startup-topbar { height: var(--topbar-height); }.cs-startup-nav { display: flex; justify-content: space-around; padding: 22px 12px; }.cs-startup-nav > span { width: 18px; height: 18px; }.cs-startup-nav > span:nth-child(n+6) { display: none; } }
@media (max-width: 700px) { .app-main.cs-main { animation: none; } }
@media (max-width: 1100px) and (min-width: 701px) { .cs-starters { grid-template-columns: minmax(0,1fr); max-width: 450px; margin: 24px auto 0; }.cs-starters button { padding: 14px; } }
@media (max-width: 1000px) { .cs-layout { grid-template-columns: 220px minmax(0,1fr); }.cs-messages { padding: 20px; } }
@media (max-width: 700px) { .cs-page { padding: 0 0 calc(64px + env(safe-area-inset-bottom)); }.cs-page .cs-history-toggle { display: inline-flex; padding: 7px 9px; font-size: 12px; }.cs-layout { grid-template-columns: minmax(0,1fr); }.cs-history { display: flex; position: fixed; top: 0; bottom: 0; left: 0; width: min(320px,85vw); z-index: 161; border-radius: 0; padding-top: 24px; visibility: hidden; pointer-events: none; transform: translateX(-100%); transition: transform .2s ease, visibility 0s linear .2s; }.cs-history-open { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }.cs-history-backdrop { display: block; position: fixed; inset: 0; z-index: 160; border: 0; background: rgba(15,25,45,.25); }.cs-conversation-heading { padding: 10px 12px; font-size: 14px; gap: 8px; }.cs-messages { padding: 16px 12px; }.cs-message-user { max-width: 92%; padding: 12px; }.cs-markdown { font-size: 15px; }.cs-composer { padding: 10px 12px; }.cs-composer-shell { border-radius: 18px; }.cs-input-mirror,.cs-composer textarea { padding: 14px 14px 8px; }.cs-input-mirror { max-height: min(224px,28dvh); }.cs-composer-actions { gap: 6px; padding: 4px 8px 8px; }.cs-composer-hint { display: none; }.cs-composer-context:has(.cs-direct) { flex-basis: auto; }.cs-composer-actions:has(.cs-voice-state) .cs-composer-context { display: none; }.cs-direct { font-size: 12px; padding: 8px 4px; }.cs-recording-status { padding: 4px 14px 8px; font-size: 11px; }.cs-loading-actions { padding: 4px 8px 8px; }.cs-welcome { margin: 16px auto 20px; }.cs-welcome-symbol { width: 42px; height: 42px; border-radius: 12px; }.cs-welcome h2 { font-size: 21px; margin: 14px 0 8px; }.cs-welcome p { font-size: 12px; }.cs-starters { grid-template-columns: minmax(0,1fr); gap: 8px; margin-top: 18px; }.cs-starters button { padding: 12px; }.cs-starters strong { margin-bottom: 3px; font-size: 13px; }.cs-starters small { font-size: 11px; }.cs-starters-hint { margin-top: 12px; }.cs-progress { padding: 14px; }.cs-progress-compact { padding: 8px 0; } }

@media (prefers-reduced-motion: reduce) { .cs-history,.cs-composer-shell,.cs-composer-controls button,.cs-direct,.cs-starters button,.cs-session-row { transition: none; }.cs-voice-state,.cs-recording-status,.cs-recording-dot,.cs-transcribing-dot,.cs-thinking-dots i,.cs-progress-lines span,.cs-session-menu { animation: none; } }

/* Design tokens — the current ChemMind theme */
:root {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --surface: #ffffff;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-family: Geist, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --danger: #c9342d;
  --danger-pale: #fff0ef;
  color: var(--ink);
  background: var(--page-bg);
  --ink: #1f2329;
  --text: #454d5c;
  --muted: #717986;
  --faint: #89919e;
  --line: #e9ecf1;
  --line-strong: #d6dce6;
  --surface-soft: #f5f7fa;
  --accent: #2f54eb;
  --accent-dark: #1d39c4;
  --accent-pale: #edf0ff;
  --accent-wash: #f5f7ff;
  --brand: #2f54eb;
  --brand-navy: #073a70;
  --brand-teal: #0b9a91;
  --brand-on-dark: #f7fbff;
  --success: #237804;
  --success-pale: #f6ffed;
  --warning: #ad6800;
  --warning-pale: #fffbe6;
  --app-header-height: 0px;
  --topbar-height: 56px;
  --project-directory-width: 220px;
  --shadow: 0 2px 8px rgba(11, 18, 32, .04);
  --control-shadow: 0 2px 0 rgba(5, 88, 255, .04);
  --popover-shadow: 0 6px 18px rgba(11, 18, 32, .08), 0 16px 40px rgba(11, 18, 32, .1);
  --page-bg: #f5f7fa;
  --sidebar-width: 220px;
  --app-ui-scale: 0.95;
  /* Keep the scaled application flush with the viewport without zooming the browser root. */
  --app-viewport-width: 105.263158dvw;
  --app-viewport-height: 105.263158dvh;
}
/* Experiment creation and record editor */
.experiment-modal-layer {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 26, 51, 0.3);
  backdrop-filter: none;
  animation: none;
  z-index: 200;
}
.experiment-create-modal {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid #d7dbe5;
  background: #fbfbfc;
  box-shadow: 0 26px 72px rgba(23, 33, 64, 0.2);
  animation: none;
  border-radius: 18px;
}
.experiment-modal-header,
.record-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #dfe2ea;
  background: #fff;
}
.experiment-modal-header { padding: 25px 28px 21px; }
.record-modal-header { flex: 0 0 auto; padding: 19px 22px 17px; }
.experiment-modal-header p,
.record-modal-header p {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.055em;
  color: var(--text);
}
.experiment-modal-header h2,
.record-modal-header h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.experiment-modal-header h2 { font-size: 24px; }
.record-modal-header h2 { font-size: 21px; }
.record-weknora-status { display: inline-flex; margin-left: 10px; padding: 2px 7px; border-radius: 999px; color: var(--accent-dark); background: var(--accent-pale); font-size: 11px; font-weight: 700; }
.record-weknora-status.sync-synced,
.record-weknora-status.sync-completed { color: var(--success); background: var(--success-pale); }
.record-weknora-status.sync-failed { color: var(--danger); background: var(--danger-pale); }
.experiment-create-form {
  display: grid;
  gap: 16px;
  max-height: calc(100dvh - 160px);
  overflow: auto;
  padding: 24px 28px 26px;
}
.experiment-create-project {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid #7287c7;
  border-radius: 0 9px 9px 0;
  background: #efedf7;
  color: #707584;
  font-size: 12px;
}
.experiment-create-project strong { color: #263359; font-weight: 680; }
.experiment-create-form label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #717a93;
  font-size: 12px;
}
.experiment-create-form input,
.experiment-create-form textarea {
  width: 100%;
  border: 1px solid #d4d8e3;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #283355;
  font: inherit;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.experiment-create-form input { height: 43px; padding: 0 12px; }
.experiment-create-form textarea { resize: vertical; padding: 11px 12px; line-height: 1.65; }
.experiment-create-form input:focus, .experiment-create-form textarea:focus { border-color: rgba(0, 37, 148, 0.58); box-shadow: 0 0 0 4px rgba(0, 37, 148, 0.08); }
.experiment-create-form label > small { color: #8792a6; font-size: 12px; line-height: 1.25; }
.experiment-create-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.experiment-create-form > footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 4px;
  padding-top: 17px;
  border-top: 1px solid #e4e6ed;
}
.experiment-create-form > footer button,
.record-modal-actions button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid #d6dae4;
  border-radius: 8px;
  background: #fff;
  color: #4f5976;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.record-modal-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sheet-toolbar button,
.sheet-toolbar select {
  border: 1px solid #d6dae4;
  background: #fff;
  color: #4f5976;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  height: 31px;
  border-radius: 6px;
  font-size: 12px;
}
.sheet-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
}
.sheet-toolbar select { width: 60px; padding: 0 6px; }
.experiment-images-panel header button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid #d6dae4;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent-wash);
  color: var(--accent-dark);
  border-color: #b7c1de;
}
.experiment-create-form > footer .save-button { border-color: var(--accent); background: var(--accent); color: #fff; }
.experiment-create-scope {
  margin: -2px 0 2px;
  padding: 11px 13px;
  border: 1px solid #dfe6f7;
  border-radius: 9px;
  background: #f6f8fd;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.record-modal-actions .record-save-button { color: #fff; background: var(--accent-dark); border-color: var(--accent-dark); }
.experiment-create-form > footer button:disabled, .record-modal-actions button:disabled, .sheet-toolbar button:disabled, .experiment-images-panel header button:disabled { cursor: default; opacity: 0.5; }
.record-modal-layer { padding: 20px; }
.experiment-record-modal {
  display: flex;
  width: min(1540px, calc(100vw - 40px));
  height: min(940px, calc(100dvh - 40px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d5d9e3;
  background: #f4f5f7;
  box-shadow: 0 28px 76px rgba(22, 32, 63, 0.23);
  animation: none;
  border-radius: 16px;
  contain: layout paint;
}
.record-modal-header > div:first-child > span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.record-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.record-modal-actions .record-trash-button {
  width: 38px;
  padding: 0;
  border-color: #efd0d0;
  color: var(--danger);
}
.record-modal-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px 12px;
  min-height: 44px;
  padding: 10px 20px;
  border-bottom: 1px solid #dfe2e9;
  font-size: 12px;
  flex-wrap: wrap;
  background: #fafafa;
  color: var(--muted);
}
.record-modal-meta b { margin-left: auto; color: #9a6a1e; font-weight: 680; }
.record-view-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 48px;
  padding: 7px 20px 0;
  overflow-x: auto;
  border-bottom: 1px solid #dfe2e9;
  background: #fff;
}
.record-status-control {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  min-height: 38px;
  padding: 3px 4px 3px 12px;
  border: 1px solid #d9e0eb;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.record-status-control > span { white-space: nowrap; }
.menu-select { position: relative; min-width: 0; }
.menu-select:has(.menu-select-popover:not([hidden])) { z-index: 80; }
.menu-select-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #cfd7e5;
  border-radius: 9px;
  background: #fbfcfe;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(37, 53, 91, .05);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.menu-select-trigger:hover,
.menu-select-trigger[aria-expanded="true"] { border-color: #8fa4db; background: #fff; box-shadow: 0 0 0 3px rgba(47, 84, 235, .09); }
.menu-select-trigger > svg { flex: 0 0 auto; margin-left: auto; transform: rotate(90deg); transition: transform .16s ease; }
.menu-select-trigger[aria-expanded="true"] > svg { transform: rotate(-90deg); }
.menu-select-trigger-copy { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.menu-select-trigger-copy strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; }
.menu-select-trigger-copy small,
.menu-select-option em { flex: 0 0 auto; padding: 2px 6px; border-radius: 5px; background: #e8edfb; color: var(--accent-dark); font-size: 10px; font-style: normal; font-weight: 650; line-height: 1.4; }
.menu-select-tone { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: currentColor; }
.tone-warning .menu-select-tone { color: #c78308; box-shadow: 0 0 0 3px rgba(199, 131, 8, .12); }
.tone-success .menu-select-tone { color: #3b941d; box-shadow: 0 0 0 3px rgba(59, 148, 29, .12); }
.tone-accent .menu-select-tone { color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 84, 235, .11); }
.tone-muted .menu-select-tone { color: #8b93a3; box-shadow: 0 0 0 3px rgba(139, 147, 163, .11); }
.menu-select-trigger:disabled { cursor: not-allowed; opacity: .58; }
.menu-select-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  right: 0;
  width: max(100%, 200px);
  max-width: min(280px, calc(100vw - 24px));
  max-height: min(320px, calc(100dvh - 120px));
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #d8dfeb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(33, 49, 85, .18), 0 3px 10px rgba(33, 49, 85, .08);
  animation: menu-select-enter .14s ease-out both;
  scrollbar-width: thin;
  scrollbar-color: #b5bece transparent;
}
.menu-select-popover[hidden] { display: none; }
.menu-select-popover::-webkit-scrollbar { width: 6px; }
.menu-select-popover::-webkit-scrollbar-track { background: transparent; }
.menu-select-popover::-webkit-scrollbar-thumb { border-radius: 999px; background: #b5bece; }
.menu-select-group { display: grid; gap: 2px; }
.menu-select-group + .menu-select-group { margin-top: 5px; padding-top: 7px; border-top: 1px solid #edf0f5; }
.menu-select-group-label { padding: 4px 9px 5px; overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.menu-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.menu-select-option:hover,
.menu-select-option:focus-visible { outline: 0; background: #f3f6fc; color: var(--ink); }
.menu-select-option[aria-selected="true"] { background: var(--accent-pale); color: var(--accent-dark); }
.menu-select-option-copy { display: grid; flex: 1; min-width: 0; gap: 1px; }
.menu-select-option-copy strong { overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.menu-select-option-copy small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.45; }
.menu-select-option > svg { flex: 0 0 auto; color: var(--accent-dark); }
.record-status-select { min-width: 112px; }
.record-status-select .menu-select-trigger { height: 30px; padding: 0 9px; border: 0; border-radius: 7px; box-shadow: none; }
.record-status-select .menu-select-trigger.tone-warning { background: var(--warning-pale); color: var(--warning); }
.record-status-select .menu-select-trigger.tone-success { background: var(--success-pale); color: var(--success); }
.record-status-select .menu-select-trigger:hover,
.record-status-select .menu-select-trigger[aria-expanded="true"] { box-shadow: inset 0 0 0 1px currentColor; }
.record-status-select .menu-select-popover { right: auto; left: 0; width: 190px; }
@keyframes menu-select-enter { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .menu-select-popover { animation: none; }
  .menu-select-trigger, .menu-select-trigger > svg, .menu-select-option { transition: none; }
}
.record-view-tabs button {
  position: relative;
  display: inline-flex;
  min-width: max-content;
  height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: #6b7285;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}
.record-view-tabs button:hover { background: #f5f6fa; color: #34405f; }
.record-view-tabs button[aria-selected="true"] { background: #f0f2fa; color: var(--accent-dark); }
.record-view-tabs button[aria-selected="true"]::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  content: "";
}
.record-view-tabs i {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  border-radius: 9px;
  background: #e7e9f1;
  color: #66708d;
  font-size: 10px;
  font-style: normal;
}
.record-setup,
.record-overview,
.record-focus-view {
  min-height: 0;
  flex: 1;
  overflow: auto;
  animation: record-view-enter 180ms ease-out both;
}
@keyframes record-view-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.record-setup {
  display: grid;
  align-content: center;
  gap: 28px;
  padding: clamp(28px, 5vw, 72px);
  background: #f6f7f9;
}
.record-setup-copy { width: min(680px, 100%); }
.record-setup-copy > span,
.record-overview-identity > div > span,
.record-focus-heading > span {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
}
.record-setup-copy h3,
.record-overview-hero h3,
.record-focus-heading h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.035em;
}
.record-setup-copy p {
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.record-source-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.record-source-option {
  display: grid;
  min-height: 210px;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 18px 16px;
  padding: 26px;
  text-align: left;
  border: 1px solid #d9dde6;
  border-radius: 13px;
  background: #fff;
  color: #34405d;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(32, 43, 73, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.record-source-option.primary { border-color: #aebbe1; box-shadow: 0 12px 30px rgba(48, 67, 130, 0.09); }
.record-source-option:hover { border-color: #91a2d3; box-shadow: 0 16px 34px rgba(32, 43, 73, 0.11); transform: translateY(-2px); }
.record-source-option:focus-visible { outline: 3px solid rgba(44, 72, 173, 0.2); outline-offset: 2px; }
.record-source-option:disabled { cursor: default; opacity: 0.55; transform: none; }
.record-source-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 10px;
  background: #eef1fb;
  color: var(--accent-dark);
}
.record-source-option > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.record-source-option small { color: #7b849a; font-size: 11px; font-weight: 650; }
.record-source-option strong { margin-top: 7px; color: #24304e; font-size: 18px; }
.record-source-option em { max-width: 540px; margin-top: 10px; color: #747d91; font-size: 13px; font-style: normal; line-height: 1.65; }
.record-source-option > b {
  display: inline-flex;
  grid-column: 2;
  align-items: center;
  gap: 5px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}
.record-setup-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #798197;
  font-size: 12px;
}
.record-create-choice-layer {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 32, 57, .48);
}
.record-create-choice-dialog {
  width: min(760px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #d8deea;
  border-radius: 16px;
  outline: 0;
  background: #fff;
  box-shadow: 0 24px 72px rgba(21, 31, 55, .28);
  animation: record-view-enter 180ms ease-out both;
}
.record-create-choice-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px 18px; border-bottom: 1px solid #e2e6ed; }
.record-create-choice-dialog > header > div > span { color: var(--accent-dark); font-size: 10px; font-weight: 750; letter-spacing: .1em; }
.record-create-choice-dialog h3 { margin: 6px 0 0; color: #222e49; font-size: 23px; }
.record-create-choice-dialog > header p { margin: 7px 0 0; color: #768096; font-size: 12px; }
.record-create-choice-dialog > header > button { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid #d9dee8; border-radius: 9px; background: #fff; color: #59647b; cursor: pointer; }
.record-create-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 22px 24px 24px; }
.record-create-choice-grid > button {
  display: grid;
  min-height: 218px;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 15px 14px;
  padding: 20px;
  text-align: left;
  border: 1px solid #d8dfec;
  border-radius: 13px;
  background: #f8f9fd;
  color: #32405c;
  font: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.record-create-choice-grid > button.table { border-color: #d2e5de; background: #f6fbf9; }
.record-create-choice-grid > button:hover { border-color: #9cadd8; box-shadow: 0 12px 28px rgba(32, 46, 84, .11); transform: translateY(-2px); }
.record-create-choice-grid > button.table:hover { border-color: #8ebdab; }
.record-create-choice-grid > button:focus-visible { outline: 3px solid rgba(47, 84, 235, .17); outline-offset: 2px; }
.record-create-choice-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 10px; background: #e9edff; color: #4760ba; }
.record-create-choice-grid .table .record-create-choice-icon { background: #e2f3ec; color: #2d7b61; }
.record-create-choice-grid > button > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.record-create-choice-grid small { color: #7b8498; font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.record-create-choice-grid strong { margin-top: 6px; color: #25314c; font-size: 17px; }
.record-create-choice-grid em { margin-top: 9px; color: #727d92; font-size: 12px; font-style: normal; line-height: 1.65; }
.record-create-choice-grid b { display: inline-flex; grid-column: 2; align-items: center; gap: 6px; color: var(--accent-dark); font-size: 12px; }
.record-create-choice-grid .table b { color: #2d7259; }
.record-create-choice-dialog > footer { padding: 12px 24px 14px; border-top: 1px solid #e5e8ee; background: #f8f9fb; color: #7a8497; font-size: 11px; }
.record-overview {
  display: flex;
  padding: clamp(20px, 2.2vw, 32px);
  background: #eef2f6;
}
.record-overview-layout {
  display: grid;
  min-height: 100%;
  flex: 1;
  grid-template-columns: minmax(0, 1.48fr) minmax(310px, .62fr);
  grid-template-rows: minmax(278px, 1.15fr) minmax(170px, .85fr);
  grid-template-areas:
    "hero status"
    "details details";
  align-content: stretch;
  gap: 16px;
  width: min(1320px, 100%);
  margin: 0 auto;
}
.record-overview-hero {
  grid-area: hero;
  display: flex;
  min-width: 0;
  min-height: 230px;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 22px;
  padding: 26px 28px 22px;
  border: 1px solid #d7dfea;
  border-left: 4px solid #3459bd;
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 4%, rgba(52, 89, 189, .075), transparent 36%),
    #fff;
  box-shadow: 0 12px 30px rgba(37, 53, 91, .07);
}
.record-overview-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}
.record-overview-identity > div { min-width: 0; max-width: 780px; }
.record-overview-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 11px;
  background: #edf2ff;
  color: #244cb8;
}
.record-overview-hero h3 { margin-top: 9px; font-size: 30px; }
.record-overview-hero p,
.record-focus-heading p {
  margin: 10px 0 0;
  color: #687189;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.record-overview-hero p { max-width: 62ch; }
.record-overview-hero p.is-empty,
.record-overview-grid p.is-empty { color: #929bad; }
.record-overview-objective {
  display: flex;
  flex: 1;
  min-height: 80px;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  padding: 14px 17px;
  border: 1px solid #e2e7f0;
  border-radius: 10px;
  background: rgba(247, 249, 252, .82);
}
.record-overview-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.record-overview-field-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #394968;
  font-size: 12px;
  font-weight: 700;
}
.record-overview-field-heading > span svg { color: #4162b8; }
.record-inline-edit-button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid #d9e1f0;
  border-radius: 7px;
  background: #fff;
  color: #3158b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.record-inline-edit-button:hover { border-color: #aebfe7; background: #f4f7ff; }
.record-overview-objective textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  overflow: auto;
  padding: 9px 10px;
  border: 1px solid #d8deea;
  border-radius: 7px;
  background: #fff;
  color: #566177;
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  outline: none;
}
.record-overview-objective textarea:focus,
.record-preview-copy > textarea:focus { border-color: #8ca7e7; box-shadow: 0 0 0 3px rgba(48, 88, 219, .1); }
.record-overview-objective p {
  width: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 7px;
  color: #566177;
  font-size: 13px;
  line-height: 1.65;
}
.record-overview-objective p.is-empty { color: #929bad; }
.record-overview-objective small {
  color: #929bad;
  font-size: 11px;
  line-height: 1.5;
}
.record-overview-objective.is-empty {
  border-style: dashed;
  background: rgba(248, 249, 251, .7);
}
.record-overview-primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 19px;
  border-top: 1px solid #edf0f5;
}
.record-overview-primary-action small {
  color: #7c8799;
  font-size: 12px;
  line-height: 1.5;
}
.record-overview-primary-action > button,
.record-overview-grid header button,
.record-overview-stats button {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.record-overview-primary-action > button {
  display: inline-flex;
  min-width: max-content;
  height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 17px;
  border: 1px solid #2449aa;
  border-radius: 9px;
  background: #294fba;
  color: #fff;
  box-shadow: 0 7px 16px rgba(36, 73, 170, .18);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.record-overview-primary-action > button:hover {
  background: #21439f;
  box-shadow: 0 9px 20px rgba(36, 73, 170, .24);
  transform: translateY(-1px);
}
.record-overview-primary-action > button:active { transform: translateY(0); }
.record-overview-primary-action > button svg:last-child { margin-left: 2px; }
.record-overview-stats {
  grid-area: status;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0 18px;
  border: 1px solid #d7dfea;
  border-radius: 14px;
  background: #f9fafc;
  box-shadow: 0 8px 22px rgba(37, 53, 91, .045);
}
.record-overview-stats > header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e1e6ef;
}
.record-overview-stats > header > div { display: grid; gap: 3px; }
.record-overview-stats > header span { color: #253252; font-size: 14px; font-weight: 700; }
.record-overview-stats > header small { color: #8a93a5; font-size: 11px; }
.record-overview-stats > header > svg { color: #4b66ac; }
.record-overview-stats dl {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-rows: repeat(4, minmax(52px, 1fr));
  margin: 0;
}
.record-overview-stats dl > div {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #e7ebf1;
}
.record-overview-stats dl > div:last-child { border-bottom: 0; }
.record-overview-stats dt {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0;
  color: #33405e;
  font-size: 12px;
  font-weight: 650;
}
.record-overview-stats dt > svg { flex: 0 0 auto; color: #5570b6; }
.record-overview-stats dt > span { display: grid; gap: 2px; }
.record-overview-stats dt small { color: #929aab; font-size: 10px; font-weight: 450; white-space: nowrap; }
.record-overview-stats dd {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  max-width: 52%;
  margin: 0;
  overflow: hidden;
  color: #253252;
  font-size: 12px;
  font-weight: 650;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record-overview-stats dd strong { font: inherit; }
.record-overview-stats button {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 6px;
  background: #edf2ff;
  color: #294eaf;
  transition: background-color 150ms ease, color 150ms ease;
}
.record-overview-stats button:hover { background: #dfe8ff; color: #1f4199; }
.record-overview-grid {
  grid-area: details;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.48fr) minmax(310px, .62fr);
  gap: 16px;
  margin-top: 0;
}
.record-overview-grid > section {
  display: flex;
  min-width: 0;
  min-height: 152px;
  flex-direction: column;
  padding: 20px 23px 23px;
  border: 1px solid #d7dfea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(37, 53, 91, .045);
}
.record-overview-grid > .record-analysis-card {
  border-color: #d8e0ef;
  background: #f4f7fc;
  box-shadow: none;
}
.record-overview-grid header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.record-overview-grid header > div { display: grid; gap: 4px; }
.record-overview-grid header span { color: #253252; font-size: 14px; font-weight: 750; }
.record-overview-grid header small { color: #8a93a5; font-size: 11px; }
.record-overview-grid header button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 4px 0;
  transition: color 150ms ease, transform 150ms ease;
}
.record-overview-grid header .record-inline-edit-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #d9e1f0;
  border-radius: 7px;
  background: #fff;
}
.record-overview-grid header .record-inline-edit-button:hover {
  border-color: #aebfe7;
  background: #f4f7ff;
  transform: none;
}
.record-overview-grid header button:hover { color: #1d3f9a; transform: translateX(2px); }
.record-preview-copy {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin-top: 17px;
}
.record-preview-copy > p {
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 7px;
  color: #5f6b80;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record-preview-copy > p.is-empty {
  display: flex;
  width: 100%;
  min-height: 76px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #e6eaf1;
  border-radius: 9px;
  background: #f7f8fa;
}
.record-preview-copy > textarea {
  width: 100%;
  height: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid #dbe1eb;
  border-radius: 8px;
  background: #fbfcfd;
  color: #566177;
  font: inherit;
  font-size: 13px;
  line-height: 1.75;
  outline: none;
}
.record-overview-grid > .record-analysis-card .record-preview-copy > p.is-empty {
  border-color: #dfe6f3;
  background: rgba(255, 255, 255, .62);
}
.record-overview-objective p,
.record-preview-copy > p {
  scrollbar-color: #b9c5da transparent;
  scrollbar-width: thin;
}
.record-overview-objective p::-webkit-scrollbar,
.record-preview-copy > p::-webkit-scrollbar { width: 6px; }
.record-overview-objective p::-webkit-scrollbar-track,
.record-preview-copy > p::-webkit-scrollbar-track { background: transparent; }
.record-overview-objective p::-webkit-scrollbar-thumb,
.record-preview-copy > p::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #b9c5da;
}
.record-overview-objective p::-webkit-scrollbar-thumb:hover,
.record-preview-copy > p::-webkit-scrollbar-thumb:hover { background: #96a6c2; }
.record-focus-view { padding: clamp(22px, 3vw, 42px); background: #f6f7f9; }
.record-focus-view.experiment-images-panel { max-height: none; border-top: 0; }
.record-focus-column { width: min(920px, 100%); margin: 0 auto; }
.record-focus-heading { margin-bottom: 18px; }
.record-focus-heading h3 { font-size: 27px; }
.record-focus-view .experiment-upload-module,
.record-focus-view .experiment-ai-module { padding: 20px; }
.record-focus-view .experiment-image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.record-focus-view .image-preview-button { height: 180px; }
.record-document-view {
  display: flex;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: #e9edf2;
  animation: record-view-enter 180ms ease-out both;
}
.record-document-layout { display: grid; min-width: 0; min-height: 0; flex: 1; grid-template-columns: 244px minmax(0, 1fr); }
.record-document-list {
  min-width: 0;
  overflow: auto;
  padding: 18px 14px;
  border-right: 1px solid #d5dae3;
  background: #f7f8fa;
}
.record-document-list > header { display: flex; align-items: center; justify-content: space-between; margin: 0 5px 12px; color: #737d90; font-size: 11px; }
.record-document-list > header strong { color: #33405b; }
.record-document-list > button {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 12px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #5a6680;
  text-align: left;
  cursor: pointer;
}
.record-document-list > button:hover { background: #eef1f6; }
.record-document-list > button.active { border-color: #ccd6ec; background: #eaf0ff; color: #294ba5; }
.record-document-list > button > svg { flex: 0 0 auto; }
.record-document-list > button > span { display: grid; min-width: 0; gap: 3px; }
.record-document-list > button strong { overflow: hidden; color: #293650; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.record-document-list > button small { color: #8a93a5; font-size: 10px; }
.record-document-list > p { margin: 18px 6px 0; color: #8a93a5; font-size: 11px; line-height: 1.65; }
.record-document-canvas { min-width: 0; min-height: 0; overflow: auto; padding: 28px clamp(20px, 4vw, 56px) 48px; }
.record-document-page {
  display: flex;
  width: min(820px, 100%);
  min-height: 100%;
  flex-direction: column;
  margin: 0 auto;
  border: 1px solid #d2d7df;
  background: #fff;
  box-shadow: 0 12px 30px rgba(29, 42, 69, .1);
}
.record-document-page > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 32px 42px 22px; border-bottom: 1px solid #eceef2; }
.record-document-page > header > div { min-width: 0; }
.record-document-page > header span { color: #73809a; font-size: 10px; font-weight: 750; letter-spacing: .09em; }
.record-document-page > header h3 { margin: 7px 0 0; overflow-wrap: anywhere; color: #26344d; font-size: 20px; }
.record-document-page > header small { flex: 0 0 auto; padding: 5px 8px; border-radius: 6px; background: #eef3ff; color: #3155ad; font-size: 10px; }
.record-document-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.record-document-header-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid #cdd8ee; border-radius: 7px; background: #fff; color: #3155ad; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.record-document-header-actions button:hover { border-color: #8da9eb; background: #f5f8ff; }
.record-document-header-actions button:disabled { cursor: wait; opacity: .55; }
.record-document-meta-editor { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(150px, .7fr) minmax(150px, .7fr); gap: 10px; padding: 16px 42px; border-bottom: 1px solid #eceef2; background: #fafbfc; }
.record-document-meta-editor label { display: grid; min-width: 0; gap: 6px; color: #748097; font-size: 10px; font-weight: 650; }
.record-document-meta-editor input { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #d7dce6; border-radius: 6px; background: #fff; color: #2e3b54; font: inherit; font-size: 12px; outline: none; }
.record-document-meta-editor input:focus { border-color: #8da9eb; box-shadow: 0 0 0 3px rgba(48, 88, 219, .1); }
.record-document-page > textarea {
  width: 100%;
  min-height: 520px;
  flex: 1;
  resize: none;
  padding: 32px 42px 46px;
  border: 0;
  outline: 0;
  background: #fff;
  color: #293548;
  font: 400 15px/1.95 "Noto Serif SC", "Songti SC", SimSun, serif;
  white-space: pre-wrap;
  tab-size: 4;
}
.record-document-page > textarea:focus { box-shadow: inset 0 0 0 2px rgba(48, 88, 219, .18); }
.record-document-page > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 42px; border-top: 1px solid #eceef2; color: #7a8496; font-size: 10px; }
.record-document-page > footer span { color: #4b5870; font-weight: 650; }
.record-input-assist { position: fixed; z-index: 1200; display: grid; width: 220px; max-height: 185px; overflow: auto; padding: 6px; border: 1px solid #cbd5e6; border-radius: 9px; background: #fff; box-shadow: 0 12px 32px rgba(23, 39, 73, .2); }
.record-input-assist small { padding: 5px 7px; color: #66758f; font-size: 10px; }
.record-input-assist button { border: 0; border-radius: 5px; padding: 7px; background: transparent; color: #26344d; text-align: left; cursor: pointer; }
.record-input-assist button:hover, .record-input-assist button:focus { background: #eef3ff; }
.material-library-layer { position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center; padding: 18px; background: rgba(21, 31, 52, .5); }
.material-library-page { padding: 28px clamp(18px, 4vw, 58px) 60px; }
.material-library-page > h1 { margin: 0 0 8px; color: #26344d; font-size: 26px; }
.material-library-page > p { margin: 0 0 24px; color: #66758f; }
.material-library-embedded .material-library-dialog { width: min(1100px, 100%); max-height: none; min-height: 610px; border: 1px solid #e1e7f0; box-shadow: 0 8px 30px rgba(8, 22, 53, .06); }
.material-library-embedded .material-library-body { min-height: 540px; }
.material-library-embedded .material-library-list > div { max-height: 495px; }
.material-library-dialog { display: flex; flex-direction: column; width: min(900px, 100%); max-height: min(86vh, 800px); border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(8, 22, 53, .28); }
.material-library-dialog > header { display: flex; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid #e6eaf1; }
.material-library-dialog h3, .material-library-dialog h4 { margin: 0; color: #26344d; }
.material-library-dialog header p { margin: 7px 0 0; color: #66758f; font-size: 12px; }
.material-library-dialog header button { border: 0; background: transparent; color: #60708c; font-size: 25px; cursor: pointer; }
.material-library-body { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr); min-height: 0; }
.material-library-list { display: flex; flex-direction: column; min-height: 0; padding: 16px; border-right: 1px solid #e6eaf1; }
.material-library-list input, .material-library-editor input, .material-library-editor textarea { box-sizing: border-box; width: 100%; border: 1px solid #cbd5e6; border-radius: 7px; padding: 9px 10px; background: #fff; color: #26344d; font: inherit; }
.material-library-list > small { padding: 8px 0; color: #697991; }
.material-library-list > div { min-height: 0; overflow: auto; }
.material-library-list > div > button { display: flex; width: 100%; flex-direction: column; gap: 3px; border: 0; border-bottom: 1px solid #edf0f5; padding: 10px; background: #fff; text-align: left; cursor: pointer; }
.material-library-list > div > button.selected { background: #eef3ff; }
.material-library-list > div > button.inactive { opacity: .55; }
.material-library-list strong { color: #26344d; font-size: 13px; }
.material-library-list span { color: #71809a; font-size: 11px; }
.material-library-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; color: #66758f; font-size: 12px; white-space: nowrap; }
.material-library-pagination button { border: 1px solid #cad5e9; border-radius: 7px; padding: 7px 10px; background: #fff; color: #3155ad; cursor: pointer; }
.material-library-pagination button:disabled { color: #aab5c6; cursor: not-allowed; }
.material-library-editor { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: auto; padding: 20px 24px; }
.material-library-editor-heading { display: flex; align-items: center; justify-content: space-between; }
.material-library-editor-heading button, .material-library-actions button { border: 1px solid #cad5e9; border-radius: 7px; padding: 7px 11px; background: #fff; color: #3155ad; cursor: pointer; }
.material-library-editor label { display: grid; gap: 6px; color: #58677f; font-size: 12px; font-weight: 700; }
.material-library-editor textarea { min-height: 80px; resize: vertical; }
.material-library-note { margin: 0; color: #71809a; font-size: 11px; line-height: 1.6; }
.material-library-error { margin: 0; color: #b63737; font-size: 12px; }
.material-library-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; }
.material-library-actions button.primary { border-color: #3155ad; background: #3155ad; color: #fff; }
.material-library-actions button.danger { border-color: #efc8c8; color: #b63737; }
@media (max-width: 700px) { .material-library-body { grid-template-columns: 1fr; overflow: auto; } .material-library-list { max-height: 240px; border-right: 0; border-bottom: 1px solid #e6eaf1; } }
.record-modal-error {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 9px 22px;
  border-bottom: 1px solid #f0d9d7;
  font-size: 12px;
  background: var(--danger-pale);
  color: var(--danger);
}
.record-modal-workspace {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 310px;
}
/* Spreadsheet canvas and image attachments */
.sheet-editor-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid #dcdfe7;
  background: #edeef2;
}
.sheet-toolbar {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 12px;
  border-bottom: 1px solid #d9dce5;
  background: var(--surface-soft);
}
.sheet-context {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #cdd2e2;
  border-radius: 7px;
  background: #efedf7;
  color: #545c73;
  white-space: nowrap;
}
.sheet-context small { color: #787e90; font-size: 10px; }
.sheet-context strong { color: #082477; font-size: 11px; }
.sheet-context i { color: #838897; font-size: 10px; font-style: normal; }
.sheet-toolbar > div {
  display: flex;
  align-items: center;
  padding-right: 7px;
  border-right: 1px solid #e1e3ea;
  gap: 5px;
}
.sheet-toolbar > div:last-child { border-right: 0; }
.sheet-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.sheet-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 18px 18px 42px;
}
.experiment-sheet {
  min-width: max-content;
  overflow: hidden;
  border: 1px solid #cfd3df;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 46, 79, 0.09);
}
.sheet-column-headers {
  display: grid;
  transition: none;
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 28px;
  border-bottom: 1px solid #cbcfdb;
  background: #edeff3;
}
.sheet-row { display: grid; background: #fff; transition: width 160ms ease; }
.sheet-column-headers span,
.sheet-column-headers b,
.sheet-row-number {
  display: grid;
  place-items: center;
  border-right: 1px solid #d8dbe3;
  color: #71798f;
  font-size: 10px;
  font-weight: 620;
}
.sheet-row-number {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #edeff3;
}
.sheet-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #dbdee6;
  border-bottom: 1px solid #dbdee6;
}
.sheet-cell.selected { z-index: 1; box-shadow: inset 0 0 0 2px var(--accent); }
.sheet-cell.selected::after { content: ""; position: absolute; inset: 0; background: rgba(75, 96, 210, 0.10); pointer-events: none; }
.sheet-selection-status { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 7px 16px; color: var(--accent-dark); font-size: 12px; background: #f4f6fc; border-bottom: 1px solid #d8dbe3; }
.sheet-selection-status span { color: #71798f; }
.sheet-scroll:focus { outline: none; }
.sheet-cell textarea {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  resize: none;
  overflow: auto;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 9px;
  color: #293455;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.45;
}
.experiment-images-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: #fafafa;
}
.experiment-upload-module {
  padding: 13px;
  border: 1px solid #dedce6;
  border-radius: 11px;
  background: #fff;
}
.experiment-upload-module > header { display: grid; gap: 12px; margin-bottom: 14px; }
.experiment-images-panel h3 { margin: 0; font-size: 14px; color: var(--ink); }
.experiment-images-panel p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
.experiment-images-panel header input { display: none; }
.experiment-images-panel header .ai-analyze-button { border-color: #bfcce8; background: #f1f4fb; color: #496494; }
.experiment-images-panel .image-ai-hint {
  margin: -3px 0 11px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
  background: #fafafa;
  color: var(--muted);
}
.image-empty-state {
  display: grid;
  width: 100%;
  min-height: 170px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed #cbcfdc;
  border-radius: 10px;
  background: #fff;
  color: #787e90;
  cursor: pointer;
}
.image-empty-state strong { color: #394465; font-size: 12px; }
.image-empty-state span { color: #9089a3; font-size: 12px; }
.experiment-image-grid { display: grid; gap: 11px; }
.experiment-image-grid article {
  position: relative;
  overflow: hidden;
  border: 1px solid #dcdfe8;
  border-radius: 10px;
  background: #fff;
}
.image-ai-included {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(21, 105, 82, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(3px);
}
.image-preview-button {
  position: relative;
  display: block;
  width: 100%;
  height: 146px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #e9ebef;
  cursor: zoom-in;
}
.image-preview-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-preview-button span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(22, 32, 61, 0.78);
  color: #fff;
  font-size: 12px;
}
.experiment-image-grid article > div { display: grid; gap: 3px; padding: 10px 42px 10px 11px; }
.experiment-image-grid strong {
  overflow: hidden;
  color: #344063;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.experiment-image-grid small { color: #8a91a4; font-size: 12px; }
.image-delete-button {
  position: static;
  margin: 0 12px 12px auto;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 1px solid #eed7d7;
  border-radius: 6px;
  background: #fff8f7;
  color: #b15b5b;
  cursor: pointer;
}
.experiment-ai-module {
  margin-top: 15px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid #cfd3e0;
  border-radius: 11px;
  background: #fafafa;
}
.experiment-ai-module > header { display: grid; gap: 12px; }
.experiment-ai-module > header > div { display: flex; align-items: flex-start; gap: 9px; }
.experiment-ai-module > header > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid #c4cadd;
  border-radius: 7px;
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--text);
}
.experiment-ai-module > header h3 { margin-top: 1px; color: var(--ink); }
.experiment-ai-module > header p { margin-top: 3px; }
.ai-analysis-empty {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed #cbcfdc;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}
.ai-analysis-empty strong { color: #3c4768; font-size: 12px; }
.ai-analysis-empty span { color: #848a9d; font-size: 12px; line-height: 1.55; }
.ai-analysis-empty:not(.is-running) span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}
.ai-analysis-empty.is-running { position:relative; overflow:hidden; border-style:solid; border-color:#b9c9ea; background:#f5f8ff; text-align:left; }
.ai-analysis-empty.is-running::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:#2b5dcc; animation:ai-chat-pulse 1.4s ease-in-out infinite; }
.ai-analysis-empty.is-running strong { color:#244fae; }
.ai-analysis-empty.is-running span { color:#657693; white-space:pre-wrap; }
.experiment-ai-result {
  margin: 14px -14px -14px;
  overflow: hidden;
  border: 0;
  border-top: 1px solid #d5d8e2;
  border-radius: 0 0 10px 10px;
  background: #fff;
}
.experiment-ai-result > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 12px 13px;
  border-bottom: 1px solid #e0e2e9;
  background: linear-gradient(110deg, #edf0f8, #f4f6fb);
}
.experiment-ai-result > header div { display: grid; gap: 3px; }
.experiment-ai-result > header span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #172c6a;
  font-size: 12px;
  font-weight: 720;
}
.experiment-ai-result > header small, .experiment-ai-result > header time { color: #7b8296; font-size: 12px; }
.experiment-ai-result > div { padding: 12px 13px 0; }
.experiment-ai-result h4 { margin: 0 0 7px; color: #364163; font-size: 14px; }
.experiment-ai-result > div > p {
  margin: 0;
  color: #545d77;
  font-size: 12px;
  line-height: 1.65;
}
.experiment-ai-result li {
  margin: 0;
  color: #545d77;
  font-size: 13px;
  line-height: 1.8;
}
.experiment-ai-result ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 17px;
}
.experiment-ai-result .ai-result-recommendations { margin: 0 13px; padding: 11px 0 12px; border-top: 1px solid #dbdee8; }
.experiment-ai-result .ai-result-recommendations h4 { color: #283b73; }
.experiment-ai-result .ai-result-disclaimer {
  margin: 0;
  padding: 10px 13px;
  border-top: 1px solid #e5e7ec;
  background: #fafbfc;
  color: #8b909f;
  font-size: 12px;
  line-height: 1.5;
}
.experiment-image-lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  place-items: center;
  padding: 24px;
  background: rgba(9, 14, 31, 0.84);
  z-index: 240;
}
.experiment-image-lightbox header {
  display: flex;
  width: min(1200px, 92vw);
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  color: #fff;
}
.experiment-image-lightbox header button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.experiment-image-lightbox > img {
  display: block;
  max-width: min(1200px, 92vw);
  max-height: calc(100dvh - 105px);
  border-radius: 8px;
  object-fit: contain;
}
/* Document defaults and shared controls */
* { box-sizing: border-box; }
html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ink);
  overflow: hidden;
  background: var(--page-bg);
}
#root {
  width: var(--app-viewport-width);
  min-height: var(--app-viewport-height);
  zoom: var(--app-ui-scale);
}
button { font: inherit; -webkit-tap-highlight-color: transparent; color: inherit; }
input, textarea, select { font: inherit; }
a { -webkit-tap-highlight-color: transparent; }
input:focus-visible, textarea:focus-visible { outline: 2px solid rgba(0, 37, 148, 0.38); outline-offset: 2px; }
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.45rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease;
  z-index: 400;
}
.skip-link:focus { transform: translateY(0); }
.chem-logo {
  display: grid;
  place-items: center;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
}
.chem-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.chem-wordmark {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.chem-wordmark__chem { color: var(--brand-navy); }
.chem-wordmark__mind { color: var(--brand-teal); }
.chem-wordmark--dark .chem-wordmark__chem { color: var(--brand-on-dark); }
.star-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aaafbf;
  cursor: pointer;
}
.star-button:hover { color: var(--warning); }
.project-trash-action {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d9dce6;
  border-radius: 8px;
  color: #81889c;
  cursor: pointer;
  transition: color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
  width: 44px;
  height: 46px;
  background: #fff;
  border-color: var(--line-strong);
}
.project-trash-action:hover:not(:disabled) {
  border-color: #e5b8b8;
  background: #fff5f5;
  color: #b84040;
  transform: translateY(-1px);
}
.project-trash-action:active:not(:disabled) { transform: translateY(1px); }
.project-trash-action:disabled { cursor: default; opacity: 0.52; transform: none; }
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.workspace-state-page {
  display: grid;
  min-height: calc(100dvh - 66px);
  place-items: center;
  padding: 40px 24px 90px;
}
.workspace-state-card {
  display: flex;
  width: min(520px, 100%);
  min-height: 310px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #747c93;
  text-align: center;
  box-shadow: 0 18px 48px rgba(28, 40, 78, 0.065);
}
.workspace-state-card > i {
  display: grid;
  place-items: center;
  width: 61px;
  height: 61px;
  border-radius: 16px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-style: normal;
}
.workspace-state-card h1 { margin: 20px 0 0; color: #242f51; font-size: 22px; }
.workspace-state-card p {
  max-width: 34rem;
  margin: 9px 0 20px;
  font-size: 13px;
  line-height: 1.75;
}
.workspace-state-card > button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.workspace-state-card.error > i { background: #fff0ef; color: #bd5555; }
.workspace-state-card.loading { display: grid; align-content: center; gap: 10px; }
.workspace-state-card.loading span {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #edeff3 25%, #f8f9fb 50%, #edeff3 75%);
  background-size: 200% 100%;
  animation: data-shimmer 1.4s ease-in-out infinite;
}
.workspace-state-card.loading span:nth-child(1) { width: 72%; }
.workspace-state-card.loading span:nth-child(2) { width: 92%; }
.workspace-state-card.loading span:nth-child(3) { width: 58%; }
/* Product and library collections */
.collection-page { min-width: 0; min-height: calc(100dvh - 66px); padding-bottom: 48px; }
.collection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  gap: 24px;
  background: #fff;
  border-bottom-color: var(--line);
}
.collection-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 720;
  color: var(--muted);
  letter-spacing: 0.8px;
}
.collection-header h1 {
  margin: 0;
  font-weight: 690;
  color: var(--ink);
  font-size: 26px;
  letter-spacing: -0.6px;
}
.collection-header > div:first-child > p:last-child { margin: 11px 0 0; font-size: 13px; color: var(--muted); }
.collection-stat {
  display: flex;
  min-width: 126px;
  flex-direction: column;
  align-items: flex-end;
  padding: 8px 3px 6px 28px;
  border-left: 1px solid var(--line);
}
.collection-stat strong {
  color: var(--ink);
  font-size: 27px;
  font-weight: 650;
  line-height: 1;
}
.collection-stat span { margin-top: 8px; font-size: 13px; color: var(--muted); }
.collection-header-actions { display: flex; align-items: center; gap: 20px; }
.collection-header-actions > button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 39px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 660;
  cursor: pointer;
}
.collection-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: 18px;
  padding: 24px;
}
.collection-list-panel {
  position: sticky;
  top: 84px;
  display: flex;
  height: calc(100dvh - 108px);
  min-height: 440px;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.collection-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 5px 0 13px;
  border: 1px solid #d9dce6;
  color: var(--muted);
  border-radius: 11px;
  background: #fff;
}
.collection-list-panel > .collection-search { margin: 14px 14px 0; }
.collection-search:focus-within { border-color: rgba(0, 37, 148, 0.46); box-shadow: 0 0 0 3px rgba(0, 37, 148, 0.07); }
.collection-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}
.collection-search button,
.data-empty button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
}
.collection-search button { border-radius: 10px; }
.data-empty button { border-radius: 6px; }
.collection-search button:hover, .data-empty button:hover { background: var(--accent-dark); }
.collection-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  padding: 0 17px;
  border-bottom: 1px solid #edeff3;
  font-size: 13px;
  color: var(--muted);
}
.collection-list-meta button,
.clear-query {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: 13px;
  cursor: pointer;
}
.collection-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 5px 7px;
}
.product-list-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 116px;
  padding: 14px 11px;
  border: 0;
  border-bottom: 1px solid #edeff3;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.product-list-item.active::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}
.product-list-item > svg { color: #9198ad; }
.product-number {
  align-self: start;
  padding-top: 4px;
  font-size: 13px;
  font-weight: 680;
  color: var(--muted);
}
.product-list-copy { display: flex; min-width: 0; flex-direction: column; }
.record-kicker {
  font-size: 13px;
  font-weight: 660;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.product-list-copy strong {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 680;
  color: var(--ink);
}
.product-list-copy small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
}
.tag-row { display: flex; gap: 5px; margin-top: 8px; }
.tag-row i {
  overflow: hidden;
  max-width: 90px;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--surface-soft);
  color: var(--muted);
}
.collection-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 13px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.collection-pagination button {
  height: 29px;
  padding: 0 10px;
  border: 1px solid #dcdfe8;
  border-radius: 6px;
  background: #fff;
  color: #515b7a;
  font-size: 12px;
  cursor: pointer;
}
.collection-pagination button:disabled { cursor: default; opacity: 0.38; }
.collection-detail {
  min-height: calc(100dvh - 114px);
  overflow: hidden;
  min-width: 0;
  border-radius: 14px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.detail-loading { display: grid; gap: 14px; padding: 36px; }
.detail-loading span,
.data-skeleton {
  border-radius: 7px;
  background: linear-gradient(90deg, #f0f1f5 25%, #f7f8fa 50%, #f0f1f5 75%);
  background-size: 200% 100%;
  animation: data-shimmer 1.5s ease-in-out infinite;
}
.data-skeleton { height: 105px; margin: 8px; }
.detail-loading span:first-child { width: 44%; height: 38px; }
.detail-loading span:nth-child(2) { width: 82%; height: 120px; }
.detail-loading span:last-child { width: 100%; height: 240px; }
@keyframes data-shimmer {
  to { background-position: -200% 0; }
}
.data-empty,
.detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
  color: #80889e;
  text-align: center;
}
.data-empty { min-height: 340px; }
.detail-placeholder { min-height: calc(100dvh - 116px); }
.data-empty > svg { margin-bottom: 14px; color: #818797; }
.data-empty strong { color: #2c3654; font-size: 15px; }
.detail-placeholder h2 { color: #2c3654; margin: 20px 0 0; font-size: 19px; }
.data-empty p,
.detail-placeholder p {
  max-width: 27rem;
  margin: 8px 0 17px;
  font-size: 13px;
  line-height: 1.7;
}
.data-empty.error > svg { color: var(--danger); }
.detail-placeholder > span {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: var(--accent-pale);
  color: var(--accent-dark);
}
.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 152px;
  padding: 29px 31px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.detail-hero h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 690;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.detail-hero > div > p:last-child {
  max-width: 56rem;
  margin: 11px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  background: var(--success-pale);
  color: var(--success);
}
.property-section, .evidence-section { padding: 24px 31px; border-bottom: 1px solid #e8eaef; }
.detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.detail-section-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 680;
  color: var(--ink);
}
.detail-section-title > span { font-size: 12px; color: var(--muted); }
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.property-card {
  display: flex;
  min-height: 82px;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px 14px;
  border: 1px solid #e1e3e9;
  border-radius: 8px;
  background: #fafafa;
  border-color: var(--line);
}
.property-card span { font-size: 14px; color: var(--muted); }
.property-card strong {
  margin-top: 9px;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.55;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.evidence-list { display: grid; gap: 8px; }
.evidence-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  padding: 12px;
  border: 1px solid #e5e7ee;
  border-radius: 8px;
  background: #fff;
}
.evidence-row > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-pale);
  color: var(--accent-dark);
}
.evidence-row strong { color: #293455; font-size: 15px; }
.evidence-row p,
.muted-copy {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: #717a94;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.document-original {
  margin: 22px 31px 30px;
  border: 1px solid #dfe2e9;
  border-radius: 9px;
  background: #fbfbfc;
}
.document-original summary {
  padding: 14px 16px;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}
.document-original pre {
  max-height: 430px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border-top: 1px solid #e4e6ed;
  color: #424c6b;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.experiment-collection-header { min-height: 152px; }
.experiment-metrics {
  display: flex;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dfe1e8;
  border-radius: 9px;
  background: #dfe1e8;
}
.experiment-metrics > div {
  display: flex;
  min-width: 104px;
  height: 71px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
}
.experiment-metrics strong { color: #182755; font-size: 21px; font-weight: 660; }
.experiment-metrics span { margin-top: 5px; color: #7b8399; font-size: 12px; }
/* Experiment browser */
.experiment-browser { padding: 24px; }
.experiment-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px;
}
.mode-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 7px;
  background: #f0f1f5;
}
.mode-switch button {
  height: 29px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #606985;
  font-size: 12px;
  cursor: pointer;
}
.mode-switch button.active {
  background: #fff;
  color: var(--accent-dark);
  font-weight: 660;
  box-shadow: 0 1px 4px rgba(38, 48, 77, 0.08);
}
.toolbar-count { color: #80879d; font-size: 12px; }
.experiment-browser-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 18px;
  margin-top: 17px;
}
.experiment-record-list, .experiment-detail { height: calc(100dvh - 168px); min-height: 650px; overflow: auto; }
.experiment-detail {
  min-width: 0;
  border-radius: 14px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.record-list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: #8990a5;
  font-size: 12px;
}
.experiment-record-item {
  position: relative;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 77px;
  align-items: start;
  gap: 11px;
  width: 100%;
  min-height: 126px;
  padding: 16px 14px;
  border: 0;
  border-bottom: 1px solid #e8eaef;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}
.experiment-record-item.active { background: var(--accent-wash); }
.experiment-record-item.active::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}
.record-mode-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: #aeb3c2;
}
.record-mode-dot.native { background: var(--accent); }
.record-mode-dot.legacy { background: #eea022; }
.experiment-record-copy { display: flex; min-width: 0; flex-direction: column; }
.experiment-record-copy > strong {
  overflow: hidden;
  margin-top: 5px;
  color: #202b4d;
  font-size: 16px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.experiment-record-copy > small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 7px;
  color: #6e7791;
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.record-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.record-footer i {
  overflow: hidden;
  color: #82899f;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record-footer .status-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 4px;
  background: #e7eaf4;
  color: #08257e;
}
.experiment-record-item > time {
  padding-top: 2px;
  font-size: 13px;
  text-align: right;
  color: var(--muted);
}
.experiment-detail-hero {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 137px;
}
.experiment-detail-hero h2 { max-width: 31rem; font-size: 23px; color: var(--ink); }
.native-experiment-overview {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f6f7f9;
}
.native-record-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dcdfe7;
  border-radius: 10px;
  background: #fff;
}
.native-record-section > .detail-section-title {
  min-height: 62px;
  margin: 0;
  padding: 13px 15px;
  border-bottom: 1px solid #e3e5eb;
}
.native-record-section .detail-section-title > div { min-width: 0; }
.native-record-section .detail-section-title h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #243055;
  font-size: 16px;
}
.native-record-section .detail-section-title p { margin: 4px 0 0; color: #9089a3; font-size: 12px; }
.native-record-section .detail-section-title > button,
.native-analysis-preview > button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid #bdc5db;
  border-radius: 6px;
  background: #eff1f8;
  color: #082479;
  font-size: 12px;
  font-weight: 660;
  cursor: pointer;
}
.native-analysis-preview > button { margin-top: 13px; }
.experiment-sheet-preview-scroll {
  max-height: 445px;
  overflow: auto;
  padding: 12px;
  background: linear-gradient(#f5f6f8 1px, transparent 1px),
    linear-gradient(90deg, #f5f6f8 1px, transparent 1px),
    #f9fafb;
  background-size: 20px 20px;
}
.experiment-sheet-preview {
  min-width: max-content;
  overflow: hidden;
  border: 1px solid #ccd0dd;
  background: #fff;
  box-shadow: 0 5px 16px rgba(35, 46, 79, 0.08);
}
.experiment-sheet-preview-row { display: grid; background: #fff; }
.experiment-sheet-preview-row > div {
  display: flex;
  min-width: 0;
  align-items: center;
  overflow: hidden;
  padding: 7px 9px;
  border-right: 1px solid #dbdee6;
  border-bottom: 1px solid #dbdee6;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.experiment-sheet-preview-row > div.brand { letter-spacing: 0.03em; }
.preview-empty-cell { min-height: 1em; }
.native-document-preview {
  max-height: 445px;
  overflow: auto;
  padding: 14px;
  background: #edf0f4;
}
.native-document-preview > nav {
  display: flex;
  gap: 7px;
  margin: 0 auto 10px;
  max-width: 760px;
  overflow-x: auto;
}
.native-document-preview > nav button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #d1d7e2;
  border-radius: 7px;
  background: #f8f9fb;
  color: #68748b;
  cursor: pointer;
}
.native-document-preview > nav button.active { border-color: #9eb4e8; background: #eaf0ff; color: #285ac7; }
.native-document-preview > nav button span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.native-document-paper {
  max-width: 760px;
  min-height: 360px;
  margin: 0 auto;
  border: 1px solid #d8dce4;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 43, 67, .09);
}
.native-document-paper > header { display: grid; gap: 4px; padding: 20px 28px 15px; border-bottom: 1px solid #e5e8ee; }
.native-document-paper > header span { color: #75829a; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.native-document-paper > header strong { overflow: hidden; color: #263552; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.native-document-paper > pre {
  min-height: 280px;
  margin: 0;
  padding: 24px 30px 36px;
  color: #3d4960;
  font: 13px/1.9 Georgia, "Noto Serif SC", "Songti SC", serif;
  white-space: pre-wrap;
  word-break: break-word;
}
.native-document-empty { display: grid; min-height: 280px; place-content: center; justify-items: center; gap: 7px; color: #8791a4; text-align: center; }
.native-document-empty strong { color: #526078; font-size: 14px; }
.native-document-empty span { font-size: 12px; }
.native-record-empty {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  color: #8a91a4;
  font-size: 12px;
}
.native-image-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
}
.native-image-preview-grid > button {
  position: relative;
  min-width: 0;
  height: 105px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbdee7;
  border-radius: 7px;
  background: #edeef2;
  color: #fff;
  cursor: pointer;
}
.native-image-preview-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.native-image-preview-grid button > span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  padding: 7px 8px;
  background: linear-gradient(transparent, rgba(15, 24, 51, 0.86));
  font-size: 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.native-image-preview-grid > .native-image-more {
  display: grid;
  place-content: center;
  gap: 2px;
  border-style: dashed;
  background: #f3f4f8;
  color: #182f75;
  font-size: 22px;
  font-weight: 700;
}
.native-image-preview-grid .native-image-more > span {
  position: static;
  padding: 0;
  background: none;
  color: #72788b;
  text-align: center;
}
.native-analysis-summary { border-color: #ced3e1; }
.native-analysis-summary > .detail-section-title { background: linear-gradient(105deg, #eff2f9, #f5f7fc); }
.native-analysis-preview { padding: 14px 15px 15px; }
.native-analysis-preview > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #838a9d;
  font-size: 12px;
}
.native-analysis-preview > div { margin-top: 13px; }
.native-analysis-preview strong { color: #2e395a; font-size: 12px; }
.native-analysis-preview p {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: #525c7a;
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.native-analysis-preview .native-analysis-conclusion {
  padding: 10px 11px;
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: #f0f2f8;
}
.legacy-experiment-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 1px;
  background: #e5e7ee;
}
.legacy-experiment-summary > div { min-height: 107px; padding: 17px 20px; background: #fff; }
.legacy-experiment-summary span { color: #787e90; font-size: 12px; font-weight: 680; }
.legacy-experiment-summary p {
  margin: 8px 0 0;
  color: #404a69;
  font-size: 13px;
  line-height: 1.7;
}
.source-document { margin-bottom: 30px; }
.source-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 17px;
  border-top: 1px solid #e4e6ed;
  background: #f4f5f8;
  color: #80879d;
  font-size: 12px;
}
.source-document pre { border-top: 1px solid #e4e6ed; }
/* Legacy experiment detail drawer and editing forms */
.experiment-drawer-layer {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 24, 51, 0.24);
  backdrop-filter: none;
  animation: none;
  z-index: 200;
}
.experiment-drawer {
  display: flex;
  width: min(660px, calc(100vw - 42px));
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(205, 209, 220, 0.88);
  background: radial-gradient(circle at 90% 0, rgba(210, 218, 240, 0.36), transparent 22rem),
    #fbfbfc;
  box-shadow: -22px 0 54px rgba(22, 34, 72, 0.16);
  animation: none;
  border-radius: 18px;
}
.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 29px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}
.drawer-header p {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.06em;
  color: var(--text);
}
.drawer-header h2 {
  max-width: 31rem;
  margin: 0;
  color: #172348;
  font-size: 23px;
  font-weight: 690;
  line-height: 1.35;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.drawer-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}
.drawer-close-button {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #dcdfe8;
  border-radius: 9px;
  background: #fff;
  color: #505a79;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.drawer-close-button:hover { background: #eff1f6; color: var(--accent-dark); }
.drawer-close-button:active { transform: scale(0.96); }
.drawer-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid #bcc4de;
  border-radius: 8px;
  background: #edf0f8;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.drawer-edit-button:hover { background: #e2e6f3; }
.drawer-edit-button:active { transform: scale(0.97); }
.drawer-edit-button:disabled { cursor: default; opacity: 0.48; }
.drawer-statusbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 47px;
  padding: 0 29px;
  border-bottom: 1px solid var(--line);
  background: rgba(249, 248, 251, 0.92);
  color: #717992;
  font-size: 12px;
}
.drawer-statusbar time { margin-left: auto; }
.readonly-note { padding-left: 12px; border-left: 1px solid #dbdee6; color: #9a7a43; }
.drawer-loading {
  display: grid;
  gap: 7px;
  padding: 13px 29px;
  border-bottom: 1px solid #e5e7ee;
}
.drawer-loading span {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8eaef 25%, #f6f7f9 50%, #e8eaef 75%);
  background-size: 200% 100%;
  animation: data-shimmer 1.4s ease-in-out infinite;
}
.drawer-loading span:nth-child(1) { width: 67%; }
.drawer-loading span:nth-child(2) { width: 91%; }
.drawer-loading span:nth-child(3) { width: 48%; }
.drawer-error {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  margin: 15px 29px 0;
  padding: 12px 13px;
  border: 1px solid #efd8d8;
  border-radius: 8px;
  background: #fff8f7;
  color: #ad5656;
}
.drawer-error strong { font-size: 13px; }
.drawer-error p {
  margin: 4px 0 0;
  color: #8b6767;
  font-size: 12px;
  line-height: 1.6;
}
.drawer-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding-bottom: 38px;
}
.drawer-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 1px;
  border-bottom: 1px solid #dfe2ea;
  background: #e4e6ed;
}
.drawer-summary-grid > div { min-height: 112px; padding: 18px 21px; background: rgba(255, 255, 255, 0.94); }
.drawer-summary-grid .drawer-conclusion { background: #f0f2f8; }
.drawer-summary-grid .drawer-next-plan { grid-column: 1 / -1; min-height: 88px; }
.drawer-summary-grid span {
  color: #777d90;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.045em;
}
.drawer-summary-grid p {
  margin: 8px 0 0;
  color: #3f4a69;
  font-size: 13px;
  line-height: 1.75;
  text-wrap: pretty;
}
.drawer-section { padding: 24px 29px 27px; border-bottom: 1px solid #e3e5ec; }
.drawer-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.drawer-section h3 {
  margin: 0;
  color: #212d4f;
  font-size: 13px;
  font-weight: 680;
}
.drawer-section > header > span { color: #8990a4; font-size: 12px; }
.drawer-variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.drawer-variants > article {
  overflow: hidden;
  border: 1px solid #dfe2e9;
  border-radius: 9px;
  background: #fff;
}
.variant-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 13px 0;
}
.variant-title > span {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}
.variant-title strong { color: #293457; font-size: 13px; font-weight: 650; }
.drawer-variants > article > p {
  min-height: 44px;
  margin: 8px 13px 10px;
  color: #727a92;
  font-size: 12px;
  line-height: 1.55;
}
.formula-lines { border-top: 1px solid #e6e8ee; border-bottom: 1px solid #e6e8ee; background: #fafbfc; }
.formula-lines > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 29px;
  padding: 0 12px;
  border-bottom: 1px solid #e9ebef;
  color: #616a84;
  font-size: 12px;
}
.formula-lines > div:last-child { border-bottom: 0; }
.formula-lines b { color: #26335a; font-weight: 620; }
.drawer-variants footer { padding: 10px 12px 12px; }
.drawer-variants footer span { color: #7b839b; font-size: 12px; font-weight: 680; }
.drawer-variants footer p {
  margin: 4px 0 0;
  color: #384467;
  font-size: 12px;
  line-height: 1.55;
}
.drawer-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.drawer-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e7e9ef;
}
.drawer-steps li:last-child { border-bottom: 0; }
.drawer-steps li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #e8ebf4;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 680;
}
.drawer-steps strong { color: #2e395a; font-size: 12px; font-weight: 620; }
.drawer-steps p,
.drawer-steps small {
  display: block;
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.55;
}
.drawer-steps p { color: #767e95; }
.drawer-steps small { color: #525a74; }
.drawer-observations { display: grid; gap: 8px; }
.drawer-observations > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 12px;
  border-left: 2px solid #9eacd5;
  border-radius: 0 7px 7px 0;
  background: #f3f4f8;
}
.drawer-observations span { color: #2c3b69; font-size: 12px; font-weight: 650; }
.drawer-observations p {
  margin: 0;
  color: #515a76;
  font-size: 12px;
  line-height: 1.6;
}
.drawer-measurements { overflow: hidden; border: 1px solid #dfe2ea; border-radius: 8px; }
.drawer-measurements > div {
  display: grid;
  grid-template-columns: 1fr 0.7fr 1fr;
  gap: 10px;
  align-items: center;
  min-height: 37px;
  padding: 8px 11px;
  border-bottom: 1px solid #e8eaef;
  background: #fff;
  font-size: 12px;
}
.drawer-measurements > div:last-child { border-bottom: 0; }
.drawer-measurements .measurement-head { background: #f2f3f6; color: #7d8499; font-weight: 650; }
.drawer-measurements strong { color: #2b3658; font-weight: 620; }
.drawer-measurements > div > span { color: var(--accent-dark); }
.drawer-measurements small { color: #7c849a; }
.drawer-source-document { margin: 24px 29px 0; }
.drawer-edit-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  background: #f7f8fa;
}
.drawer-edit-scroll { min-height: 0; flex: 1; overflow: auto; }
.edit-section { padding: 24px 29px 28px; border-bottom: 1px solid #dee1e9; background: rgba(255, 255, 255, 0.84); }
.edit-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}
.edit-section > header h3 {
  margin: 0;
  color: #1e2a4e;
  font-size: 13px;
  font-weight: 680;
}
.edit-section > header span { color: #82899f; font-size: 12px; }
.edit-section-actions, .edit-formula-toolbar { display: flex; align-items: center; gap: 9px; }
.edit-formula-toolbar { justify-content: space-between; margin-top: 2px; }
.edit-section-actions button,
.edit-formula-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid #cdd2e0;
  border-radius: 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.edit-section-actions button { height: 29px; background: #f3f5fa; }
.edit-formula-toolbar button { height: 26px; background: #fff; }
.edit-empty-copy {
  margin: 0;
  padding: 14px;
  border: 1px dashed #d5d8e2;
  border-radius: 8px;
  background: #fafbfc;
  color: #80879c;
  font-size: 12px;
  line-height: 1.6;
}
.edit-basics { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.edit-basics > header { grid-column: 1 / -1; margin-bottom: 2px; }
.edit-section label,
.edit-select-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: #757d94;
  font-size: 12px;
}
.edit-section label.wide { grid-column: 1 / -1; }
.legacy-status-select { width: 150px; }
.legacy-status-select .menu-select-trigger { height: 37px; }
.legacy-status-select .menu-select-popover { right: auto; left: 0; width: 200px; }
.edit-section input,
.edit-section select,
.edit-section textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d6dae4;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  color: #293455;
  font: inherit;
  font-size: 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.edit-section input, .edit-section select { height: 37px; padding: 0 10px; }
.edit-section textarea { resize: vertical; padding: 9px 10px; line-height: 1.65; }
.edit-section input:focus, .edit-section select:focus, .edit-section textarea:focus { border-color: rgba(0, 37, 148, 0.48); box-shadow: 0 0 0 3px rgba(0, 37, 148, 0.07); }
.edit-section label.emphasis textarea { border-color: #c8cee2; background: #f5f7fb; }
.edit-variant-list, .edit-record-list, .edit-measurements { display: grid; gap: 11px; }
.edit-variant-list > article,
.edit-record-list > article {
  position: relative;
  display: grid;
  gap: 12px;
  border: 1px solid #dcdfe8;
  border-radius: 9px;
  background: #fcfbfd;
}
.edit-variant-list > article { padding: 15px; padding-top: 42px; }
.edit-record-list > article {
  padding: 15px;
  grid-template-columns: 1fr;
  padding-left: 48px;
  padding-top: 43px;
}
.edit-measurements > article {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #dcdfe8;
  border-radius: 9px;
  background: #fcfbfd;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 43px;
}
.edit-remove-button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  border: 1px solid #dde0e8;
  border-radius: 6px;
  background: #fff;
  color: #8c93a6;
  cursor: pointer;
}
.edit-remove-button:hover, .edit-line-remove:hover { border-color: #e0b7b7; background: #fff6f6; color: #aa5252; }
.edit-inline-grid { display: grid; grid-template-columns: 0.55fr 1.45fr; gap: 10px; }
.edit-inline-grid.three { grid-template-columns: repeat(3, 1fr); }
.edit-section label.edit-checkbox {
  display: inline-flex;
  width: fit-content;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  color: #555f7f;
  cursor: pointer;
}
.edit-section label.edit-checkbox input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}
.edit-formula-toolbar strong { color: #4e5877; font-size: 12px; }
.edit-formula-table {
  overflow-x: auto;
  border: 1px solid #e0e2ea;
  border-radius: 7px;
  background: #fff;
}
.edit-formula-table > div {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.65fr 0.5fr 0.65fr 28px;
  gap: 5px;
  min-width: 470px;
  padding: 6px;
  border-bottom: 1px solid #e9ebef;
}
.edit-formula-table > div:last-child { border-bottom: 0; }
.edit-formula-table .edit-formula-head {
  padding: 7px 10px;
  background: #eeeff4;
  color: #7a8298;
  font-size: 12px;
  font-weight: 650;
}
.edit-formula-table input {
  height: 30px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 12px;
}
.edit-line-remove {
  display: grid;
  width: 27px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid #e1e3e9;
  border-radius: 5px;
  background: #fff;
  color: #8b92a5;
  font-size: 15px;
  cursor: pointer;
}
.outcome-field textarea { background: #f1f3f8; }
.edit-record-list > article > b {
  position: absolute;
  top: 15px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 12px;
}
.edit-record-list.compact > article { grid-template-columns: 0.55fr 0.8fr 1.2fr; padding: 43px 15px 15px; }
.drawer-edit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  min-height: 67px;
  padding: 10px 20px;
  border-top: 1px solid #dbdee7;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 24px rgba(24, 36, 73, 0.055);
}
.drawer-edit-actions p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #b05252;
  font-size: 12px;
  line-height: 1.45;
}
.drawer-edit-actions button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d7dae4;
  border-radius: 7px;
  background: #fff;
  color: #515b79;
  font-size: 12px;
  font-weight: 620;
  cursor: pointer;
}
.drawer-edit-actions .save-button { border-color: var(--accent); background: var(--accent); color: #fff; }
.drawer-edit-actions button:disabled { cursor: default; opacity: 0.48; }
.create-form-error {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #fff0ef;
  color: #a84e4e;
  font-size: 12px;
}
/* Project editor */
.project-modal-layer {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 24, 51, 0.3);
  backdrop-filter: none;
  animation: none;
  z-index: 200;
}
.project-modal {
  display: flex;
  width: min(680px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 48px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(202, 206, 219, 0.94);
  background: radial-gradient(circle at 92% 0, rgba(207, 215, 239, 0.38), transparent 19rem),
    #fbfbfc;
  box-shadow: 0 28px 80px rgba(20, 32, 67, 0.24);
  animation: none;
  border-radius: 18px;
}
.project-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px 21px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}
.project-modal-header p {
  margin: 0 0 7px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
}
.project-modal-header h2 {
  margin: 0;
  color: #172348;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.project-editor-form {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding: 24px 28px 26px;
}
.project-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 17px 14px; }
.project-editor-grid label,
.project-editor-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #6f7790;
  font-size: 12px;
  font-weight: 620;
}
.project-editor-grid .wide { grid-column: 1 / -1; }
.project-editor-field > span { line-height: 1.3; }
.project-status-select { width: 150px; }
.project-status-select .menu-select-popover { right: auto; left: 0; width: 190px; }
.project-owner-select { width: min(100%, 230px); }
.project-owner-select .menu-select-popover { right: auto; left: 0; width: 240px; }
.project-editor-grid input,
.project-editor-grid select,
.project-editor-grid textarea {
  width: 100%;
  border: 1px solid #d2d6e1;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #293455;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.project-editor-grid input, .project-editor-grid select { height: 42px; padding: 0 11px; }
.project-editor-grid textarea {
  min-height: 118px;
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.65;
}
.project-editor-grid input:focus, .project-editor-grid select:focus, .project-editor-grid textarea:focus { border-color: rgba(0, 37, 148, 0.55); box-shadow: 0 0 0 3px rgba(0, 37, 148, 0.08); }
.project-editor-grid textarea::placeholder { color: #a3a9b9; }
.project-period {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.project-period legend {
  margin-bottom: 7px;
  padding: 0;
  color: #6f7790;
  font-size: 12px;
  font-weight: 620;
}
.project-period > div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 11px;
}
.project-period i {
  padding-bottom: 12px;
  color: #9197aa;
  font-size: 12px;
  font-style: normal;
}
.project-period label span { color: #8a91a5; font-size: 12px; font-weight: 540; }
.project-editor-form > footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 2px;
}
.project-editor-form > footer button {
  min-width: 84px;
  height: 40px;
  padding: 0 17px;
  border: 1px solid #d6d9e3;
  border-radius: 8px;
  background: #fff;
  color: #535d7a;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.project-editor-form > footer .save-button { border-color: var(--accent); background: var(--accent); color: #fff; }
.project-editor-form > footer button:disabled { cursor: default; opacity: 0.55; }
.experiment-detail-actions { display: flex; align-items: center; gap: 9px; }
.experiment-detail-actions > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #cfd4e3;
  border-radius: 6px;
  background: #f1f3f8;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 630;
  cursor: pointer;
}
.library-search { margin-bottom: 10px !important; }
.library-type-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 14px 12px;
  color: #7e859b;
  font-size: 12px;
}
.library-type-filter select {
  height: 33px;
  padding: 0 8px;
  border: 1px solid #dbdee7;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: #404b6b;
  font-size: 12px;
}
.library-list-item {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 105px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid #e9ebef;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.library-list-item:hover, .library-list-item.active { background: #eef0f7; }
.library-kind-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e5e9f3;
  color: var(--accent-dark);
}
.library-list-item > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.library-list-item small { color: #81889e; font-size: 12px; }
.library-list-item strong {
  overflow: hidden;
  margin-top: 5px;
  color: #273255;
  font-size: 13px;
  font-weight: 660;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-list-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: #717991;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.library-list-item > svg { color: #939aad; }
.library-detail-meta {
  display: grid;
  grid-template-columns: 1fr 0.55fr 1.2fr;
  gap: 1px;
  padding: 1px;
  border-bottom: 1px solid #e3e5ec;
  background: #e4e6ed;
}
.library-detail-meta > div {
  min-width: 0;
  min-height: 76px;
  padding: 15px 17px;
  background: #fff;
}
.library-detail-meta span { display: block; color: #82899f; font-size: 12px; }
.library-detail-meta strong {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  color: #3b4667;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-document-content { padding: 24px 29px 34px; }
.library-document-content pre {
  margin: 0;
  color: #404a68;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.library-import-drawer { width: min(550px, calc(100vw - 42px)); }
.library-import-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 15px;
  overflow: auto;
  padding: 24px 29px 28px;
}
.import-safety-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  padding: 12px 13px;
  border-radius: 8px;
  background: #edf0f8;
  color: var(--accent-dark);
}
.import-safety-note p { margin: 0; }
.import-safety-note strong { display: block; font-size: 12px; }
.import-safety-note span {
  display: block;
  margin-top: 4px;
  color: #6c7181;
  font-size: 12px;
  line-height: 1.55;
}
.file-drop {
  position: relative;
  display: flex;
  min-height: 135px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px dashed #bfc4d3;
  border-radius: 10px;
  background: #fafbfc;
  color: #82899e;
  text-align: center;
  cursor: pointer;
}
.file-drop:hover { border-color: #7688bf; background: #f3f5fa; }
.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop svg { color: var(--accent-dark); }
.file-drop strong { margin-top: 9px; color: #3c4768; font-size: 12px; }
.file-drop span { margin-top: 5px; font-size: 12px; }
.import-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #757d94;
  font-size: 12px;
}
.import-field input,
.import-field select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d6dae4;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  color: #303b5e;
  font-size: 12px;
}
.stage-import-button {
  height: 39px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 660;
  cursor: pointer;
}
.stage-import-button:disabled { opacity: 0.48; }
.import-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dfe2ea;
  border-radius: 9px;
  background: #fcfbfd;
}
.import-preview > header { display: flex; align-items: center; gap: 9px; }
.import-preview > header strong {
  overflow: hidden;
  color: #384366;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.import-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 4px;
  background: #e7eaf4;
  color: #08257d;
  font-size: 12px;
}
.import-preview > p {
  margin: 0;
  color: #666f89;
  font-size: 12px;
  line-height: 1.6;
}
.import-preview pre {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 11px;
  border: 1px solid #e2e4eb;
  border-radius: 6px;
  background: #fff;
  color: #5b5278;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.library-import-body > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
}
.library-import-body > footer button {
  height: 38px;
  padding: 0 15px;
  border: 1px solid #d7dae3;
  border-radius: 7px;
  background: #fff;
  color: #545e7b;
  font-size: 12px;
  font-weight: 630;
  cursor: pointer;
}
.library-import-body > footer .save-button { border-color: var(--accent); background: var(--accent); color: #fff; }
.toast {
  position: fixed;
  right: 26px;
  bottom: 25px;
  max-width: 390px;
  padding: 12px 16px;
  border: 1px solid rgba(208, 211, 222, 0.82);
  border-radius: 9px;
  background: rgba(17, 27, 57, 0.92);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 14px 34px rgba(19, 30, 65, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease,
    transform 180ms ease;
  z-index: 300;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.app-dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 27, 57, 0.38);
}
.app-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: min(620px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid #dfe4ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(23, 33, 64, 0.2), 0 4px 14px rgba(23, 33, 64, 0.08);
  color: var(--ink);
}
.app-dialog-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 26px 26px 22px;
}
.app-dialog-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-pale);
  color: var(--accent-dark);
}
.app-dialog-warning .app-dialog-icon { background: var(--warning-pale); color: var(--warning); }
.app-dialog-danger .app-dialog-icon { background: var(--danger-pale); color: var(--danger); }
.app-dialog h2 {
  margin: 1px 0 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.app-dialog p {
  max-height: min(360px, calc(100dvh - 220px));
  margin: 0;
  overflow: auto;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.app-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}
.app-dialog button {
  min-width: 88px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 120ms ease;
}
.app-dialog button:active { transform: scale(0.98); }
.app-dialog-cancel {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}
.app-dialog-cancel:hover { border-color: #b9c2d3; background: var(--surface-soft); color: var(--ink); }
.app-dialog-primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}
.app-dialog-primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.app-dialog-danger .app-dialog-primary { border-color: var(--danger); background: var(--danger); }
.app-dialog-danger .app-dialog-primary:hover { border-color: #a9231e; background: #a9231e; }
.app-dialog button:focus-visible { outline: 3px solid rgba(47, 84, 235, 0.24); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .app-dialog-layer { animation: app-dialog-fade 160ms ease-out; }
}
@keyframes app-dialog-fade { from { opacity: 0; } to { opacity: 1; } }
.drawer-trash-button,
.move-to-trash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #f1caca;
  border-radius: 8px;
  background: #fff7f7;
  color: #b53d3d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.drawer-trash-button { min-height: 36px; padding: 0 11px; }
.move-to-trash { min-height: 34px; padding: 0 10px; }
.drawer-trash-button:hover, .move-to-trash:hover { border-color: #e7abab; background: #fff0f0; }
.drawer-trash-button:disabled, .move-to-trash:disabled { cursor: default; opacity: 0.5; }
.detail-hero-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.drawer-action-error {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 28px;
  border-bottom: 1px solid #f1cece;
  background: #fff7f7;
  color: #a73c3c;
  font-size: 13px;
}
/* Recycle bin */
.trash-page { min-width: 0; min-height: calc(100dvh - 66px); padding-bottom: 48px; }
.trash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  border-bottom-color: var(--line);
}
.trash-header h1 {
  margin: 5px 0 7px;
  line-height: 1.08;
  color: var(--ink);
  font-size: 26px;
  letter-spacing: -0.6px;
}
.trash-header > div:first-child > p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.trash-metrics { display: flex; gap: 10px; }
.trash-metrics > div {
  display: flex;
  flex-direction: column;
  min-width: 92px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}
.trash-metrics strong { color: var(--ink); font-size: 23px; }
.trash-metrics span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.trash-workspace { display: grid; gap: 14px; padding: 24px; }
.trash-toolbar {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
}
.trash-toolbar > span {
  justify-self: end;
  padding-right: 5px;
  color: var(--muted);
  font-size: 12px;
}
.trash-filter {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.trash-filter button {
  min-width: 62px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #636c86;
  cursor: pointer;
  font-size: 12px;
}
.trash-filter button.active {
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow: 0 1px 3px rgba(22, 33, 68, 0.1);
  font-weight: 650;
}
.trash-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 37px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.trash-search:focus-within { border-color: rgba(0, 37, 148, 0.45); box-shadow: 0 0 0 3px rgba(0, 37, 148, 0.08); }
.trash-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}
.trash-list { min-height: 390px; overflow: hidden; }
.trash-item {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.trash-item:last-child { border-bottom: 0; }
.trash-item:hover { background: #fcfbfd; }
.trash-item-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #eef0f6;
  color: var(--accent-dark);
}
.trash-item-icon.document { background: #f1f4f7; color: #596485; }
.trash-item-icon.external_product { background: #eaf7f2; color: #16785e; }
.trash-item-copy { min-width: 0; }
.trash-item-copy > span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.trash-item-copy h2, .trash-item-copy p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-item-copy h2 { margin: 4px 0; color: #17244a; font-size: 16px; }
.trash-item-copy p { margin: 0; color: #5f6883; font-size: 13px; }
.trash-item-copy small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #939aad;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trash-item > time { color: #81889e; font-size: 12px; white-space: nowrap; }
.trash-item-actions { display: flex; gap: 7px; }
.trash-batch-actions, .trash-selection, .trash-item-leading { display: flex; align-items: center; gap: 12px; }
.trash-batch-actions { flex-wrap: wrap; padding: 12px 18px; font-size: 13px; }
.trash-selection input,
.trash-item-leading input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.trash-batch-actions > span { color: var(--muted); }
.trash-batch-actions .trash-item-actions { margin-left: auto; }
.trash-action-error {
  padding: 12px 18px;
  border: 1px solid #efcaca;
  border-radius: 8px;
  background: #fff7f7;
  color: #b84040;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.trash-item-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #bfc7de;
  border-radius: 7px;
  background: var(--accent-wash);
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}
.trash-item-actions button.danger { border-color: #efcaca; background: #fff7f7; color: #b84040; }
.trash-item-actions button:disabled { cursor: default; opacity: 0.5; }
.trash-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 388px;
  padding: 40px;
  text-align: center;
}
.trash-empty > span {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #f0f1f5;
  color: #81889e;
}
.trash-empty h2 { margin: 14px 0 5px; font-size: 18px; }
.trash-empty p { margin: 0; color: var(--muted); font-size: 13px; }
.trash-skeleton { height: 82px; margin: 15px 20px; }
/* AI provider settings */
.ai-settings-page {
  min-width: 0;
  min-height: calc(100dvh - 76px);
  padding: 26px 28px 118px;
  background: var(--page-bg);
}
.ai-settings-card {
  display: grid;
  width: 100%;
  gap: 26px;
  padding: 34px 34px 30px;
  background: #fff;
  border-radius: 14px;
  max-width: 1000px;
  margin: 0 auto;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.ai-profile-switch { display: flex; flex-wrap: wrap; gap: 8px; max-width: 1000px; margin: 0 auto 20px; }
.ai-profile-switch button { padding: 12px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); color: var(--ink); cursor: pointer; font: inherit; }
.ai-profile-switch button[aria-pressed="true"] { background: var(--accent-pale); border-color: var(--accent); color: var(--accent-dark); }
.ai-profile-heading h2 { margin: 0 0 10px; font-size: 22px; }
.ai-profile-heading p { color: var(--muted); line-height: 1.65; margin: 8px 0 14px; }
.ai-settings-fields { display: grid; gap: 25px; }
.ai-field {
  display: grid;
  gap: 10px;
  color: #313b57;
  font-size: 15px;
  font-weight: 680;
}
.ai-field input,
.ai-field select,
.ai-model-control {
  width: 100%;
  height: 58px;
  padding: 0 17px;
  border: 1px solid #bdc0c9;
  border-radius: 11px;
  outline: 0;
  background: #fffefd;
  color: #182346;
  font-family: inherit;
  font-weight: 560;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.ai-field input, .ai-field select { font-size: 17px; }
.ai-model-control { font-size: 15px; }
.ai-model-select { width: min(100%, 320px); }
.ai-model-select .menu-select-trigger { height: 48px; padding: 0 14px; font-size: 15px; }
.ai-model-select .menu-select-popover { right: auto; left: 0; width: min(280px, calc(100vw - 24px)); }
.ai-field input:focus, .ai-field select:focus, .ai-model-control:focus { border-color: rgba(0, 37, 148, 0.68); box-shadow: 0 0 0 4px rgba(0, 37, 148, 0.08); }
.ai-secret-input { position: relative; }
.ai-secret-input input { padding-right: 58px; }
.ai-secret-input button {
  position: absolute;
  top: 7px;
  right: 8px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6c748e;
  cursor: pointer;
}
.ai-secret-input button:hover { background: #edeff5; color: var(--accent-dark); }
.ai-model-field { display: grid; gap: 10px; }
.ai-model-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.ai-model-label > strong { color: #313b57; font-size: 15px; font-weight: 680; }
.ai-model-label > div { display: flex; align-items: center; gap: 19px; }
.ai-model-label button {
  height: auto;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 570;
}
.ai-model-label button.active { font-weight: 720; text-decoration: underline; text-underline-offset: 4px; }
.ai-model-field > p {
  margin: 0;
  color: #687086;
  font-size: 12px;
  line-height: 1.55;
}
.ai-parameter-card {
  display: grid;
  gap: 16px;
  min-height: 125px;
  align-content: center;
  padding: 24px 30px;
  border: 1px solid #d6dfda;
  border-radius: 12px;
  background: #f2f5f2;
}
.ai-parameter-card strong { color: #172243; font-size: 16px; }
.ai-parameter-card p {
  margin: 0;
  color: #4d5672;
  font-size: 14px;
  line-height: 1.65;
}
.ai-settings-card button {
  display: inline-flex;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 20px;
  border: 1px solid #c8c6d0;
  background: #fff;
  color: #505a79;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  border-radius: 10px;
}
.ai-settings-card button:disabled { cursor: default; opacity: 0.55; }
.ai-settings-card .primary-button { border-color: var(--accent); background: var(--accent); color: #fff; }
.ai-settings-card .primary-button:hover:not(:disabled) { background: var(--accent-dark); }
.ai-settings-card .secondary-button:hover:not(:disabled) { color: var(--accent-dark); background: var(--accent-wash); border-color: #aac8eb; }
.ai-settings-error,
.ai-test-result {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 9px;
  font-size: 12px;
}
.ai-settings-error { border: 1px solid #f0d4d4; background: var(--danger-pale); color: var(--danger); }
.ai-test-result { border: 1px solid #cfd4e4; background: #eff1f8; color: #293f80; }
.ai-test-result div { display: grid; gap: 3px; }
.ai-test-result strong { font-size: 12px; }
.ai-test-result span { color: #525b75; }
.ai-test-result small { color: #8b7855; line-height: 1.5; }
.ai-advanced-settings { border-top: 1px solid #d8dae0; }
.ai-advanced-settings summary {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 23px 0 4px;
  color: #172243;
  cursor: pointer;
  list-style: none;
}
.ai-advanced-settings summary::-webkit-details-marker { display: none; }
.ai-advanced-settings summary > svg { transition: transform 150ms ease; }
.ai-advanced-settings[open] summary > svg { transform: rotate(90deg); }
.ai-advanced-settings summary strong { font-size: 15px; }
.ai-advanced-settings summary span { color: #71788d; font-size: 13px; }
.ai-advanced-settings > div { display: grid; gap: 8px; padding: 14px 24px 6px; }
.ai-advanced-settings p,
.ai-advanced-settings small {
  margin: 0;
  color: #616980;
  font-size: 12px;
  line-height: 1.65;
}
.ai-advanced-settings code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #edeef2;
  color: #313c5f;
  font-family: Consolas, monospace;
}
.ai-settings-action-dock {
  position: fixed;
  right: 24px;
  bottom: 19px;
  z-index: 12;
  display: flex;
  gap: 10px;
  padding: 11px;
  border: 1px solid #d5d7de;
  background: rgba(255, 254, 253, 0.96);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  box-shadow: var(--popover-shadow);
}
.ai-settings-action-dock button { min-width: 118px; }
.ai-settings-action-dock .primary-button { min-width: 142px; }
/* Authentication and account administration */
.auth-loading {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: #f4f5f7;
  color: #606880;
}
.auth-loading .chem-logo { transform: scale(1.25); }
/* Team research dashboard */
.admin-research-page {
  min-width: 0;
  min-height: calc(100vh - var(--topbar-height));
  padding: 20px 24px;
  background: transparent;
}
.admin-research-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  max-width: 1420px;
  margin: 0 auto 20px;
}
.admin-research-hero > div:first-child > p {
  margin: 0;
  color: #1c3b9a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.7px;
}
.admin-research-hero h1 {
  margin: 8px 0 7px;
  color: var(--ink);
  font-size: 26px;
  letter-spacing: -0.6px;
}
.admin-research-hero > div:first-child > span { color: #71788d; font-size: 14px; }
.admin-research-totals {
  display: flex;
  overflow: hidden;
  border: 1px solid #d6d9e1;
  border-radius: 12px;
  background: #fff;
}
.admin-research-totals div {
  min-width: 104px;
  display: grid;
  gap: 2px;
  padding: 11px 16px;
  text-align: center;
}
.admin-research-totals div + div { border-left: 1px solid #e0e2e8; }
.admin-research-totals strong { color: #172243; font-size: 20px; }
.admin-research-totals span { color: #82889a; font-size: 12px; }
.admin-owner-categories {
  max-width: 1420px;
  display: flex;
  gap: 8px;
  margin: 0 auto 18px;
}
.admin-owner-categories button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.admin-owner-categories button.active {
  border-color: var(--accent-dark);
  background: var(--accent-wash);
  color: var(--accent-dark);
  font-weight: 700;
}
.admin-owner-categories button span {
  min-width: 20px;
  text-align: center;
  font-size: 12px;
}
.admin-owner-toolbar {
  max-width: 1420px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto 18px;
}
.admin-owner-toolbar label {
  width: min(420px, 50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #d2d5df;
  border-radius: 9px;
  background: #fff;
  color: #788098;
}
.admin-owner-toolbar input {
  width: 100%;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #26304e;
  font: inherit;
}
.admin-owner-toolbar > span { color: #7a8195; font-size: 12px; }
.admin-owner-grid {
  max-width: 1420px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin: auto;
}
.admin-owner-pagination {
  max-width: 1420px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 13px;
}
.admin-owner-pagination > div { display: flex; gap: 8px; }
.admin-owner-pagination button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-dark);
  font: inherit;
  cursor: pointer;
}
.admin-owner-pagination button:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.admin-owner-pagination button:not(:disabled):hover { background: var(--accent-wash); }
.admin-owner-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid #d8dbe3;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 160ms ease, box-shadow 160ms ease;
  border-radius: 14px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.admin-owner-card:hover {
  transform: none;
  box-shadow: none;
  border-color: #a5b1d5;
  background: var(--accent-wash);
}
.admin-owner-card:active { transform: scale(.985); }
.project-workspace-content { min-width: 0; }
.admin-owner-card > header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 17px;
}
.admin-owner-card > header > svg { color: #8c93a6; }
.admin-owner-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 850;
  background: var(--accent-pale);
  color: var(--accent-dark);
}
.admin-owner-identity { min-width: 0; display: grid; gap: 4px; }
.admin-owner-identity strong, .admin-owner-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-owner-identity strong { font-size: 17px; color: var(--ink); }
.admin-owner-identity small { font-size: 12px; color: var(--muted); }
.admin-owner-card > header em {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f2f2f3;
  color: #848998;
  font-size: 12px;
  font-style: normal;
}
.admin-owner-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 18px;
  border: 1px solid #e0e2e8;
  border-radius: 0;
  background: transparent;
}
.admin-owner-metrics span {
  display: grid;
  gap: 1px;
  padding: 10px 8px;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}
.admin-owner-metrics span + span { border-left: 1px solid #e5e3e9; }
.admin-owner-metrics b { font-size: 17px; color: var(--ink); }
.admin-owner-preview {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 1px;
  padding: 14px 20px;
}
.admin-owner-preview > span {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  color: #4d5672;
  font-size: 12px;
}
.admin-owner-preview > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #aeb3c2;
}
.admin-owner-preview > span small { font-size: 12px; color: var(--muted); }
.admin-owner-preview p {
  margin: 22px 0 0;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}
.admin-owner-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid #e5e7ec;
  background: transparent;
  flex-wrap: wrap;
}
.admin-owner-card > footer span { font-size: 12px; color: var(--muted); }
.admin-owner-card > footer strong { font-size: 12px; color: var(--accent-dark); }
.admin-owner-card.skeleton {
  min-height: 270px;
  border-color: transparent;
  background: linear-gradient(100deg, #edeef2 20%, #f7f8f9 40%, #edeef2 60%);
  background-size: 200% 100%;
  animation: data-shimmer 1.3s infinite linear;
  cursor: default;
}
.admin-owner-empty {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px dashed #cdd0db;
  border-radius: 13px;
  color: #8a90a2;
}
.admin-owner-empty strong { color: #49526d; }
.admin-research-error {
  max-width: 1420px;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 60px;
  border: 1px solid #efd2d2;
  border-radius: 13px;
  background: #fff7f6;
  color: #a94d4d;
}
.admin-research-error p { margin: 0; }
.admin-owner-scope {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  border-bottom: 1px solid #dedce6;
  background: #f4f5f8;
  color: #71788e;
  font-size: 12px;
  flex-wrap: wrap;
}
.admin-owner-scope button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #cbcfda;
  border-radius: 7px;
  background: #fff;
  color: #3f4862;
  cursor: pointer;
}
.admin-owner-scope button:hover { border-color: #7f90c3; color: #082479; }
.admin-owner-scope > i { width: 1px; height: 18px; background: #cfd2db; }
.admin-owner-scope strong { color: #293454; }
.collection-header > div, .record-modal-header > div { min-width: 0; }
#experiment-rounds { scroll-margin-top: 84px; }
.record-modal-actions .drawer-close-button {
  padding: 0;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
}
.drawer-close-button svg { flex-shrink: 0; }
.ai-settings-card .ai-secret-input button { padding: 0; }
.ai-secret-input button svg { flex-shrink: 0; }
.sheet-toolbar > div + div { padding-left: 8px; border-left: 1px solid var(--line); }
.experiment-ai-result p { font-size: 13px; line-height: 1.8; }
/* Application header, navigation and account menus */
/* Project directory, heading and contextual tools */
.workspace-layout { display: grid; grid-template-columns: var(--project-directory-width) minmax(0, 1fr); }
.workspace-directory {
  position: sticky;
  top: var(--topbar-height);
  align-self: start;
  z-index: 15;
  display: flex;
  flex-direction: column;
  width: var(--project-directory-width);
  height: calc(var(--app-viewport-height) - var(--topbar-height));
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-right: 1px solid var(--line);
}
.workspace-directory::-webkit-scrollbar { display: none; }
.workspace-body { grid-column: 2; min-width: 0; }
.project-rail {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 25px 10px 16px;
}
.rail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 17px 14px;
}
.rail-title strong { color: var(--ink); font-weight: 650; font-size: 20px; white-space: nowrap; }
.rail-title button, .rail-search { border: 1px solid var(--line-strong); background: #fff; align-items: center; }
.rail-title button {
  place-items: center;
  padding: 0;
  border-radius: 10px;
  box-shadow: var(--control-shadow);
  cursor: pointer;
  display: flex;
  justify-content: center;
  gap: 5px;
  width: 88px;
  height: 42px;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}
.rail-search {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--muted);
  margin: 0 6px 15px;
}
.rail-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.rail-search:focus-within { border-color: var(--accent); }
.project-rail-pagination {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  margin: 0 6px 12px;
  color: var(--muted);
  font-size: 12px;
}
.project-rail-pagination > span { min-width: 0; text-align: center; white-space: nowrap; }
.project-rail-pagination button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--accent-dark);
  cursor: pointer;
}
.project-rail-pagination button:first-child svg { transform: rotate(180deg); }
.project-rail-pagination button:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.project-rail-pagination button:not(:disabled):hover { background: var(--accent-wash); }
.project-list { display: grid; min-width: 0; gap: 3px; }
.project-list-item {
  position: relative;
  display: grid;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 12px 18px;
  border-radius: 10px;
}
.project-list-item > span { min-width: 0; display: grid; gap: 5px; }
.project-list-item strong {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  font-size: 15px;
}
.project-list-item small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.project-list-item.active::before {
  position: absolute;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  content: "";
  top: 6px;
  bottom: 6px;
}
.project-list-empty { margin: 20px 10px; color: var(--muted); font-size: 14px; }
.project-rail footer {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  padding: 22px 6px 0;
}
.workspace-directory .admin-owner-scope {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 12px 22px 24px;
  border: 0;
  background: transparent;
}
.workspace-directory .admin-owner-scope > :not(button) { display: none; }
.workspace-directory .admin-owner-scope button {
  padding: 6px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}
.project-header { border: 0; padding: 3px 28px 0; background: transparent; }
.project-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}
.project-heading-row > div:first-child { min-width: 0; }
.project-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.project-title-line h1 {
  margin: 0;
  color: var(--ink);
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
  font-size: 26px;
  letter-spacing: -.5px;
}
.project-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 8px;
  font-size: 13px;
}
.project-meta i { color: #c7c7cc; font-style: normal; }
.project-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-top: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.project-utility-actions { display: contents; }
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--accent-dark);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease;
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  box-shadow: 0 4px 12px #00238d1c;
}
.primary-action:hover:not(:disabled) { background: var(--accent-dark); }
.primary-action:disabled { opacity: 0.5; cursor: default; }
.project-context-bar, .project-tabs { padding: 0; border-radius: 0; background: transparent; }
.project-context-bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  min-height: 46px;
  margin-top: 8px;
}
.project-tabs {
  display: inline-flex;
  align-items: stretch;
  margin: 0;
  height: 46px;
  gap: 10px;
  border: 0;
}
.project-tabs button {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  min-width: 88px;
  padding: 0 18px;
  border-radius: 0;
  font-size: 14px;
  white-space: nowrap;
}
.project-tabs button.active {
  color: var(--accent-dark);
  font-weight: 650;
  background: transparent;
  box-shadow: none;
}
.project-tabs button.active::after {
  position: absolute;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
  left: 0;
  right: 0;
  bottom: -1px;
}
.right-rail {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.context-popover { position: relative; }
.context-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--control-shadow);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
  height: 42px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.context-trigger > svg:last-child { transform: rotate(90deg); }
.context-trigger[aria-expanded="true"] > svg:last-child { transform: rotate(-90deg); }
.context-trigger:hover, .context-trigger[aria-expanded="true"] { border-color: #a1a1a6; background: #fff; color: var(--accent-dark); }
.context-popover-panel {
  position: absolute;
  z-index: 90;
  right: 0;
  top: calc(100% + 10px);
  width: 332px;
  max-width: calc(100vw - 32px);
  max-height: min(600px, calc(100dvh - 220px));
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--popover-shadow);
}
.context-popover-panel[hidden] { display: none; }
.context-popover-panel:focus { outline: none; }
.key-info {
  min-height: 0;
  padding: 14px 14px 8px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.key-info header,
.ai-assistant header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.key-info h2,
.ai-assistant h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
}
.key-info footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.key-info footer button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f5f5f7;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.key-info footer button:hover { background: var(--accent-wash); color: var(--accent-dark); }
.project-property-details { margin-top: 8px; }
.project-property-details summary {
  padding: 6px 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.project-property-details dl { margin-top: 6px; }
.key-info dl { display: grid; margin: 14px 0 0; }
.key-info dl > div {
  display: grid;
  grid-template-columns: 74px minmax(0,1fr);
  align-items: start;
  gap: 14px;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.6;
}
.key-info dt { color: var(--muted); }
.key-info dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.key-info .accent-text { color: var(--text); }
.assistant-popover .context-popover-panel { width: 366px; }
.ai-assistant {
  min-height: 0;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.ai-assistant header > div { display: flex; align-items: center; gap: 9px; }
.ai-assistant header svg { color: var(--accent-dark); }
.ai-assistant header button {
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.assistant-prompts { display: grid; gap: 0; margin: 16px 0; }
.assistant-prompts button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
}
.assistant-prompts button:hover { background: var(--accent-wash); }
.assistant-prompts svg { flex-shrink: 0; color: var(--accent-dark); }
.assistant-answer {
  max-height: 240px;
  overflow: auto;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #f5f5f7;
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assistant-answer.loading { color: var(--muted); }
.assistant-input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 9px 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
}
.assistant-input input {
  min-width: 0;
  flex: 1;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.assistant-input button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
}
.assistant-input button:disabled { opacity: 0.35; cursor: default; }
.workspace-canvas {
  display: block;
  min-width: 0;
  scroll-margin-top: 140px;
  padding: 14px 24px 28px;
}
.workspace-center { min-width: 0; }
.workspace-body { position: relative; }
.workspace-switch-notice { position: absolute; top: 4px; right: 28px; z-index: 10; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 40px); padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); color: var(--muted); font-size: 12px; }
.workspace-switch-notice span { overflow-wrap: anywhere; }
.workspace-switch-notice button { flex-shrink: 0; border: 0; background: transparent; color: var(--accent); font: inherit; cursor: pointer; }
.pending-region { position: relative; }
.pending-region-notice { position: absolute; z-index: 2; right: 12px; top: 4px; padding: 4px 8px; border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 12px; }
/* Project summary and experiment timeline */
.overview-summary {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  background: transparent;
}
.overview-summary h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.3px;
}
.summary-text {
  margin: 0;
  max-width: 72em;
  max-height: 180px;
  overflow: auto;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.summary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.summary-experiment {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow);
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  padding: 20px 21px;
}
.summary-round-selector {
  flex: 0 0 176px;
  width: 176px;
  min-width: 0;
  max-width: 176px;
  margin: 0;
}
.summary-round-selector .menu-select-trigger { height: 42px; border-color: #cbd5e5; background: #fbfcff; }
.summary-round-selector .menu-select-popover { width: min(230px, calc(100vw - 24px)); max-height: min(338px, calc(100dvh - 120px)); }
.summary-record-link {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}
.summary-record-link > strong {
  line-height: 1.45;
  font-weight: 650;
  overflow-wrap: anywhere;
  font-size: 22px;
  letter-spacing: -.3px;
}
.summary-record-meta {
  grid-column: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  gap: 8px 12px;
  font-size: 13px;
  line-height: 1.7;
}
.summary-record-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #516fc9;
  border-radius: 10px;
  background: #f7f9ff;
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.summary-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin: 16px 0 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.summary-fields > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 142px;
  padding: 18px 19px;
  border: 1px solid #f0f3f8;
  border-radius: 10px;
  background: #f3f6fa;
}
.summary-fields dt {
  margin: 0;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}
.summary-fields dd {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  color: var(--text);
  padding: 10px 5px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: #a7afbd transparent;
}
.summary-field-content { display: block; }
.summary-fields dd::-webkit-scrollbar { width: 6px; }
.summary-fields dd::-webkit-scrollbar-track { background: transparent; }
.summary-fields dd::-webkit-scrollbar-thumb { border-radius: 999px; background: #a7afbd; }
.summary-fields dd::-webkit-scrollbar-thumb:hover { background: #7f8999; }
.summary-fields dd.is-overflowing:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.summary-text.summary-muted, .summary-fields .summary-muted { color: var(--muted); }
.summary-empty { padding: 12px 0; color: var(--muted); font-size: 14px; }
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin-bottom: 15px;
}
.timeline-header h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
}
.timeline-header > div:first-child { min-width: 0; }
.timeline-header > div:first-child > p {
  margin: 5px 0 0 40px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.experiment-series-list { display: grid; gap: 22px; }
.experiment-series {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dfe5ef;
  border-radius: 16px;
  background: #f3f6fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78), 0 5px 16px rgba(38, 57, 96, .045);
}
.experiment-series-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 8px 8px 5px;
  border: 0;
  background: transparent;
}
.experiment-series-copy {
  min-width: 0;
  padding-left: 13px;
  border-left: 3px solid #4066d7;
}
.experiment-series-copy > span {
  display: block;
  margin-bottom: 3px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.experiment-series-copy h3 {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.experiment-series-copy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.experiment-series-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.experiment-series-actions > button,
.experiment-series-empty > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #b7c3e5;
  border-radius: 9px;
  background: #fff;
  color: var(--accent-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.experiment-series-actions > button:hover,
.experiment-series-empty > button:hover { border-color: var(--accent); background: var(--accent-wash); transform: translateY(-1px); }
.experiment-series-actions > button.series-delete-button {
  border-color: #ead0ce;
  color: #a9473f;
}
.experiment-series-actions > button.series-delete-button:hover:not(:disabled) {
  border-color: #d99a95;
  background: #fff5f4;
  color: var(--danger);
}
.experiment-series-actions > button:disabled { cursor: default; opacity: .55; transform: none; }
.experiment-series .timeline-columns {
  border-color: #dfe5ef;
  border-radius: 11px 11px 0 0;
  background: #e9eef7;
}
.experiment-series .timeline-list {
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-top: 0;
  border-radius: 0 0 11px 11px;
  background: #fff;
}
.experiment-series .timeline-grid {
  border: 0;
  border-radius: 0;
}
.experiment-series-empty {
  display: grid;
  justify-items: center;
  gap: 13px;
  padding: 34px 20px;
  border: 1px dashed #b7c3e5;
  border-radius: 12px;
  background: #f8f9fd;
  color: var(--muted);
  text-align: center;
}
.experiment-series-empty p { margin: 0; }
.view-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.view-toggle button {
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  height: 32px;
  padding: 0 13px;
  font: inherit;
  font-size: 14px;
}
.timeline {
  display: grid;
  gap: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0,1fr) 100px;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 94px;
  padding: 16px 20px 16px 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.timeline-card:last-child { border-bottom: 0; }
.timeline-card:hover { background: #f5f5f7; }
.timeline-card:focus-visible { outline-offset: -3px; }
.timeline-node {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  top: 28px;
  left: 18px;
  background: var(--accent);
}
.timeline-node.node-running { background: var(--warning); }
.timeline-node.node-completed { background: var(--success); }
.round-meta { display: grid; gap: 6px; min-width: 0; }
.round-meta strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.round-meta small, .round-meta time { color: var(--muted); font-size: 12px; line-height: 1.4; }
.experiment-copy { min-width: 0; }
.experiment-copy h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.experiment-copy p {
  overflow: hidden;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.experiment-copy .experiment-result { margin-bottom: 0; }
.experiment-result strong { color: var(--text); font-weight: 550; }
.experiment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
}
.experiment-badge {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 11px;
  font-size: 13px;
}
.timeline.timeline-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.timeline-columns {
  display: grid;
  border-radius: 9px 9px 0 0;
  color: var(--muted);
  grid-template-columns: 110px minmax(0,1fr) 170px 165px 120px;
  gap: 16px;
  padding-left: 38px;
  padding-right: 18px;
  padding-top: 14px;
  padding-bottom: 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #f2f5f9;
  font-size: 13px;
}
.timeline-columns[hidden] { display: none; }
.timeline-list { border-radius: 0 0 10px 10px; border: 1px solid var(--line); }
.timeline-list .timeline-card {
  grid-template-rows: auto;
  padding-top: 12px;
  padding-bottom: 12px;
  grid-template-columns: 110px minmax(0,1fr) 170px 165px 120px;
  gap: 16px;
  padding-left: 38px;
  padding-right: 18px;
  min-height: 64px;
  background: white;
}
.timeline-list .round-meta { display: contents; }
.timeline-list .round-meta strong { grid-column: 1; grid-row: 1; }
.timeline-list .round-meta time {
  grid-row: 1;
  align-self: center;
  grid-column: 4;
  font-size: 13px;
}
.timeline-list .experiment-copy { grid-column: 2; grid-row: 1; }
.timeline-list .experiment-copy h3 { margin: 0; }
.timeline-list .experiment-copy p { display: none; }
.timeline-list .experiment-actions { grid-row: 1; grid-column: 5; justify-content: space-between; }
.timeline-grid .timeline-card {
  grid-template-columns: minmax(0,1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid #dfe5ef;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(38, 57, 96, .035);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.timeline-grid .timeline-card:hover {
  z-index: 1;
  border-color: #bdcaeb;
  background: #fbfcff;
  box-shadow: 0 8px 20px rgba(38, 57, 96, .085);
  transform: translateY(-2px);
}
.timeline-grid .timeline-card:active { transform: translateY(0); }
.timeline-grid .timeline-node { display: none; }
.timeline-grid .round-meta { padding-right: 100px; }
.timeline-grid .experiment-actions { position: absolute; right: 16px; top: 18px; }
.next-round-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--accent-dark);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  height: 55px;
  margin-top: 17px;
  border: 1px dashed #b7c3e5;
  background: #f8f9fd;
  font-weight: 600;
}
.badge-running, .badge-planned, .badge-draft,
.status-pill.status-running, .status-pill.status-planned, .status-pill.status-draft {
  background: var(--warning-pale);
  color: var(--warning);
}
.badge-completed, .status-pill.status-completed, .import-status.status-confirmed { background: var(--success-pale); color: var(--success); }
.import-status.status-duplicate { background: var(--warning-pale); color: var(--warning); }
.status-pill.status-invalid, .import-status.status-failed { background: var(--danger-pale); color: var(--danger); }
.product-list-item.active { background: var(--accent-pale); }
.product-list-item:hover, .experiment-record-item:hover { background: var(--surface-soft); }
.sheet-toolbar button.active { background: var(--accent-pale); color: var(--accent-dark); border-color: #b7c1de; }
.experiment-ai-module > header .ai-analyze-button { background: var(--accent-wash); color: var(--accent-dark); border-color: #b7c1de; }
.admin-owner-preview > span i.status-active { background: var(--muted); }
.admin-owner-preview > span i.status-paused { background: var(--warning); }
.admin-owner-preview > span i.status-completed { background: var(--success); }
.collection-search input::placeholder { color: var(--muted); }
.admin-research-hero > div > p { color: var(--muted); letter-spacing: 0.8px; }
.experiment-toolbar .collection-search { border-radius: 11px; background: #fff; }
.experiment-toolbar select { font-size: 14px; }
.save-button { border-radius: 10px; }
.ai-settings-fields input { font-size: 15px; }
.import-drawer { border-radius: 18px; }
.project-workspace { background: var(--page-bg); }
.rail-title button svg { color: var(--accent); }
.project-folder { color: #8097b7; }
.project-list-item.active .project-folder { color: var(--accent); }
.project-list-item.active small { color: #31437b; }
.project-list-item:hover { background: #e7eef5; }
.project-rail footer > span { display: block; margin: 0 12px 18px; }
.rail-brand-note {
  padding: 26px 20px 22px;
  border: 1px solid #d8deef;
  border-radius: 11px;
  background: #eaedf7;
}
.rail-brand-note strong {
  display: block;
  color: #25335c;
  font-size: 19px;
  font-weight: 550;
  line-height: 1.6;
}
.rail-brand-note small {
  display: block;
  margin-top: 14px;
  color: #707da4;
  font-size: 12px;
  line-height: 1.55;
}
.project-status.status-active { background: var(--success-pale); color: var(--success); }
.project-status.status-completed { background: var(--accent-pale); color: var(--accent-dark); }
.project-status.status-paused { background: var(--warning-pale); color: var(--warning); }
.project-status.status-active::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.project-actions .right-rail { gap: 12px; }
.assistant-popover > .context-trigger { border-color: #b7c3e6; background: var(--accent-wash); color: var(--accent-dark); }
.summary-project,
.timeline-section {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow);
}
.summary-project {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-width: 0;
  padding: 20px;
}
.summary-project-body, .summary-project-body-inner { display: contents; }
.timeline-section { margin-top: 15px; padding: 18px; scroll-margin-top: 75px; }
.summary-heading,
.summary-experiment .summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 20px;
}
.overview-summary h2 svg, .summary-fields dt svg, .timeline-header h2 svg { flex-shrink: 0; color: var(--accent); }
.summary-current-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}
.summary-round-badge {
  padding: 4px 9px;
  border-radius: 15px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 13px;
  white-space: nowrap;
}
.summary-experiment:has(.summary-round-selector .menu-select-popover:not([hidden])) { z-index: 30; }
.summary-record-meta > span + span { border-left: 1px solid var(--line-strong); padding-left: 12px; }
.summary-record-link:hover > strong { color: var(--accent-dark); }
.summary-record-link:focus-visible,
.summary-record-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.summary-record-action:hover { background: var(--accent-pale); border-color: var(--accent); transform: translateY(-1px); }
.summary-record-action:active { transform: translateY(0); }
.summary-fields > div + div { border-top: 1px solid #f0f3f8; }
.summary-experiment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.summary-round-note {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.summary-round-note svg { flex-shrink: 0; color: var(--accent); }
.summary-project-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px 20px;
  margin: 0 0 18px;
}
.summary-project-details > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
}
.summary-project-details dt { color: var(--muted); flex-shrink: 0; }
.summary-project-details dd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.summary-project-details dd svg { flex-shrink: 0; }
.summary-project-details .project-status { padding: 5px 10px; font-size: 12px; }
.summary-background {
  display: grid;
  grid-template-columns: 65px minmax(0,1fr);
  gap: 14px;
  padding: 0 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.summary-background .summary-heading { display: block; margin: 0; }
.summary-background > .summary-heading { grid-column: 1; grid-row: 1; }
.summary-background h2 {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.8;
}
.summary-background .summary-text {
  display: -webkit-box;
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  max-height: 114px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}
.summary-project-stats {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0;
  min-height: 92px;
  margin-top: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #e3e8f2;
  border-radius: 10px;
  background: #f6f8fc;
}
.summary-project-stats > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 92px;
  padding: 11px 14px;
  border-right: 1px solid #e3e8f2;
  background: transparent;
}
.summary-project-stats > div:last-child { border-right: 0; }
.summary-project-stats > div > svg { flex-shrink: 0; color: var(--accent-dark); }
.summary-project-stats > div:nth-child(2) > svg { color: var(--warning); }
.summary-project-stats > div:nth-child(3) > svg { color: var(--success); }
.summary-project-stats span {
  display: flex;
  flex: 1;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.summary-project-stats strong { color: var(--ink); font-size: 18px; font-weight: 650; line-height: 1; }
.timeline-header h2 span { color: var(--text); font-size: 18px; font-weight: 400; }
.view-toggle button.active { background: var(--accent-pale); color: var(--accent-dark); box-shadow: none; }
.timeline-list .timeline-card:first-child { min-height: 64px; background: white; }
.timeline-list .timeline-card:hover { background: var(--accent-wash); }
.timeline-list .round-meta small {
  display: block;
  grid-column: 3;
  grid-row: 1;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.timeline-node.node-draft { background: var(--warning); }
.timeline-more {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-dark);
  font-size: 13px;
  white-space: nowrap;
}
.next-round-button:hover { border-color: var(--accent); background: var(--accent-wash); }
.admin-owner-avatar.admin, .admin-owner-avatar.unassigned { background: var(--accent-pale); color: var(--accent-dark); }
.project-header:has(.context-popover-panel:not([hidden])) { position: relative; z-index: 120; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
/* Responsive / accessibility: (min-width: 901px) */
@media (min-width: 901px) {
  .summary-background { align-items: start; }
  .summary-background h2 { grid-column: 1; grid-row: 1; }
  .summary-background .summary-link { grid-column: 3; grid-row: 1; }
  .summary-experiment .summary-heading { flex-wrap: wrap; }
  .timeline-list .timeline-card { padding-top: 16px; padding-bottom: 16px; }
}
/* Responsive / accessibility: (max-width: 1280px) */
@media (max-width: 1280px) {
  .collection-workspace {
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
    gap: 17px;
    padding-right: 20px;
    padding-left: 20px;
  }
  .experiment-browser-grid { grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr); }
}
/* Responsive / accessibility: (max-width: 1200px) */
@media (max-width: 1200px) {
  :root { --project-directory-width: 224px; }
  .project-title-line h1 { font-size: 26px; }
  .project-heading-row { flex-wrap: wrap; }
  .project-actions { margin-left: auto; }
  .project-header { padding: 5px 22px 0; }
  .workspace-canvas { padding: 15px 22px 28px; }
  .overview-summary { grid-template-columns: minmax(0,1fr); }
  .summary-project { grid-column: 1; grid-row: 2; }
  .summary-project-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .summary-project-stats > div { justify-content: center; }
  .summary-background .summary-text { max-height: 150px; }
  .summary-fields > div { min-height: 116px; }
  .timeline-columns,
  .timeline-list .timeline-card {
    grid-template-columns: 90px minmax(0,1fr) 130px 105px;
    gap: 10px;
    padding-left: 28px;
    padding-right: 14px;
  }
  .timeline-columns > span:nth-child(3), .timeline-list .round-meta small { display: none; }
  .timeline-list .round-meta time { grid-column: 3; font-size: 12px; }
  .timeline-list .experiment-actions { grid-column: 4; }
  .timeline-node { left: 12px; }
  .rail-title { padding-left: 7px; }
  .rail-title strong { font-size: 18px; }
  .rail-title button { width: 73px; }
}
/* Responsive / accessibility: (max-width: 1199px) */
@media (max-width: 1199px) {
  .right-rail { gap: 8px; }
  .context-trigger { padding: 0 10px; }
}
/* Responsive / accessibility: (max-width: 980px) */
@media (max-width: 980px) {
  .record-modal-workspace { grid-template-columns: minmax(0, 1fr); }
  .experiment-images-panel { max-height: 270px; border-top: 1px solid #dcdfe7; }
  .experiment-image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .image-preview-button { height: 110px; }
  .record-source-options { grid-template-columns: 1fr; }
  .record-source-option { min-height: 170px; }
  .record-overview-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "hero" "status" "details";
    min-height: 0;
  }
  .record-overview-hero { min-height: 220px; }
  .record-overview-stats dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(52px, 1fr)); }
  .record-overview-stats dl > div:nth-child(odd) { padding-right: 18px; border-right: 1px solid #e1e6ef; }
  .record-overview-stats dl > div:nth-child(even) { padding-left: 18px; }
  .record-overview-stats dl > div:nth-last-child(-n+2) { border-bottom: 0; }
  .record-document-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .record-document-list { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid #d5dae3; }
  .record-document-list > header, .record-document-list > p { display: none; }
  .record-document-list > button { width: auto; min-width: 210px; }
  .record-document-canvas { padding: 18px 16px 34px; }
}
/* Responsive / accessibility: (max-width: 900px) */
@media (max-width: 900px) {
  body { overflow: auto; }
  .collection-page { min-width: 0; }
  .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experiment-metrics > div { min-width: 78px; }
  .experiment-browser-grid { grid-template-columns: 1fr; }
  .library-detail-meta { grid-template-columns: 1fr 1fr; }
  .library-detail-meta > div:last-child { grid-column: 1 / -1; }
  .trash-page { min-width: 0; }
  .trash-toolbar { grid-template-columns: 1fr 1fr; }
  .trash-toolbar > span { display: none; }
  .trash-item { grid-template-columns: auto minmax(0, 1fr) auto; }
  .trash-item > time { display: none; }
  .trash-item-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .admin-research-hero { align-items: flex-start; flex-direction: column; gap: 18px; }
  .collection-header,
  .trash-header {
    padding: 20px 16px;
    min-height: 0;
    flex-wrap: wrap;
    gap: 20px;
  }
  .collection-workspace { grid-template-columns: 1fr; padding: 16px; }
  .experiment-browser { padding: 16px; }
  .trash-workspace { padding: 16px; }
  .collection-list-panel { position: static; height: 420px; min-height: 0; }
  .collection-detail { min-height: 320px; }
  .experiment-detail { height: auto; max-height: 760px; min-height: 320px; }
  .toolbar-count, .clear-query { display: inline-flex; }
  .experiment-toolbar { grid-template-columns: minmax(0, 1fr); }
  .experiment-record-list { height: auto; max-height: 500px; }
  .admin-research-page { min-width: 0; padding: 20px 16px 40px; }
  .admin-owner-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .admin-owner-pagination { flex-wrap: wrap; }
  .admin-owner-toolbar label { width: min(420px, 70%); }
  #experiment-rounds { scroll-margin-top: 124px; }
  .workspace-layout { display: flex; flex-direction: column; }
  .workspace-directory {
    position: relative;
    top: auto;
    bottom: auto;
    align-self: stretch;
    width: auto;
    height: auto;
    flex: 0 0 auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .rail-search { height: 36px; padding: 0 9px; }
  .rail-search input { font-size: 13px; }
  .project-list {
    display: flex;
    grid-column: 1 / -1;
    overflow-x: auto;
    padding: 2px 0;
  }
  .workspace-directory .admin-owner-scope { padding: 0 18px 12px; }
  .workspace-body { width: 100%; }
  .project-meta { gap: 6px 9px; }
  .project-context-bar { gap: 10px; flex-wrap: wrap; }
  .assistant-popover .context-popover-panel { width: auto; }
  .project-rail {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 12px;
    padding: 16px;
  }
  .project-rail footer { display: none; }
  .rail-title { padding: 0; }
  .project-list-item { flex: 0 0 210px; padding: 10px 14px; gap: 12px; }
  .project-header { padding: 20px 20px 0; }
  .workspace-canvas { scroll-margin-top: 112px; padding: 14px 20px 30px; }
  .project-actions, .project-actions .right-rail { gap: 8px; }
  .primary-action { height: 42px; padding: 0 15px; }
  .context-trigger, .project-trash-action { height: 42px; }
  .project-tabs { height: 50px; }
  .context-popover-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    top: calc(var(--app-header-height) + 10px);
    max-height: calc(100dvh - var(--app-header-height) - 30px);
  }
  .context-popover:has(.context-popover-panel:not([hidden])) { z-index: 100; }
}
/* Responsive / accessibility: (max-width: 820px) */
@media (max-width: 820px) {
  .ai-settings-page { min-width: 0; padding: 16px 12px 108px; }
  .ai-settings-card { gap: 21px; padding: 24px 18px; }
  .ai-model-label { align-items: flex-start; flex-direction: column; gap: 9px; }
  .ai-settings-action-dock { right: 12px; bottom: 12px; left: 12px; }
  .ai-settings-action-dock button { flex: 1; min-width: 0; }
}
/* Responsive / accessibility: (max-width: 700px) */
@media (max-width: 700px) {
  .project-modal-layer { padding: 12px; }
  .project-modal { width: 100%; max-height: calc(100dvh - 24px); }
  .project-modal-header, .project-editor-form { padding-right: 18px; padding-left: 18px; }
  .experiment-drawer { width: 100vw; }
  .drawer-header, .drawer-section, .drawer-statusbar { padding-right: 18px; padding-left: 18px; }
  .drawer-summary-grid, .drawer-variants { grid-template-columns: 1fr; }
  .drawer-summary-grid .drawer-next-plan { grid-column: 1; }
  .drawer-source-document { margin-right: 18px; margin-left: 18px; }
  .edit-section { padding-right: 18px; padding-left: 18px; }
  .edit-basics,
  .edit-inline-grid,
  .edit-inline-grid.three,
  .edit-record-list.compact > article,
  .edit-measurements > article,
  .project-editor-grid {
    grid-template-columns: 1fr;
  }
  .edit-record-list > article { padding-left: 15px; }
  .edit-record-list > article > b { top: 11px; }
  .drawer-edit-actions { grid-template-columns: 1fr 1fr; }
  .drawer-edit-actions > div { grid-column: 1 / -1; }
  .library-detail-meta { grid-template-columns: 1fr; }
  .library-detail-meta > div:last-child { grid-column: auto; }
  .trash-header { align-items: flex-start; flex-direction: column; }
  .trash-metrics { width: 100%; }
  .trash-metrics > div {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
    padding-left: 12px;
  }
  .trash-toolbar { grid-template-columns: 1fr; }
  .trash-item { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .trash-item-actions { grid-column: 1 / -1; }
  .trash-item-actions button { flex: 1; }
  .drawer-header-actions { gap: 5px; }
  .drawer-trash-button span { display: none; }
}
/* Responsive / accessibility: (max-width: 680px) */
@media (max-width: 680px) {
  .experiment-modal-layer, .record-modal-layer { padding: 10px; }
  .experiment-create-modal, .experiment-record-modal { width: calc(100vw - 20px); height: calc(100dvh - 20px); max-height: none; }
  .experiment-create-row { grid-template-columns: 1fr; }
  .record-modal-header { align-items: stretch; flex-direction: column; }
  .record-modal-actions { justify-content: flex-start; }
  .record-modal-meta > span:nth-child(2) { display: none; }
  .experiment-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-view-tabs { padding-right: 10px; padding-left: 10px; }
  .record-setup { align-content: start; gap: 20px; padding: 24px 16px; }
  .record-source-option { min-height: 0; padding: 20px; }
  .record-create-choice-layer { padding: 8px; }
  .record-create-choice-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow: auto; border-radius: 12px; }
  .record-create-choice-dialog > header { padding: 18px 16px 15px; }
  .record-create-choice-grid { grid-template-columns: 1fr; padding: 16px; }
  .record-create-choice-grid > button { min-height: 168px; padding: 17px; }
  .record-create-choice-dialog > footer { padding: 11px 16px 13px; }
  .record-overview { padding: 16px; }
  .record-overview-hero { gap: 22px; padding: 22px 20px; }
  .record-overview-identity { gap: 12px; }
  .record-overview-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .record-overview-hero h3 { font-size: 25px; }
  .record-overview-primary-action { align-items: stretch; flex-direction: column; gap: 12px; }
  .record-overview-primary-action > button { width: 100%; justify-content: center; }
  .record-overview-grid { grid-template-columns: 1fr; }
  .record-focus-view { padding: 22px 16px; }
  .record-focus-view .experiment-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-focus-view .image-preview-button { height: 130px; }
  .record-document-list > button { min-width: 188px; padding: 9px 10px; }
  .record-document-canvas { padding: 10px 8px 24px; }
  .record-document-page > header { padding: 20px 18px 16px; }
  .record-document-page > header small { display: none; }
  .record-document-meta-editor { grid-template-columns: 1fr; padding: 14px 18px; }
  .record-document-page > textarea { min-height: 480px; padding: 23px 18px 34px; font-size: 14px; line-height: 1.85; }
  .record-document-page > footer { align-items: flex-start; flex-direction: column; gap: 3px; padding: 11px 18px; }
}
/* Responsive / accessibility: (max-width: 600px) */
@media (max-width: 600px) {
  .app-dialog-layer { padding: 12px; }
  .app-dialog { width: 100%; max-height: calc(100dvh - 24px); border-radius: 16px; }
  .app-dialog-content { padding: 22px 20px 18px; }
  .app-dialog footer { padding: 14px 20px 18px; }
  .app-dialog footer button { flex: 1; }
  .experiment-metrics, .trash-metrics { flex-wrap: wrap; }
  .collection-header-actions { width: 100%; justify-content: space-between; gap: 12px; }
  .record-modal-actions { gap: 6px; }
  .record-modal-actions button { padding: 0 10px; }
  .record-modal-meta { padding: 8px 14px; }
  .record-overview-stats dl { grid-template-columns: 1fr; grid-template-rows: repeat(4, minmax(52px, 1fr)); }
  .record-overview-stats dl > div:nth-child(n) { padding-right: 0; padding-left: 0; border-right: 0; border-bottom: 1px solid #e1e6ef; }
  .record-overview-stats dl > div:last-child { border-bottom: 0; }
  .record-source-option { grid-template-columns: 42px minmax(0, 1fr); gap: 14px 12px; }
  .record-source-icon { width: 42px; height: 42px; }
  .sheet-toolbar { max-height: 160px; overflow-y: auto; flex-shrink: 0; }
  .sheet-toolbar > div + div { padding-left: 0; border-left: 0; }
  .record-modal-workspace { grid-template-rows: minmax(180px, 1fr) minmax(0, 180px); }
  .experiment-images-panel { max-height: 180px; }
  .admin-research-totals { width: 100%; }
  .admin-research-totals div { flex: 1; min-width: 0; padding: 12px; }
  .admin-owner-toolbar { flex-wrap: wrap; gap: 10px; }
  .admin-owner-toolbar label { width: 100%; }
  .detail-hero { flex-wrap: wrap; padding: 20px 16px; }
  .detail-hero-actions, .mode-switch { flex-wrap: wrap; }
  .trash-batch-actions { flex-wrap: wrap; gap: 12px; }
  .trash-toolbar { grid-template-columns: minmax(0, 1fr); }
  .trash-filter { overflow-x: auto; }
  .trash-filter button { flex: 1; min-width: 52px; }
  .right-rail { width: 100%; justify-content: flex-end; }
  .timeline-card { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 16px 14px 16px 28px; }
  .timeline-list .round-meta strong { grid-column: 1; grid-row: 1; }
  .experiment-copy { grid-column: 1 / -1; grid-row: 2; }
  .experiment-actions { grid-column: 2; grid-row: 1; }
  .timeline-grid .experiment-actions {
    position: static;
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }
  .timeline-grid .round-meta { padding-right: 0; }
  .collection-header h1, .trash-header h1, .admin-research-hero h1 { font-size: 25px; }
  .project-title-line h1 { font-size: 26px; }
  .project-meta { font-size: 12px; }
  .project-header { padding: 19px 16px 0; }
  .workspace-canvas { padding: 12px 12px 24px; }
  .project-actions { width: 100%; justify-content: flex-start; }
  .project-actions .right-rail { width: auto; }
  .project-actions .primary-action { flex: 1 0 auto; }
  .project-actions .context-trigger { font-size: 12px; padding: 0 9px; gap: 5px; }
  .project-actions .context-trigger > svg:last-child { display: none; }
  .project-trash-action { width: 34px; }
  .project-context-bar { padding: 0; }
  .project-tabs { flex: initial; }
  .project-tabs button { flex: 0 0 auto; min-width: 110px; }
  .summary-project { padding: 18px; }
  .summary-experiment { padding: 18px; }
  .summary-experiment .summary-heading { flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
  .summary-current-title { gap: 9px; }
  .summary-round-badge { font-size: 12px; }
  .summary-round-selector { flex-basis: 176px; width: 176px; max-width: 176px; }
  .overview-summary h2, .timeline-header h2 { font-size: 19px; gap: 9px; }
  .summary-record-link > strong { font-size: 20px; }
  .summary-fields { grid-template-columns: 1fr; gap: 10px; }
  .summary-fields > div { height: 128px; min-height: 0; padding: 16px; }
  .summary-fields dt { padding: 0; font-size: 14px; }
  .summary-fields dd { padding: 10px 0 0; font-size: 14px; }
  .summary-experiment-footer { align-items: flex-start; flex-wrap: wrap; }
  .summary-record-action { width: 100%; }
  .summary-project-details { grid-template-columns: 1fr; gap: 13px; }
  .summary-project-details > div { justify-content: space-between; }
  .summary-project-stats > div { padding: 12px 6px; gap: 6px; }
  .summary-project-stats > div > svg { width: 20px; }
  .summary-project-stats span { font-size: 11px; }
  .timeline-section { padding: 14px; }
  .timeline-header { flex-wrap: wrap; gap: 10px; }
  .timeline-header > div:first-child > p { margin-left: 0; }
  .experiment-series-header { align-items: flex-start; flex-wrap: wrap; }
  .experiment-series-actions { width: 100%; justify-content: space-between; }
  .view-toggle { margin-left: auto; }
  .view-toggle button { height: 30px; padding: 0 9px; font-size: 12px; }
  .timeline-columns { display: none; }
  .timeline-list .timeline-card {
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: auto auto auto;
    padding: 15px 12px 15px 27px;
    gap: 10px;
  }
  .timeline-list .round-meta time { grid-column: 1; grid-row: 3; }
  .timeline-list .experiment-copy { grid-column: 1 / -1; grid-row: 2; }
  .timeline-list .experiment-actions { grid-column: 2; grid-row: 1; gap: 10px; }
  .timeline-list .experiment-copy h3 { font-size: 14px; }
  .timeline-node { top: 24px; }
  .timeline.timeline-grid { grid-template-columns: minmax(0,1fr); }
}
/* Responsive / accessibility: (max-width: 1500px) and (min-width: 1201px) */
@media (max-width: 1500px) and (min-width: 1201px) {
  .project-heading-row { flex-wrap: wrap; }
  .project-actions { margin-left: auto; }
  .summary-current-title { gap: 7px; }
  .summary-round-badge { display: none; }
  .summary-project-details { grid-template-columns: 1fr; gap: 10px; }
  .summary-project-details > div { justify-content: space-between; }
  .summary-project { padding: 20px; }
  .summary-project-stats > div { gap: 6px; padding: 12px 8px; }
  .summary-project-stats > div > svg { width: 19px; }
  .timeline-columns, .timeline-list .timeline-card { grid-template-columns: 100px minmax(0,1fr) 145px 155px 112px; gap: 12px; }
}
/* Responsive / accessibility: (min-width: 901px) and (max-width: 1199px) */
@media (min-width: 901px) and (max-width: 1199px) {
  .admin-research-hero { align-items: flex-start; flex-wrap: wrap; }
}
/* Responsive / accessibility: (prefers-reduced-transparency: reduce) */
@media (prefers-reduced-transparency: reduce) {
  .project-context-bar, .context-trigger { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ai-settings-action-dock { background: #f5f5f7; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* Responsive / accessibility: (prefers-contrast: more) */
@media (prefers-contrast: more) {
  .context-trigger { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* Responsive / accessibility: (prefers-reduced-motion: reduce) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .project-list-item, .primary-action, .context-trigger, .timeline-card { transition: none; }
}

.record-modal-actions .record-sync-button { color: var(--accent-dark); border-color: var(--accent-dark); }

/* Desktop sheet layout: presentation changes only; keep the editor mounted. */
@media (min-width: 601px) {
  .experiment-record-modal[data-record-view="sheet"] .record-modal-header {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 10px 16px;
  }
  .experiment-record-modal[data-record-view="sheet"] .record-modal-header > div:first-child {
    display: grid;
    flex: 1 1 280px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 14px;
  }
  .experiment-record-modal[data-record-view="sheet"] .record-modal-header h2 {
    grid-area: 1 / 1;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .experiment-record-modal[data-record-view="sheet"] .record-modal-header p {
    grid-area: 2 / 1;
    margin: 0;
    overflow: hidden;
    font-size: 11px;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .experiment-record-modal[data-record-view="sheet"] .record-modal-header > div:first-child > span {
    grid-area: 1 / 2;
    margin: 0;
    font-size: 11px;
    white-space: nowrap;
  }
  .experiment-record-modal[data-record-view="sheet"] .record-weknora-status {
    grid-area: 2 / 2;
    justify-self: end;
    margin: 0;
  }
  .experiment-record-modal[data-record-view="sheet"] .record-modal-actions { gap: 6px; }
  .experiment-record-modal[data-record-view="sheet"] .record-modal-actions button { height: 34px; padding-inline: 9px; font-size: 12px; }
  .record-modal-actions .record-sheet-focus-toggle { color: var(--accent-dark); border-color: #b7c1de; background: var(--accent-wash); }
  .record-modal-actions .record-sheet-focus-toggle[aria-pressed="true"] { background: var(--accent-pale); }
  .record-focus-readonly-label { color: var(--muted); font-size: 12px; }
  .experiment-record-modal[data-record-view="sheet"] .record-modal-meta { min-height: 40px; padding: 4px 16px; }
  .experiment-record-modal[data-record-view="sheet"] .record-status-control { min-height: 32px; }
  .experiment-record-modal[data-record-view="sheet"] .record-view-tabs { min-height: 40px; padding: 3px 16px 0; }
  .record-sheet-help { position: relative; }
  .record-sheet-help summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
  }
  .record-sheet-help summary::-webkit-details-marker, .sheet-more-tools summary::-webkit-details-marker { display: none; }
  .record-sheet-help p {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 90;
    width: min(380px, calc(100vw - 64px));
    margin: 4px 0 0;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--popover-shadow);
    line-height: 1.7;
  }
  .record-modal-workspace { grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: minmax(0, 1fr); }
  .record-modal-workspace.sheet-sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .record-modal-workspace.sheet-sidebar-collapsed .sheet-side-panel { display: none; }
  .record-modal-workspace.sheet-sidebar-collapsed .sheet-editor-panel { border-right: 0; }
  .record-modal-workspace .sheet-side-panel { max-height: none; }
  .experiment-record-modal[data-record-view="sheet"] .sheet-toolbar {
    position: relative;
    z-index: 4;
    gap: 6px;
    min-height: 44px;
    max-height: none;
    padding: 6px 10px;
    overflow: visible;
  }
  .sheet-more-tools { position: relative; margin-left: auto; }
  .sheet-more-tools summary {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 9px;
    border: 1px solid #d5d9e3;
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }
  .sheet-more-tools[open] summary { color: var(--accent-dark); background: var(--accent-pale); }
  .sheet-more-tools[open] summary > svg:last-child { transform: rotate(90deg); }
  .sheet-more-tools-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: max-content;
    max-width: calc(100vw - 64px);
    max-height: min(320px, calc(100dvh - 180px));
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--popover-shadow);
  }
  .sheet-more-tools-panel > div { display: flex; flex-wrap: wrap; gap: 6px; }
  .sheet-more-tools:not([open]) .sheet-more-tools-panel { display: none; }
  .experiment-record-modal[data-record-view="sheet"] .sheet-selection-status { min-height: 32px; padding: 3px 10px; }
  .sheet-panel-controls { display: flex; align-items: center; gap: 6px; margin-left: auto; }
  .sheet-panel-controls button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--accent-dark);
    background: transparent;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
  }
  .sheet-panel-controls button:hover, .record-sheet-help summary:hover { background: var(--accent-pale); }
  .sheet-more-tools summary:focus-visible, .record-sheet-help summary:focus-visible, .sheet-panel-controls button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .experiment-record-modal[data-record-view="sheet"] .sheet-scroll { padding: 10px 10px 24px; }
  .record-sheet-focus-layer { padding: 8px; }
  .experiment-record-modal.sheet-edit-focus-mode { width: calc(var(--app-viewport-width) - 16px); height: calc(var(--app-viewport-height) - 16px); max-height: none; }
  .experiment-record-modal.sheet-edit-focus-mode .record-modal-header > div:first-child { display: block; }
  .experiment-record-modal.sheet-edit-focus-mode .record-modal-header > div:first-child > p,
  .experiment-record-modal.sheet-edit-focus-mode .record-modal-header > div:first-child > span,
  .experiment-record-modal.sheet-edit-focus-mode .record-weknora-status,
  .experiment-record-modal.sheet-edit-focus-mode .record-modal-meta,
  .experiment-record-modal.sheet-edit-focus-mode .record-view-tabs,
  .experiment-record-modal.sheet-edit-focus-mode .record-modal-actions > button:not(.record-save-button):not(.record-sheet-focus-toggle):not(.drawer-close-button) { display: none; }
}
.record-sync-notice { margin: 0; padding: 12px 24px; background: #eef8f3; color: #22634b; font-size: 13px; }
.record-draft-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 24px; background: #fff8e8; color: #76521b; font-size: 13px; }
.record-draft-notice > div { display: flex; flex-wrap: wrap; gap: 8px; }
.record-draft-notice button { padding: 5px 10px; border: 1px solid #d8bb79; border-radius: 6px; background: #fff; color: inherit; cursor: pointer; }

.sheet-utility-actions button[aria-expanded="true"] { color: var(--accent-dark); background: var(--accent-pale); border-color: #b7c1de; }
.sheet-utility-actions button > span { font-size: 16px; font-weight: 650; }
.sheet-utility-panel { flex: 0 0 auto; max-height: min(250px, 34dvh); overflow: auto; padding: 12px 16px; border-bottom: 1px solid var(--line-strong); background: #fff; color: var(--text); }
.sheet-utility-panel header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.sheet-utility-panel header > span { color: var(--muted); font-size: 12px; }
.sheet-utility-panel header > button { margin-left: auto; }
.sheet-utility-panel button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; font-size: 12px; }
.sheet-utility-panel button:hover, .sheet-utility-panel button[aria-pressed="true"] { background: var(--accent-pale); color: var(--accent-dark); border-color: #b7c1de; }
.sheet-utility-panel button:disabled { opacity: .5; cursor: default; }
.sheet-utility-panel button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet-symbol-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sheet-symbol-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-symbol-grid button { flex-direction: column; gap: 3px; min-width: 64px; max-width: 170px; font-size: 18px; padding: 6px 10px; }
.sheet-symbol-grid button small { width: 100%; min-width: 0; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 10px; color: var(--muted); }
.sheet-symbol-search { width: min(100%, 420px); min-height: 34px; margin-bottom: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font: inherit; font-size: 12px; }
.sheet-symbol-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet-utility-panel .sheet-symbol-note { margin: 0 0 8px; }
.sheet-utility-panel p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.sheet-sum-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.sheet-sum-result > span { font-size: 12px; color: var(--muted); }
.sheet-sum-result output { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--accent-dark); user-select: text; }
.sheet-sum-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.sheet-sum-actions > span { color: var(--accent-dark); font-size: 12px; }
@media (max-width: 600px) {
  .sheet-utility-panel { padding: 10px; max-height: 32dvh; }
  .sheet-symbol-grid button { min-height: 40px; min-width: 40px; }
}
/* Shared application shell. Replaces the former horizontal teal header. */
@property --sidebar-width { syntax: "<length>"; inherits: true; initial-value: 220px; }
.app-shell { display: block; height: var(--app-viewport-height); overflow: hidden; }
.app-main { margin-left: var(--sidebar-width); height: var(--app-viewport-height); min-width: 0; overflow: auto; overscroll-behavior: contain; background: var(--page-bg); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 80; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 0 8px 16px; overflow-y: auto; scrollbar-width: none; background: #0b1220; color: #c0c6d1; }
.sidebar::-webkit-scrollbar { display: none; }
.sidebar > .brand { display: flex; align-items: center; gap: 10px; height: var(--topbar-height); flex-shrink: 0; padding: 0 12px; }
.sidebar > .brand > div { display: grid; gap: 2px; }
.sidebar > .brand strong { font-size: 18px; font-weight: 650; letter-spacing: -.4px; }
.sidebar > .brand > div > span { color: #8591a6; font-size: 12px; }
.sidebar > .brand .chem-logo {
  box-sizing: border-box;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.navigation-caption { margin: 22px 18px 9px; color: #768399; font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
.primary-nav { display: flex; flex-direction: column; flex-shrink: 0; gap: 5px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 18px; border-radius: 8px; color: #b8c1d1; text-decoration: none; font-size: 14px; font-weight: 450; white-space: nowrap; transition: background-color .2s, color .2s; }
.nav-link svg { flex-shrink: 0; }
.nav-link:hover { background: #182338; color: #fff; }
.nav-link.active { color: #fff; background: var(--accent); }
.nav-unread-badge { display: flex; align-items: center; justify-content: center; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px; background: #dc4452; color: #fff; font-size: 10px; font-style: normal; font-weight: 700; line-height: 1; }
.sidebar-collapsed .nav-unread-badge { top: 3px; right: 6px; transform: none; }
.collapse-control { display: flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 10px; margin-top: auto; min-height: 38px; border: 1px solid #253047; border-radius: 8px; color: #a4b0c5; background: transparent; font: inherit; font-size: 13px; cursor: pointer; }
.collapse-control:hover { background: #182338; color: #fff; }
.sidebar-collapsed { --sidebar-width: 72px; }
.sidebar-collapsed .sidebar > .brand { padding: 0 13px; }
.sidebar-collapsed .sidebar > .brand > div,
.sidebar-collapsed .navigation-caption,
.sidebar-collapsed .nav-link span,
.sidebar-collapsed .collapse-control span,
.sidebar-collapsed .management-trigger > span,
.sidebar-collapsed .management-trigger > svg:last-child,
.sidebar-collapsed .management-link > span { display: none; }
.sidebar-collapsed .primary-nav { margin-top: 25px; }
.sidebar-collapsed .nav-link { justify-content: center; padding: 0; }
.management-navigation { flex-shrink: 0; margin: 18px 0 16px; padding-top: 14px; border-top: 1px solid #202b3e; }
.management-trigger { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 0 18px; border: 0; border-radius: 8px; background: transparent; color: #b8c1d1; font: inherit; font-size: 14px; cursor: pointer; }
.management-trigger > svg:last-child { margin-left: auto; transform: rotate(90deg); transition: transform .2s ease; }
.management-trigger[aria-expanded="true"] > svg:last-child { transform: rotate(-90deg); }
.management-trigger:hover, .management-trigger[aria-expanded="true"] { color: #fff; background: #182338; }
.management-subnav { display: grid; gap: 4px; padding-top: 6px; animation: management-reveal .18s ease-out; }
.management-subnav[hidden] { display: none; }
@keyframes management-reveal { from { opacity: .3; } to { opacity: 1; } }
.management-link { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 7px 12px 7px 30px; border-radius: 6px; color: #aab7ce; text-decoration: none; font-size: 14px; }
.management-link svg { flex-shrink: 0; }
.management-link:hover { color: #fff; background: #182338; }
.management-link.active { color: #fff; background: var(--accent); }
.sidebar-collapsed .management-trigger, .sidebar-collapsed .management-link { justify-content: center; padding: 8px 0; }
.knowledge-chat-focus .collapse-control { visibility: hidden; pointer-events: none; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--topbar-height); padding: 0 28px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar-context { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-back-button { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 6px; height: 34px; padding: 0 11px 0 9px; border: 1px solid #dbe1ea; border-radius: 8px; background: #fff; color: #526078; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.topbar-back-button svg { transform: rotate(180deg); }
.topbar-back-button:hover { border-color: #aebcf0; background: #f6f8ff; color: var(--accent); }
.topbar-back-button:active { transform: translateX(-1px); }
.breadcrumb { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--muted); font-size: 14px; }
.breadcrumb strong { color: var(--ink); font-weight: 500; white-space: nowrap; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-header-tools { display: flex; align-items: center; flex-shrink: 0; gap: 20px; }
.command-search { display: flex; align-items: center; gap: 8px; width: clamp(160px, 19vw, 280px); height: 36px; padding: 0 5px 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); }
.command-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-pale); }
.command-search input, .command-search-submit { border: 0; background: transparent; font: inherit; }
.command-search input { flex: 1; width: 0; min-width: 0; outline: none; color: var(--ink); font-size: 13px; }
.command-search input::placeholder { color: var(--faint); }
.command-search-submit { height: 24px; padding: 0 7px; border-radius: 4px; color: var(--muted); font-size: 12px; cursor: pointer; }
.command-search-submit:hover { color: var(--accent); background: var(--accent-pale); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.top-icon { display: grid; place-items: center; width: 30px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.top-icon:hover { background: var(--surface-soft); color: var(--accent); }
.profile-menu { position: relative; }
.profile-button { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.profile-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 5px; }
.profile-button > span:first-child { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 16px; }
.profile-identity { display: flex; align-items: center; gap: 9px; }
.profile-identity strong { max-width: 95px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.profile-identity small { border: 1px solid #ffe58f; border-radius: 4px; padding: 1px 5px; color: #ad6800; background: #fffbe6; font-size: 12px; white-space: nowrap; }
.profile-button b { display: inline-block; color: var(--muted); font-weight: 400; }
.profile-menu > div { position: absolute; right: 0; top: calc(100% + 7px); display: grid; gap: 7px; width: 230px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--popover-shadow); opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none; }
.profile-menu[data-open="true"] > .profile-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.profile-menu[data-open="true"] > .profile-button b { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) {
  .profile-menu > .profile-panel { transition: opacity .18s ease, transform .22s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .22s; }
  .profile-menu[data-open="true"] > .profile-panel { transition-delay: 0s; }
  .profile-button b { transition: transform .22s cubic-bezier(.22, 1, .36, 1); }
}
.profile-menu > div > span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.profile-menu > div > button { margin-top: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.profile-menu > div > button:hover { background: var(--accent-pale); color: var(--accent); }
.workspace-directory { left: auto; top: var(--topbar-height); background: #fff; }
.workspace-layout { min-height: calc(100dvh - var(--topbar-height)); }
.workspace-body { container-type: inline-size; }
.project-workspace .topbar { margin-left: 0; }
.project-header { padding-top: 24px; }
.project-rail { padding-top: 24px; }
.project-rail footer { display: none; }
.project-list-item { border-radius: 6px; }
.project-list-item.active { background: var(--accent-pale); }
.project-list-item.active .project-folder { color: var(--accent); }
.project-list-item.active small { color: var(--accent-dark); }
.project-list-item:hover { background: var(--surface-soft); }
.ai-settings-action-dock { left: calc(var(--sidebar-width) + 28px); }

@container (max-width: 950px) {
  .overview-summary { grid-template-columns: minmax(0, 1fr); }
  .summary-project { grid-column: 1; grid-row: 2; }
  .project-heading-row { flex-wrap: wrap; }
  .project-actions { margin-left: auto; }
  .timeline-columns, .timeline-list .timeline-card { grid-template-columns: 90px minmax(0, 1fr) 130px 105px; gap: 10px; }
  .timeline-columns > span:nth-child(3), .timeline-list .round-meta small { display: none; }
  .timeline-list .round-meta time { grid-column: 3; }
  .timeline-list .experiment-actions { grid-column: 4; }
}
@container (max-width: 560px) {
  .timeline-columns { display: none; }
  .timeline-list .timeline-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; }
  .timeline-list .round-meta time { grid-column: 1; grid-row: 3; }
  .timeline-list .experiment-copy { grid-column: 1 / -1; grid-row: 2; }
  .timeline-list .experiment-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 1200px) {
  .profile-identity small { display: none; }
  .topbar { padding: 0 20px; }
  .breadcrumb > svg, .breadcrumb > span:last-child, .breadcrumb > .breadcrumb-detail { display: none; }
}
@media (max-width: 1000px) {
  :root { --sidebar-width: 72px; }
  .sidebar > .brand { justify-content: center; padding: 0; }
  .sidebar > .brand > div, .navigation-caption, .nav-link span, .collapse-control, .management-trigger > span, .management-trigger > svg:last-child, .management-link > span { display: none; }
  .primary-nav { margin-top: 25px; }
  .nav-link, .management-trigger, .management-link { justify-content: center; padding: 0; }
  .nav-unread-badge { top: 3px; right: 6px; transform: none; }
  .profile-identity { display: none; }
}
@media (max-width: 900px) {
  .workspace-directory { left: auto; top: auto; }
  .project-workspace .topbar { margin-left: 0; }
}
@media (max-width: 600px) {
  :root, .sidebar-collapsed { --sidebar-width: 0px; --topbar-height: 100px; }
  .app-main { padding-bottom: 64px; }
  .sidebar { inset: auto 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 38px; width: 100%; min-height: 62px; padding: 0 4px; border-top: 1px solid #253047; }
  .sidebar > .brand, .collapse-control, .navigation-caption { display: none; }
  .primary-nav, .sidebar-collapsed .primary-nav { flex: 1; flex-direction: row; gap: 0; margin: 0; }
  .nav-link, .sidebar-collapsed .nav-link { flex: 1; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; padding: 8px 2px 6px; border-radius: 0; font-size: 12px; }
  .nav-link span, .sidebar-collapsed .nav-link span { display: block; }
  .nav-link svg { width: 19px; height: 19px; }
  .nav-unread-badge, .sidebar-collapsed .nav-unread-badge { top: 1px; right: 1px; transform: none; }
  .sidebar:not(:has(.management-navigation)) { grid-template-columns: minmax(0, 1fr); }
  .management-navigation { display: contents; }
  .management-trigger { grid-column: 2; grid-row: 1; height: 62px; padding: 0; }
  .management-subnav { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 6px 4px 8px; border-top: 1px solid #253047; }
  .management-link { gap: 6px; min-height: 40px; }
  .management-link > span, .sidebar-collapsed .management-link > span { display: inline; }
  .app-shell:has(.management-trigger[aria-expanded="true"]) .app-main { padding-bottom: 120px; }
  .topbar { min-height: 100px; padding: 10px 14px; align-items: flex-start; gap: 8px; }
  .breadcrumb { height: 32px; gap: 8px; }
  .topbar-context { gap: 7px; }
  .topbar-back-button { width: 32px; padding: 0; justify-content: center; }
  .topbar-back-button span { display: none; }
  .breadcrumb > svg, .breadcrumb > span:last-child, .breadcrumb > .breadcrumb-detail { display: none; }
  .global-header-tools { display: contents; }
  .command-search { position: absolute; bottom: 10px; left: 14px; right: 14px; width: auto; }
  .top-actions { gap: 5px; }
  .profile-button { height: 32px; }
  .profile-menu > div { width: 220px; }
  .project-header { padding-top: 20px; }
  .ai-settings-action-dock { left: 12px; bottom: 74px; }
  .app-shell:has(.management-trigger[aria-expanded="true"]) .ai-settings-action-dock { bottom: 130px; }
  .context-popover-panel { max-height: calc(100dvh - 130px); }
}
/* Keep icon positions and label space continuous while the desktop rail narrows. */
@media (min-width: 1001px) {
  .sidebar { overflow-x: hidden; }
  .sidebar > .brand > div { min-width: 0; max-width: 150px; overflow: hidden; white-space: nowrap; }
  .nav-link span, .management-trigger > span, .management-link > span, .collapse-control span { display: block; max-width: 150px; overflow: hidden; white-space: nowrap; }
  .sidebar-collapsed .sidebar > .brand > div { display: grid; }
  .sidebar-collapsed .nav-link span, .sidebar-collapsed .management-trigger > span,
  .sidebar-collapsed .management-link > span, .sidebar-collapsed .collapse-control span { display: block; }
  .sidebar-collapsed .sidebar > .brand > div, .sidebar-collapsed .nav-link span,
  .sidebar-collapsed .management-trigger > span, .sidebar-collapsed .management-link > span,
  .sidebar-collapsed .collapse-control span { max-width: 0; opacity: 0; visibility: hidden; }
  .sidebar-collapsed .navigation-caption { display: block; opacity: 0; visibility: hidden; white-space: nowrap; }
  .sidebar-collapsed .primary-nav { margin-top: 0; }
  .management-trigger > svg:first-child, .collapse-control > svg { flex-shrink: 0; }
  .management-trigger > svg:last-child { width: 12px; flex-shrink: 0; }
  .sidebar-collapsed .management-trigger > svg:last-child { display: block; width: 0; opacity: 0; }
  .sidebar-collapsed .nav-link, .sidebar-collapsed .management-trigger, .sidebar-collapsed .management-link { justify-content: flex-start; padding-right: 18px; padding-left: 18px; gap: 0; }
  .sidebar-collapsed .collapse-control { gap: 0; }
}
@media (min-width: 1001px) and (prefers-reduced-motion: no-preference) {
  :root { transition: --sidebar-width .36s cubic-bezier(.22, 1, .36, 1); }
  .sidebar > .brand, .nav-link, .management-trigger, .management-link, .collapse-control { transition: padding .36s cubic-bezier(.22, 1, .36, 1), gap .36s cubic-bezier(.22, 1, .36, 1), background-color .2s, color .2s; }
  .sidebar > .brand > div, .nav-link span, .management-trigger > span, .management-link > span, .collapse-control span { transition: max-width .36s cubic-bezier(.22, 1, .36, 1), opacity .16s ease .12s, visibility 0s .12s; }
  .navigation-caption { transition: opacity .16s ease .12s, visibility 0s .12s; }
  .sidebar-collapsed .sidebar > .brand > div, .sidebar-collapsed .nav-link span, .sidebar-collapsed .management-trigger > span, .sidebar-collapsed .management-link > span, .sidebar-collapsed .collapse-control span { transition-delay: 0s, 0s, .16s; }
  .sidebar-collapsed .navigation-caption { transition-delay: 0s, .16s; }
  .management-trigger > svg:last-child { transition: width .36s cubic-bezier(.22, 1, .36, 1), opacity .18s, transform .2s; }
}
@keyframes workspace-reveal { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.app-main:has(> .dashboard-page) { --dashboard-max-width: 1680px; --dashboard-gutter: 28px; }
.app-main:has(> .dashboard-page) > .topbar { padding-inline: max(var(--dashboard-gutter), calc((100% - var(--dashboard-max-width)) / 2 + var(--dashboard-gutter))); }
.dashboard-page { container-type: inline-size; max-width: var(--dashboard-max-width); margin: 0 auto; padding: 24px var(--dashboard-gutter) 36px; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dashboard-welcome { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.dashboard-welcome h1 { margin: 0 0 6px; font-size: 26px; font-weight: 650; letter-spacing: -.45px; }
.dashboard-welcome p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.dashboard-refresh { display: inline-flex; align-items: center; flex-shrink: 0; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.dashboard-refresh:hover { color: var(--accent); border-color: var(--accent); }
.dashboard-refresh:disabled { cursor: wait; opacity: .6; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tone-blue { --tile-color: #2f54eb; --tile-bg: #edf0ff; }
.tone-green { --tile-color: #389e0d; --tile-bg: #f0f9eb; }
.tone-amber { --tile-color: #d48806; --tile-bg: #fff8e8; }
.dashboard-metric { padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.dashboard-metric > span { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 14px; }
.dashboard-metric > span svg { color: var(--tile-color); }
.dashboard-metric > strong { display: block; margin-top: 18px; font-size: 30px; line-height: 1; font-weight: 500; letter-spacing: -.5px; }
.dashboard-metric small { margin-left: 5px; font-size: 14px; font-weight: 400; letter-spacing: 0; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); align-items: stretch; gap: 16px; }
.dashboard-primary { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dashboard-panel { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.dashboard-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 50px; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.dashboard-panel h2 { margin: 0; font-size: 17px; font-weight: 600; }
.dashboard-panel header > span { color: var(--muted); font-size: 13px; }
.dashboard-panel header a, .dashboard-panel footer a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13px; text-decoration: none; }
.dashboard-panel header a:hover, .dashboard-panel footer a:hover { text-decoration: underline; }
.dashboard-project-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; }
.dashboard-project-toolbar > div { display: flex; flex-wrap: wrap; gap: 4px; }
.dashboard-project-toolbar button { padding: 5px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.dashboard-project-toolbar button[aria-pressed="true"] { background: var(--accent-pale); color: var(--accent); }
.dashboard-project-toolbar > span { white-space: nowrap; color: var(--muted); font-size: 13px; }
.dashboard-query { display: flex; align-items: center; gap: 12px; padding: 6px 24px 14px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.dashboard-query button { display: inline-flex; align-items: center; flex-shrink: 0; gap: 4px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
.dashboard-project-list { padding: 0 18px 8px; }
.dashboard-project-row { display: flex; align-items: center; gap: 11px; min-height: 72px; padding: 12px 0; border-bottom: 1px solid #f0f2f5; }
.dashboard-project-row:last-child { border-bottom: 0; }
.dashboard-project-icon { display: grid; place-items: center; width: 38px; height: 40px; flex-shrink: 0; border: 1px solid #e6ebfc; border-radius: 8px; color: var(--accent); background: #f5f7ff; }
.dashboard-project-row > div { flex: 1; min-width: 0; }
.dashboard-project-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 16px; font-weight: 600; text-decoration: none; }
.dashboard-project-title:hover { color: var(--accent); }
.dashboard-project-row p { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.dashboard-status { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid #d6e4ff; border-radius: 4px; padding: 3px 7px; color: #1d39c4; background: #f0f5ff; font-size: 13px; line-height: 1.5; font-weight: 400; }
.dashboard-status.status-completed { color: #237804; background: #f6ffed; border-color: #d9f7be; }
.dashboard-status.status-draft, .dashboard-status.status-planned, .dashboard-status.status-running { color: #ad6800; background: #fffbe6; border-color: #ffe58f; }
.dashboard-status.status-paused, .dashboard-status.status-needs_repeat { color: #ad6800; background: #fffbe6; border-color: #ffe58f; }
.dashboard-status.status-invalid { color: var(--danger); background: var(--danger-pale); border-color: #ffccc7; }
.dashboard-row-action { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); cursor: pointer; }
.dashboard-row-action:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-pale); }
.dashboard-panel footer { padding: 12px 23px; border-top: 1px solid var(--line); text-align: right; }
.dashboard-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; padding: 35px 25px; text-align: center; }
.dashboard-empty-art { display: flex; position: relative; align-items: center; justify-content: center; width: 76px; height: 83px; margin: 10px 0 20px; color: #bdc9e7; background: #f5f7fc; border-radius: 10px; }
.dashboard-empty-art > svg:last-child { position: absolute; bottom: -3px; right: -13px; color: var(--accent); }
.dashboard-empty h3 { margin: 8px 0 0; color: var(--text); font-size: 16px; font-weight: 500; }
.dashboard-empty p { margin: 10px 0 22px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.dashboard-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 7px 14px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.dashboard-button:hover { background: var(--accent-dark); }
.dashboard-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dashboard-shortcuts > * { display: flex; flex-direction: column; align-items: flex-start; padding: 14px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.dashboard-shortcuts i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; margin-bottom: 10px; background: var(--tile-bg); color: var(--tile-color); }
.dashboard-shortcuts strong { font-size: 14px; font-weight: 600; }
.dashboard-shortcuts span { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.dashboard-updates { display: flex; flex-direction: column; min-height: 0; }
.dashboard-updates ol { flex: 1 1 auto; margin: 0; padding: 20px; list-style: none; }
.dashboard-updates li { position: relative; display: flex; gap: 13px; padding-bottom: 16px; }
.dashboard-updates li:last-child { padding-bottom: 0; }
.dashboard-updates li::before { content: ""; position: absolute; top: 10px; bottom: -3px; left: 4px; width: 1px; background: #e8ecf2; }
.dashboard-updates li:last-child::before { display: none; }
.dashboard-updates li > i { flex-shrink: 0; z-index: 1; width: 9px; height: 9px; margin-top: 5px; border: 2px solid var(--accent); border-radius: 50%; background: #fff; }
.dashboard-updates .update-experiment > i { border-color: #52c41a; }
.dashboard-updates .update-removal > i { border-color: var(--danger); }
.dashboard-updates li > div { display: flex; flex-direction: column; min-width: 0; align-items: flex-start; gap: 6px; }
.dashboard-update-kind { color: var(--text); font-size: 12px; }
.dashboard-updates li a, .dashboard-updates li button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; line-height: 1.7; text-align: left; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; }
.dashboard-updates li a:hover, .dashboard-updates li button:hover { text-decoration: underline; }
.dashboard-update-title { color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; }
.dashboard-update-actor { color: var(--muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.dashboard-updates time { color: var(--muted); font-size: 12px; }
.dashboard-updates-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding: 10px 16px; text-align: initial; }
.dashboard-updates-pagination button { min-width: 62px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.dashboard-updates-pagination button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-pale); }
.dashboard-updates-pagination button:disabled { cursor: default; opacity: .4; }
.dashboard-updates-pagination span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dashboard-experiments { flex: 1 1 auto; }
.dashboard-experiments > div { padding: 0 20px; }
.dashboard-experiment-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid #f0f2f5; background: #fff; color: var(--muted); text-align: left; cursor: pointer; }
.dashboard-experiment-row:last-child { border-bottom: 0; }
.dashboard-experiment-row:hover { color: var(--accent); }
.dashboard-experiment-row > span:first-of-type { flex: 1; min-width: 0; }
.dashboard-experiment-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 14px; font-weight: 500; }
.dashboard-experiment-row small { display: block; margin-top: 5px; font-size: 12px; }
.dashboard-empty-note { margin: 0; padding: 35px 24px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.dashboard-error { display: flex; align-items: center; gap: 10px; padding: 15px 20px; margin-bottom: 20px; border: 1px solid #ffccc7; border-radius: 8px; color: var(--danger); background: var(--danger-pale); }
.dashboard-error span { flex: 1; }
.dashboard-error button { border: 0; background: transparent; color: inherit; text-decoration: underline; cursor: pointer; }
.dashboard-skeleton { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dashboard-skeleton > div, .dashboard-skeleton > section { position: relative; overflow: hidden; height: 120px; border: 1px solid var(--line); border-radius: 8px; background: #eef1f6; }
.dashboard-skeleton > section { grid-column: span 2; height: 360px; }
.dashboard-skeleton > div::after, .dashboard-skeleton > section::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, transparent, #ffffffb0, transparent); animation: dashboard-loading 1.5s infinite; }
.dashboard-page button:disabled { cursor: wait; opacity: .65; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .dashboard-metric, .dashboard-shortcuts > * { transition: transform .2s ease-out, box-shadow .2s ease-out; }
  .dashboard-metric:hover, .dashboard-shortcuts > *:hover { transform: translateY(-3px); box-shadow: 0 4px 12px #0b122014, 0 8px 24px #0b12201a; }
  .dashboard-metric:active, .dashboard-shortcuts > *:active { transform: translateY(-1px); }
}
@media (max-width: 1200px) {
  .app-main:has(> .dashboard-page) { --dashboard-gutter: 24px; }
  .dashboard-page { padding-block: 24px; }
  .dashboard-columns { grid-template-columns: minmax(0, 1fr) 270px; }
  .dashboard-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-project-row { gap: 9px; }
}
@media (max-width: 800px) {
  .dashboard-columns { grid-template-columns: minmax(0, 1fr); }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-welcome { align-items: flex-start; }
  .dashboard-updates ol { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
}
@media (max-width: 600px) {
  .app-main:has(> .dashboard-page) { --dashboard-gutter: 16px; }
  .dashboard-page { padding-block: 22px 25px; }
  .dashboard-welcome { gap: 10px; }
  .dashboard-welcome h1 { font-size: 24px; }
  .dashboard-welcome p { font-size: 14px; }
  .dashboard-refresh { padding: 7px; font-size: 0; }
  .dashboard-metrics { gap: 10px; }
  .dashboard-metric { padding: 17px; }
  .dashboard-metric > strong { font-size: 28px; }
  .dashboard-panel > header { padding: 14px 16px; }
  .dashboard-project-toolbar { padding: 12px 10px; }
  .dashboard-project-toolbar button { padding: 6px 8px; }
  .dashboard-project-list { padding: 0 14px 5px; }
  .dashboard-project-icon { display: none; }
  .dashboard-project-title { font-size: 16px; }
  .dashboard-project-row p { gap: 4px; font-size: 13px; }
  .dashboard-status { padding: 2px 5px; }
  .dashboard-project-row { gap: 8px; }
  .dashboard-shortcuts { gap: 10px; }
  .dashboard-updates ol { grid-template-columns: 1fr; }
  .dashboard-skeleton { grid-template-columns: 1fr 1fr; }
  .dashboard-skeleton > section { grid-column: 1 / -1; height: 240px; }
}
@media (prefers-reduced-motion: reduce) { .dashboard-skeleton > div::after, .dashboard-skeleton > section::after { animation: none; } }
@keyframes dashboard-loading { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Use the content width after the sidebar, rather than the monitor width. */
@container (max-width: 1000px) {
  .dashboard-columns { grid-template-columns: minmax(0, 1fr); }
  .dashboard-updates ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 560px) {
  .dashboard-welcome { flex-wrap: wrap; }
  .dashboard-shortcuts, .dashboard-updates ol { grid-template-columns: minmax(0, 1fr); }
  .dashboard-shortcuts > * { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 3px 12px; align-items: center; }
  .dashboard-shortcuts i { grid-row: 1 / 3; margin: 0; }
  .dashboard-shortcuts span { margin: 0; }
  .dashboard-project-toolbar { flex-wrap: wrap; }
}
/* Reference: eChance login layout; ChemMind branding and existing auth controls. */
.login-page { --login-blue: #2f54eb; --login-form-width: 420px; --login-hero-width: 264px; position: relative; isolation: isolate; height: var(--app-viewport-height); min-height: 0; display: grid; grid-template-rows: minmax(min-content, 1fr) auto auto; align-items: center; gap: 12px; padding: 48px 40px 16px; overflow-x: hidden; overflow-y: auto; color: #242424; background: radial-gradient(circle at 4% 2%, #2f54eb0d, transparent 22%), radial-gradient(circle at 95% 95%, #2f54eb12, transparent 27%), radial-gradient(#0b12200c .8px, transparent .8px) 0 0 / 28px 28px, linear-gradient(160deg, #fff, #f5f7fa 45%, #eaeefc); }
.login-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--login-hero-width) var(--login-form-width); align-items: center; gap: 64px; width: 100%; max-width: 1360px; margin: auto; }
.login-brand-panel { min-width: 0; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand strong {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.35px;
}
.login-brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(9, 69, 118, .12);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(10, 57, 100, .1);
}
.login-brand-mark .chem-logo { width: 36px; height: 36px; }
.login-brand-copy h1 { margin: 28px 0 0; color: #202020; font-size: 34px; font-weight: 700; line-height: 1.35; letter-spacing: -.6px; }
.login-brand-copy p { margin: 12px 0 0; color: #898b90; font-size: 15px; line-height: 1.7; }
.login-capabilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.login-capabilities article { padding: 16px 18px; border: 1px solid #0b12200f; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px #0b12200a, 0 2px 8px #0b12200f; transition: transform .2s, box-shadow .2s, border-color .2s; }
.login-capabilities article:hover { transform: translateY(-3px); border-color: #2f54eb33; box-shadow: 0 6px 18px #0b122010; }
.login-capabilities h2 { display: flex; align-items: center; gap: 10px; margin: 0; color: #262626; font-size: 14px; font-weight: 600; }
.login-capabilities h2 svg { box-sizing: content-box; flex-shrink: 0; width: 16px; height: 16px; padding: 8px; border: 1px solid #2f54eb2e; border-radius: 9px; color: #4261ff; background: #2f54eb0f; }
.login-capabilities p { margin: 10px 0 0; color: #898b90; font-size: 13px; line-height: 1.7; }
.login-hero { position: relative; width: var(--login-hero-width); }
.login-hero-backdrop { position: absolute; inset: 0; transform: rotate(4deg) translate(18px, 10px); border-radius: 20px; background: #2f54eb1a; }
.login-hero-float img { display: block; width: 100%; height: auto; aspect-ratio: 264 / 346; transform: rotate(-5deg); filter: drop-shadow(0 24px 48px #0b12202e); }
.login-hero-chip { position: absolute; padding: 8px 14px; border: 1px solid #0b12200f; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px #0b122014, 0 8px 24px #0b12201a; color: #333; font-size: 13px; font-weight: 600; white-space: nowrap; }
.login-hero-chip-a { top: 14px; left: -40px; display: flex; align-items: center; gap: 8px; }
.login-hero-chip-a svg { color: #52c41a; }
.login-hero-chip-b { bottom: 70px; right: -46px; padding: 10px 14px; }
.login-hero-chip-b span { display: flex; align-items: center; gap: 8px; }
.login-hero-chip-b svg { color: #4261ff; }
.login-hero-chip-b i { display: block; width: 118px; height: 4px; margin-top: 8px; border-radius: 2px; background: linear-gradient(90deg, #2f54eb 62%, #dfe6ff 62%); }
.login-form-panel { width: 100%; min-width: 0; margin: 0; padding: 0; }
.login-card { width: 100%; padding: 36px 32px 28px; border: 1px solid #0b12200f; border-radius: 8px; background: #fff; box-shadow: 0 4px 12px #0b122014, 0 8px 24px #0b12201a; }
.login-card-heading { display: flex; align-items: center; gap: 10px; }
.login-card-heading .login-brand-mark { width: 28px; height: 28px; border-radius: 6px; }
.login-card-heading .chem-logo { width: 25px; height: 25px; }
.login-card h2 { margin: 0; font-size: 20px; font-weight: 600; color: #242424; line-height: 1.4; }
.login-card header > p { margin: 6px 0 0; color: #929292; font-size: 13px; line-height: 1.6; }
.login-fields { display: grid; gap: 26px; margin-top: 30px; }
.login-field { display: grid; gap: 8px; }
.login-field label { color: #333; font-size: 14px; font-weight: 400; }
.login-field label > span { margin-right: 4px; color: #ff4d4f; }
.login-input { display: flex; align-items: center; gap: 5px; height: 40px; padding: 0 11px; border: 1px solid #d9d9d9; border-radius: 10px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.login-input > svg { flex-shrink: 0; }
.login-input:hover { border-color: #8599ff; }
.login-input:focus-within { border-color: #4261ff; box-shadow: 0 0 0 2px #2f54eb12; }
.login-input input { min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: none; color: #262626; background: transparent; font: inherit; font-size: 16px; }
.login-input input::placeholder { color: #bfbfbf; }
/* Edge supplies its own reveal control; the accessible React button owns this action. */
.login-password input::-ms-reveal { display: none; }
.login-password button { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 32px; padding: 0; border: 0; border-radius: 4px; color: #999; background: transparent; cursor: pointer; }
.login-password button:hover { color: var(--login-blue); }
.login-actions { display: grid; gap: 4px; margin-top: 24px; }
.login-submit { min-height: 40px; padding: 7px 12px; border: 0; border-radius: 9px; color: white; background: var(--login-blue); box-shadow: 0 2px 0 #0b122005; font: inherit; font-size: 16px; letter-spacing: 2px; cursor: pointer; transition: background .2s, box-shadow .2s, transform .2s; }
.login-submit:hover:not(:disabled) { background: #4265fa; box-shadow: 0 4px 12px #2f54eb33; transform: translateY(-1px); }
.login-submit:active:not(:disabled) { transform: translateY(0); background: #2144d4; }
.login-save-password { justify-self: center; min-height: 28px; padding: 3px 8px; border: 0; border-radius: 4px; color: #6475b6; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.login-save-password:hover:not(:disabled) { color: var(--login-blue); background: #f3f5ff; }
.login-submit:disabled, .login-save-password:disabled { opacity: .6; cursor: wait; }
.login-card button:focus-visible { outline: 2px solid var(--login-blue); outline-offset: 3px; }
.login-error { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; padding: 10px 12px; border: 1px solid #ffccc7; border-radius: 6px; background: #fff2f0; color: #b42318; font-size: 13px; line-height: 1.6; }
.login-error svg { flex-shrink: 0; margin-top: 2px; }
.login-account-note { margin: 8px 0 0; color: #929292; font-size: 12px; line-height: 1.7; text-align: center; }
.login-security { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #f0f0f0; color: #929292; font-size: 12px; line-height: 1.7; text-align: center; }
.login-decoration { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.login-watermark { position: absolute; z-index: -1; right: -130px; bottom: -160px; width: 560px; height: 560px; transform: rotate(-8deg); color: #2f54eb; opacity: .045; pointer-events: none; }
.login-co-brand { position: relative; justify-self: center; width: min(520px, 52vw); aspect-ratio: 2168 / 430; overflow: hidden; opacity: .88; mix-blend-mode: multiply; }
.login-co-brand img { position: absolute; top: 50%; left: 0; display: block; width: 100%; height: auto; transform: translateY(-50%); filter: contrast(1.03); }
.login-footer { position: relative; justify-self: end; color: #909399; font-size: 12px; text-align: right; }
/* Wide desktop: match the reference's larger content-to-viewport ratio. */
@media (min-width: 1440px) {
  .login-page { --login-form-width: 464px; --login-hero-width: 292px; }
  .login-layout { max-width: 1500px; gap: 70px; }
  .login-brand { gap: 14px; }
  .login-brand strong { font-size: 22px; }
  .login-brand-mark { width: 44px; height: 44px; }
  .login-brand-copy h1 { font-size: 38px; margin-top: 30px; }
  .login-brand-copy p { font-size: 16px; }
  .login-capabilities { gap: 14px; margin-top: 44px; }
  .login-capabilities article { padding: 18px 20px; }
  .login-capabilities h2 { font-size: 15px; }
  .login-capabilities h2 svg { width: 18px; height: 18px; padding: 9px; }
  .login-capabilities p, .login-hero-chip { font-size: 14px; }
  .login-card { padding-right: 36px; padding-left: 36px; }
  .login-card h2 { font-size: 22px; }
  .login-card header > p { font-size: 14px; }
  .login-field label { font-size: 15px; }
  .login-input { height: 44px; }
  .login-input input, .login-submit { font-size: 18px; }
  .login-submit { min-height: 44px; }
  .login-save-password, .login-account-note, .login-security { font-size: 13px; }
}
@media (max-width: 1359px) {
  .login-hero { display: none; }
  .login-layout { grid-template-columns: minmax(0, 1fr) 420px; max-width: 1100px; gap: 40px; }
}
@media (max-width: 900px) {
  .login-page { padding: 32px 24px 20px; }
  .login-brand-panel { display: none; }
  .login-layout { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  .login-co-brand { width: min(420px, 76vw); }
}
@media (max-width: 480px) {
  .login-page { padding-right: 18px; padding-left: 18px; }
  .login-card { padding: 28px 24px 24px; }
  .login-card h2 { font-size: 20px; }
  .login-input, .login-submit { min-height: 44px; }
  .login-password button { min-width: 32px; height: 36px; }
  .login-co-brand { width: min(340px, 90vw); }
}
@media (prefers-reduced-motion: no-preference) {
  .login-brand, .login-brand-copy h1, .login-brand-copy p, .login-capabilities article { animation: login-item-in .4s ease-out backwards; }
  .login-brand-copy h1 { animation-delay: 80ms; }
  .login-brand-copy p { animation-delay: 160ms; }
  .login-capabilities article:nth-child(1) { animation-delay: 240ms; }
  .login-capabilities article:nth-child(2) { animation-delay: 340ms; }
  .login-capabilities article:nth-child(3) { animation-delay: 440ms; }
  .login-capabilities article:nth-child(4) { animation-delay: 540ms; }
  .login-card { animation: login-card-in .45s ease-out .15s backwards; }
  .login-hero { animation: login-card-in .5s ease-out .26s backwards; }
  .login-co-brand { animation: login-card-in .45s ease-out .36s backwards; }
  .login-hero-float { animation: login-float 5s ease-in-out infinite alternate; }
  .login-hero-chip-a { animation: login-float 4s ease-in-out .6s infinite alternate; }
  .login-hero-chip-b { animation: login-float 4.5s ease-in-out infinite alternate-reverse; }
}
@media (prefers-reduced-motion: reduce) {
  .login-page *, .login-page *::before, .login-page *::after { animation: none !important; transition: none !important; }
  .login-capabilities article:hover, .login-submit:hover:not(:disabled) { transform: none; }
}
@keyframes login-item-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes login-card-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes login-float { from { transform: translateY(0); } to { transform: translateY(-12px); } }
.account-management { min-width: 0; padding: 30px 32px 48px; }
.account-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.account-page-header h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.35; color: var(--ink); }
.account-page-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.account-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 17px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; white-space: nowrap; transition: background .16s, border-color .16s, box-shadow .16s; }
.account-button.primary { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 2px 4px #304ff018; }
.account-button.primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.account-button:hover:not(:disabled) { border-color: var(--accent); }
.account-management button:disabled, .account-dialog button:disabled { opacity: .5; cursor: default; }
.account-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; gap: 20px; }
.account-list-card, .account-permissions { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 1px 3px #11182703; }
.account-list-card { padding: 16px 18px 6px; }
.account-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.account-search { display: flex; align-items: center; flex: 1 1 180px; min-width: 150px; height: 38px; padding: 0 11px; gap: 7px; border: 1px solid var(--line-strong); border-radius: 8px; color: #969da9; transition: border-color .16s, box-shadow .16s; }
.account-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.account-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; }
.account-search input::placeholder { color: #9299a5; }
.account-role-filter { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; border-radius: 8px; padding: 3px; background: #f5f6f8; }
.account-role-filter button { padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: #606976; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .16s, color .16s, box-shadow .16s; }
.account-role-filter button[aria-pressed="true"] { background: white; color: var(--ink); box-shadow: 0 1px 4px #18233b12; }
.account-status-filter { flex: 0 0 126px; width: 126px; }
.account-status-filter .menu-select-trigger { height: 38px; padding: 0 10px; color: #606976; font-size: 14px; font-weight: 500; }
.account-status-filter .menu-select-popover { right: 0; width: 160px; }
.account-list-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; }
.account-list-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.account-icon-button { display: inline-grid; place-items: center; padding: 6px; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; transition: background .16s, color .16s; }
.account-icon-button:hover:not(:disabled) { background: var(--accent-pale); color: var(--accent); }
.account-table-scroll { overflow-x: auto; border-radius: 8px; scrollbar-width: thin; }
.account-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.account-table th { background: #f8f9fb; font-weight: 650; color: var(--ink); padding: 15px 10px; white-space: nowrap; }
.account-table td { padding: 17px 10px; border-top: 1px solid #edf0f3; color: #454c58; }
.account-table tbody tr { transition: background .16s; }
.account-table tbody tr:hover { background: #fafbff; }
.account-person { display: flex; align-items: center; gap: 9px; min-width: 130px; }
.account-avatar { display: inline-grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 19px; color: white; background: var(--accent); }
.account-avatar.admin { background: #f5a600; }
.account-avatar.viewer { background: #667085; }
.account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #252b34; }
.account-self { padding: 1px 6px; border: 1px solid #a5d5fb; border-radius: 4px; background: #edf8ff; color: #247fbd; font-size: 12px; white-space: nowrap; }
.account-username { display: block; max-width: 180px; min-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-role-tag { display: inline-block; padding: 2px 6px; border: 1px solid #dfe2e6; border-radius: 5px; color: #616975; background: #fafafa; white-space: nowrap; font-size: 12px; }
.account-role-tag.admin { color: #ad7900; border-color: #f6df89; background: #fffbeb; }
.account-role-tag.viewer { color: #475467; border-color: #d0d5dd; background: #f2f4f7; }
.account-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.account-status::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #b0b7c1; }
.account-status.active::before { background: #52b82c; }
.account-status.inactive { color: #8b93a0; }
.account-row-actions { display: flex; gap: 14px; white-space: nowrap; }
.account-row-actions button, .account-empty button, .account-error button { padding: 5px 0; border: 0; background: transparent; color: var(--accent); font: inherit; cursor: pointer; }
.account-row-actions button:hover:not(:disabled), .account-empty button:hover { text-decoration: underline; text-underline-offset: 3px; }
.account-row-actions .account-delete-action { color: #b43b3b; }
.account-button.danger { border-color: #b43b3b; background: #b43b3b; color: white; }
.account-button.danger:hover:not(:disabled) { border-color: #963030; background: #963030; }
.account-delete-notice { margin: 0; padding: 12px; border: 1px solid #f1cdcd; border-radius: 7px; background: #fff5f5; color: #984040; font-size: 13px; line-height: 1.75; }
.account-transfer-section { display: grid; gap: 12px; min-width: 0; }
.account-transfer-section > p { margin: 0; color: #52618a; font-size: 13px; line-height: 1.7; }
.account-transfer-section ul { max-height: 120px; overflow: auto; margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.account-permissions h2 { margin: 0; padding: 21px 24px; border-bottom: 1px solid #edf0f3; color: var(--ink); font-size: 18px; }
.account-permissions-body { padding: 22px 24px 20px; }
.account-permissions table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.65; }
.account-permissions thead { background: #f8f9fb; }
.account-permissions th { text-align: left; }
.account-permissions th, .account-permissions td { padding: 12px 9px; border-bottom: 1px solid #edf0f3; }
.account-permissions thead th { font-weight: 650; white-space: nowrap; }
.account-permissions tbody th { font-weight: 400; color: #454c58; }
.account-permissions th:not(:first-child), .account-permissions td { width: 26%; text-align: center; }
.account-permissions svg { display: block; margin: auto; color: #63b33d; }
.account-permissions svg[aria-label="不允许"] { color: #bfc4cc; }
.account-permissions-body > p { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.account-empty { display: grid; justify-items: center; gap: 9px; padding: 56px 16px; color: var(--muted); text-align: center; font-size: 13px; }
.account-empty strong { font-size: 15px; color: #616a7a; }
.account-error { padding: 10px 12px; border: 1px solid #f1cdcd; border-radius: 7px; background: #fff5f5; color: #b43b3b; font-size: 13px; line-height: 1.6; }
.account-dialog { width: 480px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); box-shadow: 0 20px 70px #1019322b; overflow: auto; }
.account-dialog[open] { animation: account-dialog-in .22s cubic-bezier(.22,1,.36,1); }
.account-dialog::backdrop { background: #10182b45; animation: account-backdrop-in .18s ease; }
.account-dialog.is-closing { animation: account-dialog-out .16s ease forwards; }
.account-dialog.is-closing::backdrop { animation: account-backdrop-out .16s ease forwards; }
.account-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px 26px 19px; border-bottom: 1px solid var(--line); }
.account-dialog h2 { margin: 0 0 6px; font-size: 21px; }
.account-dialog header p { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.account-dialog form { padding: 22px 26px 24px; }
.account-dialog fieldset { display: grid; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.account-dialog label { display: grid; gap: 8px; font-size: 14px; color: #444d5d; }
.account-select-field { display: grid; min-width: 0; gap: 8px; color: #444d5d; font-size: 14px; }
.account-form-select { width: 100%; }
.account-form-select .menu-select-trigger { min-height: 42px; border-radius: 7px; font-size: 14px; font-weight: 500; }
.account-form-select .menu-select-popover { top: auto; right: auto; bottom: calc(100% + 7px); left: 0; width: min(225px, calc(100vw - 40px)); }
.account-dialog input, .account-dialog select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; color: var(--ink); font: inherit; transition: border-color .16s, box-shadow .16s; }
.account-dialog input:focus, .account-dialog select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.account-dialog input:disabled, .account-dialog select:disabled { background: #f6f7f9; color: #939ba8; cursor: not-allowed; }
.account-form-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.account-field-hint { margin: -9px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.account-password-notice { margin: 0; padding: 12px; border-radius: 7px; color: #52618a; background: #f4f6ff; font-size: 13px; line-height: 1.7; }
.account-password-field { position: relative; display: block; }
.account-password-field input { padding-right: 46px; }
.account-password-field button { position: absolute; right: 5px; top: 4px; bottom: 4px; display: grid; place-items: center; width: 34px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #9199a6; cursor: pointer; }
.account-dialog input::-ms-reveal, .account-dialog input::-ms-clear { display: none; }
.account-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.account-management :focus-visible, .account-dialog button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@keyframes account-dialog-in { from { transform: translateY(10px); } to { transform: translateY(0); } }
@keyframes account-dialog-out { to { transform: translateY(6px); opacity: 0; } }
@keyframes account-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes account-backdrop-out { to { opacity: 0; } }
@media (max-width: 1250px) { .account-layout { grid-template-columns: minmax(0,1fr); } .account-permissions-body { max-width: 760px; } }
@media (max-width: 700px) {
  .account-management { padding: 22px 16px 36px; }
  .account-page-header { flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
  .account-page-header h1 { font-size: 24px; }
  .account-page-header p { font-size: 13px; }
  .account-list-card { padding: 12px 12px 6px; }
  .account-search { flex-basis: 100%; }
  .account-toolbar { gap: 9px; }
  .account-status-filter { flex: 0 0 126px; }
  .account-role-filter button { padding: 6px 8px; }
  .account-table { min-width: 610px; }
  .account-permissions h2 { padding: 18px; }
  .account-permissions-body { padding: 16px; }
  .account-permissions table { font-size: 13px; }
  .account-permissions th, .account-permissions td { padding: 12px 6px; }
  .account-dialog > header, .account-dialog form { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .account-dialog[open], .account-dialog::backdrop { animation: none; } }
.audit-page { box-sizing:border-box; width:100%; min-width:0; max-width:100%; padding:30px 32px 48px; overflow-x:hidden; }
.audit-page-header { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:28px; }
.audit-page-header h1 { margin:0 0 8px; color:var(--ink); font-size:26px; line-height:1.35; }
.audit-page-header p { margin:0; color:var(--muted); font-size:14px; line-height:1.7; }
.audit-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:8px 17px; border:1px solid var(--line-strong); border-radius:8px; background:#fff; color:var(--ink); font:inherit; cursor:pointer; white-space:nowrap; box-shadow:0 1px 3px #1118270a; }
.audit-button:hover:not(:disabled) { border-color:var(--accent); color:var(--accent); }
.audit-button:disabled { opacity:.55; cursor:default; }
.audit-button .is-spinning { animation:audit-spin 1s linear infinite; }
.audit-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-bottom:24px; }
.audit-summary-card { display:flex; align-items:flex-start; justify-content:space-between; min-height:160px; padding:28px 30px; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 1px 3px #11182708; }
.audit-summary-card > div { display:grid; align-content:start; }
.audit-summary-card > svg { color:#456be3; }
.audit-summary-card span { color:var(--muted); font-size:14px; }
.audit-summary-card strong { margin-top:28px; color:#1d2430; font-size:34px; font-weight:650; letter-spacing:-.03em; line-height:1; font-variant-numeric:tabular-nums; }
.audit-summary-card strong small { margin-left:6px; font-size:17px; font-weight:500; letter-spacing:0; }
.audit-summary-card em { margin-top:12px; color:#d94645; font-size:13px; font-style:normal; font-weight:600; }
.audit-log-card { box-sizing:border-box; width:100%; min-width:0; max-width:100%; padding:20px 22px 8px; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 1px 3px #11182708; }
.audit-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.audit-range { display:flex; flex:0 0 auto; align-items:center; gap:2px; padding:3px; border-radius:8px; background:#f5f6f8; }
.audit-range button { min-height:32px; padding:6px 11px; border:0; border-radius:6px; background:transparent; color:#606976; font:inherit; font-size:14px; cursor:pointer; white-space:nowrap; }
.audit-range button[aria-pressed="true"] { background:#fff; color:var(--ink); box-shadow:0 1px 4px #18233b12; }
.audit-search { display:flex; align-items:center; flex:1 1 280px; min-width:220px; height:38px; padding:0 11px; gap:7px; border:1px solid var(--line-strong); border-radius:8px; color:#969da9; transition:border-color .16s,box-shadow .16s; }
.audit-search:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-pale); }
.audit-search input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--ink); font:inherit; font-size:14px; }
.audit-search input::placeholder { color:#9299a5; }
.audit-module-filter { flex:0 0 158px; width:158px; }
.audit-result-filter { flex:0 0 132px; width:132px; }
.audit-module-filter .menu-select-trigger,.audit-result-filter .menu-select-trigger { height:38px; padding:0 10px; color:#606976; font-size:14px; font-weight:500; }
.audit-module-filter .menu-select-popover,.audit-result-filter .menu-select-popover { right:0; width:190px; }
.audit-list-meta { display:flex; align-items:center; min-height:48px; }
.audit-list-meta p { margin:0; color:var(--muted); font-size:13px; }
.audit-error { margin:14px 0 0; padding:10px 12px; border:1px solid #f1cdcd; border-radius:7px; background:#fff5f5; color:#b43b3b; font-size:13px; }
.audit-error button,.audit-empty button { padding:4px 0; border:0; background:transparent; color:var(--accent); font:inherit; cursor:pointer; }
.audit-table-scroll { width:100%; max-width:100%; overflow-x:auto; border-radius:8px; scrollbar-width:thin; }
.audit-table { width:100%; min-width:1350px; border-collapse:collapse; text-align:left; color:#454c58; font-size:14px; }
.audit-table th { padding:15px 12px; background:#f8f9fb; color:var(--ink); font-weight:650; white-space:nowrap; }
.audit-table td { padding:17px 12px; border-top:1px solid #edf0f3; vertical-align:middle; }
.audit-table tbody tr { transition:background .16s; }
.audit-table tbody tr:hover { background:#fafbff; }
.audit-table time,.audit-duration,.audit-ip { white-space:nowrap; font-variant-numeric:tabular-nums; }
.audit-ip { color:#4f5968; font-family:inherit; }
.audit-location { display:grid; gap:4px; min-width:160px; max-width:230px; }
.audit-location strong,.audit-location small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.audit-location strong { color:#374151; font-weight:550; }
.audit-location small { color:#9299a5; font-size:12px; }
.audit-geo-note { margin:12px 0 16px; color:var(--muted); font-size:12px; line-height:1.6; }
.audit-geo-note a { color:var(--accent); }
.audit-actor,.audit-action { display:grid; gap:5px; min-width:125px; }
.audit-actor strong,.audit-action strong { max-width:190px; overflow:hidden; color:#303742; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.audit-actor small,.audit-action small { max-width:190px; overflow:hidden; color:#9299a5; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.audit-module { display:inline-flex; padding:3px 8px; border:1px solid #c9d7f5; border-radius:6px; background:#f3f6ff; color:#315ab7; font-size:12px; white-space:nowrap; }
.audit-module-account { border-color:#f1d78c; background:#fff9e9; color:#a56c00; }
.audit-module-ai,.audit-module-knowledge { border-color:#efbddc; background:#fff1f9; color:#b33982; }
.audit-module-product,.audit-module-import { border-color:#f1caa8; background:#fff6ee; color:#bb651f; }
.audit-module-security,.audit-module-trash { border-color:#ecc5c5; background:#fff2f2; color:#b74444; }
.audit-target { display:block; max-width:220px; overflow:hidden; color:#3e4652; text-overflow:ellipsis; white-space:nowrap; }
.audit-result { display:inline-flex; min-width:45px; justify-content:center; padding:3px 8px; border-radius:6px; font-size:12px; font-weight:650; white-space:nowrap; }
.audit-result.success { background:#eaf8e4; color:#38951c; }
.audit-result.failure { background:#fff0ef; color:#c6423f; }
.audit-detail-link { padding:5px 0; border:0; background:transparent; color:var(--accent); font:inherit; cursor:pointer; }
.audit-detail-link:hover { text-decoration:underline; text-underline-offset:3px; }
.audit-empty { display:grid; justify-items:center; gap:9px; padding:62px 16px; color:var(--muted); text-align:center; font-size:13px; }
.audit-empty svg { color:#9aa8c0; }
.audit-empty strong { color:#5a6473; font-size:15px; }
.audit-pagination { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:64px; border-top:1px solid #edf0f3; color:var(--muted); font-size:13px; }
.audit-pagination > div { display:flex; gap:8px; }
.audit-pagination button { display:inline-flex; align-items:center; gap:4px; min-height:34px; padding:6px 10px; border:1px solid var(--line-strong); border-radius:7px; background:#fff; color:#505967; font:inherit; cursor:pointer; }
.audit-pagination button:hover:not(:disabled) { border-color:var(--accent); color:var(--accent); }
.audit-pagination button:disabled { opacity:.45; cursor:default; }
.audit-detail-drawer { width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; background:transparent; overflow:hidden; }
.audit-detail-drawer::backdrop { background:#10182b45; animation:audit-backdrop-in .18s ease; }
.audit-detail-drawer[open] { display:flex; justify-content:flex-end; }
.audit-drawer-sheet { display:flex; flex-direction:column; width:min(520px,calc(100vw - 24px)); height:100%; background:#fff; color:var(--ink); box-shadow:-18px 0 60px #10193225; animation:audit-drawer-in .24s cubic-bezier(.22,1,.36,1); }
.audit-drawer-sheet > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:26px 28px 22px; border-bottom:1px solid var(--line); }
.audit-drawer-kicker { display:flex; align-items:center; gap:7px; margin-bottom:10px; color:var(--accent); font-size:12px; font-weight:650; }
.audit-drawer-sheet h2 { margin:0 0 7px; font-size:22px; }
.audit-drawer-sheet header p { margin:0; color:var(--muted); font-size:13px; }
.audit-icon-button { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; padding:0; border:0; border-radius:7px; background:transparent; color:var(--muted); cursor:pointer; }
.audit-icon-button:hover { background:var(--accent-pale); color:var(--accent); }
.audit-drawer-body { flex:1; min-height:0; overflow:auto; padding:8px 28px 32px; }
.audit-drawer-body section { padding:22px 0; border-bottom:1px solid #edf0f3; }
.audit-drawer-body h3 { margin:0 0 14px; font-size:15px; }
.audit-drawer-body dl { display:grid; gap:13px; margin:0; }
.audit-drawer-body dl > div { display:grid; grid-template-columns:112px minmax(0,1fr); gap:16px; align-items:start; }
.audit-drawer-body dt { color:var(--muted); font-size:13px; }
.audit-drawer-body dd { min-width:0; margin:0; color:#374151; font-size:13px; line-height:1.65; overflow-wrap:anywhere; }
.audit-drawer-body code { padding:2px 5px; border-radius:4px; background:#f5f6f8; color:#465267; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:12px; }
.audit-failure-detail p { margin:0; padding:12px 14px; border-radius:7px; background:#fff3f2; color:#a73c39; font-size:13px; line-height:1.7; }
.audit-safety-note { margin:22px 0 0; color:#7d8795; font-size:12px; line-height:1.7; }
.audit-page :focus-visible,.audit-detail-drawer :focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@keyframes audit-spin { to { transform:rotate(360deg); } }
@keyframes audit-backdrop-in { from { opacity:0; } to { opacity:1; } }
@keyframes audit-drawer-in { from { transform:translateX(28px); opacity:.7; } to { transform:translateX(0); opacity:1; } }
@media (max-width:1100px) { .audit-summary-grid { grid-template-columns:1fr; gap:14px; } .audit-summary-card { min-height:130px; } }
@media (max-width:700px) {
  .audit-page { padding:22px 16px 36px; }
  .audit-page-header { flex-wrap:wrap; gap:16px; margin-bottom:22px; }
  .audit-page-header h1 { font-size:24px; }
  .audit-page-header p { font-size:13px; }
  .audit-summary-card { min-height:116px; padding:22px; }
  .audit-summary-card strong { margin-top:20px; font-size:30px; }
  .audit-log-card { padding:14px 12px 6px; }
  .audit-range { width:100%; }
  .audit-range button { flex:1; }
  .audit-search { flex-basis:100%; min-width:0; }
  .audit-module-filter,.audit-result-filter { flex:1 1 135px; width:auto; }
  .audit-pagination { align-items:flex-start; flex-direction:column; padding:14px 0; }
  .audit-pagination > div,.audit-pagination button { flex:1; }
  .audit-pagination > div { width:100%; }
  .audit-pagination button { justify-content:center; }
  .audit-drawer-sheet > header,.audit-drawer-body { padding-left:20px; padding-right:20px; }
  .audit-drawer-body dl > div { grid-template-columns:88px minmax(0,1fr); gap:12px; }
}
@media (prefers-reduced-motion:reduce) { .audit-button .is-spinning,.audit-detail-drawer::backdrop,.audit-drawer-sheet { animation:none; } }
.record-import-layer { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 24px; background: #15203980; }
.record-import-dialog { display: flex; flex-direction: column; width: min(1100px, 100%); max-height: calc(100dvh - 48px); background: #fff; border: 1px solid #dce1eb; border-radius: 16px; box-shadow: 0 24px 80px #14234040; overflow: hidden; color: var(--text); }
.record-import-dialog > header, .record-import-dialog > footer { display: flex; align-items: center; gap: 14px; padding: 18px 24px; flex-shrink: 0; }
.record-import-dialog > header { justify-content: space-between; border-bottom: 1px solid #e1e5ef; }
.record-import-dialog h2 { margin: 0 0 6px; font-size: 22px; }
.record-import-dialog h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.record-import-dialog p { margin: 6px 0; line-height: 1.7; }
.record-import-dialog button, .record-import-dialog select, .record-import-metadata input { min-height: 38px; border: 1px solid #d3d9e5; border-radius: 7px; background: #fff; padding: 7px 12px; font: inherit; color: inherit; }
.record-import-dialog button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.record-import-dialog button:disabled { opacity: .5; cursor: default; }
.record-import-dialog button:focus-visible, .record-import-dialog input:focus-visible, .record-import-dialog select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.record-import-dialog .primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.record-import-body { padding: 22px 24px; overflow: auto; min-height: 0; }
.record-import-dialog > header p, .record-import-file > header span { color: var(--muted); font-size: 12px; }
.record-import-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.record-import-dialog .record-import-method { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon copy formats" "icon copy action"; align-items: start; gap: 4px 14px; min-height: 142px; padding: 18px; border-radius: 12px; text-align: left; overflow: hidden; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.record-import-dialog .record-import-method.document { background: #f8f9ff; border-color: #d8def5; }
.record-import-dialog .record-import-method.table { background: #f6fbf9; border-color: #d3e7df; }
.record-import-dialog .record-import-method:hover:not(:disabled) { border-color: #9eabd0; box-shadow: 0 8px 22px #24345c12; transform: translateY(-1px); }
.record-import-dialog .record-import-method.table:hover:not(:disabled) { border-color: #8db7a7; }
.record-import-method-icon { grid-area: icon; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; color: #5268b1; background: #e9edff; }
.record-import-method.table .record-import-method-icon { color: #32745e; background: #e3f3ed; }
.record-import-method-copy { grid-area: copy; display: grid; gap: 4px; min-width: 0; }
.record-import-method-copy small { color: #667085; font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.record-import-method-copy strong { font-size: 17px; line-height: 1.3; }
.record-import-method-copy > span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.record-import-formats { grid-area: formats; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.record-import-formats b { padding: 3px 6px; border: 1px solid #d9deed; border-radius: 5px; background: #fff; color: #5d6880; font-size: 10px; line-height: 1.2; }
.record-import-method-action { grid-area: action; display: inline-flex; justify-self: end; align-items: center; align-self: end; gap: 4px; color: #4d62a9; font-size: 12px; font-weight: 600; }
.record-import-method.table .record-import-method-action { color: #32745e; }
.record-import-limit { margin: 10px 2px 0 !important; color: var(--muted); font-size: 11px; }
.record-import-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 13px; }
.record-import-toggle span { display: block; width: 100%; padding-left: 24px; color: var(--muted); font-size: 12px; }
.record-import-empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.record-import-empty svg { margin: 0 auto 16px; }
.record-import-empty strong { display: block; color: var(--text); }
.record-import-warning { background: #fff7e6; color: #835811; border: 1px solid #eddfbf; padding: 10px 14px; border-radius: 7px; font-size: 12px; overflow-wrap: anywhere; }
ul.record-import-warning { padding-left: 30px; line-height: 1.8; }
.record-import-progress { background: #edf2ff; padding: 12px; border-radius: 7px; }
.record-import-progress.is-busy { position: relative; display: flex; align-items: center; gap: 11px; margin-top: 14px; overflow: hidden; border: 1px solid #d3dcf5; }
.record-import-progress.is-busy::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: linear-gradient(90deg, transparent 0%, var(--accent) 48%, transparent 100%); content: ""; transform: translateX(-100%); animation: record-import-sweep 1.35s ease-in-out infinite; }
.record-import-progress.is-busy > span:last-child { display: grid; gap: 2px; min-width: 0; }
.record-import-progress.is-busy strong { color: #263a72; font-size: 13px; }
.record-import-progress.is-busy small { color: #66728d; font-size: 11px; line-height: 1.55; }
.record-import-spinner,
.record-import-status-icon > i { width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid #c4cfee; border-top-color: var(--accent); border-radius: 50%; animation: record-import-spin .72s linear infinite; }
.record-import-status {
  position: relative;
  display: flex;
  min-height: 62px;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  padding: 10px 20px;
  overflow: hidden;
  border-bottom: 1px solid #d8e0f2;
  background: #edf2ff;
  color: #28385e;
}
.record-import-status.is-importing::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: linear-gradient(90deg, transparent 0%, var(--accent) 48%, transparent 100%); content: ""; transform: translateX(-100%); animation: record-import-sweep 1.35s ease-in-out infinite; }
.record-import-status.is-background { border-bottom-color: #d8e0f2; background: #f2f5fd; }
.record-import-status.is-background[aria-busy="true"]::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: linear-gradient(90deg, transparent 0%, var(--accent) 48%, transparent 100%); content: ""; transform: translateX(-100%); animation: record-import-sweep 1.35s ease-in-out infinite; }
.record-import-status.is-background.has-error { border-bottom-color: #ecd9bd; background: #fff8eb; }
.record-import-status.is-background.has-error .record-import-status-icon { color: #a56616; }
.record-import-status.is-ready { border-bottom-color: #d5e7df; background: #eff8f4; animation: record-import-ready .24s ease-out both; }
.record-import-status.is-ready .record-import-status-icon { color: #2d7b61; }
.record-import-status-icon { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; color: var(--accent); }
.record-import-status-copy { display: grid; min-width: 0; gap: 2px; }
.record-import-status-copy strong { color: #273653; font-size: 13px; line-height: 1.4; }
.record-import-status-copy small { color: #66738c; font-size: 11px; line-height: 1.5; }
.record-import-status > button { margin-left: auto; flex: 0 0 auto; padding: 7px 11px; border: 1px solid #bdd9cd; border-radius: 7px; background: #fff; color: #25684f; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.record-import-status > button:hover { border-color: #91c0ad; background: #f8fffb; }
.record-import-status.is-importing ~ [role="tabpanel"] { pointer-events: none; user-select: none; }
@keyframes record-import-spin { to { transform: rotate(360deg); } }
@keyframes record-import-sweep { 55%, 100% { transform: translateX(100%); } }
@keyframes record-import-ready { from { opacity: .78; transform: translateY(-2px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .record-import-progress.is-busy::after,
  .record-import-status.is-importing::after,
  .record-import-status.is-background[aria-busy="true"]::after,
  .record-import-spinner,
  .record-import-status-icon > i,
  .record-import-status.is-ready { animation: none; }
}
.record-import-file { margin-top: 24px; border-top: 1px solid #dce1eb; padding-top: 18px; }
.record-import-file > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.record-import-record { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 13px; }
.record-import-record span { color: var(--muted); font-size: 12px; }
.record-import-block { position: relative; border: 1px solid #dce1eb; border-radius: 10px; margin-top: 14px; overflow: visible; background: #fff; }
.record-import-block.excluded { opacity: .6; }
.record-import-block.needs-review { border-color: #e6bd75; box-shadow: 0 0 0 3px rgba(199, 131, 8, .07); }
.record-import-block > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 58px; padding: 10px 12px; background: #f7f8fb; border-bottom: 1px solid #e2e5eb; border-radius: 9px 9px 0 0; font-size: 12px; }
.record-import-block.needs-review > header { background: #fffaf0; border-bottom-color: #edd9b5; }
.record-import-block > header label { display: inline-flex; align-items: center; gap: 6px; }
.record-import-block > header small { flex: 1; min-width: 120px; color: var(--muted); overflow-wrap: anywhere; }
.record-import-review-note { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0 !important; padding: 11px 13px; border: 1px solid #e8c889; border-radius: 9px; background: #fffaf0; color: #6f4d14; font-size: 12px; line-height: 1.5 !important; }
.record-import-review-note > b { color: #c66f12; font-size: 20px; line-height: 1; }
.record-import-review-note > span { display: grid; gap: 1px; }
.record-import-review-note strong { color: #65450e; font-size: 13px; }
.record-import-required { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid #e7c27f; border-radius: 6px; background: #fff4da; color: #89570c; font-size: 11px; font-weight: 650; white-space: nowrap; }
.record-import-required b, .record-import-footer-review b { color: #d24e3f; font-size: 16px; line-height: .8; }
.record-import-module-select { width: 210px; margin-left: auto; }
.record-import-dialog .record-import-module-select .menu-select-trigger { min-height: 36px; height: 36px; padding: 0 10px; border-radius: 8px; background: #fff; font-size: 12px; }
.record-import-dialog .record-import-module-select .menu-select-trigger.tone-warning { border-color: #dca84b; background: #fff9ec; color: #744807; box-shadow: 0 0 0 3px rgba(199, 131, 8, .08); }
.record-import-dialog .record-import-module-select .menu-select-popover { right: 0; width: 272px; padding: 6px; }
.record-import-dialog .record-import-module-select .menu-select-option { justify-content: flex-start; min-height: 46px; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; text-align: left; }
.record-import-dialog .record-import-module-select .menu-select-option:hover,
.record-import-dialog .record-import-module-select .menu-select-option:focus-visible { background: #f3f6fc; }
.record-import-dialog .record-import-module-select .menu-select-option[aria-selected="true"] { background: #edf2ff; }
.record-import-dialog .record-import-module-select .menu-select-option.tone-warning { color: #744807; }
.record-import-dialog .record-import-module-select .menu-select-option.tone-warning[aria-selected="true"] { background: #fff4dc; }
.record-import-block img { display: block; max-width: 100%; max-height: 600px; object-fit: contain; margin: 10px auto; }
.record-import-text { white-space: pre-wrap; padding: 12px; font-size: 13px; }
.record-import-document-preview { margin-top: 14px; padding: 22px clamp(18px, 4vw, 42px) 32px; border: 1px solid #d9dde5; background: #eef0f4; }
.record-import-document-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(720px, 100%); margin: 0 auto; padding: 14px 22px; border: 1px solid #d6dbe4; border-bottom: 0; background: #fff; color: #35415a; font-size: 12px; }
.record-import-document-preview > header small { color: var(--muted); font-size: 10px; }
.record-import-document-preview pre { width: min(720px, 100%); min-height: 240px; max-height: 430px; margin: 0 auto; overflow: auto; padding: 26px 30px; border: 1px solid #d6dbe4; background: #fff; color: #303a4b; font: 400 13px/1.9 "Noto Serif SC", "Songti SC", SimSun, serif; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 8px 20px #24345c12; }
.record-import-table-scroll { overflow: auto; max-height: 420px; border-radius: 0 0 9px 9px; }
.record-import-table-scroll table { border-collapse: collapse; min-width: 100%; font-size: 12px; }
.record-import-table-scroll td { min-width: 95px; max-width: 350px; padding: 10px; white-space: pre-wrap; border: 1px solid #dce1eb; }
.record-import-options { margin-top: 24px; padding-top: 18px; border-top: 1px solid #dce1eb; }
.record-import-options > label { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.record-import-metadata { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.record-import-metadata label { display: grid; flex: 1; min-width: 150px; gap: 6px; font-size: 12px; }
.record-import-dialog > footer { border-top: 1px solid #e1e5ef; background: #f8f9fc; }
.record-import-dialog > footer > div { flex: 1; font-size: 13px; }
.record-import-dialog > footer small { display: block; color: var(--muted); margin-top: 4px; }
.record-import-dialog > footer small.record-import-footer-error { color: #a33c35; font-weight: 650; }
.record-import-dialog > footer span { color: #916119; }
.record-import-dialog > footer .record-import-footer-review { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: #89570c; font-weight: 650; }
.record-import-dialog > footer .record-import-stop { border-color: #e6c5c2; color: #a33c35; background: #fffafa; }
.record-import-dialog > footer .record-import-stop:hover { border-color: #d99f9a; background: #fff2f1; }
.sheet-content-group { display: grid; }
.sheet-content-group > .sheet-row { display: contents; }
.sheet-content-group .sheet-cell textarea { min-height: 0; }
.sheet-content-group + .sheet-content-group:has(.sheet-row[data-kind="table"]) { border-top: 8px solid #edf0f5; }
.sheet-toolbar input[type="number"] { width: 52px; border: 1px solid #d3d9e5; border-radius: 4px; padding: 5px; }
.sheet-toolbar .sheet-add-content { gap: 6px; }
@media (max-width: 700px) {
  .record-import-layer { padding: 8px; }
  .record-import-dialog { max-height: calc(100dvh - 16px); }
  .record-import-dialog > header, .record-import-dialog > footer, .record-import-body { padding: 14px; }
  .record-import-dialog > footer { flex-wrap: wrap; }
  .record-import-dialog > footer > div { flex-basis: 100%; }
  .record-import-methods { grid-template-columns: 1fr; }
  .record-import-dialog .record-import-method { min-height: 126px; padding: 14px; }
  .record-import-formats { max-width: 108px; }
  .record-import-document-preview { padding: 14px 10px 22px; }
  .record-import-document-preview > header { align-items: flex-start; flex-direction: column; padding: 12px 15px; }
  .record-import-document-preview pre { max-height: 330px; min-height: 200px; padding: 20px 16px; }
  .record-import-module-select { width: 100%; margin-left: 0; }
  .record-import-dialog .record-import-module-select .menu-select-popover { right: auto; left: 0; width: min(272px, calc(100vw - 48px)); }
  .record-import-status { align-items: flex-start; padding: 11px 14px; }
  .record-import-status > button { margin-left: 0; }
  .record-import-status.is-ready, .record-import-status.is-background { flex-wrap: wrap; }
}

.record-import-task-dock {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 120;
  display: grid;
  grid-template-columns: 34px minmax(190px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: min(520px, calc(100vw - var(--sidebar-width) - 48px));
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid #ced9f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 16px 38px rgba(27, 43, 76, .16), 0 2px 8px rgba(27, 43, 76, .08);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: width .22s ease, min-height .22s ease, padding .22s ease, border-radius .22s ease, box-shadow .22s ease;
}
.record-import-task-dock.is-collapsed {
  grid-template-columns: 34px;
  gap: 0;
  width: 56px;
  min-height: 56px;
  height: 56px;
  padding: 10px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(27, 43, 76, .14), 0 2px 7px rgba(27, 43, 76, .08);
}
.record-import-task-dock.is-collapsed .record-import-task-dock-copy,
.record-import-task-dock.is-collapsed button { display: none; }
.record-import-task-dock.is-ready { border-color: #bedecf; }
.record-import-task-dock.has-error { border-color: #ead7b9; }
.record-import-task-dock-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #edf2ff; color: var(--accent); }
.record-import-task-dock.is-ready .record-import-task-dock-icon { background: #e9f7f0; color: #287158; }
.record-import-task-dock.has-error .record-import-task-dock-icon { background: #fff5e3; color: #9a6417; }
.record-import-task-dock-icon > i { width: 17px; height: 17px; border: 2px solid #c4cfee; border-top-color: var(--accent); border-radius: 50%; animation: record-import-spin .72s linear infinite; }
.record-import-task-dock-copy { display: grid; min-width: 0; gap: 3px; }
.record-import-task-dock-copy strong { color: #253554; font-size: 13px; }
.record-import-task-dock-copy small { overflow: hidden; color: #72809a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.record-import-task-dock button { min-height: 34px; padding: 0 11px; border: 1px solid #d5ddec; border-radius: 8px; background: #fff; color: #52617a; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.record-import-task-dock button:hover { border-color: #aebddd; color: var(--accent); }
.record-import-task-dock .record-import-task-open { border-color: var(--accent); background: var(--accent); color: #fff; }
.record-import-task-dock .record-import-task-open:hover { background: var(--accent-dark); color: #fff; }
.record-import-task-dock .record-import-task-stop:hover { border-color: #dfb9b9; background: #fff7f7; color: #a44343; }
@media (prefers-reduced-motion: reduce) {
  .record-import-task-dock { transition: none; }
  .record-import-task-dock-icon > i { animation: none; }
}
@media (max-width: 600px) {
  .record-import-task-dock { right: 12px; bottom: 74px; left: 12px; grid-template-columns: 34px minmax(0, 1fr) auto; width: auto; }
  .record-import-task-dock.is-collapsed { right: 12px; left: auto; grid-template-columns: 34px; width: 56px; }
  .record-import-task-dock .record-import-task-stop { display: none; }
}
.experiment-ai-layer { position:fixed; inset:0; z-index:280; display:grid; place-items:center; padding:20px; background:#111a2ba8; }
.experiment-ai-dialog { contain:layout paint; width:min(1460px,100%); height:min(940px,calc(100dvh - 40px)); display:flex; flex-direction:column; min-height:0; overflow:hidden; color:#172945; background:#fff; border:1px solid #d7dfeb; border-radius:12px; box-shadow:0 22px 64px #0d19383d; }
.ai-dialog-header { display:flex; align-items:center; justify-content:space-between; min-height:62px; padding:0 30px; border-bottom:1px solid #e1e6ee; }
.experiment-ai-dialog h2 { display:flex; align-items:center; gap:9px; margin:0; font-size:22px; letter-spacing:-.02em; }
.experiment-ai-dialog p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
.ai-dialog-trust { display:flex; align-items:center; gap:8px; color:#65748a; font-size:13px; }
.ai-dialog-trust > svg { color:#14765c; }
.ai-dialog-trust.is-running { color:#31588f; font-weight:600; }
.ai-dialog-trust.is-running > svg { color:#2558d9; animation:ai-working-spark 1.8s ease-in-out infinite; }
.experiment-ai-dialog button { min-height:38px; padding:8px 14px; color:inherit; background:#fff; border:1px solid #d1d9e6; border-radius:8px; font:inherit; cursor:pointer; transition:border-color .18s ease,background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease; }
.experiment-ai-dialog button:hover:not(:disabled) { border-color:#9eb0cb; background:#f8fafc; }
.experiment-ai-dialog button:active:not(:disabled) { transform:translateY(1px); }
.experiment-ai-dialog button:focus-visible,.experiment-ai-dialog textarea:focus-visible,.experiment-ai-dialog a:focus-visible,.experiment-ai-dialog summary:focus-visible { outline:3px solid #2e63e52c; outline-offset:2px; }
.experiment-ai-dialog button:disabled { cursor:default; opacity:.5; }
.experiment-ai-dialog .primary-button { color:#fff; background:#2558d9; border-color:#2558d9; box-shadow:0 5px 14px #2558d929; }
.experiment-ai-dialog .primary-button:hover:not(:disabled) { color:#fff; background:#194ac5; border-color:#194ac5; }
.ai-dialog-close { display:grid; place-items:center; width:40px; min-height:40px!important; margin-left:12px; padding:0!important; border-color:#d8e0eb!important; }
.ai-stage-nav { display:flex; gap:30px; min-height:50px; padding:0 30px; border-bottom:1px solid #e1e6ee; }
.ai-stage-nav .ai-stage-tab { position:relative; min-height:50px; padding:0 2px; color:#607087; background:transparent; border:0; border-radius:0; font-weight:650; }
.ai-stage-nav .ai-stage-tab:hover:not(:disabled) { color:#244fc2; background:transparent; border-color:transparent; }
.ai-stage-nav .ai-stage-tab[aria-pressed="true"] { color:#214fc8; }
.ai-stage-nav .ai-stage-tab[aria-pressed="true"]::after { content:""; position:absolute; right:0; bottom:-1px; left:0; height:3px; background:#2558d9; border-radius:3px 3px 0 0; }
.ai-stage-nav .ai-stage-tab > i { display:inline-block; width:7px; height:7px; margin-left:7px; background:#2d63df; border-radius:50%; box-shadow:0 0 0 4px #2d63df1c; animation:ai-chat-pulse 1.4s ease-in-out infinite; }
.ai-dialog-scroll { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:25px 30px 34px; background:#f7f9fc; }
.ai-products-panel { max-width:1400px; margin:0 auto; }
.ai-review-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:28px; margin-bottom:12px; }
.ai-review-toolbar h3 { margin:0; font-size:23px; letter-spacing:-.02em; }
.ai-review-toolbar p { margin:5px 0 0; color:#67768b; font-size:13px; }
.ai-review-progress { display:grid; grid-template-columns:repeat(3,auto); align-items:center; justify-content:end; gap:5px 15px; min-width:370px; color:#53637a; font-size:13px; }
.ai-review-progress span:not(:last-of-type) { padding-right:15px; border-right:1px solid #dbe1ea; }
.ai-review-progress b { color:#174ecf; font-size:16px; }
.ai-review-progress progress { grid-column:1/3; width:100%; height:6px; overflow:hidden; border:0; border-radius:99px; background:#e4e9f1; accent-color:#2558d9; }
.ai-review-progress progress::-webkit-progress-bar { background:#e4e9f1; border-radius:99px; }
.ai-review-progress progress::-webkit-progress-value { background:#2558d9; border-radius:99px; transition:width .28s ease; }
.ai-review-progress strong { justify-self:end; color:#5d6d83; font-size:12px; font-weight:600; }
.ai-review-caption { min-height:20px; margin:0 0 12px; color:#6b798c; font-size:12px; }
.ai-confirmed-section { margin:0 0 14px; padding:15px; background:#f2f8f6; border:1px solid #cfe4dc; border-radius:10px; }
.ai-confirmed-section > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:11px; }
.ai-confirmed-section > header h4 { margin:0; color:#20364a; font-size:15px; }
.ai-confirmed-section > header p { margin:2px 0 0; color:#667d78; font-size:12px; }
.ai-confirmed-section > header > span { display:inline-flex; align-items:center; flex:0 0 auto; gap:5px; padding:4px 8px; color:#147158; background:#dff2eb; border-radius:99px; font-size:11px; font-weight:700; }
.ai-confirmed-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(225px,1fr)); gap:9px; }
.ai-confirmed-card { min-width:0; overflow:hidden; background:#fff; border:1px solid #d5e5e0; border-radius:9px; transition:border-color .18s ease,box-shadow .18s ease; }
.ai-confirmed-card.is-open { grid-column:1/-1; border-color:#adcfc3; box-shadow:0 7px 18px #315f4e10; }
.experiment-ai-dialog .ai-confirmed-card > button { display:grid; grid-template-columns:32px minmax(0,1fr) 16px; align-items:center; gap:10px; width:100%; min-height:84px; padding:11px; text-align:left; background:#fff; border:0; border-radius:0; }
.experiment-ai-dialog .ai-confirmed-card > button:hover { background:#f8fbfa; border-color:transparent; }
.ai-confirmed-card > button > span { display:grid; min-width:0; gap:2px; }
.ai-confirmed-card > button strong,.ai-confirmed-card > button small,.ai-confirmed-card > button em { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ai-confirmed-card > button strong { color:#16344a; font-size:14px; }
.ai-confirmed-card > button small { color:#63768a; font-size:11px; }
.ai-confirmed-card > button em { color:#238166; font-size:10px; font-style:normal; }
.ai-confirmed-card > button em.is-updated { color:#9a650c; }
.ai-confirmed-card > button > svg { color:#829289; transition:transform .2s ease; }
.ai-confirmed-card.is-open > button > svg { transform:rotate(90deg); }
.ai-confirmed-card-icon { display:grid; place-items:center; width:32px; height:32px; color:#2456d5; background:#e9effd; border-radius:8px; }
.ai-confirmed-card.external .ai-confirmed-card-icon { color:#168064; background:#e4f5ef; }
.ai-confirmed-card .ai-review-detail { margin:0 16px 16px; padding-top:16px; }
.ai-history-gaps { margin:0 0 14px; padding:13px 15px; background:#fff; border:1px solid #dce3ed; border-radius:10px; }
.ai-history-gaps > header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px; color:#40536d; font-size:12px; }
.ai-history-gaps > header > span { color:#748196; }
.ai-history-gaps > div { display:flex; flex-wrap:wrap; gap:8px; }
.ai-history-gaps article { display:grid; gap:2px; min-width:190px; padding:8px 10px; background:#f5f7fa; border:1px solid #e1e6ed; border-radius:7px; }
.ai-history-gaps article span { color:#2c405c; font-size:13px; font-weight:700; }
.ai-history-gaps article small { color:#7a8798; font-size:10px; }
.ai-review-table { overflow:hidden; background:#fff; border:1px solid #dce3ed; border-radius:10px; box-shadow:0 6px 18px #263d6710; }
.ai-review-table-head,.ai-review-row-summary { display:grid; grid-template-columns:minmax(270px,1.4fr) minmax(140px,.62fr) minmax(190px,.82fr) 112px; align-items:center; gap:18px; }
.ai-review-table-head { min-height:44px; padding:0 22px; color:#65748a; background:#f3f6fa; border-bottom:1px solid #dce3ed; font-size:12px; font-weight:700; }
.ai-review-row { background:#fff; border-bottom:1px solid #e3e8ef; transition:background-color .2s ease; }
.ai-review-row:last-child { border-bottom:0; }
.ai-review-row.is-open { background:#f7f9fe; }
.experiment-ai-dialog .ai-review-row-summary { width:100%; min-height:66px; padding:9px 22px; text-align:left; background:transparent; border:0; border-radius:0; }
.experiment-ai-dialog .ai-review-row-summary:hover { background:#f7f9fc; border-color:transparent; }
.ai-review-row.is-open .ai-review-row-summary { background:#f0f4fc; }
.ai-review-row-summary > span { min-width:0; color:#5c6b80; font-size:13px; }
.ai-review-row-summary > span:nth-child(2) { display:inline-flex; align-items:center; width:max-content; padding:5px 9px; border-radius:99px; color:#9a650c; background:#fff3d5; font-weight:700; }
.ai-review-row.unmatched .ai-review-row-summary > span:nth-child(2) { color:#9a650c; background:#fff3d5; }
.ai-status-dot { width:7px; height:7px; margin-right:7px; background:#e5a11c; border-radius:50%; }
.ai-review-row.unmatched .ai-status-dot { background:#e5a11c; }
.ai-review-identity { display:flex; align-items:center; gap:10px; }
.ai-review-identity > svg { flex:0 0 auto; color:#738299; transition:transform .22s ease,color .18s ease; }
.ai-review-row.is-open .ai-review-identity > svg { color:#2558d9; transform:rotate(90deg); }
.ai-review-identity > span { display:grid; gap:2px; min-width:0; }
.ai-review-identity strong { overflow:hidden; color:#1b2e4b; font-size:15px; text-overflow:ellipsis; white-space:nowrap; }
.ai-review-identity small { overflow:hidden; color:#78879a; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.ai-review-row-action { color:#2456d5!important; font-weight:650; }
.ai-review-detail-shell { display:grid; grid-template-rows:0fr; visibility:hidden; opacity:0; transition:grid-template-rows .26s ease,opacity .2s ease,visibility 0s linear .26s; }
.ai-review-detail-shell.is-open { grid-template-rows:1fr; visibility:visible; opacity:1; transition:grid-template-rows .3s cubic-bezier(.2,.7,.25,1),opacity .22s ease .04s; }
.ai-review-detail-shell > div { min-height:0; overflow:hidden; }
.ai-review-detail { margin:0 22px 20px 52px; padding:20px 0 2px; border-top:1px solid #dce3ee; }
.ai-review-detail-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.ai-review-detail-actions { display:flex; align-items:center; flex:0 0 auto; gap:8px; }
.experiment-ai-dialog .ai-review-detail-actions .primary-button { min-height:34px; padding:6px 11px; font-size:12px; }
.ai-review-detail h4 { margin:0 0 4px; font-size:18px; }
.ai-review-detail p { margin:0; color:#66758a; }
.ai-review-detail summary { padding:10px 0; color:#324866; font-size:13px; font-weight:650; cursor:pointer; }
.ai-review-detail pre { max-height:330px; overflow:auto; padding:14px; color:#dce8ff; background:#14213a; border-radius:8px; font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.ai-product-source { display:inline-flex; margin-bottom:7px; padding:3px 8px; border-radius:99px; font-size:11px; font-weight:700; }
.ai-product-source.company { color:#244fc2; background:#e8eefc; }
.ai-product-source.external { color:#147158; background:#e7f7f1; }
.experiment-ai-dialog .ai-danger-link { color:#bf3b34; background:transparent; border-color:transparent; box-shadow:none; }
.experiment-ai-dialog .ai-danger-link:hover:not(:disabled) { color:#a52822; background:#fff1ef; border-color:#f2cbc7; }
.ai-unmatched-detail { display:grid; grid-template-columns:minmax(190px,.34fr) minmax(0,1fr); gap:28px; }
.ai-unmatched-copy { padding-right:24px; border-right:1px solid #dce3ee; }
.ai-unmatched-copy h4 { color:#243650; }
.ai-unmatched-copy p { margin-top:6px; font-size:13px; }
.ai-unmatched-editor { min-width:0; }
.ai-product-suggestions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.ai-product-suggestions span { width:100%; color:#5b6b82; font-size:12px; font-weight:650; }
.ai-product-suggestions button { min-height:34px; padding:6px 10px; color:#214fc8; border-color:#bdc9de; font-size:12px; }
.ai-product-supplement { display:grid; gap:8px; }
.ai-product-supplement label { color:#263a59; font-size:13px; font-weight:700; }
.ai-product-supplement textarea { box-sizing:border-box; width:100%; min-height:98px; resize:vertical; padding:11px 12px; color:inherit; background:#fff; border:1px solid #bfcadd; border-radius:8px; font:inherit; font-size:13px; line-height:1.6; transition:border-color .18s ease,box-shadow .18s ease; }
.ai-product-supplement textarea:focus { border-color:#4270df; box-shadow:0 0 0 3px #2e63e517; outline:0; }
.ai-product-supplement > div { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.ai-product-supplement a { color:#2558d9; font-size:12px; text-decoration:none; }
.ai-product-supplement a:hover { text-decoration:underline; }
.ai-product-supplement .ai-danger-link { margin-left:auto; }
.ai-external-product-facts { display:grid; gap:8px; margin:14px 0 0; }
.ai-external-product-facts > div { display:grid; grid-template-columns:72px minmax(0,1fr); gap:12px; }
.ai-external-product-facts dt { color:#748095; }
.ai-external-product-facts dd { margin:0; white-space:pre-wrap; line-height:1.65; }
.ai-product-ignored { margin:16px 0 0; padding:0 14px; background:#fff; border:1px solid #dce3ed; border-radius:8px; }
.ai-product-ignored summary { padding:12px 0; color:#66758a; font-size:13px; cursor:pointer; }
.ai-product-ignored > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; border-top:1px solid #e6eaf0; }
.ai-product-ignored button { min-height:32px; padding:5px 9px; }
.ai-product-empty { margin:0; padding:22px; color:#65718a; background:#fff; border:1px solid #dce3ed; border-radius:10px; }
.ai-dialog-error,.ai-dialog-status { margin:10px 30px 0; padding:10px 14px; color:#805a12; background:#fff7e4; border:1px solid #f0d89c; border-radius:8px; font-size:13px; }
.ai-working-state { position:relative; display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:15px; min-height:96px; margin:18px 0 0; padding:18px 20px; overflow:hidden; color:#314765; background:linear-gradient(120deg,#fff 0%,#f4f7ff 58%,#eef4ff 100%); border:1px solid #cad8f1; border-radius:12px; box-shadow:0 10px 28px #27457b12; }
.ai-working-state::after { position:absolute; right:-70px; bottom:-90px; width:220px; height:160px; border-radius:50%; background:radial-gradient(circle,#7da2ef22 0%,transparent 68%); content:""; pointer-events:none; }
.ai-working-state > div { position:relative; z-index:1; min-width:0; }
.ai-working-state strong { display:block; color:#213d72; font-size:15px; }
.ai-working-state p { margin:4px 0 0; color:#687a94; font-size:12px; line-height:1.6; }
.ai-working-orbit { position:relative; z-index:1; display:grid; width:42px; height:42px; place-items:center; color:#285cd2; background:#fff; border:1px solid #cbd8f3; border-radius:50%; box-shadow:0 6px 16px #2149961a; }
.ai-working-orbit::before { position:absolute; inset:-5px; border:2px solid transparent; border-top-color:#2d63df; border-right-color:#7fa2ef; border-radius:50%; content:""; animation:ai-working-orbit 1.35s linear infinite; }
.ai-working-orbit > svg { animation:ai-working-spark 1.8s ease-in-out infinite; }
.ai-working-trace { position:relative; z-index:1; display:flex; align-items:flex-end; gap:4px; height:24px; padding:0 4px; }
.ai-working-trace i { width:4px; height:9px; background:#3768d7; border-radius:99px; animation:ai-working-trace .9s ease-in-out infinite alternate; }
.ai-working-trace i:nth-child(2) { height:16px; animation-delay:.12s; }
.ai-working-trace i:nth-child(3) { height:12px; animation-delay:.24s; }
.ai-working-trace i:nth-child(4) { height:20px; animation-delay:.36s; }
.ai-working-state.is-compact { grid-template-columns:40px minmax(0,1fr) auto; width:100%; min-height:0; margin:0; padding:0; background:transparent; border:0; border-radius:0; box-shadow:none; }
.ai-working-state.is-compact::after { display:none; }
.ai-working-state.is-compact .ai-working-orbit { justify-self:center; width:32px; height:32px; }
.ai-working-state.is-compact .ai-working-orbit::before { inset:-3px; }
.ai-working-state.is-compact strong { font-size:13px; }
.ai-working-state.is-compact p { font-size:12px; }
.ai-working-state.is-compact .ai-working-trace { height:20px; }
.ai-review-detail .ai-dialog-error { margin:10px 0; }
.ai-review-retry { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.ai-review-retry .ai-dialog-error { flex:1; margin:0; }
.ai-product-preflight { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:10px 30px 0; padding:10px 14px; color:#6f592d; background:#fff9eb; border:1px solid #ead39b; border-radius:8px; }
.ai-product-preflight p { margin:2px 0 0; font-size:12px; line-height:1.5; }
.ai-product-preflight button { flex-shrink:0; }
.ai-product-footer { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:72px; padding:0 30px; background:#fff; border-top:1px solid #dce3ed; box-shadow:0 -8px 24px #182c520a; }
.ai-product-footer p { margin:0; color:#65748a; font-size:13px; }
.ai-product-footer b { color:#174ecf; font-size:15px; }
.ai-product-footer button { min-width:168px; }
.ai-dialog-intro { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:20px; padding:18px 20px; background:#fff; border:1px solid #dce3ed; border-radius:10px; }
.ai-dialog-intro h3 { margin:0; font-size:20px; }
.ai-dialog-intro p { margin:5px 0 0; color:#65748a; }
.ai-dialog-intro button { flex-shrink:0; }
.ai-analysis-history { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin:-6px 0 16px; color:#65748a; font-size:13px; }
.ai-analysis-history select { min-width:260px; max-width:100%; padding:8px 34px 8px 10px; border:1px solid #d4ddea; border-radius:8px; background:#fff; color:#24334a; }
.experiment-ai-dialog .experiment-ai-result { width:100%; max-height:none; overflow:visible; margin:0; }
.experiment-ai-dialog .experiment-ai-result p,.experiment-ai-dialog .experiment-ai-result li { font-size:15px; line-height:1.78; }
.experiment-ai-dialog .experiment-ai-result > header time { display:inline-flex; align-items:center; gap:5px; }
.ai-dialog-empty { color:#65718a; }
.ai-chat-panel { width:min(1060px,100%); min-height:100%; margin:0 auto; }
.ai-chat-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:28px; padding:3px 0 18px; border-bottom:1px solid #dfe5ee; }
.ai-chat-toolbar > div:first-child > span { display:flex; align-items:center; gap:6px; margin-bottom:5px; color:#2f5cbf; font-size:12px; font-weight:700; }
.ai-chat-toolbar h3 { margin:0; color:#182c48; font-size:24px; letter-spacing:-.02em; }
.ai-chat-toolbar p { max-width:680px; margin:6px 0 0; color:#68778b; font-size:13px; }
.ai-chat-toolbar-actions { display:flex; align-items:center; flex:0 0 auto; gap:8px; margin-top:5px; }
.experiment-ai-dialog .ai-chat-clear { display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:6px 9px; color:#66758a; background:transparent; border-color:transparent; font-size:12px; }
.experiment-ai-dialog .ai-chat-clear:hover:not(:disabled) { color:#a23b35; background:#fff2f0; border-color:#efd4d0; }
.ai-chat-state { display:inline-flex; align-items:center; flex:0 0 auto; gap:8px; margin-top:7px; padding:7px 10px; color:#66748a; background:#eef2f7; border-radius:7px; font-size:12px; font-weight:650; }
.ai-chat-toolbar-actions .ai-chat-state { margin-top:0; }
.ai-chat-state > i { width:7px; height:7px; background:#8190a5; border-radius:50%; }
.ai-chat-state.running { color:#2553b4; background:#eaf0ff; }
.ai-chat-state.running > i { background:#2c63e0; box-shadow:0 0 0 4px #2c63e01c; animation:ai-chat-pulse 1.4s ease-in-out infinite; }
.ai-chat-state.summary-running { color:#66748a; background:#eef2f7; }
.ai-chat-state.summary-running > i { background:#8190a5; box-shadow:none; animation:none; }
.ai-chat-state.failed { color:#a23b35; background:#fff0ee; }
.ai-chat-state.failed > i { background:#c54b43; }
.ai-chat-suggestions { display:grid; grid-template-columns:90px minmax(0,1fr); align-items:center; gap:12px; padding:17px 0; }
.ai-chat-suggestions > span { color:#68778b; font-size:12px; font-weight:700; }
.ai-chat-suggestions > div { display:flex; flex-wrap:wrap; gap:8px; }
.experiment-ai-dialog .ai-chat-suggestions button { min-height:34px; padding:6px 10px; color:#465b78; background:#fff; border-color:#d8e0ea; font-size:12px; }
.experiment-ai-dialog .ai-chat-suggestions button:hover:not(:disabled) { color:#2554c5; background:#f5f8ff; border-color:#b8c8e8; }
.ai-chat-conversation { display:flex; flex-direction:column; gap:26px; padding:18px 0 30px; }
.ai-chat-empty { display:grid; justify-items:center; max-width:470px; margin:70px auto; text-align:center; }
.ai-chat-empty > span { display:grid; place-items:center; width:44px; height:44px; margin-bottom:13px; color:#315fca; background:#e9effd; border-radius:12px; }
.ai-chat-empty h4 { margin:0; color:#253955; font-size:17px; }
.ai-chat-empty p { margin:6px 0 0; color:#738095; font-size:13px; }
.ai-chat-exchange { display:flex; flex-direction:column; gap:16px; }
.ai-message-row { display:flex; flex-direction:column; gap:6px; min-width:0; }
.ai-message-row.is-user { align-self:flex-end; width:fit-content; max-width:min(72%,720px); }
.ai-message-row.is-assistant { align-self:flex-start; width:min(82%,820px); }
.ai-message-meta { display:flex; align-items:center; gap:9px; color:#7a8799; font-size:11px; font-weight:600; }
.ai-message-meta span { display:inline-flex; align-items:center; gap:5px; color:#52647c; font-size:12px; font-weight:700; }
.ai-message-meta time { font-variant-numeric:tabular-nums; }
.ai-message-row.is-user .ai-message-meta { justify-content:flex-end; padding-right:4px; }
.ai-message-bubble { margin:0; padding:13px 16px; color:#243852; background:#fff; border:1px solid #dce3ed; border-radius:4px 13px 13px 13px; box-shadow:0 4px 13px #203a6609; font-size:14px; line-height:1.72; white-space:pre-wrap; overflow-wrap:anywhere; }
.ai-message-row.is-user .ai-message-bubble { align-self:flex-end; min-width:38px; color:#fff; background:#2b5dcc; border-color:#2b5dcc; border-radius:13px 4px 13px 13px; box-shadow:0 6px 16px #2b5dcc1d; }
.ai-message-bubble > p { margin:0; }
.ai-message-markdown { white-space:normal; }
.ai-message-markdown > :first-child { margin-top:0; }
.ai-message-markdown > :last-child { margin-bottom:0; }
.ai-message-markdown p { margin:0 0 10px; }
.ai-message-markdown h1,.ai-message-markdown h2,.ai-message-markdown h3,.ai-message-markdown h4 { margin:16px 0 8px; color:#1c3150; font-size:1em; line-height:1.5; }
.ai-message-markdown ul,.ai-message-markdown ol { margin:8px 0 12px; padding-left:24px; }
.ai-message-markdown li { margin:4px 0; }
.ai-message-markdown li > p { margin:0; }
.ai-message-markdown strong { color:#18355f; font-weight:700; }
.ai-message-markdown code { padding:2px 5px; background:#eef2f7; border-radius:4px; font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; }
.ai-message-markdown pre { max-width:100%; overflow:auto; padding:12px; background:#eef2f7; border-radius:8px; }
.ai-message-markdown pre code { padding:0; background:transparent; }
.ai-message-markdown blockquote { margin:10px 0; padding:2px 12px; color:#5e6e83; border-left:3px solid #b9c8df; }
.ai-message-markdown a { color:#245cc9; text-decoration:underline; text-underline-offset:2px; }
.ai-markdown-table { max-width:100%; overflow-x:auto; margin:12px 0; border:1px solid #dce3ed; border-radius:7px; }
.ai-markdown-table table { width:100%; border-collapse:collapse; white-space:nowrap; }
.ai-markdown-table th,.ai-markdown-table td { padding:7px 9px; border-right:1px solid #e3e8ef; border-bottom:1px solid #e3e8ef; text-align:left; }
.ai-markdown-table th { background:#f3f6fa; }
.ai-markdown-image-placeholder { color:#718097; font-style:italic; }
.ai-message-bubble footer { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:13px; padding-top:10px; color:#8490a1; border-top:1px solid #e5e9ef; font-size:11px; }
.ai-message-bubble footer span { display:inline-flex; align-items:center; gap:5px; }
.ai-message-thinking { display:block; padding:16px 20px; color:#596a82; background:#fbfcfe; }
.ai-message-thinking strong,.ai-message-error strong { display:block; margin-bottom:2px; color:#2c405d; font-size:13px; }
.ai-message-thinking p,.ai-message-error p { color:#718095; font-size:12px; }
.ai-message-cancelled { color:#6f7b8d; background:#f5f7fa; border-style:dashed; box-shadow:none; }
.ai-message-attachments { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.ai-message-attachments span { display:inline-flex; align-items:center; gap:5px; max-width:230px; padding:4px 8px; overflow:hidden; color:#607087; background:#eef2f7; border-radius:6px; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.ai-thinking-dots { display:flex; align-items:center; gap:4px; flex:0 0 auto; }
.ai-thinking-dots i { width:7px; height:7px; background:#3566d4; border-radius:50%; animation:ai-thinking-dot .9s ease-in-out infinite alternate; }
.ai-thinking-dots i:nth-child(2) { animation-delay:.14s; }
.ai-thinking-dots i:nth-child(3) { animation-delay:.28s; }
.ai-message-error { color:#93423b; background:#fff5f3; border-color:#efcfca; }
.ai-message-error strong { color:#913a34; }
.ai-chat-composer { display:grid; gap:7px; padding:12px 30px 14px; background:#fff; border-top:1px solid #dce3ed; box-shadow:0 -8px 22px #182c5208; }
.ai-chat-composer-main { display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:stretch; gap:9px; width:min(1060px,100%); margin:0 auto; }
.ai-chat-file-input { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; pointer-events:none; }
.experiment-ai-dialog .ai-chat-attach { display:grid; place-items:center; width:48px; min-height:48px; padding:0; color:#526984; background:#f7f9fc; border-color:#cbd5e2; }
.experiment-ai-dialog .ai-chat-attach:hover:not(:disabled) { color:#2558d9; background:#eef3ff; border-color:#aebfe3; }
.ai-chat-composer textarea { box-sizing:border-box; width:100%; min-height:48px; max-height:132px; padding:12px 14px; resize:none; color:#263a55; background:#fbfcfe; border:1px solid #bfcadd; border-radius:9px; font:inherit; line-height:1.45; transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease; }
.ai-chat-composer textarea:focus { background:#fff; border-color:#4b73d5; box-shadow:0 0 0 3px #2e63e514; outline:0; }
.ai-chat-composer-main > button:last-child { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-width:102px; min-height:48px; }
.experiment-ai-dialog .ai-chat-stop { min-width:126px!important; color:#a13d37; background:#fff7f6; border-color:#e5bdb9; box-shadow:none; }
.experiment-ai-dialog .ai-chat-stop:hover:not(:disabled) { color:#8d2f2a; background:#ffefed; border-color:#d99d98; }
.ai-chat-composer-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; width:min(1060px,100%); min-height:15px; margin:0 auto; }
.ai-chat-composer small { color:#8995a5; font-size:10px; }
.ai-chat-composer-meta > span { color:#a46022; font-size:10px; }
.ai-composer-attachments { display:flex; flex-wrap:wrap; gap:7px; width:min(1060px,100%); margin:0 auto; }
.ai-composer-attachments > span { display:flex; align-items:center; gap:6px; max-width:280px; padding:5px 6px 5px 9px; color:#465b75; background:#f0f4fa; border:1px solid #dbe3ee; border-radius:7px; font-size:11px; }
.ai-composer-attachments b { overflow:hidden; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.experiment-ai-dialog .ai-composer-attachments button { width:20px; min-height:20px; padding:0; color:#748196; background:transparent; border:0; border-radius:4px; line-height:1; }
@keyframes ai-thinking-dot { from { transform:translateY(2px); opacity:.42; } to { transform:translateY(-2px); opacity:1; } }
@keyframes ai-chat-pulse { 0%,100% { opacity:.52; } 50% { opacity:1; } }
@keyframes ai-working-orbit { to { transform:rotate(360deg); } }
@keyframes ai-working-spark { 0%,100% { transform:scale(.92); opacity:.68; } 50% { transform:scale(1.08); opacity:1; } }
@keyframes ai-working-trace { from { transform:scaleY(.5); opacity:.45; } to { transform:scaleY(1); opacity:1; } }
.ai-result-section-note { margin:-2px 0 10px!important; color:#7a8498!important; font-size:12px!important; }
.ai-result-findings { display:grid; gap:9px; }
.ai-result-finding { padding:11px 13px; background:#f8faff; border:1px solid #dce4f3; border-left:3px solid #6f8ed4; border-radius:7px; }
.ai-result-finding header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.ai-result-finding header strong { color:#2d416b; font-size:13px; line-height:1.65; }
.ai-result-finding header em { flex:0 0 auto; padding:2px 7px; color:#526da9; background:#e9effc; border-radius:99px; font-size:10px; font-style:normal; font-weight:700; }
.ai-result-finding p { margin:6px 0 0; color:#59667e; font-size:12px; line-height:1.7; }
.ai-result-finding p b { color:#344b78; }
.ai-result-finding.is-legacy p { margin:0; }
.ai-validated-recommendation { display:grid; gap:6px; padding:8px 0; }
.ai-validated-recommendation > strong { color:#2d3d69; font-size:14px; line-height:1.7; }
.ai-validated-recommendation > strong em { display:inline-block; margin-left:6px; padding:1px 6px; color:#6175aa; background:#edf1fb; border-radius:99px; font-size:11px; font-style:normal; font-weight:650; }
.ai-validated-recommendation > p { margin:0; color:#59627b; }
.ai-recommendation-evidence { display:grid; gap:3px; padding:9px 11px; background:#f5f7fc; border-left:3px solid #91a6dc; border-radius:4px; }
.ai-recommendation-evidence b { color:#40517e; font-size:12px; }
.ai-recommendation-evidence span { color:#68718a; font-size:12px; line-height:1.6; }
.ai-recommendation-review { display:grid; gap:3px; padding:9px 11px; color:#745b28; background:#fff9e9; border-left:3px solid #d8a94d; border-radius:4px; }
.ai-recommendation-review b { font-size:12px; }
.ai-recommendation-review span { font-size:12px; line-height:1.55; }
.ai-recommendation-guardrail { display:flex; align-items:center; gap:8px; margin-top:10px; padding:9px 11px; color:#4e6182; background:#f3f6fc; border:1px solid #d8e0ef; border-radius:7px; font-size:12px; }
.product-audit-panel { margin: 0 24px 18px; padding: 16px; border: 1px solid #dce1eb; border-radius: 12px; background: #fff; }
.product-audit-panel summary { cursor: pointer; padding: 12px 0; }
.product-audit-panel p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.product-audit-panel input { max-width: 100%; padding: 10px; border: 1px solid #c6d0e0; border-radius: 8px; }
.product-audit-items { max-height: 580px; overflow: auto; margin-top: 14px; }
.product-audit-items > details { border-top: 1px solid #dce1eb; padding: 8px 12px; }
.product-audit-field { padding: 12px; margin: 8px 0; background: #f5f7fb; border-radius: 8px; }
.product-audit-heading, .product-audit-toolbar, .product-audit-item-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.product-audit-heading h2 { margin:0; font-size:19px; }
.product-audit-heading p, .product-audit-help { color:#64748b; font-size:14px; }
.product-audit-panel button, .product-edit-dialog button, .product-edit-trigger { border:1px solid #cbd5e1; background:#fff; color:#334155; border-radius:8px; padding:10px 14px; font:inherit; cursor:pointer; }
.product-audit-panel button:disabled, .product-edit-dialog button:disabled, .product-edit-trigger:disabled { opacity:.55; cursor:default; }
.product-hero-actions { display:flex; flex-direction:column; align-items:flex-end; gap:12px; flex-shrink:0; }
.product-edit-trigger { color:#2443c7; border-color:#b9c7ed; white-space:nowrap; }
.product-audit-toolbar { justify-content:flex-start; margin-top:16px; }
.product-audit-filters { display:flex; flex-wrap:wrap; gap:6px; }
.product-audit-filters button[aria-pressed="true"] { color:#1744a6; border-color:#aac1ef; background:#edf3ff; font-weight:650; }
.product-audit-toolbar > span { color:#64748b; font-size:13px; }
.product-audit-item-actions span { font-size:12px; color:#64748b; overflow-wrap:anywhere; min-width:0; flex:1; }
.product-audit-item-actions button { color:#1744a6; flex-shrink:0; }
.product-audit-warning { padding:12px; border-left:3px solid #d5a647; background:#fff8e7; color:#805b16; }
.product-audit-scope { color:#64748b; font-size:13px; }
.product-edit-dialog { width:min(1120px,calc(100vw - 32px)); height:min(920px,calc(100dvh - 32px)); max-width:none; max-height:none; margin:auto; padding:0; border:1px solid #d4dce8; border-radius:16px; color:#24364c; background:white; box-shadow:0 24px 80px #13213c40; overflow:hidden; }
.product-edit-dialog::backdrop { background:#15233c70; }
.product-edit-dialog[open] { display:flex; flex-direction:column; }
.product-edit-dialog > header { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px 24px; border-bottom:1px solid #dce1eb; flex-shrink:0; }
.product-edit-dialog h2 { margin:0; font-size:22px; }
.product-edit-dialog > header p { margin:6px 0 0; color:#64748b; }
.product-edit-dialog form { display:flex; flex-direction:column; min-height:0; flex:1; }
.product-edit-body { overflow:auto; padding:20px 24px; flex:1; min-height:0; }
.product-edit-dialog fieldset { margin:0; padding:0; border:0; min-width:0; }
.product-edit-dialog label { display:grid; gap:8px; margin:18px 0; font-weight:600; }
.product-edit-dialog input, .product-edit-dialog textarea { box-sizing:border-box; width:100%; min-width:0; border:1px solid #c6d0e0; border-radius:8px; padding:10px 12px; font:inherit; color:inherit; background:#fff; font-weight:400; line-height:1.6; }
.product-edit-dialog textarea { resize:vertical; }
.product-edit-property { display:grid; grid-template-columns:160px minmax(0,1fr) auto; gap:10px; align-items:start; margin:10px 0; }
.product-edit-property.structured { grid-template-columns:150px minmax(200px,1fr) 120px 170px auto; }
.product-edit-sections { margin-top:28px; padding-top:8px; border-top:1px solid #dce1eb; }
.product-edit-sections > h3 { margin:18px 0 0; }
.product-edit-sections > p { color:#64748b; }
.product-edit-sections label { margin:14px 0; }
.product-edit-dialog .product-edit-text { margin-top:28px; }
.product-edit-context { padding:12px 16px; background:#f5f7fb; border-radius:10px; margin:12px 0; }
.product-edit-context pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:14px; line-height:1.7; }
.product-edit-notice { color:#64748b; }
.product-edit-dialog footer { padding:14px 24px; border-top:1px solid #dce1eb; background:#fff; flex-shrink:0; }
.product-edit-dialog footer p { margin:0 0 10px; }
.product-edit-dialog [role="alert"] { color:#b42318; }
.product-edit-dialog [role="status"] { color:#14745b; }
.product-edit-actions, .product-edit-discard { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
.product-edit-dialog button[type="submit"] { background:#2443c7; border-color:#2443c7; color:white; }
.product-upload-input { position:fixed; width:1px; height:1px; opacity:0; pointer-events:none; }
.collection-header-actions > button:disabled { opacity:.58; cursor:wait; }
.product-import-dialog { width:min(820px,calc(100vw - 32px)); max-height:min(860px,calc(100dvh - 32px)); margin:auto; padding:0; border:1px solid #d4dce8; border-radius:16px; color:#24364c; background:#fff; box-shadow:0 24px 80px #13213c40; overflow:hidden; }
.product-import-dialog::backdrop { background:#15233c70; }
.product-import-dialog[open] { display:flex; flex-direction:column; }
.product-import-dialog > header, .product-import-dialog > footer { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:18px 22px; flex-shrink:0; }
.product-import-dialog > header { border-bottom:1px solid #dce1eb; }
.product-import-dialog > footer { border-top:1px solid #dce1eb; }
.product-import-dialog header p { margin:0 0 5px; color:#14745b; font-size:12px; font-weight:700; }
.product-import-dialog h2 { margin:0; font-size:23px; }
.product-import-dialog button { border:1px solid #cbd5e1; background:#fff; color:#334155; border-radius:8px; padding:9px 14px; font:inherit; cursor:pointer; }
.product-import-dialog footer > div { display:flex; align-items:center; justify-content:flex-end; gap:9px; }
.product-import-dialog footer > div button:last-child { background:#2443c7; border-color:#2443c7; color:#fff; }
.product-import-dialog button:disabled { opacity:.55; cursor:default; }
.product-import-dialog footer span { color:#718096; font-size:12px; }
.product-import-result-body { min-height:0; overflow:auto; padding:22px; }
.product-import-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.product-import-metrics div { display:grid; gap:7px; padding:14px; border:1px solid #dce3ed; border-radius:10px; background:#f8fafc; }
.product-import-metrics span { color:#718096; font-size:12px; }
.product-import-metrics strong { font-size:15px; }
.product-import-confirmation { margin:18px 0; padding:13px 15px; border-radius:9px; background:#eef8f5; color:#17664f; line-height:1.65; }
.product-import-result-body section { margin-top:18px; }
.product-import-result-body h3 { margin:0 0 7px; font-size:14px; }
.product-import-result-body section p, .product-import-result-body li { color:#5e6d80; font-size:13px; line-height:1.65; }
.product-import-warnings { padding:13px 15px; border:1px solid #f2d6a5; border-radius:9px; background:#fffaf0; }
.product-import-warnings ul { margin:8px 0 0; padding-left:20px; }
.product-import-json { margin-top:20px; border-top:1px solid #e2e8f0; padding-top:15px; }
.product-import-json summary { color:#334155; font-weight:650; cursor:pointer; }
.product-import-json pre { max-height:360px; overflow:auto; margin:12px 0 0; padding:14px; border-radius:9px; background:#111827; color:#d7e1ee; font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; word-break:break-word; }
.product-upload-dropzone { box-sizing:border-box; width:100%; min-height:190px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; border:1.5px dashed #aebbd0!important; border-radius:13px!important; background:#f8fafc!important; color:#314158!important; transition:border-color .16s ease,background .16s ease,transform .16s ease; }
.product-upload-dropzone:hover, .product-upload-dropzone.dragging { border-color:#2443c7!important; background:#f0f4ff!important; transform:translateY(-1px); }
.product-upload-dropzone > span { display:grid; place-items:center; width:48px; height:48px; border-radius:50%; background:#e8eefc; color:#2443c7; }
.product-upload-dropzone strong { max-width:90%; font-size:16px; overflow-wrap:anywhere; }
.product-upload-dropzone small { max-width:560px; color:#6c788d; line-height:1.55; }
.product-upload-progress { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:20px 0 0; padding:0; list-style:none; }
.product-upload-progress li { display:flex; align-items:center; gap:8px; min-width:0; padding:10px; border-radius:9px; background:#f4f6f9; color:#748095; font-size:12px; }
.product-upload-progress li i { display:grid; place-items:center; width:23px; height:23px; flex:0 0 23px; border-radius:50%; background:#e2e7ef; font-style:normal; font-weight:700; }
.product-upload-progress li.active { color:#2443c7; background:#edf2ff; }
.product-upload-progress li.active i { background:#2443c7; color:#fff; box-shadow:0 0 0 4px #dfe7ff; }
.product-upload-progress li.done { color:#17664f; background:#edf8f4; }
.product-upload-progress li.done i { background:#1c8b68; color:#fff; }
.product-upload-busy { display:flex; align-items:center; gap:14px; margin-top:16px; padding:14px 16px; border:1px solid #cad8f5; border-radius:10px; background:#f4f7ff; }
.product-upload-busy > i { width:24px; height:24px; flex:0 0 24px; border:3px solid #c7d3f0; border-top-color:#2443c7; border-radius:50%; animation:product-upload-spin .8s linear infinite; }
.product-upload-busy strong { display:block; font-size:14px; overflow-wrap:anywhere; }
.product-upload-busy p { margin:4px 0 0; color:#64748b; font-size:12px; }
.product-upload-error { display:flex; align-items:flex-start; gap:8px; margin:15px 0 0; padding:12px 14px; border-radius:9px; background:#fff0ef; color:#a52b24; line-height:1.5; }
@keyframes product-upload-spin { to { transform:rotate(360deg); } }
@media(max-width:600px) {
 .product-audit-panel { margin:0 12px 16px; padding:14px; }
 .product-audit-toolbar { gap:10px; }
 .product-audit-toolbar input { width:100%; }
 .product-edit-dialog { width:calc(100vw - 12px); height:calc(100dvh - 12px); border-radius:12px; }
 .product-edit-dialog > header, .product-edit-body, .product-edit-dialog footer { padding:14px; }
 .product-edit-property { grid-template-columns:minmax(0,1fr) auto; }
 .product-edit-property textarea { grid-column:1/-1; grid-row:2; }
 .product-edit-property.structured { grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; }
 .product-edit-property.structured textarea { grid-column:1/-1; grid-row:2; }
 .product-edit-property.structured input:nth-of-type(2) { grid-column:1; }
 .product-edit-property.structured input:nth-of-type(3) { grid-column:2; }
 .product-edit-dialog h2 { font-size:19px; }
 .product-import-dialog { width:calc(100vw - 12px); max-height:calc(100dvh - 12px); border-radius:12px; }
 .product-import-dialog > header, .product-import-result-body, .product-import-dialog > footer { padding:14px; }
 .product-import-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .product-upload-progress { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .product-import-dialog > footer { align-items:flex-start; flex-direction:column; }
 .product-import-dialog footer > div { width:100%; }
}
@media(max-width:960px) {
 .ai-review-toolbar { align-items:flex-start; flex-direction:column; gap:14px; }
 .ai-review-progress { width:100%; min-width:0; justify-content:start; }
 .ai-review-progress strong { justify-self:start; }
 .ai-confirmed-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .ai-review-table-head,.ai-review-row-summary { grid-template-columns:minmax(230px,1fr) 130px 90px; }
 .ai-review-table-head > span:nth-child(3),.ai-review-row-summary > span:nth-child(3) { display:none; }
 .ai-unmatched-detail { grid-template-columns:1fr; gap:16px; }
 .ai-unmatched-copy { padding:0 0 14px; border-right:0; border-bottom:1px solid #dce3ee; }
}
@media(prefers-reduced-motion:reduce) {
 .product-upload-busy > i { animation-duration:1.6s; }
 .product-upload-dropzone,.experiment-ai-dialog button,.ai-review-row,.ai-review-identity > svg,.ai-review-detail-shell,.ai-review-progress progress::-webkit-progress-value { transition:none!important; }
 .ai-stage-tab > i,.ai-chat-state > i,.ai-thinking-dots i,.ai-analysis-empty.is-running::before,.ai-dialog-trust.is-running > svg,.ai-working-orbit::before,.ai-working-orbit > svg,.ai-working-trace i { animation:none!important; }
}
@media(max-width:600px) {
 .experiment-ai-layer { padding:6px; }
 .experiment-ai-dialog { height:calc(100dvh - 12px); border-radius:10px; }
 .ai-dialog-header { min-height:56px; padding:0 14px; }
 .experiment-ai-dialog h2 { font-size:19px; }
 .ai-dialog-trust > span { display:none; }
 .ai-stage-nav { gap:18px; min-height:46px; padding:0 14px; overflow-x:auto; }
 .ai-stage-nav .ai-stage-tab { min-height:46px; white-space:nowrap; }
 .ai-dialog-scroll { padding:18px 14px 24px; }
 .ai-review-toolbar h3 { font-size:20px; }
 .ai-review-progress { grid-template-columns:repeat(3,auto); gap:5px 9px; font-size:12px; }
 .ai-review-progress span:not(:last-of-type) { padding-right:9px; }
 .ai-confirmed-section { padding:12px; }
 .ai-confirmed-section > header { flex-direction:column; gap:7px; }
 .ai-confirmed-grid { grid-template-columns:1fr; }
 .ai-confirmed-card.is-open { grid-column:auto; }
 .ai-history-gaps > header { align-items:flex-start; flex-direction:column; gap:3px; }
 .ai-history-gaps article { width:100%; }
 .ai-review-table-head { display:none; }
 .experiment-ai-dialog .ai-review-row-summary { grid-template-columns:minmax(0,1fr) auto; gap:10px; min-height:64px; padding:9px 12px; }
 .ai-review-row-summary > span:nth-child(3),.ai-review-row-summary > span:nth-child(4) { display:none; }
 .ai-review-detail { margin:0 12px 16px; padding-top:16px; }
 .ai-review-detail-heading,.ai-dialog-intro,.ai-product-preflight,.ai-product-footer { align-items:flex-start; flex-direction:column; }
 .ai-review-detail-actions { width:100%; flex-wrap:wrap; }
 .ai-review-detail-heading .ai-danger-link { align-self:flex-start; }
 .ai-product-supplement .ai-danger-link { width:100%; margin-left:0; }
 .ai-product-footer { gap:10px; padding:12px 14px; }
 .ai-product-footer button { width:100%; }
 .ai-product-preflight { margin:8px 14px 0; }
 .ai-dialog-error,.ai-dialog-status { margin:8px 14px 0; }
 .ai-working-state { grid-template-columns:42px minmax(0,1fr); gap:12px; padding:15px; }
 .ai-working-state .ai-working-trace { display:none; }
 .ai-working-state.is-compact { grid-template-columns:34px minmax(0,1fr); padding:1px 0; }
 .ai-chat-toolbar { flex-direction:column; gap:10px; }
 .ai-chat-toolbar-actions { justify-content:space-between; width:100%; }
 .ai-chat-state { margin-top:0; }
 .ai-chat-suggestions { grid-template-columns:1fr; gap:8px; }
 .ai-chat-suggestions > div { flex-wrap:nowrap; overflow-x:auto; padding-bottom:3px; }
 .experiment-ai-dialog .ai-chat-suggestions button { flex:0 0 auto; white-space:nowrap; }
 .ai-message-row.is-user { width:fit-content; max-width:90%; }
 .ai-message-row.is-assistant { width:100%; }
 .ai-message-bubble footer { align-items:flex-start; flex-direction:column; gap:4px; }
 .ai-chat-composer { padding:10px 14px 11px; }
 .ai-chat-composer-main { grid-template-columns:44px minmax(0,1fr) auto; gap:7px; }
 .experiment-ai-dialog .ai-chat-attach { width:44px; min-height:46px; }
 .ai-chat-composer textarea { min-height:46px; padding:11px 12px; }
 .ai-chat-composer-main > button:last-child { min-width:70px; min-height:46px; padding-right:10px; padding-left:10px; }
 .ai-chat-composer-main > button:last-child svg { display:none; }
 .experiment-ai-dialog .ai-chat-stop { min-width:94px!important; }
 .ai-chat-composer-meta { align-items:flex-start; flex-direction:column; gap:2px; }
 .experiment-ai-dialog .experiment-ai-result > header time { align-items:flex-start; }
 .ai-external-product-facts > div { grid-template-columns:1fr; gap:2px; }
}
.ai-product-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:18px 0; }
.ai-product-controls > span { color:#64748b; margin-left:auto; font-size:13px; }
.ai-product-editor,.ai-product-picker { margin:18px 0; padding:20px; border:1px solid #cdd9ec; border-radius:12px; background:#fff; }
.ai-product-editor > header,.ai-product-picker > header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; }
.ai-product-editor h4,.ai-product-picker h4 { margin:0 0 6px; font-size:17px; }
.ai-product-editor p,.ai-product-picker p { color:#64748b; line-height:1.6; margin:0 0 10px; }
.ai-product-editor fieldset { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:0; padding:0; border:0; }
.ai-product-editor label { display:flex; flex-direction:column; gap:6px; font-size:13px; }
.ai-product-editor .wide { grid-column:1/-1; }
.ai-product-editor input,.ai-product-editor textarea,.ai-product-picker > input { width:100%; border:1px solid #cbd5e1; border-radius:7px; padding:10px; color:#1e293b; background:#fff; font:inherit; box-sizing:border-box; }
.ai-product-editor textarea { min-height:130px; resize:vertical; }
.ai-product-editor footer { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:16px; }
.ai-product-editor footer span { color:#64748b; font-size:12px; line-height:1.6; }
.ai-product-picker-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:340px; overflow:auto; margin-top:14px; gap:8px; }
.ai-product-picker-list label { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid #e2e8f0; border-radius:8px; cursor:pointer; }
.ai-product-picker-list input { width:18px; height:18px; flex-shrink:0; accent-color:#2458da; }
.ai-product-picker-list label > span { min-width:0; overflow-wrap:anywhere; }
.ai-product-picker-list small { display:block; color:#64748b; margin-top:4px; }
.ai-gap-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.ai-product-ignored h4 { margin:0 0 8px; }
.ai-product-ignored p { color:#64748b; font-size:13px; line-height:1.6; }
@media(max-width:600px) {
 .ai-product-controls > span { width:100%; margin:0; }
 .ai-product-editor,.ai-product-picker { padding:14px; }
 .ai-product-editor fieldset,.ai-product-picker-list { grid-template-columns:1fr; }
 .ai-product-editor footer,.ai-product-editor > header,.ai-product-picker > header { align-items:stretch; flex-direction:column; }
}
.image-caption-editor { padding: 10px 12px 12px; min-width: 0; }
.image-caption-editor label { display: grid; gap: 7px; }
.image-caption-editor label > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; }
.image-caption-editor label small { color: #778196; font-weight: 400; }
.image-caption-editor textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 80px; padding: 9px 10px; border: 1px solid #d8dfed; border-radius: 8px; resize: vertical; font: inherit; font-size: 13px; line-height: 1.5; color: #25344d; background: #fff; }
.image-caption-editor textarea:focus { outline: 2px solid #4057ee; outline-offset: 1px; }
.image-caption-editor footer { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; gap: 8px; }
.image-caption-editor button, .ai-image-notes > header button, .ai-image-skip { border: 1px solid #d8dfed; border-radius: 8px; background: #fff; color: #304ccf; padding: 7px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.image-caption-editor button:disabled { opacity: .5; cursor: default; }
.image-caption-editor p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.image-caption-error { color: #a33030; }
.ai-image-notes { margin-bottom: 18px; padding: 16px; border: 1px solid #dae1ee; border-radius: 12px; background: #f8faff; scroll-margin-top: 16px; }
.ai-image-notes > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-image-notes h3 { margin: 0; font-size: 16px; }
.ai-image-notes p { margin: 7px 0; font-size: 13px; color: #65738a; line-height: 1.6; }
.ai-image-notes > header button { flex-shrink: 0; }
.ai-image-notes-list { display: grid; gap: 12px; margin-top: 14px; }
.ai-image-notes-list[hidden] { display: none; }
.ai-image-notes-list > article { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 12px; border-top: 1px solid #e0e5ef; padding-top: 12px; }
.ai-image-notes-list > article > img { width: 110px; height: 90px; object-fit: contain; background: #fff; border: 1px solid #e0e5ef; border-radius: 8px; }
.ai-image-notes-list > article > div > strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.ai-image-notes-list > article > div > small { color: #778196; font-size: 12px; }
.ai-image-notes-list .image-caption-editor { padding: 10px 0 0; }
@media (max-width: 600px) {
  .ai-image-notes { padding: 12px; }
  .ai-image-notes-list > article { grid-template-columns: 64px minmax(0,1fr); gap: 9px; }
  .ai-image-notes-list > article > img { width: 64px; height: 64px; }
  .image-caption-editor textarea { font-size: 16px; }
}
.external-products-page { min-height:calc(100dvh - 66px); padding:26px 30px 48px; background:#f5f7fb; color:#2a3850; }
.external-products-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; max-width:1440px; margin:0 auto 22px; }
.external-products-hero p, .external-product-editor header p { margin:0 0 6px; color:#3158b7; font-size:11px; font-weight:750; letter-spacing:.13em; }
.external-products-hero h1 { margin:0 0 8px; font-size:30px; }
.external-products-hero span { color:#68758b; }
.external-products-hero button, .external-products-page button { display:inline-flex; align-items:center; justify-content:center; gap:7px; border:1px solid #cbd4e2; border-radius:9px; padding:10px 14px; background:#fff; color:#344258; font:inherit; cursor:pointer; }
.external-products-hero > button { color:#fff; border-color:#2443c7; background:#2443c7; }
.external-products-page button:disabled { opacity:.55; cursor:default; }
.external-products-workspace { display:grid; grid-template-columns:minmax(280px,360px) minmax(0,1fr); gap:18px; max-width:1440px; margin:auto; }
.external-products-list, .external-product-editor { border:1px solid #dbe1eb; border-radius:14px; background:#fff; box-shadow:0 10px 30px #2538580a; overflow:hidden; }
.external-products-list > form { display:flex; gap:8px; align-items:center; padding:16px; border-bottom:1px solid #e4e8ef; }
.external-products-list > form input { min-width:0; flex:1; border:0; outline:0; color:inherit; font:inherit; }
.external-products-list > form button { padding:7px 10px; }
.external-products-list > p { margin:0; padding:10px 16px; color:#788398; font-size:12px; background:#f8fafc; }
.external-products-list > div { max-height:calc(100dvh - 290px); overflow:auto; }
.external-products-list > div > button { display:grid; justify-items:start; gap:4px; width:100%; padding:15px 17px; border:0; border-bottom:1px solid #e7ebf1; border-radius:0; text-align:left; }
.external-products-list > div > button:hover, .external-products-list > div > button.active { background:#eef3ff; }
.external-products-list > div > button span { color:#60708a; font-size:11px; }
.external-products-list > div > button strong { color:#263955; font-size:16px; }
.external-products-list > div > button small { color:#7a879a; }
.external-products-list > section { display:grid; justify-items:center; gap:8px; padding:54px 24px; color:#738097; text-align:center; }
.external-products-list > section strong { color:#44536a; }
.external-products-list > section p { margin:0; line-height:1.6; }
.external-product-editor { min-height:560px; }
.external-product-editor > header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:20px 24px; border-bottom:1px solid #e0e5ed; }
.external-product-editor h2 { margin:0; font-size:22px; }
.external-product-editor .danger { color:#a13c33; border-color:#e0b8b3; }
.external-product-error { margin:18px 24px 0; padding:11px 14px; border-radius:8px; color:#a13c33; background:#fff0ef; }
.external-product-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; padding:22px 24px; }
.external-product-fields label { display:grid; gap:7px; color:#4b5a70; font-size:13px; font-weight:650; }
.external-product-fields label.wide { grid-column:1/-1; }
.external-product-fields input, .external-product-fields textarea { box-sizing:border-box; width:100%; border:1px solid #cbd4e2; border-radius:9px; padding:11px 12px; color:#263955; background:#fff; font:inherit; font-weight:400; }
.external-product-fields textarea { min-height:220px; resize:vertical; line-height:1.7; }
.external-product-editor > footer { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 24px; border-top:1px solid #e0e5ed; }
.external-product-editor > footer span { color:#6e7a8e; font-size:12px; }
.external-product-editor > footer button { flex-shrink:0; color:#fff; border-color:#2443c7; background:#2443c7; }
@media(max-width:900px) { .external-products-page { padding:18px 16px 40px; } .external-products-workspace { grid-template-columns:1fr; } .external-products-list > div { max-height:320px; } }
@media(max-width:600px) { .external-products-hero, .external-product-editor > header, .external-product-editor > footer { align-items:flex-start; flex-direction:column; } .external-product-fields { grid-template-columns:1fr; padding:18px; } .external-product-fields label.wide { grid-column:auto; } }
.weknora-main { overflow-x: hidden; }
.weknora-page { width: 100%; max-width: 1480px; min-width: 0; margin: 0 auto; padding: 30px clamp(22px, 3vw, 42px) 72px; color: var(--ink); }
.weknora-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.weknora-hero h1 { margin: 5px 0 8px; font-size: clamp(27px, 2.5vw, 34px); letter-spacing: -.04em; }
.weknora-hero p, .weknora-card header p { margin: 0; color: var(--muted); line-height: 1.6; }
.weknora-eyebrow { color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .12em; }
.weknora-live { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 13px; }
.weknora-live i { width: 8px; height: 8px; border-radius: 50%; background: #b7bec8; }
.weknora-live.online { color: var(--success); border-color: #c9e9bd; background: var(--success-pale); }
.weknora-live.online i { background: #52c41a; box-shadow: 0 0 0 4px rgba(82,196,26,.12); }
.weknora-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.weknora-metrics article { display: grid; gap: 5px; min-height: 112px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.weknora-metrics span, .weknora-metrics small { color: var(--muted); font-size: 12px; }
.weknora-metrics strong { font-size: 27px; font-weight: 720; }
.weknora-metrics article.danger strong { color: var(--danger); }
.weknora-notice { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; padding: 11px 14px; border-radius: 10px; font-size: 13px; }
.weknora-notice.error { color: var(--danger); background: var(--danger-pale); }
.weknora-notice.success { color: var(--success); background: var(--success-pale); }
.weknora-grid { display: grid; grid-template-columns: minmax(310px, .72fr) minmax(520px, 1.28fr); gap: 16px; align-items: stretch; }
.weknora-card { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.weknora-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.weknora-card h2 { margin: 0 0 5px; font-size: 18px; }
.weknora-card header p { font-size: 13px; }
.weknora-card button { transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease; }
.weknora-card button:not(:disabled):hover { border-color: #aab7d5; background: #f7f9ff; color: var(--accent-dark); }
.weknora-card button:not(:disabled):focus-visible, .weknora-list-search:focus-within, .weknora-date-range input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,84,235,.1); }
.weknora-card button.primary:not(:disabled):hover { border-color: var(--accent-dark); background: var(--accent-dark); color: #fff; }
.weknora-switch { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; cursor: pointer; }
.weknora-switch input { position: absolute; opacity: 0; pointer-events: none; }
.weknora-switch span { width: 34px; height: 20px; padding: 2px; border-radius: 20px; background: #c7ccd5; transition: .16s ease; }
.weknora-switch span::after { display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; content: ""; transition: .16s ease; }
.weknora-switch input:checked + span { background: var(--accent); }
.weknora-switch input:checked + span::after { transform: translateX(14px); }
.weknora-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 20px 21px 12px; }
.weknora-form-grid label { display: grid; gap: 6px; }
.weknora-form-grid label.wide { grid-column: 1 / -1; }
.weknora-form-grid label > span { color: var(--text); font-size: 12px; font-weight: 650; }
.weknora-form-grid input { width: 100%; min-width: 0; height: 40px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; outline: none; color: var(--ink); background: #fff; }
.weknora-form-grid input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,84,235,.1); }
.weknora-options { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; padding: 5px 21px 17px; color: var(--text); font-size: 13px; }
.weknora-options label { display: flex; align-items: center; gap: 7px; }
.weknora-options > span { color: var(--muted); font-size: 12px; }
.weknora-options a { color: var(--accent); text-decoration: none; }
.weknora-card > footer { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 21px; border-top: 1px solid var(--line); background: #fafbfc; }
.weknora-card button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--text); font-weight: 650; cursor: pointer; }
.weknora-card button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.weknora-card button:disabled { cursor: default; opacity: .52; }
.weknora-control-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 20px 20px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--line); overflow: hidden; }
.weknora-control-summary div { display: grid; gap: 4px; min-width: 0; padding: 17px 14px; background: #fafbfc; }
.weknora-control-summary strong { font-size: 19px; letter-spacing: -.02em; }
.weknora-control-summary span { color: var(--muted); font-size: 11px; }
.weknora-control-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 14px 20px 20px; }
.weknora-history > header { align-items: center; }
.weknora-history-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.weknora-list-search { display: flex; flex: 1 1 190px; align-items: center; gap: 7px; min-width: 160px; max-width: 270px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--muted); background: #fff; }
.weknora-list-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.weknora-date-range { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.weknora-date-range > span { font-weight: 650; white-space: nowrap; }
.weknora-date-range i { font-style: normal; }
.weknora-date-range input { width: 128px; height: 36px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 9px; outline: none; color: var(--text); background: #fff; font-size: 12px; }
.weknora-filter-result { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.weknora-card .weknora-filter-clear { min-height: 32px; padding: 0 10px; color: var(--muted); font-size: 11px; }
.weknora-history-list { display: grid; max-height: 430px; padding: 5px 12px 10px 20px; overflow-y: auto; scrollbar-gutter: stable; }
.weknora-history-list > div { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto minmax(242px, auto); align-items: center; gap: 10px; min-height: 64px; padding-right: 8px; border-bottom: 1px solid var(--line); }
.weknora-history-list .weknora-history-name { display: grid; min-width: 0; }
.weknora-history-list small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.weknora-history-list .weknora-history-date { margin-top: 2px; color: var(--faint); font-size: 10px; }
.weknora-history-list i { color: var(--faint); font-size: 11px; font-style: normal; }
.weknora-history-status { width: fit-content; padding: 3px 7px; border-radius: 99px; color: #805f09; background: #fff7d6; font-size: 11px; white-space: nowrap; }
.weknora-history-status.synced { color: var(--success); background: var(--success-pale); }
.weknora-history-status.prepared { color: var(--accent-dark); background: var(--accent-pale); }
.weknora-history-status.failed { color: var(--danger); background: var(--danger-pale); }
.weknora-row-actions { display: flex; gap: 6px; }
.weknora-history-list button { min-height: 29px; padding: 0 9px; font-size: 12px; }
.weknora-history-list .weknora-history-empty { display: block; min-height: 0; padding: 42px 12px; border: 0; color: var(--muted); text-align: center; }
.weknora-config { margin-top: 16px; }
.weknora-config > header { align-items: center; }
.weknora-config-actions { display: flex; align-items: center; justify-content: flex-end; gap: 13px; }
.weknora-key-state { padding: 4px 8px; border-radius: 99px; color: var(--muted); background: #f1f3f6; font-size: 11px; white-space: nowrap; }
.weknora-key-state.ready { color: var(--success); background: var(--success-pale); }
.weknora-config-summary { display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 1px; background: var(--line); }
.weknora-config-summary div { display: grid; gap: 6px; min-width: 0; padding: 17px 21px; background: #fff; }
.weknora-config-summary span { color: var(--muted); font-size: 11px; }
.weknora-config-summary strong { overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.weknora-jobs { margin-top: 16px; }
.weknora-job-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 11px 20px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.weknora-card .weknora-job-filters button { min-height: 30px; padding: 0 10px; color: var(--muted); font-size: 11px; }
.weknora-card .weknora-job-filters button.active { border-color: #b8c5fa; color: var(--accent-dark); background: var(--accent-pale); }
.weknora-job-filters button span { display: inline; margin-left: 5px; color: inherit; font-size: 10px; }
.weknora-job-filters > i { margin-left: auto; color: var(--muted); font-size: 11px; font-style: normal; }
.weknora-job-table { display: grid; overflow-x: auto; }
.weknora-job-table > div { position: relative; display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(150px, 1fr) 120px 145px 60px; align-items: center; gap: 14px; min-width: 780px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; }
.weknora-job-table > div:first-child { border-top: 0; }
.weknora-job-table .head { color: var(--muted); background: #fafbfc; font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.weknora-job-table span { display: grid; gap: 3px; min-width: 0; }
.weknora-job-table strong { overflow-wrap: anywhere; }
.weknora-job-table small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.weknora-job-table b { width: fit-content; padding: 3px 7px; border-radius: 99px; color: var(--accent-dark); background: var(--accent-pale); font-size: 11px; }
.weknora-job-table b.sync-completed { color: var(--success); background: var(--success-pale); }
.weknora-job-table b.sync-failed { color: var(--danger); background: var(--danger-pale); }
.weknora-job-table p { grid-column: 1 / -1; margin: -3px 0 2px; color: var(--danger); font-size: 12px; }
.weknora-job-table .empty { display: block; min-width: 0; padding: 34px; color: var(--muted); text-align: center; }
.weknora-job-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: #fafbfc; }
.weknora-job-pagination > span { color: var(--muted); font-size: 11px; }
.weknora-job-pagination > div { display: flex; gap: 7px; }
.weknora-card .weknora-job-pagination button { min-height: 31px; padding: 0 11px; font-size: 11px; }
.weknora-preview-layer { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 28px; background: rgba(17,24,39,.38); }
.weknora-preview-layer article { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(1120px, calc(100vw - 56px)); height: min(860px, calc(100dvh - 56px)); border-radius: 16px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.24); overflow: hidden; }
.weknora-preview-layer header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.weknora-preview-layer header span { color: var(--accent); font-size: 11px; font-weight: 750; }
.weknora-preview-layer h2 { margin: 3px 0 0; font-size: 18px; }
.weknora-preview-layer header small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.weknora-preview-actions { display: flex; align-items: center; gap: 7px; }
.weknora-preview-layer header button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); font-size: 11px; cursor: pointer; }
.weknora-preview-layer header button:last-child { min-width: 32px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 25px; }
.weknora-preview-layer pre { margin: 0; padding: 24px 28px 40px; overflow: auto; color: #29303d; background: #fafbfc; font: 13px/1.7 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: pre-wrap; }
.weknora-readable { overflow: auto; padding: 26px 42px 54px; color: #29303d; line-height: 1.72; }
.weknora-readable h1 { margin: 0 0 24px; font-size: 27px; }
.weknora-readable h2 { margin: 30px 0 13px; padding-bottom: 7px; border-bottom: 1px solid var(--line); font-size: 19px; }
.weknora-readable h3 { margin: 22px 0 10px; font-size: 16px; }
.weknora-readable p { margin: 7px 0; }
.weknora-readable .bullet { padding-left: 8px; }
.weknora-evidence { margin: 0 28px 28px; border: 1px solid var(--line); border-radius: 12px; }
.weknora-evidence > summary { padding: 14px 18px; color: var(--muted); cursor: pointer; }
.weknora-evidence[open] > summary { border-bottom: 1px solid var(--line); }
.weknora-readable blockquote { margin: 12px 0 22px; padding: 11px 14px; border-left: 3px solid var(--accent); color: var(--muted); background: #f7f9ff; }
.weknora-readable .table-line { display: block; overflow-x: auto; padding: 3px 8px; color: #3c4658; background: #f7f8fa; font: 12px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: pre; }
.weknora-preview-empty { display: grid; place-content: center; gap: 8px; color: var(--muted); text-align: center; }
.weknora-preview-empty strong { color: var(--ink); font-size: 18px; }
@media (max-width: 1180px) {
  .weknora-grid { grid-template-columns: 1fr; }
  .weknora-metrics { grid-template-columns: repeat(2, 1fr); }
  .weknora-control-summary { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .weknora-page { padding: 24px 18px 60px; }
  .weknora-hero { align-items: flex-start; flex-direction: column; }
  .weknora-metrics { grid-template-columns: 1fr; }
  .weknora-card > header, .weknora-history > header, .weknora-config > header { align-items: flex-start; flex-direction: column; }
  .weknora-history-filters { align-items: stretch; }
  .weknora-list-search { width: 100%; max-width: none; flex-basis: 100%; }
  .weknora-date-range { width: 100%; flex-wrap: wrap; }
  .weknora-date-range input { flex: 1; min-width: 120px; }
  .weknora-filter-result { margin-left: 0; }
  .weknora-config-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .weknora-config-summary, .weknora-form-grid { grid-template-columns: 1fr; }
  .weknora-form-grid label.wide { grid-column: auto; }
  .weknora-history-list > div { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 8px 10px 0; }
  .weknora-history-list i { grid-column: 1; }
  .weknora-row-actions { grid-column: 2; grid-row: 1 / span 2; }
  .weknora-preview-layer { padding: 12px; }
  .weknora-preview-layer article { width: calc(100vw - 24px); height: calc(100dvh - 24px); }
  .weknora-preview-layer header { align-items: flex-start; gap: 10px; }
  .weknora-preview-actions { flex-wrap: wrap; justify-content: flex-end; }
  .weknora-readable { padding: 22px 20px 42px; }
  .weknora-job-filters > i { width: 100%; margin-left: 0; }
}
.knowledge-chat-main { overflow: hidden; background: #f3f6f9; }
.knowledge-chat-main .topbar { position: relative; }
.knowledge-chat-page {
  position: relative;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  height: calc(var(--app-viewport-height) - var(--topbar-height));
  min-height: 540px;
  overflow: hidden;
  border-top: 1px solid #edf0f4;
  background: #fff;
}
.knowledge-chat-page.has-source { grid-template-columns: 250px minmax(0, 1fr) minmax(290px, 330px); }
.knowledge-history,
.knowledge-source { min-width: 0; background: #f8fafc; }
.knowledge-history { display: flex; flex-direction: column; padding: 22px 14px 16px; border-right: 1px solid #e7ebf0; }
.knowledge-history > header { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 8px 17px; }
.knowledge-history > header div { display: grid; gap: 3px; }
.knowledge-history > header span { color: #8a93a3; font-size: 11px; letter-spacing: .06em; }
.knowledge-history > header strong { color: #202633; font-size: 18px; letter-spacing: -.02em; }
.knowledge-mobile-close,
.knowledge-history-toggle { display: none; }
.knowledge-new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid #2f54eb;
  border-radius: 9px;
  background: #2f54eb;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(47, 84, 235, .17);
}
.knowledge-new-chat:hover { background: #2849cf; }
.knowledge-new-chat:active,
.knowledge-conversation-header button:active,
.knowledge-composer button:active { transform: translateY(1px); }
.knowledge-history-search { display: flex; align-items: center; gap: 8px; height: 36px; margin: 14px 0 8px; padding: 0 10px; border: 1px solid #e0e5ec; border-radius: 8px; background: #fff; color: #8a93a3; }
.knowledge-history-search:focus-within { border-color: #6680ec; box-shadow: 0 0 0 3px rgba(47, 84, 235, .08); }
.knowledge-history-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #262c37; font: inherit; font-size: 12px; }
.knowledge-session-list { flex: 1; min-height: 0; overflow: auto; padding: 0 2px 20px; scrollbar-width: thin; scrollbar-color: #ccd3de transparent; }
.knowledge-session-list section { margin-top: 16px; }
.knowledge-session-list h2 { margin: 0 8px 7px; color: #98a0ae; font-size: 11px; font-weight: 600; }
.knowledge-load-more { display: block; width: calc(100% - 12px); margin: 12px 6px 0; padding: 9px 12px; border: 1px solid #dce2ec; border-radius: 10px; background: #fff; color: #566074; font-size: 12px; font-weight: 650; cursor: pointer; transition: border-color 180ms ease, color 180ms ease, background 180ms ease; }
.knowledge-load-more:hover { border-color: #9eb1ec; color: #2e55d4; background: #f8faff; }
.knowledge-session-item { position: relative; display: flex; min-height: 57px; border-radius: 8px; }
.knowledge-session-item:hover { background: #eef2f7; }
.knowledge-session-item.active { background: #e9edff; }
.knowledge-session-select { display: grid; flex: 1; gap: 5px; min-width: 0; padding: 10px 50px 10px 10px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.knowledge-session-select strong,
.knowledge-session-select small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-session-select strong { color: #303746; font-size: 12px; font-weight: 650; }
.knowledge-session-select small { color: #8a93a3; font-size: 11px; }
.knowledge-session-item.active .knowledge-session-select strong { color: #1d39c4; }
.knowledge-session-actions { position: absolute; top: 10px; right: 7px; display: flex; opacity: 0; }
.knowledge-session-item:hover .knowledge-session-actions,
.knowledge-session-item:focus-within .knowledge-session-actions { opacity: 1; }
.knowledge-session-actions button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #7d8797; cursor: pointer; }
.knowledge-session-actions button:hover { background: #fff; color: #2f54eb; }
.knowledge-session-actions button:last-child:hover { color: #c9342d; }
.knowledge-history-empty { display: grid; justify-items: center; gap: 8px; margin-top: 54px; padding: 20px; color: #9aa3b2; text-align: center; }
.knowledge-history-empty strong { color: #536074; font-size: 13px; }
.knowledge-history-empty span { font-size: 11px; }
.knowledge-history > footer { display: flex; justify-content: space-between; padding: 13px 8px 0; border-top: 1px solid #e7ebf0; color: #7f8998; font-size: 11px; }
.knowledge-history > footer small { color: #237804; }

.knowledge-conversation { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; background: #fff; }
.knowledge-conversation-header { grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; padding: 0 25px; border-bottom: 1px solid #edf0f4; }
.knowledge-conversation-header > div:first-of-type { display: grid; flex: 1; gap: 4px; min-width: 0; }
.knowledge-conversation-header > div:first-of-type strong { overflow: hidden; color: #202633; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-conversation-header > div:first-of-type span { display: flex; align-items: center; gap: 6px; color: #8a93a3; font-size: 11px; }
.knowledge-conversation-header > div:first-of-type i { width: 7px; height: 7px; border-radius: 50%; background: #b7bec9; }
.knowledge-conversation-header > div:first-of-type i.online { background: #16a085; box-shadow: 0 0 0 3px rgba(22, 160, 133, .1); }
.knowledge-conversation-header > div:last-child { display: flex; gap: 8px; }
.knowledge-conversation-header button { height: 32px; padding: 0 11px; border: 1px solid #dde2e9; border-radius: 7px; background: #fff; color: #566174; font: inherit; font-size: 11px; cursor: pointer; }
.knowledge-conversation-header button:hover { border-color: #b9c5f8; color: #2f54eb; background: #f7f8ff; }
.knowledge-banner { grid-row: 2; display: flex; align-items: center; gap: 8px; margin: 10px 20px 0; padding: 9px 11px; border: 1px solid #c7eadf; border-radius: 8px; background: #f2fbf8; color: #25725f; font-size: 12px; }
.knowledge-banner.error { border-color: #f3cac7; background: #fff5f4; color: #b02c26; }
.knowledge-banner span { flex: 1; }
.knowledge-banner button { display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.knowledge-messages { position: relative; grid-row: 3; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.knowledge-load-older { align-self: center; margin: 2px auto 8px; padding: 7px 13px; border: 1px solid #dce2ec; border-radius: 999px; background: #fff; color: #687287; font-size: 12px; font-weight: 650; cursor: pointer; transition: border-color 180ms ease, color 180ms ease; }
.knowledge-load-older:hover { border-color: #9eb1ec; color: #2e55d4; }
.knowledge-load-older:disabled { cursor: wait; opacity: .6; }
.knowledge-message-stack { width: min(820px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 40px; }
.knowledge-question { display: grid; justify-items: end; gap: 5px; margin: 0 0 22px auto; }
.knowledge-question > div { max-width: min(78%, 640px); padding: 8px 12px; border-radius: 11px 11px 3px 11px; background: #2f54eb; color: #fff; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; box-shadow: 0 4px 13px rgba(47, 84, 235, .13); }
.knowledge-question time { color: #9aa3b2; font-size: 10px; }
.knowledge-answer { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; margin: 0 0 35px; }
.knowledge-answer-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #d9e8e6; border-radius: 8px; background: #eef9f7; color: #0b8f84; }
.knowledge-answer-body { min-width: 0; color: #303744; font-size: 14px; line-height: 1.75; }
.knowledge-answer-body > :first-child { margin-top: 2px; }
.knowledge-answer-body > :last-child { margin-bottom: 0; }
.knowledge-answer-body h1,
.knowledge-answer-body h2,
.knowledge-answer-body h3 { margin: 22px 0 8px; color: #1d2430; line-height: 1.35; letter-spacing: -.015em; }
.knowledge-answer-body h1 { font-size: 20px; }
.knowledge-answer-body h2 { font-size: 17px; }
.knowledge-answer-body h3 { font-size: 15px; }
.knowledge-answer-body p { margin: 8px 0; }
.knowledge-answer-body ul,
.knowledge-answer-body ol { margin: 8px 0; padding-left: 23px; }
.knowledge-answer-body li { margin: 4px 0; }
.knowledge-answer-body blockquote { margin: 12px 0; padding: 8px 12px; border-left: 3px solid #9aaef8; background: #f7f8ff; color: #5d6880; }
.knowledge-answer-body code { padding: 2px 5px; border-radius: 4px; background: #f0f2f5; font-family: "Cascadia Code", Consolas, monospace; font-size: .9em; }
.knowledge-answer-body pre { overflow: auto; margin: 14px 0; padding: 14px; border-radius: 9px; background: #161c28; color: #edf2fa; }
.knowledge-answer-body pre code { padding: 0; background: none; color: inherit; }
.knowledge-answer-body a { color: #2f54eb; text-decoration: underline; text-underline-offset: 3px; }
.knowledge-markdown-table { max-width: 100%; overflow-x: auto; margin: 14px 0; border: 1px solid #e4e8ee; border-radius: 8px; }
.knowledge-markdown-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.knowledge-markdown-table th,
.knowledge-markdown-table td { padding: 9px 11px; border-right: 1px solid #e8ebf0; border-bottom: 1px solid #e8ebf0; text-align: left; white-space: nowrap; }
.knowledge-markdown-table th { background: #f6f8fa; color: #4c5668; }
.knowledge-citations { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 18px; padding-top: 13px; border-top: 1px solid #edf0f4; }
.knowledge-citations > span { margin-right: 2px; color: #7e8897; font-size: 11px; }
.knowledge-citations button { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; min-height: 28px; padding: 4px 9px 4px 5px; border: 1px solid #dfe4eb; border-radius: 7px; background: #fff; color: #566174; font: inherit; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.knowledge-citations button:hover { border-color: #aebcf2; color: #1d39c4; background: #f8f9ff; }
.knowledge-citations b { display: grid; place-items: center; flex: 0 0 19px; height: 19px; border-radius: 5px; background: #edf0ff; color: #2f54eb; font-size: 10px; }
.knowledge-answer-tools { display: flex; align-items: center; gap: 12px; margin-top: 11px; color: #9aa3b2; }
.knowledge-answer-tools button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: #7c8797; font: inherit; font-size: 10px; cursor: pointer; }
.knowledge-answer-tools button:hover { color: #2f54eb; }
.knowledge-answer-tools time { font-size: 10px; }
.knowledge-thinking { display: flex; align-items: center; gap: 4px; min-height: 30px; color: #697486; }
.knowledge-thinking span { margin-right: 5px; }
.knowledge-thinking i,
.knowledge-answer.is-thinking i { width: 5px; height: 5px; border-radius: 50%; background: #7588da; animation: knowledge-pulse 1.1s infinite ease-in-out; }
.knowledge-thinking i:nth-of-type(2), .knowledge-answer.is-thinking i:nth-of-type(2) { animation-delay: .14s; }
.knowledge-thinking i:nth-of-type(3), .knowledge-answer.is-thinking i:nth-of-type(3) { animation-delay: .28s; }
@keyframes knowledge-pulse { 0%, 70%, 100% { opacity: .26; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }
.knowledge-answer.is-thinking > div { display: flex; align-items: center; gap: 5px; color: #6d7788; }
.knowledge-answer.is-thinking p { margin: 0 7px 0 0; }
.knowledge-answer-error { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #fff3f2; color: #b23831; font-size: 12px; }
.knowledge-answer-error span { flex: 1; }
.knowledge-answer-error button { border: 0; background: transparent; color: #a1211b; font: inherit; font-weight: 680; cursor: pointer; }
.knowledge-answer-note { color: #8a93a3; font-size: 11px; }
.knowledge-welcome { display: grid; justify-items: center; width: min(760px, calc(100% - 48px)); margin: min(13vh, 100px) auto 30px; text-align: center; }
.knowledge-welcome-mark { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 19px; border: 1px solid #d4e8e5; border-radius: 14px; background: #eef9f7; color: #0b8f84; box-shadow: 0 9px 24px rgba(11, 143, 132, .08); }
.knowledge-welcome h1 { margin: 0; color: #202633; font-size: 27px; letter-spacing: -.035em; }
.knowledge-welcome > p { max-width: 560px; margin: 12px 0 28px; color: #758092; font-size: 13px; line-height: 1.75; }
.knowledge-welcome > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.knowledge-welcome > div > button { display: grid; grid-template-columns: 24px minmax(0, 1fr) 14px; align-items: start; gap: 9px; min-height: 108px; padding: 15px; border: 1px solid #e1e6ec; border-radius: 11px; background: #fff; color: #586476; text-align: left; cursor: pointer; box-shadow: 0 4px 16px rgba(30, 45, 68, .035); }
.knowledge-welcome > div > button:hover:not(:disabled) { border-color: #bdc8f5; background: #fafbff; transform: translateY(-2px); box-shadow: 0 9px 25px rgba(47, 84, 235, .07); }
.knowledge-welcome > div > button:disabled { cursor: not-allowed; opacity: .52; }
.knowledge-welcome > div > button > span { display: grid; gap: 6px; min-width: 0; }
.knowledge-welcome strong { color: #2c3442; font-size: 12px; }
.knowledge-welcome small { display: -webkit-box; overflow: hidden; color: #8992a1; font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.knowledge-chat-skeleton { display: grid; gap: 24px; width: min(780px, calc(100% - 48px)); margin: 55px auto; }
.knowledge-chat-skeleton i { display: block; width: 72%; height: 58px; border-radius: 10px; background: linear-gradient(100deg, #f1f3f6 25%, #f8f9fb 45%, #f1f3f6 65%); background-size: 200% 100%; animation: knowledge-shimmer 1.25s infinite; }
.knowledge-chat-skeleton i:nth-child(even) { width: 48%; margin-left: auto; }
@keyframes knowledge-shimmer { to { background-position: -200% 0; } }
.knowledge-new-content { position: sticky; left: 50%; bottom: 14px; display: flex; align-items: center; gap: 5px; margin: 0 auto; padding: 7px 12px; border: 1px solid #cdd5f6; border-radius: 8px; background: #fff; color: #2f54eb; font: inherit; font-size: 11px; cursor: pointer; box-shadow: 0 7px 20px rgba(20, 32, 58, .12); transform: translateX(-50%); }
.knowledge-new-content svg { transform: rotate(90deg); }
.knowledge-composer { grid-row: 4; padding: 8px 24px 10px; border-top: 1px solid #edf0f4; background: rgba(255, 255, 255, .96); }
.knowledge-composer-box { display: flex; align-items: flex-end; gap: 9px; width: min(830px, 100%); margin: 0 auto; padding: 6px 7px 6px 12px; border: 1px solid #dce1e8; border-radius: 11px; background: #fff; box-shadow: 0 5px 18px rgba(24, 37, 60, .055); }
.knowledge-composer-box:focus-within { border-color: #8497e9; box-shadow: 0 0 0 4px rgba(47, 84, 235, .075), 0 8px 25px rgba(24, 37, 60, .06); }
.knowledge-composer textarea { flex: 1; min-height: 24px; max-height: 120px; padding: 2px 0; resize: none; border: 0; outline: 0; background: transparent; color: #242b37; font: inherit; font-size: 13px; line-height: 1.55; }
.knowledge-composer textarea::placeholder { color: #9ba4b2; }
.knowledge-composer textarea:disabled { cursor: not-allowed; }
.knowledge-send,
.knowledge-stop { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; height: 30px; border: 0; border-radius: 8px; font: inherit; cursor: pointer; }
.knowledge-send { width: 30px; padding: 0; background: #2f54eb; color: #fff; }
.knowledge-send:disabled { background: #cdd3df; cursor: not-allowed; }
.knowledge-stop { gap: 6px; padding: 0 10px; background: #eef1f5; color: #4f5b6c; font-size: 11px; }
.knowledge-composer > p { margin: 7px auto 0; color: #9aa3b1; font-size: 10px; text-align: center; }

.knowledge-source { z-index: 4; display: flex; flex-direction: column; border-left: 1px solid #e7ebf0; background: #fbfcfd; }
.knowledge-source > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 23px 20px 18px; border-bottom: 1px solid #e8ecf1; background: #fff; }
.knowledge-source > header div { display: grid; gap: 6px; min-width: 0; }
.knowledge-source > header span { color: #0b8f84; font-size: 11px; font-weight: 650; }
.knowledge-source h2 { margin: 0; overflow-wrap: anywhere; color: #252c38; font-size: 16px; line-height: 1.45; }
.knowledge-source > header button { display: grid; place-items: center; flex: 0 0 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #7e8898; cursor: pointer; }
.knowledge-source > header button:hover { background: #f0f3f6; color: #2f54eb; }
.knowledge-source dl { display: grid; gap: 11px; margin: 0; padding: 18px 20px; border-bottom: 1px solid #e8ecf1; }
.knowledge-source dl div { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; font-size: 11px; }
.knowledge-source dt { color: #929baa; }
.knowledge-source dd { margin: 0; overflow-wrap: anywhere; color: #4f5a6b; }
.knowledge-source section { flex: 1; min-height: 0; overflow: auto; padding: 19px 20px; }
.knowledge-source h3 { margin: 0 0 12px; color: #343d4c; font-size: 12px; }
.knowledge-source section p { margin: 0; color: #566274; font-size: 12px; line-height: 1.8; white-space: pre-wrap; }
.knowledge-source footer { padding: 14px 20px; border-top: 1px solid #e8ecf1; color: #929baa; font-size: 10px; }
.knowledge-mobile-scrim { display: none; }

.knowledge-settings-layer { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgba(13, 22, 39, .38); }
.knowledge-settings-layer > article { width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid #d9dee7; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(13, 22, 39, .22); }
.knowledge-settings-layer header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 26px 20px; border-bottom: 1px solid #e7ebf0; }
.knowledge-settings-layer header > div { display: grid; gap: 5px; }
.knowledge-settings-layer header span { color: #2f54eb; font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.knowledge-settings-layer h2 { margin: 0; color: #242b36; font-size: 22px; letter-spacing: -.025em; }
.knowledge-settings-layer header p { margin: 0; color: #7d8796; font-size: 12px; }
.knowledge-settings-layer header > button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #778292; cursor: pointer; }
.knowledge-settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 22px 26px; }
.knowledge-settings-form label { display: grid; gap: 7px; color: #697487; font-size: 11px; }
.knowledge-settings-form label.wide,
.knowledge-settings-form label.toggle { grid-column: 1 / -1; }
.knowledge-settings-form input:not([type="checkbox"]) { height: 39px; padding: 0 11px; border: 1px solid #d9dee7; border-radius: 8px; outline: 0; background: #fff; color: #28313e; font: inherit; font-size: 12px; }
.knowledge-settings-form input:focus { border-color: #8799e9; box-shadow: 0 0 0 3px rgba(47, 84, 235, .08); }
.knowledge-settings-form small { color: #979fab; font-size: 10px; line-height: 1.5; }
.knowledge-settings-form label.toggle { display: flex; align-items: center; gap: 9px; padding-bottom: 5px; color: #3f4b5d; font-size: 12px; font-weight: 650; }
.knowledge-settings-form .toggle input { position: absolute; opacity: 0; }
.knowledge-settings-form .toggle > span { position: relative; width: 34px; height: 19px; border-radius: 10px; background: #c6ccd6; }
.knowledge-settings-form .toggle > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.knowledge-settings-form .toggle input:checked + span { background: #2f54eb; }
.knowledge-settings-form .toggle input:checked + span::after { transform: translateX(15px); }
.knowledge-settings-note { display: flex; gap: 9px; margin: 0 26px; padding: 11px 13px; border-radius: 8px; background: #f5f7fa; color: #6c7788; font-size: 11px; line-height: 1.6; }
.knowledge-settings-note svg { flex: 0 0 auto; margin-top: 1px; color: #ad6800; }
.knowledge-settings-layer footer { display: flex; justify-content: flex-end; gap: 9px; padding: 19px 26px 24px; }
.knowledge-settings-layer footer button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 37px; padding: 0 14px; border: 1px solid #d8dee7; border-radius: 8px; background: #fff; color: #526074; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.knowledge-settings-layer footer button.primary { border-color: #2f54eb; background: #2f54eb; color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .knowledge-session-actions { transition: opacity .16s ease; }
  .knowledge-welcome > div > button { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
  .knowledge-source { animation: knowledge-source-in .22s cubic-bezier(.22, 1, .36, 1); }
  .knowledge-message-stack > article { animation: knowledge-message-in .2s ease-out; }
  .knowledge-settings-layer > article { animation: knowledge-dialog-in .22s cubic-bezier(.22, 1, .36, 1); }
}
@keyframes knowledge-source-in { from { opacity: .2; transform: translateX(14px); } }
@keyframes knowledge-message-in { from { opacity: .3; transform: translateY(5px); } }
@keyframes knowledge-dialog-in { from { opacity: .3; transform: translateY(8px) scale(.985); } }

@media (max-width: 1180px) {
  .knowledge-chat-page,
  .knowledge-chat-page.has-source { grid-template-columns: 225px minmax(0, 1fr); }
  .knowledge-source { position: absolute; top: 0; right: 0; bottom: 0; width: min(350px, 86vw); box-shadow: -15px 0 45px rgba(22, 32, 50, .13); }
  .knowledge-mobile-scrim { position: absolute; inset: 0; z-index: 3; display: block; border: 0; background: rgba(18, 28, 46, .2); }
  .knowledge-source { z-index: 4; }
}
@media (max-width: 820px) {
  .knowledge-chat-page,
  .knowledge-chat-page.has-source { grid-template-columns: minmax(0, 1fr); }
  .knowledge-history { position: absolute; inset: 0 auto 0 0; z-index: 6; width: min(285px, 88vw); box-shadow: 15px 0 45px rgba(22, 32, 50, .15); transform: translateX(-105%); }
  .knowledge-history.is-open { transform: translateX(0); }
  .knowledge-mobile-close,
  .knowledge-history-toggle { display: grid; place-items: center; }
  .knowledge-mobile-close { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: #eef1f5; color: #637083; }
  .knowledge-history-toggle { flex: 0 0 34px; height: 34px !important; padding: 0 !important; }
  .knowledge-mobile-scrim { z-index: 5; }
  .knowledge-source { z-index: 7; }
  .knowledge-conversation-header { padding: 0 16px; }
  .knowledge-message-stack { width: calc(100% - 30px); }
  .knowledge-welcome > div { grid-template-columns: 1fr; }
  .knowledge-welcome > div > button { min-height: 78px; }
}
@media (max-width: 600px) {
  .knowledge-chat-page { height: calc(var(--app-viewport-height) - var(--topbar-height) - 62px); min-height: 430px; }
  .knowledge-conversation-header { min-height: 58px; }
  .knowledge-conversation-header > div:last-child button:first-child { display: none; }
  .knowledge-conversation-header > div:first-of-type span { display: none; }
  .knowledge-message-stack { padding-top: 24px; }
  .knowledge-question > div { max-width: 90%; }
  .knowledge-composer { padding: 9px 11px 11px; }
  .knowledge-composer > p { display: none; }
  .knowledge-welcome { width: calc(100% - 30px); margin-top: 38px; }
  .knowledge-welcome h1 { font-size: 22px; }
  .knowledge-settings-form { grid-template-columns: 1fr; }
  .knowledge-settings-form label.wide,
  .knowledge-settings-form label.toggle { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .knowledge-thinking i,
  .knowledge-answer.is-thinking i,
  .knowledge-chat-skeleton i { animation: none; }
  .knowledge-history { transition: none; }
}

/* Knowledge workspace refresh: deliberately scoped to /knowledge components. */
.knowledge-chat-main { --knowledge-topbar-height: 72px; background: #f6f8fc; }
.knowledge-chat-main .knowledge-topbar {
  position: relative;
  min-height: var(--knowledge-topbar-height);
  padding: 0 24px 0 28px;
  border-color: #e7ebf3;
  box-shadow: 0 3px 14px rgba(28, 45, 76, .035);
}
.knowledge-topbar-title { display: grid; gap: 5px; min-width: 190px; }
.knowledge-topbar-title > h1 { max-width: min(330px, 26vw); margin: 0; overflow: hidden; color: #20283a; font-size: 18px; font-weight: 720; letter-spacing: -.02em; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-topbar-title > span { display: flex; align-items: center; gap: 7px; color: #8490a4; font-size: 11px; }
.knowledge-topbar-title i { width: 8px; height: 8px; border-radius: 50%; background: #adb6c5; }
.knowledge-topbar-title i.online { background: #19b890; box-shadow: 0 0 0 4px rgba(25, 184, 144, .1); }
.knowledge-topbar-title b { padding: 2px 7px; border: 1px solid #cceee4; border-radius: 999px; background: #effbf7; color: #159276; font-size: 10px; font-weight: 700; }
.knowledge-topbar-hint { position: absolute; left: 50%; display: flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: #f3f7ff; color: #7083ac; font-size: 11px; transform: translateX(-50%); }
.knowledge-topbar-hint svg { color: #6689f7; }
.knowledge-topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.knowledge-header-action { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 1px solid #d9e0eb; border-radius: 9px; background: #fff; color: #526078; font: inherit; font-size: 12px; font-weight: 620; cursor: pointer; }
.knowledge-header-action:hover { border-color: #aebdf2; background: #f8faff; color: #315bd8; }
.knowledge-header-action:disabled { cursor: not-allowed; opacity: .48; }
.knowledge-clear-action:hover:not(:disabled) { border-color: #efc4c1; background: #fff5f4; color: #bd3a34; }
.knowledge-topbar .profile-identity { display: none; }
.knowledge-topbar .profile-button b { display: none; }
.knowledge-topbar .profile-button > span:first-child { width: 38px; height: 38px; font-size: 14px; box-shadow: 0 5px 14px rgba(47, 84, 235, .2); }

.knowledge-chat-page,
.knowledge-chat-page.has-source { grid-template-columns: 260px minmax(0, 1fr); height: calc(var(--app-viewport-height) - var(--knowledge-topbar-height)); min-height: 520px; border-top: 0; background: #fff; }
.knowledge-chat-page.has-source { grid-template-columns: 260px minmax(0, 1fr) minmax(300px, 340px); }
.knowledge-history { padding: 18px 14px 14px; border-color: #e5eaf2; background: #f5f8fd; }
.knowledge-history > header { align-items: center; padding: 0 8px 16px; }
.knowledge-history > header span { color: #8a96aa; font-size: 10px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.knowledge-history > header strong { color: #202a3d; font-size: 19px; }
.knowledge-new-chat { min-height: 44px; border-color: #315ff4; border-radius: 10px; background: #315ff4; font-size: 13px; box-shadow: 0 8px 18px rgba(49, 95, 244, .2); }
.knowledge-new-chat:hover { background: #2852dc; }
.knowledge-history-search { height: 40px; margin: 14px 0 6px; border-color: #dfe5ef; border-radius: 10px; background: rgba(255, 255, 255, .92); }
.knowledge-history-search input { font-size: 12px; }
.knowledge-session-list { padding: 0 0 18px; }
.knowledge-session-list section { margin-top: 17px; }
.knowledge-session-list h2 { margin: 0 8px 8px; color: #8b96a9; font-size: 11px; }
.knowledge-session-item { min-height: 68px; margin: 2px 0; border: 1px solid transparent; border-radius: 10px; }
.knowledge-session-item:hover { background: #edf2fb; }
.knowledge-session-item.active { border-color: #dce6ff; background: #e9f0ff; }
.knowledge-session-select { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; }
.knowledge-session-icon { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; margin-top: 1px; border-radius: 7px; background: #fff; color: #6f82a7; box-shadow: 0 1px 3px rgba(42, 58, 86, .07); }
.knowledge-session-item.active .knowledge-session-icon { background: #315ff4; color: #fff; }
.knowledge-session-copy { display: grid; flex: 1; gap: 6px; min-width: 0; }
.knowledge-session-copy > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.knowledge-session-copy strong { flex: 1; min-width: 0; color: #344056; font-size: 12px; font-weight: 670; }
.knowledge-session-copy time { flex: 0 0 auto; color: #9aa5b7; font-size: 10px; }
.knowledge-session-copy small { color: #8a96a8; font-size: 11px; }
.knowledge-session-item.active .knowledge-session-copy strong { color: #274bbd; }
.knowledge-session-actions { top: auto; right: 8px; bottom: 5px; }
.knowledge-session-actions button { background: #f7f9fd; }
.knowledge-history > footer { padding-top: 12px; border-color: #e2e8f1; }

.knowledge-conversation { display: flex; flex-direction: column; min-height: 0; background: #fff; }
.knowledge-banner { flex: 0 0 auto; margin: 12px 24px 0; padding: 10px 13px; border-radius: 10px; }
.knowledge-messages { flex: 1 1 auto; min-height: 0; background: #fff; }
.knowledge-message-stack { width: min(1080px, calc(100% - 56px)); padding: 30px 0 44px; }
.knowledge-question { display: flex; align-items: flex-start; justify-content: flex-end; gap: 12px; margin: 0 0 30px auto; }
.knowledge-question > .knowledge-question-content { display: grid; justify-items: end; gap: 6px; min-width: 0; max-width: none; padding: 0; border-radius: 0; background: transparent; color: inherit; font-size: inherit; line-height: normal; overflow: visible; box-shadow: none; }
.knowledge-question-content > div { max-width: min(680px, 70vw); padding: 10px 14px; border-radius: 13px 13px 3px 13px; background: #315ff4; color: #fff; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; box-shadow: 0 7px 18px rgba(49, 95, 244, .15); }
.knowledge-question-content time { color: #9aa5b7; font-size: 10px; }
.knowledge-user-avatar { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #e8f0ff; color: #315ff4; font-size: 12px; font-weight: 750; }
.knowledge-answer { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; margin-bottom: 34px; }
.knowledge-answer-mark { width: 40px; height: 40px; border-color: #dce8ef; border-radius: 11px; background: #f0faf8; }
.knowledge-answer-content { min-width: 0; }
.knowledge-answer-body { width: fit-content; max-width: min(880px, 100%); min-width: min(260px, 100%); padding: 13px 17px; border: 1px solid #e7edf5; border-radius: 13px; background: #f6f8fc; color: #344055; font-size: 13px; line-height: 1.75; box-shadow: 0 3px 10px rgba(31, 48, 78, .025); }
.knowledge-answer-body > :first-child { margin-top: 0; }
.knowledge-answer-body h1 { font-size: 19px; }
.knowledge-answer-body h2 { font-size: 16px; }
.knowledge-answer-body h3 { font-size: 14px; }
.knowledge-answer-body blockquote { background: #eef3ff; }
.knowledge-answer.has-error .knowledge-answer-body { display: flex; align-items: center; width: 100%; max-width: 100%; min-height: 54px; padding: 0; border-color: #f3d0cf; background: #fff4f3; box-shadow: none; }
.knowledge-answer-error { width: 100%; margin: 0; padding: 13px 16px; background: transparent; font-size: 12px; }
.knowledge-answer-error button { min-height: 30px; padding: 0 12px; border-radius: 7px; background: #ffe9e7; }
.knowledge-answer-tools { margin: 9px 0 0 9px; }
.knowledge-answer-tools button { font-size: 11px; }
.knowledge-answer-tools time { padding-left: 10px; border-left: 1px solid #dde3eb; font-size: 10px; }
.knowledge-answer.is-thinking .knowledge-answer-body { display: flex; align-items: center; gap: 5px; min-height: 46px; }
.knowledge-answer.is-thinking > .knowledge-answer-content { display: block; }
.knowledge-answer.is-thinking p { margin: 0 7px 0 0; }
.knowledge-welcome { margin-top: min(12vh, 92px); }
.knowledge-welcome-mark { background: #f0faf8; }

.knowledge-composer { flex: 0 0 auto; padding: 12px 28px 14px; border-color: #edf1f6; background: rgba(255, 255, 255, .98); box-shadow: 0 -10px 24px rgba(38, 55, 84, .025); }
.knowledge-composer-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 14px; width: min(1080px, 100%); min-height: 98px; padding: 16px 12px 11px 18px; border-color: #cfd9ec; border-radius: 14px; box-shadow: 0 8px 24px rgba(36, 57, 91, .07); }
.knowledge-composer textarea { grid-column: 1; grid-row: 1; align-self: start; min-width: 0; min-height: 62px; max-height: 180px; font-size: 14px; line-height: 1.65; }
.knowledge-composer-hint { grid-column: 1; grid-row: 2; color: #9aa6b9; font-size: 11px; line-height: 1.5; }
.knowledge-composer-meta { display: flex; grid-column: 2; grid-row: 1 / span 2; align-items: center; align-self: end; gap: 12px; color: #9aa6b9; font-size: 10px; }
.knowledge-send, .knowledge-stop { height: 38px; border-radius: 10px; }
.knowledge-send { width: 42px; background: #315ff4; box-shadow: 0 6px 13px rgba(49, 95, 244, .23); }
.knowledge-stop { padding: 0 12px; }
.knowledge-composer > p { margin-top: 8px; }

@media (max-width: 1240px) {
  .knowledge-topbar-hint { display: none; }
  .knowledge-chat-page,
  .knowledge-chat-page.has-source { grid-template-columns: 228px minmax(0, 1fr); }
  .knowledge-chat-page.has-source .knowledge-source { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 86vw); }
}
@media (max-width: 820px) {
  .knowledge-chat-page,
  .knowledge-chat-page.has-source { grid-template-columns: minmax(0, 1fr); }
  .knowledge-chat-main .knowledge-topbar { padding: 0 15px; }
  .knowledge-topbar-title { min-width: 0; }
  .knowledge-topbar-title > h1 { max-width: 42vw; font-size: 16px; }
  .knowledge-topbar-title > span { max-width: 48vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .knowledge-topbar-title b, .knowledge-external-action { display: none; }
  .knowledge-history-toggle { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 1px solid #dce3ee; border-radius: 9px; background: #fff; color: #58667b; }
  .knowledge-message-stack { width: calc(100% - 30px); }
  .knowledge-answer { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .knowledge-answer-mark { width: 34px; height: 34px; }
  .knowledge-composer { padding-right: 14px; padding-left: 14px; }
}
@media (max-width: 600px) {
  .knowledge-chat-main { --knowledge-topbar-height: 68px; padding-bottom: 62px; }
  .knowledge-chat-main .knowledge-topbar { min-height: var(--knowledge-topbar-height); align-items: center; }
  .knowledge-chat-page { height: calc(var(--app-viewport-height) - var(--knowledge-topbar-height) - 62px); min-height: 380px; }
  .knowledge-header-action { width: 36px; padding: 0; justify-content: center; font-size: 0; }
  .knowledge-topbar .profile-button > span:first-child { width: 34px; height: 34px; }
  .knowledge-question { gap: 8px; }
  .knowledge-user-avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .knowledge-question-content > div { max-width: 76vw; }
  .knowledge-answer-body { padding: 11px 13px; font-size: 12px; }
  .knowledge-composer { padding: 9px 10px 10px; }
  .knowledge-composer-box { min-height: 76px; padding: 12px 9px 8px 12px; }
  .knowledge-composer textarea { min-height: 46px; font-size: 13px; }
  .knowledge-composer-meta > span { display: none; }
  .knowledge-send { width: 38px; height: 36px; }
}
.notification-center { position: relative; }
.notification-trigger { position: relative; }
.notification-trigger i { position: absolute; top: -5px; right: -8px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d44949; color: #fff; font-size: 10px; font-style: normal; font-weight: 700; }
.notification-panel { position: absolute; top: calc(100% + 13px); right: -12px; z-index: 100; width: min(390px, calc(100vw - 24px)); max-height: min(70vh, 620px); overflow: auto; border: 1px solid #dbe1ec; border-radius: 13px; background: #fff; box-shadow: 0 22px 55px rgba(20, 34, 67, .2); color: #27354b; }
.notification-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px 12px; border-bottom: 1px solid #edf0f5; }
.notification-panel > header strong { font-size: 16px; }
.notification-panel > header button { border: 0; background: transparent; color: var(--accent); cursor: pointer; }
.notification-panel section { padding: 10px 10px 14px; }
.notification-panel section + section { border-top: 1px solid #edf0f5; }
.notification-panel h3 { display: flex; justify-content: space-between; margin: 0 8px 6px; color: #67758d; font-size: 12px; font-weight: 700; }
.notification-panel h3 span { color: #7c8ca8; font-weight: 500; }
.notification-item { display: grid; gap: 5px; width: 100%; padding: 11px 10px; border: 0; border-radius: 8px; background: #fff; color: #2b3850; text-align: left; cursor: pointer; }
.notification-item + .notification-item { border-top: 1px solid #f0f2f7; }
.notification-item:hover, .notification-item:focus-visible { background: #f4f7ff; }
.notification-item.pending, .notification-item.unread { background: #f8faff; }
.notification-item.unread { position: relative; padding-left: 28px; }
.notification-item .notification-unread-dot { position: absolute; top: 17px; left: 10px; width: 9px; height: 9px; border-radius: 50%; background: #d73545; box-shadow: 0 0 0 3px #ffe6e9; }
.notification-item strong { font-size: 13px; font-weight: 650; line-height: 1.45; }
.notification-item span { color: #75839b; font-size: 11px; }
.notification-item em { color: #ac631f; font-size: 11px; font-style: normal; }
.notification-empty, .notification-error { margin: 10px; color: #7b879b; font-size: 12px; line-height: 1.5; }
.notification-error { color: #b84444; }
.notification-more { padding: 7px 18px 12px; text-align: right; }
.notification-more a { color: var(--accent); font-size: 12px; text-decoration: none; }
.notification-more a:hover { text-decoration: underline; }

.record-review-view { flex: 1; min-height: 0; overflow: auto; padding: 26px 32px 38px; background: #f7f9fc; color: #29374d; }
.record-review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; max-width: 1120px; margin: 0 auto 22px; }
.record-review-heading span { color: #5972a3; font-size: 11px; font-weight: 700; }
.record-review-heading h3 { margin: 5px 0; font-size: 22px; }
.record-review-heading p { margin: 0; color: #718097; font-size: 12px; }
.record-review-status { flex: 0 0 auto; padding: 7px 11px; border-radius: 7px; background: #edf1f8; color: #66758f; font-size: 12px; }
.record-review-status.status-pending { background: #fff1d8; color: #8b5b0c; }
.record-review-status.status-needs_changes { background: #fff0eb; color: #a34e35; }
.record-review-status.status-reviewed { background: #e6f6ed; color: #237049; }
.record-review-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); align-items: start; gap: 22px; max-width: 1120px; margin: auto; }
.record-review-main, .record-review-compose { min-width: 0; padding: 22px; border: 1px solid #e1e6ee; border-radius: 10px; background: #fff; }
.record-review-note, .record-review-warning { margin: 0 0 17px; color: #65748c; font-size: 13px; line-height: 1.65; }
.record-review-warning { padding: 11px 13px; border-radius: 7px; background: #fff5e7; color: #955a18; }
.record-review-error { max-width: 1120px; margin: 0 auto 16px; color: #b54242; font-size: 13px; }
.record-review-submit { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin: 20px 0; }
.record-review-submit button, .record-review-actions button { padding: 9px 14px; border: 1px solid #cad5f1; border-radius: 7px; background: #f5f7ff; color: #284db9; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.record-review-submit button:not(:disabled) { border-color: #3556cb; background: #3556cb; color: #fff; }
.record-review-submit button:disabled, .record-review-actions button:disabled { opacity: .5; cursor: not-allowed; }
.record-review-submit small { color: #7b8799; font-size: 11px; }
.record-review-comments { margin-top: 24px; }
.record-review-comments h4 { margin: 0 0 14px; font-size: 14px; }
.record-review-empty { color: #8792a4; font-size: 12px; }
.record-review-comment { padding: 16px 0; border-top: 1px solid #edf0f4; }
.record-review-comment header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.record-review-comment header strong { font-size: 13px; }
.record-review-comment header span { color: #8a96a8; font-size: 11px; }
.record-review-comment p { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
.record-review-compose { display: grid; gap: 11px; }
.record-review-compose label { font-size: 13px; font-weight: 700; }
.record-review-compose textarea { width: 100%; min-height: 170px; resize: vertical; padding: 11px 12px; border: 1px solid #d7deea; border-radius: 7px; color: #28374d; font: inherit; font-size: 13px; line-height: 1.6; }
.record-review-compose textarea:focus { outline: 2px solid #b9c9f5; border-color: #6783d2; }
.record-review-compose > span { justify-self: end; color: #8995a7; font-size: 11px; }
.record-review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.record-review-actions button.reviewed { border-color: #a8d9bd; background: #e9f8ef; color: #237049; }
.record-review-actions button.needs-changes { border-color: #e6c2a8; background: #fff5ec; color: #a45c2a; }
.record-review-compose > small { color: #8894a6; font-size: 11px; line-height: 1.5; }
@media (max-width: 900px) { .record-review-layout { grid-template-columns: 1fr; } .record-review-view { padding: 20px 15px; } }
.notifications-page { max-width: 1080px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 42px) 60px; color: var(--ink); }
.notifications-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.notifications-heading h1 { margin: 0 0 8px; font-size: 26px; font-weight: 650; }
.notifications-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.notifications-heading > button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); font: inherit; cursor: pointer; }
.notifications-heading > button:disabled { opacity: .6; cursor: wait; }
.notifications-tabs { display: flex; gap: 8px; margin-bottom: 15px; }
.notifications-tabs button { padding: 9px 16px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.notifications-tabs button[aria-selected="true"] { border-color: #d7e1ff; background: #eef3ff; color: var(--accent); font-weight: 650; }
.notifications-content { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.notifications-content > header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.notifications-content > header > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.notifications-content h2 { margin: 0; font-size: 17px; font-weight: 650; }
.notifications-content header span { color: var(--muted); font-size: 12px; }
.notifications-filters { display: flex; gap: 4px; }
.notifications-filters button { padding: 6px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.notifications-filters button[aria-pressed="true"] { background: #eef3ff; color: var(--accent); font-weight: 650; }
.notifications-row { display: flex; align-items: center; gap: 16px; min-height: 74px; padding: 10px 22px; border-bottom: 1px solid #edf0f5; color: var(--ink); text-decoration: none; }
.notifications-row:last-child { border-bottom: 0; }
.notifications-row:hover { background: #f8faff; }
.notifications-row.unread { background: #f8faff; }
.notifications-indicator { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; }
.notifications-indicator.unread { background: #d73545; box-shadow: 0 0 0 3px #ffe6e9; }
.notifications-row-main { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.notifications-row-main strong { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.notifications-row-main small { color: var(--muted); font-size: 12px; }
.notifications-row-main:disabled { opacity: .65; cursor: default; }
.notifications-row.task > svg { flex-shrink: 0; color: #8b99af; }
.notifications-tag { flex-shrink: 0; padding: 5px 9px; border-radius: 6px; background: #fff4e7; color: #97601b; font-size: 12px; }
.notifications-mark { flex-shrink: 0; padding: 6px 9px; border: 1px solid #d4def3; border-radius: 6px; background: #fff; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.notifications-read { color: #8d99aa; font-size: 12px; }
.notifications-empty, .notifications-error { margin: 0; padding: 45px 22px; color: var(--muted); font-size: 13px; text-align: center; }
.notifications-error { color: #b84444; }
.notifications-error button { margin-left: 8px; border: 0; background: none; color: var(--accent); cursor: pointer; }
.notifications-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.notifications-pagination button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font: inherit; cursor: pointer; }
.notifications-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.dashboard-review-tasks { margin-bottom: 18px; }
.dashboard-review-tasks .notifications-row { min-height: 64px; padding-inline: 20px; }
.dashboard-review-tasks .notifications-empty { padding: 25px 20px; text-align: left; }
@media (max-width: 600px) { .notifications-heading { flex-wrap: wrap; } .notifications-content > header { padding: 15px; } .notifications-row { padding-inline: 14px; } .notifications-tag { display: none; } }
.recommendations-page {
  width: min(100%, 1740px);
  min-height: calc(100dvh - var(--topbar-height));
  box-sizing: border-box;
  margin: 0 auto;
  padding: 24px 28px 36px;
  color: var(--ink);
}
.recommendations-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 0 0 18px; }
.recommendations-heading h1 { margin: 0 0 5px; font-size: 29px; font-weight: 720; letter-spacing: -.025em; }
.recommendations-heading p { max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.recommendations-heading-actions button, .recommendations-result-toolbar > button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto;
  min-height: 36px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: #fff; color: var(--accent-dark); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
}
.recommendations-heading-actions button:hover, .recommendations-result-toolbar > button:hover { border-color: #9dafed; background: var(--accent-wash); }
.recommendations-heading-actions button:active, .recommendations-result-toolbar > button:active, .recommendations-primary:active:not(:disabled), .recommendations-secondary:active:not(:disabled) { transform: translateY(1px); }
.recommendations-mobile-tabs { display: none; }
.recommendations-workspace { display: grid; grid-template-columns: minmax(330px, 390px) minmax(0, 1fr); gap: 16px; align-items: start; }
.recommendations-conversation, .recommendations-results {
  min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow);
}
.recommendations-conversation { position: sticky; top: calc(var(--topbar-height) + 16px); display: flex; flex-direction: column; min-height: 620px; max-height: calc(100dvh - var(--topbar-height) - 58px); overflow: hidden; }
.recommendations-conversation-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px; scrollbar-width: thin; }
.recommendations-conversation:has(.recommendations-composer textarea[data-expanded="true"]) { position: static; max-height: none; overflow: visible; }
.recommendations-conversation:has(.recommendations-composer textarea[data-expanded="true"]) .recommendations-conversation-scroll { min-height: 180px; max-height: calc(100dvh - var(--topbar-height) - 230px); }
.recommendation-welcome { display: grid; justify-items: start; padding: 8px 2px 16px; }
.recommendation-welcome > span { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 10px; background: var(--accent-pale); color: var(--accent); }
.recommendation-welcome h2 { margin: 0; font-size: 19px; font-weight: 680; }
.recommendation-welcome p { margin: 8px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.recommendation-welcome > div { display: flex; flex-wrap: wrap; gap: 7px; }
.recommendation-welcome button { padding: 6px 9px; border: 1px solid #dbe2f6; border-radius: 6px; background: #f8f9fe; color: var(--text); font: inherit; font-size: 11px; cursor: pointer; }
.recommendation-welcome button:hover { border-color: #aebcf0; color: var(--accent-dark); }
.recommendation-messages { display: grid; gap: 14px; padding-bottom: 18px; }
.recommendation-message { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 8px; align-items: start; }
.recommendation-message > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.recommendation-message p { margin: 0; padding: 10px 12px; border-radius: 4px 9px 9px; background: #f4f6fb; color: var(--text); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.recommendation-message.is-user { grid-template-columns: minmax(0, 1fr) 27px; }
.recommendation-message.is-user > span { grid-column: 2; background: #dde4fb; color: var(--accent-dark); }
.recommendation-message.is-user p { grid-row: 1; justify-self: end; max-width: 92%; border-radius: 9px 4px 9px 9px; background: var(--accent); color: #fff; }
.recommendations-composer { flex: 0 0 auto; padding: 14px 16px 13px; border-top: 1px solid var(--line); background: #fff; }
.recommendations-composer > label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 12px; font-weight: 680; }
.recommendations-composer > div { position: relative; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.recommendations-composer > div:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.recommendations-composer textarea, .recommendation-question-card textarea, .recommendation-requirement textarea {
  width: 100%; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.6; resize: vertical; transition: border-color .18s, box-shadow .18s;
}
.recommendations-composer textarea { display: block; min-height: 82px; padding: 10px 43px 10px 11px; border: 0; overflow-y: hidden; resize: none; }
.recommendations-composer textarea::placeholder, .recommendation-question-card textarea::placeholder, .recommendation-requirement textarea::placeholder { color: #929baa; }
.recommendations-composer textarea:focus-visible, .recommendation-question-card textarea:focus-visible, .recommendation-requirement textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.recommendations-composer textarea:focus-visible { box-shadow: none; }
.recommendations-composer-hint { display: block; padding: 0 50px 12px 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.recommendations-composer > div > button { position: absolute; right: 8px; bottom: 9px; display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; cursor: pointer; }
.recommendations-composer > div > button:hover:not(:disabled) { background: var(--accent-dark); }
.recommendations-composer > div > button:disabled { opacity: .4; cursor: not-allowed; }
.recommendations-composer > p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.recommendation-questions { display: grid; gap: 13px; }
.recommendation-questions > header { display: flex; justify-content: space-between; gap: 12px; padding-top: 3px; }
.recommendation-questions h2 { margin: 0; font-size: 16px; }
.recommendation-questions header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.recommendation-questions > header > span { color: var(--accent); font-size: 11px; font-weight: 650; white-space: nowrap; }
.recommendation-question-list { display: grid; gap: 10px; }
.recommendation-question-card { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcff; }
.recommendation-question-number { padding-top: 2px; color: var(--accent); font-size: 11px; font-weight: 750; }
.recommendation-question-card label:not(.recommendation-unknown-check) { display: block; color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.5; }
.recommendation-question-card p { margin: 4px 0 9px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.recommendation-question-card textarea { min-height: 74px; padding: 9px 10px; overflow-y: hidden; resize: none; }
.recommendation-question-card textarea:disabled { background: #f1f3f6; color: var(--muted); }
.recommendation-unknown-check { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--text); font-size: 11px; cursor: pointer; }
.recommendation-unknown-check input { accent-color: var(--accent); }
.recommendations-primary, .recommendations-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; padding: 8px 13px;
  border-radius: 7px; font: inherit; font-size: 13px; font-weight: 670; cursor: pointer;
}
.recommendations-primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.recommendations-primary:hover:not(:disabled) { border-color: var(--accent-dark); background: var(--accent-dark); box-shadow: 0 4px 12px rgba(47, 84, 235, .16); }
.recommendations-secondary { border: 1px solid var(--line-strong); background: #fff; color: var(--accent-dark); }
.recommendations-secondary:hover:not(:disabled) { border-color: #9dafed; background: var(--accent-wash); }
.recommendations-primary:disabled, .recommendations-secondary:disabled { opacity: .48; cursor: not-allowed; }
.recommendation-requirement { display: grid; gap: 15px; }
.recommendation-requirement > header > div { display: flex; align-items: center; gap: 9px; }
.recommendation-requirement > header > div > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--accent-pale); color: var(--accent); }
.recommendation-requirement h2 { margin: 0; font-size: 16px; }
.recommendation-requirement header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.recommendation-requirement-grid { display: grid; gap: 12px; }
.recommendation-requirement-field { display: grid; gap: 6px; }
.recommendation-requirement-field > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.recommendation-requirement-field label { color: var(--ink); font-size: 12px; font-weight: 650; }
.recommendation-requirement-field input { min-width: 0; flex: 1; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12px; font-weight: 650; }
.recommendation-requirement-field input::placeholder { color: var(--muted); font-weight: 500; }
.recommendation-requirement-field button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; }
.recommendation-requirement-field button:hover { color: var(--accent); }
.recommendation-requirement textarea { min-height: 66px; padding: 9px 10px; overflow-y: hidden; resize: none; }
.recommendation-add-detail { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 7px 10px; border: 1px dashed var(--line-strong); border-radius: 7px; background: #fbfcff; color: var(--accent-dark); font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.recommendation-add-detail:hover { border-color: #9dafed; background: var(--accent-wash); }
.recommendation-dosage-section { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.recommendation-dosage-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.recommendation-dosage-section h3 { margin: 0; font-size: 13px; font-weight: 700; }
.recommendation-dosage-section header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.recommendation-dosage-section > header > button { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 5px 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--accent-dark); font: inherit; font-size: 10px; font-weight: 650; cursor: pointer; }
.recommendation-dosage-section > header > button:hover { border-color: #9dafed; background: var(--accent-wash); }
.recommendation-dosage-empty { margin: 0; padding: 10px 11px; border-radius: 7px; background: #f7f8fb; color: var(--muted); font-size: 10px; line-height: 1.55; }
.recommendation-dosage-list { display: grid; gap: 9px; }
.recommendation-dosage-card { display: grid; gap: 10px; padding: 11px; border: 1px solid #d8def0; border-radius: 8px; background: #fbfcff; }
.recommendation-dosage-card.is-confirmed { border-color: #aebff3; background: #f7f9ff; }
.recommendation-dosage-card.is-unknown { border-color: #ead8a7; background: #fffaf0; }
.recommendation-dosage-card-head, .recommendation-dosage-card-head > div { display: flex; align-items: center; gap: 7px; }
.recommendation-dosage-card-head { justify-content: space-between; }
.recommendation-dosage-card-head span { color: var(--accent); font-size: 10px; font-weight: 750; }
.recommendation-dosage-card-head strong { color: var(--text); font-size: 10px; }
.recommendation-dosage-card-head > button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; }
.recommendation-dosage-card-head > button:hover { color: var(--accent); }
.recommendation-dosage-fields { display: grid; gap: 8px; }
.recommendation-dosage-fields > div { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; }
.recommendation-dosage-fields label { display: grid; gap: 4px; color: var(--text); font-size: 10px; font-weight: 650; }
.recommendation-dosage-fields input, .recommendation-dosage-fields select { min-width: 0; height: 34px; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; }
.recommendation-dosage-fields input:focus-visible, .recommendation-dosage-fields select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.recommendation-dosage-fields input:disabled, .recommendation-dosage-fields select:disabled { background: #f2f3f6; color: var(--muted); }
.recommendation-dosage-error { margin: -2px 0 0; color: var(--danger); font-size: 10px; line-height: 1.45; }
.recommendation-dosage-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; }
.recommendation-dosage-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 6px 9px; border-radius: 6px; font: inherit; font-size: 10px; font-weight: 650; cursor: pointer; }
.recommendation-dosage-actions .is-unknown { border: 1px solid var(--line-strong); background: #fff; color: var(--text); }
.recommendation-dosage-actions .is-confirm { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.recommendation-dosage-actions button:disabled { opacity: .45; cursor: not-allowed; }
.recommendation-unknowns { padding: 11px 12px; border-radius: 7px; background: #fff9e9; color: #765a16; }
.recommendation-unknowns strong { font-size: 11px; }
.recommendation-unknowns ul { margin: 6px 0 0; padding-left: 18px; font-size: 11px; line-height: 1.6; }
.recommendations-confirm-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 13px 16px; border-top: 1px solid var(--line); }
.recommendations-inline-error, .recommendations-processing { display: flex; gap: 9px; margin-top: 14px; padding: 11px 12px; border-radius: 7px; font-size: 12px; }
.recommendations-inline-error { border: 1px solid #efc4c1; background: #fff5f4; color: var(--danger); }
.recommendations-inline-error svg, .recommendations-processing svg { flex: 0 0 auto; margin-top: 1px; }
.recommendations-inline-error strong, .recommendations-processing strong { display: block; }
.recommendations-inline-error p { margin: 3px 0 0; line-height: 1.55; }
.recommendations-processing { position: relative; overflow: hidden; border: 1px solid #ccd6fb; background: var(--accent-wash); color: var(--accent-dark); }
.recommendations-processing > div { flex: 1 1 auto; min-width: 0; }
.recommendations-processing span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.recommendations-processing button { display: inline-flex; align-items: center; gap: 4px; align-self: center; flex: 0 0 auto; padding: 5px 8px; border: 1px solid #bdcaf6; border-radius: 6px; background: #fff; color: var(--accent-dark); font: inherit; font-size: 10px; font-weight: 680; cursor: pointer; }
.recommendations-processing button:hover { border-color: var(--accent); background: #f9faff; }
.recommendation-questions > header, .recommendation-requirement > header, .recommendations-processing, .recommendations-inline-error { scroll-margin-top: calc(var(--topbar-height) + 16px); scroll-margin-bottom: 80px; }
.recommendations-processing i { position: absolute; inset: auto 0 0; width: 35%; height: 3px; background: var(--accent); animation: recommendation-loading 1.4s ease-in-out infinite alternate; }
.recommendations-results { overflow: hidden; background: #f7f8fb; }
.recommendations-result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.recommendations-result-toolbar > div span, .recommendations-result-toolbar > div strong { display: block; }
.recommendations-result-toolbar > div span { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.recommendations-result-toolbar > div strong { font-size: 15px; font-weight: 680; }
.recommendations-placeholder { display: grid; align-content: start; gap: 24px; min-height: 500px; box-sizing: border-box; padding: 30px 32px 34px; background: #fff; }
.recommendations-placeholder-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 260px); align-items: end; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.recommendations-placeholder-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 17px; border: 1px solid #d4dcf8; border-radius: 12px; background: var(--accent-wash); color: var(--accent); }
.recommendations-placeholder-intro > div > span { color: var(--accent-dark); font-size: 10px; font-weight: 720; letter-spacing: .05em; }
.recommendations-placeholder h2 { margin: 5px 0 0; font-size: 23px; }
.recommendations-placeholder-intro > div > p { max-width: 650px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.recommendations-placeholder-intro aside { padding: 15px 16px; border: 1px solid var(--line); border-radius: 8px; background: #f7f8fb; }
.recommendations-placeholder-intro aside.is-active { border-color: #cbd5fa; background: var(--accent-wash); }
.recommendations-placeholder-intro aside > span { display: block; color: var(--muted); font-size: 10px; }
.recommendations-placeholder-intro aside > strong { display: block; margin-top: 5px; font-size: 14px; }
.recommendations-placeholder-intro aside > p { margin: 5px 0 0; color: var(--text); font-size: 11px; }
.recommendations-placeholder-intro aside > button { display: inline-flex; align-items: center; gap: 5px; margin-top: 13px; padding: 6px 9px; border: 1px solid #b9c7f6; border-radius: 6px; background: #fff; color: var(--accent-dark); font: inherit; font-size: 11px; font-weight: 680; cursor: pointer; }
.recommendations-placeholder-intro aside > button:hover { border-color: var(--accent); }
.recommendations-placeholder ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; margin: 0; padding: 0; list-style: none; }
.recommendations-placeholder li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 9px; padding: 12px 18px 0 0; border-top: 2px solid #e4e8f3; color: var(--text); }
.recommendations-placeholder li.is-active { border-top-color: var(--accent); }
.recommendations-placeholder li.is-complete { border-top-color: #bfcaf2; }
.recommendations-placeholder li span { z-index: 1; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: #eef1f8; color: var(--muted); font-size: 10px; font-weight: 700; }
.recommendations-placeholder li.is-active span { background: var(--accent); color: #fff; }
.recommendations-placeholder li.is-complete span { background: var(--accent-pale); color: var(--accent); }
.recommendations-placeholder li strong, .recommendations-placeholder li small { display: block; }
.recommendations-placeholder li strong { padding-top: 4px; color: var(--ink); font-size: 11px; }
.recommendations-placeholder li small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.recommendations-placeholder-deliverables { padding-top: 22px; border-top: 1px solid var(--line); }
.recommendations-placeholder-deliverables > header span, .recommendations-placeholder-deliverables > header strong { display: block; }
.recommendations-placeholder-deliverables > header span { color: var(--muted); font-size: 10px; }
.recommendations-placeholder-deliverables > header strong { margin-top: 4px; font-size: 14px; }
.recommendations-placeholder-deliverables > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.recommendations-placeholder-deliverables article { padding: 13px 14px; border-radius: 7px; background: #f7f8fb; }
.recommendations-placeholder-deliverables article span { display: block; color: var(--accent); font-size: 10px; font-weight: 740; }
.recommendations-placeholder-deliverables article strong { display: block; margin-top: 8px; font-size: 12px; }
.recommendations-placeholder-deliverables article p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.recommendations-output { display: grid; gap: 12px; padding: 12px; }
.recommendations-section, .recommendation-change-summary, .recommendation-stale-note, .recommendation-exploratory, .recommendation-content-warnings { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.recommendation-change-summary, .recommendation-stale-note, .recommendation-exploratory, .recommendation-content-warnings { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; color: var(--accent-dark); }
.recommendation-change-summary svg, .recommendation-stale-note svg, .recommendation-exploratory svg, .recommendation-content-warnings svg { flex: 0 0 auto; margin-top: 1px; }
.recommendation-change-summary p, .recommendation-stale-note p, .recommendation-exploratory p { margin: 0; font-size: 12px; line-height: 1.6; }
.recommendation-change-summary { border-color: #c8d3f7; background: var(--accent-wash); }
.recommendation-stale-note, .recommendation-exploratory { border-color: #efdba2; background: #fffaf0; color: #775816; }
.recommendation-exploratory strong { display: block; margin-bottom: 3px; font-size: 12px; }
.recommendation-content-warnings { border-color: #efdba2; background: #fffaf0; color: #775816; }
.recommendation-content-warnings strong { display: block; margin-bottom: 4px; font-size: 12px; }
.recommendation-content-warnings ul { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.65; }
.recommendation-warning-heading { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.recommendation-warning-heading > h2,
.recommendation-warning-heading > h3,
.recommendation-warning-heading > h4 { margin: 0; }
.recommendation-warning-marker { position: static; display: inline-flex; flex: 0 0 auto; }
.recommendation-warning-marker > summary { display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 0; border-radius: 50%; background: #fff4ce; color: #976d12; cursor: pointer; list-style: none; transition: background-color .16s ease, color .16s ease; }
.recommendation-warning-marker > summary::-webkit-details-marker { display: none; }
.recommendation-warning-marker > summary:hover,
.recommendation-warning-marker > summary:focus-visible,
.recommendation-warning-marker[open] > summary { background: #f8df8d; color: #6f4e08; }
.recommendation-warning-marker > summary:focus-visible { outline: 2px solid rgba(151, 109, 18, .28); outline-offset: 2px; }
.recommendation-warning-popover { position: absolute; z-index: 40; top: calc(100% + 7px); left: 0; box-sizing: border-box; width: min(330px, 100%); padding: 11px 13px; border: 1px solid #e8ca78; border-radius: 8px; background: #fffaf0; color: #6f520f; box-shadow: 0 10px 28px rgba(71, 53, 15, .16); }
.recommendation-warning-popover strong { display: block; margin-bottom: 5px; font-size: 12px; }
.recommendation-warning-popover ul { margin: 0; padding-left: 18px; font-size: 11px; line-height: 1.65; }
.recommendations-section { padding: 18px; }
.recommendations-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.recommendations-section-head h2 { margin: 0; font-size: 17px; font-weight: 680; line-height: 1.4; }
.recommendations-section-head p { max-width: 780px; margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.recommendation-hypotheses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.recommendation-hypotheses > article { position: relative; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; }
.recommendation-hypotheses > article > span, .recommendation-case header span { display: inline-block; margin-bottom: 7px; color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.recommendation-hypotheses > article[data-basis="model_hypothesis"] > span { color: #8a6519; }
.recommendation-hypotheses > article > p { margin: 0; color: var(--text); font-size: 12px; line-height: 1.65; }
.recommendation-analysis-block { padding-top: 14px; border-top: 1px solid var(--line); }
.recommendation-analysis-block + .recommendation-analysis-block { margin-top: 14px; }
.recommendation-analysis-block.is-summary { padding: 13px 14px; border: 1px solid #dfe5f4; border-radius: 8px; background: #f8faff; }
.recommendation-analysis-block h3 { margin: 0 0 9px; color: var(--ink); font-size: 13px; font-weight: 750; }
.recommendation-analysis-block.is-summary h3 { color: var(--accent-dark); }
.recommendation-analysis-block.is-summary > p, .recommendation-analysis-empty { margin: 0; color: var(--text); font-size: 12px; line-height: 1.7; }
.recommendation-analysis-empty { padding: 10px 12px; border-radius: 7px; background: #f7f8fb; color: var(--muted); }
.recommendation-priority-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.recommendation-priority-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 9px; padding: 10px 12px; border-radius: 7px; background: #f7f8fb; }
.recommendation-priority-list li > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--accent-pale); color: var(--accent-dark); font-size: 10px; font-weight: 750; }
.recommendation-priority-list p { margin: 2px 0 0; color: var(--text); font-size: 12px; line-height: 1.65; }
.recommendations-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recommendations-comparison-grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.recommendation-case { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; }
.recommendation-case > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 13px; background: var(--accent-wash); }
.recommendation-case h3 { margin: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.recommendation-case header span { flex: 0 0 auto; margin: 1px 0 0; }
.recommendation-case dl { flex: 1 1 auto; margin: 0; }
.recommendation-case dl > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 10px 13px; border-top: 1px solid var(--line); }
.recommendation-case dt { color: var(--ink); font-size: 11px; font-weight: 680; }
.recommendation-case dd { margin: 0; color: var(--text); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.recommendations-empty-note { margin: 0; padding: 12px; border-radius: 7px; background: #f6f7fa; color: var(--muted); font-size: 12px; line-height: 1.6; }
.recommendations-pager { display: flex; align-items: center; gap: 5px; }
.recommendations-pager button { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--accent); cursor: pointer; }
.recommendations-pager button:disabled { opacity: .35; cursor: not-allowed; }
.recommendations-pager span { color: var(--muted); font-size: 10px; }
.recommendation-evidence { margin-top: 9px; border-top: 1px solid var(--line); }
.recommendation-evidence-toggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px; box-sizing: border-box; padding: 9px 4px; border: 0; border-radius: 0; background: transparent; color: var(--accent-dark); font: inherit; font-size: 11px; font-weight: 690; text-align: left; cursor: pointer; transition: background .18s ease, color .18s ease; }
.recommendation-evidence-toggle:hover { background: #f7f9ff; }
.recommendation-evidence-toggle:focus-visible { outline: 2px solid rgba(53, 86, 232, .28); outline-offset: -2px; }
.recommendation-evidence-toggle > svg:first-child { flex: 0 0 auto; color: var(--accent); }
.recommendation-evidence-toggle small { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 600; }
.recommendation-evidence-caret { flex: 0 0 auto; transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.recommendation-evidence[data-open="true"] .recommendation-evidence-toggle { background: #f7f9ff; }
.recommendation-evidence[data-open="true"] .recommendation-evidence-caret { transform: rotate(180deg); }
.recommendation-evidence-body { display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(-4px); transition: grid-template-rows .26s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, transform .26s cubic-bezier(.2, .8, .2, 1); }
.recommendation-evidence-inner { min-height: 0; overflow: hidden; }
.recommendation-evidence[data-open="true"] .recommendation-evidence-body { grid-template-rows: 1fr; opacity: 1; transform: translateY(0); }
.recommendation-case .recommendation-evidence-toggle { padding-inline: 13px; }
.recommendation-case .recommendation-evidence-inner { padding: 0 13px 12px; }
.recommendation-case > .recommendation-evidence { margin-top: auto; }
.recommendation-source { padding: 9px 0; border-top: 1px solid var(--line); }
.recommendation-source > div { display: flex; justify-content: space-between; gap: 8px; }
.recommendation-source strong, .recommendation-source small, .recommendation-source span { font-size: 10px; overflow-wrap: anywhere; }
.recommendation-source span { flex: 0 0 auto; color: var(--accent-dark); }
.recommendation-source small { display: block; margin-top: 3px; color: var(--muted); }
.recommendation-source-label { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; font-weight: 650; }
.recommendation-source p { margin: 5px 0 0; color: var(--text); font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.recommendation-plan-badge { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 5px 8px; border-radius: 6px; background: var(--accent-pale); color: var(--accent-dark); font-size: 11px; font-weight: 680; }
.recommendation-plan-block { padding: 15px 0; border-top: 1px solid var(--line); }
.recommendation-plan-block > h3,
.recommendation-plan-block > .recommendation-warning-heading { margin: 0 0 11px; }
.recommendation-plan-block > h3,
.recommendation-plan-block > .recommendation-warning-heading > h3 { font-size: 13px; font-weight: 700; }
.recommendation-resource-grid, .recommendation-group-grid, .recommendation-test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.recommendation-group-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.recommendation-resource-grid > div, .recommendation-group-grid > article, .recommendation-test-grid > article { min-width: 0; padding: 12px; border-radius: 7px; background: #f7f8fb; }
.recommendation-resource-grid h4, .recommendation-group-grid h4, .recommendation-test-grid h4 { margin: 0 0 8px; font-size: 12px; }
.recommendation-resource-grid > div > .recommendation-warning-heading { margin-bottom: 8px; }
.recommendation-resource-grid > div > .recommendation-warning-heading h4 { margin-bottom: 0; }
.recommendation-resource-grid dl { margin: 0; padding: 8px 0; }
.recommendation-resource-grid dl + dl { border-top: 1px solid var(--line); }
.recommendation-resource-grid dt { position: relative; display: flex; align-items: center; gap: 5px; color: var(--ink); font-size: 11px; font-weight: 700; }
.recommendation-resource-grid dd, .recommendation-resource-grid p, .recommendation-group-grid p, .recommendation-test-grid p { margin: 4px 0 0; color: var(--text); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.recommendation-resource-grid dd strong, .recommendation-group-grid p strong, .recommendation-test-grid p strong { color: var(--ink); }
.recommendation-group-grid > article > span { color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.recommendation-group-grid h4 { margin-top: 4px; }
.recommendation-group-grid > article > .recommendation-warning-heading { margin: 4px 0 8px; }
.recommendation-group-grid > article > .recommendation-warning-heading h4 { margin: 0; }
.recommendation-step-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.recommendation-step-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 11px 0; }
.recommendation-step-list li + li { border-top: 1px solid var(--line); }
.recommendation-step-list li > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: var(--accent-pale); color: var(--accent); font-size: 10px; font-weight: 750; }
.recommendation-step-list h4 { margin: 0; font-size: 12px; }
.recommendation-step-list p { margin: 4px 0 0; color: var(--text); font-size: 11px; line-height: 1.65; }
.recommendation-step-list p strong { color: var(--ink); }
.recommendation-decision-list { display: grid; gap: 7px; }
.recommendation-decision-list > div { display: grid; grid-template-columns: minmax(120px, .7fr) 22px minmax(0, 1.3fr); align-items: center; gap: 8px; padding: 10px 12px; border-radius: 7px; background: #f7f8fb; }
.recommendation-decision-list strong, .recommendation-decision-list p { font-size: 11px; line-height: 1.55; }
.recommendation-decision-list span { color: var(--accent); }
.recommendation-decision-list p { margin: 0; color: var(--text); }
.recommendation-plan-reason { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, .35fr); gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.recommendation-plan-reason > p { margin: 0; color: var(--text); font-size: 11px; line-height: 1.65; }
.recommendation-plan-reason > p strong { display: block; margin-bottom: 3px; color: var(--ink); }
.recommendation-plan-reason .recommendation-evidence { margin-top: 0; border-top: 0; }
.recommendations-missing h2 { margin: 0 0 10px; font-size: 14px; }
.recommendations-missing > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.recommendations-missing p { margin: 0; padding: 9px 11px; border-radius: 6px; background: #fff9e9; color: #755919; font-size: 11px; line-height: 1.55; }
.recommendations-toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; padding: 11px 16px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 13px; box-shadow: var(--popover-shadow); animation: recommendation-toast 3s forwards; }
.recommendations-heading-actions { display: flex; align-items: center; gap: 8px; }
.recommendation-history-backdrop { position: fixed; inset: 0; z-index: 400; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 22px; background: rgba(22, 32, 56, .48); animation: recommendation-history-backdrop-in .18s ease-out both; }
.recommendation-history-panel { display: flex; flex-direction: column; box-sizing: border-box; min-width: 0; width: min(1120px, 100%); max-height: min(92dvh, 1100px); border: 1px solid var(--line); border-radius: 12px; background: #f7f8fb; box-shadow: 0 24px 70px rgba(20, 32, 58, .22); overflow: hidden; animation: recommendation-history-panel-in .2s cubic-bezier(.2,.8,.2,1) both; }
.recommendation-history-backdrop.is-closing { animation: recommendation-history-backdrop-out .18s ease-in both; }
.recommendation-history-backdrop.is-closing .recommendation-history-panel { animation: recommendation-history-panel-out .18s ease-in both; }
@keyframes recommendation-history-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes recommendation-history-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes recommendation-history-panel-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes recommendation-history-panel-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes recommendation-history-content-in { from { opacity: 0; transform: translateX(9px); } to { opacity: 1; transform: translateX(0); } }
.recommendation-history-panel:focus { outline: none; }
.recommendation-history-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.recommendation-history-header > div { display: flex; flex: 1 1 auto; align-items: flex-start; gap: 12px; min-width: 0; }
.recommendation-history-heading { flex: 1 1 auto; min-width: 0; }
.recommendation-history-header span { color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.recommendation-history-header h2 { margin: 3px 0 0; color: var(--ink); font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.recommendation-history-header button, .recommendation-history-pagination button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--accent-dark); cursor: pointer; }
.recommendation-history-header button { flex: 0 0 34px; }
.recommendation-history-header button:hover, .recommendation-history-pagination button:hover:not(:disabled) { background: var(--accent-wash); }
.recommendation-history-error { margin: 12px 18px 0; padding: 10px 12px; border: 1px solid #efc4c1; border-radius: 7px; background: #fff5f4; color: var(--danger); font-size: 12px; }
.recommendation-history-list-view, .recommendation-history-detail { min-height: 0; overflow-y: auto; padding: 18px 20px 24px; animation: recommendation-history-content-in .18s ease-out both; }
.recommendation-history-search { display: grid; gap: 7px; }
.recommendation-history-search label { color: var(--text); font-size: 12px; font-weight: 650; }
.recommendation-history-search > div { display: flex; gap: 7px; }
.recommendation-history-search input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.recommendation-history-search button, .recommendation-history-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 13px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #fff; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.recommendation-history-state { margin: 18px 0; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 13px; text-align: center; }
.recommendation-history-list { display: grid; gap: 10px; margin-top: 15px; }
.recommendation-history-list > button { display: grid; justify-items: start; gap: 5px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.recommendation-history-list > button:hover { border-color: #aebcf0; background: #fbfcff; }
.recommendation-history-list span { color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.recommendation-history-list strong { font-size: 15px; }
.recommendation-history-list p { margin: 0; color: var(--text); font-size: 12px; line-height: 1.55; }
.recommendation-history-list small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.recommendation-history-owner { color: var(--ink); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.recommendation-history-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.recommendation-history-pagination > div, .recommendation-history-actions { display: flex; gap: 8px; }
.recommendation-history-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.recommendation-history-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.recommendation-history-detail-meta > strong { color: var(--ink); font-weight: 600; }
.recommendation-history-actions { margin: 14px 0; }
.recommendation-history-actions .is-danger { border-color: #efc4c1; background: #fff; color: var(--danger); }
.recommendation-history-requirement { margin-bottom: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.recommendation-history-requirement h3 { margin: 0 0 10px; font-size: 16px; }
.recommendation-history-requirement > p { margin: 0 0 12px; font-size: 13px; line-height: 1.6; }
.recommendation-history-requirement dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; margin: 0; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.55; }
.recommendation-history-requirement dt { color: var(--muted); }
.recommendation-history-requirement dd { margin: 0; color: var(--text); }
.recommendation-history-requirement > div { padding-top: 10px; border-top: 1px solid var(--line); }
.recommendation-history-requirement > div strong { font-size: 12px; }
.recommendation-history-requirement > div p { margin: 5px 0; color: var(--text); font-size: 12px; }
.recommendation-history-detail .recommendations-output { padding: 0; }
.recommendation-history-save-warning { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 12px 0; padding: 10px 12px; border: 1px solid #efdba2; border-radius: 7px; background: #fffaf0; color: #775816; font-size: 11px; }
.recommendation-history-save-warning button { margin-left: auto; padding: 5px 9px; border: 1px solid #dec986; border-radius: 6px; background: #fff; color: #775816; font: inherit; font-weight: 650; cursor: pointer; }
.recommendation-history-save-warning button:disabled { opacity: .5; cursor: not-allowed; }
.recommendations-enter { animation: recommendation-enter .28s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes recommendation-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes recommendation-loading { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@keyframes recommendation-toast { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 1180px) {
  .recommendations-workspace { grid-template-columns: minmax(300px, 350px) minmax(0, 1fr); }
  .recommendation-hypotheses, .recommendations-comparison-grid, .recommendation-resource-grid, .recommendation-group-grid, .recommendation-test-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .recommendations-page { padding: 18px 18px 96px; }
  .recommendations-mobile-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 10px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .recommendations-mobile-tabs button { position: relative; min-height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
  .recommendations-mobile-tabs button[aria-pressed="true"] { background: var(--accent-pale); color: var(--accent-dark); }
  .recommendations-mobile-tabs button span { position: absolute; top: 7px; right: calc(50% - 42px); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
  .recommendations-workspace { display: block; }
  .recommendations-conversation, .recommendations-results { display: none; }
  .recommendations-conversation.is-mobile-active, .recommendations-results.is-mobile-active { display: flex; }
  .recommendations-conversation { position: static; max-height: none; min-height: 560px; }
  .recommendations-results { flex-direction: column; }
}
@media (max-width: 600px) {
  .recommendations-page { padding: 15px 12px 92px; }
  .recommendations-heading { align-items: center; }
  .recommendations-heading h1 { font-size: 24px; }
  .recommendations-heading p { display: none; }
  .recommendations-conversation-scroll { padding: 14px; }
  .recommendations-placeholder { min-height: 430px; gap: 20px; padding: 22px 18px 28px; }
  .recommendations-placeholder-intro { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; padding-bottom: 20px; }
  .recommendations-placeholder ol { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .recommendations-placeholder li { grid-template-columns: 28px minmax(0, 1fr); align-items: center; padding-right: 0; }
  .recommendations-placeholder-deliverables > div { grid-template-columns: minmax(0, 1fr); }
  .recommendations-output { padding: 8px; gap: 8px; }
  .recommendations-section { padding: 14px; }
  .recommendations-result-toolbar { align-items: flex-start; }
  .recommendations-result-toolbar > button { padding-inline: 9px; }
  .recommendation-plan-reason, .recommendations-missing > div { grid-template-columns: minmax(0, 1fr); }
  .recommendation-decision-list > div { grid-template-columns: minmax(0, 1fr); }
  .recommendation-decision-list span { transform: rotate(90deg); }
  .recommendation-case dl > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .recommendations-heading-actions { gap: 5px; }
  .recommendations-heading-actions button { padding-inline: 8px; font-size: 11px; }
  .recommendation-history-backdrop { padding: 0; }
  .recommendation-history-panel { width: 100vw; max-width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .recommendation-history-header { padding: 13px 14px; }
  .recommendation-history-header h2 { font-size: 17px; }
  .recommendation-history-list-view, .recommendation-history-detail { padding: 14px 12px 90px; }
  .recommendation-history-requirement dl { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .recommendations-enter, .recommendations-processing i, .recommendations-toast, .recommendation-history-backdrop, .recommendation-history-panel, .recommendation-history-list-view, .recommendation-history-detail { animation: none !important; }
  .recommendations-heading button, .recommendations-primary, .recommendations-secondary, .recommendation-evidence-toggle, .recommendation-evidence-caret, .recommendation-evidence-body { transition: none; }
}
.reports-page { padding: 28px clamp(18px, 3vw, 42px) 48px; background: #f4f6f8; min-height: calc(100vh - 70px); color: #172033; }
.reports-page-header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.reports-page-header span { color: #8a6a15; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.reports-page-header h1 { margin: 5px 0 7px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; }
.reports-page-header p { margin: 0; color: #667085; }
.reports-library { background: #fff; border: 1px solid #e3e7ec; border-radius: 18px; box-shadow: 0 14px 34px rgba(32, 45, 64, .07); overflow: visible; }
.reports-toolbar { display: grid; grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(120px, .7fr)) repeat(2, minmax(145px, .8fr)); gap: 10px; padding: 18px; border-bottom: 1px solid #e8ebef; background: #fafbfc; }
.reports-toolbar input, .reports-toolbar select { width: 100%; min-height: 42px; border: 1px solid #d8dde4; border-radius: 10px; padding: 0 11px; background: #fff; color: #172033; font: inherit; box-sizing: border-box; }
.reports-toolbar { border-radius: 18px 18px 0 0; }
.reports-filter .menu-select-trigger { height: 42px; background: #fff; font-size: 14px; font-weight: 400; border-radius: 10px; }
.reports-filter .menu-select-popover { width: 100%; min-width: 0; box-sizing: border-box; }
.report-field-label { display: none; }
.reports-search { position: relative; display: flex; align-items: center; }
.reports-search svg { position: absolute; left: 12px; color: #6b7280; pointer-events: none; }
.reports-search input { padding-left: 39px; }
.reports-date { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; color: #667085; font-size: 13px; }
.reports-list-meta { padding: 12px 18px 0; color: #667085; font-size: 13px; }
.reports-table-wrap, .report-table-wrap { overflow: auto; }
.reports-table { width: 100%; min-width: 950px; border-collapse: collapse; }
.reports-table th { padding: 13px 16px; text-align: left; color: #667085; font-size: 12px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.reports-table td { padding: 15px 16px; border-bottom: 1px solid #edf0f3; vertical-align: middle; }
.reports-table td:first-child { min-width: 260px; }
.reports-table td strong, .reports-table td small { display: block; }
.reports-table td small { margin-top: 4px; color: #7b8493; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reports-table td em { display: inline-block; margin-top: 6px; padding: 2px 7px; border-radius: 999px; background: #f1f3f5; color: #5e6673; font-size: 11px; font-style: normal; }
.reports-pagination button { border: 1px solid #cfd5dc; border-radius: 9px; background: #fff; padding: 8px 12px; color: #23314a; font-weight: 700; cursor: pointer; }
.reports-table th:nth-last-child(2) { padding-left: 25px; }
.reports-table th:last-child { width: 1%; min-width: 176px; text-align: left; }
.reports-table td:last-child { width: 1%; white-space: nowrap; }
.reports-row-actions { display: flex; justify-content: flex-start; gap: 8px; }
.reports-row-action { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 9px; padding: 7px 11px; font: inherit; font-size: 13px; font-weight: 750; line-height: 1; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.reports-row-action.view { border-color: #cdd8e5; background: #f6f9fc; color: #23496f; }
.reports-row-action.view:hover { border-color: #9fb5ca; background: #edf4f9; box-shadow: 0 5px 14px rgba(35, 73, 111, .10); transform: translateY(-1px); }
.reports-row-action.delete { border-color: #ead0ce; background: #fffafa; color: #a23a34; }
.reports-row-action.delete:hover { border-color: #d9a5a1; background: #fff1f0; box-shadow: 0 5px 14px rgba(162, 58, 52, .09); transform: translateY(-1px); }
.reports-row-action:active { transform: translateY(0) scale(.98); }
.reports-row-action:focus-visible { outline: 3px solid rgba(49, 91, 134, .2); outline-offset: 2px; }
.reports-row-action:disabled { opacity: .45; cursor: default; box-shadow: none; transform: none; }
.report-status { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.report-status-queued { background: #eef2f7; color: #516072; }
.report-status-generating { background: #e8f1ff; color: #245eaa; }
.report-status-ready { background: #e7f6ed; color: #246b42; }
.report-status-confirmed { background: #e7f6ed; color: #246b42; }
.report-status-failed { background: #feeceb; color: #a53b32; }
.reports-empty, .report-loading, .report-failure { display: grid; place-items: center; gap: 8px; padding: 64px 20px; text-align: center; color: #667085; }
.reports-empty strong, .report-loading strong, .report-failure strong { color: #263246; font-size: 17px; }
.reports-empty p, .report-loading p, .report-failure p { margin: 0; }
.reports-pagination { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; }
.reports-pagination div { display: flex; gap: 8px; }
.reports-pagination button { display: inline-flex; align-items: center; gap: 5px; }
.reports-pagination button:disabled { opacity: .45; cursor: default; }
.report-error, .report-history-notice { margin: 12px 18px; padding: 10px 12px; border-radius: 10px; background: #fff1f0; color: #9f312a; }
.report-history-notice { background: #fff7dc; color: #7a5700; }
.report-drawer-layer { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: 1fr minmax(620px, 72vw); }
.report-drawer-backdrop { border: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); }
.report-drawer { min-width: 0; background: #eef1f4; box-shadow: -20px 0 60px rgba(15, 23, 42, .22); overflow: auto; }
.report-drawer > header { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid #e2e6ea; backdrop-filter: blur(12px); }
.report-drawer > header span { color: #8a6a15; font-size: 12px; font-weight: 800; }
.report-drawer > header h1 { margin: 4px 0; font-size: 22px; }
.report-drawer > header p { margin: 0; color: #687386; font-size: 13px; }
.report-drawer > header > button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: #f1f3f5; cursor: pointer; }
.report-drawer-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 24px; background: #fff; border-bottom: 1px solid #e2e6ea; }
.report-drawer-actions label { margin-right: auto; display: flex; gap: 8px; align-items: center; color: #4b5563; font-size: 13px; }
.report-drawer-actions button { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 9px; padding: 9px 14px; cursor: pointer; font-weight: 800; }
.report-drawer-actions button.primary { background: #17365d; color: #fff; }
.report-drawer-actions button:disabled { opacity: .5; cursor: default; }
.report-drawer-body { padding: 24px; }
.report-preview-sheet { width: min(860px, 100%); margin: 0 auto; padding: 58px clamp(26px, 6vw, 70px); box-sizing: border-box; background: #fff; box-shadow: 0 8px 28px rgba(35, 49, 70, .1); color: #202938; }
.report-preview-cover { text-align: center; padding: 30px 0 42px; border-bottom: 1px solid #d9d9d9; }
.report-preview-cover img { width: 150px; max-height: 105px; object-fit: contain; }
.report-preview-cover > p { margin: 15px 0 28px; font-weight: 800; }
.report-preview-cover h2 { margin: 0 0 30px; font-size: 28px; color: #000; }
.report-preview-cover dl { margin: auto; max-width: 570px; display: grid; gap: 0; border: 1px solid #d9d9d9; }
.report-preview-cover dl div { display: grid; grid-template-columns: 130px 1fr; border-bottom: 1px solid #d9d9d9; text-align: left; }
.report-preview-cover dl div:last-child { border-bottom: 0; }
.report-preview-cover dt, .report-preview-cover dd { margin: 0; padding: 10px 12px; }
.report-preview-cover dt { font-weight: 800; background: #dce6f1; }
.report-preview-sheet section { padding-top: 26px; }
.report-preview-sheet h3 { margin: 0 0 12px; color: #000; font-size: 18px; }
.report-preview-sheet h4 { color: #000; }
.report-preview-sheet ul { margin: 0; padding-left: 22px; line-height: 1.75; }
.report-preview-prose { color: #303a49; font-size: 14px; line-height: 1.9; }
.report-preview-prose p { margin: 0 0 12px; text-align: justify; }
.report-preview-sheet table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 12px; }
.report-preview-sheet th { background: #17365d; color: #fff; font-weight: 800; }
.report-preview-sheet th, .report-preview-sheet td { padding: 7px 8px; border: 1px solid #d9d9d9; text-align: left; vertical-align: top; }
.report-preview-block { margin-bottom: 18px; }
.report-data-appendix { margin-top: 38px; border-top: 2px solid #17365d; color: #303a49; }
.report-data-appendix > summary { display: grid; gap: 4px; padding: 18px 2px; cursor: pointer; list-style-position: inside; }
.report-data-appendix > summary strong { color: #111827; font-size: 17px; }
.report-data-appendix > summary span { padding-left: 22px; color: #6b7280; font-size: 12px; font-weight: 500; }
.report-data-appendix[open] > summary { border-bottom: 1px solid #d9d9d9; }
.report-data-appendix-body { padding-top: 4px; }
.report-data-appendix-body > section { padding-top: 24px; }
.report-internal-evidence { margin-top: 34px; border-top: 1px solid #d9d9d9; padding-top: 18px; color: #5f6978; }
.report-internal-evidence summary { cursor: pointer; font-weight: 800; }
.report-internal-evidence dl { display: flex; flex-wrap: wrap; gap: 12px; }
.report-internal-evidence dl div { padding: 8px 10px; background: #f5f6f8; border-radius: 8px; }
.report-internal-evidence dt, .report-internal-evidence dd { display: inline; margin: 0; }
.report-internal-evidence dt::after { content: "："; }
.report-internal-evidence ol { max-height: 300px; overflow: auto; padding-left: 24px; }
.report-internal-evidence li span { margin-left: 8px; font-size: 12px; }
.report-internal-evidence li p { margin: 4px 0 10px; }

.report-create-layer { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .5); backdrop-filter: blur(4px); }
.report-create-dialog { width: min(660px, 100%); max-height: min(780px, calc(100vh - 40px)); overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(15, 23, 42, .28); }
.report-create-dialog > header { display: flex; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; border-bottom: 1px solid #e5e7eb; }
.report-create-dialog > header span { color: #8a6a15; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.report-create-dialog > header h3 { margin: 5px 0 7px; color: #172033; font-size: 23px; }
.report-create-dialog > header p { margin: 0; color: #687386; font-size: 13px; line-height: 1.6; }
.report-create-dialog > header button { flex: 0 0 auto; width: 38px; height: 38px; border: 0; border-radius: 10px; background: #f2f4f7; color: #374151; cursor: pointer; }
.report-create-meta { margin: 0; padding: 19px 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; background: #f8fafc; border-bottom: 1px solid #e5e7eb; }
.report-create-meta div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; padding: 7px 0; font-size: 13px; }
.report-create-meta dt { color: #758094; }
.report-create-meta dd { margin: 0; color: #263246; font-weight: 700; overflow-wrap: anywhere; }
.report-create-options { margin: 22px 26px 14px; padding: 0; border: 0; }
.report-create-options legend { margin-bottom: 10px; color: #263246; font-size: 13px; font-weight: 800; }
.report-create-options label { display: flex; align-items: flex-start; gap: 12px; margin-top: 10px; padding: 15px 16px; border: 1px solid #d7dde5; border-radius: 12px; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.report-create-options label.selected { border-color: #315b86; background: #f2f7fc; box-shadow: 0 0 0 2px rgba(49, 91, 134, .08); }
.report-create-options input { margin-top: 3px; accent-color: #17365d; }
.report-create-options span { display: grid; gap: 4px; }
.report-create-options strong { color: #202b3d; }
.report-create-options small { color: #687386; line-height: 1.55; }
.report-create-note, .report-create-warning { margin: 0 26px 20px; padding: 11px 13px; border-radius: 10px; background: #eef4fa; color: #42546b; font-size: 12px; line-height: 1.6; }
.report-create-warning { margin-bottom: 10px; background: #fff3df; color: #805300; }
.report-create-dialog > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 26px 23px; border-top: 1px solid #edf0f3; }
.report-create-dialog > footer button { border: 1px solid #cfd5dc; border-radius: 9px; padding: 10px 17px; background: #fff; color: #344054; font-weight: 800; cursor: pointer; }
.report-create-dialog > footer button.primary { border-color: #17365d; background: #17365d; color: #fff; }
.report-create-dialog button:disabled { opacity: .5; cursor: default; }

@media (max-width: 1100px) {
  .reports-toolbar { grid-template-columns: 1.4fr repeat(2, 1fr); }
  .report-drawer-layer { grid-template-columns: 0 minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .app-main.reports-browser-main { animation: none; }
  .reports-page { padding: 18px 12px 96px; }
  .reports-toolbar { grid-template-columns: 1fr 1fr; padding: 12px; }
  .reports-search, .reports-toolbar > input { grid-column: 1 / -1; }
  .reports-toolbar > *, .reports-date input { min-width: 0; }
  .reports-filter .menu-select-trigger { height: 44px; }
  .reports-page .reports-table-wrap { overflow: visible; padding: 12px; }
  .reports-page .reports-table, .reports-page .reports-table tbody { display: block; width: 100%; min-width: 0; }
  .reports-page .reports-table thead { display: none; }
  .reports-page .reports-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 16px; border: 1px solid #e3e7ec; border-radius: 12px; }
  .reports-page .reports-table tr + tr { margin-top: 12px; }
  .reports-page .reports-table td { display: block; min-width: 0; width: auto; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
  .reports-page .reports-table .report-cell-title, .reports-page .reports-table .report-cell-created, .reports-page .reports-table .report-cell-actions { grid-column: 1 / -1; }
  .reports-page .reports-table .report-cell-title strong { font-size: 16px; }
  .reports-page .reports-table .report-cell-title small { max-width: none; white-space: normal; overflow: visible; }
  .reports-page .reports-table .report-field-label { display: block; margin-bottom: 3px; color: #7b8493; font-size: 12px; }
  .reports-page .reports-table .report-field-value { display: block; }
  .reports-page .reports-table .report-cell-status { grid-column: 2; grid-row: 3; }
  .reports-page .reports-table .report-cell-created { display: flex; flex-wrap: wrap; gap: 4px 10px; }
  .reports-page .reports-table .report-cell-created .report-field-label { margin: 0; align-self: center; }
  .reports-page .reports-table .report-cell-actions { padding-top: 12px; border-top: 1px solid #edf0f3; }
  .reports-page .reports-row-actions { justify-content: flex-end; flex-wrap: wrap; }
  .reports-page .reports-row-action { min-height: 44px; padding: 10px 16px; }
  .reports-page .reports-pagination { gap: 12px; padding: 12px; flex-wrap: wrap; }
  .reports-page .reports-pagination button { min-height: 44px; }
  .reports-page .reports-pagination div { margin-left: auto; }
  .report-drawer-layer { z-index: 150; }
  .report-drawer-body { padding: 8px; }
  .report-preview-sheet { padding: 30px 16px; }
  .report-preview-prose { font-size: 13px; line-height: 1.8; }
  .report-data-appendix > summary span { padding-left: 0; }
  .report-drawer-actions { align-items: stretch; flex-direction: column; }
  .report-drawer-actions label { margin: 0; }
  .report-drawer-actions button { justify-content: center; }
  .report-create-layer { align-items: end; padding: 0; }
  .report-create-dialog { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .report-create-dialog > header, .report-create-dialog > footer { padding-left: 18px; padding-right: 18px; }
  .report-create-meta { grid-template-columns: 1fr; padding-left: 18px; padding-right: 18px; }
  .report-create-options { margin-left: 18px; margin-right: 18px; }
  .report-create-note, .report-create-warning { margin-left: 18px; margin-right: 18px; }
}
.prompt-settings-page {
  min-width: 0;
  min-height: calc(100dvh - 76px);
  padding: 26px 28px 70px;
  background: var(--page-bg);
}
.prompt-settings-panel {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: var(--shadow);
}
.prompt-settings-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.prompt-settings-heading > div { display: grid; gap: 7px; }
.prompt-settings-heading span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 720;
}
.prompt-settings-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(23px, 2.4vw, 30px);
  letter-spacing: -0.02em;
}
.prompt-settings-heading > strong {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #cbd8e8;
  border-radius: 999px;
  background: #f2f6fb;
  color: #395675;
  font-size: 12px;
}
.prompt-settings-heading > strong[data-custom="true"] {
  border-color: #b8d9c6;
  background: #edf8f1;
  color: #237049;
}
.prompt-settings-intro {
  max-width: 760px;
  margin: 14px 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.prompt-fixed-rules {
  display: grid;
  grid-template-columns: minmax(210px, .7fr) minmax(0, 1.5fr);
  gap: 28px;
  padding: 24px;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  background: #f6f8fb;
}
.prompt-fixed-rules h2 { margin: 0 0 7px; color: var(--ink); font-size: 17px; }
.prompt-fixed-rules p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.prompt-fixed-rules ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.prompt-fixed-rules li { display: flex; align-items: flex-start; gap: 8px; color: #39465e; font-size: 12px; line-height: 1.55; }
.prompt-fixed-rules li svg { flex: 0 0 auto; margin-top: 1px; color: #54769b; }
.prompt-editor { display: grid; gap: 12px; margin-top: 28px; }
.prompt-editor > label { display: grid; gap: 6px; }
.prompt-editor > label strong { color: var(--ink); font-size: 16px; }
.prompt-editor > label span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.prompt-editor textarea {
  width: 100%;
  min-height: 500px;
  resize: vertical;
  padding: 18px 20px;
  border: 1px solid #bfc9d7;
  border-radius: 11px;
  outline: 0;
  background: #fff;
  color: #1c2941;
  font: 14px/1.85 "Microsoft YaHei", "PingFang SC", sans-serif;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.prompt-editor textarea:focus {
  border-color: rgba(0, 37, 148, .68);
  box-shadow: 0 0 0 4px rgba(0, 37, 148, .08);
}
.prompt-editor-skeleton {
  min-height: 500px;
  border: 1px solid #d9e0e9;
  border-radius: 11px;
  background: linear-gradient(110deg, #f1f4f8 30%, #f7f9fb 48%, #f1f4f8 66%);
}
.prompt-editor-meta { display: flex; justify-content: space-between; gap: 18px; color: #737e90; font-size: 11px; }
.prompt-settings-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid #f0d4d4;
  border-radius: 9px;
  background: var(--danger-pale);
  color: var(--danger);
  font-size: 12px;
}
.prompt-settings-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.prompt-settings-actions button {
  display: inline-flex;
  min-width: 150px;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 18px;
  border: 1px solid #c8d0dc;
  border-radius: 10px;
  background: #fff;
  color: #43516a;
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.prompt-settings-actions button:active:not(:disabled) { transform: translateY(1px); }
.prompt-settings-actions button:disabled { cursor: default; opacity: .52; }
.prompt-settings-actions .secondary-button:hover:not(:disabled) { border-color: #9fb7d4; background: var(--accent-wash); color: var(--accent-dark); }
.prompt-settings-actions .primary-button { border-color: var(--accent); background: var(--accent); color: #fff; }
.prompt-settings-actions .primary-button:hover:not(:disabled) { background: var(--accent-dark); }

@media (max-width: 820px) {
  .prompt-settings-page { padding: 16px 12px 92px; }
  .prompt-settings-panel { padding: 22px 17px; }
  .prompt-settings-heading { gap: 14px; }
  .prompt-fixed-rules { grid-template-columns: 1fr; gap: 17px; padding: 19px; }
  .prompt-fixed-rules ul { grid-template-columns: 1fr; }
  .prompt-editor textarea { min-height: 440px; padding: 15px; font-size: 13px; }
  .prompt-editor-meta { align-items: flex-start; flex-direction: column; gap: 5px; }
  .prompt-settings-actions { flex-direction: column-reverse; }
  .prompt-settings-actions button { width: 100%; }
}
/* Mobile-only layout. Desktop and tablet behavior remain owned by the existing styles. */
.mobile-more-trigger,
.mobile-more-layer,
.mobile-project-picker-backdrop,
.mobile-project-picker-heading,
.mobile-project-breadcrumb,
.breadcrumb-project-separator,
.summary-mobile-toggle,
.summary-field-toggle,
.record-mobile-details,
.record-mobile-more-trigger,
.record-mobile-actions-layer,
.sheet-mobile-toolbar,
.sheet-mobile-section-label { display: none; }
.record-modal-actions .record-mobile-more-trigger { display: none; }
.sheet-cell-preview { display: none; }
.sheet-mobile-preview-trigger { display: none; }
.sidebar .nav-link .mobile-nav-label { display: none; }
.native-analysis-mobile-open { display: none; }

/* The wrapper has no desktop box, so the existing project rail keeps its original layout. */
.mobile-project-picker-panel { display: contents; }

@media (max-width: 600px) {
  :root { --mobile-nav-height: calc(64px + env(safe-area-inset-bottom, 0px)); }
  @keyframes mobile-content-enter { from { opacity: .78; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
  .app-main { animation: mobile-page-enter .2s ease-out both; }
  @keyframes mobile-page-enter { from { opacity: .82; } to { opacity: 1; } }

  /* The bell is near the right edge: anchor its preview to the viewport, not the icon. */
  .notification-center .notification-panel {
    position: fixed;
    top: calc(var(--topbar-height) + 6px);
    right: 12px;
    left: 12px;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    max-height: calc(var(--app-viewport-height) - var(--topbar-height) - var(--mobile-nav-height) - 20px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: mobile-content-enter .2s ease-out;
  }
  .notification-panel .notification-item strong,
  .notification-panel .notification-item span { overflow-wrap: anywhere; }
  .notification-panel > header button { min-width: 44px; min-height: 44px; }

  /* Keep the project facts available without using a full card of screen space. */
  .summary-project:not(.mobile-expanded) { padding: 8px 14px; }
  .summary-project > .summary-heading { gap: 8px; margin-bottom: 12px; }
  .summary-project:not(.mobile-expanded) > .summary-heading { margin-bottom: 0; }
  .summary-project > .summary-heading h2 { min-width: 0; white-space: nowrap; }
  .summary-project > .summary-heading .summary-link { min-width: 48px; min-height: 48px; justify-content: center; }
  .summary-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 52px;
    min-height: 48px;
    margin-left: auto;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    font: inherit;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
  }
  .summary-project.mobile-expanded .summary-mobile-toggle svg { transform: rotate(180deg); }
  .summary-mobile-toggle svg { transition: transform .24s ease; }
  .summary-project-body {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows .28s ease, opacity .2s ease, visibility 0s linear .28s;
  }
  .summary-project-body-inner { display: block; min-height: 0; overflow: hidden; }
  .summary-project.mobile-expanded .summary-project-body {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    transition: grid-template-rows .3s cubic-bezier(.2,.7,.25,1), opacity .2s ease .04s, visibility 0s;
  }
  .summary-background { grid-template-columns: max-content minmax(0, 1fr); gap: 12px; }
  .summary-background h2 { font-size: 14px; white-space: nowrap; }

  /* Experiment purpose uses its natural height; long conclusions reveal their full text on demand. */
  .summary-fields > div { height: auto; min-height: 0; padding: 14px 16px; }
  .summary-fields dd { flex: none; min-height: 0; padding: 8px 0 0; overflow: visible; }
  .summary-field-conclusion .summary-field-content { overflow: hidden; transition: max-height .28s ease; }
  .summary-record-link, .summary-fields { animation: mobile-content-enter .2s ease-out; }
  .summary-field-toggle {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }

  /* Data chat: show every prompt and keep the composer controls on one row. */
  .ai-stage-nav { gap: 0; min-height: 48px; padding: 0 8px; overflow: visible; }
  .ai-stage-nav .ai-stage-tab { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 0 2px; font-size: 12px; text-align: center; }
  .ai-chat-toolbar { gap: 6px; padding-bottom: 10px; }
  .ai-chat-toolbar > div:first-child > span,
  .ai-chat-toolbar p { display: none; }
  .ai-chat-toolbar h3 { font-size: 18px; }
  .ai-chat-suggestions { padding: 12px 0 8px; }
  .ai-chat-suggestions > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0;
  }
  .experiment-ai-dialog .ai-chat-suggestions button {
    width: 100%;
    min-height: 48px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    line-height: 1.4;
  }
  .experiment-ai-dialog .ai-chat-suggestions button:last-child { grid-column: 1 / -1; }
  .ai-chat-conversation { gap: 16px; padding: 6px 0 18px; }
  .ai-chat-empty {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    justify-items: start;
    gap: 2px 12px;
    max-width: none;
    margin: 10px 0;
    padding: 14px;
    border: 1px solid #dce3ed;
    border-radius: 10px;
    background: #fff;
    text-align: left;
  }
  .ai-chat-empty > span { grid-column: 1; grid-row: 1 / 3; width: 36px; height: 36px; margin: 0; }
  .ai-chat-empty h4 { grid-column: 2; grid-row: 1; font-size: 15px; }
  .ai-chat-empty p { grid-column: 2; grid-row: 2; margin: 0; font-size: 12px; }
  .ai-chat-composer { gap: 6px; padding: 8px 12px calc(9px + env(safe-area-inset-bottom, 0px)); }
  .ai-chat-composer-main {
    grid-template-columns: 44px minmax(0, 1fr) 72px;
    grid-template-rows: auto;
    align-items: center;
    gap: 7px;
  }
  .ai-chat-composer textarea {
    grid-column: 2;
    grid-row: 1;
    min-height: 64px;
    height: 64px;
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.4;
  }
  .ai-chat-composer textarea::placeholder { font-size: 13px; }
  .experiment-ai-dialog .ai-chat-attach { grid-column: 1; grid-row: 1; width: 44px; min-height: 48px; }
  .ai-chat-composer-main > button:last-child { grid-column: 3; grid-row: 1; width: 72px; min-width: 72px; min-height: 48px; padding: 0 6px; }
  .experiment-ai-dialog .ai-chat-stop { min-width: 0 !important; }
  .ai-chat-composer small { font-size: 11px; line-height: 1.4; }

  /* Five stable primary destinations and one complete secondary menu. */
  .app-main { padding-bottom: var(--mobile-nav-height); }
  html.mobile-nav-more-open .app-main,
  html.mobile-project-picker-open .app-main { overflow: hidden; }
  .sidebar {
    inset: auto 0 0;
    display: block;
    width: 100%;
    height: var(--mobile-nav-height);
    min-height: 0;
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    overflow: visible;
  }
  .sidebar .primary-nav,
  .sidebar-collapsed .sidebar .primary-nav {
    display: grid;
    height: 64px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .sidebar .mobile-secondary-link,
  .sidebar .management-navigation { display: none; }
  .sidebar .mobile-primary-link,
  .sidebar-collapsed .sidebar .mobile-primary-link,
  .sidebar .mobile-more-trigger {
    display: flex;
    min-width: 0;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
  }
  .sidebar .mobile-primary-link .desktop-nav-label { display: none; }
  .sidebar .mobile-primary-link .mobile-nav-label { display: block; }
  .sidebar .nav-unread-badge { top: 2px; right: max(4px, 12%); }
  .mobile-more-layer {
    display: block;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .22s;
  }
  .mobile-more-layer[data-open="true"] { visibility: visible; pointer-events: auto; transition: visibility 0s; }
  .mobile-more-backdrop {
    position: fixed;
    inset: 0 0 var(--mobile-nav-height);
    z-index: 81;
    border: 0;
    background: rgba(11, 18, 32, .38);
    opacity: 0;
    transition: opacity .22s ease;
  }
  .mobile-more-panel {
    position: fixed;
    right: 10px;
    bottom: calc(var(--mobile-nav-height) + 10px);
    left: 10px;
    z-index: 82;
    max-height: min(68dvh, 540px);
    overflow: auto;
    padding: 8px;
    border: 1px solid #d9deea;
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 22px 60px rgba(11, 18, 32, .22);
    outline: none;
    opacity: 0;
    transform: translateY(14px) scale(.985);
    transform-origin: bottom center;
    transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1);
  }
  .mobile-more-layer[data-open="true"] .mobile-more-backdrop,
  .mobile-more-layer[data-open="true"] .mobile-more-panel { opacity: 1; }
  .mobile-more-layer[data-open="true"] .mobile-more-panel { transform: translateY(0) scale(1); }
  .mobile-more-panel > header,
  .record-mobile-actions-panel > header,
  .mobile-project-picker-heading {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    padding: 2px 6px 8px 10px;
  }
  .mobile-more-panel > header button,
  .record-mobile-actions-panel > header button,
  .mobile-project-picker-heading button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
  }
  .mobile-more-panel nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mobile-more-link {
    position: relative;
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
  }
  .mobile-more-link.active { background: var(--accent-pale); color: var(--accent-dark); font-weight: 650; }
  .mobile-more-link { transition: background-color .18s ease, color .18s ease; }
  .mobile-more-link i { margin-left: auto; padding: 2px 6px; border-radius: 10px; background: #dc4452; color: #fff; font-size: 10px; font-style: normal; }

  /* Dashboard: preserve content while moving useful work into the first viewport. */
  .dashboard-shortcuts, .dashboard-updates { display: none !important; }
  .dashboard-page { padding-top: 14px; }
  .dashboard-welcome { margin-bottom: 12px; }
  .dashboard-welcome h1 { margin-bottom: 2px; font-size: 22px; }
  .dashboard-welcome p { max-width: 30ch; font-size: 12px; line-height: 1.55; }
  .dashboard-refresh { min-width: 44px; min-height: 44px; }
  .dashboard-metrics { margin-bottom: 12px; gap: 8px; }
  .dashboard-metric { min-height: 88px; padding: 12px 14px; }
  .dashboard-metric > span { font-size: 12px; }
  .dashboard-metric > strong { margin-top: 10px; font-size: 25px; }
  .dashboard-review-tasks .notifications-empty { padding: 14px 16px; }
  .dashboard-review-tasks .notifications-content > header { min-height: 44px; padding-block: 10px; }
  .native-analysis-summary { position: relative; }
  .native-analysis-preview > button { display: none; }
  .native-analysis-mobile-open {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    cursor: pointer;
  }
  .native-analysis-mobile-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

  /* Keep record totals beside the page title instead of spending another row. */
  .experiment-collection-header {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 5px 8px;
    padding: 14px 12px;
  }
  .experiment-collection-header > div:first-child { display: contents; }
  .experiment-collection-header .collection-eyebrow { grid-column: 1 / -1; margin-bottom: 2px; }
  .experiment-collection-header h1 { grid-column: 1; grid-row: 2; font-size: 22px; white-space: nowrap; }
  .experiment-collection-header > div:first-child > p:last-child {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 3px 0 0;
  }
  .experiment-collection-header .experiment-metrics {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    flex-wrap: nowrap;
    gap: 2px;
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .experiment-collection-header .experiment-metrics > div {
    min-width: 0;
    height: auto;
    padding: 0 4px;
    background: transparent;
  }
  .experiment-collection-header .experiment-metrics strong { font-size: 16px; line-height: 1.1; }
  .experiment-collection-header .experiment-metrics span { margin-top: 2px; font-size: 10px; white-space: nowrap; }

  /* Product page actions stay readable while the count uses its own compact line. */
  .collection-header-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .collection-header-actions > button {
    min-width: 0;
    min-height: 44px;
    height: auto;
    justify-content: center;
    padding: 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  .collection-header-actions .collection-stat {
    grid-column: 1 / -1;
    min-width: 0;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 2px;
    border-left: 0;
  }
  .collection-header-actions .collection-stat strong { font-size: 20px; }
  .collection-header-actions .collection-stat span { margin: 0; }
  .product-workspace .detail-hero { display: block; min-height: 0; padding: 18px 16px; }
  .product-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
  }
  .product-hero-actions .source-badge { height: 32px; padding-inline: 8px; font-size: 11px; }
  .product-hero-actions .product-edit-trigger { min-height: 44px; padding: 0 10px; font-size: 12px; }

  /* The same mounted project rail opens below the breadcrumb on phones. */
  .workspace-directory {
    position: relative;
    z-index: 16;
    display: block;
    width: 100%;
    height: 0;
    overflow: visible;
    border: 0;
  }
  .workspace-directory.mobile-open { z-index: 49; }
  .project-workspace .breadcrumb > a,
  .project-workspace .breadcrumb > span[aria-hidden="true"]:not(.breadcrumb-project-separator),
  .project-workspace .breadcrumb > svg,
  .project-workspace .breadcrumb-detail { display: none; }
  .project-workspace .breadcrumb-project-separator { display: inline; flex: 0 0 auto; }
  .project-workspace .mobile-project-breadcrumb {
    display: inline-flex;
    min-width: 0;
    max-width: min(30vw, 140px);
    min-height: 44px;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--accent-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .mobile-project-breadcrumb span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-project-breadcrumb svg { flex: 0 0 auto; transform: rotate(90deg); transition: transform .2s ease; }
  .mobile-project-breadcrumb[aria-expanded="true"] svg { transform: rotate(-90deg); }
  .mobile-project-picker-backdrop {
    position: fixed;
    inset: 0 0 var(--mobile-nav-height);
    z-index: 115;
    display: block;
    border: 0;
    background: rgba(11, 18, 32, .28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s;
  }
  .mobile-project-picker-panel {
    position: fixed;
    top: calc(var(--topbar-height) + 6px);
    right: 12px;
    left: 12px;
    z-index: 116;
    display: flex;
    max-height: min(calc(100dvh - var(--topbar-height) - var(--mobile-nav-height) - 20px), 600px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #f8f9fb;
    box-shadow: 0 18px 45px rgba(11, 18, 32, .2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s cubic-bezier(.2,.8,.2,1), visibility .22s;
  }
  .mobile-project-picker-panel:focus { outline: none; }
  .workspace-directory.mobile-open .mobile-project-picker-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .workspace-directory.mobile-open .mobile-project-picker-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  @media (prefers-reduced-motion: reduce) {
    .mobile-project-picker-backdrop,
    .mobile-project-picker-panel,
    .mobile-project-breadcrumb svg { transition: none; }
  }
  .mobile-project-picker-heading { display: flex; flex: 0 0 auto; padding: 8px 10px 4px 18px; }
  .mobile-project-picker-panel .project-rail { display: flex; flex: 1; min-height: 0; padding: 4px 12px 16px; overflow: hidden; }
  .mobile-project-picker-panel .rail-title { padding: 0 4px 10px; }
  .mobile-project-picker-panel .rail-title > strong { display: none; }
  .mobile-project-picker-panel .rail-search { flex: 0 0 auto; margin-inline: 0; }
  .mobile-project-picker-panel .project-list { display: grid; flex: 1; overflow-y: auto; }
  .mobile-project-picker-panel .project-list-item { width: 100%; min-height: 62px; flex: initial; }
  .project-header { padding-top: 6px; }
  .project-tabs button { transition: color .18s ease, background-color .18s ease; }
  .project-tabs button::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    content: "";
    opacity: 0;
    transform: scaleX(.35);
    transition: opacity .2s ease, transform .22s ease;
  }
  .project-tabs button.active::after { opacity: 1; transform: scaleX(1); }
  .context-popover-panel:not([hidden]),
  .record-mobile-details[open] > :not(summary) { animation: mobile-content-enter .2s ease-out; }
  .project-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
    gap: 8px;
  }
  .project-heading-row > [data-page-entrance] {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 0 8px;
    width: 100%;
  }
  .project-title-line { grid-column: 1 / -1; align-items: flex-start; gap: 8px; }
  .project-title-line h1 {
    display: block;
    overflow: visible;
    font-size: 23px;
    line-height: 1.32;
  }
  .desktop-project-meta { display: none; }
  .project-actions {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    align-items: stretch;
    width: auto;
    margin: 0;
    padding-top: 0;
    gap: 8px;
  }
  .project-utility-actions { display: flex; justify-content: flex-end; gap: 6px; }
  .project-actions .right-rail { width: auto; gap: 6px; }
  .project-actions .project-trash-action,
  .project-actions .context-trigger {
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0;
  }
  .project-actions .context-trigger > span { display: none; }
  .project-actions .primary-action {
    width: 100%;
    min-height: 44px;
    height: 44px;
    padding: 0 8px;
    font-size: 12px;
    gap: 5px;
  }
  .summary-experiment .summary-heading { gap: 8px; margin-bottom: 10px; }
  .summary-record-link { gap: 5px; }

  /* Let long experiment names wrap in the round menu. */
  .summary-round-selector .menu-select-group-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* The record editor becomes a single-screen workspace on phones. */
  .record-modal-layer {
    inset: var(--record-viewport-offset-top, 0px) 0 auto;
    height: var(--record-viewport-height, var(--app-viewport-height));
    place-items: start stretch;
    padding: 0;
  }
  .experiment-record-modal {
    width: 100%;
    height: var(--record-viewport-height, var(--app-viewport-height));
    max-height: var(--record-viewport-height, var(--app-viewport-height));
    border: 0;
    border-radius: 0;
    contain: layout;
  }
  .record-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 9px 14px;
  }
  .record-modal-header > div:first-child > p,
  .record-modal-header > div:first-child > span { display: none; }
  .record-modal-header h2 {
    display: -webkit-box;
    margin-top: 2px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 17px;
    line-height: 1.3;
  }
  .record-weknora-status { margin: 6px 0 0; }
  .record-mobile-details { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
  .record-mobile-details summary { min-height: 26px; color: var(--accent-dark); cursor: pointer; }
  .record-mobile-details strong,
  .record-mobile-details span { display: block; margin-top: 5px; color: var(--text); line-height: 1.5; }
  .record-modal-actions { flex-wrap: nowrap; gap: 4px; }
  .record-modal-actions > button { min-width: 44px; height: 44px; }
  .record-modal-actions > button:not(.record-save-button):not(.record-mobile-more-trigger):not(.drawer-close-button) { display: none; }
  .record-modal-actions .record-save-button { min-width: 64px; padding-inline: 10px; font-size: 12px; }
  .record-modal-actions .record-mobile-more-trigger { display: grid; place-items: center; padding: 0; }
  .record-mobile-actions-layer {
    display: block;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .22s;
  }
  .record-mobile-actions-layer[data-open="true"] { visibility: visible; pointer-events: auto; transition: visibility 0s; }
  .record-mobile-actions-backdrop {
    position: fixed;
    inset: 0;
    z-index: 230;
    border: 0;
    background: rgba(11, 18, 32, .42);
    opacity: 0;
    transition: opacity .22s ease;
  }
  .record-mobile-actions-panel {
    position: fixed;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    z-index: 231;
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(11, 18, 32, .25);
    outline: none;
    opacity: 0;
    transform: translateY(14px) scale(.985);
    transform-origin: bottom center;
    transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1);
  }
  .record-mobile-actions-layer[data-open="true"] .record-mobile-actions-backdrop,
  .record-mobile-actions-layer[data-open="true"] .record-mobile-actions-panel { opacity: 1; }
  .record-mobile-actions-layer[data-open="true"] .record-mobile-actions-panel { transform: translateY(0) scale(1); }
  .record-mobile-actions-panel > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .record-mobile-actions-panel > div > button {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
  }
  .record-mobile-actions-panel > div > button.danger { color: var(--danger); border-color: #efd0d0; }
  .record-modal-meta { min-height: 44px; max-height: 68px; padding: 6px 10px; transition: max-height .22s ease, min-height .22s ease, padding .22s ease, opacity .18s ease, visibility 0s; }
  .record-modal-meta > span:nth-child(2) { display: none; }
  .record-modal-meta > b,
  .record-modal-meta > span:last-child { margin-left: auto; font-size: 10px; }
  .record-view-tabs {
    display: flex;
    gap: 0;
    min-height: 0;
    max-height: 54px;
    padding: 4px 4px 2px;
    overflow: hidden;
    transition: max-height .22s ease, padding .22s ease, opacity .18s ease, visibility 0s;
  }
  .record-view-tabs button {
    flex: 1 1 0;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 3px 1px;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
  }
  .record-view-tabs button > svg { width: 15px; height: 15px; flex: 0 0 auto; }
  .record-view-tabs button i {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 14px;
    height: 14px;
    padding: 0 2px;
    font-size: 8px;
  }
  .record-view-tabs button[aria-selected="true"]::after { right: 5px; left: 5px; }
  .record-view-tabs button::after {
    position: absolute;
    right: 5px;
    bottom: -1px;
    left: 5px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    content: "";
    opacity: 0;
    transform: scaleX(.35);
    transition: opacity .2s ease, transform .22s ease;
  }
  .record-view-tabs button[aria-selected="true"]::after { opacity: 1; transform: scaleX(1); }
  .record-overview { display: block; padding: 10px; overflow-y: auto; }
  .record-overview-layout { display: flex; min-height: 0; flex: none; flex-direction: column; gap: 10px; width: 100%; }
  .record-overview-layout > * { flex: 0 0 auto; }
  .record-overview-hero { min-height: 0; padding: 16px 14px; gap: 14px; }
  .record-overview-hero h3 { font-size: 21px; }
  .record-overview-objective { overflow: visible; }
  .record-overview-objective p,
  .record-preview-copy > p { height: auto; overflow: visible; }
  .record-overview-stats { padding-inline: 14px; }
  .record-overview-stats dl { display: block; }
  .record-overview-stats dl > div:nth-child(n) { min-height: 58px; padding: 8px 0; border-right: 0; border-bottom: 1px solid #e1e6ef; }
  .record-overview-stats dl > div:last-child { border-bottom: 0; }
  .record-overview-stats dt { flex: 1; }
  .record-overview-stats dd { max-width: 55%; overflow: visible; white-space: normal; overflow-wrap: anywhere; }
  .record-overview-grid { display: flex; flex-direction: column; gap: 10px; }
  .record-overview-grid > section { min-height: 0; flex: 0 0 auto; padding: 16px; }
  .record-preview-copy { min-height: auto; flex: none; margin-top: 12px; }
  .record-preview-copy > textarea { height: auto; min-height: 100px; }

  /* Long lists should grow with their records instead of keeping the desktop minimum height. */
  .experiment-record-list { min-height: 0; }
  .timeline-section,
  .experiment-series-list,
  .experiment-series,
  .experiment-series-header,
  .experiment-series-copy,
  .experiment-series .timeline,
  .experiment-series .timeline-list,
  .experiment-series .timeline-card { min-width: 0; max-width: 100%; width: 100%; }
  .experiment-series { overflow: hidden; }
  .experiment-series-header { display: grid; grid-template-columns: minmax(0, 1fr); width: auto; justify-self: stretch; }
  .experiment-series-copy h3 {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .experiment-series-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: auto; max-width: 100%; justify-self: stretch; }
  .experiment-series-actions > .experiment-badge { grid-column: 1 / -1; justify-self: start; }
  .experiment-series-actions > button { width: 100%; min-width: 0; min-height: 44px; padding: 6px 8px; font-size: 12px; line-height: 1.25; white-space: normal; }
  .experiment-series-actions > button:only-of-type { grid-column: 1 / -1; }

  /* Spreadsheet: the grid owns all remaining height; attachments live in their existing tab. */
  .experiment-record-modal[data-record-view="sheet"] .record-modal-header h2 { -webkit-line-clamp: 1; }
  .experiment-record-modal[data-record-view="sheet"] .record-mobile-details,
  .experiment-record-modal[data-record-view="sheet"] .record-weknora-status { display: none; }
  .record-modal-workspace { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); overflow: hidden; }
  .sheet-side-panel { display: none; }
  .sheet-editor-panel { height: 100%; min-height: 0; border-right: 0; }
  .sheet-mobile-toolbar {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr) 44px 44px auto auto;
    gap: 4px;
    align-items: center;
    min-height: 52px;
    padding: 4px 6px;
    border-bottom: 1px solid #d9dce5;
    background: var(--surface-soft);
  }
  .sheet-mobile-toolbar.is-readonly { grid-template-columns: minmax(0, 1fr) auto auto; }
  .sheet-mobile-toolbar > button { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; border: 1px solid #d4d9e4; border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: 11px; }
  .sheet-mobile-toolbar > button[aria-label="撤销"] svg { transform: rotate(180deg); }
  .sheet-mobile-toolbar > button.active { color: var(--accent-dark); border-color: #b7c1de; background: var(--accent-pale); }
  .sheet-mobile-toolbar .sheet-mobile-focus { color: var(--accent-dark); font-weight: 650; white-space: nowrap; }
  .sheet-toolbar {
    display: flex;
    min-height: 0;
    max-height: 0;
    padding-block: 0;
    border-bottom-width: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height .26s ease, padding .26s ease, opacity .18s ease, border-bottom-width .26s ease, visibility 0s linear .26s;
  }
  .sheet-toolbar.mobile-open {
    max-height: 34dvh;
    padding-block: 10px;
    border-bottom-width: 1px;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transition: max-height .26s ease, padding .26s ease, opacity .18s ease, border-bottom-width .26s ease, visibility 0s;
  }
  .sheet-selection-status { flex: 0 0 auto; align-items: center; gap: 4px 8px; min-height: 44px; padding: 2px 10px; font-size: 10px; }
  .sheet-selection-status .sheet-mobile-section-label { display: inline; color: var(--accent-dark); }
  .sheet-selection-status span { display: none; }
  .sheet-mobile-preview-trigger { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; margin-left: auto; padding: 0 8px; border: 0; background: transparent; color: var(--accent-dark); font: inherit; font-size: 11px; font-weight: 650; white-space: nowrap; }
  .experiment-record-modal.sheet-focus-mode .record-modal-meta,
  .experiment-record-modal.sheet-focus-mode .record-view-tabs {
    min-height: 0;
    max-height: 0;
    padding-block: 0;
    border: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height .22s ease, min-height .22s ease, padding .22s ease, opacity .18s ease, visibility 0s linear .22s;
  }
  .sheet-scroll { min-height: 0; padding: 8px 8px 28px; }
  .experiment-sheet { --sheet-row-gutter: 28px; }
  .sheet-cell textarea { font-size: 16px !important; }
  .sheet-cell-read-view { width: 100%; height: 100%; overflow: hidden; padding: 8px 9px; background: transparent; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 16px !important; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; user-select: none; -webkit-user-select: none; }
  .sheet-cell-preview {
    position: absolute;
    right: 12px;
    top: min(calc(74px + env(safe-area-inset-top, 0px)), 25%);
    left: 12px;
    z-index: 310;
    display: flex;
    max-height: min(48%, 360px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #cfd7e8;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 46px rgba(24, 38, 74, .22);
  }
  .sheet-cell-preview header { display: flex; min-height: 48px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px 4px 16px; border-bottom: 1px solid #e5eaf3; color: var(--accent-dark); }
  .sheet-cell-preview header strong { font-size: 13px; }
  .sheet-cell-preview header button { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--text); }
  .sheet-cell-preview-content { min-height: 0; overflow: auto; padding: 14px 16px 18px; color: #294455; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; user-select: text; -webkit-user-select: text; }
  .sheet-cell-preview { animation: mobile-content-enter .18s ease-out; }
  .ai-stage-nav .ai-stage-tab { transition: color .18s ease, background-color .18s ease; }
  .ai-stage-nav .ai-stage-tab::after { opacity: 0; transform: scaleX(.35); transition: opacity .2s ease, transform .22s ease; }
  .ai-stage-nav .ai-stage-tab[aria-pressed="true"]::after { opacity: 1; transform: scaleX(1); }
}

/* Below 481px the selector wraps under the title; anchor its menu to that left edge. */
@media (max-width: 480px) {
  .summary-round-selector .menu-select-popover {
    right: auto;
    left: 0;
    width: min(280px, calc(100vw - 60px));
  }
}

@media (max-width: 350px) {
  .ai-chat-composer textarea { min-height: 80px; height: 80px; }
  .product-hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-hero-actions .source-badge { grid-column: 1 / -1; justify-self: start; }
}
/* Scoped to the experiment browser; the record editor keeps its own layout. */
.experiment-browser-shell .experiment-record-list { display: flex; flex-direction: column; }
.experiment-browser-shell .record-list-header { flex-shrink: 0; }
.experiment-record-rows { min-height: 0; overflow: auto; flex: 1; }
.experiment-browser-shell .experiment-record-item { min-height: 100px; padding: 12px; grid-template-columns: 7px minmax(0, 1fr); gap: 9px; }
.experiment-browser-shell .experiment-record-copy > small { -webkit-line-clamp: 1; margin-top: 4px; }
.experiment-browser-shell .experiment-record-copy { line-height: 1.35; }
.experiment-browser-shell .experiment-record-copy > strong { margin-top: 3px; }
.experiment-browser-shell .record-footer { margin-top: 6px; padding-right: 74px; }
.experiment-browser-shell .experiment-record-item > time { position: absolute; right: 12px; bottom: 12px; font-size: 11px; }
.experiment-pagination { flex-shrink: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.experiment-pagination > div, .experiment-reading-toolbar > div { display: flex; align-items: center; gap: 8px; }
.experiment-pagination button, .experiment-reading-toolbar button { min-height: 32px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--accent-dark); cursor: pointer; font-size: 12px; white-space: nowrap; }
.experiment-pagination button:hover:not(:disabled), .experiment-reading-toolbar button:hover:not(:disabled) { background: var(--accent-wash); }
.experiment-pagination button:disabled, .experiment-reading-toolbar button:disabled { opacity: .45; cursor: default; }
.experiment-reading-panel { min-width: 0; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.experiment-reading-toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; }
.experiment-browser-shell .experiment-detail { height: auto; min-height: 0; max-height: none; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
.experiment-browser-shell .experiment-detail-hero { position: static; min-height: 0; padding: 16px; gap: 12px; }
.experiment-browser-shell .experiment-sheet-preview-scroll, .experiment-browser-shell .native-document-preview { max-height: none; }
.experiment-browser-shell .experiment-sheet-preview-scroll { overflow-x: auto; }
.experiment-browser-shell .native-document-paper { max-width: none; }
.experiment-browser-shell .source-document pre { max-height: none; overflow: visible; }
.experiment-browser-shell .experiment-browser { transform: none !important; }
.experiment-browser-shell.is-reading .experiment-collection-header,
.experiment-browser-shell.is-reading .experiment-toolbar,
.experiment-browser-shell.is-reading .experiment-record-list { display: none; }
.experiment-browser-shell.is-reading .experiment-browser-grid { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
@media (min-width: 601px) {
  .experiment-browser-shell .app-main { display: flex; flex-direction: column; overflow: hidden; }
  .experiment-browser-shell .topbar { flex-shrink: 0; }
  .experiment-browser-shell .collection-page { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-bottom: 0; }
  .experiment-browser-shell .experiment-collection-header { flex-shrink: 0; min-height: 0; padding: 12px 24px; align-items: center; }
  .experiment-browser-shell .experiment-collection-header .collection-eyebrow,
  .experiment-browser-shell .experiment-collection-header > div:first-child > p:last-child { display: none; }
  .experiment-browser-shell .experiment-collection-header h1 { font-size: 22px; }
  .experiment-browser-shell .experiment-metrics > div { height: 38px; min-width: 96px; flex-direction: row; gap: 6px; }
  .experiment-browser-shell .experiment-metrics strong { font-size: 18px; }
  .experiment-browser-shell .experiment-metrics span { margin: 0; }
  .experiment-browser-shell .experiment-browser { display: flex; flex: 1; min-height: 0; flex-direction: column; padding: 0 24px 16px; }
  .experiment-browser-shell .experiment-toolbar { flex-shrink: 0; min-height: 0; grid-template-columns: minmax(180px, 1fr) auto auto auto; padding: 8px 10px; gap: 8px; }
  .experiment-browser-shell .collection-search { min-height: 0; height: 36px; }
  .experiment-browser-shell .experiment-browser-grid { flex: 1; min-height: 0; grid-template-columns: minmax(280px, 30%) minmax(0, 1fr); align-items: stretch; gap: 14px; margin-top: 12px; }
  /* Reserve five compact rows and the header/footer, capped by the available height. */
  .experiment-browser-shell .experiment-record-list { height: min(100%, calc(5 * 120px + 96px)); min-height: 0; max-height: 100%; align-self: start; overflow: hidden; }
  .experiment-browser-shell.is-reading .experiment-browser-grid { grid-template-columns: minmax(0, 1fr); }
  .experiment-browser-shell.is-reading .experiment-browser { padding-top: 12px; }
}
@media (min-width: 601px) and (max-width: 1050px) {
  .experiment-browser-shell .experiment-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .experiment-browser-shell .experiment-browser { padding-right: 12px; padding-left: 12px; }
  .experiment-browser-shell .experiment-browser-grid { grid-template-columns: minmax(240px, 35%) minmax(0, 1fr); gap: 10px; }
  .experiment-browser-shell .experiment-detail-hero { flex-direction: column; }
}
@media (max-width: 600px) {
  .experiment-browser-shell .app-main { animation: none; }
  .experiment-browser-shell .topbar { min-height: 56px; height: 56px; }
  .experiment-browser-shell .topbar .command-search { display: none; }
  .experiment-browser-shell .experiment-collection-header { display: none; }
  .experiment-browser-shell .experiment-browser { padding: 12px; }
  .experiment-browser-shell .experiment-toolbar { padding: 10px; gap: 8px; }
  .experiment-browser-shell .collection-search { height: 42px; }
  .experiment-browser-shell .collection-search input { font-size: 14px; }
  .experiment-browser-shell .experiment-browser-grid { margin-top: 12px; grid-template-columns: minmax(0, 1fr); }
  .experiment-browser-shell .experiment-record-list { height: auto; min-height: 0; max-height: none; overflow: visible; }
  .experiment-browser-shell .experiment-record-item { padding-top: 8px; padding-bottom: 8px; }
  .experiment-browser-shell .experiment-record-copy > small { font-size: 13px; line-height: 1.4; }
  .experiment-browser-shell .experiment-record-rows { overflow: visible; flex: none; }
  .experiment-browser-shell .experiment-reading-panel { display: none; }
  .experiment-browser-shell.is-reading .app-main { animation: none; }
  .experiment-browser-shell.is-reading .experiment-reading-panel,
  .experiment-browser-shell .experiment-reading-panel[data-reading-exit] { display: block; position: fixed; z-index: 150; inset: 0; width: 100%; height: var(--app-viewport-height); border: 0; border-radius: 0; }
  .experiment-browser-shell .experiment-reading-panel[data-reading-exit] { pointer-events: none; }
  /* Keep the covered list's geometry so short phone screens retain their scroll position. */
  .experiment-browser-shell.is-reading .topbar { display: flex; visibility: hidden; }
  .experiment-browser-shell.is-reading .experiment-toolbar { display: grid; visibility: hidden; }
  .experiment-browser-shell.is-reading .experiment-record-list { display: flex; visibility: hidden; }
  .experiment-browser-shell.is-reading .experiment-browser-grid { margin-top: 12px; }
  .experiment-browser-shell .experiment-reading-toolbar { padding-top: max(8px, env(safe-area-inset-top)); flex-wrap: wrap; }
  .experiment-browser-shell .experiment-reading-toolbar button { min-height: 40px; }
  .experiment-browser-shell .experiment-reading-toolbar > div { gap: 6px; }
  .experiment-browser-shell .experiment-reading-toolbar > div > span { font-size: 11px; }
  .experiment-browser-shell .experiment-detail-hero { padding: 14px; }
  .experiment-browser-shell .native-experiment-overview { padding: 10px; }
}
/* Scoped configuration layout; task forms share service credentials. */
.ai-management-restart-notice { max-width: 1000px; margin: 0 auto 16px; padding: 12px 16px; border-radius: 8px; background: #eef2ff; color: #3c4e8a; font-size: 13px; line-height: 1.6; }
.ai-management-page { padding: 26px 28px 44px; }
.ai-management-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1220px; margin: 0 auto 24px; }
.ai-management-heading h1 { margin: 0 0 8px; font-size: 28px; }
.ai-management-heading p, .ai-management-heading > span { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.ai-management-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; max-width: 1220px; margin: auto; align-items: start; }
.ai-management-nav { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ai-management-nav > p { margin: 12px 10px 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.ai-management-nav > button { display: flex; align-items: center; gap: 10px; min-height: 46px; text-align: left; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; min-width: 0; }
.ai-management-nav > button > span { flex: 1; }
.ai-management-nav > button > small { max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.ai-management-nav > button:hover { background: var(--accent-wash); }
.ai-management-nav > button[aria-pressed="true"] { color: var(--accent-dark); border-color: #d2d8fb; background: var(--accent-pale); font-weight: 700; }
.ai-management-nav .ai-management-add { color: var(--accent-dark); }
.ai-management-nav > button:disabled { cursor: wait; opacity: .6; }
.ai-management-mobile-select { display: none; }
.ai-management-content { min-width: 0; display: grid; gap: 18px; }
.ai-management-page .ai-settings-card { max-width: none; margin: 0; padding: 28px; gap: 24px; overflow: visible; box-shadow: none; }
.ai-management-form-heading { display: flex; gap: 16px; justify-content: space-between; align-items: start; }
.ai-management-form-heading h2 { margin: 0 0 8px; font-size: 22px; }
.ai-management-form-heading p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 14px; }
.ai-management-unsaved { padding: 4px 8px; border-radius: 5px; color: #92610c; background: #fff7db; font-size: 12px; white-space: nowrap; }
.ai-management-fields { display: grid; gap: 24px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ai-management-fields .ai-field { min-width: 0; gap: 9px; }
.ai-management-fields input { height: 48px; font-size: 15px; }
.ai-management-fields .ai-secret-input button { top: 2px; right: 4px; }
.ai-management-fields .menu-select { width: 100%; }
.ai-management-page .menu-select-trigger { height: 48px; font-size: 15px; }
.ai-management-page .menu-select-popover { width: 100%; }
.ai-management-page .menu-select-option { height: auto; min-height: 46px; justify-content: initial; padding: 10px 12px; border: 0; border-radius: 6px; font-weight: 500; }
.ai-management-page .menu-select-option small { overflow-wrap: anywhere; }
.ai-management-page .menu-select-trigger { justify-content: space-between; }
.ai-management-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #f0f2f8; border-radius: 10px; padding: 4px; }
.ai-management-page .ai-management-mode button { border-color: transparent; background: transparent; padding: 0 10px; }
.ai-management-page .ai-management-mode button[aria-pressed="true"] { background: white; color: var(--accent-dark); border-color: #e3e6f1; box-shadow: 0 1px 3px #17233b0a; }
.ai-management-effective { display: grid; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; }
.ai-management-effective > span { color: var(--muted); font-size: 13px; }
.ai-management-effective > strong { font-size: 20px; overflow-wrap: anywhere; }
.ai-management-effective > p { margin: 0; color: var(--muted); }
.ai-management-page .ai-management-effective button { justify-self: start; padding: 0; border: 0; height: 36px; color: var(--accent-dark); background: transparent; }
.ai-management-page .ai-management-inline { justify-self: start; padding: 0; border: 0; background: transparent; height: 28px; color: var(--accent-dark); font-size: 13px; }
.ai-management-model-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.ai-management-page .ai-management-model-heading button { padding: 0; height: 28px; border: 0; color: var(--accent-dark); background: transparent; font-size: 13px; }
.ai-management-note { padding: 16px 18px; border-radius: 10px; border: 1px solid #e0e5ec; background: #f8fafc; font-size: 13px; }
.ai-management-note > strong { font-size: 14px; }
.ai-management-note p { margin: 8px 0 0; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.ai-management-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 20px; border-top: 1px solid var(--line); }
.ai-management-models > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-management-models ul { display: grid; margin: 12px 0 0; list-style: none; padding: 0; }
.ai-management-models li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ai-management-models li span { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.ai-management-models li small { font-size: 12px; color: var(--muted); }
.ai-management-models li b { font-size: 11px; font-weight: 500; padding: 4px 7px; border-radius: 5px; color: #40527a; background: #eef2fa; white-space: nowrap; }
.ai-management-models > p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.ai-management-result { display: flex; gap: 8px; align-items: center; padding: 12px; margin: 0; background: #eef7f2; color: #216b4d; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.ai-management-knowledge { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.ai-management-knowledge > svg { color: var(--muted); flex-shrink: 0; }
.ai-management-knowledge > div { flex: 1; min-width: 0; }
.ai-management-knowledge strong { font-size: 14px; }
.ai-management-knowledge p { margin: 6px 0 0; font-size: 12px; line-height: 1.65; color: var(--muted); }
.ai-management-knowledge a { display: inline-flex; align-items: center; font-size: 13px; color: var(--accent-dark); text-decoration: none; }
.ai-management-loading { color: var(--muted); text-align: center; padding: 40px; }
@media (max-width: 900px) {
  .ai-management-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
  .ai-management-nav > button { flex-wrap: wrap; gap: 5px; }
  .ai-management-page .ai-settings-card { padding: 22px; }
}
@media (max-width: 700px) {
  .ai-management-page { padding: 20px 14px 28px; }
  .ai-management-heading { align-items: start; margin-bottom: 18px; gap: 8px; }
  .ai-management-heading h1 { font-size: 24px; }
  .ai-management-heading > span { font-size: 11px; white-space: nowrap; padding-top: 6px; }
  .ai-management-heading p { font-size: 13px; }
  .ai-management-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ai-management-nav { display: none; }
  .ai-management-mobile-select { display: block; }
  .ai-management-page .ai-settings-card { padding: 20px 16px; gap: 20px; }
  .ai-management-form-heading h2 { font-size: 20px; }
  .ai-management-form-heading p { font-size: 13px; }
  .ai-management-fields { gap: 20px; }
  .ai-management-note { padding: 14px; }
  .ai-management-knowledge { flex-wrap: wrap; padding: 16px; }
  .ai-management-knowledge a { margin-left: 32px; }
  .ai-management-page .ai-management-mode button { font-size: 13px; }
  .ai-management-page .ai-management-actions button { min-height: 44px; }
}
