:root {
  --ink: #17211b;
  --muted: #64716a;
  --line: #dce4df;
  --surface: #f4f7f5;
  --panel: #ffffff;
  --forest: #153f2d;
  --green: #18a66a;
  --yellow: #d69b21;
  --red: #d6544d;
  --grey: #96a09a;
  --shadow: 0 12px 38px rgba(25, 55, 39, .07);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--surface); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.035em; }
h2 { margin-bottom: .35rem; font-size: clamp(1.3rem, 2.5vw, 1.8rem); letter-spacing: -.025em; }
h3 { margin-bottom: .55rem; font-size: 1rem; }
.muted, .section-heading > p { color: var(--muted); }
.eyebrow { margin-bottom: .35rem; color: #6c7c73; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 286px; flex-direction: column; overflow-y: auto; color: #e7efe9; background: var(--forest); }
.brand { display: flex; align-items: center; gap: .8rem; padding: 1.4rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand div { display: flex; flex-direction: column; }
.brand span { color: #afc2b6; font-size: .75rem; }
.brand-mark { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 16px; color: white; background: linear-gradient(145deg, #1ca66d, #176544); font: 800 1.35rem Georgia, serif; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.brand-mark.small { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; font-size: 1rem; }
nav { padding: .85rem .7rem 1.5rem; }
.nav-item { display: flex; align-items: center; gap: .65rem; margin: .15rem 0; padding: .58rem .7rem; border-radius: 8px; color: #bed0c5; font-size: .82rem; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.09); }
.nav-item.active { box-shadow: inset 2px 0 #35c98c; }
.sidebar-footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; padding: 1rem 1.2rem; border-top: 1px solid rgba(255,255,255,.1); color: #a8bdb1; font-size: .75rem; }
.sidebar-footer a { color: white; }
.content { margin-left: 286px; padding: 0 2rem 4rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 108px; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.freshness { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: .72rem; }
.freshness strong { color: var(--ink); font-size: .8rem; }
.menu-button { display: none; }

.health-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 1.7rem 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.health-strip > div { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: .55rem; padding: 1.1rem 1.2rem; border-right: 1px solid var(--line); }
.health-strip > div:last-child { border: 0; }
.health-strip strong { font-size: 1.3rem; }
.health-strip small { color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.green { background: var(--green); }
.yellow { background: var(--yellow); }
.red { background: var(--red); }
.grey { background: var(--grey); }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin: 2.2rem 0 1rem; }
.section-heading p { max-width: 500px; margin-bottom: .4rem; font-size: .8rem; text-align: right; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
.kpi-card, .panel, .stream-card, .blocker-list article, .workstream-hero { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.kpi-card { padding: 1.1rem; }
.kpi-card > span { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.kpi-card > strong { display: block; margin: .35rem 0; font-size: 1.7rem; letter-spacing: -.04em; }
.kpi-card p { min-height: 42px; margin-bottom: .7rem; font-size: .78rem; }
.kpi-card small { color: #7f8b84; font-size: .66rem; }

.blocker-list { display: grid; gap: .7rem; }
.blocker-list article { display: grid; grid-template-columns: 80px 1fr; gap: 1rem; align-items: start; padding: 1rem; }
.blocker-list article p { margin-bottom: .35rem; color: var(--muted); font-size: .82rem; }
.blocker-list small { color: #738078; }
.severity { padding: .26rem .4rem; border-radius: 6px; color: white; font-size: .62rem; font-weight: 800; text-align: center; letter-spacing: .08em; }

.stream-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.stream-card { padding: 1.15rem; transition: transform .15s, border-color .15s; }
.stream-card:hover { transform: translateY(-2px); border-color: #b9c9c0; }
.stream-card > div:first-child { display: flex; align-items: center; gap: .5rem; }
.status-text { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .06em; }
.stream-card h3 { margin-top: .85rem; font-size: 1rem; }
.stream-card p { min-height: 44px; color: var(--muted); font-size: .78rem; }
.acceptance { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.acceptance span { color: var(--muted); font-size: .66rem; }
.acceptance strong { display: block; color: var(--ink); font-size: .75rem; }

.workstream-hero { display: flex; justify-content: space-between; gap: 2rem; margin-top: 1.7rem; padding: 1.4rem; border-left-width: 5px; }
.green-border { border-left-color: var(--green); }
.yellow-border { border-left-color: var(--yellow); }
.red-border { border-left-color: var(--red); }
.grey-border { border-left-color: var(--grey); }
.status-pill { display: inline-block; margin-bottom: .75rem; padding: .26rem .55rem; border-radius: 999px; color: white; font-size: .64rem; font-weight: 800; letter-spacing: .06em; }
.verified-box { display: flex; min-width: 260px; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right; }
.verified-box span, .verified-box small { color: var(--muted); font-size: .7rem; }
.verified-box strong { margin: .25rem 0; font-size: .85rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.panel { padding: 1.2rem; }
.panel.wide { grid-column: 1 / -1; }
.large-line { font-size: 1.25rem; }
.panel ul { margin: .8rem 0 0; padding: 0; list-style: none; }
.panel li { margin: .42rem 0; padding-left: 1.4rem; font-size: .8rem; }
.panel li::before { float: left; margin-left: -1.4rem; font-weight: 800; }
.panel li.pass::before { content: '✓'; color: var(--green); }
.panel li.open::before { content: '○'; color: var(--yellow); }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: .6rem; margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: flow; }
.flow li { position: relative; min-height: 88px; padding: .8rem; border: 1px solid var(--line); border-radius: 9px; background: #f8faf9; }
.flow li::before { content: counter(flow); counter-increment: flow; display: grid; width: 22px; height: 22px; place-items: center; margin-bottom: .45rem; border-radius: 50%; color: white; background: var(--forest); font-size: .65rem; }
.flow li span, .flow li small { display: block; }
.flow li small { color: var(--muted); font-size: .68rem; }
.evidence-row { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 1rem; }
.evidence-row div { padding: .8rem; border-radius: 8px; background: #f7f9f8; }
.evidence-row span, .evidence-row strong { display: block; }
.evidence-row span { color: var(--muted); font-size: .68rem; }
.evidence-row strong { margin-top: .25rem; overflow-wrap: anywhere; font-size: .78rem; }

.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 1rem; background: radial-gradient(circle at 80% 10%, #2b7655 0, transparent 28%), var(--forest); }
.login-card { width: min(430px, 100%); padding: 2rem; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: white; box-shadow: 0 25px 80px rgba(0,0,0,.24); }
.login-card .brand-mark { margin-bottom: 1.4rem; }
.login-card form { margin-top: 1.5rem; }
.login-card label { display: block; margin-bottom: .4rem; font-weight: 700; }
.login-card input { width: 100%; padding: .85rem; border: 1px solid #b9c6be; border-radius: 8px; font: inherit; }
.login-card input:focus { outline: 3px solid rgba(24,166,106,.2); border-color: var(--green); }
.login-card button { width: 100%; margin-top: .8rem; padding: .85rem; border: 0; border-radius: 8px; color: white; background: var(--forest); font: 700 .9rem inherit; cursor: pointer; }
.login-card button:disabled { cursor: not-allowed; opacity: .45; }
.security-note { margin: 1.2rem 0 0; color: var(--muted); font-size: .7rem; text-align: center; }
.alert { margin: 1rem 0; padding: .7rem; border: 1px solid; border-radius: 8px; color: #8d2b27; background: #fff4f3; font-size: .8rem; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .stream-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .sidebar { left: -310px; transform: none; transition: left .2s; box-shadow: none; }
  .sidebar.open { left: 0; box-shadow: 20px 0 60px rgba(0,0,0,.2); }
  .content { margin-left: 0; padding: 0 1rem 3rem; }
  .topbar { min-height: 88px; }
  .menu-button { display: block; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 1.1rem; }
  .freshness { display: none; }
  .health-strip { grid-template-columns: 1fr 1fr; }
  .health-strip > div:nth-child(2) { border-right: 0; }
  .health-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .kpi-grid, .stream-grid, .detail-grid { grid-template-columns: 1fr; }
  .panel.wide { grid-column: auto; }
  .section-heading { align-items: start; flex-direction: column; gap: .3rem; }
  .section-heading > p { text-align: left; }
  .workstream-hero { flex-direction: column; }
  .verified-box { min-width: 0; align-items: flex-start; text-align: left; }
  .evidence-row { grid-template-columns: 1fr; }
  .blocker-list article { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .health-strip > div { padding: .85rem; }
  .kpi-grid { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 1.25rem; }
  .login-card { padding: 1.35rem; }
}
