:root {
  --ink: #1f2937;
  --ink-2: #273449;
  --ink-3: #334155;
  --paper: #f4f6f8;
  --paper-2: #e8edf2;
  --white: #ffffff;
  --lime: #d9e5ef;
  --lime-dark: #527596;
  --orange: #b7846d;
  --yellow: #c3aa70;
  --blue: #7897b5;
  --red: #bd746e;
  --muted: #84909e;
  --border-dark: rgba(255, 255, 255, 0.1);
  --border-light: rgba(31, 41, 55, 0.12);
  --shadow: 0 20px 50px rgba(31, 41, 55, 0.16);
  --radius: 4px;
  --display: "Bodoni 72", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: "Avenir Next", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 14px; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--lime-dark); outline-offset: 3px; }
.noise { position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .055; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }

.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 244px; display: flex; flex-direction: column; padding: 26px 18px 18px; color: var(--paper); background: var(--ink); border-right: 1px solid var(--border-dark); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; padding: 0 8px 26px; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; color: var(--ink); background: var(--lime); font-family: var(--display); font-size: 24px; border-radius: 50% 50% 50% 15%; transform: rotate(-8deg); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.brand-copy small { margin-top: 5px; color: #829087; font-size: 9px; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.project-switcher { padding: 17px 8px 20px; border-top: 1px solid var(--border-dark); border-bottom: 1px solid var(--border-dark); }
.project-button { width: 100%; margin-top: 10px; padding: 0; display: flex; align-items: center; gap: 10px; color: var(--paper); background: transparent; border: 0; text-align: left; cursor: pointer; }
.project-glyph { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid #536176; background: #303d50; font-size: 10px; font-weight: 800; }
.project-button > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.project-button strong { font-size: 12px; }
.project-button small { margin-top: 4px; color: #829087; font-size: 9px; }
.chevron { color: #7f8d84; }
.nav-list { display: flex; flex-direction: column; gap: 3px; padding: 22px 0; }
.nav-item { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; width: 100%; padding: 11px 12px; color: #9ea9a1; background: transparent; border: 0; border-radius: var(--radius); font-size: 12px; text-align: left; cursor: pointer; transition: color .2s, background .2s, transform .2s; }
.nav-item { min-height: 44px; }
.nav-item:hover { color: var(--paper); background: rgba(255,255,255,.045); transform: translateX(2px); }
.nav-item.active { color: var(--ink); background: var(--lime); font-weight: 700; }
.nav-item span { font-size: 15px; }
.nav-item em { min-width: 19px; padding: 2px 5px; color: inherit; background: rgba(16,25,20,.13); border-radius: 10px; font-size: 9px; font-style: normal; text-align: center; }
.sidebar-note { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; padding: 14px 10px; border-top: 1px solid var(--border-dark); border-bottom: 1px solid var(--border-dark); }
.pulse-dot { width: 8px; height: 8px; margin-top: 3px; background: #8ea9c2; border-radius: 50%; box-shadow: 0 0 0 0 rgba(120,151,181,.32); animation: pulse 2s infinite; }
.sidebar-note div { display: flex; flex-direction: column; }
.sidebar-note strong { font-size: 10px; }
.sidebar-note small { margin-top: 4px; color: #7e8d83; font-size: 9px; }
.user-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 16px 8px 0; color: var(--paper); background: transparent; border: 0; text-align: left; cursor: pointer; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 10px; font-weight: 800; }
.avatar-owner { color: var(--ink); background: var(--lime); }
.avatar-blue { color: #10233c; background: var(--blue); }
.avatar-yellow { color: #3b2c04; background: var(--yellow); }
.avatar-gray { color: #d6dcd7; background: #4d5a52; }
.user-card > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; }
.user-card strong { font-size: 10px; }
.user-card small { margin-top: 3px; color: #7e8d83; font-size: 9px; }
.more { color: #75837a; letter-spacing: .1em; }

.main-stage { grid-column: 2; min-width: 0; background: var(--paper); }
.topbar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: 18px 32px 16px; background: rgba(242, 240, 232, .91); border-bottom: 1px solid var(--border-light); backdrop-filter: blur(14px); }
.breadcrumb { color: #7d887f; font-size: 9px; letter-spacing: .12em; }
.breadcrumb b { color: var(--ink); }
.topbar h1 { margin: 7px 0 0; font-family: var(--display); font-size: clamp(23px, 2.2vw, 34px); font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .outline-button, .primary-button, .ghost-chip { min-height: 38px; border-radius: 2px; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.icon-button:hover, .outline-button:hover, .primary-button:hover, .ghost-chip:hover { transform: translateY(-2px); }
.icon-button { position: relative; width: 38px; border: 1px solid var(--border-light); background: transparent; font-size: 17px; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 5px; height: 5px; background: var(--orange); border-radius: 50%; }
.outline-button { padding: 0 14px; background: transparent; border: 1px solid var(--ink); font-size: 10px; font-weight: 700; }
.primary-button { padding: 0 15px; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); font-size: 10px; font-weight: 700; box-shadow: 2px 2px 0 #91a9bf; }
.primary-button:hover { box-shadow: 3px 3px 0 #91a9bf; }

.view { display: none; padding: 24px 32px 64px; animation: reveal .45s both; }
.view.active { display: block; }
.command-ribbon { display: grid; grid-template-columns: auto 280px minmax(280px,1fr); align-items: center; gap: 16px; padding: 15px 17px; color: var(--ink); background: var(--white); border: 1px solid #d9e0e7; border-left: 3px solid #6f8eac; box-shadow: 0 8px 24px rgba(31,41,55,.07); }
.ai-orb { display: grid; place-items: center; width: 42px; height: 42px; color: #466986; background: #e8f0f6; border: 1px solid #cfdae5; border-radius: 50%; box-shadow: none; }
.command-copy { display: flex; flex-direction: column; gap: 5px; }
.command-copy .eyebrow { color: #537391; }
.command-copy p { margin: 0; color: #6f7b88; font-size: 11px; }
.command-box { display: flex; align-items: center; min-width: 0; background: #f7f9fb; border: 1px solid #d5dde5; }
.command-box input { min-width: 0; flex: 1; padding: 12px 14px; color: var(--ink); background: transparent; border: 0; font-size: 11px; }
.command-box input::placeholder { color: #929ca8; }
.command-box button { width: 42px; height: 38px; color: white; background: #33475e; border: 0; cursor: pointer; }
.decision-strip { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; background: #f2e9e5; border: 1px solid #d8c7c0; border-top: 0; }
.decision-strip > div { display: flex; align-items: center; gap: 11px; }
.decision-strip p { display: flex; flex-direction: column; margin: 0; font-size: 11px; }
.decision-strip p small { margin-top: 3px; color: #866b60; font-size: 9px; }
.signal { display: grid; place-items: center; width: 23px; height: 23px; color: var(--white); border-radius: 50%; font-size: 10px; font-weight: 900; }
.signal.red { background: var(--red); }
.text-button { padding: 0; color: #6b3f31; background: transparent; border: 0; font-size: 10px; font-weight: 700; cursor: pointer; }
.section-block { margin-top: 32px; }
.section-head, .panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-head h2, .panel-head h2, .view-intro h2 { margin: 5px 0 0; font-family: var(--display); font-size: 26px; font-weight: 500; letter-spacing: -.025em; }
.head-meta { display: flex; align-items: center; gap: 14px; color: #727d75; font-size: 9px; }
.head-meta b { color: var(--ink); }
.ghost-chip { min-height: 30px; padding: 0 11px; background: transparent; border: 1px solid var(--border-light); font-size: 9px; font-weight: 700; }
.metrics-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin-top: 15px; }
.metric-card { min-height: 157px; padding: 16px; background: var(--white); border: 1px solid var(--border-light); }
.metric-card.large { background: #e9eff5; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #616c64; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.metric-top em { font-style: normal; }
.trend.good { color: #506d22; }
.trend.warn { color: #b44d3b; }
.metric-value { margin-top: 17px; font-family: var(--display); font-size: 52px; line-height: .9; letter-spacing: -.04em; }
.metric-value span { color: #8b968d; font-family: var(--sans); font-size: 15px; font-weight: 500; }
.metric-value.compact { font-size: 48px; }
.metric-card p { margin: 10px 0 0; color: #7e8981; font-size: 9px; line-height: 1.5; }
.progress-track { height: 5px; margin-top: 15px; overflow: hidden; background: #cfd5c7; }
.progress-track span { display: block; height: 100%; background: var(--ink); animation: grow 1s ease-out both; }
.ring { --value: 75; position: relative; display: grid; place-items: center; width: 82px; height: 82px; margin: 18px auto 0; border-radius: 50%; background: conic-gradient(var(--ink) calc(var(--value)*1%), #d9ddd5 0); }
.ring::after { position: absolute; inset: 6px; content: ""; background: var(--white); border-radius: inherit; }
.ring strong, .ring small { position: relative; z-index: 1; }
.ring strong { margin-top: 11px; font-family: var(--display); font-size: 27px; font-weight: 500; }
.ring small { margin-top: -17px; color: #7c867f; font-size: 8px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(300px,.85fr); gap: 12px; margin-top: 12px; }
.panel { background: var(--white); border: 1px solid var(--border-light); }
.panel-head { padding: 18px 19px; border-bottom: 1px solid var(--border-light); }
.panel-head h2 { font-size: 22px; }
.dots { background: transparent; border: 0; color: #758078; cursor: pointer; }
.milestone-line { position: relative; display: grid; grid-template-columns: repeat(4,1fr); padding: 25px 24px 22px; }
.milestone-line::before { position: absolute; top: 40px; right: 11%; left: 11%; height: 1px; content: ""; background: #c6cbc5; }
.phase { position: relative; z-index: 1; text-align: center; }
.phase span { display: inline-grid; place-items: center; width: 31px; height: 31px; color: #7a857e; background: var(--white); border: 1px solid #afb7b0; border-radius: 50%; font-size: 9px; font-weight: 800; }
.phase.done span { color: var(--ink); background: var(--lime); border-color: var(--ink); }
.phase.active span { color: var(--paper); background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(120,151,181,.28); }
.phase p { display: flex; flex-direction: column; margin: 9px 0 0; font-size: 9px; font-weight: 700; }
.phase p small { margin-top: 4px; color: #929b94; font-size: 8px; font-weight: 400; }
.condition-list { border-top: 1px solid var(--border-light); }
.condition { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; width: 100%; gap: 10px; padding: 13px 18px; background: transparent; border: 0; border-bottom: 1px solid var(--border-light); text-align: left; cursor: pointer; }
.condition:last-child { border-bottom: 0; }
.condition:hover { background: #f4f3ed; }
.condition-icon { display: grid; place-items: center; width: 24px; height: 24px; font-size: 9px; font-weight: 900; }
.condition-icon.blocked { color: white; background: var(--red); border-radius: 50%; }
.condition-icon.testing { color: #675c32; background: #e5dcb9; border-radius: 50%; }
.condition-icon.ready { color: #3f5b4e; background: #d6e1da; border-radius: 50%; }
.condition p { display: flex; flex-direction: column; margin: 0; font-size: 10px; }
.condition small { margin-top: 4px; color: #889189; font-size: 8px; }
.condition em { color: #69746c; font-size: 8px; font-style: normal; }
.risk-count { display: grid; place-items: center; width: 28px; height: 28px; color: white; background: var(--red); border-radius: 50%; font-size: 10px; }
.risk-list { padding: 5px 16px; }
.risk-item { display: grid; grid-template-columns: 26px 1fr 12px; align-items: center; width: 100%; gap: 10px; padding: 15px 0; background: transparent; border: 0; border-bottom: 1px solid var(--border-light); text-align: left; cursor: pointer; }
.risk-item > span { display: grid; place-items: center; width: 24px; height: 24px; color: white; background: var(--red); border-radius: 50%; font-size: 8px; }
.risk-item.medium > span { color: #5a4300; background: var(--yellow); }
.risk-item p { display: flex; flex-direction: column; margin: 0; font-size: 10px; }
.risk-item small { margin-top: 4px; color: #858e87; font-size: 8px; line-height: 1.4; }
.risk-item em { color: #7b867e; font-style: normal; }
.panel-action { width: 100%; padding: 13px; color: var(--ink); background: #edf0e8; border: 0; border-top: 1px solid var(--border-light); font-size: 9px; font-weight: 700; cursor: pointer; }
.panel-action:hover { background: var(--lime); }
.team-section { padding-top: 2px; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 15px; }
.person-card { padding: 15px; background: var(--white); border: 1px solid var(--border-light); }
.person-card.muted { background: #dedfd8; }
.person-top { display: flex; align-items: center; gap: 9px; }
.person-top p { display: flex; flex: 1; flex-direction: column; margin: 0; }
.person-top strong { font-size: 10px; }
.person-top small { margin-top: 2px; color: #8a938c; font-size: 8px; }
.load { padding: 3px 6px; background: #ebeee7; font-size: 8px; }
.load.high { color: #81514a; background: #eadbd7; }
.load.empty { color: #82544e; background: #e3ceca; }
.person-focus { min-height: 39px; margin: 16px 0 13px; font-family: var(--display); font-size: 14px; line-height: 1.35; }
.person-status { color: #818b83; font-size: 8px; }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; }
.dot.working { background: #6f8b7d; }
.dot.waiting { background: var(--yellow); }
.dot.danger { background: var(--red); }
.activity-section { margin-top: 32px; }
.timeline { margin-top: 14px; background: var(--white); border: 1px solid var(--border-light); }
.timeline article { display: grid; grid-template-columns: 33px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
.timeline article:last-child { border: 0; }
.timeline-icon { display: grid; place-items: center; width: 29px; height: 29px; background: #e9ede5; font-size: 11px; }
.timeline-icon.code { color: #496478; background: #dfe6e9; }
.timeline-icon.doc { color: #685e3d; background: #e8e2cf; }
.timeline-icon.test { color: #466153; background: #dce5df; }
.timeline p { display: flex; flex-direction: column; margin: 0; font-size: 10px; }
.timeline small { margin-top: 3px; color: #89928b; font-size: 8px; }
.timeline time { color: #8a938c; font-size: 8px; }

/* The overview follows one delivery line: deadline, scope, risk, then people. */
#view-overview > .decision-strip,
#view-overview > .section-block,
#view-overview > .dashboard-grid,
#view-overview > .team-section { display: none; }
.delivery-spine { margin-top: 18px; background: var(--white); border: 1px solid var(--border-light); }
.spine-lead { display: grid; grid-template-columns: 1fr 190px; align-items: center; gap: 26px; padding: 24px 26px 20px; }
.spine-lead h2 { margin: 7px 0 8px; font-family: var(--display); font-size: 31px; font-weight: 500; letter-spacing: -.025em; }
.spine-lead h2 strong { font-size: 47px; font-weight: 500; }
.spine-lead p { max-width: 680px; margin: 0; color: #6f7973; font-size: 10px; line-height: 1.6; }
.overall-score { display: grid; grid-template-columns: 1fr auto; align-items: end; padding-left: 25px; border-left: 1px solid var(--border-light); }
.overall-score span { align-self: start; color: #737d77; font-size: 9px; }
.overall-score strong { grid-row: span 2; font-family: var(--display); font-size: 57px; font-weight: 500; line-height: .85; }
.overall-score small { font-family: var(--sans); font-size: 14px; }
.overall-score em { color: #5e6f66; font-size: 9px; font-style: normal; font-weight: 700; }
.spine-progress { height: 7px; margin: 0 26px; overflow: hidden; background: #dfe2de; }
.spine-progress span { display: block; height: 100%; background: #587b9c; }
.module-progress { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 22px; border-top: 1px solid var(--border-light); }
.module-progress button { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px; background: transparent; border: 0; border-right: 1px solid var(--border-light); text-align: left; cursor: pointer; }
.module-progress button:last-child { border-right: 0; }
.module-progress button:hover { background: #f1f3f0; }
.module-progress button > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.module-progress b { font-size: 10px; }
.module-progress em { color: #557594; font-size: 8px; font-style: normal; }
.module-progress em.at-risk { color: #95594f; }
.module-progress button > strong { margin-top: 15px; font-family: var(--display); font-size: 25px; font-weight: 500; }
.module-progress i, .owner-row i, .knowledge-health i { display: block; height: 3px; margin-top: 10px; overflow: hidden; background: #dfe2de; }
.module-progress u, .owner-row u, .knowledge-health u { display: block; height: 100%; background: #6989a7; text-decoration: none; }
.module-progress small { margin-top: 7px; color: #7f8983; font-size: 8px; }
.control-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; margin-top: 12px; }
.risk-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; width: 100%; gap: 11px; padding: 15px 18px; background: transparent; border: 0; border-bottom: 1px solid var(--border-light); text-align: left; cursor: pointer; }
.risk-row:last-child { border-bottom: 0; }
.risk-row:hover { background: #f3f3ef; }
.risk-level { display: grid; place-items: center; width: 25px; height: 25px; color: #fff; background: var(--red); border-radius: 50%; font-size: 8px; }
.muted-risk .risk-level { color: #685d36; background: #ded4ad; }
.risk-row p { display: flex; flex-direction: column; margin: 0; font-size: 10px; }
.risk-row small { margin-top: 4px; color: #7b8580; font-size: 9px; }
.risk-row > em { color: #7b8580; font-size: 8px; font-style: normal; white-space: nowrap; }
.owner-row { display: grid; grid-template-columns: 34px 1fr 100px 105px; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border-light); }
.owner-row:last-child { border-bottom: 0; }
.owner-row p { display: flex; flex-direction: column; margin: 0; }
.owner-row p strong { font-size: 10px; }
.owner-row p small { margin-top: 3px; color: #87908a; font-size: 8px; }
.owner-row > div b { font-size: 9px; }
.owner-row i { margin-top: 5px; }
.owner-note { color: #607286; font-size: 8px; font-style: normal; text-align: right; }
.owner-note.warn { color: #95594f; }
.owner-row.unassigned { background: #f0efeb; }

.view-intro { padding: 12px 0 25px; border-bottom: 1px solid var(--border-light); }
.view-intro h2 { font-size: 36px; }
.view-intro p { margin: 8px 0 0; color: #707b73; font-size: 11px; }
.view-intro.inline { display: flex; align-items: flex-end; justify-content: space-between; }
.sync-contract { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 14px 16px; background: #eaf0f5; border: 1px solid #ccd8e2; }
.sync-contract > div:first-child { display: flex; align-items: center; gap: 11px; }
.sync-contract > div:first-child > span { display: grid; place-items: center; width: 30px; height: 30px; color: #4f708f; background: #d7e3ed; border-radius: 50%; font-size: 16px; }
.sync-contract p { display: flex; flex-direction: column; margin: 0; }
.sync-contract p strong { font-size: 10px; }
.sync-contract p small { margin-top: 4px; color: #6f7c75; font-size: 9px; }
.sync-stats { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.sync-stats span { color: #69766f; font-size: 8px; }
.sync-stats b { color: var(--ink); font-size: 12px; }
.sync-stats button, .row-edit { padding: 7px 10px; background: var(--white); border: 1px solid var(--border-light); font-size: 8px; cursor: pointer; }
.sync-stats button:hover, .row-edit:hover { background: var(--lime); }
.work-layout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 22px; }
.work-column { min-width: 0; padding: 13px; background: #e9e7df; border-top: 2px solid var(--ink); }
.column-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 12px; }
.column-head h3 { margin: 0; font-size: 11px; }
.column-head span { display: grid; place-items: center; width: 21px; height: 21px; background: #d5d4cc; border-radius: 50%; font-size: 8px; }
.work-card { display: flex; flex-direction: column; width: 100%; margin-bottom: 8px; padding: 15px; background: var(--white); border: 1px solid var(--border-light); text-align: left; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.work-card:hover { transform: translateY(-2px); box-shadow: 5px 5px 0 rgba(16,25,20,.12); }
.work-card.priority { border-left: 3px solid var(--red); }
.work-card.active-card { border-left: 3px solid var(--blue); }
.work-card.waiting-card { border-left: 3px solid var(--yellow); }
.work-card > small { color: #8a938c; font-size: 7px; letter-spacing: .11em; }
.work-card > strong { margin-top: 10px; font-family: var(--display); font-size: 17px; font-weight: 500; }
.work-card > p { margin: 8px 0 16px; color: #707b73; font-size: 9px; line-height: 1.5; }
.work-card footer { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid var(--border-light); }
.work-card footer em { color: #7e8881; font-size: 8px; font-style: normal; }
.mini-avatar { display: grid; place-items: center; width: 22px; height: 22px; color: var(--ink); background: var(--lime); border-radius: 50%; font-size: 7px; font-weight: 800; }
.mini-avatar.blue { background: var(--blue); }
.mini-avatar.yellow { background: var(--yellow); }
.filter-row { display: flex; gap: 6px; padding: 18px 0 12px; }
.filter { padding: 7px 11px; color: #667169; background: transparent; border: 1px solid var(--border-light); font-size: 9px; cursor: pointer; }
.filter { min-height: 40px; }
.filter.active { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--border-light); }
.work-table { width: 100%; border-collapse: collapse; }
.work-table th { padding: 11px 14px; color: #838d86; background: #e9e7df; font-size: 8px; font-weight: 600; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.work-table td { padding: 14px; border-bottom: 1px solid var(--border-light); font-size: 9px; }
.work-table tbody tr { cursor: pointer; }
.work-table tbody tr:hover { background: #f1f3eb; }
.work-table tbody tr:focus-visible { outline: 2px solid var(--lime-dark); outline-offset: -2px; background: #e9eeeb; }
.work-table td:first-child { display: flex; flex-direction: column; min-width: 230px; }
.work-table td:first-child strong { font-size: 10px; }
.work-table td:first-child small { margin-top: 4px; color: #8b948d; font-size: 8px; }
.feedback-node { display: flex; min-width: 130px; flex-direction: column; }
.feedback-node b { font-size: 9px; font-weight: 600; }
.feedback-node small { margin-top: 3px; color: #7f8a84; font-size: 8px; }
.feedback-node.overdue b { color: #8d5149; }
.sync-source { display: inline-flex; align-items: center; min-width: 104px; gap: 5px; color: #506b84; font-size: 8px; }
.sync-source::before { width: 6px; height: 6px; content: ""; background: #6989a7; border-radius: 50%; }
.sync-source.manual { color: #74663d; }
.sync-source.manual::before { background: #b8a568; }
.row-edit { position: relative; z-index: 1; }
.avatar.tiny { width: 22px; height: 22px; margin-right: 6px; font-size: 7px; vertical-align: middle; }
.tag, .state { display: inline-block; padding: 4px 7px; font-size: 8px; }
.tag.feature { background: #dfe6e9; color: #466173; }
.tag.requirement { background: #dfe7e1; color: #456052; }
.tag.bug { background: #eadbd7; color: #815048; }
.state.in-progress { background: #e0e7ea; color: #4b6677; }
.state.verifying { background: #e9e3d1; color: #6d6035; }
.state.blocked { background: #ead9d5; color: #815048; }
.state.done { background: #dce6df; color: #466052; }

.knowledge-hero { display: grid; grid-template-columns: minmax(0,.75fr) minmax(360px,1fr); gap: 24px; align-items: end; padding: 18px 0 27px; border-bottom: 1px solid var(--border-light); }
.knowledge-hero h2 { margin: 6px 0; font-family: var(--display); font-size: 38px; font-weight: 500; letter-spacing: -.03em; }
.knowledge-hero p { margin: 0; color: #747f77; font-size: 11px; }
.ask-card { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; padding: 9px 9px 9px 13px; color: var(--ink); background: var(--white); border: 1px solid #d7dfe7; border-radius: 4px; box-shadow: 0 5px 18px rgba(31,41,55,.05); }
.ask-card > span { display: grid; place-items: center; width: 32px; height: 32px; color: #4d6e8c; background: #e8f0f6; border-radius: 50%; font-size: 14px; }
.ask-card div { display: flex; flex-direction: column; }
.ask-card small { color: #60758a; font-size: 7px; letter-spacing: .15em; }
.ask-card input { margin-top: 4px; color: var(--ink); background: transparent; border: 0; font-size: 10px; }
.ask-card input::placeholder { color: #9aa4af; }
.ask-card button { align-self: stretch; min-width: 70px; padding: 0 14px; color: white; background: #33475e; border: 0; border-radius: 3px; font-size: 9px; font-weight: 700; cursor: pointer; }
.ask-card button:hover { background: #26394e; }
.knowledge-grid { display: none; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px; margin-top: 23px; }
.knowledge-card { position: relative; min-height: 280px; padding: 19px; background: var(--white); border: 1px solid var(--border-light); }
.knowledge-card.featured { background: #e7ebe8; }
.doc-mark { display: grid; place-items: center; width: 42px; height: 52px; color: var(--paper); background: var(--ink); font-family: var(--display); font-size: 12px; border-radius: 1px 8px 1px 1px; }
.doc-mark.note { color: #5b3e14; background: var(--yellow); }
.doc-mark.spec { color: #15345b; background: var(--blue); }
.live-badge, .source-badge { position: absolute; top: 19px; right: 19px; padding: 4px 7px; color: #36550e; background: var(--lime); font-size: 7px; font-weight: 800; }
.source-badge { color: #536057; background: #e7e8e1; }
.knowledge-card h3 { margin: 24px 0 8px; font-family: var(--display); font-size: 21px; font-weight: 500; }
.knowledge-card p { color: #6f7a72; font-size: 10px; line-height: 1.55; }
.knowledge-card > small { display: block; margin-top: 27px; color: #88928a; font-size: 8px; }
.knowledge-card dl { display: grid; grid-template-columns: repeat(3,1fr); margin: 22px 0; padding: 13px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.knowledge-card dl div { display: flex; flex-direction: column; }
.knowledge-card dt { color: #8b948d; font-size: 7px; }
.knowledge-card dd { margin: 5px 0 0; font-size: 9px; font-weight: 700; }
.knowledge-card .panel-action { position: absolute; right: 0; bottom: 0; left: 0; }
.question-answer { margin-top: 14px; padding: 18px; color: var(--ink); background: #edf3f8; border: 1px solid #d5e0e9; border-left: 3px solid #6f8eac; animation: reveal .35s both; }
.question-answer > div { display: flex; gap: 8px; color: #496b89; font-size: 10px; }
.question-answer p { max-width: 900px; margin: 13px 0; font-family: var(--display); font-size: 16px; line-height: 1.55; }
.question-answer footer { color: #6d7d8c; font-size: 8px; }
.knowledge-actions { display: flex; gap: 7px; margin-top: 18px; }
.knowledge-portal { display: grid; grid-template-columns: 225px minmax(0,1fr); min-height: 640px; margin-top: 18px; background: var(--white); border: 1px solid var(--border-light); }
.knowledge-nav { display: flex; flex-direction: column; padding: 21px 13px; background: #edf1f5; border-right: 1px solid var(--border-light); }
.knowledge-nav > .eyebrow { padding: 0 10px 13px; }
.knowledge-nav > button { display: flex; align-items: center; justify-content: space-between; padding: 11px 10px; color: #647069; background: transparent; border: 0; border-bottom: 1px solid rgba(16,25,20,.07); font-size: 9px; text-align: left; cursor: pointer; }
.knowledge-nav > button.active, .knowledge-nav > button:hover { color: #294d70; background: #dbe6f0; font-weight: 700; }
.knowledge-nav em { font-size: 8px; font-style: normal; }
.knowledge-health { margin-top: auto; padding: 15px 10px 5px; border-top: 1px solid var(--border-light); }
.knowledge-health span { color: #718078; font-size: 8px; }
.knowledge-health strong { float: right; font-family: var(--display); font-size: 18px; font-weight: 500; }
.knowledge-health small { display: block; margin-top: 8px; color: #7d8882; font-size: 8px; line-height: 1.5; }
.knowledge-home { min-width: 0; padding: 26px; }
.knowledge-home > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--border-light); }
.knowledge-home h3 { margin: 7px 0 8px; font-family: var(--display); font-size: 28px; font-weight: 500; }
.knowledge-home header p { max-width: 700px; margin: 0; color: #6f7a74; font-size: 10px; line-height: 1.6; }
.baseline-badge { padding: 5px 8px; color: #3f6383; background: #dce7f0; font-size: 8px; font-weight: 700; white-space: nowrap; }
.doc-shortcuts { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 18px 0; }
.doc-shortcuts button { display: grid; grid-template-columns: 35px 1fr; gap: 2px 10px; padding: 13px; background: #f3f5f7; border: 1px solid var(--border-light); text-align: left; cursor: pointer; }
.doc-shortcuts button:hover { background: #e9eff4; }
.doc-shortcuts button > span { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; color: #456987; background: #dce7f0; font-size: 8px; }
.doc-shortcuts strong { font-size: 9px; }
.doc-shortcuts small { color: #7c8781; font-size: 8px; }
.document-index { border: 1px solid var(--border-light); }
.doc-section-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; background: #edf1f5; }
.doc-section-head h4 { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 500; }
.doc-section-head span { color: #79847e; font-size: 8px; }
.document-index > button { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; width: 100%; gap: 12px; padding: 12px 15px; background: transparent; border: 0; border-top: 1px solid var(--border-light); text-align: left; cursor: pointer; }
.document-index > button:hover { background: #f1f2ee; }
.document-index > button > b { color: #8a948e; font-family: var(--display); font-size: 15px; font-weight: 500; }
.document-index p { display: flex; flex-direction: column; margin: 0; }
.document-index p strong { font-size: 9px; }
.document-index p small { margin-top: 3px; color: #7e8983; font-size: 8px; }
.document-index em { color: #69766f; font-size: 8px; font-style: normal; white-space: nowrap; }
.source-summary { display: flex; align-items: center; gap: 26px; margin-top: 18px; padding: 14px 15px; background: #f1f4f7; }
.source-summary div { display: flex; align-items: baseline; gap: 6px; }
.source-summary strong { font-family: var(--display); font-size: 22px; font-weight: 500; }
.source-summary span { color: #758079; font-size: 8px; }
.source-summary button { margin-left: auto; padding: 0; background: transparent; border: 0; font-size: 9px; font-weight: 700; cursor: pointer; }
.settings-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-top: 23px; }
.settings-card { display: flex; align-items: center; justify-content: space-between; min-height: 105px; padding: 20px; background: var(--white); border: 1px solid var(--border-light); }
.settings-card h3 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 500; }
.settings-card p { margin: 7px 0 0; color: #7f8982; font-size: 9px; }
.settings-card button { padding: 8px 10px; background: transparent; border: 1px solid var(--ink); font-size: 8px; cursor: pointer; }

.modal-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(9,15,11,.72); backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.command-modal { position: relative; width: min(650px, 100%); padding: 31px; color: var(--paper); background: var(--ink); border: 1px solid #49584e; box-shadow: 0 30px 100px rgba(0,0,0,.45); }
.command-modal h2 { margin: 8px 0 20px; font-family: var(--display); font-size: 34px; font-weight: 500; }
.close-modal { position: absolute; top: 17px; right: 18px; color: #87958b; background: transparent; border: 0; font-size: 24px; cursor: pointer; }
.command-modal textarea { width: 100%; min-height: 140px; resize: vertical; padding: 15px; color: var(--paper); background: #293649; border: 1px solid #4b5c72; line-height: 1.6; }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick-prompts button { padding: 6px 9px; color: #c2ccd6; background: transparent; border: 1px solid #4b5c72; font-size: 8px; cursor: pointer; }
.quick-prompts button:hover { color: var(--ink); background: var(--lime); }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 23px; }
.modal-footer small { color: #7e8c82; font-size: 8px; }
.command-modal .primary-button { color: var(--ink); background: var(--lime); border-color: var(--lime); box-shadow: none; }
.detail-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; width: min(460px, 92vw); padding: 31px; overflow-y: auto; color: var(--paper); background: var(--ink); border-left: 1px solid #526158; box-shadow: -30px 0 80px rgba(0,0,0,.3); transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.detail-drawer.open { transform: translateX(0); }
.drawer-scrim { position: fixed; inset: 0; z-index: 30; background: rgba(11,16,13,.38); }
.drawer-scrim[hidden] { display: none; }
.drawer-close { position: absolute; top: 19px; right: 21px; color: #8b998f; background: transparent; border: 0; font-size: 24px; cursor: pointer; }
.drawer-header .eyebrow { color: var(--lime); }
.drawer-header h2 { margin: 12px 0 8px; font-family: var(--display); font-size: 31px; font-weight: 500; line-height: 1.05; }
.drawer-header p { color: #95a198; font-size: 10px; line-height: 1.6; }
.drawer-meta { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 23px 0; }
.drawer-meta div { padding: 11px; background: #293649; border: 1px solid #45566c; }
.drawer-meta small { display: block; color: #839087; font-size: 7px; text-transform: uppercase; }
.drawer-meta strong { display: block; margin-top: 5px; font-size: 9px; }
.drawer-section { padding: 17px 0; border-top: 1px solid #425166; }
.drawer-section h3 { margin: 0 0 12px; font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.drawer-section ul { margin: 0; padding-left: 17px; color: #b3bdb6; font-size: 10px; line-height: 1.7; }
.drawer-feedback { display: grid; grid-template-columns: 10px 1fr; align-items: start; gap: 8px; padding: 8px 0; }
.drawer-feedback > span { width: 8px; height: 8px; margin-top: 3px; background: #87a5c1; border: 2px solid #cbd9e6; border-radius: 50%; }
.drawer-feedback.muted > span { background: #7c8795; border-color: #47566a; }
.drawer-feedback p { display: flex; flex-direction: column; margin: 0; }
.drawer-feedback strong { color: #dbe3eb; font-size: 9px; }
.drawer-feedback small { margin-top: 4px; color: #8491a0; font-size: 8px; }
.drawer-edit-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; margin-bottom: 8px; }
.drawer-edit-actions button { padding: 10px; color: #dce5ed; background: transparent; border: 1px solid #53647a; font-size: 9px; cursor: pointer; }
.drawer-edit-actions button:hover { background: #2e3d51; }
.drawer-action { width: 100%; padding: 11px; color: var(--ink); background: var(--lime); border: 0; font-size: 9px; font-weight: 800; cursor: pointer; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; min-width: 280px; gap: 10px; padding: 13px 15px; color: var(--paper); background: var(--ink); border-left: 3px solid var(--lime); box-shadow: var(--shadow); transform: translateY(130%); opacity: 0; transition: transform .3s, opacity .3s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast > span { display: grid; place-items: center; width: 23px; height: 23px; color: var(--ink); background: var(--lime); border-radius: 50%; font-size: 9px; }
.toast p { display: flex; flex-direction: column; margin: 0; font-size: 9px; }
.toast small { margin-top: 3px; color: #8c9990; font-size: 8px; }

/* Keep dense project metadata readable without allowing it to compete with decisions. */
.condition small, .risk-item small, .person-top small, .person-status,
.timeline small, .timeline time, .work-card > small, .work-card footer em,
.work-table th, .work-table td:first-child small, .tag, .state,
.knowledge-card > small, .knowledge-card dt, .question-answer footer,
.settings-card p, .drawer-meta small, .modal-footer small { font-size: 9px; }
.mini-avatar, .avatar.tiny, .ask-card small, .live-badge, .source-badge { font-size: 8px; }

@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes grow { from { width: 0; } }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(120,151,181,0); } 100% { box-shadow: 0 0 0 0 rgba(120,151,181,0); } }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 82px minmax(0,1fr); }
  .sidebar { width: 82px; padding: 24px 12px; }
  .brand { justify-content: center; padding: 0 0 24px; }
  .brand-copy, .project-switcher .eyebrow, .project-button > span:nth-child(2), .chevron, .nav-item:not(.active) em, .sidebar-note div, .user-card > span:not(.avatar) { display: none; }
  .project-switcher { padding: 16px 10px; }
  .project-button { justify-content: center; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 12px 0; font-size: 0; }
  .nav-item span { font-size: 15px; }
  .nav-item.active em { display: none; }
  .sidebar-note, .user-card { justify-content: center; padding-right: 0; padding-left: 0; }
  .main-stage { grid-column: 2; }
  .command-ribbon { grid-template-columns: auto 1fr; }
  .command-box { grid-column: 1 / -1; }
  .metrics-grid { grid-template-columns: repeat(3,1fr); }
  .metric-card.large { grid-column: span 3; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2,1fr); }
  .control-grid { grid-template-columns: 1fr; }
  .module-progress { grid-template-columns: repeat(2,1fr); }
  .module-progress button:nth-child(2) { border-right: 0; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; top: auto; right: 0; width: auto; height: 64px; flex-direction: row; align-items: center; padding: 7px 8px; border-top: 1px solid #39473e; border-right: 0; }
  .brand, .project-switcher, .sidebar-note, .user-card { display: none; }
  .nav-list { display: grid; grid-template-columns: repeat(5,1fr); width: 100%; gap: 3px; padding: 0; }
  .nav-item { min-width: 0; gap: 3px; padding: 8px 2px; font-size: 9px; text-align: center; }
  .nav-item span { font-size: 13px; }
  .main-stage { padding-bottom: 63px; }
  .topbar { min-height: 72px; padding: 14px 16px; }
  .breadcrumb { display: none; }
  .topbar h1 { max-width: 210px; margin-top: 0; font-size: 20px; }
  .outline-button { display: none; }
  .primary-button { padding: 0 10px; }
  .view { padding: 16px 15px 42px; }
  .command-ribbon { grid-template-columns: auto 1fr; padding: 14px; }
  .command-copy p { display: none; }
  .decision-strip { align-items: flex-start; gap: 10px; }
  .decision-strip p small { display: none; }
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .metric-card.large { grid-column: span 2; }
  .metric-card { min-height: 140px; }
  .metric-value { font-size: 46px; }
  .head-meta { display: none; }
  .milestone-line { padding: 22px 6px; }
  .phase p { font-size: 8px; }
  .phase p small { display: none; }
  .team-grid, .work-layout, .knowledge-grid, .settings-layout { grid-template-columns: 1fr; }
  .spine-lead { grid-template-columns: 1fr; padding: 20px; }
  .overall-score { grid-template-columns: 1fr auto; padding: 16px 0 0; border-top: 1px solid var(--border-light); border-left: 0; }
  .spine-progress { margin: 0 20px; }
  .module-progress { grid-template-columns: 1fr; }
  .module-progress button { border-right: 0; }
  .control-grid { grid-template-columns: 1fr; }
  .owner-row { grid-template-columns: 34px 1fr 80px; }
  .owner-note { grid-column: 2 / -1; text-align: left; }
  .sync-contract { align-items: flex-start; flex-direction: column; }
  .sync-stats { width: 100%; flex-wrap: wrap; }
  .knowledge-actions { flex-wrap: wrap; }
  .knowledge-portal { grid-template-columns: 1fr; }
  .knowledge-nav { border-right: 0; border-bottom: 1px solid var(--border-light); }
  .knowledge-health { margin-top: 14px; }
  .knowledge-home { padding: 18px; }
  .doc-shortcuts { grid-template-columns: 1fr; }
  .source-summary { align-items: flex-start; flex-wrap: wrap; gap: 13px; }
  .source-summary button { width: 100%; margin-left: 0; text-align: left; }
  .knowledge-hero { grid-template-columns: 1fr; }
  .knowledge-hero h2 { font-size: 32px; }
  .ask-card { grid-template-columns: 26px 1fr auto; }
  .section-head h2 { font-size: 22px; }
  .section-head .ghost-chip { display: none; }
  .view-intro.inline { align-items: flex-start; gap: 15px; }
  .view-intro h2 { font-size: 30px; }
  .command-modal { padding: 25px 19px; }
  .modal-footer { align-items: stretch; flex-direction: column; }
}

@media (pointer: coarse) {
  .icon-button, .outline-button, .primary-button, .ghost-chip, .filter,
  .settings-card button, .quick-prompts button, .drawer-action { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
