/* ============================================================
   DataTrust360 — "Instrument" Design System · 2026 (mockup stylesheet)
   Modern data-tooling aesthetic: flat surfaces, hairline borders,
   one restrained accent, monochrome tabular data, generous air.
   Brass-to-orange branding is reserved for the logo mark and document rules;
   the working interface accent remains a single orange.
   Class names + token names preserved so all mockups pick this up unchanged.
   ============================================================ */

:root {
  /* Brand — palette pulled from careerbridgeusa.com (Alex's CareerBridge project):
     deep navy ground + orange accent + gold highlight, on cool blue-tinted neutrals. */
  --ink: #071d36;                   /* CareerBridge --navy — primary dark ground */
  --ink-2: #0b2e57;
  --ink-3: #123f73;
  --navy-deep: #06111f;             /* darkest navy — code blocks, deepest surfaces */
  --brand-orange: #f47b20;          /* primary working accent */
  --brand-coral: var(--brand-orange); /* legacy alias retained for older modules */
  --brand-orange-ink: #cc5f13;      /* --orange-dark — accessible orange for text/hairlines on light */
  --brand-amber: #ffcf36;           /* CareerBridge gold highlight */
  --brand-grad: linear-gradient(135deg, #ffc636 0%, #f47b20 100%);  /* gold→orange, for the mark */

  /* Canvas — CareerBridge cool blue-tinted neutrals */
  --canvas: #f4f7fb;                /* their --soft */
  --surface: #ffffff;
  --surface-2: #eef4ff;             /* their light blue wash */
  --surface-3: #f2f6ff;
  --accent-wash: #fff3e8;           /* faint orange tint for selected rows */
  --line: #d9e2ec;                  /* their --line */
  --line-strong: #c0cfe4;

  /* Text — CareerBridge ink/muted scale */
  --text: #102033;                  /* their --ink */
  --ink-text: #102033;
  --text-2: #627083;                /* their --muted */
  --text-3: #8ea3c2;

  /* Semantic — tuned to sit on the navy/blue neutrals */
  --ok: #12a06b;        --ok-soft: #e4f6ef;
  --warn: #b26a00;      --warn-soft: #fdf1da;
  --risk: #d1453b;      --risk-soft: #fbeae8;
  --info: #2f6fd0;      --info-soft: #e9f1fb;
  --privacy: #6a53d8;   --privacy-soft: #efecfc;

  /* Depth — near-flat; navy-tinted hairline shadows */
  --shadow-1: 0 1px 2px rgba(7, 29, 54, 0.05), 0 1px 3px rgba(7, 29, 54, 0.06);
  --shadow-2: 0 8px 22px rgba(7, 29, 54, 0.12), 0 1px 3px rgba(7, 29, 54, 0.06);

  --r-sm: 10px;                     /* echo CareerBridge's rounder 18px radius language */
  --r-md: 14px;
  --r-lg: 18px;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, monospace;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv05" 1, "ss01" 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--canvas);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.tnum, .v, .cnt, .pg, .stat .v { font-variant-numeric: tabular-nums; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

/* ---------- Sidebar — deep cool slate, hairline separators, quiet active ---------- */
.sidebar {
  background-color: var(--ink);
  /* faint data-grid grain — texture, not decoration */
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 18px 18px;
  color: #b6c6de;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid #0d2340;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #123f73; border-radius: 3px; }

.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
/* Logo mark — self-contained SVG (navy tile + 360 ring + lineage triad) */
.brand-mark { width: 36px; height: 36px; flex: none; display: block; border-radius: 10px; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
.brand-name b { font-weight: 800; }
.brand-sub { font-size: 10px; color: #6d7885; text-transform: uppercase; letter-spacing: 1.4px; margin-top: 1px; }

/* Nav — accordion, one open at a time */
.nav { padding: 12px 10px 96px; flex: 1; }
.nav-home {
  display: flex; align-items: center; gap: 11px;
  min-height: 44px; padding: 0 12px; margin-bottom: 4px;
  border-radius: 9px; cursor: pointer;
  color: #e7edf3; font-weight: 600; font-size: 13.5px;
  background: none; border: 0; width: 100%; text-align: left; font-family: inherit;
}
.nav-home:hover { background: rgba(255, 255, 255, 0.04); }
.nav-home.active { background: rgba(255, 255, 255, 0.06); box-shadow: inset 2px 0 0 var(--brand-orange); color: #fff; }

.nav-group { margin-top: 2px; border-radius: 9px; }
.nav-group-head {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 40px; padding: 0 12px; cursor: pointer;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase;
  color: #6d7885;
  width: 100%; background: none; border: 0; text-align: left; font-family: inherit;
}
.nav-group-head:hover { color: #97a3b0; }
.nav-group-head .chev { transition: transform 0.18s; color: #4f5a67; font-size: 10px; }
.nav-group.open .chev { transform: rotate(90deg); }
.nav-group.open .nav-group-head { color: #97a3b0; }
.nav-items { display: none; padding-bottom: 4px; }
.nav-group.open .nav-items { display: block; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  min-height: 42px; padding: 0 12px 0 20px; cursor: pointer;
  color: #b6c6de; font-size: 13.5px; border-radius: 9px;
  width: 100%; background: none; border: 0; text-align: left; font-family: inherit;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.045); color: #e7edf3; }
.nav-item.active {
  background: rgba(255, 255, 255, 0.06); color: #fff; font-weight: 600;
  box-shadow: inset 2px 0 0 var(--brand-orange);
}
.nav-item .cnt {
  margin-left: auto; font-size: 10.5px; font-weight: 700; color: #8b96a3;
  background: rgba(255, 255, 255, 0.06); border-radius: 6px; padding: 1px 7px; min-width: 20px; text-align: center;
}
.nav-item .cnt.hot { background: rgba(209, 69, 59, 0.2); color: #f0918a; }
.nav-icon { width: 17px; text-align: center; flex: none; opacity: 0.72; font-size: 13px; }

/* ---------- Topbar — flat, quiet, hairline bottom ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 11px 24px; position: sticky; top: 0; z-index: 30;
}
.project-switch {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 6px 12px; cursor: pointer; background: var(--surface);
  min-height: 42px; max-width: 420px;
}
.project-switch:hover { border-color: var(--text-3); }
.project-switch .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px var(--ok-soft); }
.project-switch b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-switch .car { color: var(--text-3); margin-left: 2px; font-size: 11px; }

.topbar-search {
  flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; min-height: 40px;
  color: var(--text-3); background: var(--surface-2); font-size: 13px;
}
.topbar-spacer { flex: 1; }
.top-chip {
  display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.top-chip:hover { border-color: var(--line-strong); }
.top-chip b { color: var(--text); }
.avatar {
  width: 34px; height: 34px; border-radius: 9px; background: var(--ink);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none;
}

/* ---------- Content ---------- */
.content { padding: 26px 24px; display: grid; gap: 20px; max-width: 1500px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; font-weight: 700; letter-spacing: -0.5px; text-wrap: balance; }
.page-head p { color: var(--text-2); margin-top: 4px; max-width: 66ch; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px;
  cursor: pointer; font-family: inherit; text-decoration: none; transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--text-3); background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.btn.primary {
  background: var(--brand-orange); color: #fff; border-color: var(--brand-orange);
  box-shadow: 0 1px 2px rgba(217, 88, 0, 0.3);
}
.btn.primary:hover { background: #ee6200; border-color: #ee6200; }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line); }

/* ---------- Stat cards — flat, monochrome number, small semantic marker ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 12px; }
.stat {
  border-radius: var(--r-md); padding: 15px 16px 14px; cursor: pointer;
  position: relative; overflow: hidden; text-align: left; font-family: inherit; min-height: 100px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.stat:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.stat:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.stat .k {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 7px;
}
.stat .k::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--text-3); flex: none; }
.stat .v { font-size: 30px; font-weight: 700; line-height: 1.05; margin: 9px 0 2px; color: var(--text); letter-spacing: -1px; }
.stat .v small { font-size: 15px; color: var(--text-3); font-weight: 600; letter-spacing: 0; }
.stat .d { font-size: 12px; color: var(--text-2); margin-top: auto; }
.stat .go { position: absolute; right: 13px; top: 13px; opacity: 0; color: var(--text-3); font-size: 13px; transition: opacity 0.15s; }
.stat:hover .go { opacity: 1; }
/* sparkline — 12-week trend behind the figure; texture that carries real information */
.stat .spark {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42px;
  pointer-events: none; opacity: 0.2; z-index: 0; color: var(--text-3);
}
.stat .k, .stat .v, .stat .d, .stat .go { position: relative; z-index: 1; }
.stat.sea .spark { color: var(--ok); }        .stat.flame .spark { color: var(--brand-orange); }
.stat.ember .spark { color: var(--risk); }    .stat.amber .spark { color: var(--warn); }
.stat.sky .spark { color: var(--info); }      .stat.inkp .spark { color: var(--privacy); }
/* variant = semantic accent on the marker + a hairline top keyline; number stays monochrome */
.stat.ember { box-shadow: inset 0 2px 0 var(--risk); }    .stat.ember .k::before { background: var(--risk); }    .stat.ember .k { color: var(--risk); }
.stat.flame { box-shadow: inset 0 2px 0 var(--brand-orange); } .stat.flame .k::before { background: var(--brand-orange); } .stat.flame .k { color: var(--brand-orange-ink); }
.stat.amber { box-shadow: inset 0 2px 0 var(--warn); }    .stat.amber .k::before { background: var(--warn); }    .stat.amber .k { color: var(--warn); }
.stat.sea   { box-shadow: inset 0 2px 0 var(--ok); }      .stat.sea .k::before { background: var(--ok); }       .stat.sea .k { color: var(--ok); }
.stat.sky   { box-shadow: inset 0 2px 0 var(--info); }    .stat.sky .k::before { background: var(--info); }     .stat.sky .k { color: var(--info); }
.stat.inkp  { box-shadow: inset 0 2px 0 var(--privacy); } .stat.inkp .k::before { background: var(--privacy); } .stat.inkp .k { color: var(--privacy); }
.stat:hover.ember { box-shadow: inset 0 2px 0 var(--risk), var(--shadow-1); }
.stat:hover.flame { box-shadow: inset 0 2px 0 var(--brand-orange), var(--shadow-1); }
.stat:hover.amber { box-shadow: inset 0 2px 0 var(--warn), var(--shadow-1); }
.stat:hover.sea   { box-shadow: inset 0 2px 0 var(--ok), var(--shadow-1); }
.stat:hover.sky   { box-shadow: inset 0 2px 0 var(--info), var(--shadow-1); }
.stat:hover.inkp  { box-shadow: inset 0 2px 0 var(--privacy), var(--shadow-1); }


.metric-evidence-spark {
  position: absolute;
  right: 12px;
  bottom: 8px;
  left: 12px;
  z-index: 0;
  width: calc(100% - 24px);
  height: 34px;
  overflow: visible;
  pointer-events: none;
  color: var(--info);
  opacity: 0.28;
}

.metric-evidence-spark path {
  fill: currentColor;
  opacity: 0.16;
}

.metric-evidence-spark polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.metric-readiness .metric-evidence-spark,
.metric-health .metric-evidence-spark { color: var(--ok); }
.metric-changes .metric-evidence-spark { color: var(--brand-orange); }
.metric-steward .metric-evidence-spark { color: var(--warn); }
.metric > h2,
.metric > strong,
.metric > p,
.metric > div,
.metric > dl { position: relative; z-index: 1; }
.metrics-grid > .metric:not(.large) { padding-bottom: 43px; }
/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.card-head h2 { font-size: 14.5px; font-weight: 700; letter-spacing: -0.2px; }
.card-head p { font-size: 12.5px; color: var(--text-2); width: 100%; }
.card-body { padding: 18px; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 6px;
  font-size: 11px; font-weight: 600; padding: 3px 8px; white-space: nowrap; letter-spacing: 0.1px;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.risk { background: var(--risk-soft); color: var(--risk); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.privacy { background: var(--privacy-soft); color: var(--privacy); }
.chip.neutral { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }

/* ---------- Data grid standard ---------- */
.grid-tools { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.grid-search {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; max-width: 360px;
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 12px; min-height: 38px;
  color: var(--text-3); background: var(--surface-2); font-size: 13px;
}
.sel {
  min-height: 38px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--text); padding: 0 10px; cursor: pointer;
}
.sel:hover { border-color: var(--text-3); }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 10.5px; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--text-3); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); white-space: nowrap; position: sticky; top: 0;
}
.tbl th .filt { display: block; margin-top: 6px; }
.tbl th .filt input, .tbl th .filt select {
  width: 100%; min-width: 90px; border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 8px; font-size: 12px; font-family: inherit; background: var(--surface); color: var(--text); font-weight: 500;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr { cursor: pointer; transition: background 0.12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr.sel-row { background: var(--accent-wash); box-shadow: inset 2px 0 0 var(--brand-orange); }
.tbl .obj { font-weight: 600; }
.tbl .obj small { display: block; color: var(--text-3); font-weight: 500; font-family: var(--mono); font-size: 11.5px; margin-top: 1px; }
.grid-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; flex-wrap: wrap; color: var(--text-2); font-size: 12.5px;
}
.pager { display: flex; gap: 5px; align-items: center; }
.pager .pg {
  min-width: 34px; min-height: 34px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 12.5px; cursor: pointer;
}
.pager .pg:hover { border-color: var(--text-3); }
.pager .pg.cur { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Wizard / stepper ---------- */
.stepper { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.step {
  flex: 1; display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  border-right: 1px solid var(--line); cursor: pointer; background: var(--surface); min-width: 0;
}
.step:last-child { border-right: 0; }
.step .n {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-weight: 700; font-size: 12.5px; flex: none;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line);
}
.step.done .n { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.step.cur { background: var(--accent-wash); }
.step.cur .n { background: var(--brand-orange); color: #fff; border-color: transparent; }
.step b { display: block; font-size: 13.5px; font-weight: 600; }
.step small { color: var(--text-2); font-size: 11.5px; display: block; }

/* ---------- Misc ---------- */
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.mono { font-family: var(--mono); font-size: 12px; }
.code {
  background: var(--navy-deep); color: #cdd9e6; border-radius: var(--r-sm);
  padding: 15px 16px; overflow-x: auto; line-height: 1.65; font-family: var(--mono); font-size: 12.5px;
  border: 1px solid #0d2340;
}
.code .kw { color: #59a0ff; } .code .str { color: #ffcf36; } .code .cmt { color: #6d84a3; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); align-items: center; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 5px; }

/* Mockup banner */
.mock-note {
  background: var(--ink); color: #c8d2dd; font-size: 12px; font-weight: 500;
  text-align: center; padding: 8px 12px; letter-spacing: 0.2px; border-bottom: 1px solid #1c2431;
}
.mock-note b { color: #fff; font-weight: 700; }

/* ---------- Mobile ---------- */
.bottom-nav { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 16px 14px; padding-bottom: 84px; }
  .two-col { grid-template-columns: 1fr; }
  .topbar { padding: 8px 14px; }
  .topbar-search { display: none; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: var(--ink); border-top: 1px solid #1c2431;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav button {
    display: grid; place-items: center; gap: 3px; min-height: 52px;
    background: none; border: 0; color: #8b96a3; font-size: 10px; font-weight: 600; font-family: inherit;
    border-radius: 9px; cursor: pointer;
  }
  .bottom-nav button.active { color: #fff; }
  .bottom-nav button.active .ico { color: var(--brand-orange); }
  .bottom-nav .ico { font-size: 17px; }
}
/* ============================================================
   Production integration for the existing DataTrust360 views.
   The approved Instrument shell remains the visual source of truth.
   ============================================================ */
:root {
  --bg: var(--canvas);
  --black: var(--navy-deep);
  --black-2: var(--ink);
  --coral: var(--brand-orange);
  --orange: var(--brand-orange);
  --amber: var(--brand-amber);
  --cyan: var(--info);
  --teal: var(--ok);
  --teal-dark: #087452;
  --red: var(--risk);
  --green: var(--ok);
  --shadow: var(--shadow-1);
  --shadow-strong: var(--shadow-2);
  --radius: var(--r-sm);
}

body {
  min-width: 320px;
  background: var(--canvas);
}

.app-shell.shell {
  min-height: 100vh;
}

.sidebar {
  padding: 0;
  gap: 0;
  box-shadow: none;
  z-index: 70;
}

.brand {
  min-height: 76px;
}

.brand > div {
  min-width: 0;
}

.mobile-nav-close,
.mobile-menu-toggle,
.mobile-nav-backdrop {
  display: none;
}

.nav-group {
  display: block;
  gap: 0;
}

.nav-group-toggle::after {
  content: none;
}

.nav-group-toggle .chev {
  width: auto;
  height: auto;
  display: inline;
  place-items: initial;
  border-radius: 0;
  background: none;
  color: #4f5a67;
  font-size: 10px;
}

.nav-group-items {
  gap: 0;
  padding-left: 0;
  border-left: 0;
}

.nav-item,
.nav-home {
  min-height: 44px;
}

.nav-home.nav-item {
  padding: 0 12px;
  color: #e7edf3;
}

.sidebar-footer {
  margin: auto 18px 0;
  padding: 16px 0 18px;
}

.sidebar-footer strong {
  color: #fff;
  font-size: 13px;
}

.sidebar-footer span {
  color: #8ea3c2;
  font-size: 11px;
}

.workspace.main {
  padding: 0;
  min-width: 0;
}

body.inspector-open .app-shell {
  grid-template-columns: 256px minmax(0, 1fr) 360px;
}

.topbar {
  justify-content: flex-start;
  align-items: center;
  margin: 0;
  min-height: 66px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  color: var(--text);
  overflow: visible;
}

.topbar::after {
  display: none;
}

.project-switch {
  flex: 0 1 440px;
  max-width: 440px;
  cursor: default;
}

.project-switch-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  align-content: center;
}

.topbar-label {
  color: var(--text-3);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.project-switch select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  padding: 0 24px 0 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  outline-offset: 3px;
  text-overflow: ellipsis;
}


.top-chip {
  cursor: default;
}

.top-chip select {
  max-width: 180px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.demo-chip {
  border-color: #f7d7b9;
  background: var(--accent-wash);
  color: var(--brand-orange-ink);
}

.language-chip select {
  max-width: 145px;
}

.avatar {
  object-fit: cover;
  padding: 0;
}

.content {
  align-content: start;
}

.button {
  min-height: 42px;
  border-radius: 10px;
}

.button.primary {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  box-shadow: 0 1px 2px rgba(204, 95, 19, 0.28);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #df6818;
  border-color: #df6818;
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.metrics-grid > .metric.large {
  grid-column: span 2;
}

.metric,
.panel,
.full-panel,
.branded-report {
  border-color: var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}

.metric::before {
  height: 2px;
  background: var(--brand-orange);
}

.metric-readiness::before,
.metric-health::before {
  background: var(--ok);
}

.metric-catalog::before {
  background: var(--info);
}

.metric-changes::before {
  background: var(--brand-orange);
}

.metric-steward::before {
  background: var(--warn);
}

.metrics-grid > .metric:not(.large) h2 {
  margin-bottom: 10px;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1.25;
  text-transform: uppercase;
}

.metrics-grid > .metric:not(.large) strong {
  margin: 4px 0 10px;
  color: var(--text);
  font-size: 32px;
  font-weight: 700;
}

.metric-catalog h2 { color: var(--info); }
.metric-changes h2 { color: var(--brand-orange-ink); }
.metric-steward h2 { color: var(--warn); }
.metric-health h2 { color: var(--ok); }

.metric strong,
.metric-list dd,
.snapshot-card strong {
  color: var(--text);
}

.metric-list div {
  background: var(--surface-2);
  border: 1px solid transparent;
}

.metric-list div:hover,
.metric-list div:focus-visible {
  border-color: var(--brand-orange);
  background: var(--accent-wash);
}

.panel {
  background: var(--surface);
}

.report-cover {
  background: linear-gradient(180deg, #0d2c52 0%, #081f39 60%, #061a31 100%);
  color: #fff;
}

.report-cover-meta span,
.report-cover-meta code {
  color: #e8c874;
}

.report-cover img {
  box-shadow: none;
}

.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;
}

@media (max-width: 1400px) {
  .demo-chip,
  .topbar .avatar {
    display: none;
  }
}
@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid > .metric.large {
    grid-column: 1 / -1;
  }

  .demo-chip {
    display: none;
  }

  .project-switch {
    flex-basis: 390px;
  }
}

@media (max-width: 900px) {
  body,
  body.inspector-open {
    padding-bottom: 72px;
  }

  .app-shell.shell,
  body.inspector-open .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open .sidebar {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    height: 100dvh;
    padding: 0;
    z-index: 90;
    box-shadow: 18px 0 48px rgba(6, 17, 31, 0.34);
  }

  body.mobile-nav-open .nav {
    overflow-y: auto;
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(6, 17, 31, 0.58);
  }

  .mobile-nav-close {
    margin-left: auto;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 24px;
  }

  body.mobile-nav-open .mobile-nav-close {
    display: grid;
  }

  .topbar {
    display: flex;
    position: sticky;
    top: 0;
    min-height: 64px;
    padding: 8px 12px;
    gap: 8px;
  }

  .mobile-menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    flex: none;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-size: 21px;
  }

  .project-switch {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 5px 9px;
  }

  .role-focus-chip,
  .language-chip,
  .topbar .avatar,
  .topbar-spacer {
    display: none;
  }

  .demo-chip {
    display: flex;
    min-height: 36px;
    max-width: 90px;
    padding: 0 8px;
    text-align: center;
    white-space: normal;
    line-height: 1.1;
  }

  .content {
    padding: 16px 14px 84px;
    gap: 14px;
    max-width: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .metric {
    min-width: 0;
  }

  .bottom-nav,
  .mobile-taskbar.bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .bottom-nav button {
    min-width: 0;
    min-height: 52px;
  }

  .inspector {
    padding: 14px;
  }
}

@media (max-width: 520px) {
  .demo-chip {
    display: none;
  }

  .project-switch select {
    font-size: 12px;
  }
}
/* ============ H2 "MACHINED" HEADER — approved 2026-07-19 ============ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 0 22px; min-height: 66px;
  /* navy lacquer */
  background: linear-gradient(180deg, #0d2c52 0%, #081f39 60%, #061a31 100%);
  border-bottom: 0;                     /* the brass rule replaces the hairline */
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset,
              0 14px 34px -14px rgba(3, 10, 20, 0.75);
  overflow: hidden;                      /* clips the texture layers */
  backdrop-filter: none;                 /* remove the old translucent blur */
}
/* engine-turned guilloché — must stay near-invisible */
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.5;
  background:
    repeating-linear-gradient(58deg,  rgba(255,255,255,0.028) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-58deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 5px);
}
/* single soft light source, upper-left */
.topbar::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(120% 160% at 22% -30%, rgba(255,255,255,0.11), transparent 58%);
}
/* machined brass rule — add <span class="topbar-rule"></span> as the LAST child of .topbar */
.topbar-rule {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 4;
  background: linear-gradient(180deg, #c9a24d, #8f6c2c);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.18) inset;
}
/* every real child must sit above the texture layers */
.topbar > *:not(.topbar-rule) { position: relative; z-index: 3; }

/* ---- controls inverted for the dark ground ---- */
.topbar .project-switch,
.topbar .top-chip {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cfdcec;
  min-height: 38px; border-radius: 9px;
}
.topbar .project-switch:hover,
.topbar .top-chip:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.16); }
.topbar .project-switch b, .topbar .top-chip b, .topbar b { color: #ffffff; }
.topbar .topbar-label { color: #93a9c6; }
.topbar select {
  background: transparent; border: 0; color: #ffffff; font-family: inherit;
  font-size: 13px; font-weight: 600;
}
.topbar select option { background: #0b2340; color: #ffffff; }   /* native dropdown legibility */
.topbar .project-switch .dot {
  width: 6px; height: 6px; background: #46d39a; box-shadow: 0 0 7px #46d39a;
}
.topbar .topbar-search {
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.08); color: #8ea9c8;
}
/* demo marker — gold-tinted, decorative only */
.topbar .demo-chip, .topbar .chip.demo {
  background: rgba(255, 207, 54, 0.13);
  border: 1px solid rgba(255, 207, 54, 0.30);
  color: #ffd76b;
}
/* avatar becomes a small machined-brass tile */
.topbar .avatar {
  color: #0a1f3a; border-radius: 9px;
  background: linear-gradient(160deg, #f0d493, #c9a24d 60%, #a8823a);
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 3px 8px rgba(0,0,0,0.4);
}
/* focus must stay visible on the dark ground */
.topbar :focus-visible { outline: 2px solid #ffd76b; outline-offset: 2px; border-radius: 8px; }

@media print { .topbar { display: none !important; } }
/* H2 context fix 2: one-line label/select, contained at browser and OS display scaling. */
.topbar .project-switch { flex: 1 1 440px; min-width: min(280px, 62vw); max-width: 620px; overflow: hidden; padding-block: 6px; }
.topbar .project-switch-copy {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.topbar .project-switch .topbar-label {
  flex: none;
  white-space: nowrap;
  line-height: 1.2;
}
.topbar .project-switch select {
  flex: 1 1 auto;
  width: 100%;
  max-width: 46ch;
  min-width: 0;
  min-height: 20px;
  height: 20px;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ F1 APP FOOTER - approved 2026-07-20 ============ */
.app-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: auto;
  padding: 13px 22px;
  background: linear-gradient(180deg, #081f39 0%, #061a31 100%);
  color: #8ea9c8;
  font-size: 11.5px;
  line-height: 1.5;
  border-top: 1px solid rgba(201, 162, 77, 0.28);
}

.app-footer .sep {
  color: #3d5573;
  user-select: none;
}

.app-footer b {
  color: #b6c6de;
  font-weight: 600;
}

@media (max-width: 760px) {
  .app-footer {
    font-size: 11px;
    padding: 12px 14px;
    text-align: center;
    margin-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .app-footer .sep {
    display: none;
  }

  .app-footer > span:not(.sep) {
    flex: 0 0 100%;
  }
}

@media print {
  .app-footer {
    display: none !important;
  }
}