@font-face { font-family: "Satoshi"; src: url("/static/satoshi-regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/static/satoshi-medium.woff2") format("woff2"); font-style: normal; font-weight: 500 650; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/static/satoshi-bold.woff2") format("woff2"); font-style: normal; font-weight: 700 900; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #fff;
  --canvas: #f7f8fa;
  --ink: #171b24;
  --muted: #687384;
  --faint: #edf0f4;
  --line: #dde2e9;
  --accent: #2d4a8a;
  --accent-dark: #20376a;
  --soft: #f0f3f8;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--canvas); font-size: 14px; line-height: 1.48; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(24px, 3vw, 34px); line-height: 1.13; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mobile-only { display: none; }
.eyebrow { margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.wordmark { margin-bottom: 34px; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.muted { color: var(--muted); }

.button, .text-button, .send-button, .icon-button, .project-menu-button {
  border: 0; background: transparent; border-radius: 8px;
}
.button { min-height: 36px; padding: 8px 14px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; font-weight: 550; }
.button.primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.button.secondary { background: var(--paper); }
.button.accent, .send-button { border-color: rgba(0,0,0,.12); background: var(--accent); color: #fff; }
.button.accent:hover, .send-button:hover { background: var(--accent-dark); }
.wide { width: 100%; }
.text-button { padding: 6px 8px; color: var(--ink); font-size: 12px; }
.text-button:hover { background: var(--soft); }
.icon-button { width: 30px; height: 30px; color: var(--muted); font-size: 18px; }
.icon-button:hover { background: var(--soft); }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-sheet { width: min(440px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.login-copy { margin-bottom: 28px; color: var(--muted); font-size: 15px; }
.stack-form { display: grid; gap: 15px; }
.stack-form label, .dialog label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 550; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 8px; outline: none; background: var(--paper); }
input, select { min-height: 40px; padding: 8px 10px; }
textarea { resize: vertical; padding: 10px 11px; }
input:focus, textarea:focus, select:focus { border-color: rgba(49, 95, 183, .65); box-shadow: 0 0 0 2px rgba(49,95,183,.1); }
.form-status { min-height: 17px; margin: 0; color: var(--muted); font-size: 11px; }
.form-status.error { color: #a13f2f; }

.app-view { height: 100vh; height: 100dvh; overflow: hidden; }
.topbar { position: relative; z-index: 20; height: 54px; display: grid; grid-template-columns: minmax(230px, 330px) 1fr auto; align-items: center; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(247,248,250,.97); }
.project-menu-button { max-width: 330px; display: flex; align-items: center; gap: 9px; padding: 6px; font-size: 13px; font-weight: 550; text-align: left; }
.project-menu-button:hover { background: var(--soft); }
.project-menu-button #project-heading { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--accent-dark); font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.phase-mini { justify-self: center; color: var(--muted); font-size: 11px; }

.project-drawer { position: fixed; z-index: 30; top: 48px; left: 12px; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 64px); overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 14px 36px rgba(23,27,36,.12); }
.drawer-heading { display: flex; justify-content: space-between; align-items: center; padding: 5px 6px 10px; }
.project-list { display: grid; gap: 3px; }
.project-item { width: 100%; display: grid; gap: 2px; padding: 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.project-item:hover, .project-item.selected { background: var(--soft); }
.project-item-name { display: block; overflow: hidden; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.project-item-meta { display: block; color: var(--muted); font-size: 11px; }
.user-note { margin-top: 12px; padding: 10px 6px 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.danger-button { width: 100%; margin-top: 10px; color: #a33f35; text-align: left; }
.danger-button:hover { background: #fff3f1; }

.workspace { height: calc(100vh - 54px); height: calc(100dvh - 54px); min-height: 0; display: grid; grid-template-columns: minmax(292px, 348px) minmax(0, 1fr); }
.conversation-rail { min-width: 0; min-height: 0; overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; border-right: 1px solid var(--line); background: var(--canvas); }
.chat-header { grid-row: 1; min-height: 64px; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 9px; }
.chat-header .eyebrow { margin-bottom: 3px; }
.agent-line { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; }
.agent-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(23,27,36,.2); }
.agent-dot.live { background: #3f8a61; box-shadow: 0 0 0 4px rgba(63,138,97,.1); animation: pulse 1.7s infinite; }
.agent-dot.error { background: #b64d3a; }
@keyframes pulse { 50% { opacity: .45; } }
.now-block { grid-row: 2; margin: 0 12px 8px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.7); }
.now-block.failed { border-color: rgba(182,77,58,.28); background: #fff7f4; }
.now-title { margin-bottom: 2px; font-size: 12px; font-weight: 650; }
.now-detail { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.now-meta { margin: 0; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.chat-stream { grid-row: 3; min-height: 0; overflow-y: auto; padding: 2px 16px 16px; }
.messages { display: grid; gap: 18px; }
.messages-empty { color: var(--muted); font-size: 13px; }
.message { max-width: 95%; }
.message:not(.agent) { justify-self: end; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.message-role { display: flex; gap: 5px; margin-bottom: 4px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.message-content { margin: 0; white-space: pre-wrap; font-size: 13px; line-height: 1.55; }
.message-time { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.activity-block { margin-top: 18px; }
.run-summary { width: 100%; display: flex; justify-content: space-between; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; text-align: left; }
.activity-list { display: grid; gap: 9px; margin: 5px 0 0; padding: 0; list-style: none; }
.activity-list li { display: grid; grid-template-columns: 58px 1fr auto; gap: 7px; align-items: start; font-size: 11px; }
.activity-tag, .activity-time { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.activity-body { display: grid; gap: 1px; }
.activity-title { font-weight: 600; }
.activity-detail { color: var(--muted); }
.run-failure { margin-top: 8px; padding: 10px; border: 1px solid rgba(182,77,58,.25); border-radius: 8px; background: #fff7f4; }
.run-failure p { margin-bottom: 4px; font-size: 11px; }
.run-retry { display: flex; gap: 6px; margin-top: 8px; }
.message-form { grid-row: 4; align-self: end; margin: 0 8px 8px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 4px 16px rgba(23,27,36,.06); }
.message-form.followup-active { border-color: var(--accent-dark); box-shadow: 0 0 0 3px rgba(32, 55, 106, .10), 0 4px 16px rgba(23,27,36,.06); }
.message-form textarea { height: 64px; min-height: 64px; max-height: 112px; padding: 0 2px; overflow-y: auto; resize: none; border: 0; box-shadow: none; }
.composer-row { display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.send-button { min-width: 62px; min-height: 31px; padding: 6px 11px; font-size: 12px; font-weight: 580; }

.main { min-width: 0; min-height: 0; overflow-y: auto; background: #f3f5f8; }
.empty-state { width: min(650px, calc(100% - 48px)); margin: 14vh auto; padding: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.empty-state p:not(.eyebrow) { max-width: 540px; margin-bottom: 24px; color: var(--muted); font-size: 15px; }
#project-view { min-height: 100%; padding: 0 22px 80px; }
.phase-track { position: sticky; z-index: 8; top: 0; max-width: 744px; display: grid; grid-template-columns: repeat(3,1fr); margin: 0 auto; padding: 12px 0; background: rgba(243,245,248,.95); backdrop-filter: blur(8px); }
.phase-step { position: relative; padding-top: 8px; color: var(--muted); font-size: 10px; text-align: center; }
.phase-step::before { content: ""; position: absolute; top: 0; left: 3px; right: 3px; height: 2px; border-radius: 2px; background: rgba(23,27,36,.1); }
.phase-step.done::before, .phase-step.active::before { background: var(--accent); }
.phase-step.active { color: var(--ink); font-weight: 650; }
.plan-sheet { width: min(744px, 100%); margin: 0 auto; padding: 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.plan-heading { padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.plan-heading h1 { font-size: 27px; }
.plan-intro { max-width: 620px; margin: 0; color: var(--muted); font-size: 14px; }
.understanding { padding: 18px 0; border-bottom: 1px solid var(--line); }
.understanding h2 { margin-bottom: 7px; font-size: 12px; }
.understanding ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; }
.decision-list { display: grid; }
.decision { padding: 27px 0; border-bottom: 1px solid var(--line); }
.decision:last-child { border-bottom: 0; }
.decision-section { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.decision fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.decision legend { max-width: 620px; padding: 0; font-size: 15px; font-weight: 680; line-height: 1.35; }
.decision-help { margin: 5px 0 12px; color: var(--muted); font-size: 12px; }
.option-list { display: grid; gap: 7px; }
.option-row { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.option-row:hover { border-color: rgba(23,27,36,.22); }
.option-row.selected { border-color: rgba(45,74,138,.52); background: #f4f6fb; }
.option-row input { width: 16px; min-height: 16px; margin: 2px 0 0; accent-color: var(--accent); box-shadow: none; }
.option-title { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.option-reason { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.recommended { padding: 2px 5px; border-radius: 4px; background: var(--soft); color: var(--muted); font-size: 9px; font-weight: 600; text-transform: uppercase; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-option { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 12px; }
.chip-option.selected { border-color: rgba(45,74,138,.52); background: #f4f6fb; }
.chip-option input { width: 14px; min-height: 14px; padding: 0; accent-color: var(--accent); box-shadow: none; }
.freeform { display: grid; gap: 5px; margin-top: 10px; }
.freeform span { color: var(--muted); font-size: 11px; }
.freeform input { min-height: 38px; }
.decision-note { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.report-view { padding-top: 8px; }
.report-document { max-width: 760px; margin: 0 auto; padding: 24px 0; font-size: 15px; line-height: 1.65; }
.report-document h1 { margin-top: 12px; font-size: 30px; }
.report-document h2 { margin: 34px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 19px; }
.report-document h3 { margin: 24px 0 8px; }
.report-document p, .report-document li { color: rgba(23,27,36,.8); }
.report-document code { padding: 1px 4px; border-radius: 4px; background: var(--soft); font-size: .92em; }
.report-actions { display: flex; gap: 8px; margin: 24px 0 8px; }
.plan-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 22px; border-top: 1px solid var(--line); }
.next-step { max-width: 330px; margin: 0; color: var(--muted); font-size: 11px; }
.plan-actions { display: flex; align-items: center; gap: 7px; }
.sync-status { width: min(744px,100%); min-height: 18px; margin: 8px auto; color: var(--muted); font-size: 10px; text-align: right; }
.toast { position: fixed; z-index: 80; right: 20px; bottom: 20px; max-width: 360px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; }

.dialog { width: min(610px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 20px 60px rgba(23,27,36,.18); }
.dialog::backdrop { background: rgba(23,27,36,.28); }
.dialog form { display: grid; gap: 17px; }
.dialog-heading, .dialog-actions { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.dialog-heading h2 { margin: 0; }
.dialog-actions { align-items: center; }
.delete-copy { color: var(--muted); }
.button.danger { border-color: #a33f35; background: #a33f35; color: #fff; }
.button.danger:hover { background: #84332b; }

.report-export { min-height: 100vh; padding: 42px 24px; background: #f3f5f8; }
.report-export .report-document { padding: 46px 58px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 22px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.auth-tab { padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 550; }
.auth-tab:hover { color: var(--ink); }
.auth-tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(23,27,36,.08); }

.readiness-panel { display: grid; justify-items: start; gap: 8px; padding: 27px 0; border-bottom: 1px solid var(--line); }
.readiness-title { margin: 0; font-size: 19px; }
.readiness-copy { max-width: 560px; margin: 0 0 10px; color: var(--muted); font-size: 13px; }

.plan-sheet.deck-mode { width: min(1060px, 100%); }
.deck-view { display: grid; gap: 16px; padding-top: 10px; }
.deck-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.deck-hint { margin: 0; color: var(--muted); font-size: 11px; }
.deck-toolbar-actions { display: flex; align-items: center; gap: 5px; }
.comment-mode-button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--accent-dark); font-size: 12px; font-weight: 600; }
.comment-mode-button:hover { border-color: rgba(45,74,138,.38); background: var(--soft); }
.comment-mode-button.active { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 0 0 3px rgba(45,74,138,.12); }
.comment-mode-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.comment-mode-icon path:last-child { fill: currentColor; stroke: none; }
.slide-canvas { position: relative; min-width: 0; isolation: isolate; }
.slide-stage { display: grid; gap: 18px; padding: clamp(22px, 4vw, 46px); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 6px 24px rgba(23,27,36,.05); }
.slide-stage:focus-visible { outline: 2px solid rgba(45,74,138,.55); outline-offset: 3px; }
.comment-mode .slide-stage, .comment-mode .slide-stage * { cursor: crosshair; }
.clarification-target { border-radius: 4px; transition: background-color .12s ease, box-shadow .12s ease; }
.comment-mode .clarification-target:hover { background-color: rgba(45,74,138,.055); box-shadow: 0 0 0 4px rgba(45,74,138,.055); }
.slide-pin-layer { position: absolute; z-index: 5; inset: 0; overflow: visible; border-radius: 12px; pointer-events: none; }
.slide-comment-pin { position: absolute; z-index: 6; width: 30px; height: 30px; transform: translate(-50%,-50%); pointer-events: auto; }
.slide-comment-pin:hover, .slide-comment-pin:focus-within { z-index: 12; }
.slide-comment-pin.open { z-index: 18; }
.comment-pin-button { position: relative; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 2px solid var(--paper); border-radius: 50% 50% 50% 8px; background: var(--accent); box-shadow: 0 3px 10px rgba(23,27,36,.26); color: #fff; transform: rotate(-8deg); }
.comment-pin-button:hover, .comment-pin-button:focus-visible, .slide-comment-pin.open .comment-pin-button { background: var(--accent-dark); box-shadow: 0 0 0 3px rgba(45,74,138,.14), 0 4px 12px rgba(23,27,36,.24); outline: none; transform: rotate(0); }
.slide-comment-pin.pending .comment-pin-button { animation: pin-pulse 1.5s ease-in-out infinite; }
.slide-comment-pin.failed .comment-pin-button { background: #a13f2f; }
.slide-comment-pin.answered .comment-pin-button::after { content: ""; position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; border: 2px solid var(--paper); border-radius: 50%; background: #3f8a61; }
.comment-pin-glyph { font-size: 11px; line-height: 1; transform: translateY(-1px); }
.comment-pin-number { position: absolute; right: -5px; bottom: -5px; min-width: 15px; height: 15px; display: grid; place-items: center; padding: 0 3px; border: 1px solid var(--paper); border-radius: 8px; background: var(--ink); color: #fff; font-size: 8px; font-weight: 700; line-height: 1; }
@keyframes pin-pulse { 50% { box-shadow: 0 0 0 6px rgba(45,74,138,.12), 0 3px 10px rgba(23,27,36,.18); } }
.comment-pin-preview { position: absolute; z-index: 5; width: min(260px, calc(100vw - 72px)); display: none; gap: 4px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); box-shadow: 0 10px 28px rgba(23,27,36,.16); color: var(--ink); }
.slide-comment-pin:not(.open):hover .comment-pin-preview, .slide-comment-pin:not(.open):focus-within .comment-pin-preview { display: grid; }
.comment-pin-preview-meta { color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.comment-pin-preview-copy { margin: 0; font-size: 11px; line-height: 1.42; }
.pin-opens-right .comment-pin-preview { left: 38px; }
.pin-opens-left .comment-pin-preview { right: 38px; }
.pin-opens-down .comment-pin-preview { top: -3px; }
.pin-opens-up .comment-pin-preview { bottom: -3px; }
.pin-x-0 { left: 1.8%; } .pin-x-5 { left: 5%; } .pin-x-10 { left: 10%; } .pin-x-15 { left: 15%; } .pin-x-20 { left: 20%; }
.pin-x-25 { left: 25%; } .pin-x-30 { left: 30%; } .pin-x-35 { left: 35%; } .pin-x-40 { left: 40%; } .pin-x-45 { left: 45%; }
.pin-x-50 { left: 50%; } .pin-x-55 { left: 55%; } .pin-x-60 { left: 60%; } .pin-x-65 { left: 65%; } .pin-x-70 { left: 70%; }
.pin-x-75 { left: 75%; } .pin-x-80 { left: 80%; } .pin-x-85 { left: 85%; } .pin-x-90 { left: 90%; } .pin-x-95 { left: 95%; } .pin-x-100 { left: 98.2%; }
.pin-y-0 { top: 2.4%; } .pin-y-5 { top: 5%; } .pin-y-10 { top: 10%; } .pin-y-15 { top: 15%; } .pin-y-20 { top: 20%; }
.pin-y-25 { top: 25%; } .pin-y-30 { top: 30%; } .pin-y-35 { top: 35%; } .pin-y-40 { top: 40%; } .pin-y-45 { top: 45%; }
.pin-y-50 { top: 50%; } .pin-y-55 { top: 55%; } .pin-y-60 { top: 60%; } .pin-y-65 { top: 65%; } .pin-y-70 { top: 70%; }
.pin-y-75 { top: 75%; } .pin-y-80 { top: 80%; } .pin-y-85 { top: 85%; } .pin-y-90 { top: 90%; } .pin-y-95 { top: 95%; } .pin-y-100 { top: 97.6%; }
.slide-head { display: grid; gap: 8px; }
.slide-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.slide-number { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.slide-section { color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; text-align: right; }
.slide-title { margin: 0; font-size: clamp(21px, 2.6vw, 28px); line-height: 1.18; letter-spacing: -.02em; }
.slide-takeaway { max-width: 640px; margin: 0; color: var(--muted); font-size: 15px; }
.slide-visual { display: grid; gap: 10px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.visual-title { margin: 0; font-size: 12px; font-weight: 650; }
.visual-caption { margin: 0; color: var(--muted); font-size: 11px; }
.pipeline { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pipeline-node { position: relative; flex: 1 1 0; min-width: 0; display: grid; align-content: start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.pipeline-node:not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: -10px; width: 10px; margin-top: -7px; color: var(--muted); font-size: 12px; text-align: center; }
.pipeline-label { font-size: 12px; font-weight: 650; }
.pipeline-detail { color: var(--muted); font-size: 11px; }
.table-scroll { overflow-x: auto; }
.visual-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.visual-table th { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.visual-table td { padding: 8px 10px; border-bottom: 1px solid var(--faint); text-align: left; vertical-align: top; }
.visual-table tr:last-child td { border-bottom: 0; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; gap: 4px; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12px; }
.bar-value { font-weight: 650; }
.bar-meter { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 4px; background: var(--faint); appearance: none; }
.bar-meter::-webkit-progress-bar { border-radius: 4px; background: var(--faint); }
.bar-meter::-webkit-progress-value { border-radius: 4px; background: var(--accent); }
.bar-meter::-moz-progress-bar { border-radius: 4px; background: var(--accent); }
.bar-detail { margin: 0; color: var(--muted); font-size: 11px; }
.comparison { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.comparison-item { display: grid; align-content: start; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.comparison-label { font-size: 13px; font-weight: 650; }
.comparison-value { color: var(--accent-dark); font-size: 15px; font-weight: 650; }
.comparison-detail { color: var(--muted); font-size: 12px; }
.metric-list { display: flex; flex-wrap: wrap; gap: 22px; }
.metric-item { display: grid; gap: 2px; min-width: 140px; }
.metric-value { color: var(--accent-dark); font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.metric-label { font-size: 12px; font-weight: 650; }
.metric-detail { color: var(--muted); font-size: 12px; }
.reference-list { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: 13px; }
.reference-detail { color: var(--muted); }
.slide-bullets { display: grid; gap: 6px; max-width: 640px; margin: 0; padding-left: 18px; color: rgba(23,27,36,.85); font-size: 14px; }
.slide-example { display: grid; gap: 2px; max-width: 640px; margin: 0; padding: 10px 12px; border-left: 2px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--soft); color: var(--muted); font-size: 12px; }
.slide-example-label { color: var(--accent-dark); font-size: 10px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.slide-foot { display: grid; gap: 5px; padding-top: 10px; border-top: 1px solid var(--line); }
.slide-foot-label { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.slide-foot-list { display: grid; gap: 3px; margin: 0; padding-left: 16px; color: var(--muted); font-size: 11px; }
.deck-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.slide-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.strip-button { min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font-size: 11px; }
.strip-button:hover { border-color: rgba(23,27,36,.25); color: var(--ink); }
.strip-button.current { border-color: var(--accent); background: var(--accent); color: #fff; }
.workspace.details-open { grid-template-columns: minmax(292px, 348px) minmax(0, 1fr) minmax(330px, 400px); }
.slide-notes-panel { min-width: 0; min-height: 0; overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; border-left: 1px solid var(--line); background: var(--paper); }
.slide-notes-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.slide-notes-header .eyebrow { margin-bottom: 3px; }
.slide-notes-header h2 { margin: 0; font-size: 16px; }
.report-document.slide-notes-body { max-width: none; min-height: 0; margin: 0; padding: 18px 20px 34px; overflow-y: auto; font-size: 13px; line-height: 1.62; outline: none; }
.slide-notes-body:focus-visible { box-shadow: inset 0 0 0 2px rgba(45,74,138,.35); }
.slide-notes-body h1 { font-size: 23px; }
.slide-notes-body h2 { margin-top: 26px; font-size: 17px; }
.slide-notes-body h3 { margin-top: 20px; font-size: 14px; }
.selection-ask-button { max-width: calc(100% - 24px); justify-self: center; margin: -25px 12px 10px; padding: 8px 12px; overflow: hidden; border: 1px solid rgba(32,55,106,.18); border-radius: 18px; background: var(--accent); box-shadow: 0 7px 22px rgba(23,27,36,.18); color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.selection-ask-button:hover { background: var(--accent-dark); }
.slide-thread-section { max-height: min(230px, 34vh); overflow-y: auto; padding: 12px; border-top: 1px solid var(--line); background: var(--canvas); }
.slide-thread-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--muted); }
.slide-thread-heading h3 { margin: 0; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.slide-thread-heading span { font-size: 10px; }
.slide-question-list { display: grid; gap: 5px; }
.slide-question-empty { margin: 0; color: var(--muted); font-size: 11px; }
.slide-question-item { width: 100%; display: grid; gap: 2px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-align: left; }
.slide-question-item:hover { border-color: rgba(45,74,138,.36); }
.slide-question-place { color: var(--accent-dark); font-size: 9px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.slide-question-copy { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.slide-question-state { color: var(--muted); font-size: 9px; }
.slide-question-state.error { color: #a13f2f; }

.quick-question-popover { position: fixed; z-index: 70; right: 20px; bottom: 20px; width: min(410px, calc(100vw - 40px)); max-height: calc(100dvh - 86px); overflow: hidden; display: grid; grid-template-rows: auto auto minmax(62px,1fr) auto; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 18px 50px rgba(23,27,36,.2); pointer-events: auto; }
.slide-comment-pin > .quick-question-popover { position: absolute; z-index: 30; right: auto; bottom: auto; width: min(390px, calc(100vw - 78px)); max-height: min(520px, calc(100dvh - 92px)); }
.slide-comment-pin.pin-opens-right > .quick-question-popover { left: 38px; }
.slide-comment-pin.pin-opens-left > .quick-question-popover { right: 38px; left: auto; }
.slide-comment-pin.pin-opens-down > .quick-question-popover { top: -4px; }
.slide-comment-pin.pin-opens-up > .quick-question-popover { top: auto; bottom: -4px; }
.quick-question-popover.detached-comment { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); left: auto; width: min(410px, calc(100vw - 20px)); max-height: calc(100dvh - 74px); }
.workspace.details-open ~ .quick-question-popover { right: 420px; }
.quick-question-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 14px 14px 10px; }
.quick-question-header .eyebrow { margin-bottom: 2px; }
.quick-question-header h2 { margin: 0; font-size: 16px; }
.quick-question-context { max-height: 88px; margin: 0 14px 10px; padding: 9px 11px; overflow-y: auto; border-left: 2px solid var(--accent); background: var(--soft); color: var(--muted); font-size: 11px; line-height: 1.45; }
.quick-question-thread { min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 10px; padding: 6px 14px 12px; }
.quick-thread-empty { margin: 8px 0; color: var(--muted); font-size: 12px; }
.quick-message { display: grid; gap: 3px; }
.quick-message.user { justify-self: end; max-width: 92%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); }
.quick-message.agent { padding-right: 8px; }
.quick-message-meta { display: flex; gap: 4px; color: var(--muted); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.quick-message-meta .error, .quick-message-error { color: #a13f2f; }
.quick-message-content { margin: 0; white-space: pre-wrap; font-size: 12px; line-height: 1.5; }
.quick-message-error { margin: 0; font-size: 10px; }
.quick-retry { justify-self: start; }
.quick-question-form { display: grid; gap: 7px; margin: 0 8px 8px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: 0 3px 12px rgba(23,27,36,.06); }
.quick-question-form textarea { min-height: 54px; max-height: 112px; padding: 2px; resize: none; border: 0; box-shadow: none; }
.quick-question-actions { display: flex; align-items: end; gap: 6px; }
.quick-question-actions .form-status { flex: 1 1 auto; }
.quick-question-actions .text-button { flex: 0 1 auto; color: var(--accent-dark); font-size: 10px; }
.quick-question-actions .send-button { flex: 0 0 auto; }
.deck-actions { align-items: center; flex-wrap: wrap; margin-top: 8px; }
.deck-actions > .button { flex: 0 0 auto; }
.submission-block { display: flex; align-items: center; gap: 9px; }
.submission-note { margin: 0; color: var(--muted); font-size: 11px; }
.submission-note.error { color: #a13f2f; }

@media (max-width: 1200px) {
  .workspace.details-open { grid-template-columns: minmax(292px, 348px) minmax(0, 1fr); }
  .slide-notes-panel { position: fixed; z-index: 45; top: 54px; right: 0; bottom: 0; width: min(420px, 100vw); border-left: 1px solid var(--line); box-shadow: -14px 0 34px rgba(23,27,36,.14); }
  .workspace.details-open ~ .quick-question-popover { right: 20px; }
  .app-view.question-from-notes .quick-question-popover { right: 20px; left: auto; }
}

@media (max-width: 900px) {
  .mobile-only { display: inline-flex; }
  .topbar { grid-template-columns: minmax(0,1fr) auto; }
  .phase-mini { display: none; }
  .workspace, .workspace.details-open { grid-template-columns: 1fr; }
  .conversation-rail { position: fixed; z-index: 40; inset: 54px 0 0; display: none; border: 0; }
  .conversation-rail.open { display: grid; }
  #project-view { padding-inline: 12px; }
  .plan-sheet { padding: 22px; }
  .plan-footer { align-items: stretch; flex-direction: column; }
  .plan-actions { justify-content: flex-end; flex-wrap: wrap; }
  .deck-toolbar { align-items: start; flex-direction: column; }
  .deck-toolbar-actions { width: 100%; flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 560px) {
  .topbar { padding-inline: 9px; }
  .top-actions #logout-button { display: none; }
  .project-menu-button { min-width: 0; }
  .login-sheet { padding: 28px 22px; }
  .phase-track { font-size: 9px; }
  .plan-sheet { padding: 20px 16px; border-radius: 10px; }
  .plan-heading h1 { font-size: 24px; }
  .plan-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .plan-actions .text-button { grid-column: 1 / -1; }
  .report-export .report-document { padding: 26px 20px; }
}

@media (max-width: 640px) {
  .pipeline { flex-direction: column; }
  .pipeline-node:not(:last-child)::after { content: "↓"; top: 100%; right: auto; left: 50%; width: auto; margin-top: 0; transform: translateX(-50%); height: 10px; line-height: 10px; }
  .deck-controls { flex-wrap: wrap; justify-content: center; }
  .slide-strip { order: -1; width: 100%; }
  .submission-block { flex-wrap: wrap; }
  .slide-notes-panel { width: 100vw; }
  .quick-question-popover, .quick-question-popover.detached-comment, .workspace.details-open ~ .quick-question-popover, .app-view.question-from-notes .quick-question-popover { right: 10px; bottom: 10px; left: 10px; width: auto; max-height: calc(100dvh - 74px); }
  .quick-question-actions { flex-wrap: wrap; }
  .quick-question-actions .form-status { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; } }
