:root { color-scheme: light; --ink: #18201d; --muted: #66706a; --paper: #f6f4ef; --surface: #ffffff; --line: #dcded8; --navy: #08142c; --navy-soft: #142241; --amber: #d88a16; --amber-soft: #fff3da; --green: #2f7655; --green-soft: #e9f4ed; --blue: #315ea8; --blue-soft: #eaf0fa; --red: #a54d45; --red-soft: #f9ece9; --shadow: 0 16px 44px rgba(8, 20, 44, 0.1), 0 2px 8px rgba(8, 20, 44, 0.05); font-family: "DM Sans", sans-serif; font-synthesis: none;
}

* { box-sizing: border-box;
}

html { scroll-behavior: smooth;
}

body { margin: 0; min-width: 320px; overflow-x: hidden; color: var(--ink); background-color: var(--paper);
}

button,
input,
select,
textarea { font: inherit;
}

button,
a,
select { -webkit-tap-highlight-color: transparent;
}

button,
a { transition: transform 160ms ease, color 160ms ease, background-color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 3px solid rgba(49, 94, 168, 0.35); outline-offset: 2px;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.topbar { position: sticky; top: 0; z-index: 40; height: 68px; display: grid; grid-template-columns: auto auto minmax(260px, 620px) 1fr; align-items: center; gap: 18px; padding: 0 24px; color: #f6f8ff; background-color: var(--navy); border-bottom: 1px solid #243252;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 178px;
}

.brand img { width: 38px; height: 38px; border-radius: 7px;
}

.brand strong,
.brand span { display: block; letter-spacing: 0;
}

.brand strong { font-size: 14px;
}

.brand span { margin-top: 1px; font-size: 11px; color: #aebbd5;
}

.project-trigger,
.repo-link { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; color: #f8faff; background-color: var(--navy-soft); border: 1px solid #30415f; border-radius: 6px; font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer;
}

.project-trigger span { min-width: 24px; padding: 2px 6px; color: #1e1505; background-color: #efae43; border-radius: 99px; font-size: 11px;
}

.project-trigger:hover,
.repo-link:hover { background-color: #1c2d4d; border-color: #50678e;
}

.project-trigger:active,
.repo-link:active,
.tab-button:active,
.view-action:active { transform: translateY(1px);
}

.top-search input,
.panel-search input { width: 100%; height: 40px; padding: 0 14px; color: #f7f9ff; background-color: #101e38; border: 1px solid #30415f; border-radius: 6px;
}

.top-search input::placeholder,
.panel-search input::placeholder { color: #9ca9c2;
}

.top-search input:focus,
.panel-search input:focus { background-color: #172744; border-color: #6686bd;
}

.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px;
}

.sync-state { color: #9eabc4; font-size: 11px; white-space: nowrap;
}

.app-shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 304px minmax(0, 1fr);
}

.project-panel { position: sticky; top: 68px; height: calc(100vh - 68px); overflow: hidden; display: flex; flex-direction: column; padding: 22px 18px 16px; color: #e8edf8; background-color: #0c1830; border-right: 1px solid #223252;
}

.panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px;
}

.eyebrow { display: block; margin-bottom: 4px; color: #d9992d; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
}

.panel-head h2 { margin: 0; font-family: "Newsreader", serif; font-size: 27px; letter-spacing: 0;
}

.close-panel { display: none; width: 36px; height: 36px; color: #dce4f4; background-color: transparent; border: 1px solid #30415f; border-radius: 6px; font-size: 25px; line-height: 1; cursor: pointer;
}

.panel-search { display: block; margin-bottom: 13px;
}

.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}

.filter-grid label,
.status-filter { display: block;
}

.filter-grid label > span,
.status-filter > span { display: block; margin: 0 0 5px 2px; color: #93a1bc; font-size: 10px; font-weight: 700; text-transform: uppercase;
}

.filter-grid select,
.status-filter select { width: 100%; height: 36px; padding: 0 9px; color: #edf2fc; background-color: #14213b; border: 1px solid #2e3e5e; border-radius: 6px; font-size: 12px;
}

.status-filter { margin-top: 8px;
}

.result-line { padding: 13px 2px 9px; color: #8f9db7; font-size: 11px;
}

.result-line strong { color: #f4b345;
}

.project-list { min-height: 0; overflow-y: auto; padding-right: 3px; scrollbar-color: #394b6d transparent; scrollbar-width: thin;
}

.project-item { width: 100%; min-height: 68px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; margin-bottom: 4px; padding: 10px; text-align: left; color: #dfe6f3; background-color: transparent; border: 1px solid transparent; border-radius: 6px; cursor: pointer;
}

.project-item:hover { background-color: #14223e; border-color: #293b5d;
}

.project-item.active { color: #ffffff; background-color: #1a2a48; border-color: #c6811a;
}

.project-initial { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: #20271f; background-color: #f0b24b; border-radius: 6px; font-family: "Newsreader", serif; font-size: 16px; font-weight: 650;
}

.project-item strong,
.project-item small { display: block; overflow: hidden; text-overflow: ellipsis;
}

.project-item strong { margin: 1px 0 4px; font-size: 12.5px; white-space: nowrap;
}

.project-item small { color: #91a0bb; font-size: 10.5px; white-space: nowrap;
}

.empty-list { padding: 24px 8px; color: #9ca9c2; font-size: 13px; line-height: 1.6;
}

.panel-backdrop { display: none;
}

.workspace { min-width: 0; padding: 34px clamp(24px, 4vw, 64px) 72px;
}

.project-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px 36px; padding-bottom: 26px; border-bottom: 1px solid var(--line);
}

.project-kicker { margin-bottom: 8px; color: var(--amber); font-size: 11px; font-weight: 800; text-transform: uppercase;
}

.project-heading h1 { margin: 0; max-width: 780px; font-family: "Newsreader", serif; font-size: 42px; line-height: 1.05; letter-spacing: 0;
}

.project-heading p { max-width: 760px; margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65;
}

.project-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: flex-start; gap: 7px;
}

.meta-pill,
.phase-pill,
.tag-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border-radius: 99px; font-size: 11px; font-weight: 700;
}

.meta-pill { color: #445049; background-color: #eceee9; border: 1px solid #d7dad3;
}

.phase-pill { color: #244d3b; background-color: var(--green-soft); border: 1px solid #c9dfd0;
}

.project-links { grid-column: 2; display: flex; justify-content: flex-end; gap: 8px;
}

.project-links a,
.view-action { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 11px; color: #26382f; background-color: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer;
}

.project-links a:hover,
.view-action:hover { color: #111b17; border-color: #aeb5ad; background-color: #fbfcfa;
}

.metric-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line);
}

.metric { min-height: 94px; padding: 19px 22px 16px 0; border-right: 1px solid var(--line);
}

.metric + .metric { padding-left: 22px;
}

.metric:last-child { border-right: 0;
}

.metric strong,
.metric span { display: block;
}

.metric strong { margin-bottom: 5px; font-family: "Newsreader", serif; font-size: 27px; line-height: 1;
}

.metric span { color: var(--muted); font-size: 11px; line-height: 1.35;
}

.workspace-view { min-height: 540px;
}

.continuous-workspace { width: 100%;
}

.continuous-section { position: relative; padding: 48px 0 56px; border-bottom: 1px solid var(--line);
}

.continuous-section::before { content: counter(section); position: absolute; top: 52px; right: 0; color: #a9afa8; font-size: 10px; font-weight: 800;
}

.continuous-workspace { counter-reset: section;
}

.continuous-section { counter-increment: section;
}

.continuous-section:last-child { padding-bottom: 0; border-bottom: 0;
}

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px;
}

.view-head h2,
.section-title { margin: 0; font-family: "Newsreader", serif; letter-spacing: 0;
}

.view-head h2 { font-size: 29px;
}

.view-head p { max-width: 660px; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55;
}

.overview-grid,
.split-grid,
.three-grid,
.decision-grid,
.feature-grid,
.feature-group-grid,
.docs-grid,
.method-grid,
.prompt-grid { display: grid; gap: 14px;
}

.overview-grid,
.split-grid,
.decision-grid,
.feature-grid,
.feature-group-grid,
.prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-grid,
.docs-grid,
.method-grid { grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.decision-card,
.feature-row,
.doc-item,
.method-item,
.prompt-card,
.generic-project { background-color: var(--surface); border: 1px solid var(--line); border-radius: 7px;
}

.panel { padding: 23px;
}

.panel.dark { color: #e9eef9; background-color: var(--navy); border-color: var(--navy);
}

.panel.accent { background-color: var(--amber-soft); border-color: #edd6aa;
}

.panel h3,
.decision-card h3,
.prompt-card h3 { margin: 0 0 10px; font-family: "Newsreader", serif; font-size: 20px; letter-spacing: 0;
}

.panel p,
.decision-card p,
.feature-row p,
.doc-item p,
.method-item p,
.generic-project p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.62;
}

.panel.dark p,
.panel.dark li { color: #bdc8dc;
}

.vision-list,
.clean-list,
.roadmap-list,
.opinion-list { margin: 0; padding: 0; list-style: none;
}

.vision-list li,
.clean-list li { position: relative; padding: 10px 0 10px 24px; border-bottom: 1px solid rgba(151, 163, 185, 0.18); font-size: 13px; line-height: 1.5;
}

.vision-list li:last-child,
.clean-list li:last-child { border-bottom: 0;
}

.vision-list li::before,
.clean-list li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; background-color: var(--amber); border-radius: 2px;
}

.phase-code { display: inline-flex; min-width: 36px; height: 25px; align-items: center; justify-content: center; margin-right: 8px; color: #2c210f; background-color: #efb24c; border-radius: 5px; font-size: 10px; font-weight: 800;
}

.mvp-lane { padding: 22px;
}

.mvp-lane.in { background-color: var(--green-soft); border: 1px solid #c7dfcf; border-radius: 7px;
}

.mvp-lane.out { background-color: var(--red-soft); border: 1px solid #ebcac5; border-radius: 7px;
}

.mvp-lane h3 { margin: 0 0 11px; font-size: 14px;
}

.mvp-lane ul { margin: 0; padding-left: 18px;
}

.mvp-lane li { margin: 7px 0; font-size: 13px; line-height: 1.45;
}

.progress-track { height: 10px; overflow: hidden; margin: 18px 0 9px; background-color: #e5e6e1; border-radius: 99px;
}

.progress-track span { display: block; height: 100%; background-color: var(--green); border-radius: inherit;
}

.roadmap-list { position: relative; max-width: 980px;
}

.roadmap-item { position: relative; display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 18px; padding: 0 0 26px;
}

.roadmap-item::before { content: ""; position: absolute; left: 31px; top: 42px; bottom: 0; width: 1px; background-color: #cfd3cb;
}

.roadmap-item:last-child::before { display: none;
}

.roadmap-marker { width: 62px; height: 38px; display: flex; align-items: center; justify-content: center; color: #463211; background-color: #f4bd5f; border: 1px solid #d69b35; border-radius: 6px; font-size: 12px; font-weight: 800;
}

.roadmap-item.current .roadmap-marker { color: #eaf0fb; background-color: var(--navy); border-color: var(--navy);
}

.roadmap-copy { padding: 2px 0 0;
}

.roadmap-copy h3 { margin: 0 0 6px; font-size: 16px;
}

.roadmap-copy p { max-width: 760px; margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.55;
}

.gate { display: block; max-width: 760px; padding: 9px 11px; color: #2b503f; background-color: var(--green-soft); border-left: 3px solid var(--green); font-size: 11.5px; line-height: 1.45;
}

.decision-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
}

.filter-chip { min-height: 34px; padding: 0 11px; color: #56615a; background-color: var(--surface); border: 1px solid var(--line); border-radius: 99px; font-size: 11px; font-weight: 700; cursor: pointer;
}

.filter-chip.active { color: #fff8ea; background-color: #805413; border-color: #805413;
}

.decision-card { padding: 21px;
}

.decision-card.locked { border-left: 4px solid var(--green);
}

.decision-id { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--amber); font-size: 10px; font-weight: 800; text-transform: uppercase;
}

.decision-label { margin: 15px 0 5px; color: #8a928d; font-size: 9px; font-weight: 800; text-transform: uppercase;
}

.option-list { display: grid; gap: 6px;
}

.option { padding: 9px 10px; background-color: #f4f5f1; border: 1px solid #e1e3dd; border-radius: 5px; font-size: 12px;
}

.recommendation { margin-top: 13px; padding: 12px; color: #4e3510; background-color: var(--amber-soft); border-left: 3px solid var(--amber); font-size: 12px; line-height: 1.5;
}

.opinion-form { display: grid; gap: 8px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line);
}

.opinion-form .form-row,
.prompt-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}

.opinion-form select,
.opinion-form textarea,
.feature-form input,
.feature-form select,
.feature-form textarea,
.prompt-form input,
.prompt-form select,
.prompt-form textarea { width: 100%; padding: 10px; color: var(--ink); background-color: #fbfbf8; border: 1px solid #d7dad3; border-radius: 5px; font-size: 12px;
}

.opinion-form textarea,
.feature-form textarea { min-height: 74px; resize: vertical;
}

.form-actions { display: flex; flex-wrap: wrap; gap: 8px;
}

.primary-action,
.secondary-action { min-height: 36px; padding: 0 12px; border-radius: 5px; font-size: 11px; font-weight: 800; cursor: pointer;
}

.primary-action { color: #1f1709; background-color: #eca83b; border: 1px solid #d48e20;
}

.primary-action:hover { background-color: #f2b54e;
}

.secondary-action { color: #3a4740; background-color: #f5f6f2; border: 1px solid #d7dad3;
}

.opinion-list { margin-top: 12px;
}

.opinion-list li { padding: 8px 0; border-top: 1px solid #eceee9; color: var(--muted); font-size: 11px; line-height: 1.45;
}

.feature-row { min-height: 96px; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 17px;
}

.feature-phase { width: 48px; height: 34px; display: flex; align-items: center; justify-content: center; color: #26483a; background-color: var(--green-soft); border-radius: 5px; font-size: 10px; font-weight: 800;
}

.feature-row h3,
.doc-item h3,
.method-item h3 { margin: 0 0 5px; font-size: 13px;
}

.feature-form,
.prompt-form { margin-top: 20px; padding: 21px; background-color: var(--surface); border: 1px solid var(--line); border-radius: 7px;
}

.feature-form h3,
.prompt-form h3 { margin: 0 0 13px; font-family: "Newsreader", serif; font-size: 20px;
}

.feature-form .form-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px; margin-bottom: 8px;
}

.doc-item,
.method-item { min-height: 118px; padding: 17px;
}

.doc-status { display: inline-flex; margin-bottom: 12px; padding: 3px 7px; color: #2c513f; background-color: var(--green-soft); border-radius: 4px; font-size: 9px; font-weight: 800; text-transform: uppercase;
}

.doc-status.missing { color: #7a4d19; background-color: var(--amber-soft);
}

.prompt-card { padding: 19px; color: #e9eef9; background-color: var(--navy); border-color: var(--navy);
}

.prompt-card pre { max-height: 260px; overflow: auto; margin: 0 0 13px; color: #bdc8dc; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.55; white-space: pre-wrap;
}

.prompt-form label { display: block; margin-bottom: 8px; color: #727c76; font-size: 10px; font-weight: 800; text-transform: uppercase;
}

.prompt-form textarea { min-height: 132px; resize: vertical;
}

.prompt-output { min-height: 220px !important; margin-top: 12px; color: #e7edf8 !important; background-color: var(--navy) !important; border-color: var(--navy) !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; line-height: 1.5;
}

.generic-project { padding: 28px;
}

.generic-project .doc-meter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; max-width: 460px; margin: 20px 0 10px;
}

.generic-project .doc-meter span { height: 7px; background-color: #e0e2dd; border-radius: 99px;
}

.generic-project .doc-meter span.ready { background-color: var(--green);
}

.empty-state { max-width: 680px; padding: 40px 0;
}

.empty-state h3 { margin: 0 0 8px; font-family: "Newsreader", serif; font-size: 23px;
}

.empty-state p { color: var(--muted); line-height: 1.6;
}

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; max-width: 360px; padding: 11px 14px; color: #f1f5fc; background-color: var(--navy); border: 1px solid #2c3d5e; border-radius: 6px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(10px);
}

.toast.show { opacity: 1; transform: translateY(0);
}

@media (max-width: 1080px) {
  .topbar { grid-template-columns: auto auto minmax(220px, 1fr);
  }

  .top-actions { display: none;
  }

  .app-shell { grid-template-columns: 272px minmax(0, 1fr);
  }

  .project-panel { padding-left: 14px; padding-right: 14px;
  }

  .project-heading h1 { font-size: 36px;
  }

  .three-grid,
  .docs-grid,
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 10px; padding: 0 14px;
  }

  .brand { min-width: 0;
  }

  .brand div { display: none;
  }

  .top-search { display: none;
  }

  .project-trigger { grid-column: 2; justify-self: start;
  }

  .top-actions { grid-column: 3; display: flex;
  }

  .sync-state { display: none;
  }

  .repo-link { min-height: 36px;
  }

  .app-shell { display: block;
  }

  .project-panel { position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(360px, 92vw); height: 100vh; padding-top: 22px; transform: translateX(-105%); transition: transform 220ms ease;
  }

  body.panel-open { overflow: hidden;
  }

  body.panel-open .project-panel { transform: translateX(0);
  }

  .close-panel { display: block;
  }

  .panel-backdrop { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100%; padding: 0; background-color: rgba(4, 10, 24, 0.68); border: 0; opacity: 0; pointer-events: none; transition: opacity 180ms ease;
  }

  body.panel-open .panel-backdrop { display: block; opacity: 1; pointer-events: auto;
  }

  .workspace { padding: 25px 18px 56px;
  }

  .project-header { grid-template-columns: 1fr; gap: 16px;
  }

  .project-meta,
  .project-links { grid-column: 1; justify-content: flex-start;
  }

  .project-heading h1 { font-size: 34px;
  }

  .metric-band { grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(2) { border-right: 0;
  }

  .metric:nth-child(n + 3) { border-top: 1px solid var(--line);
  }

  .metric:nth-child(3) { padding-left: 0;
  }

  .overview-grid,
  .split-grid,
  .decision-grid,
  .feature-grid,
  .feature-group-grid,
  .prompt-grid { grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand img { width: 34px; height: 34px;
  }

  .project-trigger { min-height: 35px; padding: 0 10px; font-size: 12px;
  }

  .repo-link { min-width: 58px; padding: 0 9px; font-size: 11px;
  }

  .project-heading h1 { font-size: 31px;
  }

  .metric { min-height: 86px; padding-top: 16px;
  }

  .metric strong { font-size: 23px;
  }

  .continuous-section { padding: 36px 0 42px;
  }

  .continuous-section::before { top: 40px;
  }

  .three-grid,
  .docs-grid,
  .method-grid { grid-template-columns: 1fr;
  }

  .view-head { align-items: flex-start; flex-direction: column;
  }

  .roadmap-item { grid-template-columns: 54px minmax(0, 1fr); gap: 12px;
  }

  .roadmap-marker { width: 50px;
  }

  .roadmap-item::before { left: 25px;
  }

  .opinion-form .form-row,
  .prompt-form .form-row,
  .feature-form .form-row { grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto;
  }

  *,
  *::before,
  *::after { transition-duration: 0.01ms !important;
  }
}
