:root {
  --factor-shell-height: 55px;
  --factor-shell-gutter: 14px;
  --factor-shell-menu-track: 34px;
  --factor-shell-brand-track: 300px;
  --factor-shell-search-max: 390px;
  --factor-shell-rail-expanded: 230px;
  --factor-shell-rail-compact: 72px;
  --factor-shell-icon-track: 46px;
  --factor-shell-mobile-nav-height: 68px;
  --factor-shell-motion-duration: 200ms;
  --factor-shell-motion-easing: cubic-bezier(.2, 0, 0, 1);
  --factor-shell-blue: #023199;
  --factor-shell-blue-dark: #021f64;
  --factor-shell-action-blue: #023199;
  --factor-shell-bg: #f3f6fb;
  --factor-shell-surface: #fff;
  --factor-shell-line: #dfe5ef;
  --factor-shell-text: #182033;
  --factor-shell-muted: #667085;
  --factor-shell-control-hover: #f4f7fc;
  --factor-shell-focus: #75a7ef;
}
html[data-theme='dark'] { --factor-shell-bg:#0b1322; --factor-shell-surface:#111c2f; --factor-shell-line:#2b3a52; --factor-shell-text:#f3f6fc; --factor-shell-muted:#a9b7ca; --factor-shell-control-hover:#1b2a46; --factor-shell-action-blue:#9cb9ff; }
.factor-shell { --factor-shell-rail-width:var(--factor-shell-rail-expanded); --factor-shell-viewport-center-offset:-115px; position:fixed; inset:0; display:grid; grid-template-columns:var(--factor-shell-rail-width) minmax(0,1fr); grid-template-rows:var(--factor-shell-height) minmax(0,1fr); overflow:hidden; color:var(--factor-shell-text); background:var(--factor-shell-bg); font-family:Roboto,Arial,sans-serif; transition:grid-template-columns var(--factor-shell-motion-duration) var(--factor-shell-motion-easing); }
.factor-shell[hidden] { display:none; }
.factor-shell.is-rail-collapsed { --factor-shell-rail-width:var(--factor-shell-rail-compact); --factor-shell-viewport-center-offset:-36px; }
.factor-shell-topbar { grid-column:1/-1; z-index:30; display:grid; grid-template-columns:minmax(350px,1fr) minmax(140px,var(--factor-shell-search-max)) minmax(210px,1fr); align-items:center; gap:14px; height:var(--factor-shell-height); padding-inline:var(--factor-shell-gutter); border-bottom:1px solid var(--factor-shell-line); background:var(--factor-shell-surface); }
.factor-shell-branding { grid-column:1; display:grid; grid-template-columns:var(--factor-shell-menu-track) minmax(0,var(--factor-shell-brand-track)); align-items:center; justify-self:start; gap:8px; min-width:0; }
.factor-shell-icon-button { width:34px; height:34px; display:grid; place-items:center; border:0; border-radius:8px; color:var(--factor-shell-action-blue); background:transparent; cursor:pointer; }
.factor-shell-icon-button:hover { color:var(--factor-shell-blue-dark); background:var(--factor-shell-control-hover); }
html[data-theme='dark'] .factor-shell-icon-button:hover { color:#315bdd; }
.factor-shell-icon-button:focus-visible,.factor-shell-mobile-nav .factor-shell-nav-item:focus-visible,.factor-shell-brand:focus-visible,.factor-shell-drawer-close:focus-visible { outline:2px solid #4776e7; outline-offset:2px; }
.factor-shell-icon-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.factor-shell-menu-open { display:none; }
.factor-shell.is-rail-collapsed .factor-shell-menu-close { display:none; }
.factor-shell.is-rail-collapsed .factor-shell-menu-open { display:block; }
.factor-shell-brand { width:max-content; max-width:var(--factor-shell-brand-track); min-width:0; height:42px; display:flex; align-items:center; gap:8px; padding:0 4px; border-radius:8px; color:var(--factor-shell-text); text-decoration:none; transition:background-color 120ms ease,color 120ms ease,transform 120ms ease; }
.factor-shell-brand:hover { background:var(--factor-shell-control-hover); color:var(--factor-shell-blue); }
.factor-shell-brand:active { transform:translateY(1px); transition-duration:40ms; }
.factor-shell-mark { position:relative; flex:0 0 34px; width:34px; height:34px; }
.factor-shell-mark img { position:absolute; inset:0; width:34px; height:34px; display:block; object-fit:contain; object-position:center; }
.factor-shell-mark-dark { opacity:0; }
html[data-theme='dark'] .factor-shell-mark-light { opacity:0; }
html[data-theme='dark'] .factor-shell-mark-dark { opacity:1; }
.factor-shell-brand strong { min-width:0; max-width:calc(var(--factor-shell-brand-track) - 50px); overflow:hidden; color:var(--factor-shell-text); font-size:21.6px; line-height:1.15; font-weight:400; white-space:nowrap; text-overflow:ellipsis; }
.factor-shell-command-slot { grid-column:2; min-width:0; width:100%; max-width:var(--factor-shell-search-max); justify-self:center; }
.factor-shell-actions { grid-column:3; justify-self:end; min-width:0; display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.factor-shell-sidebar { grid-column:1; grid-row:2; z-index:20; width:var(--factor-shell-rail-width); min-width:0; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; border-right:1px solid var(--factor-shell-line); background:var(--factor-shell-surface); transition:width var(--factor-shell-motion-duration) var(--factor-shell-motion-easing),transform var(--factor-shell-motion-duration) var(--factor-shell-motion-easing); }
.factor-shell-sidebar nav { display:grid; gap:4px; padding:8px 0; }
.factor-shell-nav-divider { width:calc(100% - 16px); height:1px; margin:8px; background:var(--factor-shell-line); }
.factor-shell-mobile-nav .factor-shell-nav-item { position:relative; width:calc(var(--factor-shell-rail-width) - 16px); min-height:45px; margin-inline:8px; display:grid; grid-template-columns:var(--factor-shell-icon-track) minmax(0,1fr); align-items:center; gap:0; overflow:hidden; border-radius:9px; color:#5d6b82; text-decoration:none; transition:width var(--factor-shell-motion-duration) var(--factor-shell-motion-easing),background-color 120ms ease,color 120ms ease,transform 120ms ease; }
html[data-theme='dark'] .factor-shell-mobile-nav .factor-shell-nav-item { color:var(--factor-shell-muted); }
.factor-shell-mobile-nav .factor-shell-nav-item:hover { color:var(--factor-shell-blue); background:var(--factor-shell-control-hover); }
.factor-shell-mobile-nav .factor-shell-nav-item.is-active { color:var(--factor-shell-blue); background:#e9efff; font-weight:700; }
html[data-theme='dark'] .factor-shell-mobile-nav .factor-shell-nav-item.is-active { color:#a9c2ff; background:#203252; }
.factor-shell-mobile-nav .factor-shell-nav-icon { width:var(--factor-shell-icon-track); height:100%; display:grid; place-items:center; }
.factor-shell-mobile-nav .factor-shell-nav-icon svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.factor-shell-mobile-nav .factor-shell-nav-label { min-width:0; overflow:hidden; font-size:13px; white-space:nowrap; text-overflow:ellipsis; opacity:1; transform:translateX(0); transition:opacity 120ms ease-out 45ms,transform var(--factor-shell-motion-duration) var(--factor-shell-motion-easing); }
.factor-shell.is-rail-collapsed .factor-shell-mobile-nav .factor-shell-nav-item { width:var(--factor-shell-icon-track); margin-right:auto; }
.factor-shell.is-rail-collapsed .factor-shell-mobile-nav .factor-shell-nav-label { opacity:0; transform:translateX(-6px); pointer-events:none; }
.factor-shell-tooltip { position:fixed; z-index:120; max-width:min(260px,calc(100vw - 16px)); padding:6px 9px; border-radius:5px; color:#fff; background:#4b5565; box-shadow:0 5px 14px rgb(15 23 42/.2); font-family:Roboto,Arial,sans-serif; font-size:11px; font-weight:600; line-height:1.35; text-align:center; white-space:nowrap; user-select:none; pointer-events:none; opacity:0; transform:translateY(2px); transition:opacity 100ms ease 180ms,transform 100ms ease 180ms; }
.factor-shell-tooltip::before { content:''; position:absolute; left:-5px; top:50%; width:10px; height:10px; border-radius:1px; background:#4b5565; transform:translateY(-50%) rotate(45deg); }
html[data-theme='dark'] .factor-shell-tooltip { background:#e4eaf4; color:#172033; box-shadow:0 7px 18px #00000061; }
html[data-theme='dark'] .factor-shell-tooltip::before { background:#e4eaf4; }
.factor-shell.is-rail-collapsed .factor-shell-nav-item:hover .factor-shell-tooltip,.factor-shell.is-rail-collapsed .factor-shell-nav-item:focus-visible .factor-shell-tooltip { opacity:1; transform:none; }
.factor-shell:not(.is-rail-collapsed) .factor-shell-tooltip { display:none; }
.factor-shell-workspace { grid-column:2; grid-row:2; min-width:0; min-height:0; overflow:hidden; background:var(--factor-shell-bg); }
.factor-shell-workspace > .workspace { position:relative; inset:auto; width:100%; height:100%; }
.factor-shell-mobile-nav { display:none; }
.factor-shell-scrim { position:fixed; z-index:15; inset:var(--factor-shell-height) 0 0; border:0; background:rgb(15 31 58/.32); opacity:0; transition:opacity var(--factor-shell-motion-duration) var(--factor-shell-motion-easing); }
.factor-shell.is-mobile-menu-open .factor-shell-scrim { opacity:1; }
.factor-shell-preferences-layer { position:fixed; z-index:200; inset:0; display:flex; justify-content:flex-end; pointer-events:none; }
.factor-shell-preferences-layer[hidden] { display:none; }
.factor-shell-preferences-layer.is-open { pointer-events:auto; }
.factor-shell-preferences-backdrop { position:absolute; inset:0; border:0; background:rgb(14 26 49/.45); opacity:0; transition:opacity var(--factor-shell-motion-duration) var(--factor-shell-motion-easing); }
.factor-shell-preferences-layer.is-open .factor-shell-preferences-backdrop { opacity:1; }
.factor-shell-preferences-drawer { position:relative; width:min(430px,100vw); height:100%; background:var(--factor-shell-surface); border-left:1px solid var(--factor-shell-line); box-shadow:-18px 0 45px rgb(15 31 58/.16); transform:translate3d(100%,0,0); transition:transform var(--factor-shell-motion-duration) var(--factor-shell-motion-easing); }
.factor-shell-preferences-layer.is-open .factor-shell-preferences-drawer { transform:translate3d(0,0,0); }
.factor-shell-preferences-drawer header { min-height:82px; display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--factor-shell-line); }
.factor-shell-preferences-drawer header span { color:var(--factor-shell-muted); font-size:9px; font-weight:700; letter-spacing:.1em; }
.factor-shell-preferences-drawer h2 { margin:5px 0 0; font-size:22px; font-weight:400; }
.factor-shell-drawer-close { width:36px; height:36px; display:grid; place-items:center; border:0; border-radius:8px; color:var(--factor-shell-muted); background:transparent; cursor:pointer; }
.factor-shell-drawer-close svg { width:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.factor-shell-preferences-body { padding:24px; }
.factor-shell-preferences-body fieldset { margin:0; padding:0; border:0; }
.factor-shell-preferences-body legend { font-size:15px; font-weight:700; }
.factor-shell-preferences-body p { margin:6px 0 18px; color:var(--factor-shell-muted); font-size:12px; }
.factor-shell-preferences-body label { min-height:48px; display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--factor-shell-line); font-size:13px; cursor:pointer; }
.factor-shell-preferences-body input { accent-color:var(--factor-shell-blue); }
.factor-standard-page { box-sizing:border-box; width:min(100%,960px); margin-inline:auto; padding:30px 32px; border:1px solid var(--factor-shell-line); border-radius:14px; background:var(--factor-shell-surface); color:var(--factor-shell-text); }
.factor-feedback-page { width:min(100%,880px); }
.factor-standard-page-copy { max-width:68ch; }
.factor-standard-page h1 { margin:0; color:var(--factor-shell-text); font-size:28px; font-weight:400; line-height:1.2; letter-spacing:-.02em; }
.factor-standard-page-copy > p { margin:10px 0 0; color:var(--factor-shell-muted); font-size:13px; line-height:1.58; }
.factor-about-page dl { display:grid; margin:28px 0 0; border-top:1px solid var(--factor-shell-line); }
.factor-about-page dl > div { min-height:52px; display:grid; grid-template-columns:140px minmax(0,1fr); align-items:center; gap:18px; border-bottom:1px solid var(--factor-shell-line); }
.factor-about-page dt { color:var(--factor-shell-muted); font-size:12px; }
.factor-about-page dd { margin:0; color:var(--factor-shell-text); font-size:13px; }
.factor-feedback-form { width:min(100%,680px); display:grid; gap:9px; margin-top:28px; }
.factor-feedback-form label { color:var(--factor-shell-text); font-size:13px; font-weight:700; }
.factor-feedback-form textarea { width:100%; min-height:180px; resize:vertical; padding:13px 14px; border:1px solid var(--factor-shell-line); border-radius:8px; background:var(--factor-shell-surface); color:var(--factor-shell-text); font:400 14px/1.5 Roboto,Arial,sans-serif; }
.factor-feedback-form textarea::placeholder { color:var(--factor-shell-muted); }
.factor-feedback-form textarea:focus-visible { border-color:var(--factor-shell-blue); outline:2px solid rgb(117 167 239/.4); outline-offset:1px; }
.factor-feedback-identity { margin:0; color:var(--factor-shell-muted); font-size:11px; }
.factor-feedback-actions { min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:8px; }
.factor-feedback-actions button { flex:none; min-height:40px; padding:0 15px; border:1px solid var(--factor-shell-blue); border-radius:8px; background:var(--factor-shell-blue); color:#fff; font-size:12px; font-weight:700; cursor:pointer; }
.factor-feedback-actions button:hover:not(:disabled) { background:var(--factor-shell-blue-dark); }
.factor-feedback-actions button:focus-visible { outline:2px solid var(--factor-shell-focus); outline-offset:2px; }
.factor-feedback-actions button:disabled { border-color:#aeb9ca; background:#aeb9ca; cursor:not-allowed; }
.factor-feedback-status { color:var(--factor-shell-muted); font-size:12px; }
.factor-feedback-status.is-success { color:#1f7a48; }
.factor-feedback-status.is-error { color:#a33b32; }
html[data-theme='dark'] .factor-feedback-actions button:disabled { border-color:#42536d; background:#42536d; color:#aebbd0; }
html[data-theme='dark'] .factor-feedback-status.is-success { color:#79c99b; }
html[data-theme='dark'] .factor-feedback-status.is-error { color:#f0a49c; }
@media (max-width:900px) {
  .factor-shell, .factor-shell.is-rail-collapsed { --factor-shell-rail-width:76px; --factor-shell-viewport-center-offset:0px; }
  .factor-shell-topbar { grid-template-columns:minmax(220px,1fr) minmax(140px,var(--factor-shell-search-max)) minmax(64px,1fr); }
  .factor-shell-sidebar { position:fixed; top:var(--factor-shell-height); bottom:0; left:0; width:var(--factor-shell-rail-expanded); transform:translate3d(-100%,0,0); box-shadow:none; }
  .factor-shell.is-mobile-menu-open .factor-shell-sidebar { box-shadow:14px 0 32px rgb(15 31 58/.16); }
  .factor-shell.is-mobile-menu-open .factor-shell-sidebar { transform:translate3d(0,0,0); }
.factor-shell.is-mobile-menu-open .factor-shell-mobile-nav .factor-shell-nav-item { width:calc(var(--factor-shell-rail-expanded) - 16px); }
.factor-shell.is-mobile-menu-open .factor-shell-mobile-nav .factor-shell-nav-label { opacity:1; }
}
@media (max-width:650px) {
  .factor-shell { --factor-shell-rail-width:0px; grid-template-columns:1fr; grid-template-rows:var(--factor-shell-height) minmax(0,1fr) var(--factor-shell-mobile-nav-height); }
  .factor-shell-topbar { grid-column:1; grid-template-columns:76px minmax(64px,1fr) auto; gap:8px; padding:0 8px; }
  .factor-shell-branding { gap:8px; }
  .factor-shell-command-slot { width:0; overflow:hidden; }
  .factor-shell-brand strong { font-size:19px; }
  .factor-shell-workspace { grid-column:1; grid-row:2; }
  .factor-shell-mobile-nav { grid-column:1; grid-row:3; z-index:25; display:grid; grid-template-columns:repeat(var(--factor-shell-mobile-items,3),1fr); min-height:var(--factor-shell-mobile-nav-height); border-top:1px solid var(--factor-shell-line); background:var(--factor-shell-surface); }
  .factor-shell-mobile-nav .factor-shell-nav-item { width:auto; min-height:var(--factor-shell-mobile-nav-height); margin:0; display:flex; flex-direction:column; justify-content:center; gap:2px; border-radius:0; }
  .factor-shell-mobile-nav .factor-shell-nav-icon { width:auto; height:28px; }
  .factor-shell.is-rail-collapsed .factor-shell-mobile-nav .factor-shell-nav-item { width:auto; margin:0; }
  .factor-shell-mobile-nav .factor-shell-nav-label,.factor-shell.is-rail-collapsed .factor-shell-mobile-nav .factor-shell-nav-label { opacity:1; transform:none; font-size:10px; }
  .factor-shell-mobile-nav .factor-shell-tooltip { display:none; }
  .factor-shell-mobile-nav .factor-shell-nav-divider { display:none; }
  .factor-shell-sidebar { bottom:var(--factor-shell-mobile-nav-height); }
  .factor-standard-page { padding:22px 20px; border-radius:12px; }
  .factor-standard-page h1 { font-size:24px; }
  .factor-about-page dl > div { grid-template-columns:1fr; align-content:center; gap:4px; padding:10px 0; }
  .factor-feedback-actions { align-items:stretch; flex-direction:column; }
  .factor-feedback-actions button { width:100%; }
}
@media (hover:none),(pointer:coarse) { .factor-shell-tooltip { display:none !important; } }
@media (prefers-reduced-motion:reduce) {
.factor-shell,.factor-shell-sidebar,.factor-shell-mobile-nav .factor-shell-nav-item,.factor-shell-scrim,.factor-shell-preferences-backdrop,.factor-shell-preferences-drawer { transition-duration:.01ms !important; } }
