/* Liquid Glass is confined to the shell; assessment evidence stays on a clear surface. */
:root {
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-soft: #edf3ff;
  --teal: #0f766e;
  --teal-ink: #0b655e;
  --teal-soft: #eaf6f2;
  --ink: #1d2935;
  --muted: #596773;
  --canvas: #f7f9fb;
  --line: #dce5ec;
  --control: #8494a3;
  --glass: #f4f9fc;
  --glass-edge: #fff;
  --glass-shadow: 0 3px 16px #243b5310, inset 0 1px 0 #fff;
}
body {
  background: linear-gradient(125deg, #e5eefb 0%, #f2f6fa 44%, #e4f3ef 100%);
}
button { font-weight: 500; }
button:active:not(:disabled) { filter: brightness(.96); }
input, select { border-color: var(--control); }
input:disabled { background: var(--soft); color: var(--muted); }
.primary { box-shadow: inset 0 1px 0 #ffffff30, 0 2px 5px #2563eb18; }
.quiet { background: #ffffffa8; border-color: var(--line); }
.quiet:hover:not(:disabled) { background: #fff; border-color: var(--control); }
.new-assessment { background: var(--blue); color: #fff; box-shadow: inset 0 1px 0 #ffffff30; }
.new-assessment:hover:not(:disabled) { background: var(--blue-hover); color: #fff; }
.brand-mark { background: var(--blue); box-shadow: inset 0 1px 0 #ffffff40; }
.login-view { background: transparent; }
.login-panel { background: var(--glass); border-color: var(--glass-edge); box-shadow: var(--glass-shadow); }
.login-panel h1 { font-size: 28px; }
.login-panel small { font-size: 14px; }

.app-shell, .app-shell.history-collapsed {
  --rail: 176px;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  grid-template-rows: 72px auto minmax(0, 1fr);
  isolation: isolate;
}
.app-shell.history-collapsed { --rail: 76px; }
.topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  padding: 0 24px;
  background: var(--glass);
  background-image: linear-gradient(105deg, #ffffff80, #ffffff00 65%, #e4f5ef50);
  border-bottom: 1px solid #ffffffd9;
  box-shadow: 0 1px 0 #ccdbe570;
  z-index: 4;
}
.brand strong { font-size: 20px; }
.brand span:not(.brand-mark) { font-size: 13px; }
.brand-mark.small { width: 40px; height: 40px; }
.top-actions { gap: 8px; }
.account-label { padding: 0 8px; max-width: 140px; }
.assistant-toggle { color: var(--teal-ink); font-size: 14px; }
.assistant-toggle[aria-expanded="true"] { background: #e7f3ee; border-color: #98bdb5; }
.analysis-alert { grid-row: 2; z-index: 2; }
.workspace-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  grid-row: 3;
  grid-column: 1;
  gap: 8px;
  padding: 24px 12px 16px;
  background: transparent;
  border: 0;
  min-height: 0;
  overflow: auto;
}
.nav-caption { padding: 0 12px; margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.workspace-nav button {
  flex-shrink: 0;
  justify-content: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  text-align: left;
}
.workspace-nav button:hover:not(:disabled) { background: #ffffff80; border-color: #ffffffb0; }
.workspace-nav button[aria-current="page"],
.workspace-nav button[aria-current="page"]:hover:not(:disabled) {
  background: var(--glass);
  color: var(--blue);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  font-weight: 600;
}
.nav-count { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.nav-note { display: flex; gap: 8px; margin-top: auto; padding: 48px 8px 0; color: var(--muted); }
.nav-note > [data-icon] { align-self: flex-start; margin-top: 5px; color: var(--teal); }
.nav-note p { margin: 0; font-size: 12px; }
.nav-note small { display: block; font-size: 12px; }
.history-collapsed .nav-label, .history-collapsed .nav-count,
.history-collapsed .nav-caption, .history-collapsed .nav-note { display: none; }
.history-collapsed .workspace-nav button { justify-content: center; }
.workspace {
  grid-column: 2;
  grid-row: 3;
  margin: 12px 12px 12px 0;
  padding: 28px 32px 0;
  border: 1px solid #ffffff;
  border-radius: 8px;
  background: #ffffffed;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.workspace > * { max-width: 1400px; }
.workspace-footer { font-size: 12px; line-height: 1.7; }
.history-pane, .app-shell.history-collapsed .history-pane {
  display: flex;
  grid-column: 2 / -1;
  grid-row: 3;
  margin: 12px 12px 12px 0;
  padding: 28px 32px 16px;
  border: 1px solid #fff;
  border-radius: 8px;
  background: #ffffffed;
  overflow: auto;
}
.pane-heading { margin-bottom: 12px; align-items: flex-start; }
.pane-heading h1 { font-size: 24px; margin: 0 0 8px; }
.pane-heading p { font-size: 14px; }
.pane-heading .eyebrow { color: var(--teal); font-size: 13px; }
.history-filters { display: flex; gap: 16px; padding: 16px 0 24px; border-bottom: 1px solid var(--line); }
.history-filters label { display: grid; gap: 6px; font-size: 14px; width: min(300px, 50%); min-width: 0; }
.history-filters select { font-size: 16px; }
.history-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 8px 4px; margin: 0 -4px; }
.record-main { padding: 16px 16px 8px; }
.record-main strong { font-size: 16px; }
.record-main time, .record-main .source-tag { font-size: 13px; }
.record-score { font-size: 28px; }
.record-actions { padding: 0 8px 8px; }
.record-item { align-self: start; border-color: #cbd7e2; }
.record-item:hover { border-color: var(--control); }
.record-item.active { border-color: var(--blue); }
.history-footer { flex-shrink: 0; margin-top: 16px; }
.history-list > .empty-state { grid-column: 1 / -1; padding: 80px 16px; }

.assessment-modes {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 24px;
  padding: 4px;
  gap: 4px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: var(--glass);
  box-shadow: inset 0 1px 0 #fff;
}
.assessment-modes button { min-height: 44px; padding: 8px 20px; border-color: transparent; font-size: 14px; }
.assessment-modes button[aria-pressed="true"] {
  color: var(--blue);
  background: #fff;
  border-color: #d5e0ed;
  box-shadow: 0 2px 4px #243b530a;
}
.section-heading h1, .result-head h2 { font-size: 24px; }
.capture-band { padding-bottom: 24px; margin-bottom: 0; border-bottom: 0; }
.section-heading { margin-bottom: 20px; }
.onboarding-guide { margin-bottom: 20px; gap: 16px; }
.onboarding-guide li { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 16px; background: transparent; gap: 10px; }
.onboarding-guide li > span { width: 24px; height: 24px; flex-basis: 24px; background: var(--blue-soft); color: var(--blue); font-weight: 600; border: 1px solid #c0d5f9; }
.onboarding-guide small { font-size: 12px; }
.shooting-guide { display: block; background: transparent; border: 0; padding: 0; margin: 0 0 16px; }
.shooting-guide summary { color: var(--teal-ink); padding: 8px 0; font-weight: 500; }
.shooting-guide ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 0 16px 22px; }
.analysis-form { grid-template-columns: minmax(0, 1.5fr) minmax(220px, .8fr); align-items: start; gap: 20px 24px; }
.dropzone {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: center;
  gap: 12px;
  grid-row: span 3;
  min-height: 260px;
  padding: 24px;
  border: 1px dashed #879eb5;
  background: #f7fafe;
  border-radius: 8px;
  text-align: center;
}
.dropzone:has(.upload-thumbnail:not([hidden])) { grid-template-columns: 120px minmax(0, 1fr); text-align: left; align-content: center; justify-items: stretch; }
.upload-symbol { color: var(--blue); }
.upload-symbol .icon { width: 36px; height: 36px; }
.dropzone:has(.upload-thumbnail:not([hidden])) .upload-symbol { display: none; }
.upload-copy { width: 100%; gap: 6px; }
.upload-copy .field-label { font-size: 12px; color: var(--muted); }
.upload-copy strong { font-size: 16px; font-weight: 500; }
.upload-copy > span { font-size: 13px; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; justify-content: center; }
.upload-actions button { font-size: 14px; background: #fff; }
.upload-thumbnail { width: 120px; height: 164px; object-fit: contain; border-radius: 4px; }
.analysis-form > .primary { grid-column: 2; width: 100%; align-self: start; min-height: 48px; }
.analysis-form .field-error { grid-column: 1 / -1; }
.action-field { gap: 8px; padding-top: 8px; }
.action-field select { font-size: 16px; }
.demo-entry { padding: 16px 0; margin-top: 4px; font-size: 13px; gap: 16px; }
.demo-entry button { background: transparent; border: 1px solid #a5bfe6; }
.welcome-state { padding: 24px 0; border-top: 1px solid var(--line); }
.welcome-state .empty-icon { display: none; }
.welcome-state h2 { font-size: 14px; }
.capture-band.compact { padding: 0 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.capture-band.compact h1 { font-size: 16px; color: var(--muted); }
.capture-band.compact .section-heading { margin-bottom: 4px; }
.upload-summary { white-space: normal; overflow-wrap: anywhere; }
.result-head { align-items: center; margin-bottom: 16px; }
.result-head h2 { margin: 10px 0 4px; }
.score-block strong { font-size: 40px; }
.result-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; }
.result-shortcuts { gap: 8px; margin-bottom: 24px; }
.result-shortcuts button { min-height: 44px; font-size: 13px; }
.annotation-frame { height: clamp(320px, 54dvh, 620px); background: #f3f6f9; border-color: #dae3ec; }
.measurement-grid { background: #f5f8fb; }
.priority-item h4 { font-size: 16px; }
.result-section h3 { font-size: 18px; }
.badge { font-weight: 500; }
.metric-chips { gap: 8px 0; font-size: 13px; }
.metric-chips > span { padding: 0 12px; }
.metric-chips > span:first-child { padding-left: 0; }
.report-section { margin-top: 24px; padding-top: 20px; }

.assistant-pane {
  grid-row: 3;
  grid-column: 3;
  min-width: 0;
  min-height: 0;
  margin: 12px 12px 12px 0;
  border: 1px solid var(--glass-edge);
  border-radius: 8px;
  background: var(--glass);
  background-image: linear-gradient(160deg, #ffffff90, #ffffff00 40%, #e4f5ef45);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.chat-section { display: flex; flex-direction: column; height: 100%; padding: 20px 16px 12px; border: 0; min-height: 0; }
.agent-heading { margin-bottom: 4px; flex-shrink: 0; }
.agent-heading h2 { font-size: 18px; }
.agent-heading .eyebrow { font-size: 12px; }
.assistant-window-actions { display: flex; flex-shrink: 0; gap: 8px; }
#chat-context { margin: 8px 0 16px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.agent-capabilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 0; margin-bottom: 12px; flex-shrink: 0; }
.quick-questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; flex-shrink: 0; margin-bottom: 16px; }
.quick-questions button { font-size: 13px; padding: 8px; background: #ffffffd9; }
.assistant-empty { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 16px 8px 40px; color: var(--muted); }
.assistant-empty > [data-icon] { width: 44px; height: 44px; color: var(--teal); background: #e4f1ec; border-radius: 8px; }
.assistant-empty h3 { margin: 16px 0 4px; font-size: 16px; color: var(--ink); }
.assistant-empty p { margin: 0; font-size: 14px; }
.conversation { flex: 1; min-height: 80px; overflow: auto; overscroll-behavior: contain; align-content: start; gap: 16px; padding: 4px 4px 12px; margin: 0 -4px 12px; scrollbar-gutter: stable; }
.conversation:empty { display: none; }
.bubble { max-width: 100%; width: 100%; padding: 12px; font-size: 14px; line-height: 1.8; border-color: #dce6ec; background: #fffffff5; white-space: pre-wrap; }
.message.user .bubble { width: auto; max-width: 95%; }
.agent-evidence, .bubble .status-line { font-size: 13px; }
.agent-evidence summary { font-size: 13px; }
.tool-trace { gap: 4px; }
.tool-chip { border: 0; padding: 3px 6px; }
.agent-actions button, .suggested-questions button { min-height: 44px; }
.chat-bar { flex-shrink: 0; gap: 8px; padding-top: 12px; border-top: 1px solid #d2e0e7; }
.chat-bar input { font-size: 16px; background: #ffffffed; }
.chat-bar .icon-button { width: 46px; height: 46px; }
.assistant-footnote { margin: 10px 0 0; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.assistant-scrim { position: fixed; inset: 0; z-index: 19; border: 0; border-radius: 0; padding: 0; background: #152b454d; cursor: default; }
.comparison-selector { background: transparent; }
.comparison-pair { background: #f8fafc; padding: 0 16px; }

.video-workspace { margin-bottom: 24px; }
.video-options { padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.video-pair { gap: 24px; }
.video-column h2 { font-size: 16px; }
.video-column video, .video-replay { background: #172126; }
.video-phase-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.video-phase-list li { border: 0; border-top: 3px solid var(--teal); border-radius: 0; background: #f0f7f4; padding: 10px 8px; }
.video-phase-list li.missing { border-top-color: var(--orange); background: var(--orange-soft); }
.video-result-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.video-result-layout h3 { font-size: 18px; }
.keyframe-selector { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.keyframe-selector button { font-size: 13px; padding: 8px 12px; background: var(--soft); }
.keyframe-selector button[aria-pressed="true"] { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.video-keyframe { max-height: 340px; aspect-ratio: 4/5; object-fit: contain; background: var(--soft); margin-bottom: 0; }
.video-result-layout .priority-item { border: 0; padding-top: 0; }
.camera-active .workspace { grid-column: 2 / -1; }
.camera-active .video-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: #f9fcffb8; }
  .topbar, .assistant-pane, .login-panel {
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    backdrop-filter: blur(22px) saturate(130%);
  }
  .workspace-nav button[aria-current="page"], .assessment-modes {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
@media (min-width: 1280px) {
  .app-shell.assistant-open { grid-template-columns: var(--rail) minmax(0, 1fr) 344px; }
  .app-shell.assistant-open .workspace { padding: 24px; padding-bottom: 0; }
}
@media (min-width: 1280px) and (max-width: 1399px) {
  .assistant-open .result-layout, .assistant-open .video-result-layout { grid-template-columns: minmax(0, 1fr); }
  .assistant-open .video-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1280px) and (max-width: 1535px) {
  .assistant-open .analysis-form { grid-template-columns: minmax(0, 1fr) minmax(190px, .8fr); gap: 16px; }
  .assistant-open .onboarding-guide small { display: none; }
}
@media (max-width: 1279px) {
  .assistant-pane { position: fixed; inset: 12px 12px 12px auto; width: min(400px, calc(100% - 24px)); z-index: 20; margin: 0; background: #f6fafdf5; }
  .workspace { padding: 24px 24px 0; }
  .video-result-layout, .result-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .app-shell, .app-shell.history-collapsed { --rail: 152px; }
  .history-collapsed { --rail: 76px !important; }
  .workspace-nav { padding-left: 8px; padding-right: 8px; }
  .workspace-nav button { padding-left: 8px; padding-right: 8px; gap: 8px; }
  .result-layout, .video-result-layout { grid-template-columns: minmax(0, 1fr); }
  .onboarding-guide small { display: none; }
  .video-pair { gap: 16px; }
}
@media (max-width: 900px) {
  .app-shell, .app-shell.history-collapsed, .app-shell.assistant-open {
    --rail: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 68px auto minmax(0, 1fr) auto;
  }
  .topbar { padding: 0 16px; gap: 8px; }
  .brand strong { font-size: 18px; }
  .brand span:not(.brand-mark) { font-size: 12px; }
  .brand-mark.small { width: 36px; height: 36px; }
  .account-label, .desktop-toggle { display: none; }
  .workspace-nav { grid-column: 1; grid-row: 4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 12px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid #fff; background: var(--glass); overflow: visible; z-index: 5; }
  .workspace-nav button { justify-content: center; min-height: 48px; border-radius: 6px; padding: 8px; gap: 8px; text-align: center; }
  .workspace-nav button[aria-current="page"] { border-bottom: 1px solid #fff; }
  .workspace-nav .nav-caption, .workspace-nav .nav-note, .workspace-nav .nav-count { display: none; }
  .history-collapsed .nav-label { display: inline; }
  .analysis-alert { grid-row: 2; padding: 10px 16px; }
  .workspace, .history-pane, .app-shell.history-collapsed .history-pane {
    grid-column: 1;
    grid-row: 3;
    margin: 8px 8px 0;
    padding: 24px 20px 0;
    border-radius: 8px 8px 0 0;
  }
  .history-pane { padding-bottom: 12px; }
  .app-shell[data-view="history"] .workspace { display: none; }
  .camera-active .workspace { grid-column: 1; }
  .result-layout, .video-result-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .onboarding-guide small { display: none; }
  .video-pair, .camera-active .video-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .topbar { padding: 0 10px; }
  .brand { gap: 8px; }
  .brand-mark.small { width: 32px; height: 32px; font-size: 18px; }
  .brand strong { font-size: 17px; }
  .brand span:not(.brand-mark) { display: none; }
  .top-actions { gap: 4px; }
  .new-assessment { font-size: 13px; padding: 8px; gap: 4px; }
  .assistant-toggle { width: 44px; height: 44px; padding: 11px; }
  .assistant-toggle > span:last-child { display: none; }
  .workspace, .history-pane, .app-shell.history-collapsed .history-pane { padding: 20px 16px 0; }
  .workspace-nav { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .workspace-nav button { font-size: 13px; gap: 6px; }
  .workspace-nav .icon { width: 18px; height: 18px; flex-basis: 18px; }
  .assessment-modes { margin-bottom: 20px; }
  .assessment-modes button { padding: 8px 14px; }
  .section-heading h1, .result-head h2 { font-size: 22px; }
  .onboarding-guide { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .onboarding-guide li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 12px; }
  .onboarding-guide strong { font-size: 13px; }
  .shooting-guide ul { grid-template-columns: minmax(0, 1fr); }
  .analysis-form { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dropzone { grid-row: auto; min-height: 240px; padding: 20px 16px; }
  .upload-actions { flex-basis: auto; }
  .upload-actions #choose-image { flex: 0 1 auto; }
  .analysis-form > .primary { grid-column: 1; }
  .upload-thumbnail { width: 96px; height: 144px; }
  .dropzone:has(.upload-thumbnail:not([hidden])) { grid-template-columns: 96px minmax(0, 1fr); }
  .demo-entry { gap: 12px; }
  .demo-entry button { width: 100%; }
  .welcome-state { padding: 12px 0; }
  .result-layout, .video-result-layout, .video-pair, .camera-active .video-pair { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .result-head { align-items: flex-start; gap: 12px; }
  .score-block { max-width: 116px; padding-left: 12px; }
  .score-block strong { font-size: 36px; }
  .score-block small, .score-block span { font-size: 12px; }
  .annotation-frame { height: auto; min-height: 200px; }
  .annotation { height: auto; max-height: 70dvh; }
  .result-shortcuts button { flex: 1 1 auto; }
  .assistant-pane { inset: 8px; width: auto; }
  .chat-section { padding: 16px 16px max(12px, env(safe-area-inset-bottom)); }
  .bubble { max-width: 100%; font-size: 16px; }
  .history-filters { flex-direction: column; gap: 12px; }
  .history-filters label { width: 100%; }
  .history-list { grid-template-columns: minmax(0, 1fr); }
  .history-footer { padding-bottom: 8px; }
  .video-phase-list { display: flex; flex-wrap: wrap; }
  .video-phase-list li { flex: 1 1 80px; }
  .video-keyframe { max-height: 360px; }
}
@media (max-height: 600px) and (max-width: 1279px) {
  .assistant-pane { overflow: auto; }
  .chat-section { height: auto; min-height: 100%; }
  .conversation { min-height: 100px; max-height: 280px; flex: none; }
  .assistant-empty { padding: 16px 0; }
  .agent-heading { position: sticky; top: 0; z-index: 1; background: #f6fafc; }
}
.assistant-pane.is-expanded {
  position: fixed;
  inset: 24px;
  z-index: 20;
  width: min(1040px, calc(100% - 48px));
  height: calc(100dvh - 48px);
  margin: 0 auto;
  background-color: #f6fafdf5;
}
.assistant-pane.is-expanded .chat-section { padding: 24px 32px 16px; }
.assistant-pane.is-expanded .bubble { font-size: 16px; max-width: 78ch; }
.assistant-pane.is-expanded .message.user .bubble { max-width: min(90%, 64ch); }
@media (min-width: 701px) {
  .assistant-pane.is-expanded .agent-capabilities { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .assistant-pane.is-expanded .quick-questions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .assistant-pane.is-expanded { inset: 0; width: 100%; height: 100dvh; border-radius: 0; }
  .assistant-pane.is-expanded .chat-section {
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: #f6fafc; }
  .topbar, .assistant-pane, .login-panel, .assessment-modes, .workspace-nav button[aria-current="page"] {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-image: none;
  }
  .workspace, .history-pane, .app-shell.history-collapsed .history-pane { background: #fff; }
  .assistant-pane, .assistant-pane.is-expanded { background: #f6fafc; }
}
@media (forced-colors: active) {
  :root { --glass: Canvas; --glass-edge: CanvasText; --glass-shadow: none; }
  body, .workspace, .history-pane, .assistant-pane { background: Canvas; color: CanvasText; }
  .assistant-pane.is-expanded { background: Canvas; }
  .workspace-nav button[aria-current="page"], .assessment-modes button[aria-pressed="true"] { outline: 2px solid Highlight; }
  .topbar, .assistant-pane, .login-panel, .assessment-modes, .workspace-nav button { backdrop-filter: none; }
  .assistant-scrim { background: Canvas; opacity: .8; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
