:root { font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #182327; background: #fbfbf8; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #216c84; outline-offset: 3px; }
.skip { position: absolute; top: -4rem; left: 1rem; padding: .5rem; background: white; z-index: 5; }
.skip:focus { top: .5rem; }
.site-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem clamp(1rem, 4vw, 4rem); border-bottom: 1px solid #d8dedc; }
.brand { font-size: 1.35rem; font-weight: 740; letter-spacing: -.03em; }
.brand span { display: block; font-size: .72rem; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; color: #58686b; }
#identity { font-size: .9rem; color: #405458; }
.session-controls { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.session-controls [hidden] { display: none; }
.layout { display: grid; grid-template-columns: minmax(10rem, 13rem) minmax(0, 54rem); gap: clamp(1rem, 3vw, 3rem); margin: 0 auto; max-width: 78rem; padding: 2rem clamp(1rem, 4vw, 4rem); }
.rail { display: flex; flex-direction: column; gap: .3rem; align-self: start; }
.rail button { border: 0; border-radius: .4rem; background: transparent; text-align: left; padding: .65rem .8rem; color: #30464a; }
.rail button[aria-current="page"] { background: #e1edeb; color: #123e46; font-weight: 700; }
.content { min-width: 0; }
h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; margin: .2rem 0 1.2rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .65rem; }
p { max-width: 64ch; }
.muted { color: #536366; }
.eyebrow { margin: 0; color: #526a6c; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.notice:not(:empty) { border-left: 4px solid #b26c22; background: #fff1db; padding: .65rem 1rem; margin-bottom: 1.2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.primary, .secondary { border-radius: .4rem; padding: .6rem .9rem; font-weight: 650; }
.primary { border: 1px solid #14596b; background: #14596b; color: white; }
.secondary { border: 1px solid #9db1b0; background: white; color: #123e46; }
.back { background: none; border: 0; padding: .2rem 0; color: #165c70; font-weight: 650; margin-bottom: 1.3rem; }
.state-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.state-control { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .3rem; border: 2px solid #778f8e; border-radius: .4rem; background: white; color: #123e46; padding: .45rem .65rem; font-weight: 650; }
.state-control[aria-pressed="true"] { border-color: #123e46; background: #e1edeb; }
.state-control.has-attention { border-color: #96251f; color: #96251f; background: #fff0ed; }
.state-control small { width: 100%; font-weight: 500; }
.state-selected { font-size: .78rem; text-decoration: underline; }
.state-icon { display: inline-flex; justify-content: center; min-width: 1.2em; }
.task-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid #d8dedc; }
.task-list li { border-bottom: 1px solid #d8dedc; }
.task-list button { display: flex; justify-content: space-between; gap: 1rem; width: 100%; padding: 1rem .75rem; border: 0; background: transparent; text-align: left; }
.task-list .attention { background: #fde8e5; border-left: 5px solid #b43a31; }
.task-title { font-weight: 650; }
.state { white-space: nowrap; color: #35535b; font-size: .9rem; }
.attention .state { color: #96251f; font-weight: 700; }
.waiting { background: #e8f2f0; border-left: 4px solid #2e6f72; padding: .8rem 1rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid #b8c9c7; }
.timeline li { position: relative; padding: 0 0 1.15rem 1rem; }
.timeline li::before { content: ""; position: absolute; left: -.36rem; top: .55rem; width: .6rem; height: .6rem; background: #6f9290; border-radius: 50%; }
.timeline li.latest::before { background: #b43a31; }
.timeline li.earlier { color: #526165; }
.timeline small { color: #56676a; }
.timeline strong { display: block; }
.history-divider { margin: 1.2rem 0; padding-top: .5rem; border-top: 1px dashed #91aaa8; color: #506368; }
.artifacts { padding-left: 1.25rem; }
.artifacts li { padding: .35rem 0; }
.field { display: grid; gap: .25rem; margin: 1rem 0; max-width: 34rem; font-weight: 600; }
.field input, .field textarea { border: 1px solid #8fa6a5; border-radius: .35rem; padding: .65rem; background: white; color: #182327; }
.field textarea { min-height: 7rem; }
.error { color: #9a2524; }
@media (max-width: 680px) { .layout { grid-template-columns: 1fr; padding-top: 1rem; } .rail { flex-direction: row; border-bottom: 1px solid #d8dedc; padding-bottom: .7rem; } .rail button { flex: 1; text-align: center; } .site-head { align-items: start; flex-direction: column; } }
.field select { border: 1px solid #8fa6a5; border-radius: .35rem; padding: .65rem; background: white; color: #182327; }
.result-preview { max-height: 20rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #eef4f2; padding: 1rem; border-radius: .35rem; }

/* S283 Figma console: presentation only. Existing task and auth routes remain in app.mjs. */
:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #edf3f7; background: #090c10; color-scheme: dark;
  --gw-panel: #111820; --gw-raised: #17212b; --gw-line: #2c3a46;
  --gw-muted: #a4b3c2; --gw-mint: #9bf5d0; --gw-amber: #f7d08a; --gw-blue: #aad2ff;
}
:focus-visible { outline: 2px solid var(--gw-mint); outline-offset: 3px; }
.skip { background: var(--gw-mint); color: #09251c; }
.site-head {
  min-height: 88px; padding: 1.25rem 1.5rem; background: var(--gw-panel);
  border-color: var(--gw-line);
}
.brand { display: flex; align-items: center; gap: 1.5rem; font-size: 1.4rem; font-weight: 650; }
.brand-mark { color: var(--gw-mint); }
.brand-name { color: #edf3f7; }
.brand .brand-mark, .brand .brand-name {
  display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit;
  text-transform: none;
}
.brand .brand-mark { color: var(--gw-mint); }
.brand .brand-name { color: #edf3f7; }
#identity { color: var(--gw-muted); overflow-wrap: anywhere; }
.layout { grid-template-columns: 220px minmax(0, 1fr); gap: 0; max-width: none; min-height: calc(100vh - 88px); padding: 0; margin: 0; }
.rail { align-self: stretch; gap: .35rem; padding: 1.5rem; background: var(--gw-panel); border-right: 1px solid var(--gw-line); }
.rail-label { margin: 0 0 .5rem; color: var(--gw-muted); font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.rail button { border-radius: .55rem; color: var(--gw-muted); }
.rail button:hover { background: var(--gw-raised); color: #edf3f7; }
.rail button[aria-current="page"] { background: var(--gw-raised); color: var(--gw-mint); }
.rail-note { border-top: 1px solid var(--gw-line); padding-top: 1rem; color: var(--gw-muted); font-size: .76rem; line-height: 1.6; }
.content { width: min(calc(100% - 80px), 1260px); margin-inline: auto; padding: 2rem 0 4rem; }
h1 { font-size: clamp(1.85rem, 3vw, 2.25rem); letter-spacing: -.035em; margin-bottom: .75rem; }
h2 { letter-spacing: -.02em; }
.muted { color: var(--gw-muted); }
.eyebrow { color: var(--gw-mint); }
.hero-line { margin: 0 0 .2rem; font-size: 1.2rem; font-weight: 600; }
.intro { margin: 0 0 1.5rem; }
.notice:not(:empty) { border-left-color: var(--gw-amber); background: #24231e; border-radius: .4rem; }
.panel { border: 1px solid var(--gw-line); border-radius: 1rem; background: var(--gw-panel); }
/* Task action cards are bare panels. Cards with their own layout classes already
   supply padding; keep their spacing unchanged. */
.content #view > section[class="panel"] { min-width: 0; padding: 1.5rem; margin: 1.5rem 0; overflow-wrap: anywhere; }
.count-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 1.75rem; }
.count-card { min-height: 185px; display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; padding: 1.5rem; }
.count-number { font-size: 2.25rem; line-height: 1.2; font-weight: 650; }
.count-card small { color: var(--gw-muted); font-size: .82rem; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 6rem; min-height: 2rem; padding: .25rem .7rem; border-radius: .5rem; background: var(--gw-raised); font-size: .81rem; font-weight: 650; white-space: nowrap; }
.state-needs-you { color: var(--gw-amber); }
.state-working { color: var(--gw-blue); }
.state-ready { color: var(--gw-mint); }
.state-done { color: var(--gw-muted); }
.list-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1.4rem; margin-top: .2rem; }
.list-heading h2 { margin: 0; font-size: 1.4rem; }
.list-heading .muted { font-size: .9rem; }
.state-controls { gap: .55rem; margin: 1rem 0; }
.state-control { border: 1px solid var(--gw-line); border-radius: .55rem; background: var(--gw-raised); color: var(--gw-muted); padding: .45rem .65rem; font-size: .81rem; }
.state-control { min-height: 44px; }
.state-control strong { color: #edf3f7; }
.state-control[aria-pressed="true"] { border: 1px solid var(--gw-mint); background: var(--gw-raised); color: var(--gw-mint); }
.state-control.has-attention { border: 1px solid var(--gw-line); background: var(--gw-raised); color: var(--gw-amber); }
.state-control small { width: auto; color: var(--gw-muted); }
.state-icon { display: none; }
.state-selected { color: var(--gw-mint); font-size: .7rem; font-weight: 700; text-decoration: none; }
.count-card:not(.has-attention) .state-needs-you { color: var(--gw-muted); }
.count-card.has-attention { border-color: #705d3d; }
.task-list { padding: .55rem 1.5rem; border: 1px solid var(--gw-line); background: var(--gw-panel); border-radius: 1rem; }
.task-list li { border-bottom: 0; }
.task-list li + li { border-top: 1px solid var(--gw-line); }
.task-list button { align-items: center; gap: 1.25rem; min-height: 64px; padding: .6rem 0; color: #edf3f7; }
.task-list .attention { border-left: 0; background: transparent; }
.task-list button:hover .task-title { color: var(--gw-mint); }
.task-text { display: grid; gap: .12rem; min-width: 0; flex: 1; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-meta { color: var(--gw-muted); font-size: .75rem; }
.row-action { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 120px; padding: .5rem .8rem; border: 1px solid var(--gw-line); border-radius: .7rem; background: var(--gw-raised); font-size: .82rem; font-weight: 650; }
.attention .row-action { color: #09251c; background: var(--gw-mint); border-color: var(--gw-mint); box-shadow: 0 0 10px rgba(155,245,208,.16); }
.composer { padding: 1.25rem 1.5rem; margin: 1.75rem 0 0; }
.composer h2 { margin: 0; font-size: 1.08rem; }
.empty-state { padding: 1.5rem; color: var(--gw-muted); }
.primary, .secondary { min-height: 48px; border-radius: .75rem; font-size: .9rem; }
.primary { border-color: var(--gw-mint); background: var(--gw-mint); color: #09251c; box-shadow: 0 0 10px rgba(155,245,208,.16); }
.secondary { border-color: var(--gw-line); background: var(--gw-raised); color: #edf3f7; }
.back { color: var(--gw-mint); }
.back { min-height: 48px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 1.5rem; margin: 1.5rem 0; }
.detail-main, .detail-context { min-width: 0; padding: 1.5rem; }
.document-review { padding: 1.5rem; }
.saved-review { display: grid; gap: 1.5rem; min-width: 0; margin: 1.5rem 0; }
.saved-review > h2 { margin: 0 0 .5rem; }
.saved-review > .muted { margin: 0; }
.saved-review-card { min-width: 0; padding: 1.5rem; overflow-wrap: anywhere; }
.saved-review-card h3 { margin: 0 0 1rem; font-size: 1.25rem; line-height: 1.4; }
.saved-review-draft h3 { margin-bottom: .5rem; }
.saved-review-card p { margin: 0; max-width: none; white-space: pre-wrap; }
.saved-review-draft textarea {
  display: block; width: 100%; min-height: 172px; padding: 1rem;
  border: 1px solid var(--gw-line); border-radius: .75rem;
  background: #090c10; color: #edf3f7; line-height: 1.5;
  resize: vertical; overflow-wrap: anywhere;
}
.saved-review-draft .muted { margin-top: 1rem; }
.saved-review-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.saved-review-actions [hidden] { display: none; }
.saved-review-draft details { margin-top: .35rem; }
.saved-review-draft details p { font-size: .875rem; overflow-wrap: anywhere; }
.workspace-panel { min-width: 0; padding: 1.5rem; margin: 1.5rem 0; }
.workspace-panel textarea { display: block; box-sizing: border-box; width: 100%;
  min-height: 7rem; margin: .75rem 0 1rem; padding: 1rem; border: 1px solid var(--gw-line);
  border-radius: .6rem; background: var(--gw-raised); color: inherit; font: inherit; }
.workspace-panel button { margin: .5rem .75rem .5rem 0; }
.workspace-panel li { overflow-wrap: anywhere; }
.file-selection { margin: .65rem 0 1rem; overflow-wrap: anywhere; }
.file-drop-zone { margin: .75rem 0; padding: 1rem; border: 2px dashed var(--gw-line); border-radius: .75rem; cursor: pointer; }
.file-drop-zone:focus-visible, .file-drop-zone.drag-over { outline: 3px solid #216c84; outline-offset: 2px; }
.file-selection p { margin: 0 0 .35rem; }
.selected-file-list { margin: 0; padding-left: 1.25rem; }
.selected-file-list li + li { margin-top: .2rem; }
.detail-main { overflow-wrap: anywhere; }
.detail-main h2, .detail-context h2 { margin: 1rem 0 .5rem; }
.waiting { background: #17242b; border-color: #315365; border-radius: .7rem; }
.timeline { border-left-color: var(--gw-line); }
.timeline li::before { background: var(--gw-muted); }
.timeline li.latest::before { background: var(--gw-mint); }
.timeline li.earlier, .timeline small, .history-divider { color: var(--gw-muted); }
.field input, .field textarea, .field select { border-color: #607180; border-radius: .55rem; background: #0c1319; color: #edf3f7; }
.error { color: var(--gw-amber); }
.result-preview { background: var(--gw-raised); color: #edf3f7; }
@media (max-width: 1279px) {
  .content { width: calc(100% - 48px); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .count-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .site-head { min-height: 70px; flex-wrap: wrap; gap: .5rem; padding: 1rem 1.25rem; }
  .brand { gap: .75rem; }
  .session-controls { width: 100%; justify-content: space-between; }
  .layout { display: block; min-height: 0; padding: 0 0 calc(5rem + env(safe-area-inset-bottom)); }
  .content { width: calc(100% - 32px); padding: 1.5rem 0 2rem; }
  .rail {
    position: fixed; z-index: 2; inset: auto 0 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem;
    padding: .5rem 1rem calc(.5rem + env(safe-area-inset-bottom));
    border: 0; border-top: 1px solid var(--gw-line);
  }
  .rail-label, .rail-note { display: none; }
  .rail button { min-width: 0; width: 100%; min-height: 48px; padding: .65rem .25rem; text-align: center; }
  .count-cards { gap: .6rem; }
  .count-card { min-height: 125px; gap: .35rem; padding: .9rem; }
  .count-number { font-size: 1.6rem; }
  .count-card small { font-size: .72rem; }
  .task-list { padding: .5rem 1rem; }
  .task-list button { display: grid; grid-template-columns: 1fr auto; gap: .45rem; padding: 1rem 0; }
  .task-text { grid-column: 1 / -1; }
  .row-action { min-width: 0; }
  .detail-main, .detail-context, .document-review { padding: 1.25rem; }
  .content #view > section[class="panel"] { padding: 1.25rem; }
}
@media (max-width: 380px) { .state-control small { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
}

/* A modal preserves the live task nodes rather than rebuilding the task view. */
.language-settings { width: min(32rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; padding: 1.5rem; color: #edf3f7; }
.language-settings::backdrop { background: rgb(0 0 0 / 65%); }
.language-settings button + button { margin-inline-start: .75rem; }
.language-settings select { font: inherit; }
