/* HERMES Explorer – stylesheet */
:root {
    --bg: #f2f5f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --ink: #15212d;
    --ink-2: #33475b;
    --muted: #61758a;
    --line: #d8e0e8;
    --line-strong: #b9c6d3;
    --brand: #123a63;
    --brand-2: #1f5f99;
    --brand-3: #2f6f9f;
    --accent: #c8102e;
    --ok: #1f7a4d;
    --warn: #a86400;
    --danger: #b3261e;
    --grey: #64748b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 32, 48, .05), 0 10px 30px rgba(16, 32, 48, .06);
    --shadow-sm: 0 1px 2px rgba(16, 32, 48, .06);
    --max: 1180px;
    --font: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .55em; color: var(--ink); letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4vw, 3.15rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: .22em 0; }
img { max-width: 100%; height: auto; }
code, pre { font-family: var(--mono); }
pre { background: #0f1c2a; color: #e6eef6; padding: 1rem; border-radius: var(--radius-sm); overflow: auto; }

.container { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }
.main-content { padding-block: 2rem 3.5rem; min-height: 55vh; }
.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; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--accent); color: #fff; padding: .6rem 1rem; }
.skip-link:focus { left: .5rem; top: .5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--brand-3); margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.text-link { font-weight: 600; font-size: .92rem; }
.text-link:hover { text-decoration: underline; }
.section-foot { margin-top: 1rem; }

/* Header */
.site-header {
    background: linear-gradient(110deg, #0f3154 0%, #123a63 55%, #16456f 100%);
    color: #fff;
    border-bottom: 4px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.header-inner {
    width: min(var(--max), calc(100% - 2.5rem));
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 9px;
    background: #fff; color: var(--brand);
    display: grid; place-items: center;
    font-weight: 800; font-size: 1.25rem;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.02rem; letter-spacing: .08em; }
.brand-text small { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: #b9d1e8; }
.main-nav { display: flex; align-items: center; gap: .1rem; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
    color: #d7e5f2; text-decoration: none;
    font-size: .86rem; font-weight: 600;
    padding: .5rem .62rem; border-radius: 7px;
    white-space: nowrap;
}
.main-nav a:hover { background: rgba(255,255,255,.09); color: #fff; text-decoration: none; }
.main-nav a.active { background: rgba(255,255,255,.16); color: #fff; }
.header-search { display: flex; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 8px; overflow: hidden; }
.header-search input { width: 150px; border: 0; background: transparent; color: #fff; padding: .45rem .55rem; font: inherit; font-size: .84rem; outline: none; }
.header-search input::placeholder { color: #b9d1e8; }
.header-search button { border: 0; background: transparent; color: #fff; font-size: 1.1rem; padding: .35rem .55rem; cursor: pointer; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: .45rem .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; margin: 4px 0; }

/* Breadcrumbs */
.breadcrumb-bar { background: #e8eef4; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem; padding: .65rem 0; font-size: .82rem; color: var(--muted); }
.breadcrumbs a { color: var(--brand-2); }
.breadcrumbs span[aria-current] { color: var(--ink-2); font-weight: 600; }

/* Flash */
.flash { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; border: 1px solid; font-size: .94rem; }
.flash--success { background: #e8f6ee; border-color: #b7e1c9; color: #155c39; }
.flash--error { background: #fdeceb; border-color: #f3c1bd; color: #8c1d17; }
.flash--info { background: #eaf2fa; border-color: #c3d9ee; color: #174a75; }

/* Hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 2.5rem;
    align-items: center;
    padding: 2.2rem 0 2.8rem;
}
.hero h1 { color: var(--brand); margin-bottom: .6rem; }
.hero .lead { font-size: 1.08rem; color: var(--ink-2); max-width: 62ch; }
.hero-search { display: flex; gap: .5rem; max-width: 620px; margin: 1.2rem 0 1rem; }
.hero-search input { flex: 1; min-width: 0; padding: .85rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; background: #fff; box-shadow: var(--shadow-sm); }
.hero-search input:focus { outline: 2px solid #9cc3e6; border-color: var(--brand-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.hero-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transform: rotate(.4deg); }
.hero-panel-head { display: flex; align-items: center; gap: .4rem; padding: .65rem .9rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.hero-panel-title { margin-left: .4rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--grey { background: #c7d2dc; } .dot--blue { background: #7fb2dc; } .dot--red { background: #e2808b; }
.hero-mini { padding: .75rem .9rem; display: grid; gap: .45rem; }
.hero-mini-phase { display: flex; align-items: center; gap: .65rem; padding: .5rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.hero-mini-phase div { display: flex; flex-direction: column; line-height: 1.2; }
.hero-mini-phase small { color: var(--muted); font-size: .74rem; }
.phase-chip { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--phase); font-weight: 800; font-size: .85rem; }
.mini-check { margin-left: auto; color: var(--ok); font-weight: 800; }
.mini-progress { margin-left: auto; color: var(--brand-2); font-weight: 700; font-size: .8rem; }
.mini-open { margin-left: auto; color: var(--muted); font-size: .76rem; }
.hero-panel-foot { display: flex; gap: 1rem; padding: .65rem .9rem; background: var(--surface-2); border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; margin-bottom: 2.8rem; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; display: flex; flex-direction: column; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.stat-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: #b8cde0; }
.stat-count { font-size: 1.7rem; font-weight: 800; color: var(--brand); line-height: 1; }
.stat-label { font-weight: 700; font-size: .9rem; margin-top: .3rem; }
.stat-hint { color: var(--muted); font-size: .72rem; margin-top: .15rem; }

/* Sections */
.section-block { margin-bottom: 2.8rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.section-head .eyebrow { margin-bottom: .2rem; }

/* Phase track */
.phase-track { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }
.phase-card { position: relative; display: flex; gap: .7rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--phase); border-radius: var(--radius-sm); padding: .9rem .8rem; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.phase-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.phase-abbr { width: 30px; height: 30px; border-radius: 7px; background: var(--phase); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.phase-body { display: flex; flex-direction: column; min-width: 0; }
.phase-body strong { font-size: .92rem; }
.phase-body small { color: var(--muted); font-size: .72rem; }
.phase-meta { color: var(--muted); font-size: .7rem; margin-top: .25rem; }

/* Cards */
.card-grid { display: grid; gap: 1rem; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .scenario-card, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card { padding: 1.1rem 1.15rem; }
.scenario-card { padding: 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .55rem; }
.scenario-card h3 { margin: 0; font-size: 1.08rem; }
.scenario-card p { color: var(--ink-2); font-size: .92rem; margin: 0; }
.scenario-card-head { display: flex; align-items: center; gap: .6rem; }
.scenario-icon { width: 34px; height: 34px; border-radius: 8px; background: #e8f0f8; color: var(--brand-2); display: grid; place-items: center; font-size: 1.15rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { background: #edf2f7; color: var(--ink-2); border: 1px solid #dbe5ee; border-radius: 999px; padding: .12rem .5rem; font-size: .7rem; white-space: nowrap; }
.scenario-card-foot { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .72rem; border-top: 1px solid var(--line); padding-top: .5rem; margin-top: auto; }

/* Project rows */
.project-list { display: grid; gap: .55rem; }
.project-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, .8fr) 30px; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; color: var(--ink); box-shadow: var(--shadow-sm); }
.project-row:hover { text-decoration: none; border-color: #b8cde0; box-shadow: var(--shadow); }
.project-row-main { display: flex; flex-direction: column; min-width: 0; }
.project-row-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-row-main small, .project-row-progress small { color: var(--muted); font-size: .76rem; }
.project-row-progress { display: flex; flex-direction: column; gap: .25rem; }
.project-row-arrow { color: var(--brand-2); font-size: 1.2rem; text-align: right; }

/* Progress */
.progress { height: 8px; border-radius: 999px; background: #e4ebf2; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), #4c92c9); border-radius: inherit; }
.progress--ok > span { background: linear-gradient(90deg, #1f7a4d, #4aa877); }
.progress--warn > span { background: linear-gradient(90deg, #a86400, #d18a1c); }
.progress--thin { height: 6px; }

/* Callout */
.callout { display: flex; align-items: center; justify-content: space-between; gap: 2rem; background: linear-gradient(120deg, #eaf1f8, #f7fafc); border: 1px solid #c9d9e8; border-left: 5px solid var(--brand-2); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.callout h2 { font-size: 1.25rem; margin-bottom: .3rem; }
.callout p { margin: 0; color: var(--ink-2); max-width: 70ch; }
.callout-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; flex: 0 0 auto; }
.callout-actions small { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid transparent; border-radius: 8px; padding: .55rem .95rem; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .15s ease, border-color .15s ease, transform .1s ease; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.btn--primary:hover { background: var(--brand); border-color: var(--brand); }
.btn--ghost { background: #fff; color: var(--brand-2); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--brand-2); background: #f4f8fc; }
.btn--danger { background: #fff; color: var(--danger); border-color: #e3b3af; }
.btn--danger:hover { background: #fdf1f0; border-color: var(--danger); }
.btn--small { padding: .35rem .65rem; font-size: .8rem; }
.btn--block { width: 100%; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label, .label { font-weight: 700; font-size: .82rem; color: var(--ink-2); }
.field .hint { color: var(--muted); font-size: .76rem; }
input[type="text"], input[type="search"], input[type="date"], input[type="url"], input[type="number"], select, textarea {
    width: 100%; padding: .58rem .7rem; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: .9rem; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc3e6; border-color: var(--brand-2); }
textarea { min-height: 110px; resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.1rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; margin-bottom: 1rem; }
.filter-bar .field { min-width: 150px; flex: 1 1 150px; }
.filter-bar .field--wide { flex: 2 1 240px; }
.filter-bar .form-actions { margin: 0; }
.inline-form { display: inline; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th, table.data td { padding: .6rem .7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data th { background: var(--surface-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; white-space: nowrap; }
table.data tbody tr:hover { background: #f8fbfd; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { text-align: right; white-space: nowrap; }
table.data .row-title { font-weight: 700; }
.table-note { color: var(--muted); font-size: .78rem; margin-top: .5rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .25rem; border-radius: 999px; padding: .14rem .5rem; font-size: .7rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; border: 1px solid; }
.badge--ok { background: #e8f6ee; color: #155c39; border-color: #b7e1c9; }
.badge--progress { background: #eaf2fa; color: #174a75; border-color: #c3d9ee; }
.badge--danger { background: #fdeceb; color: #8c1d17; border-color: #f3c1bd; }
.badge--muted { background: #eef1f4; color: #5b6b7c; border-color: #d8e0e7; }
.badge--neutral { background: #f4f6f8; color: #33475b; border-color: #d8e0e7; }
.badge--phase { background: color-mix(in srgb, var(--phase) 12%, white); color: var(--phase); border-color: color-mix(in srgb, var(--phase) 35%, white); }
.kind { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }

/* Detail pages */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.page-head h1 { margin-bottom: .25rem; }
.page-head .lead { color: var(--ink-2); max-width: 75ch; margin: 0; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; flex: 0 0 auto; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 1.2rem; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 1rem; }
.detail-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 88px; }
.panel { padding: 1.1rem 1.2rem; }
.panel h2, .panel h3 { margin-bottom: .6rem; }
.panel h2 { font-size: 1.15rem; }
.panel h3 { font-size: .95rem; }
.panel--accent { border-top: 4px solid var(--brand-2); }
.panel--muted { background: var(--surface-2); }
.meta-list { display: grid; gap: .55rem; margin: 0; }
.meta-list div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: .5rem; align-items: baseline; }
.meta-list dt { color: var(--muted); font-size: .78rem; font-weight: 700; }
.meta-list dd { margin: 0; font-size: .88rem; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.link-list li { margin: 0; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem .45rem; border-radius: 6px; color: var(--ink-2); font-size: .88rem; }
.link-list a:hover { background: #edf4fa; text-decoration: none; color: var(--brand); }
.link-list .count { color: var(--muted); font-size: .74rem; }
.outline { margin: 0; padding-left: 1.1rem; }
.outline li { margin: .28em 0; }
.outline ul { margin-top: .25em; }
.prose { max-width: 78ch; }
.prose p { color: var(--ink-2); }
.prose ul, .prose ol { color: var(--ink-2); }
.callout-small { background: #f1f6fb; border: 1px solid #d3e2ef; border-radius: var(--radius-sm); padding: .8rem .9rem; font-size: .86rem; color: var(--ink-2); }
.callout-small strong { color: var(--ink); }

/* Tabs */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .55rem .85rem; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; font-size: .86rem; font-weight: 700; color: var(--muted); }
.tabs a:hover { text-decoration: none; color: var(--brand); background: #eef4fa; }
.tabs a.active { background: var(--surface); border-color: var(--line); color: var(--brand); margin-bottom: -1px; }

/* Scenario matrix */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table.matrix { width: 100%; border-collapse: collapse; min-width: 820px; font-size: .8rem; }
table.matrix th, table.matrix td { border: 1px solid var(--line); padding: .45rem .5rem; vertical-align: top; }
table.matrix thead th { background: var(--brand); color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; text-align: left; position: sticky; top: 0; }
table.matrix td.module-cell { background: var(--surface-2); font-weight: 800; width: 150px; white-space: nowrap; }
table.matrix td.module-cell a { color: var(--brand); }
table.matrix .cell-task { font-weight: 800; color: var(--ink); display: block; margin-bottom: .2rem; }
table.matrix .cell-results { margin: 0; padding-left: 1rem; color: var(--ink-2); font-size: .75rem; }
table.matrix .cell-role { color: var(--muted); font-size: .72rem; margin-top: .25rem; }
table.matrix tr:nth-child(even) td:not(.module-cell) { background: #fbfdff; }

/* Project dashboard */
.project-hero { background: linear-gradient(120deg, #103a61, #1b5487); color: #fff; border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.project-hero h1 { color: #fff; margin-bottom: .25rem; }
.project-hero .meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; color: #cfe0ef; font-size: .82rem; }
.project-hero .meta strong { color: #fff; }
.project-hero .hero-actions { margin-top: 1rem; }
.project-hero .btn--ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); }
.project-hero .btn--ghost:hover { background: rgba(255,255,255,.18); }
.project-hero .btn--primary { background: #fff; color: var(--brand); border-color: #fff; }
.project-hero .btn--primary:hover { background: #eaf2fa; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem .9rem; box-shadow: var(--shadow-sm); }
.kpi .kpi-value { font-size: 1.45rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.kpi .kpi-label { color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.kpi .progress { margin-top: .45rem; }
.phase-board { display: grid; gap: .55rem; }
.phase-board-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 120px 100px; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--phase); border-radius: var(--radius-sm); padding: .7rem .85rem; color: var(--ink); box-shadow: var(--shadow-sm); }
.phase-board-row:hover { text-decoration: none; border-color: #b8cde0; }
.phase-board-row .name { font-weight: 800; font-size: .9rem; display: flex; align-items: center; gap: .45rem; }
.phase-board-row .num { color: var(--muted); font-size: .76rem; text-align: right; }
.phase-board-row .status { text-align: right; }
.timeline { display: grid; gap: .65rem; }
.timeline-item { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: .65rem; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); margin-top: .4rem; box-shadow: 0 0 0 3px #dbe8f4; }
.timeline-body { border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.timeline-body p { margin: 0; font-size: .86rem; }
.timeline-body small { color: var(--muted); font-size: .74rem; }

/* Empty */
.empty-state { text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 2.5rem 1.5rem; }
.empty-state h3 { margin-bottom: .3rem; }
.empty-state p { color: var(--muted); max-width: 55ch; margin-inline: auto; }

/* Search */
.search-results { display: grid; gap: .65rem; }
.search-hit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; box-shadow: var(--shadow-sm); }
.search-hit h3 { font-size: 1rem; margin-bottom: .15rem; }
.search-hit .snippet { color: var(--ink-2); font-size: .87rem; margin: 0; }
.search-hit mark { background: #fff0b3; color: inherit; padding: 0 .1em; border-radius: 2px; }
.search-meta { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .72rem; margin-bottom: .2rem; }

/* Misc */
.divider { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.kv { display: flex; flex-wrap: wrap; gap: .35rem .8rem; color: var(--muted); font-size: .78rem; }
.kv strong { color: var(--ink-2); }
.checkbox-list { display: grid; gap: .3rem; }
.checkbox-list label { display: flex; gap: .4rem; align-items: flex-start; font-size: .86rem; font-weight: 400; }
.checkbox-list input { margin-top: .25rem; }
.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.list-plain li { margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.sticky-actions { position: sticky; bottom: 1rem; background: rgba(255,255,255,.95); backdrop-filter: blur(4px); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; box-shadow: var(--shadow); display: flex; gap: .5rem; justify-content: flex-end; }

/* Footer */
.site-footer { background: #0f2740; color: #b9cde0; border-top: 4px solid var(--accent); padding: 1.5rem 0; font-size: .8rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer a { color: #d8e7f4; }
.site-footer strong { color: #fff; }

/* Responsive */
@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .phase-track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .header-search { display: none; }
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero-panel { max-width: 560px; }
    .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-side { position: static; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .phase-board-row { grid-template-columns: 150px minmax(0, 1fr) 90px; }
    .phase-board-row .status { display: none; }
}
@media (max-width: 760px) {
    .main-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: #123a63; padding: .6rem 1rem 1rem; flex-direction: column; align-items: stretch; box-shadow: 0 10px 20px rgba(0,0,0,.2); }
    .main-nav.open { display: flex; }
    .main-nav a { padding: .65rem .7rem; }
    .nav-toggle { display: block; }
    .header-inner { position: relative; }
    .header-search { display: none; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .phase-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; }
    .form-grid, .two-col, .three-col { grid-template-columns: 1fr; }
    .project-row { grid-template-columns: minmax(0, 1fr) 28px; }
    .project-row-progress { display: none; }
    .page-head { flex-direction: column; }
    .callout { flex-direction: column; align-items: flex-start; }
    .callout-actions { align-items: flex-start; }
    .phase-board-row { grid-template-columns: minmax(0, 1fr) 90px; }
    .phase-board-row .num { display: none; }
    .meta-list div { grid-template-columns: 1fr; gap: 0; }
    .footer-inner { flex-direction: column; }
}
@media (max-width: 460px) {
    .stat-grid, .phase-track { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: 1fr; }
    .hero-search { flex-direction: column; }
}
