@font-face {
  font-family: Geist;
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBM-Plex-Mono-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --base: #08090a;
  --nav: #0f1213;
  --panel: var(--nav);
  --input: #151718;
  --recess: #151718;
  --accent-ink: #161617;
  --raised: #191c1d;
  --line: #242728;
  --text: #f2f2f3;
  --muted: #b9b9bf;
  --dim: #99999f;
  --lime: #b0c744;
  --lime-hover: #bfd655;
  --focus: var(--lime);
  --brand-lime: #c7f021;
  --selected: #323a24;
  --selected-line: #76874d;
  --selected-text: #d9e99a;
  --mint: #a9dec9;
  --green: #273b34;
  --blue: #a6cbff;
  --blue-surface: #293646;
  --amber: #f5cc82;
  --amber-surface: #41341f;
  --red: #ffb5b5;
  --red-surface: #44292d;
  --nav-current: #1c2021;
  --surface-hover: #242728;
  --tool: var(--raised);
  --tool-line: var(--line);
  --progress-track: #38383b;
  --stage-viewed: #263647;
  --backdrop: #080b0eb8;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  --ui-font: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --motion: 160ms cubic-bezier(.2, 0, .2, 1);
  --select-chevron: url("select-chevron-dark.svg");
  font: 15px/1.45 var(--ui-font);
  background: var(--base);
  color: var(--text);
}
:root[data-theme=light] {
  color-scheme: light;
  --select-chevron: url("select-chevron.svg");
  --base: #f8f8f8;
  --nav: #ffffff;
  --input: #f5f5f5;
  --recess: #fafafa;
  --raised: #f4f4f4;
  --line: #e6e6e6;
  --text: #191919;
  --muted: #454545;
  --dim: #676767;
  --accent-ink: #0d0d0d;
  --focus: #595959;
  --selected: #f0f0f0;
  --selected-line: #808080;
  --selected-text: var(--text);
  --mint: #246149;
  --green: #e9f4ee;
  --blue: #28578e;
  --blue-surface: #eaf1fb;
  --amber: #784d12;
  --amber-surface: #fcf1dd;
  --red: #942f36;
  --red-surface: #f8e7e8;
  --nav-current: #f0f0f0;
  --surface-hover: #ebebeb;
  --progress-track: #e6e6e6;
  --stage-viewed: #eef1f5;
  --backdrop: #24242460;
}
* { box-sizing: border-box; }
body, p, h1, h2, h3, h4 { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, .button {
  border: 1px solid var(--line);
  background: var(--input);
  border-radius: 6px;
}
button, .button {
  background: var(--raised);
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
}
button:not(:disabled):hover, .button:hover { border-color: var(--muted); }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.primary { color: var(--accent-ink); background: var(--lime); border-color: var(--lime); }
.primary:not(:disabled):hover { background: var(--lime-hover); border-color: var(--lime-hover); }
input, select, textarea { padding: 7px 9px; min-height: 40px; width: 100%; border: 0; border-radius: 6px; background-color: var(--input); }
:is(input, textarea):not([type=checkbox], [type=radio]) { appearance: none; }
:is(input, select, textarea):not([type=checkbox], [type=radio]):focus {
  outline: none;
  box-shadow: none;
}
[data-keyboard-focus] :is(input, select, textarea):not([type=checkbox], [type=radio]):focus-visible {
  box-shadow: inset 0 -2px var(--dim);
}
textarea { resize: vertical; }
input[readonly] { color: var(--muted); }
input::file-selector-button { background-color: var(--raised); color: inherit; border: 0; border-radius: 4px; padding: 3px 7px; }
select {
  appearance: none;
  padding-inline-end: 28px;
  background-image: var(--select-chevron);
  background-position: right 7px center;
  background-size: 18px 18px;
  background-repeat: no-repeat;
}
select option { background: var(--input); }
@media (forced-colors: active) {
  select { appearance: auto; background-image: none; }
  :is(input, select, textarea):not([type=checkbox], [type=radio]):focus-visible { outline: 2px solid Highlight; }
}
label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 14px; }
label input, label select, label textarea { color: var(--text); }
label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 8px; }
input[type=checkbox] { width: 16px; min-height: 16px; accent-color: var(--lime); }
small { font-size: 12px; line-height: 1.3; }
.mono { font: 12px/1.35 var(--mono); }
h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 17px; line-height: 1.25; }
.muted { color: var(--muted); }
.skip { position: fixed; top: 8px; left: 8px; padding: 12px; z-index: 2; transform: translateY(-150%); background: var(--base); }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.application { display: grid; grid-template-columns: 197px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 0 10px 13px;
  min-width: 0;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.sidebar-brand { display: flex; align-items: center; flex: 0 0 52px; gap: 4px; }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 5px; font-size: 14px; min-width: 0; }
.brand-mark { display: block; flex: 0 0 auto; }
.sidebar .brand { gap: 8px; font-size: 13px; }
.sidebar .brand .brand-mark { width: 28px; height: 28px; }
.brand small, .sidebar small { display: block; color: var(--dim); }
.sidebar-collapse { margin-left: auto; }
.sidebar-expand { display: none; width: 100%; min-height: 40px; padding: 0; background: transparent; border: 0; }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font: 500 12px var(--ui-font);
  background: var(--raised);
}
.avatar.mint { background: var(--mint); color: var(--accent-ink); font-weight: 700; }
[data-theme=light] .avatar.mint { color: var(--nav); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar.emoji-avatar { font-size: 18px; }
.blue { background: var(--blue-surface); color: var(--blue); }
.green { background: var(--green); color: var(--mint); }
.amber { background: var(--amber-surface); color: var(--amber); }
.red { background: var(--red-surface); color: var(--red); }
.navigation { display: grid; gap: 4px; }
.navigation a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 5px;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}
.navigation a:hover { color: var(--text); background: var(--raised); }
.navigation a[aria-current] { color: var(--text); background: var(--nav-current); }
.navigation a[aria-current]:hover { background: var(--surface-hover); }
.mine { border-top: 1px solid var(--line); padding: 14px 7px 0; overflow: auto; }
.mine > small { margin-bottom: 6px; }
.mine a { display: block; padding: 4px 0; color: var(--muted); overflow-wrap: anywhere; font-size: 13px; }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 2px; display: inline-block; background: var(--dim); margin-right: 8px; }
.mine .dot::before { border-radius: 50%; background: var(--mint); width: 6px; height: 6px; }
.sidebar-user { margin-top: auto; padding: 7px 6px; display: flex; align-items: center; gap: 8px; border-radius: 6px; }
.sidebar-user:is(:hover, [aria-current]) { background: var(--nav-current); }
.sidebar-user-info { min-width: 0; flex: 1; font-size: 12px; }
.sidebar-user-info b { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.icon-button { min-height: 30px; padding: 4px 6px; border-color: transparent; background: transparent; }
.icon { display: inline-flex; width: 16px; height: 16px; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon .neat-icon { stroke-width: 1.75; }
.app-area { min-width: 0; }
.topbar { min-height: 53px; background: var(--nav); border-bottom: 1px solid var(--line); padding: 0 19px; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.topbar nav { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.topbar .new-project { min-height: 34px; padding-inline: 10px; font-size: 12px; }
.topbar .new-project:hover { color: var(--accent-ink); }
.project-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.project-tools select { width: auto; max-width: min(190px, 25vw); min-height: 34px; font-size: 13px; }
.project-tool { position: relative; display: inline-flex; }
.project-tool button { width: 34px; min-height: 34px; padding: 0; border-color: var(--tool-line); background: var(--tool); color: var(--muted); }
.project-tool button:is(:hover, :focus-visible) { background: var(--surface-hover); color: var(--text); }
.project-tooltip { display: none; position: absolute; z-index: 2; inset: calc(100% + 6px) 0 auto auto; padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--raised); font-size: 12px; white-space: nowrap; pointer-events: none; }
.project-tool:hover .project-tooltip, .project-tool:focus-within .project-tooltip { display: block; }
.topbar a:hover, td a:hover, .mine a:hover { color: var(--mint); }
.crumb-with-icon { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; }
.crumb-separator { display: inline-flex; margin-inline: 5px; vertical-align: middle; }
.crumb-separator .icon { width: 12px; height: 12px; }
#main { padding: 20px; min-width: 0; }
[data-view=project] #main, [data-view=new] #main { padding: 12px 16px 15px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-heading p { color: var(--muted); margin-top: 7px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.panel-heading { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 9px; border-bottom: 1px solid var(--line); min-height: 51px; flex-wrap: wrap; }
.panel-body { padding: 14px; min-width: 0; }
.panel-foot { padding: 10px 14px; background: var(--nav); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-radius: 0 0 7px 7px; min-height: 56px; }
.panel-foot > .note { margin-right: auto; }
.profile-page { width: min(100%, 720px); margin-inline: auto; padding-block: 6px; }
.profile-fields { display: grid; gap: 17px; }
.photo-controls { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.photo-input { min-width: 0; flex: 1 1 185px; }
.photo-input input { font-size: 13px; }
.profile-avatar { width: 66px; height: 66px; flex-basis: 66px; border-radius: 8px; font-size: 20px; }
.profile-avatar-editor { display: flex; align-items: flex-start; gap: 12px; }
.profile-avatar-controls { display: grid; flex: 1; min-width: 0; gap: 9px; }
.profile-avatar-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-emoji-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-emoji-choices .emoji-choice { width: 34px; min-height: 34px; padding: 0; font-size: 17px; }
.profile-role, .profile-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.profile-role { font-size: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile-saved { color: var(--mint); font-size: 13px; }
.profile-saved:empty { display: none; }
.profile-logout { margin-inline-start: auto; color: var(--red); background: var(--panel); }
.stack { display: grid; gap: 17px; }
.portfolio { gap: 16px; }
[data-theme=light] .portfolio .panel { box-shadow: 0 1px 2px rgb(0 0 0 / 3%); }
.portfolio .panel-heading h2 { font-size: 16px; }
.metrics { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(32px, 31%, 66px);
  align-items: center;
  column-gap: 8px;
  padding: 12px 8px 12px 14px;
  min-height: 101px;
}
.tracker-email { display: block; color: var(--muted); }
.portfolio .panel-heading { flex-wrap: wrap; }
.portfolio .filters { min-width: 0; }
.portfolio .filters select { max-width: min(230px, 100%); }
.metric-copy { overflow-wrap: anywhere; }
.metric p { font-size: 12px; font-weight: 550; color: var(--muted); }
.metric strong { display: block; font: 650 30px/1.15 var(--ui-font); font-variant-numeric: tabular-nums; margin-top: 4px; }
.metric-relief { display: block; width: 100%; height: auto; }
.recent-event { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 148px) auto; align-items: baseline; gap: 9px; padding: 10px 13px; font-size: 12px; overflow-wrap: anywhere; }
.recent-event + .recent-event { border-top: 1px solid var(--line); }
.recent-event span.icon { align-self: center; color: var(--dim); }
.recent-event a, .recent-event time { color: var(--muted); }
.recent-event a:hover { color: var(--text); }
.ink-blue { color: var(--blue); }
.ink-amber { color: var(--amber); }
.ink-mint { color: var(--mint); }
.badge, .nav-count, .tag, .filters select {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  min-height: 23px;
  border-radius: 5px;
  font: 500 12px/1.3 var(--ui-font);
  background-color: var(--raised);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.navigation .nav-count { margin-left: auto; background: var(--brand-lime); color: var(--accent-ink); }
.badge.green { background: var(--green); color: var(--mint); }
.badge.blue { background: var(--blue-surface); color: var(--blue); }
.badge.amber { background: var(--amber-surface); color: var(--amber); }
.badge.red { background: var(--red-surface); color: var(--red); }
button.tag { border: 1px solid transparent; }
.tag[aria-pressed=true] { background: var(--selected); color: var(--selected-text); border-color: var(--selected-line); }
.filters, .actions, .tabs { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.filters select { width: auto; max-width: 230px; min-height: 30px; padding-inline-end: 28px; }
.filter-with-icon { display: inline-flex; position: relative; max-width: 100%; }
.filter-with-icon .icon { position: absolute; align-self: center; inset-inline-start: 8px; pointer-events: none; color: var(--muted); }
.filter-with-icon select { max-width: min(230px, 100%); padding-inline-start: 30px; }
@supports (appearance: base-select) and selector(select::picker(select)) {
  @media (forced-colors: none) {
    select:not([multiple], [size]),
    select:not([multiple], [size])::picker(select) {
      appearance: base-select;
    }
    select:not([multiple], [size]) {
      --picker-selected: var(--surface-hover);
      --picker-hover: var(--raised);
      --picker-outline: #97979d;
      --picker-shadow: rgb(0 0 0 / 38%);
      align-items: center;
      padding-inline-end: 7px;
      background-image: none;
    }
    [data-theme=light] select:not([multiple], [size]) {
      --picker-selected: var(--nav-current);
      --picker-hover: #f7f7f7;
      --picker-outline: #777;
      --picker-shadow: rgb(0 0 0 / 9%);
    }
    select:open:not([multiple], [size]) { box-shadow: inset 0 0 0 1px var(--picker-outline); }
    select::picker-icon {
      content: "";
      flex: none;
      align-self: center;
      inline-size: 18px;
      block-size: 18px;
      margin-inline-start: auto;
      background: var(--select-chevron) center / contain no-repeat;
    }
    select:open::picker-icon { rotate: 180deg; }
    select:not([multiple], [size])::picker(select) {
      position-area: block-end span-inline-end;
      position-try-order: normal;
      inline-size: anchor-size(width);
      min-inline-size: 0;
      max-inline-size: calc(100vw - 16px);
      max-block-size: min(280px, 50dvh);
      overflow: auto;
      margin-block: 6px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      color: var(--text);
      font: 400 14px/1.3 var(--ui-font);
      box-shadow: 0 8px 24px var(--picker-shadow);
    }
    select:not([multiple], [size]) option {
      display: flex;
      align-items: center;
      gap: 8px;
      min-block-size: 34px;
      padding: 4px 8px;
      border-radius: 5px;
      background: transparent;
      color: inherit;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    select:not([multiple], [size]) option + option { margin-block-start: 2px; }
    select:not([multiple], [size]) option:checked {
      background: var(--picker-selected);
      font-weight: 600;
    }
    select:not([multiple], [size]) option:not(:checked, :disabled):hover { background: var(--picker-hover); }
    select:not([multiple], [size]) option:focus-visible { outline: 1px solid var(--picker-outline); outline-offset: -1px; }
    select:not([multiple], [size]) option:disabled { color: var(--dim); }
    select:not([multiple], [size]) option:not(:checked)::checkmark { display: none; }
    select:not([multiple], [size]) option:checked::checkmark {
      content: "✓";
      order: 1;
      margin-inline-start: auto;
    }
  }
}
.table-scroll { overflow-x: auto; border-radius: 0 0 7px 7px; }
table { min-width: 630px; width: 100%; border-collapse: collapse; text-align: left; }
thead { background: var(--nav); }
th { font: 500 12px var(--ui-font); color: var(--dim); text-transform: uppercase; }
th, td { padding: 11px 14px; }
td { border-top: 1px solid var(--line); color: var(--muted); height: 49px; }
td:first-child { width: 44%; }
td a { display: inline-block; color: var(--text); font-weight: 600; }
tbody tr:hover, tbody tr:focus-within { background: var(--raised); }
.portfolio thead, .portfolio tbody tr:nth-child(even) { background: var(--recess); }
.portfolio tbody tr:is(:hover, :focus-within) { background: var(--raised); }
.portfolio th, .portfolio td { padding: 8px 13px; font-size: 13px; }
.portfolio th { font-size: 12px; text-transform: none; }
.portfolio td { height: 47px; }
.portfolio td:first-child { width: 40%; }
.portfolio td a { display: inline-flex; align-items: center; gap: 8px; }
.portfolio td a .icon { color: var(--dim); flex-shrink: 0; }
.project-progress { margin-bottom: 10px; padding: 6px 10px 8px; }
.project-progress summary { list-style: none; cursor: pointer; border-radius: 4px; padding: 0 4px; }
.project-progress summary::-webkit-details-marker { display: none; }
.progress-caption { display: flex; align-items: center; gap: 7px; min-height: 29px; color: var(--dim); font-size: 12px; }
.progress-caption b { color: var(--text); font-size: 13px; }
.progress-caption .icon { flex-shrink: 0; }
.progress-caption .icon:last-child { width: 14px; }
.project-progress[open] .progress-caption .icon:last-child { transform: rotate(180deg); }
.progress-preview { color: var(--blue); }
.progress-status { margin-left: auto; text-align: right; color: var(--muted); }
.progress-status[data-status=approval] { color: var(--amber); }
.progress-status:is([data-status=blocked], [data-status=failed], [data-status=interrupted]) { color: var(--red); }
.progress-track { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; padding-block: 4px 1px; }
.progress-track > span { height: 4px; border-radius: 2px; background: var(--progress-track); overflow: hidden; }
.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background-image: linear-gradient(90deg, rgb(0 0 0 / 22%), rgb(255 255 255 / 15%));
  transition: width 380ms cubic-bezier(.22, 1, .36, 1), background-color 380ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .progress-fill { transition: none; }
}
.stages { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; padding: 3px 4px 0; }
.stage { display: grid; align-content: start; gap: 1px; padding: 4px 3px; border-radius: 4px; color: var(--muted); font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.stage small { color: var(--dim); font-size: 11px; font-weight: 400; }
.stage.current { color: var(--selected-text); }
.stage[aria-current=step]:not(.current) { color: var(--text); background: var(--stage-viewed); }
.stage[data-status=done]:not([aria-current]) { color: var(--text); }
.project-layout { display: flex; flex-direction: column; height: calc(100dvh - 80px); min-height: 650px; }
.project-setup {
  --setup-inset: 24px;
  display: flex;
  flex: 1;
  flex-direction: column;
}
.setup-fields { padding-inline: var(--setup-inset); }
.setup-group {
  display: grid;
  grid-template-columns: 166px minmax(0, 1fr);
  gap: 16px;
  padding-block: 11px;
  border-top: 1px solid var(--line);
}
.setup-group h2 { padding-top: 2px; font-size: 14px; }
.setup-group .fields { gap: 9px 14px; }
.setup-group label { font-size: 12px; }
.setup-group :is(input, select) { min-height: 36px; font-size: 13px; }
.setup-chat {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 12px var(--setup-inset) 14px;
  border-top: 1px solid var(--line);
}
.system-providers { padding-block: 0; }
.system-provider {
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(160px, 2fr) minmax(0, 2fr);
  align-items: center;
  gap: 10px 14px;
  padding-block: 12px;
}
.system-provider + .system-provider { border-top: 1px solid var(--line); }
.system-provider-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.system-provider-name b { display: inline-flex; align-items: center; gap: 7px; }
.system-provider-icon { display: block; flex: none; }
[data-theme=dark] .system-provider-icon.openai { filter: invert(1); }
.system-provider .actions { justify-content: flex-start; }
.mcp-connection { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.mcp-connection code { min-width: 0; overflow-wrap: anywhere; }
.system-model-list { display: grid; gap: 6px; max-height: 280px; overflow: auto; }
.system-model-list label { justify-content: flex-start; overflow-wrap: anywhere; }
.system-model-list input { order: -1; flex: none; }
.system-model-list small { display: block; }
.setup-history { max-height: 260px; overflow: auto; padding: 3px; }
.setup-assistant { justify-self: start; min-width: 0; max-width: min(94%, 500px); }
.setup-suggestion { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; }
.message .setup-attachments { margin-top: 5px; }
.setup-attachments a:hover { text-decoration: underline; }
.setup-composer {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--input);
}
.setup-composer textarea {
  field-sizing: content;
  min-height: 30px;
  max-height: 110px;
  padding: 5px 3px;
  resize: none;
  font-size: 13px;
  background: transparent;
}
.setup-attachment-controls { display: flex; flex: none; gap: 8px; }
.setup-composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.setup-composer-tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.setup-composer-actions .chat-send { flex: none; }
.setup-model-select {
  field-sizing: content;
  width: auto;
  min-width: 0;
  max-width: 200px;
  min-height: 34px;
  padding-block: 4px;
  border: 1px solid var(--line);
  background-color: var(--raised);
  font-size: 12px;
  text-overflow: ellipsis;
}
.setup-icon-button { min-width: 34px; min-height: 34px; padding: 0; color: var(--muted); }
.setup-icon-button .icon { width: 19px; }
.setup-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.setup-attachments li, .setup-attachments a {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; overflow-wrap: anywhere;
}
.setup-attachments li {
  padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 12px;
}
.setup-attachments .icon { flex: none; width: 14px; }
.setup-attachments .setup-icon-button { flex: none; min-width: 24px; min-height: 24px; }
.setup-shared-files h3 { margin-bottom: 5px; font-size: 13px; }
.setup-submit { display: flex; justify-content: flex-end; padding: 0 var(--setup-inset) 14px; }
.setup-submit .primary { min-height: 38px; }
:root:not([data-theme=light]) .project-setup .primary { background: var(--brand-lime); border-color: var(--brand-lime); }
:root:not([data-theme=light]) .project-setup .primary:hover { background: var(--lime-hover); border-color: var(--lime-hover); }
[data-theme=light] :is(.project-setup .primary, .chat-send) { --lime: var(--brand-lime); }
.workspace-switch { display: none; }
.workspace {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, var(--project-chat-width, 37%)) 1px minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.workspace-divider { position: relative; background: var(--line); cursor: col-resize; touch-action: none; z-index: 1; }
.workspace-divider::after { content: ""; position: absolute; inset: 0 -6px; }
.workspace-divider:is(:hover, :focus-visible) { background: var(--focus); }
.workspace-divider:focus-visible { outline-offset: 0; }
.workspace > :is(.chat, .result) { min-width: 0; min-height: 0; background: transparent; border: 0; border-radius: 0; }
.workspace > :is(.chat, .result) > .panel-body { min-height: 0; max-height: none; overflow: auto; }
.workspace-header-actions { display: flex; align-items: center; gap: 5px; }
.workspace-icon-button { min-width: 32px; min-height: 32px; padding: 0; }
.workspace-icon-plain,
.workspace-icon-plain:not(:disabled):hover { background: transparent; border-color: transparent; }
.workspace-header-actions .tag { min-height: 32px; }
.workspace-activity { margin: 10px 12px 0; border: 1px solid var(--line); color: var(--blue); background: var(--input); }
.workspace:not([data-materials-hidden=true]) .chat [data-workflow-diagnostic] { display: none; }
.workspace .project-setup .setup-fields { padding: 0; }
.workspace .setup-group { grid-template-columns: 1fr; gap: 0; padding-block: 8px; }
.workspace .setup-group h2 { position: absolute; overflow: hidden; width: 1px; height: 1px; clip-path: inset(50%); }
.workspace .setup-group:first-child { border: 0; padding-block-start: 0; }
.workspace .setup-submit { padding-block: 8px; }
.workspace .setup-chat { padding: 0; gap: 0; }
.workspace .setup-history { flex: 1; max-height: none; min-height: 0; padding: 12px; }
.workspace .setup-chat .panel-foot { display: block; }
.workspace .setup-chat .panel-heading { flex-shrink: 0; }
body[data-workspace-expanded] :is(.topbar, .project-progress) { display: none; }
body[data-workspace-expanded] #main { padding: 0; }
body[data-workspace-expanded] .project-layout { height: 100dvh; min-height: 0; }
.workspace[data-expanded=true] { border-radius: 0; }
.workspace[data-materials-hidden=true] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(460px, 1fr); }
.workspace[data-materials-hidden=true] > :is(.result, .workspace-divider) { display: none; }
.workspace[data-materials-hidden=true] :is(.chat > .panel-body, .chat > .panel-foot, .setup-history) {
  width: min(100%, 900px);
  align-self: center;
}
.chat-next, .setup-launch, .chat-failure { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.setup-launch { justify-content: space-between; margin-block-end: 10px; }
.chat-failure { justify-content: space-between; }
.message-body, .markdown { min-width: 0; overflow-wrap: anywhere; }
.markdown { display: grid; gap: 7px; }
.markdown :is(p, blockquote) { white-space: pre-wrap; }
.markdown :is(ul, ol) { margin: 0; padding-inline-start: 20px; }
.markdown pre { margin: 0; padding: 8px 10px; overflow: auto; max-width: 100%; background: var(--recess); }
.markdown blockquote { margin: 0; padding-inline-start: 10px; border-inline-start: 2px solid var(--line); }
.markdown a { text-decoration: underline; }
.panel-preview { display: grid; gap: 10px; min-width: 0; }
.panel-preview iframe { display: block; width: 100%; height: min(68dvh, 900px); min-height: 350px; border: 0; background: #fff; }
.white-document { padding: clamp(14px, 3.5vw, 42px); background: #fff; color: #202124; border-radius: 6px; }
.white-document :is(.muted, .document-text) { color: #3c4043; }
.white-document header { margin-bottom: 14px; overflow-wrap: anywhere; }
.white-document a { color: #1247a2; }
.white-document pre { background: #f0f2f5; }
.white-document.native-document { padding: 0; overflow: hidden; }
.chat, .result { display: flex; flex-direction: column; }
.chat .panel-body, .result .panel-body { flex: 1; }
.chat .panel-heading, .result .panel-heading { min-height: 44px; padding: 6px 12px; }
.pane-title { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; letter-spacing: 0; }
.pane-title .icon { color: var(--dim); }
.result .panel-heading:has(.visually-hidden) { justify-content: flex-end; }
.chat .panel-body { display: grid; gap: 15px; align-content: start; overflow: auto; max-height: max(320px, calc(100dvh - 300px)); padding: 15px 12px 12px; }
.chat .panel-body .empty { padding: 0; }
.chat .panel-body .callout { border: 1px solid var(--line); background: transparent; color: var(--muted); font: 12px/1.3 var(--ui-font); }
.chat .panel-foot { margin-top: auto; padding: 0 11px 11px; background: transparent; border: 0; }
.chat-context:not([hidden]) { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 5px 8px;
  width: 100%;
  padding: 5px;
  background: var(--input);
  border-radius: 9px;
}
.chat-composer textarea {
  display: block;
  field-sizing: content;
  min-height: 33px;
  max-height: 110px;
  padding: 6px;
  resize: none;
  background-color: transparent;
  font-size: 13px;
}
.chat-composer select { grid-column: 1 / -1; }
.chat-send { width: 33px; min-height: 33px; padding: 0; border-radius: 7px; }
.message header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 13px; }
.message time { margin-left: auto; color: var(--muted); font-size: 12px; }
.message .avatar { width: 22px; height: 22px; flex-basis: 22px; border-radius: 5px; }
.message .avatar .icon { width: 12px; height: 12px; }
.message p { background: var(--nav); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.message.operator p { background: var(--blue-surface); color: var(--text); }
.chat .message p { padding: 0; border: 0; background: transparent; color: var(--text); font-size: 14px; line-height: 1.52; }
.chat-thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 16px;
}
.chat-thread > .message {
  width: fit-content;
  min-width: 0;
  max-width: min(94%, 500px);
  justify-self: start;
}
.chat-thread > .message.operator {
  display: grid;
  width: fit-content;
  max-width: min(78%, 385px);
  justify-self: end;
}
.chat .message header, .chat .message time { font-size: 11px; }
.chat .message.operator header { justify-content: flex-end; }
.chat .message time { margin-left: 0; }
.chat .message .avatar { display: none; }
.chat .chat-thread .message.operator p {
  justify-self: end;
  width: fit-content;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 11px 11px 4px 11px;
  background: var(--raised);
}
[data-theme=light] .chat .chat-thread .message.operator p { background: #eef1f5; }
.chat-reply-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  animation: chat-message-enter 200ms cubic-bezier(.22, 1, .36, 1) both;
}
.chat-reply-dots { display: flex; align-items: center; gap: 3px; }
.chat-reply-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  animation: chat-reply-pulse 860ms ease-in-out infinite;
}
.chat-reply-dots i:nth-child(2) { animation-delay: 130ms; }
.chat-reply-dots i:nth-child(3) { animation-delay: 260ms; }
.chat-message-enter { animation: chat-message-enter 230ms cubic-bezier(.22, 1, .36, 1) both; }
.chat-reply-paragraph { animation: chat-reply-enter 240ms ease-out both; }
@keyframes chat-reply-pulse {
  0%, 100% { opacity: .45; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}
@keyframes chat-message-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes chat-reply-enter { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .chat-reply-status, .chat-reply-dots i, .chat-message-enter, .chat-reply-paragraph { animation: none; }
}
.callout { border-radius: 6px; padding: 7px 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.result .panel-body { display: grid; align-content: start; gap: 11px; padding: 12px; }
.result .panel-body:has(> .google-preview) { display: flex; flex-direction: column; min-height: 0; }
.google-preview { display: flex; flex: 1; flex-direction: column; }
.google-preview .native-document { display: flex; flex: 1; }
.google-preview iframe { flex: 1; height: auto; min-height: min(60dvh, 420px); }
.result .panel-foot, .result .document, .result .research-activity { background: var(--recess); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
fieldset { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.field-error, #notice, .project-connection-notice, .form-error { color: var(--red); }
#notice, .project-connection-notice, .form-error { padding: 8px 10px; border-radius: 6px; background: var(--red-surface); }
#notice, .project-connection-notice { margin-bottom: 12px; }
.field-error { font-size: 12px; }
.result form { display: grid; gap: 11px; }
.card, .empty, .loading { padding: 14px; }
.empty, .loading { color: var(--muted); }
.card h2 { margin-bottom: 6px; }
.document { padding: 12px; background: var(--nav); border: 1px solid var(--line); border-radius: 9px; }
.document header { display: grid; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 9px; overflow-wrap: anywhere; }
.document-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.document-outline { display: grid; gap: 7px; }
.outline-heading { display: flex; align-items: baseline; gap: 8px; font-size: 13px; overflow-wrap: anywhere; }
.outline-heading .badge { flex-shrink: 0; }
.document-outline .document-text { font-size: 13px; color: var(--muted); }
.research-table { min-width: 0; padding: 10px; }
.research-table header { margin-top: 8px; }
.research-table th, .research-table td { padding: 6px 8px; font-size: 12px; }
.research-table th { text-transform: none; }
.research-table table { min-width: 490px; }
.research-table td { height: 36px; }
.research-table td:first-child { width: auto; }
.research-source { overflow-wrap: anywhere; min-width: 120px; color: var(--text); }
.version-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.version-comparison h4 { margin-bottom: 6px; }
.info-list { border: 1px solid var(--line); border-radius: 8px; background: var(--nav); }
.info-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 7px 9px; }
.info-row + .info-row { border-top: 1px solid var(--line); }
.info-row small { display: block; overflow-wrap: anywhere; }
.preview { background: var(--nav); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.preview iframe { display: block; border: 0; width: 100%; height: 350px; background: white; margin-inline: auto; }
.preview.phone iframe { max-width: 390px; height: 540px; }
.preview img { display: block; width: 100%; height: auto; }
.preview.phone img { max-width: 390px; margin-inline: auto; }
.users { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.user-card { padding: 14px; display: grid; gap: 9px; }
.user-card h3, .user-card a { overflow-wrap: anywhere; }
.user-card header { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.login { display: grid; place-items: center; min-height: 100dvh; padding: 20px; }
.login-card { width: min(100%, 440px); padding: 24px; display: grid; gap: 14px; }
.login-card h1 { font-size: 27px; }
.login-card form { display: grid; justify-items: start; gap: 12px; }
.login-card label { width: 100%; }
.login-card p { color: var(--muted); }
dialog { width: min(calc(100% - 30px), 550px); max-height: 85dvh; overflow: auto; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
dialog::backdrop { background: var(--backdrop); }
dialog > form { display: grid; gap: 12px; }
dialog .actions { justify-content: flex-end; }
dialog code, .digest { overflow-wrap: anywhere; }
@keyframes view-enter {
  from { opacity: .65; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .view-enter { animation: view-enter var(--motion); }
  .workspace-transition .view-enter { animation: none; }
  ::view-transition-group(root) { animation-duration: 180ms; }
  .workspace-transition-pending::view-transition-group(root),
  .workspace-transition-pending::view-transition-old(root),
  .workspace-transition-pending::view-transition-new(root) { animation-play-state: paused; }
  .navigation a, .stage, button, .button { transition: background-color var(--motion), border-color var(--motion), color var(--motion); }
}
@media (min-width: 901px) {
  [data-sidebar-collapsed] .application { grid-template-columns: 65px minmax(0, 1fr); }
  .sidebar { overflow: auto; }
  [data-sidebar-collapsed] .sidebar { padding-inline: 10px; }
  [data-sidebar-collapsed] .sidebar :is(.brand, .sidebar-collapse, .mine, .sidebar-user-info, .nav-label, .nav-count) { display: none; }
  [data-sidebar-collapsed] .sidebar-expand { display: inline-flex; }
  [data-sidebar-collapsed] .navigation a { justify-content: center; padding-inline: 0; }
  [data-sidebar-collapsed] .sidebar-user { justify-content: center; padding-inline: 0; }
}
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .application { transition: grid-template-columns var(--motion); }
}
@media (max-width: 1180px) {
  .users { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .application { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 12px; gap: 6px; border-right: 0; }
  .sidebar-brand { flex: 0 1 auto; min-height: 40px; }
  .mine, .sidebar-user-info, .sidebar-collapse { display: none; }
  .sidebar-user { order: 2; margin: 0; padding: 4px; }
  .navigation { display: flex; flex-wrap: wrap; }
  .topbar, [data-view=project] .topbar, [data-view=new] .topbar { min-height: 48px; padding-inline: 16px; }
  #main, [data-view=project] #main, [data-view=new] #main { padding: 16px; }
  .project-layout { min-height: 0; }
}
@media (max-width: 650px) {
  .system-provider { grid-template-columns: minmax(0, 1fr); }
  .project-setup { --setup-inset: 14px; }
  .setup-group { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .project-layout { height: auto; }
  .workspace-divider { display: none; }
  .workspace-switch { display: flex; gap: 6px; margin-bottom: 10px; }
  .workspace:not([data-expanded=true]) .workspace-materials-toggle { display: none; }
  .workspace[data-mobile-pane] { min-height: 0; }
  .workspace:not([data-expanded=true])[data-mobile-pane=chat] > .result,
  .workspace:not([data-expanded=true])[data-mobile-pane=result] > .chat { display: none; }
  body[data-workspace-expanded] .workspace-switch { display: none; }
  body[data-workspace-expanded] .project-layout { height: auto; min-height: 100dvh; }
  .workspace[data-expanded=true]:not([data-materials-hidden=true]) { grid-template-rows: max(460px, 60dvh) auto; }
  .workspace[data-expanded=true] > .result { border-top: 1px solid var(--line); }
  .workspace[data-mobile-pane=chat]:not([data-expanded=true]) > .chat { min-height: 460px; }
  .recent-event { grid-template-columns: auto minmax(0, 1fr) auto; }
  .recent-event a { grid-column: 2; grid-row: 2; }
  .recent-event time { grid-column: 3; grid-row: 1; }
  .stages { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .progress-caption { flex-wrap: wrap; }
  .topbar:has(.project-tools) { flex-wrap: wrap; padding-block: 6px; }
  .topbar:has(.project-tools) nav { flex-basis: 100%; }
  .project-tools { flex: 1; }
  .project-tools select { max-width: min(190px, 39vw); }
  .workspace:not([data-expanded=true]) .chat .panel-body { max-height: 285px; }
  .result { min-height: 360px; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .users, .fields, .version-comparison { grid-template-columns: minmax(0, 1fr); }
  .navigation { order: 3; flex-basis: 100%; }
  .navigation a { min-height: 32px; padding: 4px 6px; }
  h1 { font-size: 23px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
}

.mcp-identity { display: inline-flex; gap: 10px; align-items: center; }
.mcp-identity strong, .mcp-identity small { display: block; }

.mcp-member-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.mcp-member-form label {
  flex: 1 1 240px;
  max-width: 420px;
}
