:root {
  --ink: #12202d;
  --ink-2: #263746;
  --muted: #6f7c87;
  --paper: #f4f1eb;
  --white: #ffffff;
  --line: #e3e0da;
  --accent: #a23831;
  --accent-soft: #f5e8e5;
  --green: #28715d;
  --green-soft: #e4f1eb;
  --amber: #b97822;
  --amber-soft: #f7ecd9;
  --red: #a74740;
  --red-soft: #f6e6e4;
  --slate: #72808b;
  --shadow: 0 15px 50px rgba(24, 34, 43, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 0%, rgba(162, 56, 49, 0.08), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, select { font: inherit; }

.shell { min-height: 100vh; }

.topbar {
  min-height: 100px;
  padding: 24px clamp(22px, 5vw, 76px);
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup, .topbar-meta, .section-heading, .panel-heading, .legend {
  display: flex;
  align-items: center;
}

.brand-lockup { gap: 14px; }

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--white);
  font: 700 14px/1 Georgia, serif;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}

h1, h2, h3, p { margin: 0; }
h1 { font: 500 clamp(21px, 2.2vw, 30px)/1.1 Georgia, "Times New Roman", serif; }
h2 { font: 500 clamp(25px, 3vw, 38px)/1.12 Georgia, "Times New Roman", serif; letter-spacing: -0.025em; }
h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }

.eyebrow, .panel-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow { margin-bottom: 6px; color: #aab5bd; }
.eyebrow.accent { color: var(--accent); }
.panel-kicker { color: var(--muted); margin-bottom: 7px; }
.muted { margin-top: 9px; color: var(--muted); font-size: 14px; }

.topbar-meta { gap: 18px; color: #b8c2c9; font-size: 12px; }
.live-dot { display: flex; gap: 7px; align-items: center; color: #d8e5df; }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: #68b390; box-shadow: 0 0 0 4px rgba(104,179,144,.12); }

.overview, .project-section { padding: 52px clamp(22px, 5vw, 76px); }
.overview { max-width: 1540px; margin: 0 auto; }
.project-section { background: #ece8e0; border-top: 1px solid #ded9d1; }
.project-section > * { max-width: 1390px; margin-left: auto; margin-right: auto; }

.section-heading { justify-content: space-between; gap: 28px; }
.section-heading.compact { align-items: flex-end; }

.button {
  border: 0;
  border-radius: 10px;
  padding: 11px 15px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, select:focus-visible { outline: 3px solid rgba(162,56,49,.22); outline-offset: 2px; }
.button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button-light { background: var(--white); color: var(--ink); box-shadow: 0 7px 25px rgba(18,32,45,.08); }
.button-ghost { background: transparent; color: var(--accent); padding-inline: 5px; }

.filter-panel {
  margin-top: 30px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(230px, 1.3fr) auto minmax(210px, 1fr);
  gap: 18px;
  align-items: end;
  box-shadow: 0 7px 25px rgba(24,34,43,.035);
}

.filter-panel label span { display: block; margin: 0 0 7px 2px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
select {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 13px;
  border: 1px solid #d9d6d0;
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  font-weight: 650;
  font-size: 13px;
}
.filter-rule { border-left: 1px solid var(--line); padding-left: 20px; min-height: 42px; display: flex; justify-content: center; flex-direction: column; }
.filter-rule strong { font-size: 14px; }
.filter-rule span { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }

.kpi-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.kpi-card { min-height: 130px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: 0 7px 25px rgba(24,34,43,.035); position: relative; overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--card-accent, var(--ink)); }
.kpi-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.kpi-value { margin-top: 12px; font: 500 33px/1 Georgia, serif; letter-spacing: -.04em; }
.kpi-note { margin-top: 11px; color: var(--muted); font-size: 11px; line-height: 1.35; }

.insight-grid { margin-top: 18px; display: grid; grid-template-columns: 1.1fr .95fr 1.2fr; gap: 16px; }
.panel { min-height: 294px; padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: var(--shadow); }
.panel-heading { justify-content: space-between; gap: 16px; }
.panel-total { color: var(--muted); font-size: 12px; }
.info-badge { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--muted); font: italic 600 12px Georgia, serif; cursor: help; }

.status-chart { padding-top: 28px; }
.status-track { height: 16px; border-radius: 999px; overflow: hidden; display: flex; background: #edf0f1; }
.status-segment { min-width: 0; transition: width .3s ease; }
.status-segment.approved { background: var(--green); }
.status-segment.wip { background: var(--amber); }
.status-segment.reject, .status-segment.closed { background: var(--red); }
.status-legend { margin-top: 28px; display: grid; gap: 14px; }
.status-item { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.status-item strong { font-size: 15px; }
.status-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.approved { background: var(--green); }
.dot.wip { background: var(--amber); }
.dot.reject, .dot.closed { background: var(--red); }

.bar-chart, .blocker-chart { margin-top: 22px; display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 65px 1fr 22px; gap: 10px; align-items: center; font-size: 11px; color: var(--muted); }
.bar-track { height: 8px; border-radius: 99px; background: #eceeef; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--ink-2); min-width: 0; transition: width .3s ease; }
.bar-row.active .bar-fill { background: var(--accent); }
.bar-row strong { color: var(--ink); text-align: right; }

.blocker-row { display: grid; grid-template-columns: 96px 1fr 22px; gap: 10px; align-items: center; font-size: 11px; }
.blocker-row > span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blocker-row strong { font-size: 11px; text-align: right; }
.blocker-fill { height: 8px; background: var(--accent); border-radius: 99px; }
.no-data { padding: 40px 10px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }

.legend { gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.attention-strip { margin-top: 25px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.attention-card { border: 1px solid #ddd7cd; border-radius: 13px; background: rgba(255,255,255,.62); padding: 16px; min-height: 104px; }
.attention-card .label { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.attention-card strong { display: block; margin-top: 7px; font-size: 13px; }
.attention-card p { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.table-wrap { margin-top: 14px; border: 1px solid #dcd7ce; border-radius: 16px; overflow: auto; background: var(--white); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 1120px; }
th { padding: 13px 14px; background: #f7f5f1; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 16px 14px; border-bottom: 1px solid #ece9e4; vertical-align: top; font-size: 12px; line-height: 1.45; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfaf8; }
.project-cell strong { display: block; font-size: 13px; }
.project-cell span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.status-pill, .gate-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-pill.approved { background: var(--green-soft); color: var(--green); }
.status-pill.wip { background: var(--amber-soft); color: #8a5b1c; }
.status-pill.reject, .status-pill.closed { background: var(--red-soft); color: var(--red); }
.gate-pill { background: #edf0f2; color: var(--ink-2); }
.readiness-cell { min-width: 145px; }
.readiness-label { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; font-weight: 700; }
.mini-track { height: 6px; margin-top: 8px; border-radius: 99px; overflow: hidden; background: #e8ebed; }
.mini-track i { display: block; height: 100%; border-radius: 99px; background: var(--ink-2); }
.mini-track i.ready { background: var(--green); }
.target-date { font-weight: 700; white-space: nowrap; }
.target-date.tbc { color: var(--amber); }
.target-date.na { color: var(--muted); }
.blocker-copy { max-width: 190px; color: var(--red); }
.blocker-copy.none { color: var(--muted); }
.next-action { max-width: 250px; }
.owner-tag { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.empty-state { padding: 58px 24px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 5px; }

footer { padding-top: 14px; display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 10px; }

@media (max-width: 1100px) {
  .filter-panel { grid-template-columns: 1fr 1fr auto; }
  .filter-rule { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .insight-grid { grid-template-columns: 1fr 1fr; }
  .blockers-panel { grid-column: 1 / -1; }
}

@media (max-width: 740px) {
  .topbar, .section-heading, footer { align-items: flex-start; flex-direction: column; }
  .topbar-meta { align-items: flex-start; flex-direction: column; gap: 6px; }
  .overview, .project-section { padding: 34px 18px; }
  .filter-panel { grid-template-columns: 1fr; }
  .filter-rule { grid-column: auto; }
  .kpi-grid, .insight-grid, .attention-strip { grid-template-columns: 1fr; }
  .blockers-panel { grid-column: auto; }
  .kpi-card { min-height: 112px; }
  .section-heading.compact { align-items: flex-start; }
}

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