:root {
  color-scheme: light;
  --bg: #fff; --side: #fafafa; --soft: #f1f1f1; --text: #202020;
  --muted: #626b7b; --line: #e2e6ed; --inverse: #fff;
  --accent: #2563eb; --accent-soft: #edf3ff; --accent-line: #c8d8fa;
  --surface: #fff; --shadow: 0 4px 18px #182b5005;
  font: 14px/1.5 Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141619; --side: #101215; --soft: #20242b; --text: #edf0f5;
  --muted: #a2aab8; --line: #2b3039; --inverse: #111;
  --accent: #8ab4ff; --accent-soft: #1b293f; --accent-line: #334c73;
  --surface: #181b20; --shadow: 0 4px 18px #0000000d;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--text); padding: 9px 12px; font-size: 12px; transition: background .15s ease; }
button:hover { background: var(--soft); }
button.primary { background: var(--text); border-color: var(--text); color: var(--inverse); }
button.primary:hover { opacity: .85; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
a { color: inherit; }
p { color: var(--muted); margin: 8px 0 18px; line-height: 1.7; overflow-wrap: anywhere; }
h1, h2, h3 { font-weight: 550; letter-spacing: -.04em; line-height: 1.3; }
h1 { font-size: 32px; } h2 { font-size: 23px; margin: 0 0 8px; } h3 { font-size: 16px; margin: 17px 0 8px; }
small, .muted { color: var(--muted); font-size: 11px; }
#app { display: flex; min-height: 100vh; }
aside { width: 232px; flex-shrink: 0; background: var(--side); border-right: 1px solid var(--line); padding: 28px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: -.7px; margin-bottom: 28px; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; background: var(--text); color: var(--inverse); border-radius: 7px; transform: rotate(-4deg); font-size: 19px; font-weight: 500; }
.brand small { margin-left: auto; font-size: 8px; letter-spacing: 1.5px; }
.new-project { text-align: left; margin-bottom: 20px; background: var(--bg); padding: 11px; }
.continue-provider { text-align: left; margin: -12px 0 20px; color: var(--accent); font-size: 11px; flex-shrink: 0; }
.project-select { font-size: 10px; letter-spacing: .7px; }
.project-select select { background: var(--soft); border-color: transparent; font-size: 12px; letter-spacing: 0; }
nav { display: grid; gap: 4px; margin: 4px 0 18px; }
nav button { display: flex; align-items: center; gap: 11px; text-align: left; border: 0; color: var(--muted); padding: 10px 11px; }
nav button svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
nav button.active { background: var(--soft); color: var(--text); font-weight: 600; }
nav button.active:after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--text); margin-left: auto; }
.sidebar-foot { margin-top: auto; padding-top: 18px; }
.sidebar-foot button { width: 100%; text-align: left; font-size: 11px; }
.sidebar-foot p { font-size: 11px; margin: 20px 0 4px; }
.sidebar-foot small { font-size: 10px; display: block; }
.sidebar-foot a { display: block; text-decoration: none; font-size: 10px; color: var(--muted); margin-top: 15px; }
main { flex: 1; min-width: 0; }
header { height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 30px; font-size: 11px; }
header > span:first-of-type { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.status { white-space: nowrap; border: 1px solid var(--line); padding: 5px 9px; border-radius: 20px; color: var(--muted); font-size: 10px; }
.header-controls { display: flex; align-items: center; gap: 12px; }
.header-controls button { font-size: 11px; padding: 6px 9px; }
.memory-receipt { border-left: 2px solid var(--text); padding: 12px 18px; margin-top: 15px; font-size: 13px; }
.memory-entry { border-top: 1px solid var(--line); padding: 20px 0; }
.memory-entry p { white-space: pre-wrap; color: var(--text); }
.mobile-menu { display: none; }
.content { max-width: 1600px; margin: auto; padding: 32px; }
.home-content { padding: 0 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-head p { margin-bottom: 0; font-size: 13px; }
.section-head .actions { margin: 0; }
.panel { border: 1px solid var(--line); border-radius: 10px; padding: 24px; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 20px; }
.cards p, .prose p { white-space: pre-wrap; }
.tag { display: inline-block; background: var(--soft); color: var(--muted); padding: 5px 8px; border-radius: 5px; font-size: 10px; letter-spacing: .2px; }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); font-size: 16px; }
.avatar.small { width: 24px; height: 24px; font-size: 11px; border-radius: 50%; }
.banner { border: 1px solid var(--line); border-radius: 9px; padding: 20px; margin-bottom: 25px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.banner p { font-size: 12px; margin-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.agent-card { display: flex; flex-direction: column; }
.agent-card .section-head { margin-bottom: 8px; }
.agent-card h3 { margin-top: 12px; }
.agent-card > .actions { margin-top: auto; padding-top: 18px; }
.agent-current { border-top: 1px solid var(--line); padding: 16px 0; font-size: 12px; }
.agent-current p { font-size: 12px; margin: 6px 0; }
.agent-history { border-top: 1px solid var(--line); padding: 18px 0; font-size: 13px; }
.agent-history p { font-size: 11px; }
.plugin-note { margin-top: 24px; }
label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
input, textarea, select { width: 100%; display: block; margin-top: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }
textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
select[multiple] { min-height: 100px; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; margin: 0; accent-color: var(--text); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.big { display: block; font-size: 36px; font-weight: 500; margin: 24px 0; }
.big small { font-size: 16px; }
progress { width: 100%; height: 6px; accent-color: var(--text); }
hr { border: 0; border-top: 1px solid var(--line); margin: 25px 0; }
.prose { max-width: 900px; }
.prose h3 { margin-top: 25px; }
.success { font-size: 12px; }
.event { display: flex; gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.event:last-child { border-bottom: 0; }
.event time { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.task-toolbar { display: flex; gap: 12px; margin-bottom: 25px; }
.task-toolbar input, .task-toolbar select { margin: 0; font-size: 12px; }
.task-toolbar select { width: 180px; }
.board { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.column { border-top: 1px solid var(--line); padding-top: 18px; min-width: 0; }
.column-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 17px; }
.column-head span { background: var(--soft); padding: 1px 6px; border-radius: 4px; }
.task { border: 1px solid var(--line); border-radius: 9px; padding: 17px; margin: 14px 0; background: var(--bg); }
.task h3 { font-size: 14px; line-height: 1.5; letter-spacing: -.2px; overflow-wrap: anywhere; }
.task p { font-size: 12px; }
.task button { font-size: 11px; padding: 8px 10px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-top > .muted { font-size: 10px; text-align: right; }
.assignee { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11px; margin: 16px 0; }
details { font-size: 12px; color: var(--muted); }
summary { cursor: pointer; line-height: 1.6; color: var(--text); }
details p { white-space: pre-wrap; font-size: 12px; }
details ul { padding-left: 18px; line-height: 1.8; }
.warning { border-left: 2px solid var(--text); padding-left: 10px; margin-top: 15px; }
.output-preview { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 15px; font-size: 12px; }
.output-preview p { font-size: 12px; margin-bottom: 0; }
.empty { border: 1px dashed var(--line); border-radius: 8px; padding: 45px 20px; text-align: center; font-size: 13px; color: var(--muted); grid-column: 1/-1; }
.empty-small { color: var(--muted); padding: 35px 10px; font-size: 12px; text-align: center; }
.chat-layout { display: grid; grid-template-columns: minmax(0,1fr) 205px; gap: 36px; height: calc(100dvh - 72px); min-height: 0; }
.conversation { display: flex; flex-direction: column; max-width: 850px; width: 100%; height: 100%; margin: 0 auto; min-width: 0; min-height: 0; }
.setup-strip { margin-top: 22px; padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 11px; color: var(--muted); }
.setup-strip button { flex-shrink: 0; font-size: 11px; }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 30px 4px 0; scrollbar-width: thin; }
.messages:has(.chat-empty) { display: grid; place-items: center; padding-top: 10px; }
.messages .chat-empty { min-height: 0; padding: 24px 0; width: 100%; }
.chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 47vh; text-align: center; }
.home-emblem { font-size: 50px; line-height: 1; margin-bottom: 23px; font-weight: 300; }
.chat-empty h1 { font-size: clamp(25px,2.6vw,38px); font-weight: 450; letter-spacing: -1.3px; margin: 0 0 6px; }
.chat-empty p { font-size: 13px; }
.starter-prompts { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.starter-prompts button { border-radius: 20px; font-size: 11px; }
.message { padding: 20px 0; overflow-wrap: anywhere; }
.message > p { white-space: pre-wrap; color: var(--text); font-size: 14px; }
.message > .muted { color: var(--muted); font-size: 12px; }
.message-meta { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.message-meta span { color: var(--muted); font-size: 10px; font-weight: 400; }
.user-message { background: var(--side); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.user-message p { margin-bottom: 0; }
.composer { flex-shrink: 0; background: var(--side); border: 1px solid var(--line); border-radius: 18px; padding: 15px 18px 12px; margin-top: 22px; }
.composer:focus-within { border-color: var(--muted); }
.composer textarea { background: transparent; border: 0; padding: 8px 0; margin: 0; min-height: 82px; max-height: 250px; font-size: 14px; }
.composer textarea:focus { outline: none; }
.composer textarea::placeholder { color: var(--muted); }
.composer textarea { min-height: 40px; max-height: 220px; resize: none; overflow-y: hidden; }
.composer-controls { display: flex; justify-content: space-between; align-items: end; gap: 15px; }
.composer-controls label { margin: 0; font-size: 9px; max-width: 75%; }
.composer-controls select { font-size: 11px; border-radius: 20px; padding: 7px 12px; margin-top: 5px; background: transparent; }
.composer-controls select { background: #171717; color: #fff; border-color: #171717; color-scheme: dark; }
.composer-controls select option { background: #171717; color: #fff; }
:root[data-theme="dark"] .composer-controls select { background: #fff; color: #111; border-color: #fff; color-scheme: light; }
:root[data-theme="dark"] .composer-controls select option { background: #fff; color: #111; }
.provider-results { max-height: 42vh; overflow-y: auto; }
.provider-row { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 15px 2px; border-top: 1px solid var(--line); }
.provider-row small { display: block; margin-top: 4px; }
.provider-row button { flex-shrink: 0; }
.composer-controls button { border-radius: 22px; padding: 9px 16px; }
.chat-footnote { font-size: 10px; text-align: center; margin: 14px 0 20px; }
.team-rail { border-left: 1px solid var(--line); padding: 30px 0 20px 22px; overflow-y: auto; scrollbar-width: thin; min-height: 0; }
.team-rail > details > summary { font-size: 11px; font-weight: 600; letter-spacing: .2px; margin-bottom: 10px; }
.team-rail > details > summary span { display: inline-block; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 10px; margin-left: 6px; }
.agent-status { padding: 18px 0; border-bottom: 1px solid var(--line); }
.agent-status-button { display: block; border: 0; padding: 0; font-size: 12px; font-weight: 600; text-align: left; width: 100%; }
.agent-status-button:hover { text-decoration: underline; background: none; }
.manager-label { display: inline-block; font-size: 8px; text-transform: uppercase; letter-spacing: .5px; font-weight: 400; border: 1px solid var(--line); border-radius: 3px; padding: 1px 4px; margin-left: 5px; }
.agent-provider { display: block; font-size: 10px; color: var(--muted); margin: 6px 0 10px; }
.agent-state-label { display: block; font-size: 10px; font-weight: 500; }
.agent-state-label:before { content: ''; display: inline-block; width: 4px; height: 4px; background: var(--muted); border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.agent-task-title { font-size: 10px; line-height: 1.6; margin: 7px 0 0; color: var(--muted); }
.agent-updated { display: block; font-size: 9px; color: var(--muted); margin-top: 8px; }
.rail-add { margin-top: 18px; width: 100%; font-size: 10px; }
.rail-budget { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 20px; }
.rail-budget span { font-size: 10px; display: block; color: var(--muted); }
.rail-budget strong { display: block; font-size: 12px; margin: 8px 0; }
.rail-budget button { font-size: 10px; border: 0; padding: 8px 0; }
.team-rail .chat-footnote { text-align: left; line-height: 1.7; margin-top: 18px; }
.plan-card { border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-top: 16px; }
.plan-card p { font-size: 12px; }
.plan-card ol { padding-left: 24px; margin: 20px 0; }
.plan-card li { padding: 7px 0 12px 5px; font-size: 12px; }
.plan-card li strong { display: block; font-weight: 500; }
.plan-card li span { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.plan-summary { font-size: 11px !important; color: var(--muted) !important; }
.plan-step, .template-agent { padding: 18px; border: 1px solid var(--line); border-radius: 7px; margin: 20px 0; min-width: 0; }
.plan-step legend { padding: 0 8px; font-size: 12px; }
.template-preview { border: 1px solid var(--line); border-radius: 7px; padding: 16px; margin-bottom: 16px; font-size: 12px; }
.template-preview ul { margin-bottom: 0; padding-left: 18px; }
.template-preview li { padding: 5px 0; }
.template-preview span { color: var(--muted); font-size: 11px; display: block; }
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); width: min(680px,calc(100vw - 30px)); max-height: 88vh; padding: 27px; }
dialog::backdrop { background: #0008; }
dialog footer { display: flex; justify-content: end; gap: 10px; margin-top: 24px; position: sticky; bottom: -27px; background: var(--bg); padding: 15px 0; border-top: 1px solid var(--line); }
dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.8 Inter,"Segoe UI",sans-serif; }
.form-error { font-size: 12px; color: var(--text); border-left: 2px solid var(--text); padding-left: 10px; }
.form-error:empty { display: none; }
#notice { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--inverse); padding: 13px 20px; border: 1px solid var(--line); border-radius: 7px; max-width: 90vw; font-size: 12px; display: none; z-index: 100; }
#notice.show { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media(min-width:1500px) { .conversation { max-width: 900px; } .home-content { padding: 0 45px; } }
@media(max-width:1150px) { .board { grid-template-columns: 1fr; } .two-col { grid-template-columns: 1fr; } .chat-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); gap: 0; } .team-rail { grid-row: 1; border: 0; border-bottom: 1px solid var(--line); padding: 14px 0 4px; max-height: 40dvh; } .conversation { grid-row: 2; min-height: 0; } .agent-status { display: inline-block; vertical-align: top; width: 32%; padding-right: 15px; } .rail-budget { max-width: 300px; } }
@media(max-width:700px) {
  aside { display: none; width: 100%; height: auto; position: static; padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  body.nav-open aside { display: flex; }
  #app { display: block; }
  nav { grid-template-columns: 1fr 1fr; }
  .sidebar-foot { margin: 0; padding: 10px 0 0; }
  .sidebar-foot p, .sidebar-foot small, .sidebar-foot a { display: none; }
  .mobile-menu { display: inline-block; border: 0; font-size: 17px; padding: 5px 8px; }
  header { height: 60px; gap: 10px; padding: 0 13px; }
  .status { font-size: 9px; padding: 4px 6px; }
  .header-controls { gap: 4px; }
  .content { padding: 24px 18px; }
  .home-content { padding: 0 18px; }
  .section-head, .banner { align-items: flex-start; flex-direction: column; }
  .cards { grid-template-columns: 1fr; }
  .setup-strip { align-items: flex-start; gap: 8px; }
  .setup-strip button { font-size: 10px; padding: 6px 9px; }
  .messages { padding-top: 24px; }
  .chat-empty { min-height: 40vh; }
  .chat-empty h1 { font-size: 26px; letter-spacing: -.8px; }
  .home-emblem { font-size: 40px; }
  .chat-layout { height: calc(100dvh - 60px); }
  .conversation { min-height: 0; }
  .composer { padding: 12px 14px; border-radius: 14px; }
  .composer-controls label { max-width: 68%; }
  .agent-status { width: 100%; padding: 18px 0; }
  .event { flex-direction: column; gap: 5px; }
  .task-toolbar { flex-direction: column; }
  .task-toolbar select { width: 100%; }
  .card-top { align-items: flex-start; }
  dialog { padding: 20px; }
  dialog footer { bottom: -20px; }
}
@media(prefers-reduced-motion:reduce) { * { transition: none !important; } }
/* Account stays anchored while the navigation scrolls. */
aside { overflow: visible; }
aside > .brand, aside > .new-project, aside > .project-select { flex-shrink: 0; }
nav { min-height: 0; overflow-y: auto; }
.account-footer { position: relative; flex-shrink: 0; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.account-footer summary { display: flex; align-items: center; gap: 10px; padding: 9px 3px; list-style: none; border-radius: 8px; }
.account-footer summary::-webkit-details-marker { display: none; }
.account-footer summary:hover { background: var(--soft); }
.account-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--text); color: var(--inverse); font-weight: 600; font-size: 13px; overflow: hidden; flex-shrink: 0; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-label { flex: 1; min-width: 0; }
.account-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.account-label small { display: block; font-size: 10px; }
.account-popover { position: absolute; bottom: calc(100% + 8px); left: 0; width: 240px; z-index: 30; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: 0 8px 30px #0002; }
.account-menu-title { font-size: 12px; font-weight: 600; padding: 8px; overflow-wrap: anywhere; }
.account-popover button { display: block; width: 100%; text-align: left; border: 0; padding: 11px 9px; }
.account-popover small { display: block; padding: 10px 8px; border-top: 1px solid var(--line); margin-top: 7px; font-size: 10px; }
#logo-preview { margin: 18px 0; }
#logo-preview .account-avatar { width: 64px; height: 64px; font-size: 22px; }
.usage-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.usage-totals span { font-size: 12px; color: var(--muted); }
.usage-totals strong { display: block; font-size: 30px; font-weight: 500; margin-top: 10px; }
.usage-count { font-size: 24px; font-weight: 500; }
.usage-unavailable { border-top: 1px solid var(--line); padding-top: 14px; font-size: 11px; color: var(--muted); }
.usage-unavailable strong { display: block; margin-top: 5px; font-weight: 500; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
@media(max-width:700px) { .usage-totals { grid-template-columns: 1fr; } .account-popover { width: min(280px,85vw); } .account-footer small { display: block; } }
.usage-switch { display: inline-flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 9px; margin-bottom: 25px; }
.usage-switch button { border: 0; min-width: 100px; }
.usage-switch button[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px #0001; }
.allowance-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.allowance-card { display: flex; flex-direction: column; }
.allowance-card h3 { margin-top: 22px; }
.allowance-detail { font-size: 12px; min-height: 42px; margin-bottom: 20px; }
.allowance-remaining { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.allowance-remaining span { font-size: 12px; color: var(--muted); }
.allowance-remaining strong { font-size: 27px; font-weight: 500; }
.allowance-track { width: 100%; height: 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--soft); }
.allowance-track.unknown { background: repeating-linear-gradient(135deg,var(--soft),var(--soft) 4px,var(--line) 4px,var(--line) 5px); }
.allowance-caption { font-size: 11px; margin: 12px 0 25px; }
.allowance-meta { margin: auto 0 15px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 11px; }
.allowance-meta div { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0; }
.allowance-meta dt { color: var(--muted); }
.allowance-meta dd { margin: 0; }
.allowance-note { margin-top: 30px; max-width: 760px; font-size: 12px; }
@media(max-width:1100px) { .allowance-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .allowance-grid { grid-template-columns: 1fr; } }

/* A restrained blue accent keeps the workspace quiet and readable. */
::selection { background: var(--accent-line); color: var(--text); }
button { transition: background .15s ease, border-color .15s ease, color .15s ease; }
button:hover { border-color: var(--accent-line); }
button.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
button.primary:hover { background: #1d4ed8; border-color: #1d4ed8; opacity: 1; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline-color: var(--accent); }
.brand-mark { background: #2563eb; color: #fff; transform: none; box-shadow: 0 3px 10px #2563eb26; }
nav button.active { background: var(--accent-soft); color: var(--accent); }
nav button.active:after { background: var(--accent); width: 5px; height: 5px; }
.new-project { border-color: var(--accent-line); }
.new-project:hover { background: var(--accent-soft); }
.panel, .task, .plan-card { background: var(--surface); box-shadow: var(--shadow); border-radius: 12px; }
.panel { transition: border-color .15s ease; }
.agent-card:hover, .allowance-card:hover { border-color: var(--accent-line); }
.avatar { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.home-emblem { color: var(--accent); }
.composer { background: var(--surface); box-shadow: 0 5px 24px #00000008; border-radius: 20px; transition: border-color .15s ease, box-shadow .15s ease; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.starter-prompts button:hover { background: var(--accent-soft); color: var(--accent); }
.manager-label { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.memory-receipt { border-color: var(--accent); }
.check input, progress { accent-color: var(--accent); }
.usage-switch button[aria-pressed="true"] { color: var(--accent); background: var(--surface); }
.account-avatar { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.account-popover { box-shadow: 0 12px 36px #0002; }
.account-popover button:hover { background: var(--accent-soft); color: var(--accent); }
dialog { box-shadow: 0 24px 80px #0003; }
dialog::backdrop { backdrop-filter: blur(3px); }
@media(prefers-reduced-motion:reduce) { .panel, .composer { transition: none; } }

/* Continuous blue seams connect navigation to every workspace view. */
:root { --connection-line: #c5d9f7; }
:root[data-theme="dark"] { --connection-line: #344d70; }
aside { border-right-color: var(--connection-line); }
header { border-bottom-color: var(--connection-line); }
.account-footer { border-top-color: var(--connection-line); }
nav { padding-right: 18px; margin-right: -18px; }
nav button { position: relative; }
nav button.active { overflow: visible; }
nav button.active:before { content: ''; position: absolute; right: -18px; top: 50%; width: 18px; height: 1px; background: var(--connection-line); }
nav button.active:after { box-shadow: 0 0 0 3px var(--accent-soft); }
.team-rail { border-left-color: var(--connection-line); }
.composer { border-color: var(--connection-line); }
@media(max-width:1150px) { .team-rail { border-bottom-color: var(--connection-line); } }
@media(max-width:700px) { aside { border-bottom-color: var(--connection-line); } nav button.active:before { display: none; } }

.brand-mark { width: 35px; height: 35px; background: transparent; box-shadow: none; flex-shrink: 0; }
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand { gap: 9px; letter-spacing: -.55px; }
.home-emblem img { width: 64px; height: 64px; display: block; }
.provider-avatar { background: var(--surface); border-color: var(--line); color: var(--muted); flex-shrink: 0; }
.provider-avatar img { width: 24px; height: 24px; display: block; object-fit: contain; }
.provider-avatar.small img { width: 16px; height: 16px; }
:root[data-theme="dark"] .mono-logo { filter: brightness(0) invert(1); }
.provider-row-label { flex: 1; min-width: 0; }
.source-choices { max-height: 230px; overflow-y: auto; margin-bottom: 20px; }
.source-choice { padding: 12px; margin: 0; border-bottom: 1px solid var(--line); color: var(--text); }
.source-choice[hidden] { display: none; }
.source-choice small { display: block; }
.source-history { border-top: 1px solid var(--line); padding: 16px 0; }


.header-signin,.account-auth{color:var(--accent);font-weight:600;text-decoration:none;border:1px solid var(--accent-line);border-radius:8px;padding:7px 13px;display:inline-block}.account-auth{display:block;margin:8px 0}.login-page{min-height:100dvh;display:grid;place-items:center;padding:28px;background:radial-gradient(ellipse at 50% 0%,#eaf2ff,transparent 65%),#fafbfe;color:#152036}.login-card{width:min(100%,460px);background:#fff;border:1px solid #dce5f3;border-radius:24px;padding:40px;box-shadow:0 24px 80px #162c5910}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:48px;color:inherit;font-size:20px;font-weight:650;text-decoration:none}.login-brand img{width:44px;height:44px}.login-card h1{font-size:36px;line-height:1.15;letter-spacing:-1.2px;margin:22px 0 16px}.login-card p{color:#657086;line-height:1.65}.login-primary{display:flex;justify-content:space-between;align-items:center;margin:28px 0 16px;background:#2463eb;color:#fff;text-decoration:none;font-weight:600;border-radius:12px;padding:16px 20px}.login-primary:hover{background:#194eca}.login-note{font-size:12px}.login-divider{height:1px;background:#e3e9f2;margin:28px 0}.login-secondary{font-size:14px;color:#2563eb;text-decoration:none}.login-card a:focus-visible{outline:3px solid #8ab4ff;outline-offset:4px}@media(max-width:520px){.login-card{padding:26px}.login-card h1{font-size:30px}.header-controls{flex-wrap:wrap}}

.plans-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:24px 0}.plan-card{display:flex;flex-direction:column;padding:28px}.plan-card h3{font-size:26px;margin:22px 0 0}.plan-price{font-size:42px;font-weight:650;letter-spacing:-1.5px;margin:24px 0}.plan-price small{font-size:14px;letter-spacing:0;font-weight:400;color:var(--muted)}.plan-projects{padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.plan-projects strong{font-size:24px}.plan-card ul{padding-left:18px;line-height:1.7;flex:1}.plan-card li{margin:8px 0}.plan-featured{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-line)}.plan-status{font-size:12px;color:var(--muted);padding-top:16px}.model-note{font-size:12px;line-height:1.6}.agent-model{font-size:12px;color:var(--accent)}.custom-model[hidden]{display:none}@media(max-width:900px){.plans-grid{grid-template-columns:1fr}}

/* Provider catalogue and secure account setup */
.provider-row{flex-wrap:wrap;gap:10px}.provider-row-label{flex:1;min-width:150px}.provider-row button{font-size:12px}.connection-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.provider-login-link{display:inline-block;color:var(--text);border:1px solid var(--border);border-radius:9px;padding:10px 14px;text-decoration:none;font-weight:600}.provider-login-link:hover{border-color:#64a6ff}.connection-steps{padding-left:22px;line-height:1.7}#connection-status{padding:12px;border:1px solid var(--border);border-radius:9px}#connection-consent{flex-shrink:0}#provider-match-count{font-size:12px}.provider-results{max-height:48vh;overflow:auto}
