.nova-shell {
  --sidebar-bg: #f5f5f7;
  --sidebar-rule: #e2e3e8;
  --sidebar-hover: #e8e9ed;
  --sidebar-active: #242736;
  --workspace-inset: clamp(20px, 3vw, 52px);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: #fff;
}
.legacy-workspace {
  --canvas: #f2f4f7;
  --surface: #fff;
  --ink: #101828;
  --ink-soft: #475467;
  --muted: var(--ink-soft);
  --hairline: #d0d5dd;
  --border: var(--hairline);
  --rule: #e4e7ec;
  --line: var(--rule);
  --teal: #1d4ed8;
  --teal-hover: #1a3fb0;
  --active: #e8effe;
  --focus: var(--ink);
  --quick: 140ms ease-out;
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
.legacy-workspace h1 { font-size: 2rem; }
.legacy-workspace .mark { color: #fff; font-family: inherit; }
.original-panels { border-top: 1px solid var(--sidebar-rule); margin: 14px 0 0; padding: 6px 4px 8px; }
.original-panels > summary { font-size: .76rem; color: var(--ink-soft); }
.original-panels nav { display: grid; gap: 2px; }
.original-panels nav a { display: block; padding: 5px 8px; color: var(--ink-soft); font-size: .82rem; }
.original-panels a[aria-current] { font-weight: 700; color: var(--ink); }
.nova-side {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 14px 12px;
  background: var(--sidebar-bg);
  border-inline-end: 1px solid var(--sidebar-rule);
}
.nova-brandline, .nova-place-heading, .nova-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nova-brandline { justify-content: space-between; min-height: 38px; margin: 0 0 18px; }
.nova-brandline .wordmark { color: var(--ink); font-size: .96rem; }
.nova-brandline .mark {
  position: relative;
  width: 32px;
  height: 32px;
  background: var(--sidebar-active);
  color: #fff;
  border-radius: 9px;
  font-size: 1.13rem;
}
.nova-brandline .mark::after {
  content: '';
  position: absolute;
  inset: 13px 7px auto auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a4b8ff;
}
.rail-toggle, .nova-user button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 36px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
}
.rail-toggle .icon { width: 20px; height: 20px; }
.mobile-brand-summary, .compact-brand, .nova-menu > summary { display: none; }
.nova-menu { min-height: 0; overflow: auto; scrollbar-width: thin; }
.nova-place {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #d7dae3;
  background: #fff;
  margin: 0 1px 16px;
}
.nova-place-heading { justify-content: space-between; margin-bottom: 5px; }
.nova-place label, .nova-place p, .nova-demo { color: var(--ink-soft); font-size: .77rem; }
.nova-place label { font-weight: 650; }
.nova-demo {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  border-radius: 5px;
  background: #f0eff5;
  padding: 1px 5px;
}
.nova-place select {
  width: 100%;
  min-height: 36px;
  padding: 4px 7px;
  border: 1px solid #c3c8d2;
  color: var(--ink);
  background-color: #fff;
  font-size: .96rem;
  font-weight: 650;
}
.nova-place p { margin: 4px 1px 0; overflow-wrap: anywhere; }
.nova-nav, .workspace-nav-group { display: grid; gap: 2px; }
.workspace-nav-group + .workspace-nav-group { margin-top: 13px; }
.nova-nav-group { padding: 0 10px 4px; color: #575c68; font-size: .73rem; font-weight: 650; }
.nova-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 35px;
  padding: 6px 10px;
  color: #373c49;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 550;
  text-decoration: none;
  transition: background-color var(--quick), color var(--quick);
}
.nova-nav a .icon { width: 18px; height: 18px; }
.nova-nav a[aria-current] { background: var(--sidebar-active); color: #fff; font-weight: 650; }
.nova-nav a:focus-visible, .nova-menu summary:focus-visible { outline-offset: -3px; }
.nova-nav a[aria-current]:focus-visible { outline-color: #bfccff; }
.nova-user {
  margin-top: auto;
  padding: 12px 2px 0;
  border-top: 1px solid var(--sidebar-rule);
  background: var(--sidebar-bg);
}
.workspace-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: #e2e4ee;
  color: #3c4055;
  font-weight: 700;
}
.workspace-person { min-width: 0; font-size: .8rem; font-weight: 650; overflow-wrap: anywhere; }
.workspace-person small { display: block; font-size: .74rem; font-weight: 400; }
.nova-user button { margin-left: auto; }
.nova-shell #content { padding: 32px var(--workspace-inset) 48px; }
.nova-shell .page-head, .nova-shell .today-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.nova-shell .page-head p { font-size: .88rem; }
.nova-shell .chat-layout { grid-template-columns: minmax(164px, 200px) minmax(0, 1fr); gap: 16px; }
.nova-shell .history {
  align-self: start;
  background: #f8f8fa;
  border-color: var(--rule);
  padding: 14px;
}
.nova-shell .history h2 { font-size: 1rem; }
.history-disclosure > summary { display: none; }
.nova-shell .conversation { border-color: var(--hairline); }
.nova-shell .chat-intro { padding: clamp(16px, 3vw, 44px) clamp(8px, 2vw, 28px); }
.nova-shell .chat-intro h2 { font-size: clamp(1.42rem, 2.2vw, 2rem); letter-spacing: -.035em; }
.nova-shell .chat-intro p { color: var(--ink-soft); }
.nova-shell .nova-context { background: #f7f8fc; border-color: var(--rule); }
@media (hover: hover) {
  .nova-nav a:not([aria-current]):hover, .rail-toggle:hover, .nova-user button:hover, .nova-menu > summary:hover {
    color: var(--ink);
    background: var(--sidebar-hover);
  }
}
@media (min-width: 901px) {
  .compact-rail { grid-template-columns: 68px minmax(0, 1fr); }
  .compact-rail .nova-side { align-items: stretch; padding-inline: 10px; }
  .compact-rail .nova-brandline { flex-direction: column; gap: 6px; margin-bottom: 10px; }
  .compact-rail .wordmark-name, .compact-rail .nova-place, .compact-rail .nova-nav-group,
  .compact-rail .nova-nav a span, .compact-rail .workspace-person, .compact-rail .workspace-avatar, .compact-rail .original-panels { display: none; }
  .compact-rail .compact-brand {
    display: grid;
    place-items: center;
    width: 40px;
    min-height: 36px;
    margin: 0 auto 9px;
    padding: 2px;
    background: #fff;
    border: 1px solid #c3c8d2;
    border-radius: 8px;
    color: var(--ink);
  }
  .compact-rail .workspace-nav-group + .workspace-nav-group { margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--sidebar-rule); }
  .compact-rail .nova-nav a { justify-content: center; min-height: 39px; }
  .compact-rail .nova-user { justify-content: center; }
  .compact-rail .nova-user button { margin: 0; }
}
@media (max-width: 1100px) {
  .nova-shell .chat-layout { grid-template-columns: minmax(154px, 172px) minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 900px) {
  .nova-shell { display: block; }
  .nova-side {
    position: relative;
    height: auto;
    padding: 9px 16px;
    border: 0;
    border-bottom: 1px solid var(--sidebar-rule);
  }
  .rail-toggle { display: none; }
  .nova-brandline { margin: 0; padding-right: 108px; }
  .nova-brandline .wordmark { min-width: 0; }
  .mobile-brand-summary { display: flex; align-items: center; gap: 6px; padding: 1px 108px 2px 41px; color: var(--ink-soft); overflow-wrap: anywhere; font-size: .78rem; }
  .mobile-brand-summary .nova-demo { flex: none; }
  .nova-menu { overflow: visible; }
  .nova-menu > summary {
    position: absolute;
    top: 12px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 5px 10px;
    border: 1px solid #ccd0db;
    border-radius: 9px;
    color: var(--ink);
    list-style: none;
    font-size: .86rem;
  }
  .nova-menu[open] > summary { color: #fff; background: var(--sidebar-active); }
  .nova-menu > summary::-webkit-details-marker { display: none; }
  .nova-menu[open] .nova-place { margin: 20px 0 14px; }
  .nova-menu .nova-place select, .nova-menu .nova-nav a, .nova-user button { min-height: 44px; }
  .nova-menu[open] + .mobile-brand-summary, .nova-menu:not([open]) ~ .nova-user { display: none; }
  .nova-user { margin: 14px 0 0; }
  .nova-shell #content { padding: 22px var(--workspace-inset) 38px; }
}
@media (max-width: 700px) {
  .nova-shell { --workspace-inset: 14px; }
  .nova-shell .chat-layout { display: flex; flex-direction: column; }
  .nova-shell .history { width: 100%; }
  .nova-shell .history:has(.history-disclosure) { padding: 0 12px; }
  .history-disclosure > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--ink);
    list-style: none;
    font-size: .89rem;
    cursor: pointer;
  }
  .history-disclosure > summary::-webkit-details-marker { display: none; }
  .history-disclosure > summary::after { content: ''; width: 7px; height: 7px; margin: -4px 4px 0 auto; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
  .history-disclosure[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
  .history-disclosure[open] { padding-bottom: 12px; }
  .history-disclosure[open] > h2 { display: none; }
  .nova-shell .chat-intro { padding: 12px 2px; }
  .nova-shell .chat-intro .row { gap: 6px; }
  .nova-shell .page-head, .nova-shell .today-head { gap: 10px; padding-bottom: 13px; margin-bottom: 14px; }
  .nova-shell h1 { font-size: 1.65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nova-nav a { transition: none; }
}
