:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: #eeeef6;
  background: #0c0e15;
  --background: #0c0e15;
  --surface: #131620;
  --surface-raised: #1b1e2b;
  --accent: #c1b2ff;
  --accent-soft: #b4a0ff12;
  --text: #eeeef6;
  --muted: #a1a5b9;
  --border: #ffffff14;
  --danger: #ffb0bd;
  --rail-width: 232px;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-library { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; padding: 12px; background: var(--surface-raised); border-radius: 8px; z-index: 20; }
.skip-link:focus { top: 12px; }
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail-width); padding: 30px 18px 20px; border-right: 1px solid var(--border); background: #10121b; display: flex; flex-direction: column; z-index: 3; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 27px; font-weight: 650; letter-spacing: -1.1px; }
.brand-symbol { display: grid; place-items: center; width: 36px; height: 38px; border: 1px solid #c1b2ff40; border-radius: 12px; background: linear-gradient(140deg,#b8a6ff20,transparent); font: italic 700 31px Georgia, serif; color: var(--accent); }
.brand-period { color: var(--accent); }
.rail-caption { margin: 15px 0 35px; color: var(--muted); font-size: 10px; letter-spacing: 1.5px; }
.rail nav { display: grid; gap: 8px; }
.rail nav a { min-height: 46px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
.rail nav a:hover { color: var(--text); background: #ffffff05; }
.rail nav a.active { color: #ded5ff; background: var(--accent-soft); border-color: #c1b2ff26; }
.nav-icon { width: 20px; text-align: center; font-size: 18px; }
.rail-bottom { margin-top: auto; }
.rail-note { padding: 24px 5px; margin: 0 0 12px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.8; }
.rail-note strong { font-weight: 400; color: #d1cbe0; }
.quiet-button { min-height: 44px; border: 0; border-radius: 7px; padding: 8px; color: var(--muted); background: transparent; font-size: 12px; }
.quiet-button:hover { color: var(--accent); background: var(--accent-soft); }
#logout { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; }
.app-shell { margin-left: var(--rail-width); min-width: 0; min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 65% 0%, #8070c00b, transparent 45%); }
.topbar { min-height: 76px; padding: 16px 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.topbar-title { display: flex; align-items: center; gap: 12px; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; color: var(--muted); }
.page-name { font-size: 13px; color: #dad9e8; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions time { color: var(--muted); font-size: 12px; }
.icon-button { display: inline-grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: #c5c4d6; font-size: 22px; }
.icon-button:hover, .icon-button[aria-pressed=true] { color: var(--accent); border-color: #c1b2ff60; }
.workspace-badge { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 8px; }
.workspace-badge>span { width: 6px; height: 6px; background: #a6d6bd; border-radius: 50%; }
.button { min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 550; white-space: nowrap; }
.button svg { width: 17px; height: 17px; }
.primary { background: var(--accent); color: #211b38; }
.primary:hover { background: #d1c5ff; }
.secondary { color: #d6d4e5; border-color: var(--border); background: var(--surface-raised); }
.secondary:hover { border-color: #c1b2ff50; }
.danger { color: var(--danger); background: #ff6e8b12; }
.small { padding: 8px 12px; font-size: 12px; }
input, select, textarea { max-width: 100%; border: 1px solid #ffffff24; border-radius: 9px; padding: 11px 13px; background: #0e111a; color: var(--text); }
input::placeholder, textarea::placeholder { color: #84899f; }
input, select { min-height: 46px; }
.error-banner { padding: 12px 16px; margin-bottom: 16px; border: 1px solid #ff8ea438; border-radius: 10px; color: var(--danger); background: #291923; font-size: 13px; overflow-wrap: anywhere; }
.main-footer { margin-top: auto; padding: 24px 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; }
.muted { color: var(--muted); font-weight: 400; }
@media (max-width: 1050px) { :root { --rail-width: 208px; } .rail { padding-inline: 14px; } .topbar { padding-inline: 24px; } }
@media (max-width: 760px) {
  .rail { position: relative; width: 100%; padding: calc(16px + env(safe-area-inset-top)) 16px 10px; border-right: 0; border-bottom: 1px solid var(--border); }
  .rail .brand { font-size: 24px; width: fit-content; }
  .brand-symbol { width: 32px; height: 34px; font-size: 28px; }
  .rail-caption, .rail-note { display: none; }
  .rail nav { display: flex; gap: 6px; margin-top: 17px; }
  .rail nav a { flex: 1; justify-content: center; padding: 10px 6px; font-size: 12px; gap: 7px; }
  .rail-bottom { margin: 0; }
  #logout { position: absolute; right: 16px; top: calc(11px + env(safe-area-inset-top)); width: auto; }
  .app-shell { margin-left: 0; min-height: calc(100dvh - 130px); }
  .topbar { min-height: 60px; padding: 8px 16px; }
  .topbar-title { gap: 9px; }
  .header-actions { gap: 7px; }
  .header-actions time { font-size: 10px; }
  .main-footer { padding: 20px 16px; font-size: 10px; }
  input, select, textarea { font-size: 16px; }
}
@media (max-width: 380px) { .rail nav a { font-size: 11px; gap: 5px; } .header-actions time { display: none; } .workspace-badge { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
