:root {
  --navy: #102b50;
  --navy-soft: #274563;
  --blue: #1756a9;
  --paper: #f4f5f7;
  --surface: #ffffff;
  --line: #c9ced6;
  --muted: #5b6673;
  --ink: #172231;
  --warning: #b75500;
  --warning-bg: #fff3e5;
  --warning-line: #e97c1f;
  --danger: #9b2330;
  --danger-bg: #faeaec;
  --success: #176b3a;
  --success-bg: #e9f5ed;
  --focus: #ffb000;
  --max: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 "Segoe UI", Aptos, system-ui, Arial, sans-serif;
}
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  background: var(--navy);
  color: white;
  padding: .7rem 1rem;
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.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; }

.kicker {
  margin: 0 0 .75rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-header {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 1.25rem 2rem;
  padding: 0 max(1.5rem, calc((100% - var(--max)) / 2));
  border-bottom: 1px solid var(--navy);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  color: var(--navy);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: .04em;
  text-decoration: none;
}
.brand span { font-weight: 600; letter-spacing: 0; }
.site-header nav { display: flex; align-self: stretch; }
.site-header nav a {
  display: flex;
  align-items: center;
  padding: 0 1.15rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 650;
  border-bottom: 3px solid transparent;
}
.site-header nav a:hover,
.site-header nav a:focus-visible { border-bottom-color: var(--blue); }
.site-header form { justify-self: end; }
.text-button {
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  min-height: 44px;
  padding: .45rem .9rem;
  cursor: pointer;
  font-weight: 700;
}
.text-button:hover,
.text-button:focus-visible { background: var(--navy); color: white; }

main, footer { max-width: var(--max); margin-inline: auto; }
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
  gap: 2.5rem 3rem;
  padding: clamp(2rem, 4.5vw, 4.5rem) clamp(1.25rem, 4vw, 2rem) 2.4rem;
  background: var(--surface);
}
h1, h2, h3 { color: var(--navy); }
h1 {
  max-width: 18ch;
  margin: 0;
  font: 600 clamp(2.2rem, 5vw, 4.4rem)/1.06 Georgia, "Times New Roman", serif;
  letter-spacing: -.03em;
}
.lede { max-width: 46rem; margin: 1rem 0 0; color: #364454; font-size: clamp(1.02rem, 1.6vw, 1.22rem); }
.project-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem 1rem;
  max-width: 46rem;
  margin: 1.25rem 0 0;
  padding: .85rem 1rem;
  border: 1px solid var(--danger);
  background: var(--danger-bg);
  color: #711b25;
}
.metadata { display: grid; gap: .7rem; margin: .2rem 0 0; align-content: start; }
.metadata div { padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.metadata dt, .document-meta dt {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.metadata dd, .document-meta dd { margin: .15rem 0 0; font-weight: 700; color: var(--navy); }

.warning-band {
  padding: 1.05rem clamp(1.25rem, 4vw, 2rem);
  color: #773100;
  background: var(--warning-bg);
  border-block: 1px solid var(--warning-line);
}
.warning-band p { margin: 0; font-size: 1.02rem; }
.warning-band ul {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .9rem;
  margin: .7rem 0 0;
  padding: 0;
  list-style: none;
}
.warning-band li {
  padding: .2rem .55rem;
  border: 1px solid var(--warning-line);
  background: white;
  color: #773100;
  font-size: .86rem;
  font-weight: 700;
}

.section {
  padding: clamp(2.2rem, 4.5vw, 4.5rem) clamp(1.25rem, 4vw, 2rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 76px;
}
.section > h2 {
  display: flex;
  gap: .8rem;
  align-items: baseline;
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.section > h2 span { color: var(--blue); font: 700 .8rem/1 ui-monospace, Menlo, Consolas, monospace; }
.section-intro { max-width: 52rem; color: var(--muted); margin: .75rem 0 1.75rem; }

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.metrics div {
  min-width: 0;
  padding: 1.5rem 1rem;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metrics dt {
  color: var(--navy-soft);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.metrics dd {
  margin: .4rem 0 0;
  color: var(--navy);
  font: 600 clamp(2rem, 3.6vw, 3.4rem)/1 Georgia, serif;
}
.metrics dd span { color: var(--muted); font-size: .52em; }

.status-key { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; margin-top: 1.25rem; }
.status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: fit-content;
  padding: .22rem .55rem;
  border: 1px solid currentColor;
  background: var(--surface);
  color: var(--navy);
  font-weight: 700;
  font-size: .82rem;
  line-height: 1.2;
}
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; flex: none; }
.status-valid { color: var(--success); background: var(--success-bg); }
.status-provisional, .status-confirm { color: var(--warning); background: var(--warning-bg); }
.status-blocked { color: var(--danger); background: var(--danger-bg); }
.status-protected { color: var(--navy); background: #eef1f4; }

.document-list { border-top: 2px solid var(--navy); }
.document-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, .85fr) minmax(180px, 1fr) auto;
  gap: 1rem 1.2rem;
  align-items: center;
  padding: 1.2rem .6rem;
  border-bottom: 1px solid var(--line);
}
.download-row { background: #f2f4f7; }
.document-kind {
  margin: 0 0 .28rem;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.document-main h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.document-main p { margin: .28rem 0 0; color: var(--muted); font-size: .92rem; }
.document-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0; }
.document-meta dd { font-size: .86rem; }
.action-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .45rem .95rem;
  border: 1px solid var(--blue);
  background: var(--surface);
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.action-link:hover,
.action-link:focus-visible {
  background: var(--blue);
  color: white;
  text-decoration: none;
}
.download-row .action-link {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.download-row .action-link:hover,
.download-row .action-link:focus-visible { background: var(--blue); border-color: var(--blue); }

.limits-list { border-top: 2px solid var(--navy); }
.limits-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem 2rem;
  align-items: center;
  padding: 1.2rem .6rem;
  border-bottom: 1px solid var(--line);
}
.limits-list h3 { margin: 0; font-size: 1.02rem; }
.limits-list p { margin: .28rem 0 0; color: var(--muted); }

.provenance { background: #eef1f4; }
.provenance dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 3rem; margin: 1.75rem 0 0; }
.provenance dt { color: var(--navy); font-weight: 800; }
.provenance dd { margin: .3rem 0 0; color: #42505f; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 2rem) 2.75rem;
  color: var(--muted);
  font-size: .86rem;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  background: var(--surface);
}
.login-context {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.75rem, 5vw, 5rem);
  background: var(--navy);
  color: white;
}
.login-context .brand { color: white; }
.login-context .kicker { color: #adc2d8; }
.login-context h1 { color: white; font-size: clamp(2.4rem, 5.5vw, 4.8rem); max-width: 10ch; }
.login-context p { max-width: 36rem; color: #dbe5f0; font-size: 1.05rem; overflow-wrap: break-word; }
.login-points {
  max-width: 36rem;
  margin: 1.4rem 0 0;
  padding-left: 1.15rem;
  color: #dbe5f0;
}
.login-points li { margin: .45rem 0; overflow-wrap: break-word; }
.login-warning {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid #58708b;
  font-size: .9rem;
  color: #dbe5f0;
  overflow-wrap: break-word;
}
.login-panel { display: grid; align-content: center; padding: clamp(1.75rem, 6vw, 6rem); }
.login-panel h2 { margin: 0; font: 600 clamp(1.8rem, 3.5vw, 2.8rem)/1.12 Georgia, serif; }
.login-panel > p { color: var(--muted); margin: .75rem 0 1.6rem; }
.login-form { display: grid; gap: 1.15rem; }
.field { display: grid; gap: .4rem; }
.field label { color: var(--navy); font-weight: 750; }
.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #8793a0;
  border-radius: 2px;
  padding: .8rem .9rem;
  color: var(--ink);
  background: white;
}
.field input:hover { border-color: var(--navy-soft); }
.field input:focus-visible { border-color: var(--navy); }
.field input:disabled { background: #eef1f4; color: var(--muted); cursor: not-allowed; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.primary-button {
  border: 0;
  border-radius: 2px;
  min-height: 48px;
  padding: .85rem 1.2rem;
  background: var(--blue);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.primary-button:hover,
.primary-button:focus-visible { background: #0e4385; }
.primary-button:active { background: var(--navy); }
.primary-button:disabled {
  background: #8793a0;
  cursor: not-allowed;
}
.form-error, .form-notice {
  padding: .85rem 1rem;
  margin: 0 0 1.2rem;
  border-left: 4px solid var(--danger);
  color: #711b25;
  background: var(--danger-bg);
}
.form-notice { border-color: var(--warning); color: #693000; background: var(--warning-bg); }

.reader-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.1rem;
  padding: .7rem max(1rem, calc((100% - 1180px) / 2));
  background: var(--navy);
  color: white;
  font: 600 14px/1.4 "Segoe UI", Arial, sans-serif;
}
.reader-nav a { color: white; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.reader-nav a:hover { text-decoration: underline; }
.reader-nav a:first-child { margin-right: auto; }
.reader-nav form { margin: 0; }
.reader-nav button {
  border: 1px solid #adc2d8;
  background: transparent;
  color: white;
  min-height: 44px;
  padding: .35rem .7rem;
  cursor: pointer;
}
.reader-nav button:hover,
.reader-nav button:focus-visible { background: white; color: var(--navy); }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .document-row { grid-template-columns: minmax(0, 1fr) auto; }
  .document-main { grid-column: 1 / -1; }
  .document-meta { grid-column: 1; }
  .action-link { grid-column: 2; }
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; padding-inline: 1.1rem; }
  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
    border-top: 1px solid var(--line);
  }
  .site-header nav a { min-height: 48px; padding-inline: .8rem; }
  .intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .metadata { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.5rem; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .site-header { gap: .4rem 1rem; min-height: 56px; }
  .brand span { display: none; }
  .intro, .section { padding-inline: 1rem; }
  .metadata { grid-template-columns: 1fr; }
  .warning-band { padding-inline: 1rem; }
  .warning-band ul { flex-direction: column; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics dd { font-size: 2.1rem; }
  .document-row { grid-template-columns: 1fr; gap: .7rem; padding-inline: 0; }
  .document-main, .document-meta, .action-link { grid-column: 1; }
  .action-link { justify-self: start; width: fit-content; }
  .limits-list article { grid-template-columns: 1fr; gap: .55rem; padding-inline: 0; }
  .provenance dl { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: .25rem; padding-inline: 1rem; }
  .login-shell { grid-template-columns: 1fr; }
  .login-panel { order: -1; min-height: auto; padding: 1.5rem 1.1rem 1.75rem; }
  .login-context { min-height: auto; padding: 1.35rem 1.1rem 1.6rem; }
  .login-context h1 { font-size: 2rem; }
  .login-points { margin-top: .85rem; }
}

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

/* Cockpit — direction approuvée « Pilotage du projet » */
.dashboard-body {
  --dash-navy: #073260;
  --dash-navy-deep: #062a50;
  --dash-blue: #0b63c7;
  --dash-cyan: #0788a8;
  --dash-purple: #574eb0;
  --dash-green: #238652;
  --dash-orange: #d56800;
  --dash-red: #c41e2f;
  --dash-bg: #f7f9fc;
  --dash-border: #d8e0e9;
  --dash-muted: #66758a;
  background: var(--dash-bg);
  color: #102849;
  font: 14px/1.42 Inter, "Segoe UI", Aptos, system-ui, sans-serif;
}
.dashboard-body h1,
.dashboard-body h2,
.dashboard-body h3 { color: #0b2a52; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.dashboard-body svg:not(.icon-sprite) {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 188px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  display: flex;
  flex-direction: column;
  color: white;
  background: var(--dash-navy);
  border-right: 1px solid #174877;
}
.sidebar-brand { display: grid; gap: .18rem; padding: 1.25rem 1.4rem 1.15rem; }
.sidebar-brand strong { font-family: Georgia, serif; font-size: 1.55rem; letter-spacing: .04em; }
.sidebar-brand span { color: #d7e5f4; font-size: .85rem; }
.sidebar nav { display: grid; gap: .14rem; padding: .6rem .6rem; }
.sidebar nav a {
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: center;
  min-height: 45px;
  padding: .6rem .72rem;
  border-radius: 4px;
  color: #edf5ff;
  text-decoration: none;
  font-weight: 650;
}
.sidebar nav a svg { justify-self: center; color: #bcd5ed; font-size: 1.05rem; }
.sidebar nav a:hover,
.sidebar nav a:focus-visible { background: #124a80; }
.sidebar nav a.active { background: #14569d; color: white; }
.sidebar nav a.active svg { color: white; }
.sidebar-bottom { margin-top: auto; padding: .85rem .85rem 1.15rem; border-top: 1px solid #24537d; }
.sidebar-bottom p { display: grid; grid-template-columns: 18px 1fr; align-items: center; margin: 0 0 .75rem; padding: .4rem .3rem; color: white; }
.sidebar-bottom p svg { width: 16px; height: 16px; }
.sidebar-bottom p strong { font-size: .78rem; }
.sidebar-bottom small { display: block; margin: .16rem 0 0 1.1rem; color: #bcd1e5; font-size: .69rem; }
.sidebar-bottom p small { grid-column: 1 / -1; }
.sidebar-bottom button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #7fa2c4;
  border-radius: 3px;
  background: transparent;
  color: white;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.sidebar-bottom button:hover,
.sidebar-bottom button:focus-visible { background: white; color: var(--dash-navy); }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.workspace-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12.5rem, 24rem);
  align-items: center;
  gap: .75rem 1.25rem;
  min-height: 68px;
  padding: .75rem 1.5rem;
  border-bottom: 1px solid var(--dash-border);
  background: rgba(255,255,255,.98);
}
.workspace-header h1 {
  min-width: 0;
  margin: 0;
  font: 750 1.65rem/1.15 Inter, "Segoe UI", sans-serif;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.command-trigger {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  min-height: 44px;
  padding: .45rem .75rem;
  border: 1px solid #ccd6e2;
  border-radius: 4px;
  background: white;
  color: #536b86;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 650;
}
.command-trigger svg { width: 18px; height: 18px; flex: none; color: #244a72; }
.command-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-trigger kbd {
  margin-left: auto;
  flex: none;
  padding: .12rem .4rem;
  border: 1px solid #c5d0dc;
  border-radius: 3px;
  background: #f4f7fa;
  color: #3d536b;
  font: 700 .68rem/1.2 Inter, "Segoe UI", sans-serif;
}
.command-trigger:hover,
.command-trigger:focus-visible { border-color: #175da5; color: #175da5; text-decoration: none; }
.command-trigger:active { background: #f3f7fb; }
.command-trigger:visited { color: #536b86; }
.dashboard-main { width: 100%; max-width: none; padding: 1.15rem 1.7rem 1rem; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.summary-card {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--dash-border);
  border-radius: 3px;
  background: white;
}
.summary-card p { margin: 0 0 .45rem; color: #526680; font-size: .7rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.summary-card strong { display: block; color: #0b2a52; font-size: 2rem; line-height: 1; }
.summary-card strong em { font-style: normal; font-size: 1rem; color: #5f738a; }
.summary-card small { display: block; margin-top: .45rem; color: #526b86; font-size: .73rem; font-weight: 650; }
.summary-progress { position: relative; cursor: help; }
.summary-progress:hover,
.summary-progress:focus,
.summary-progress:focus-within { z-index: 50; }
.summary-progress small { color: #0871c4; }
.progress-details {
  position: absolute;
  z-index: 40;
  top: calc(100% + .55rem);
  left: 0;
  width: min(340px, 82vw);
  padding: .9rem 1rem;
  border: 1px solid #b8c7d7;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(8, 37, 69, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: none;
  pointer-events: none;
}
.progress-details::before { content: ""; position: absolute; top: -6px; left: 32px; width: 10px; height: 10px; border-left: 1px solid #b8c7d7; border-top: 1px solid #b8c7d7; background: white; transform: rotate(45deg); }
.summary-progress:hover .progress-details,
.summary-progress:focus .progress-details,
.summary-progress:focus-within .progress-details { opacity: 1; visibility: visible; transform: translateY(0); }
.progress-details > strong { font-size: .82rem; line-height: 1.25; }
.progress-details > span { display: block; margin-top: .25rem; color: var(--dash-muted); font-size: .7rem; }
.progress-details dl { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .8rem; margin: .75rem 0; }
.progress-details dl div { padding-top: .4rem; border-top: 1px solid #e2e8ef; }
.progress-details dt { color: var(--dash-muted); font-size: .59rem; text-transform: uppercase; }
.progress-details dd { margin: .08rem 0 0; color: #0b2a52; font-size: .8rem; font-weight: 800; }
.progress-details em { display: block; color: #526b86; font-size: .63rem; font-style: normal; }
.summary-icon { width: 55px; height: 55px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 1.4rem; font-weight: 800; }
.summary-icon svg { width: 26px; height: 26px; }
.progress-ring {
  width: 55px;
  height: 55px;
  flex: none;
}
.progress-ring svg { width: 55px; height: 55px; display: block; }
.progress-ring-track,
.progress-ring-value {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}
.progress-ring-track { stroke: #d5dee8; }
.progress-ring-value {
  stroke: #0b63c7;
  transform: rotate(-90deg);
  transform-origin: 32px 32px;
}
.summary-icon.blue { color: #194c82; background: #e7f0fa; }
.summary-icon.orange { color: var(--dash-orange); background: #fff0df; }
.summary-icon.red { color: var(--dash-red); background: #fce9eb; }
.panel { margin-top: 1rem; border: 1px solid var(--dash-border); border-radius: 3px; background: white; }
.panel-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .45rem .7rem .45rem 1rem; border-bottom: 1px solid var(--dash-border); }
.panel-heading h2 { margin: 0; font-size: .8rem; letter-spacing: .035em; text-transform: uppercase; }
.panel-heading p { margin: 0; color: var(--dash-muted); font-size: .72rem; }
.panel-action {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  min-height: 44px;
  padding: 0 .45rem;
  color: #175da5;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.panel-action svg { width: 16px; height: 16px; flex: none; }
.panel-action:hover { color: #0e4385; text-decoration: underline; text-underline-offset: .18em; }
.panel-action:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.panel-action:active { color: var(--dash-navy); }
.panel-action:visited { color: #175da5; }
.workstream-head,
.workstream-row { display: grid; grid-template-columns: minmax(200px, 1.15fr) minmax(145px, .75fr) minmax(420px, 2.6fr) 104px; gap: 1rem; align-items: center; }
.workstream-head { min-height: 34px; padding: .5rem 1rem .4rem; color: #64758b; font-size: .63rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.workstream-row { min-height: 64px; padding: .65rem 1rem; border-top: 1px solid #e4e9ef; }
.workstream-name { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.workstream-name p { min-width: 0; margin: 0; }
.workstream-name strong { display: block; font-size: .83rem; }
.workstream-name small { display: block; color: var(--dash-muted); font-size: .69rem; }
.stream-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 1rem; font-weight: 800; }
.stream-icon svg { width: 20px; height: 20px; }
.stream-icon.studies { background: #1a69bb; }
.stream-icon.quantity { background: var(--dash-cyan); }
.stream-icon.pricing { background: var(--dash-purple); }
.stream-icon.structure { background: #1765b2; }
.stream-icon.decisions { background: #17849c; }
.state-meter { min-width: 0; }
.state-meter strong { display: block; margin-bottom: .18rem; color: #284466; font-size: .69rem; }
.state-meter small { display: block; color: var(--dash-muted); font-size: .61rem; }
.steps { display: flex; align-items: flex-start; margin: 0; padding: 0; list-style: none; }
.steps li {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: #7b8999;
  text-align: center;
}
.steps li::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 50%;
  width: calc(100% - 14px);
  height: 2px;
  background: #dce3ea;
  pointer-events: none;
}
.steps li:first-child::before { display: none; }
.step-marker {
  position: relative;
  z-index: 2;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 2px solid #cbd5df;
  border-radius: 50%;
  background: white;
  box-sizing: border-box;
  line-height: 0;
}
.step-marker svg {
  width: 8px;
  height: 8px;
  display: block;
  stroke-width: 3;
  overflow: visible;
}
.step-label { display: block; max-width: 100%; font-size: .58rem; line-height: 1.2; }
.steps li.done { color: #34516f; }
.steps li.done::before { background: #82bd96; }
.steps li.done .step-marker { border-color: #3e9c62; background: #3e9c62; color: white; }
.steps li.current { color: #244b75; font-weight: 750; }
.steps li.current .step-marker { border-color: var(--dash-blue); background: var(--dash-blue); box-shadow: inset 0 0 0 3px white; }
.dashboard-body .status { justify-self: end; min-width: 74px; justify-content: center; border-radius: 2px; padding: .18rem .38rem; font-size: .65rem; white-space: nowrap; }
.dashboard-body .status::before { display: none; }
.dashboard-columns { display: grid; grid-template-columns: .9fr 1.05fr 1.1fr; gap: 1rem; }
.compact-panel { min-width: 0; }
.activity-list { margin: 0; padding: .4rem 1rem .7rem 1.7rem; list-style: none; }
.activity-list li { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: .65rem; min-height: 55px; padding: .72rem 0 .55rem .75rem; border-left: 1px solid #d9e0e8; }
.activity-list li::before { content: ""; position: absolute; left: -5px; top: 17px; width: 8px; height: 8px; border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #ccd6df; background: #78879a; }
.activity-list li.activity-green::before { background: #3e9c62; }
.activity-list li.activity-orange::before { background: #e08118; }
.activity-list li.activity-red::before { background: #d12a39; }
.activity-list strong,
.resource-list strong,
.decision-list strong { display: block; color: #18375c; font-size: .75rem; line-height: 1.25; }
.activity-list span,
.activity-list time { color: var(--dash-muted); font-size: .67rem; }
.activity-list div span { display: block; margin-top: .2rem; }
.decision-list article,
.resource-list article { min-height: 62px; display: grid; align-items: center; gap: .65rem; padding: .65rem .9rem; border-bottom: 1px solid #e2e7ed; }
.decision-list article { grid-template-columns: auto minmax(0, 1fr) auto; }
.decision-list small,
.resource-list small { display: block; margin-top: .2rem; color: var(--dash-muted); font-size: .64rem; }
.priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: .22rem .62rem;
  border: 0;
  border-radius: 999px;
  background: #d9e3ee;
  color: #344c66;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}
.priority.critical { color: #fff; background: #b51f2d; }
.priority.high { color: #7b3900; background: #ffd39a; }
.priority.normal { color: #344c66; background: #d9e3ee; }
.decision-state {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
  padding: .1rem 0;
  border: 0;
  background: transparent;
  color: #40566d;
  line-height: 1.12;
}
.decision-state svg { width: 16px; height: 16px; flex: none; }
.decision-state span { display: grid; gap: .08rem; }
.decision-state small { margin: 0; color: #536579; font-size: .58rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.decision-state strong { color: currentColor; font-size: .68rem; white-space: nowrap; }
.decision-state.state-blocked { color: #a30f1f; }
.decision-state.state-required { color: #8a4100; }
.decision-state.state-review { color: #075985; }
.decision-state.state-incomplete { color: #8a4100; }
.decision-state.state-arbitrate { color: #4f46a5; }
.resource-list article { grid-template-columns: 28px minmax(0, 1fr) auto; }
.resource-list a { color: #185a9e; font-size: .64rem; font-weight: 700; }
.file-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; background: #e7eef6; color: #185a9e; }
.file-icon svg { width: 16px; height: 16px; }
.file-icon.report { color: #0b2a52; background: #e8edf3; }
.dashboard-notice { margin-top: 1rem; padding: .75rem 1rem; border-left: 4px solid #d78012; background: #fff8ed; color: #6d4410; font-size: .74rem; }
.dashboard-footer { width: 100%; max-width: none; margin-top: auto; padding: .8rem 1.7rem; border-top: 1px solid var(--dash-border); color: #64758a; background: white; font-size: .67rem; }

@media (max-width: 1240px) {
  .app-shell { grid-template-columns: 174px minmax(0, 1fr); }
  .workspace-header { grid-template-columns: minmax(0, 1fr); }
  .command-trigger { width: 100%; max-width: 32rem; justify-self: start; }
  .workstream-head,
  .workstream-row { grid-template-columns: 190px 135px minmax(360px, 1fr) 86px; }
  .dashboard-main { overflow-x: hidden; }
  .workstreams { overflow-x: auto; }
  .workstream-head,
  .workstream-row { min-width: 890px; }
}

@media (max-width: 1100px) {
  .workspace-header { grid-template-columns: minmax(0, 1fr); padding-inline: 1.15rem; }
  .command-trigger { width: 100%; max-width: none; }
  .workstreams { overflow-x: visible; }
  .workstream-head { display: none; }
  .workstream-row {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .55rem .8rem;
  }
  .workstream-name { grid-column: 1; }
  .workstream-row .status { grid-column: 2; grid-row: 1; justify-self: end; }
  .state-meter,
  .steps { grid-column: 1 / -1; }
  .steps { overflow-x: auto; padding-bottom: .2rem; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; display: block; }
  .sidebar-brand { display: flex; align-items: baseline; justify-content: space-between; padding: .85rem 1rem; }
  .sidebar-brand strong { font-size: 1.25rem; }
  .sidebar nav { display: flex; overflow-x: auto; padding: 0 .7rem .7rem; }
  .sidebar nav a { flex: none; grid-template-columns: auto auto; min-height: 44px; }
  .sidebar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .15rem 1rem .9rem;
    border-top: 0;
  }
  .sidebar-bottom p { margin: 0; }
  .sidebar-bottom button { width: auto; min-width: 9.5rem; padding-inline: .9rem; }
  .workspace-header { position: static; grid-template-columns: minmax(0, 1fr); gap: .8rem; padding: 1rem; }
  .workspace-header h1 { font-size: 1.35rem; }
  .command-trigger { grid-column: 1; width: 100%; }
  .dashboard-main { padding: 1rem; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-progress { display: grid; grid-template-columns: 1fr auto; }
  .progress-details {
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: .75rem;
    padding: .75rem 0 0;
    border: 0;
    border-top: 1px solid var(--dash-border);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .progress-details::before { display: none; }
  .dashboard-columns { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .dashboard-body { font-size: 13px; }
  .sidebar-bottom { flex-wrap: wrap; }
  .sidebar-bottom p { min-width: 0; flex: 1 1 12rem; }
  .sidebar-bottom form { flex: 1 1 100%; }
  .sidebar-bottom button { width: 100%; min-width: 0; }
  .command-trigger { max-width: 100%; }
  .sidebar nav a svg { display: none; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 96px; }
  .summary-card strong { font-size: 1.7rem; }
  .panel-heading { align-items: flex-start; }
  .panel-heading p { display: none; }
  .dashboard-footer { flex-direction: column; }
  .decision-list article { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .decision-list .decision-state { grid-column: 2; justify-self: start; margin-top: .15rem; }
  .resource-list article { grid-template-columns: 25px minmax(0, 1fr); }
  .resource-list a { grid-column: 2; }
  .steps li { flex: 1 1 18%; min-width: 3.4rem; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-body,
  .dashboard-body .progress-details,
  .progress-ring-value {
    transition: none;
    scroll-behavior: auto;
  }
}

.page-intro { margin: 0 0 1rem; }
.page-intro .kicker { margin-bottom: .4rem; }
.page-lead-title { margin: 0 0 .45rem; font-size: 1.15rem; letter-spacing: -.02em; }
.page-intro p { margin: 0; max-width: 46rem; color: #526b86; }
.page-facts { margin-bottom: .25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.fact-list { margin: 0; padding: .85rem 1.15rem 1rem 1.4rem; color: #31465d; }
.fact-list li { margin: .55rem 0; }
.fact-list strong { color: #0b2a52; }
.catalog-list article {
  min-height: 72px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid #e2e7ed;
}
.catalog-list .document-kind { margin: 0 0 .2rem; }
.catalog-list strong { display: block; color: #18375c; font-size: .86rem; }
.catalog-list small { display: block; margin-top: .2rem; color: var(--dash-muted); font-size: .68rem; }
.decision-page article { min-height: 72px; }
.empty-state {
  display: grid;
  justify-items: center;
  gap: .7rem;
  max-width: 32rem;
  margin: 2.5rem auto;
  padding: 1.5rem 1rem;
  text-align: center;
}
.empty-state-illustration { width: 48px; height: 48px; color: #7b8ca0; }
.empty-state h2 { margin: 0; font-size: 1.05rem; }
.empty-state p { margin: 0; color: #526b86; }
.empty-state-condition { font-weight: 700; color: #31465d; }

.command-palette[hidden] { display: none !important; }
.command-palette {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: min(12vh, 4.5rem) 1rem 1rem;
  background: rgba(7, 50, 96, .38);
}
.command-dialog {
  width: min(36rem, 100%);
  max-height: min(72vh, 34rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #c9d4e0;
  border-radius: 6px;
  background: white;
  box-shadow: 0 16px 40px rgba(8, 37, 69, .2);
}
.command-palette-backdrop { position: absolute; inset: 0; }
.command-dialog { position: relative; z-index: 1; }
.command-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 48px;
  padding: .35rem .55rem .35rem 1rem;
  border-bottom: 1px solid var(--dash-border);
}
.command-dialog-header h2 { margin: 0; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.command-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #31465d;
  cursor: pointer;
}
.command-close:hover,
.command-close:focus-visible { color: var(--dash-navy); background: #f3f7fb; }
.command-input {
  width: 100%;
  min-height: 48px;
  padding: .7rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--dash-border);
  color: #163455;
  font-size: 1rem;
}
.command-status { margin: 0; padding: .55rem 1rem 0; color: var(--dash-muted); font-size: .75rem; }
.command-results {
  margin: 0;
  padding: .35rem 0 .55rem;
  overflow: auto;
  list-style: none;
}
.command-results li {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  min-height: 48px;
  padding: .55rem 1rem;
  cursor: pointer;
}
.command-results li[aria-selected="true"],
.command-results li:hover { background: #eef4fb; }
.command-type {
  color: #3d536b;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.command-body strong { display: block; color: #0b2a52; font-size: .84rem; }
.command-body small { display: block; margin-top: .15rem; color: var(--dash-muted); font-size: .68rem; }

.dashboard-body .progress-ring svg { width: 55px; height: 55px; }
.dashboard-body .step-marker svg { width: 8px; height: 8px; stroke-width: 3; transform: translateY(0.4px); }
.dashboard-body .command-trigger svg { width: 18px; height: 18px; }
.dashboard-body .panel-action svg,
.dashboard-body .decision-state svg,
.dashboard-body .command-close svg { width: 16px; height: 16px; }
.dashboard-body .empty-state-illustration { width: 48px; height: 48px; }

@media (max-width: 560px) {
  .catalog-list article { grid-template-columns: 28px minmax(0, 1fr); }
  .catalog-list .action-link { grid-column: 2; justify-self: start; }
  .command-palette { padding: 1rem .65rem; align-content: stretch; }
  .command-dialog { width: 100%; max-height: 100%; }
}
