html.workspace {
  --workspace-ready: 1;
  --bg: #1c1d21;
  --surface: #24262b;
  --sidebar-bg: #191a1e;
  --panel: #292b31;
  --panel2: #2d3036;
  --border: #383b43;
  --text: #f0f1f4;
  --muted: #a0a5b1;
  --danger: #c62828;
  --danger2: #ef7676;
  --brand-red: #fb233e;
  --brand-edge: color-mix(in srgb,var(--brand-red) 24%,var(--glass-border));
  --focus: #91b8f8;
  --shadow: 0 12px 40px rgba(0,0,0,.2);
  --control-shadow: 0 1px 2px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.025);
  --grid-line: rgba(151,170,202,.065);
  --grid-light: rgba(184,213,255,.28);
  --grid-glow: rgba(102,143,210,.075);
  --glass-fill: var(--surface);
  --glass-heavy: var(--surface);
  --glass-border: rgba(196,212,241,.16);
  --glass-filter: none;
  --glass-sheen: linear-gradient(135deg,rgba(255,255,255,.095),transparent 44%,rgba(139,180,246,.035));
  --glass-shadow: 0 12px 36px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.14), inset 0 -1px 0 rgba(0,0,0,.06);
  --glass-control: rgba(202,215,239,.075);
  --radius: 14px;
  --radius2: 20px;
  --sidebar-width: 272px;
  --sidebar-space: var(--sidebar-width);
  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease-spring: cubic-bezier(.2,.8,.2,1);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-brand: var(--font-sans);
  color-scheme: dark;
}
html.workspace.light {
  --bg: #faf9f7;
  --surface: #fff;
  --sidebar-bg: #f1f0ed;
  --panel: #f5f4f1;
  --panel2: #efefec;
  --border: #e3e3df;
  --text: #26272b;
  --muted: #676b75;
  --danger2: #c62828;
  --focus: #3877cf;
  --shadow: 0 12px 40px rgba(32,33,36,.09);
  --control-shadow: 0 1px 3px rgba(32,33,36,.045), inset 0 1px 0 rgba(255,255,255,.8);
  --grid-line: rgba(102,124,158,.065);
  --grid-light: rgba(88,138,206,.25);
  --grid-glow: rgba(127,172,231,.085);
  --glass-border: rgba(147,169,193,.42);
  --glass-sheen: linear-gradient(135deg,rgba(255,255,255,.90),rgba(255,255,255,.24) 24%,rgba(208,225,247,.08) 52%,rgba(169,194,224,.26));
  --glass-shadow: 0 14px 36px rgba(43,61,86,.11), 0 2px 6px rgba(43,61,86,.07), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(136,160,192,.24);
  --glass-control: rgba(225,235,247,.42);
  color-scheme: light;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html.workspace { --glass-fill: rgba(35,39,48,.62); --glass-heavy: rgba(28,32,40,.86); --glass-filter: blur(20px) saturate(145%); }
  html.workspace.light { --glass-fill: rgba(226,236,248,.48); --glass-heavy: rgba(236,242,250,.83); --glass-filter: blur(18px) saturate(160%); }
}
html.workspace.sidebar-collapsed { --sidebar-space: 0px; }
html.workspace, html.workspace body { touch-action: auto; }
html.workspace body { background: var(--bg); color: var(--text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; isolation: isolate; }
html.workspace body::before, html.workspace body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; background-position: center;
  background-size: 72px 72px; z-index: -2;
}
html.workspace body::before {
  background-image: linear-gradient(var(--grid-line) 1px,transparent 1px), linear-gradient(90deg,var(--grid-line) 1px,transparent 1px), radial-gradient(ellipse at 55% 38%,var(--grid-glow),transparent 72%);
  background-size: 72px 72px,72px 72px,100% 100%;
  -webkit-mask-image: radial-gradient(ellipse at center,#000 20%,transparent 82%);
  mask-image: radial-gradient(ellipse at center,#000 20%,transparent 82%);
}
html.workspace body::after {
  z-index: -1; opacity: 0;
  background-image: linear-gradient(var(--grid-light) 1px,transparent 1px), linear-gradient(90deg,var(--grid-light) 1px,transparent 1px);
  -webkit-mask-image: radial-gradient(ellipse at center,transparent 30%,#000 40%,transparent 50%,transparent 58%,rgba(0,0,0,.45) 65%,transparent 73%);
  mask-image: radial-gradient(ellipse at center,transparent 30%,#000 40%,transparent 50%,transparent 58%,rgba(0,0,0,.45) 65%,transparent 73%);
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: ambient-grid-ripple 18s linear -6s infinite;
}
@keyframes ambient-grid-ripple {
  0% { -webkit-mask-size: 20% 20%; mask-size: 20% 20%; opacity: 0; }
  15% { opacity: .32; }
  65% { opacity: .24; }
  100% { -webkit-mask-size: 240% 240%; mask-size: 240% 240%; opacity: 0; }
}
@supports not ((mask-image: radial-gradient(#000,transparent)) or (-webkit-mask-image: radial-gradient(#000,transparent))) {
  html.workspace body::after { display: none; }
}
html.workspace #pointerGrid {
  display: none; position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1;
  -webkit-mask-image: radial-gradient(ellipse at center,#000 20%,transparent 82%);
  mask-image: radial-gradient(ellipse at center,#000 20%,transparent 82%);
}
html.workspace.reactive-grid #pointerGrid { display: block; }
html.workspace.reactive-grid body::before { background-image: radial-gradient(ellipse at 55% 38%,var(--grid-glow),transparent 72%); background-size: 100% 100%; }
html.workspace.reactive-grid body::after { display: none; animation: none; }
html.workspace :is(button,input,select,textarea) { font-family: var(--font-sans); letter-spacing: -.01em; }
html.workspace button { cursor: pointer; font-weight: 500; -webkit-tap-highlight-color: transparent; }
html.workspace.ui-ready :is(button,summary,.sourcePill,.chatHistItem,.avatarMenuItem,.topbar .auth a) {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 180ms ease, scale 150ms var(--ease-spring);
}
html.workspace :is(button,summary):active:not(:disabled) { scale: .96; }
html.workspace button:disabled { cursor: default; }
html.workspace :is(button,a,input,textarea,select,summary,[tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
html.workspace [hidden] { display: none !important; }
html.workspace :is(#bgSpecks,.version,#logoSprite,.mobileHintText) { display: none !important; }
html.workspace .app, html.workspace .app:has(.sidebar.collapsed) {
  padding: 0; gap: 0; height: 100dvh; min-height: 100dvh;
  grid-template-columns: var(--sidebar-space) minmax(0,1fr); grid-template-rows: 60px minmax(0,1fr);
}
html.workspace.ui-ready .app { transition: grid-template-columns 280ms var(--ease-out); }
html.workspace .main { grid-column: 2; grid-row: 2; background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; min-width: 0; padding: 24px; }
html.workspace .topbar { grid-column: 2 / -1; padding: 0 24px; background: transparent; color: var(--text); border: 0; box-shadow: none; z-index: 40; }
html.workspace .topbar .brand { margin: 0; gap: 12px; font-family: var(--font-sans); font-size: 15px; font-weight: 600; letter-spacing: -.035em; }
html.workspace body:not(.chatStarted) #brandHomeLink { display: none !important; }
html.workspace .dotAU, html.workspace .topbar .dotAU { color: var(--brand-red); }
html.workspace .topbar .auth { gap: 8px; }
html.workspace .topbar .auth a { color: var(--muted); border: 1px solid transparent; border-radius: 10px; padding: 8px 12px; font-size: 12px; font-weight: 500; }
html.workspace .topbar .auth a:hover { color: var(--text); background: var(--panel2); }
html.workspace .topbar .auth a.primary { background: var(--text); color: var(--bg); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
html.workspace .topbar .avatarBtn { background-color: var(--panel2); color: var(--text); border: 1px solid var(--border); width: 34px; height: 34px; box-shadow: var(--control-shadow); font-weight: 500; }
html.workspace .avatarMenu { background: var(--surface); color: var(--text); border-color: var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; transform-origin: top right; animation: refined-menu-in 180ms var(--ease-out); }
html.workspace .avatarMenuItem { font-size: 13px; font-weight: 500; border-radius: 8px; padding: 10px 12px; }
html.workspace .avatarMenuItem:hover { background: var(--panel2); }
html.workspace .navBtn, html.workspace .sidebar .sidebarCollapseBtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 8px; border-radius: 9px; border: 0; color: var(--muted); background: transparent; transform: none; }
html.workspace .navBtn:hover, html.workspace .sidebarCollapseBtn:hover { color: var(--text); background: var(--panel2); }
html.workspace:not(.sidebar-collapsed) #sidebarToggle { display: none; }
html.workspace .workspaceIcon { display: inline-flex; width: 20px; height: 20px; flex: 0 0 auto; align-items: center; justify-content: center; }
html.workspace .workspaceIcon svg { width: 100%; height: 100%; }
html.workspace .sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); max-width: 88vw; padding: 13px 16px 16px;
  background: var(--sidebar-bg); border: 0; border-right: 1px solid color-mix(in srgb,var(--border) 65%,transparent);
  border-radius: 0; box-shadow: none; backdrop-filter: none; gap: 18px; z-index: 60; transform: translateX(0);
}
html.workspace .sidebar.card { background: var(--sidebar-bg); }
html.workspace.ui-ready .sidebar { transition: transform 280ms var(--ease-out), opacity 180ms ease, box-shadow 220ms ease; }
html.workspace .sidebar.collapsed, html.workspace.sidebar-collapsed .sidebar { transform: translateX(calc(-100% - 16px)); opacity: 0; pointer-events: none; }
html.workspace .sidebar.is-peeking, html.workspace .sidebar.open { transform: translateX(0); opacity: 1; pointer-events: auto; box-shadow: var(--shadow); }
html.workspace .sidebar.is-peeking { top: 8px; bottom: 8px; left: 8px; border: 1px solid var(--border); border-radius: 16px; }
html.workspace .sidebar .sidebarHdr { min-height: 34px; justify-content: space-between; }
html.workspace .sidebar .sectionTitle { display: block; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: .01em; margin: 0 8px; }
html.workspace .sidebar .sidebarBody { display: flex; gap: 18px; }
html.workspace .newChatBtn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 40px; background: var(--panel2); color: var(--text); border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 500; box-shadow: none; }
html.workspace .newChatBtn:hover { background: var(--surface); border-color: var(--border); box-shadow: var(--control-shadow); }
html.workspace .newChatBtn .workspaceIcon { width: 17px; height: 17px; }
html.workspace .chatHistSec { gap: 12px; margin: 0; }
html.workspace .chatHistList { gap: 3px; }
html.workspace .chatHistItem { font-size: 12px; padding: 9px 10px; border-radius: 8px; color: var(--muted); opacity: 1; min-height: 36px; }
html.workspace .chatHistItem:hover, html.workspace .chatHistItem.active { background: var(--panel2); color: var(--text); }
html.workspace .chatHistDel { width: 24px; height: 24px; color: var(--muted); opacity: .7; }
html.workspace .chatHistEmpty { color: var(--muted); opacity: 1; font-size: 12px; padding: 4px 10px; }
html.workspace .ctxToggleBtn { padding: 14px 8px 4px; border-color: var(--border); font-size: 12px; font-weight: 500; color: var(--muted); opacity: 1; text-transform: none; letter-spacing: 0; }
html.workspace #ctxBody { padding: 2px 8px; animation: refined-enter 200ms var(--ease-out); }
html.workspace .sidebarThemeRow { background: none; border: 0; padding: 4px 8px; }
html.workspace .sidebarThemeRow > span { color: var(--muted) !important; opacity: 1 !important; font-size: 12px !important; }
html.workspace .legal { color: var(--muted); font-size: 10.5px; line-height: 1.65; border-color: var(--border); padding: 16px 8px 0; }
html.workspace .legal b { font-weight: 500; }
html.workspace .usage { color: var(--muted); font-size: 11px; }
html.workspace .workspaceSwitch { color: var(--muted); font-size: 11px; font-weight: 400; text-decoration: none; padding: 8px; }
html.workspace .workspaceSwitch:hover { color: var(--text); }
html.workspace .sidebarBillingRow { border: 0; background: none; padding: 4px 8px; }
html.workspace .sidebarBillingRow a { color: var(--muted); font-size: 12px; font-weight: 500; text-decoration: none; }
html.workspace .workspaceTools { position: relative; font-size: 12px; }
html.workspace .workspaceTools summary { cursor: pointer; color: var(--muted); padding: 9px 12px; border-radius: 9px; }
html.workspace .workspaceTools summary:hover { background: var(--panel2); color: var(--text); }
html.workspace .workspaceToolMenu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); z-index: 70; transform-origin: top right; }
html.workspace .workspaceTools[open] .workspaceToolMenu { animation: refined-menu-in 180ms var(--ease-out); }
html.workspace .workspaceToolMenu a { display: block; }
html.workspace body:not(.chatStarted):not(.auditReviewOpen) .main { justify-content: center; overflow-y: auto; }
html.workspace body:not(.chatStarted) .chat { display: none; }
html.workspace body:not(.chatStarted):not(.auditReviewOpen) .composerShell {
  position: relative; inset: auto; transform: none; width: 100%; max-width: 760px; margin: auto; padding: 24px 0; flex-shrink: 0;
}
html.workspace .composerShell > .landing { height: auto; display: flex; gap: 16px; padding: 0 0 32px; opacity: 1; pointer-events: auto; animation: refined-enter 480ms var(--ease-out); }
html.workspace .landingLogo { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-sans); font-size: 38px; line-height: 1.2; letter-spacing: -.06em; font-weight: 600; color: var(--text); text-shadow: none; }
html.workspace .landingSub { color: var(--muted); font-family: var(--font-sans); font-size: 14px; font-weight: 400; line-height: 1.6; min-height: 0; padding: 0; letter-spacing: -.015em; }
html.workspace .composer {
  width: 100%; min-width: 0; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 28px;
  padding: 10px 12px 10px 20px; box-shadow: var(--control-shadow); backdrop-filter: none; overflow: visible;
  transition: border-color 200ms ease, box-shadow 220ms ease, border-radius 220ms var(--ease-out), background-color 200ms ease;
}
html.workspace .composer:focus-within { border-color: color-mix(in srgb,var(--muted) 65%,var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb,var(--muted) 7%,transparent), var(--control-shadow); }
html.workspace .composer.expanded { border-radius: 22px; }
html.workspace .composerRow { gap: 10px; width: 100%; align-items: center; }
html.workspace .composer textarea { color: var(--text); font-family: var(--font-sans); font-size: 15px; font-weight: 400; line-height: 1.6; max-height: 220px; padding: 0; }
html.workspace .composer textarea::placeholder { color: var(--muted); }
html.workspace .composer textarea:focus-visible { outline: none; }
html.workspace .composer-actions { display: flex; align-items: center; gap: 4px; }
html.workspace .uploadStack { position: static; display: flex; flex-direction: row; align-items: center; gap: 4px; }
html.workspace :is(#plansBtn,#cameraBtn,#askBtn) > :not(.workspaceIcon) { display: none !important; }
html.workspace .iconBtn { width: 36px; height: 36px; min-width: 36px; padding: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 50%; box-shadow: none; }
html.workspace .iconBtn .workspaceIcon { width: 19px; height: 19px; }
html.workspace .iconBtn:hover { background: var(--panel2); color: var(--text); }
html.workspace .sendBtn { background: var(--text); color: var(--bg); margin-left: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
html.workspace .sendBtn:hover { background: var(--text); color: var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
html.workspace .sendBtn:disabled { opacity: .4; }
html.workspace.light .sendBtn { background: var(--glass-sheen) var(--glass-control); border-color: var(--glass-border); color: var(--brand-red); box-shadow: var(--control-shadow); }
html.workspace.light .sendBtn:hover { background-color: color-mix(in srgb,var(--glass-control),var(--surface) 30%); border-color: var(--brand-edge); }
html.workspace .composer .leftLoad { min-width: 20px; width: 20px; }
html.workspace .modeToggle { display: grid; grid-template-columns: 1fr 1fr; position: relative; isolation: isolate; width: 244px; margin: 14px auto 0; padding: 4px; gap: 0; border: 1px solid var(--border); border-radius: 999px; background: var(--panel2); backdrop-filter: none; pointer-events: auto; }
html.workspace .modeToggle::before { content: ""; position: absolute; z-index: 0; top: 4px; left: 4px; height: calc(100% - 8px); width: calc((100% - 8px)/2); background: var(--surface); border-radius: 999px; box-shadow: var(--control-shadow); transition: transform 240ms var(--ease-spring); }
html.workspace .modeToggle:has([data-mode="audit"].on)::before { transform: translateX(100%); }
html.workspace .modeBtn { position: relative; z-index: 1; justify-content: center; min-height: 30px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; background: transparent; }
html.workspace .modeBtn.on { color: var(--text); background: transparent; }
html.workspace .modeBtn:hover { color: var(--text); }
html.workspace body.chatStarted .composerShell { max-width: 820px; width: calc(100% - 48px); bottom: 20px; }
html.workspace .chat { padding: 12px 0 calc(var(--composerPad,160px)); }
html.workspace .bubbleRow { max-width: 760px; margin: 24px auto; animation: refined-enter 260ms var(--ease-out); }
html.workspace .bubble { box-shadow: none; }
html.workspace .bubble.assistant { border: 0; border-radius: 0; background: transparent; padding: 0; width: 100%; }
html.workspace .bubble.user { border: 1px solid var(--border); background: var(--panel2); border-radius: 16px; padding: 12px 16px; }
html.workspace .bubbleInner { font-size: 15px; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; }
html.workspace .bubbleInner :is(h2,h3) { font-weight: 600; letter-spacing: -.025em; margin-top: 24px; }
html.workspace .bubbleHeader, html.workspace .bubbleHeader .who { color: var(--muted); font-weight: 500; }
html.workspace .bubbleInner a { color: var(--focus); text-underline-offset: 3px; }
html.workspace :is(.field input,.field select,.field textarea,.state-select,.planField input,.planField select,.auditSearch,.auditPdfSearch) { background-color: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--control-shadow); font-family: var(--font-sans); font-size: 13px; min-height: 38px; transition: border-color 180ms ease, box-shadow 180ms ease; }
html.workspace :is(.field input,.field select,.field textarea,.auditSearch,.auditPdfSearch):focus { border-color: var(--focus); }
html.workspace .state-select { width: 100%; }
html.workspace .field label, html.workspace .planField label { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
html.workspace :is(.modalBtn,.googleAuthBtn,.shareBtn,.feedbackBtn,.pdfShareBtn,.pdfGateBtn,.auditRunBtn,.auditBackBtn,.afAskBtn,.afResolveBtn,.afEmailBtn,.afDismissAllBtn) { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; min-height: 34px; font-family: var(--font-sans); font-size: 12px; font-weight: 500; box-shadow: var(--control-shadow); opacity: 1; }
html.workspace :is(.modalBtn,.googleAuthBtn,.shareBtn,.feedbackBtn,.pdfShareBtn,.pdfGateBtn,.auditRunBtn,.auditBackBtn,.afAskBtn,.afResolveBtn,.afEmailBtn,.afDismissAllBtn):hover { background: var(--panel2); border-color: color-mix(in srgb,var(--muted) 45%,var(--border)); }
html.workspace .modalBtn.primary, html.workspace .afLockedBtn { background: var(--text); color: var(--bg); border-color: transparent; border-radius: 10px; }
html.workspace :is(.modalClose,.pdfPanelClose,.auditHlBtn,.attachRemove,.pdfSearchClear) { border-color: var(--border); border-radius: 8px; background: transparent; color: var(--muted); min-width: 30px; min-height: 30px; }
html.workspace :is(.modalClose,.pdfPanelClose,.auditHlBtn,.attachRemove,.pdfSearchClear):hover { background: var(--panel2); color: var(--text); }
html.workspace :is(.modalCard,.planCard,.companyCard) { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
html.workspace .modalCard { animation: refined-menu-in 220ms var(--ease-out); }
html.workspace .modalHeader { border-color: var(--border); padding: 18px 20px; }
html.workspace .modalTitle { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
html.workspace :is(.modalHint,.hint,.sourcesLabel) { color: var(--muted); }
html.workspace :is(.sourceChip,.sourcePill,.sourceBtn,.pill,.attachBadge) { font-family: var(--font-sans); font-weight: 500; border-color: var(--border); background: var(--panel); color: var(--muted); border-radius: 8px; }
html.workspace .sourceChip:hover { background: var(--panel2); color: var(--text); }
html.workspace .sourcesLabel { font-size: 11px; font-weight: 500; letter-spacing: .02em; border-color: var(--border); }
html.workspace .attachPreview { background: var(--panel); border-color: var(--border); border-radius: 12px; }
html.workspace .themeToggle { width: 46px; height: 28px; padding: 0; background: var(--panel2); border: 1px solid var(--border); box-shadow: inset 0 1px 3px rgba(0,0,0,.07); margin: 0; overflow: visible; }
html.workspace .themeToggle::after { content: ""; position: absolute; inset: -8px 0; }
html.workspace .themeToggle-thumb { top: 3px; left: 3px; width: 20px; height: 20px; background: #f4f4f5; background-image: none; box-shadow: 0 1px 4px rgba(0,0,0,.16); transition: transform 240ms var(--ease-spring), background-color 180ms ease; }
html.workspace.light .themeToggle-thumb { transform: translateX(18px); background: #fff; background-image: none; }
html.workspace.light .themeToggle { background: #747b87; border-color: transparent; }
html.workspace .themeToggle-icon { width: 11px; height: 11px; }
html.workspace .themeToggle-moon { right: 5px; color: var(--muted); }
html.workspace :is(.switchToggle,.field input.switchToggle) { width: 40px; height: 24px; min-height: 24px; padding: 0; border: 0; border-radius: 999px; background: var(--panel2); box-shadow: inset 0 1px 3px rgba(0,0,0,.08); }
html.workspace .switchToggle::before { width: 18px; height: 18px; top: 3px; left: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform 240ms var(--ease-spring); }
html.workspace :is(.switchToggle,.field input.switchToggle):checked { background: #3877cf; }
html.workspace .switchToggle:checked::before { transform: translateX(16px); }
html.workspace .pdfPanel { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px 0 0 16px; box-shadow: none; }
html.workspace .pdfPanelHeader { padding: 14px; border-color: var(--border); }
html.workspace .pdfPanelTitle { color: var(--text); font-size: 13px; font-weight: 500; }
html.workspace body.auditMode .chat, html.workspace body.auditMode #landing { display: none; }
html.workspace body.auditMode:not(.auditReviewOpen) .main { overflow-y: auto; justify-content: center; }
html.workspace body.auditMode:not(.auditReviewOpen) .composerShell { position: relative; inset: auto; transform: none; width: 100%; max-width: 820px; margin: auto; padding: 24px 0; flex-shrink: 0; }
html.workspace .auditPanel { background: var(--surface); border-color: var(--border); border-radius: 20px; padding: 20px; box-shadow: var(--control-shadow); backdrop-filter: none; }
html.workspace .auditDrop { background: var(--panel); border: 1px dashed var(--border); border-radius: 14px; padding: 28px 16px; }
html.workspace .auditDrop:hover, html.workspace .auditDrop.drag { background: var(--panel2); border-color: var(--muted); box-shadow: none; }
html.workspace .auditDropIcon { color: var(--muted); background: var(--surface); border-radius: 12px; }
html.workspace .auditDropTitle { font-size: 15px; font-weight: 500; letter-spacing: -.02em; }
html.workspace .auditDropSub { font-size: 12px; color: var(--muted); opacity: 1; }
html.workspace .auditDropHintPill { color: var(--muted); background: transparent; border-color: var(--border); font-size: 10px; font-weight: 500; opacity: 1; }
html.workspace .auditConsent { color: var(--muted); font-size: 12px; line-height: 1.6; opacity: 1; }
html.workspace .auditItem { background: var(--panel); border-color: var(--border); border-radius: 12px; }
html.workspace .auditItem.clickable:hover { background: var(--panel2); border-color: var(--muted); }
html.workspace .auditPill { font-size: 10px; font-weight: 500; letter-spacing: 0; }
html.workspace .auditNotesBody { background: var(--bg); padding: 14px; gap: 10px; }
html.workspace .afItem { background: var(--surface); border-color: var(--border); border-radius: 12px; padding: 12px; line-height: 1.6; }
html.workspace .afItem.active { border-color: var(--focus); }
html.workspace .afHead { flex-wrap: wrap; }
html.workspace .afViewToggle { background: var(--panel2); border-color: var(--border); padding: 3px; }
html.workspace .afViewBtn { font-size: 11px; font-weight: 500; min-height: 28px; }
html.workspace .afViewBtn.on { background: var(--surface); color: var(--text); box-shadow: var(--control-shadow); }
html.workspace .afToolbar { border-color: var(--border); }
html.workspace .afCompleteTitle { font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; animation: none; }
html.workspace .auditProgressFill { background: var(--muted); transition: width 400ms var(--ease-out); }
html.workspace :is(.sidebar.card,.composer,.modeToggle,.avatarMenu,.workspaceToolMenu,.modalCard,.auditPanel,.pdfPanel) {
  background-color: var(--glass-fill); background-image: var(--glass-sheen); border-color: var(--glass-border);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--glass-shadow);
}
html.workspace :is(.sidebar.card,.avatarMenu,.workspaceToolMenu,.modalCard,.pdfPanel) { background-color: var(--glass-heavy); }
html.workspace .composer:focus-within { border-color: color-mix(in srgb,var(--focus) 40%,var(--glass-border)); box-shadow: var(--glass-shadow), 0 0 0 3px color-mix(in srgb,var(--focus) 8%,transparent); }
html.workspace :is(.newChatBtn,.sourceChip,.iconBtn:not(.sendBtn),.afViewToggle) {
  background-color: var(--glass-control); background-image: var(--glass-sheen); border-color: var(--glass-border);
  box-shadow: inset 0 1px 0 color-mix(in srgb,var(--text) 9%,transparent);
}
html.workspace :is(.newChatBtn,.sourceChip,.iconBtn:not(.sendBtn)):hover { background-color: color-mix(in srgb,var(--glass-control),var(--brand-red) 6%); border-color: var(--brand-edge); }
html.workspace .modeToggle::before { background-color: color-mix(in srgb,var(--surface),var(--brand-red) 5%); background-image: var(--glass-sheen); box-shadow: inset 0 0 0 1px var(--brand-edge), 0 2px 6px rgba(0,0,0,.06); }
html.workspace :is(.newChatBtn,.sendBtn) .workspaceIcon, html.workspace .ctxToggleBtn[aria-expanded="true"] .ctxChev { color: var(--brand-red); }
html.workspace .chatHistItem.active { background-color: color-mix(in srgb,var(--panel2),var(--brand-red) 5%); box-shadow: inset 2px 0 0 var(--brand-red); }
html.workspace .sendBtn:hover { box-shadow: 0 0 0 3px color-mix(in srgb,var(--brand-red) 10%,transparent); }
html.workspace .auditDrop:hover, html.workspace .auditDrop.drag { border-color: var(--brand-edge); }
html.workspace .auditDrop:hover .auditDropIcon { color: var(--brand-red); }
html.workspace .auditProgressFill { background: var(--brand-red); }
html.workspace .themeToggle { border-color: var(--glass-border); box-shadow: inset 0 1px 2px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.12); }
@keyframes refined-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes refined-menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (min-width: 961px) {
  html.workspace body:not(.auditReviewOpen) .app:has(.pdfPanel.open),
  html.workspace body:not(.auditReviewOpen) .app:has(.pdfPanel.open):has(.sidebar.collapsed) { grid-template-columns: var(--sidebar-space) minmax(300px,1fr) min(var(--pdf-w,420px),calc(100vw - var(--sidebar-space) - 300px)); }
  html.workspace .pdfPanel { width: 100%; min-width: 0; }
  html.workspace body.auditReviewOpen .topbar { grid-column: 1 / -1; }
  html.workspace body.auditReviewOpen .main { grid-column: 1; padding: 16px; }
}
@media (max-width: 960px) {
  html.workspace { --sidebar-space: 0px; --sidebar-width: 292px; }
  html.workspace body.auditReviewOpen .app,
  html.workspace body.auditReviewOpen .app:has(.pdfPanel.open),
  html.workspace body.auditReviewOpen .app:has(#auditNotesPanel.open):has(#auditSourcePanel.open) { grid-template-columns: minmax(0,1fr) !important; }
  html.workspace body.auditReviewOpen .main { grid-column: 1; }
  html.workspace body.auditReviewOpen .topbar { grid-column: 1 / -1; }
  html.workspace .topbar { padding: 0 16px; position: relative; }
  html.workspace .workspaceToolMenu :is(#adminBtn,#analyticsBtn,#salesBtn)[style*="inline-block"] { display: block !important; }
  html.workspace .sidebar { inset: 0 auto 0 0; border-radius: 0 18px 18px 0; padding-top: 12px; z-index: 60; }
  html.workspace .sidebarBackdrop { z-index: 50; background: rgba(0,0,0,.32); backdrop-filter: blur(2px); }
  html.workspace .main { padding: 20px; }
  html.workspace :is(.navBtn,.sidebar .sidebarCollapseBtn,.iconBtn,.pdfPanelClose) { width: 44px; height: 44px; min-width: 44px; }
  html.workspace :is(.modalBtn,.afAskBtn,.afResolveBtn,.auditBackBtn,.afEmailBtn,.avatarMenuItem,.workspaceTools summary) { min-height: 44px; }
  html.workspace body.chatStarted:not(.auditMode) .composerShell { position: fixed; width: auto; max-width: none; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom) + var(--kb,0px)); transform: none; }
  html.workspace .chat { padding-bottom: calc(var(--composerPad,160px) + env(safe-area-inset-bottom) + var(--kb,0px)); }
  html.workspace .pdfPanel { position: fixed; inset: 0; width: 100vw; height: 100dvh; display: flex; border-radius: 0; transform: translateY(100%); z-index: 210; }
  html.workspace .pdfPanel.open { transform: translateY(0); }
  html.workspace .pdfPanel .pdfResizer { display: none !important; }
  html.workspace .workspaceSwitch { min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 600px) {
  html.workspace .main { padding: 20px 16px; }
  html.workspace .landingLogo { font-size: 34px; }
  html.workspace .landingSub { font-size: 12px; }
  html.workspace .composerShell > .landing { padding-bottom: 24px; }
  html.workspace .composer { padding: 12px; border-radius: 22px; }
  html.workspace .composerRow { flex-wrap: wrap; gap: 8px; }
  html.workspace .composer textarea { flex: 1 1 100%; width: 100%; min-height: 28px; }
  html.workspace .composer-actions { width: 100%; justify-content: space-between; }
  html.workspace .modeToggle { margin-top: 12px; }
  html.workspace .topbar .auth { gap: 4px; }
  html.workspace .topbar .auth a { padding: 9px 11px; }
  html.workspace .workspaceTools summary { padding: 10px 8px; }
  html.workspace .auditPanel { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html.workspace *, html.workspace *::before, html.workspace *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.workspace :is(button,summary):active { scale: none; }
  html.workspace body::after { opacity: 0; }
}
@media (prefers-reduced-transparency: reduce) {
  html.workspace, html.workspace.light {
    --glass-fill: var(--surface); --glass-heavy: var(--surface); --glass-control: var(--panel2);
    --glass-filter: none; --glass-sheen: none; --glass-border: var(--border); --glass-shadow: var(--control-shadow);
  }
}
@media (forced-colors: active) {
  html.workspace body::before, html.workspace body::after { display: none; }
  html.workspace, html.workspace.light { --glass-fill: Canvas; --glass-heavy: Canvas; --glass-control: ButtonFace; --glass-filter: none; --glass-sheen: none; --glass-border: ButtonText; --glass-shadow: none; }
}
