/* SEIDS interface stylesheet
   Institutional command surface: a deep navy rail, a pale analytical canvas, white
   evidence panels and a single teal accent, with tabular numerals and hairline
   structure. English LTR base; Arabic values are read as entered. */

:root {
  color-scheme: light;

  /* ---- institutional palette (approved) ---- */
  --navy: #142b40;
  --navy-2: #1c3a56;
  --navy-3: #27496a;
  --teal: #285d59;
  --teal-strong: #1f4a47;
  --teal-tint: #e6efee;
  --teal-tint-2: #d3e6e3;
  --slate: #64748b;
  --canvas: #f4f6f8;
  --white: #ffffff;

  /* ---- aliases kept for the existing component vocabulary ---- */
  --ink: #142b40;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --surface: #ffffff;
  --subtle: #eef2f6;
  --subtle-2: #e2e8f0;
  --rail: #142b40;
  --rail-2: #1c3a56;
  --rail-line: #2f4c6b;
  --rail-text: #c9d6e4;
  --rail-muted: #8aa0b8;
  --focus: #0f766e;

  /* ---- semantic status (never colour alone) ---- */
  --red: #a32a20;
  --red-bg: #fbe7e4;
  --red-line: #efc7c1;
  --amber: #8a5a00;
  --amber-bg: #fbf0d6;
  --amber-line: #eddba6;
  --green: #1f7a4d;
  --green-bg: #e4f3ea;
  --green-line: #c2e2d2;
  --gray: #475569;
  --gray-bg: #eef1f4;
  --gray-line: #dbe2e9;

  /* ---- shape and rhythm ---- */
  --radius: 9px;
  --radius-sm: 7px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(20, 43, 64, .06);
  --shadow-raised: 0 6px 20px -12px rgba(20, 43, 64, .35);
  --gap: 16px;
  --content-max: 1600px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "tnum" 1;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }

/* Tabular figures wherever a number is compared across rows or columns. */
.num, .stat-value, .kpi-value, .bar-value, .bullet-value, table td.num, table th.num,
.meter-value, .trend-value {
  font-variant-numeric: tabular-nums;
}

a { color: var(--teal); font-weight: 600; text-decoration: none; }
a:hover { color: var(--teal-strong); text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3 { color: var(--ink); letter-spacing: -.015em; line-height: 1.22; }
h1 { font-size: clamp(1.4rem, 2vw, 1.7rem); font-weight: 750; margin: 0 0 .3rem; }
h2 { font-size: 1.02rem; font-weight: 700; margin: 0; }
h3 { font-size: .94rem; font-weight: 680; margin: 0; }
p { margin: .65rem 0; }
small { font-size: .78rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.icon { width: 1.12em; height: 1.12em; fill: none; stroke: currentColor; stroke-width: 1.7;
        stroke-linecap: round; stroke-linejoin: round; vertical-align: -.16em; flex: 0 0 auto; }
.icon-sprite { position: absolute; width: 0; height: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
                   overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: fixed; top: .5rem; left: .75rem; z-index: 60; transform: translateY(-200%);
        padding: .55rem .9rem; background: var(--white); color: var(--teal); border: 1px solid var(--line-strong);
        border-radius: var(--radius-sm); box-shadow: var(--shadow-raised); }
.skip:focus { transform: translateY(0); }

/* ============================================================== shell */
.workspace-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; }

.rail { display: flex; flex-direction: column; gap: 16px; padding: 18px 13px 14px;
        background: var(--rail); color: var(--rail-text); position: sticky; top: 0;
        height: 100dvh; overflow-y: auto; z-index: 30; }
.rail-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: #eef4f3; font-size: 1rem;
         font-weight: 740; letter-spacing: .01em; }
.brand:hover { color: #fff; text-decoration: none; }
.brand-text { display: grid; gap: 1px; }
.brand small { color: var(--rail-muted); font-size: .66rem; font-weight: 500; letter-spacing: .02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
              background: linear-gradient(150deg, var(--teal-tint-2), #a9d0c9); color: #123a34;
              font-weight: 800; font-size: 1rem; }
.rail-toggle { display: none; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
               font: inherit; font-size: .8rem; font-weight: 650; color: #eef4f3; background: var(--rail-2);
               border: 1px solid var(--rail-line); border-radius: var(--radius-sm); padding: .4rem .6rem; }

.rail-body { display: flex; flex-direction: column; gap: 15px; flex: 1 1 auto; min-height: 0; }
.rail-label { margin: 0 0 6px; color: var(--rail-muted); font-size: .64rem; font-weight: 700;
              letter-spacing: .12em; text-transform: uppercase; }

.ws-current { display: flex; align-items: center; gap: 9px; padding: 9px 10px; background: var(--rail-2);
              border: 1px solid var(--rail-line); border-radius: var(--radius-sm); }
.workspace-avatar { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 8px;
                    background: var(--teal-tint-2); color: #123a34; font-weight: 800; font-size: .85rem; }
.ws-current-text { display: grid; gap: 2px; min-width: 0; }
.ws-current-text strong { color: #fff; font-size: .84rem; font-weight: 650; overflow-wrap: anywhere; }
.ws-current-text small { color: var(--rail-muted); font-size: .68rem; }
.ws-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; }
.ws-list a { display: grid; gap: 2px; padding: 7px 10px; border-radius: var(--radius-sm);
             color: var(--rail-text); font-size: .82rem; }
.ws-list a:hover { background: var(--rail-2); color: #fff; text-decoration: none; }
.ws-list small { color: var(--rail-muted); font-size: .66rem; }
.ws-all { display: inline-flex; align-items: center; gap: 7px; margin-top: 9px; padding: 6px 4px;
          color: var(--rail-muted); font-size: .78rem; font-weight: 600; }
.ws-all:hover { color: #fff; text-decoration: none; }

.rail nav { display: flex; flex-direction: column; gap: 2px; }
.rail nav .rail-label:not(:first-child) { margin-top: 13px; }
.rail nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
              color: var(--rail-text); font-size: .85rem; font-weight: 550;
              border-left: 3px solid transparent; }
.rail nav a .icon { color: var(--rail-muted); }
.rail nav a:hover { background: var(--rail-2); color: #fff; text-decoration: none; }
.rail nav a[aria-current] { background: var(--teal); color: #fff; font-weight: 660;
                            border-left-color: var(--teal-tint-2); }
.rail nav a[aria-current] .icon { color: #d6ece5; }

.account { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto;
           padding-top: 13px; border-top: 1px solid var(--rail-line); }
.account-text { display: grid; gap: 2px; min-width: 0; }
.account-text strong { color: #fff; font-size: .82rem; font-weight: 650; overflow-wrap: anywhere; }
.account-text small { color: var(--rail-muted); font-size: .68rem; }
.account a { color: var(--rail-text); }
.quiet { background: transparent; border: 0; padding: 4px 2px; font: inherit; font-size: .78rem;
         font-weight: 650; color: var(--teal); cursor: pointer; }
.rail .quiet { color: var(--rail-text); }
.quiet:hover { text-decoration: underline; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
          padding: 9px clamp(16px, 2.4vw, 34px); min-height: 54px; background: var(--white);
          border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-context { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: .82rem;
                  color: var(--muted); }
.topbar-context .ws-name { color: var(--ink); font-weight: 660; overflow-wrap: anywhere; }
.topbar-context .sep { color: var(--line-strong); }
.topbar-context .section { color: var(--muted); font-weight: 600; }
.topbar-context .icon { color: var(--faint); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-signout { display: none; }
.topbar-signout .quiet { font-size: .82rem; }

.content { max-width: var(--content-max); margin: 0 auto; padding: 22px clamp(16px, 2.4vw, 34px) 64px; }
.standalone { display: block; background: var(--canvas); }
.standalone .content { max-width: 1020px; padding-top: clamp(28px, 6vh, 64px); }

/* ============================================================ notices */
.notice { display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--amber-line);
          border-left: 4px solid var(--amber); background: var(--amber-bg); color: var(--amber);
          border-radius: var(--radius-sm); padding: 11px 14px; margin: 0 0 18px; font-size: .82rem; }
.notice .icon { margin-top: 1px; }
.notice strong { display: block; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase;
                 margin-bottom: 3px; }
.notice p { margin: 0; }
.notice-simulation { border-left-color: #b0742a; }
.message { border: 1px solid var(--teal-tint-2); border-left: 4px solid var(--teal); background: var(--teal-tint);
           color: var(--teal-strong); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 16px;
           font-size: .84rem; }

/* ======================================================= page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
             gap: 14px 18px; margin: 0 0 18px; }
.page-head-main { display: grid; gap: 4px; min-width: 0; }
.page-head h1 { margin: 0; }
.page-head .scope { margin: 0; color: var(--muted); font-size: .87rem; max-width: 74ch; }
.page-head .actions { margin: 0; }
.heading-group { display: grid; gap: 6px; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.eyebrow { color: var(--muted); font-size: .68rem; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* ========================================================== controls */
.button, .button:visited { display: inline-flex; align-items: center; gap: 7px; font: inherit;
  font-size: .82rem; font-weight: 660; text-align: center; cursor: pointer; padding: 8px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--teal); background: var(--teal); color: #fff; }
.button:hover { background: var(--teal-strong); border-color: var(--teal-strong); color: #fff; text-decoration: none; }
.button.secondary, .button.secondary:visited { background: var(--white); border-color: var(--line-strong);
  color: var(--teal); }
.button.secondary:hover { background: var(--teal-tint); border-color: var(--teal); color: var(--teal-strong);
  text-decoration: none; }
.button.ghost { background: transparent; border-color: transparent; color: var(--teal); padding-inline: 6px; }
.button.ghost:hover { background: var(--teal-tint); text-decoration: none; }

.tag { display: inline-flex; align-items: center; gap: 5px; background: var(--gray-bg); color: var(--gray);
       border: 1px solid var(--gray-line); border-radius: var(--radius-pill); padding: 2px 9px; font-size: .71rem;
       font-weight: 660; width: fit-content; line-height: 1.5; }
.tag .icon { width: 1em; height: 1em; }
.provenance { background: var(--teal-tint); color: var(--teal-strong); border-color: var(--teal-tint-2); }
.status-green { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.status-amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.status-red { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.status-gray { background: var(--gray-bg); color: var(--gray); border-color: var(--gray-line); }

/* ============================================================= panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
         min-width: 0; box-shadow: var(--shadow); }
.block { margin-top: 18px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
              padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: .78rem; font-weight: 730; letter-spacing: .07em; text-transform: uppercase;
                 color: var(--muted); }
.panel-head a { font-size: .78rem; }
.panel-sub { color: var(--muted); font-size: .74rem; font-weight: 500; margin: 3px 0 0; }
.panel-sub-pad { padding: 10px 16px 0; margin: 0; }
.panel-note { color: var(--muted); font-size: .75rem; }
.panel-foot { padding: 10px 16px; border-top: 1px solid var(--line); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr)); gap: 14px; }
.grid + .grid { margin-top: 14px; }

.stat, .tile { display: block; padding: 15px 17px; color: var(--ink); overflow-wrap: anywhere; }
.stat { display: grid; gap: 6px; }
.stat .stat-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem;
                    font-weight: 630; }
.stat .stat-label .icon { color: var(--faint); }
.stat .stat-value { font-size: 2rem; font-weight: 730; line-height: 1.05; letter-spacing: -.02em; }
.stat .stat-meta { color: var(--muted); font-size: .75rem; }
a.stat, a.tile { border-radius: var(--radius); }
a.stat:hover, a.tile:hover, .panel.hoverable:hover { border-color: var(--teal); text-decoration: none; }
a.stat:hover .stat-value, a.tile:hover h2 { color: var(--teal-strong); }
.stat.emphasis { border-left: 4px solid var(--teal); }
.stat.emphasis.risk { border-left-color: var(--amber); }
.tile { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile h2 { margin: 0; }
.tile .tile-body { display: grid; gap: 3px; }
.tile .tile-body small { color: var(--muted); }
.tile .arrow { color: var(--teal); }

.list-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 258px), 1fr)); gap: 14px; }

/* ==================================================== analytical grid */
.dash-stack { display: grid; gap: var(--gap); }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.cols-2 > *, .cols-3 > *, .dash-stack > * { min-width: 0; }

/* ---- executive summary band ---- */
.summary-band { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px;
                background: linear-gradient(180deg, #ffffff, #fbfcfd); border: 1px solid var(--line);
                border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.summary-band .headline { display: flex; gap: 12px; align-items: flex-start; }
.summary-band .headline .icon { color: var(--teal); margin-top: 3px; width: 1.4em; height: 1.4em; }
.summary-band .headline-text { display: grid; gap: 4px; }
.summary-band .headline-text strong { font-size: 1.06rem; font-weight: 730; letter-spacing: -.01em; }
.summary-band .headline-text p { margin: 0; color: var(--muted); font-size: .87rem; max-width: 92ch; }
.summary-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- KPI cards ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { position: relative; display: grid; gap: 7px; padding: 14px 15px 13px; background: var(--white);
       border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
       border-top: 3px solid var(--line-strong); }
.kpi.tone-green { border-top-color: var(--green); }
.kpi.tone-amber { border-top-color: var(--amber); }
.kpi.tone-red { border-top-color: var(--red); }
.kpi.tone-gray { border-top-color: var(--gray); }
.kpi.tone-teal { border-top-color: var(--teal); }
.kpi-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .68rem;
             font-weight: 720; letter-spacing: .07em; text-transform: uppercase; }
.kpi-label .icon { color: var(--faint); }
.kpi-figure { display: flex; align-items: baseline; gap: 8px; }
.kpi-value { font-size: 1.85rem; font-weight: 750; line-height: 1; letter-spacing: -.02em; }
.kpi-value .kpi-unit { font-size: .9rem; font-weight: 650; color: var(--muted); margin-left: 2px; }
.kpi-delta { border-radius: var(--radius-pill); padding: 1px 8px; font-size: .72rem; font-weight: 700;
             display: inline-flex; align-items: center; gap: 4px; }
.kpi-delta.pos { color: var(--green); background: var(--green-bg); }
.kpi-delta.neg { color: var(--red); background: var(--red-bg); }
.kpi-delta.flat { color: var(--gray); background: var(--gray-bg); }
.kpi-meta { color: var(--muted); font-size: .75rem; }
.kpi-link { margin: 0; font-size: .76rem; }

/* ---- metric rows: full-width comparison bar under a labelled header ---- */
.metric-list { display: grid; }
.metric-row { display: grid; grid-template-columns: minmax(0, 1fr) auto;
              grid-template-areas: "name value" "bar bar"; gap: 4px 14px;
              padding: 12px 16px; border-bottom: 1px solid var(--line); }
.metric-row:last-child { border-bottom: 0; }
.metric-name { grid-area: name; display: grid; gap: 2px; min-width: 0; }
.metric-name .row-link { font-size: .9rem; }
.metric-value { grid-area: value; display: grid; gap: 3px; justify-items: end; text-align: right;
                min-width: 0; }
.metric-value .row-sub { text-align: right; white-space: nowrap; }
.metric-bar { grid-area: bar; margin-top: 7px; }

.bar-track { position: relative; display: block; height: 9px; background: var(--subtle-2);
             border-radius: var(--radius-pill); }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--teal); border-radius: var(--radius-pill); }
.bar-fill.amber { background: #c98a2a; }
.bar-fill.red { background: #b25243; }
.bar-fill.gray { background: var(--line-strong); }
.bar-plan { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--navy);
            border-radius: 2px; }

/* ---- review-cycle comparison chart ---- */
.trend-chart { display: grid; gap: 11px; padding: 14px 16px; }
.trend-block { border-bottom: 1px solid var(--line); }
.trend-block:last-child { border-bottom: 0; }
.trend-point { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 12px;
               align-items: center; }
.trend-point .bar-track { height: 10px; }
.trend-period { color: var(--muted); font-size: .76rem; font-weight: 620; }
.trend-value { font-size: .82rem; font-weight: 660; white-space: nowrap; }
.trend-head { display: grid; gap: 2px; padding: 13px 16px 0; }
.trend-head .row-link { font-size: .9rem; }

/* ---- insight / attention lists ---- */
.insight-list { list-style: none; margin: 0; padding: 0; }
.insight-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px;
                   padding: 12px 16px; border-bottom: 1px solid var(--line); }
.insight-list li:last-child { border-bottom: 0; }
.insight-mark { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--slate); }
.insight-mark.red { background: var(--red); }
.insight-mark.amber { background: #c98a2a; }
.insight-mark.green { background: var(--green); }
.insight-mark.gray { background: var(--faint); }
.insight-body { display: grid; gap: 3px; min-width: 0; }
.insight-body strong { font-weight: 660; font-size: .88rem; overflow-wrap: anywhere; }
.insight-body .insight-meta { color: var(--muted); font-size: .76rem; display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================================================= tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .83rem; text-align: left; }
th, td { padding: 9px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--subtle); color: var(--muted); font-size: .68rem; font-weight: 730;
     letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
tbody tr:hover td { background: #fafcfd; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.primary { font-weight: 630; }
td .code, .list-title .code { margin-top: 3px; }
.row-link { display: block; color: var(--ink); font-weight: 650; }
.row-link:hover { color: var(--teal-strong); }
.row-sub { display: block; color: var(--muted); font-size: .73rem; margin-top: 2px; }
.health-cell { display: flex; align-items: center; gap: 8px; }
.meter { position: relative; width: 92px; height: 6px; border-radius: var(--radius-pill); background: var(--subtle-2);
         overflow: hidden; display: inline-block; vertical-align: middle; }
.meter > span { position: absolute; inset: 0 auto 0 0; background: var(--teal); border-radius: var(--radius-pill); }
.meter.amber > span { background: #c98a2a; }
.meter.red > span { background: #b25243; }
.meter.gray > span { background: var(--line-strong); }

/* ======================================================= detail views */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.detail-grid > div { display: grid; gap: 0; align-content: start; min-width: 0; }
.detail-grid .panel + .panel { margin-top: 14px; }
.detail { margin: 0; }
.detail > div { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: 12px;
                padding: 10px 16px; border-bottom: 1px solid var(--line); }
.detail > div:last-child { border-bottom: 0; }
.detail dt { color: var(--muted); font-size: .74rem; font-weight: 680; letter-spacing: .02em; }
.detail dd { margin: 0; font-size: .86rem; overflow-wrap: anywhere; }

.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li { padding: 10px 16px; font-size: .86rem; overflow-wrap: anywhere; }
.item-list li + li { border-top: 1px solid var(--line); }
.item-list small, .inset small { display: block; color: var(--muted); font-size: .77rem; margin-top: 3px; }
.inset { padding: 14px 16px; font-size: .86rem; }
.inset-divide { border-bottom: 1px solid var(--line); }
.code { display: block; margin-top: 4px; color: var(--muted); font: .72rem/1.5 ui-monospace, "SFMono-Regular", monospace;
        overflow-wrap: anywhere; }

.back { margin: 0 0 12px; font-size: .82rem; }
.back a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 620; }
.back a:hover { color: var(--teal); }

/* ============================================================== forms */
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0; padding: 11px 14px;
           background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
           box-shadow: var(--shadow); }
.filters label { display: grid; gap: 5px; color: var(--muted); font-size: .7rem; font-weight: 700;
                 letter-spacing: .04em; text-transform: uppercase; }
.filters label.check { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; font-size: .82rem;
                       font-weight: 600; color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.filters .filters-spacer { margin-left: auto; }
.filters .filters-note { color: var(--muted); font-size: .74rem; align-self: center; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); padding: 8px 10px; font: inherit; font-size: .86rem; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--teal); }
input[type="checkbox"] { width: 17px; height: 17px; padding: 0; accent-color: var(--teal); }
input[type="file"] { padding: 7px; }

.fields { display: grid; gap: 15px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .8rem; font-weight: 660; color: var(--ink-2); }
.field .help, .field small { color: var(--muted); font-size: .76rem; }
.field .errorlist, .errorlist { list-style: none; margin: 0; padding: 0; color: var(--red); font-size: .78rem;
                                font-weight: 600; }
.field .errorlist + *, .errorlist { display: block; }
.errorlist li { margin: 2px 0; }
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--red); }
.form-panel { padding: 20px; width: 100%; }
.form-panel.narrow { max-width: 680px; }
.fields .actions { margin: .3rem 0 0; justify-content: flex-start; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0; }

/* ========================================================= pagination */
.pagination { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; font-size: .82rem; color: var(--muted); }
.pagination a { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
                background: var(--surface); }
.pagination a:hover { border-color: var(--teal); text-decoration: none; }

/* ======================================================== empty state */
.empty { padding: 24px 18px; color: var(--muted); font-size: .85rem; text-align: center; }
.empty-strong { display: block; color: var(--ink); font-weight: 640; margin-bottom: 3px; }
.empty-row td { color: var(--muted); }

/* ========================================================= login flow */
.login-card { max-width: 432px; margin: min(7vh, 72px) auto 0; padding: 28px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .brand-mark { width: 42px; height: 42px; font-size: 1.2rem; }
.login-brand .brand-text strong { color: var(--ink); font-size: 1.02rem; }
.login-brand .brand-text small { color: var(--muted); }
.login-head { margin-bottom: 18px; }
.login-head h1 { margin: 0 0 4px; }
.login-head p { margin: 0; color: var(--muted); font-size: .86rem; }
.demo-access { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid;
               gap: 10px; justify-items: start; }
.demo-access .eyebrow { font-size: .68rem; }
.demo-access .button { width: 100%; justify-content: center; }

/* ================================================ workspaces launcher */
.standalone-head { display: flex; align-items: center; justify-content: space-between; gap: 16px;
                   flex-wrap: wrap; margin-bottom: 24px; }
.standalone-head .brand { color: var(--ink); }
.standalone-head .brand small { color: var(--muted); }
.standalone-head .brand-text strong { color: var(--ink); }
.account-bar { display: flex; align-items: center; gap: 14px; }
.account-bar .account-id { display: grid; gap: 1px; text-align: right; }
.account-bar .account-id strong { font-size: .86rem; }
.account-bar .account-id small { color: var(--muted); font-size: .74rem; }
.ws-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.ws-card { display: grid; gap: 12px; padding: 18px; }
.ws-card-head { display: flex; align-items: flex-start; gap: 12px; }
.ws-card .workspace-avatar { min-width: 40px; height: 40px; border-radius: 10px; font-size: 1rem; }
.ws-card-title { display: grid; gap: 4px; min-width: 0; }
.ws-card-title h2 { font-size: 1.06rem; font-weight: 690; overflow-wrap: anywhere; }
.ws-card .scope { color: var(--muted); font-size: .84rem; margin: 0; }
.ws-card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ws-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px;
                border-top: 1px solid var(--line); padding-top: 12px; }
.ws-card-foot .role { color: var(--muted); font-size: .78rem; }

/* ===================================================== strategy module */
.subnav { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 18px;
          background: var(--subtle); border: 1px solid var(--line); border-radius: var(--radius-pill);
          width: fit-content; max-width: 100%; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: var(--radius-pill);
            color: var(--ink-2); font-size: .8rem; font-weight: 620; }
.subnav a .icon { color: var(--faint); }
.subnav a:hover { background: var(--white); color: var(--teal-strong); text-decoration: none; }
.subnav a[aria-current="page"] { background: var(--teal); color: #fff; }
.subnav a[aria-current="page"] .icon { color: #d6ece5; }

/* ---- strategy compass (vision -> pillars -> objectives) ---- */
.compass { display: grid; gap: 0; }
.compass-version + .compass-version { border-top: 1px solid var(--line); }
.compass-band { display: grid; gap: 9px; padding: 14px 16px; background: linear-gradient(180deg, #fbfdfd, #f4f8f7);
                border-bottom: 1px solid var(--line); }
.compass-statements { display: grid; gap: 10px; margin: 0; }
.compass-statements > div { display: grid; grid-template-columns: minmax(72px, 1fr) 5fr; gap: 12px; }
.compass-statements dt { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em;
                         text-transform: uppercase; padding-top: 2px; }
.compass-statements dd { margin: 0; font-size: .87rem; }
.compass-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px;
                   padding: 14px 16px; }
.compass-pillar { border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: var(--radius-sm);
                  padding: 12px; background: var(--white); display: grid; gap: 7px; }
.compass-pillar-head { display: inline-flex; align-items: center; gap: 7px; font-weight: 680; color: var(--ink); }
.compass-pillar-head .icon { color: var(--teal); }
.compass-pillar-outcome { margin: 0; color: var(--muted); font-size: .78rem; }
.compass-objectives { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px;
                      border-top: 1px dashed var(--line-strong); padding-top: 9px; }
.compass-objectives .row-link { font-size: .83rem; }

/* ---- objective tree ---- */
.tree { list-style: none; margin: 0; padding: 6px 0; }
.tree ul { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 1px dashed var(--line-strong);
           margin-left: 8px; }
.tree-node { padding: 9px 16px 9px 10px; position: relative; }
.tree-node::before { content: ""; position: absolute; left: 0; top: 16px; width: 8px; height: 1px;
                     background: var(--line-strong); }
.tree > .tree-node::before { display: none; }
.tree-node .row-link { font-size: .85rem; }
.tree > li.empty { padding: 16px; }

/* ---- graphical strategy map ---- */
.map-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
               gap: 12px; margin: 0 0 14px; }
.segmented { display: inline-flex; padding: 3px; background: var(--subtle); border: 1px solid var(--line);
             border-radius: var(--radius-pill); }
.segmented a { padding: 6px 14px; border-radius: var(--radius-pill); font-size: .79rem; font-weight: 620;
               color: var(--ink-2); }
.segmented a:hover { text-decoration: none; color: var(--teal-strong); }
.segmented a[aria-current="page"] { background: var(--white); color: var(--teal-strong);
                                     box-shadow: var(--shadow); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0;
          color: var(--muted); font-size: .75rem; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend-solid { width: 22px; height: 0; border-top: 2px solid var(--teal); }
.legend-dashed { width: 22px; height: 0; border-top: 2px dashed #c98a2a; }
.map-layout { margin-top: 0; }
.map-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px;
             padding: 14px 16px; }
.map-column { display: grid; gap: 8px; align-content: start; }
.map-pillar { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; border-radius: var(--radius-sm);
              background: var(--navy); color: #fff; font-size: .81rem; font-weight: 660; }
.map-pillar:hover { color: #fff; text-decoration: none; background: var(--navy-2); }
.map-pillar .icon { color: #9dc0d6; }
.map-pillar-outcome { margin: 0; color: var(--muted); font-size: .74rem; }
.map-nodes { list-style: none; margin: 0; padding: 0 0 0 14px; display: grid; gap: 8px;
             border-left: 2px solid var(--teal-tint-2); }
.map-node { position: relative; padding: 9px 11px; background: var(--white); border: 1px solid var(--line-strong);
            border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.map-node::before { content: ""; position: absolute; left: -16px; top: 18px; width: 14px; height: 2px;
                    background: var(--teal-tint-2); }
.map-node.selected { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-tint); }
.map-node-link { display: block; color: var(--ink); font-size: .83rem; font-weight: 640; }
.map-node-meta { display: block; color: var(--muted); font-size: .71rem; margin-top: 3px; }
.map-hypotheses { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.map-hypotheses-head { display: flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 730;
                       letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.map-hypotheses-head .icon { color: #c98a2a; }
.hypo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hypo-item { padding: 10px 12px; border: 1px dashed var(--amber-line); border-left: 3px solid #c98a2a;
             border-radius: var(--radius-sm); background: #fffdf7; display: grid; gap: 5px; }
.hypo-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .84rem; font-weight: 620; }
.hypo-arrow { color: #c98a2a; font-weight: 700; }
.hypo-rationale { margin: 0; color: var(--ink-2); font-size: .8rem; }
.hypo-ref { font-weight: 700; }

/* ---- alignment matrix ---- */
.map-toolbar-bar { padding: 12px 16px; }
.matrix th[scope="row"] { width: 30%; }
.matrix-cell { text-align: center; vertical-align: middle; }
.matrix-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.matrix-mark.on { background: var(--teal-tint); color: var(--teal-strong); border: 1px solid var(--teal-tint-2); }
.matrix-mark.on .icon { width: .95em; height: .95em; }
.matrix-mark.off { border: 1px dashed var(--line-strong); }
.matrix-note { display: block; color: var(--muted); font-size: .68rem; margin-top: 3px; }

/* ---- scorecard ---- */
.scorecard-pillar + .scorecard-pillar { border-top: 1px solid var(--line); }
.scorecard-pillar-head { display: inline-flex; align-items: center; gap: 7px; padding: 12px 16px 6px;
                         font-weight: 680; color: var(--ink); }
.scorecard-objective { padding: 4px 16px 16px; }
.scorecard-objective > .row-link { font-size: .9rem; }
.scorecard-objective table { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); }


@media print {
  body, .workspace-layout { display: block; background: #fff; }
  .rail, .topbar, .skip, .actions, .back, .filters, .pagination, .notice:not(.notice-simulation) { display: none !important; }
  .notice-simulation { border: 1px solid #333; }
  .content { max-width: none; padding: 0; }
  .panel { break-inside: avoid; box-shadow: none; }
  a { color: var(--ink); text-decoration: none; }
  .cols-2, .cols-3, .kpi-grid, .detail-grid { grid-template-columns: 1fr; }
}

/* ======================================================== responsive */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .workspace-layout { grid-template-columns: minmax(0, 1fr); }
  .rail { height: auto; position: sticky; top: 0; gap: 12px; padding: 12px 14px; overflow: visible; }
  .rail-toggle { display: inline-flex; }
  .rail-body { display: none; }
  .rail.open .rail-body { display: flex; }
  .ws-list { display: flex; flex-wrap: wrap; }
  .ws-list a { background: var(--rail-2); }
  .rail nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .rail nav .rail-label { grid-column: 1 / -1; }
  .rail nav .rail-label:not(:first-child) { margin-top: 4px; }
  .rail nav a { border-left: 0; }
  .account { margin-top: 8px; }
  .topbar { position: static; }
  .topbar-signout { display: flex; }
  .cols-2, .cols-3, .detail-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .content { padding-top: 16px; }
  h1 { font-size: 1.3rem; }
  .page-head { align-items: flex-start; }
  .page-head .actions, .page-head .filters { width: 100%; }
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-value { font-size: 1.65rem; }
  .metric-row { grid-template-areas: "name" "value" "bar"; grid-template-columns: minmax(0, 1fr); }
  .metric-value { justify-items: start; text-align: left; }
  .metric-value .row-sub { text-align: left; white-space: normal; }
  .trend-point { grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 8px; }
  .detail > div { grid-template-columns: 1fr; gap: 3px; }
  .account-bar { width: 100%; justify-content: space-between; }
  .account-bar .account-id { text-align: left; }
  .filters .filters-spacer { margin-left: 0; }
  .rail nav a { font-size: .9rem; padding: 10px; }
  .rail { padding: 14px; }
  .topbar { flex-wrap: wrap; gap: 6px; }
  .responsive-table thead { display: none; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table tr { padding: 11px 15px; border-bottom: 1px solid var(--line); }
  .responsive-table tr:last-child { border-bottom: 0; }
  .responsive-table td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 10px;
                         border: 0; padding: 3px 0; }
  .responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: .7rem;
                                 font-weight: 720; letter-spacing: .06em; text-transform: uppercase; }
}

/* ================================================== strategic PMO module */
.health-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; }
.health-chip { display: grid; gap: 3px; padding: 12px 14px; background: var(--white); border: 1px solid var(--line);
               border-left: 4px solid var(--line-strong); border-radius: var(--radius-sm); }
.health-chip.red { border-left-color: var(--red); }
.health-chip.amber { border-left-color: #c98a2a; }
.health-chip.green { border-left-color: var(--green); }
.health-chip.gray { border-left-color: var(--line-strong); }
.health-count { font-size: 1.55rem; font-weight: 740; line-height: 1.05; font-variant-numeric: tabular-nums; }
.health-name { color: var(--muted); font-size: .74rem; }

.portfolio-group + .portfolio-group { border-top: 1px solid var(--line); }
.portfolio-head { display: inline-flex; align-items: center; gap: 7px; padding: 12px 16px 2px; font-weight: 680; color: var(--ink); }
.portfolio-head .icon { color: var(--teal); }
.portfolio-group > .row-sub { padding: 0 16px 8px; }

/* ---- prioritization method ---- */
.method-band { display: grid; gap: 12px; padding: 14px 16px; }
.method-formula { margin: 0; color: var(--ink-2); font-size: .86rem; max-width: 90ch; }
.weight-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.weight-list li { display: inline-flex; align-items: baseline; gap: 7px; padding: 7px 12px; background: var(--teal-tint);
                  border: 1px solid var(--teal-tint-2); border-radius: var(--radius-sm); }
.weight-label { font-size: .78rem; font-weight: 640; color: var(--ink-2); }
.weight-value { font-size: .9rem; font-weight: 740; color: var(--teal-strong); font-variant-numeric: tabular-nums; }
.criteria-score { display: block; font-size: 1rem; font-weight: 720; }
.criteria-reason { display: block; color: var(--muted); font-size: .68rem; margin-top: 2px; }

/* ---- recorded cutoff presets ---- */
.preset-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 12px 16px; }
.preset-label { color: var(--muted); font-size: .68rem; font-weight: 730; letter-spacing: .07em; text-transform: uppercase; }
.preset-chip { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
               background: var(--white); font-size: .78rem; font-weight: 620; color: var(--ink-2); }
.preset-chip:hover { border-color: var(--teal); text-decoration: none; color: var(--teal-strong); }
.preset-chip.current { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---- milestone timeline (milestone dates only, no invented bars) ---- */
.legend-mark { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px; display: inline-block;
               background: var(--navy); }
.legend-mark.forecast { background: #c98a2a; }
.legend-mark.accepted { background: var(--green); border-radius: 50%; transform: none; }
.legend-line { width: 3px; height: 16px; background: var(--navy); display: inline-block; }
.gantt { display: grid; gap: 12px; padding: 16px; }
.gantt-axis { position: relative; height: 22px; margin-left: 210px; border-bottom: 1px solid var(--line); }
.gantt-tick { position: absolute; top: 2px; color: var(--muted); font-size: .68rem; transform: translateX(-50%); white-space: nowrap; }
.gantt-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px; align-items: center; }
.gantt-label { font-size: .82rem; font-weight: 640; color: var(--ink); overflow-wrap: anywhere; }
.gantt-track { position: relative; height: 28px; background: var(--subtle); border-radius: var(--radius-sm); }
.gantt-cutoff { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--navy); }
.gantt-mark { position: absolute; top: 50%; width: 12px; height: 12px; transform: translate(-50%, -50%) rotate(45deg);
              border-radius: 2px; background: var(--navy); box-shadow: 0 0 0 1px #fff; }
.gantt-mark.forecast { background: #c98a2a; }
.gantt-mark.accepted { background: var(--green); border-radius: 50%; transform: translate(-50%, -50%); }
.gantt-mark.critical { box-shadow: 0 0 0 2px var(--red-bg), 0 0 0 3px var(--red); }

/* ---- risk heatmap ---- */
.heatmap { border-collapse: separate; border-spacing: 4px; width: auto; }
.heatmap th { background: transparent; border: 0; }
.heatmap th[scope="row"], .heatmap thead th { color: var(--muted); font-size: .68rem; font-weight: 730;
      letter-spacing: .05em; text-transform: uppercase; text-align: center; padding: 2px 4px; }
.heat-cell { width: 92px; height: 62px; border: 1px solid var(--line); border-radius: var(--radius-sm);
             text-align: center; vertical-align: middle; padding: 6px; }
.heat-cell.rating-low { background: var(--green-bg); }
.heat-cell.rating-medium { background: var(--amber-bg); }
.heat-cell.rating-high { background: #f6ddc9; }
.heat-cell.rating-critical { background: var(--red-bg); }
.heat-cell.empty { background: var(--subtle); }
.heat-count { display: block; font-size: 1rem; font-weight: 740; font-variant-numeric: tabular-nums; }
.heat-sep { color: var(--faint); font-weight: 500; }
.heat-risk { display: block; color: var(--muted); font-size: .62rem; margin-top: 3px; overflow-wrap: anywhere; }

/* ---- dependency line ---- */
.dep-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: .84rem; font-weight: 620; }

/* ---- delivery gates stepper ---- */
.gates { list-style: none; margin: 0; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.gate { flex: 1 1 150px; display: grid; gap: 3px; padding: 11px 13px; border: 1px solid var(--line);
        border-top: 3px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white); }
.gate.done { border-top-color: var(--green); }
.gate.current { border-top-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-tint); }
.gate-dot { color: var(--green); font-size: .8rem; line-height: 1; }
.gate.current .gate-dot { color: var(--teal); }
.gate-label { font-size: .82rem; font-weight: 660; color: var(--ink); }
.gate-state { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---- strategic PMO responsive ---- */
@media (max-width: 1180px) {
  .health-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .health-strip { grid-template-columns: minmax(0, 1fr); }
  .gantt-axis { display: none; }
  .gantt-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .gantt-label { font-size: .86rem; }
  .heat-cell { width: 62px; height: 52px; }
  .heat-risk { display: none; }
  .gate { flex: 1 1 100%; }
}

/* ========================================== performance module (Phase 04) */
.filters-inline { margin-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
.filters-inline label { min-width: 8.5rem; }

/* ---- directional variance bars (signed, indicator's own direction) ---- */
.variance-list { display: grid; }
.variance-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(80px, 2fr) 5.5rem;
                gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.variance-row:last-child { border-bottom: 0; }
.variance-name { display: grid; gap: 2px; min-width: 0; }
.variance-track { position: relative; height: 9px; background: var(--subtle-2); border-radius: var(--radius-pill);
                  overflow: hidden; }
.variance-fill { position: absolute; inset: 0 auto 0 0; border-radius: var(--radius-pill); }
.variance-fill.pos { background: var(--green); }
.variance-fill.neg { background: #b25243; }
.variance-value { text-align: right; font-weight: 720; font-variant-numeric: tabular-nums; white-space: nowrap; }
.variance-value.pos { color: var(--green); }
.variance-value.neg { color: var(--red); }

/* ---- KPI x cycle status matrix ---- */
.status-matrix { border-collapse: separate; border-spacing: 4px; width: auto; }
.status-matrix th { white-space: nowrap; }
.status-matrix th[scope="row"] { background: transparent; text-align: left; text-transform: none; letter-spacing: 0;
                                 font-size: .82rem; font-weight: 640; color: var(--ink); }
.status-cell { text-align: center; vertical-align: middle; min-width: 82px; padding: 6px; }
.matrix-note { display: block; color: var(--muted); font-size: .68rem; margin-top: 3px;
               font-variant-numeric: tabular-nums; }

/* ============================================ strategic analysis (Phase 05) */
/* Findings are visually split by evidence type: a sourced finding carries a teal
   left rule, an analytical assumption an amber dashed rule. The label is always
   present as text, so the distinction never depends on colour alone. */
.finding-list { display: grid; }
.finding { display: grid; gap: 6px; padding: 13px 16px; border-bottom: 1px solid var(--line);
           border-left: 3px solid var(--line-strong); }
.finding:last-child { border-bottom: 0; }
.finding.source { border-left-color: var(--teal); }
.finding.assumption { border-left-color: #c98a2a; background: #fffdf7; }
.finding-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.finding-head .row-link { font-size: .9rem; }
.finding-body { margin: 0; font-size: .86rem; overflow-wrap: anywhere; }
.finding-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .75rem; }
.finding-meta .code { margin-top: 0; }
.tag.assumption { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }

/* Evidence mix strip (sourced vs assumption). */
.evidence-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; }
.evidence-chip { display: grid; gap: 3px; padding: 12px 14px; background: var(--white); border: 1px solid var(--line);
                 border-left: 4px solid var(--teal); border-radius: var(--radius-sm); }
.evidence-chip.assumption { border-left-color: #c98a2a; }
.evidence-count { font-size: 1.55rem; font-weight: 740; line-height: 1.05; font-variant-numeric: tabular-nums; }
.evidence-name { color: var(--muted); font-size: .74rem; }

/* Recommendation → decision → handover chain. */
.chain { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; padding: 14px 16px; }
.chain-step { flex: 1 1 180px; display: grid; gap: 5px; align-content: start; padding: 12px 14px;
              border: 1px solid var(--line); border-top: 3px solid var(--line-strong);
              border-radius: var(--radius-sm); background: var(--white); min-width: 0; }
.chain-step.done { border-top-color: var(--green); }
.chain-step.deferred { border-top-color: #c98a2a; }
.chain-step.rejected { border-top-color: var(--red); }
.chain-step.current { border-top-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-tint); }
.chain-step-label { color: var(--muted); font-size: .67rem; font-weight: 730; letter-spacing: .07em;
                    text-transform: uppercase; }
.chain-step strong { font-size: .9rem; overflow-wrap: anywhere; }
.chain-step .row-sub { margin-top: 0; }
.chain-arrow { align-self: center; color: var(--faint); font-weight: 700; }

/* Benchmark paired value / reference bars (one benchmark to a row, never a shared axis). */
.pair { display: grid; gap: 6px; }
.pair-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 10px; align-items: center;
            font-size: .8rem; }
.pair-row .bar-track { height: 9px; }
.pair-label { color: var(--muted); font-weight: 620; }
.pair-value { text-align: right; font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pair-fill.value { background: var(--teal); }
.pair-fill.reference { background: var(--navy); }

/* Framework support note: which visual framework the records can and cannot support. */
.framework-note { display: grid; gap: 5px; padding: 13px 16px; }
.framework-note p { margin: 0; color: var(--ink-2); font-size: .85rem; }
.framework-note .framework-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.framework-note .framework-head strong { font-size: .9rem; }

/* Options comparison matrix emphasises the mandatory no-intervention row. */
.matrix-table tr.no-intervention td { background: #fffdf7; }
.matrix-table tr.no-intervention td:first-child { border-left: 3px solid #c98a2a; }

@media (max-width: 680px) {
  .evidence-strip { grid-template-columns: minmax(0, 1fr); }
  .pair-row { grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: 8px; }
  .chain-step { flex: 1 1 100%; }
  .chain-arrow { display: none; }
}

@media (max-width: 680px) {
  .filters-inline label { min-width: 100%; }
  .variance-row { grid-template-columns: minmax(0, 1fr) 4.5rem; grid-template-areas: "name value" "track track"; }
  .variance-name { grid-area: name; }
  .variance-value { grid-area: value; }
  .variance-track { grid-area: track; margin-top: 6px; }
  .status-matrix { width: 100%; }
  .status-cell { min-width: 60px; }
}

/* ============================== governance & institutional excellence (Phase 06) */
/* Governance layers: a restrained, records-derived tier view (authority -> oversight
   -> delivery -> services). Each tier is a labelled band, never a decorative chart. */
.layers { display: grid; gap: 10px; padding: 14px 16px; }
.layer { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 14px; align-items: start;
         padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--teal);
         border-radius: var(--radius-sm); background: var(--white); }
.layer-head { display: grid; gap: 3px; align-content: start; }
.layer-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.layer-name .icon { color: var(--teal); }
.layer-question { color: var(--muted); font-size: .74rem; }
.layer-items { display: grid; gap: 6px; }
.layer-item { display: grid; gap: 2px; padding: 7px 10px; background: var(--subtle);
              border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .82rem; overflow-wrap: anywhere; }
.layer-item small { color: var(--muted); font-size: .74rem; }

/* RACI matrix: each letter is a colour-coded chip and always carries its letter, so
   the responsibility never depends on colour alone. */
.raci-table th[scope="row"] { width: 24%; }
.raci-cell { text-align: center; vertical-align: middle; padding: 6px; }
.raci-mark { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin: 1px; padding: 0 4px;
             border-radius: 6px; font-weight: 740; font-size: .74rem; line-height: 1; }
.raci-mark.r { background: var(--green-bg); color: var(--green); }
.raci-mark.a { background: #ece7f6; color: #5b4b8a; }
.raci-mark.c { background: #e2ecf5; color: #2f5b7a; }
.raci-mark.i { background: var(--subtle-2); color: var(--gray); }
.raci-none { color: var(--faint); }
.raci-legend { display: grid; gap: 10px; padding: 14px 16px;
               grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.raci-legend > div { display: grid; gap: 3px; align-content: start; }
.raci-legend strong { font-size: .84rem; }
.raci-legend small { color: var(--muted); font-size: .75rem; }

/* Overdue rows: an overdue follow-up or control is marked with a red left rule AND a
   text tag, never colour alone. */
tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.effective td:first-child { box-shadow: inset 3px 0 0 var(--green); }

/* Procedure steps: a structured, numbered list (not a flowchart) with the owner and
   expected output; used because the records carry sequence and owner but no branching. */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 12px; padding: 12px 16px;
            border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.step-seq { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
            background: var(--teal-tint); color: var(--teal-strong); font-weight: 740; font-size: .8rem;
            font-variant-numeric: tabular-nums; }
.step-body { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.step-head { font-weight: 660; color: var(--ink); }
.step-instruction { font-size: .86rem; }
.step-body small { color: var(--muted); font-size: .76rem; }

/* Assurance findings reuse the Phase 05 finding component; the CAPA table sits inside. */
.governance-assurance .finding-body p { margin: 0 0 6px; }
.governance-assurance .finding-body p:last-child { margin-bottom: 0; }

@media (max-width: 680px) {
  .layer { grid-template-columns: minmax(0, 1fr); }
  .raci-table th[scope="row"] { width: auto; }
  .raci-mark { min-width: 20px; height: 20px; font-size: .7rem; }
  .steps li { grid-template-columns: 1.75rem minmax(0, 1fr); gap: 10px; }
}

/* ============================ executive review pack (Phase 07) */
/* A frozen, immutable snapshot rendered as a consulting deliverable: an
   evidence-derived headline, KPI actual/target/variance, delivery health,
   risks, decisions required, prior actions and provenance. The pack is a
   private, print-ready document; it introduces no public download. */
.report { display: block; }
.report-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
               gap: 14px 18px; margin: 0 0 18px; padding-bottom: 16px; border-bottom: 2px solid var(--teal); }
.report-head .page-head-main { gap: 6px; }
.report-brand { display: flex; align-items: center; gap: 11px; }
.report-brand .brand-mark { width: 38px; height: 38px; }
.report-brand-text { display: grid; gap: 1px; }
.report-brand-text strong { font-size: 1rem; font-weight: 760; letter-spacing: .01em; }
.report-brand-text small { color: var(--muted); font-size: .7rem; }

.report-summary { margin-bottom: var(--gap); }
.report-kpis { list-style: none; margin: 0; padding: 0; }
.report-kpis .kpi-label { display: block; }

.report-table caption { text-align: left; }
.report-list li { font-size: .86rem; }
.report-list li.overdue { box-shadow: inset 3px 0 0 var(--red); background: var(--red-bg); }
.report-foot { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.report-foot .code { margin: 0 0 4px; }

@media print {
  .report-head { break-inside: avoid; border-bottom-color: #333; }
  .report-summary { box-shadow: none; background: #fff; }
  .report .health-chip { break-inside: avoid; }
  .report-table { font-size: .74rem; }
  .report-table th, .report-table td { padding: 5px 8px; }
  .report-foot { break-inside: avoid; }
  .report-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi { box-shadow: none; }
}


