/* D Consulting · Mission Control
   Design language: the Pacer v2 report family (scan-first navy/gold, light
   chrome). Tokens mirror build_template_v2.py so the hub, the reports and the
   dashboards read as one system. Signature element: the sticky navy op-bar
   (brand + live digest + group nav) — the hub's version of the report's
   sticky month bar. */
:root{
  --navy:#0f2742; --navy-soft:#1d4d7a; --blue:#2f6fb0;
  --gold:#c9a24b; --gold-dark:#9a7a2a; --gold-pale:#fdf6ec;
  --ink:#1d2733; --muted:#5b6879; --muted-dim:#8794a5;
  --line:#e4e9f0; --soft:#f4f6fa; --page:#f2f4f8; --card:#ffffff;
  --ok:#2e8b57; --warn:#b8860b; --bad:#c0392b; --idle:#8794a5;
  --radius:10px; --ease:cubic-bezier(.2,.7,.2,1);
  --ui:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:var(--ui); color:var(--ink); min-height:100vh;
  background:var(--page);
}
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.86em;color:var(--gold-dark);background:var(--gold-pale);padding:1px 6px;border-radius:6px}

/* ---------- GATE (navy chrome, white card) ---------- */
#gate{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:50;padding:24px;
  background:var(--navy)}
.gate-card{
  width:min(380px,92vw);background:var(--card);border:1px solid var(--line);
  border-radius:14px;padding:40px 32px;text-align:center;
  box-shadow:0 30px 80px rgba(4,12,24,.45);
}
.gate-mark{
  width:56px;height:56px;margin:0 auto 18px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:26px;color:#fff;
  background:var(--navy);border-bottom:3px solid var(--gold);
}
.gate-title{margin:0;font-size:24px;font-weight:800;letter-spacing:-.01em;color:var(--navy)}
.gate-sub{margin:6px 0 26px;color:var(--gold-dark);font-size:10.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.gate-input{
  width:100%;padding:13px 16px;border-radius:10px;border:1px solid var(--line);
  background:var(--soft);color:var(--ink);font-size:15px;outline:none;transition:border-color .2s
}
.gate-input:focus{border-color:var(--blue)}
.gate-btn{
  width:100%;margin-top:12px;padding:13px;border:0;border-radius:10px;cursor:pointer;
  font-weight:700;font-size:15px;color:#fff;background:var(--navy);
  transition:background .15s
}
.gate-btn:hover{background:var(--navy-soft)}
.gate-btn:focus-visible,.ghost-btn:focus-visible,.btn:focus-visible,.nav-chip:focus-visible{
  outline:2px solid var(--blue);outline-offset:2px}
.gate-btn:disabled{opacity:.6;cursor:wait}
.gate-err{min-height:18px;margin-top:12px;color:var(--bad);font-size:13px}

/* ---------- OP-BAR (sticky navy — brand · digest · nav) ---------- */
.topbar{
  position:sticky;top:0;z-index:20;
  background:var(--navy);color:#fff;
  box-shadow:0 2px 12px rgba(4,12,24,.28)
}
.topbar-row{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  max-width:1180px;margin:0 auto;padding:10px clamp(16px,4vw,32px) 8px
}
.brand{display:flex;align-items:center;gap:11px;min-width:0}
.brand-mark{
  width:34px;height:34px;flex:0 0 auto;border-radius:9px;display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:17px;color:var(--navy);background:#fff;border-bottom:2px solid var(--gold)
}
.brand-text{display:flex;flex-direction:column;line-height:1.15;min-width:0}
.brand-text strong{font-size:14.5px;font-weight:800;color:#fff;white-space:nowrap}
.brand-text span{font-size:9.5px;color:var(--gold);letter-spacing:.16em;text-transform:uppercase;font-weight:700}
.digest{flex:1;text-align:center;font-size:12px;color:#c8d2de;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.digest-ok{color:#9fd4b8}
.digest-run{color:#9ec3e8}
.digest-bad{color:#f0a8a0;font-weight:700}
.top-actions{display:flex;gap:8px}
.ghost-btn{
  padding:7px 13px;border-radius:8px;border:1px solid rgba(255,255,255,.22);background:transparent;color:#dbe3ec;
  cursor:pointer;font-size:12.5px;font-weight:600;transition:all .18s;font-family:inherit
}
.ghost-btn:hover{border-color:var(--gold);color:var(--gold)}

/* nav chips — jump to a group; the scan layer */
.group-nav{
  display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;
  max-width:1180px;margin:0 auto;padding:0 clamp(16px,4vw,32px) 9px
}
.group-nav::-webkit-scrollbar{display:none}
.nav-chip{
  flex:0 0 auto;padding:4px 11px;border-radius:999px;font-size:11.5px;font-weight:700;
  color:#c8d2de;text-decoration:none;border:1px solid rgba(255,255,255,.18);
  transition:all .15s;white-space:nowrap
}
.nav-chip:hover{color:var(--navy);background:var(--gold);border-color:var(--gold)}

/* ---------- BOARD ---------- */
.board{max-width:1180px;margin:0 auto;padding:clamp(22px,4vw,40px) clamp(16px,4vw,32px) 60px}
.group{margin-bottom:44px;scroll-margin-top:96px}
.group-head{margin:0 0 4px}
.group-title{
  font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;
  color:var(--gold-dark);margin:0 0 4px
}
.group-blurb{color:var(--muted);font-size:13.5px;margin:0 0 18px;max-width:66ch;line-height:1.5}

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px}

.card{
  background:var(--card);
  border:1px solid var(--line);border-radius:var(--radius);padding:18px;
  display:flex;flex-direction:column;gap:12px;position:relative;overflow:hidden;
  transition:border-color .2s var(--ease),box-shadow .2s var(--ease)
}
.card:hover{border-color:var(--gold);box-shadow:0 10px 28px rgba(15,39,66,.10)}
.card-top{display:flex;align-items:flex-start;gap:12px}
.card-icon{
  width:40px;height:40px;flex:0 0 auto;border-radius:9px;display:flex;align-items:center;justify-content:center;
  font-size:20px;background:var(--soft);border:1px solid var(--line)
}
.card-id{min-width:0;flex:1}
.card-name{font-size:15.5px;font-weight:800;margin:0;line-height:1.25;color:var(--navy)}
.card-sub{font-size:12.5px;color:var(--muted);margin:3px 0 0}

/* status pill */
.status{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);min-height:18px}
.dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto;background:var(--idle)}
.dot.ok{background:var(--ok)}
.dot.warn{background:var(--warn)}
.dot.bad{background:var(--bad)}
.dot.run{background:var(--blue);animation:pulse 1.2s infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(47,111,176,.55)}70%{box-shadow:0 0 0 8px rgba(47,111,176,0)}100%{box-shadow:0 0 0 0 rgba(47,111,176,0)}}
@media (prefers-reduced-motion:reduce){
  .dot.run{animation:none}
  html{scroll-behavior:auto}
}
.status a{color:var(--blue);text-decoration:underline;text-decoration-color:var(--line)}
.status a:hover{color:var(--navy)}

/* card note — the v2 annotation strip (cream, gold left border) */
.card-note{
  font-size:11.5px;color:var(--muted);line-height:1.45;
  background:var(--gold-pale);border-left:3px solid var(--gold);
  border-radius:0 6px 6px 0;padding:7px 9px
}

.card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:2px}
.btn{
  flex:1 1 auto;padding:9px 13px;border-radius:8px;cursor:pointer;font-size:13px;font-weight:700;
  border:1px solid var(--line);background:#fff;color:var(--ink);transition:all .16s;white-space:nowrap;
  font-family:inherit;text-align:center;text-decoration:none
}
.btn-open{background:var(--navy);color:#fff;border-color:var(--navy)}
.btn-open:hover{background:var(--navy-soft);border-color:var(--navy-soft)}
.btn-run{border-color:var(--gold);color:var(--gold-dark)}
.btn-run:hover{background:var(--gold-pale)}
.btn:disabled{opacity:.55;cursor:wait}
.btn-run.busy{color:var(--blue);border-color:var(--blue)}

/* ---------- FOOTER / TOAST ---------- */
.foot{max-width:1180px;margin:0 auto;padding:0 clamp(16px,4vw,32px) 40px;color:var(--muted-dim);font-size:12.5px;text-align:center}
.toast{
  position:fixed;left:50%;bottom:28px;transform:translateX(-50%) translateY(20px);
  background:var(--navy);color:#fff;border:1px solid var(--navy-soft);
  padding:12px 20px;border-radius:10px;font-size:13.5px;font-weight:500;
  box-shadow:0 16px 40px rgba(4,12,24,.35);z-index:60;opacity:0;transition:opacity .25s,transform .25s;max-width:90vw
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast.ok{border-color:var(--ok)}
.toast.bad{border-color:var(--bad)}

@media (max-width:560px){
  .grid{grid-template-columns:1fr}
  .brand-text span{display:none}
  .digest{display:none}
}

/* ---------- guided flow modal ---------- */
.flow-overlay{position:fixed;inset:0;background:rgba(15,39,66,.5);display:flex;
  align-items:center;justify-content:center;z-index:50;padding:16px}
.flow-modal{background:#fff;color:var(--ink);border-radius:12px;max-width:520px;
  width:100%;max-height:85vh;overflow:auto;padding:20px 22px;box-shadow:0 20px 60px rgba(4,12,24,.4);
  border-top:3px solid var(--gold)}
.flow-title{margin:0 0 14px;font-size:16px;font-weight:800;color:var(--navy)}
.flow-field{margin-bottom:12px}
.flow-label{display:block;font-size:12.5px;font-weight:700;margin-bottom:4px;color:var(--navy)}
.flow-input{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:7px;
  background:var(--soft);color:var(--ink);font:inherit;font-size:13.5px}
.flow-input:focus{outline:none;border-color:var(--blue);background:#fff}
.flow-check{display:flex;gap:8px;align-items:flex-start;font-size:13px;color:var(--ink)}
.flow-check input{margin-top:2px;accent-color:var(--navy)}
.flow-hint{font-size:11.5px;color:var(--muted);margin:3px 0 0}
.flow-err{color:var(--bad);font-size:12.5px;min-height:16px;margin:4px 0}
.flow-bar{display:flex;gap:10px;justify-content:flex-end;margin-top:8px}
