/* app.css — BARREN TRAIL dashboard demo */

:root {
  --navy-900: #012444;
  --navy-800: #062038;
  --navy-700: #083e77;
  --blue-600: #054387;
  --blue-500: #1f5fae;
  --blue-300: #7fb2e0;
  --blue-100: #dbe8f7;
  --gold-500: #d39f31;
  --gold-400: #e2b64a;
  --gold-100: #fbf1d6;

  /* status palette — validated for CVD separation + contrast on white */
  --ok: #1f8a5a;   --ok-bg: #e3f3ea;
  --warn: #c48a12; --warn-bg: #fbf0d5; --warn-ink: #8a5e05;
  --crit: #cc421c; --crit-bg: #fae2da;
  --muted: #8a97a6;
  /* brighter steps for text/dots on dark surfaces */
  --ok-dk: #5be39a; --warn-dk: #f0b429; --crit-dk: #ff7a57;

  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --line: #dfe5ee;
  --ink: #0d2b49;
  --ink-2: #4a5a6d;
  --ink-3: #7d8a99;

  --radius: 14px;
  --shadow-1: 0 1px 2px rgba(1, 36, 68, .06), 0 4px 14px rgba(1, 36, 68, .06);
  --shadow-2: 0 12px 32px rgba(1, 36, 68, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hdr-h: 104px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.01em; }
.container { width: min(1360px, 100% - 48px); margin-inline: auto; }
.eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.ic { width: 1em; height: 1em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.reveal.in { opacity: 1; transform: none; }

/* page transitions: header/footer get their own groups so they stay put */
.hdr { view-transition-name: hdr; }
.ftr { view-transition-name: ftr; }
::view-transition-old(root) { animation: vt-out .2s ease both; }
::view-transition-new(root) { animation: vt-in .4s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-weight: 700; font-size: 13px; letter-spacing: .04em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s;
}
.btn .ic { width: 15px; height: 15px; }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(211, 159, 49, .4); }
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .4); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255, 255, 255, .28); transform: translateY(-1px); }
.btn-outline { background: var(--surface); color: var(--navy-700); border-color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: #fff; }

/* ---------------------------------------------------------------- header */
.hdr {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.hdr-inner {
  width: min(1360px, 100% - 48px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--hdr-h); padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 18px; }
.wordmark {
  font-weight: 900; font-size: 40px; letter-spacing: -.02em; line-height: 1;
  color: var(--navy-700); font-style: italic;
}
.wordmark sup { font-size: 9px; font-style: normal; vertical-align: top; margin-left: 2px; }
.wordmark.sm { font-size: 22px; color: #fff; }
.brand-rule { width: 1px; height: 46px; background: var(--line); }
.brand-title { display: block; font-weight: 800; font-size: 24px; color: var(--ink); letter-spacing: -.01em; line-height: 1.1; }
.brand-sub { display: block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); margin-top: 4px; }

.hdr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.nav {
  display: flex; align-items: center; gap: 24px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ink);
}
.nav a { position: relative; padding: 6px 0; transition: color .2s; white-space: nowrap; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--gold-500); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a .ic { width: 11px; height: 11px; margin-left: 4px; vertical-align: -1px; }
.nav-rule { width: 1px; height: 18px; background: var(--line); }
.user { display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; }
.user .ic.avatar { width: 30px; height: 30px; color: var(--navy-700); }
.user .ic.chev { width: 14px; height: 14px; }
.pillars {
  display: flex; gap: 12px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-2); padding-bottom: 6px; border-bottom: 2px solid var(--gold-500);
}
.pillars i { font-style: normal; color: var(--ink-3); }
.tagline { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-2); }

/* ---------------------------------------------------------------- footer */
.ftr { background: var(--navy-900); color: #fff; }
.ftr-inner {
  width: min(1360px, 100% - 48px); margin-inline: auto;
  display: flex; align-items: center; gap: 18px; min-height: 64px; padding: 12px 0;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
}
.ftr-rule { width: 1px; height: 22px; background: var(--gold-500); }
.ftr-spacer { flex: 1; }
.ftr-right { display: inline-flex; align-items: center; gap: 8px; }
.ftr-right .ic { width: 16px; height: 16px; }
.ftr-demo { padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 4px; opacity: .8; }

/* ---------------------------------------------------------------- status + pills */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.status .dot { width: 12px; height: 12px; }
.status.big { font-size: 13px; }
.status.ok { color: var(--ok); } .status.warn { color: var(--warn); } .status.crit { color: var(--crit); } .status.muted { color: var(--muted); }
.on-dark .status.ok { color: var(--ok-dk); } .on-dark .status.warn { color: var(--warn-dk); } .on-dark .status.crit { color: var(--crit-dk); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.dot.ok { color: var(--ok); } .dot.warn { color: var(--warn); } .dot.crit { color: var(--crit); } .dot.muted { color: var(--muted); }
.on-dark .dot.ok { color: var(--ok-dk); } .on-dark .dot.warn { color: var(--warn-dk); } .on-dark .dot.crit { color: var(--crit-dk); }
.status.warn .dot, .status.crit .dot { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.pill.high, .pill.crit, .pill.Delayed, .pill.Customs, .pill.Escalated { background: var(--crit-bg); color: var(--crit); }
.pill.medium, .pill.warn, .pill.Expedited, .pill.Mitigating, .pill.Monitoring { background: var(--warn-bg); color: var(--warn-ink); }
.pill.low, .pill.ok, .pill.On { background: var(--ok-bg); color: var(--ok); }
.pill.Open, .pill.neutral { background: var(--blue-100); color: var(--navy-700); }
.pill.EOL, .pill.Discontinued { background: var(--crit-bg); color: var(--crit); }
.pill.NRND { background: var(--warn-bg); color: var(--warn-ink); }
.pill.Active { background: var(--ok-bg); color: var(--ok); }
.delta { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.delta .ic { width: 12px; height: 12px; }
.delta.good { color: var(--ok); } .delta.bad { color: var(--crit); } .delta.flat { color: var(--ink-3); }
.on-dark .delta.good { color: var(--ok-dk); } .on-dark .delta.bad { color: var(--crit-dk); }

/* ---------------------------------------------------------------- home */
.home { position: relative; padding: 52px 0 72px; overflow: hidden; min-height: calc(100vh - var(--hdr-h) - 64px); }
.home-bg { position: absolute; left: 0; right: 0; bottom: 0; height: 280px; pointer-events: none; }
.home-bg svg { width: 100%; height: 100%; display: block; }
.home .container { position: relative; }
.home-title { text-align: center; font-size: clamp(28px, 3.4vw, 44px); margin: 0; color: var(--ink); }
.home-sub { text-align: center; color: var(--ink-2); font-size: 20px; margin: 8px 0 36px; }

.site-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.site-card {
  position: relative; display: block; aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden;
  background: var(--navy-900); color: #fff; box-shadow: var(--shadow-1); isolation: isolate;
  transition: opacity .6s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease);
}
.site-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-2); }
.site-card-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%;
  z-index: -2; transition: transform 1.2s var(--ease);
}
.site-card:hover .site-card-img { transform: scale(1.06); }
.site-card-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(1, 36, 68, .82) 0%, rgba(1, 36, 68, .3) 40%, rgba(1, 36, 68, 0) 60%, rgba(1, 36, 68, .6) 100%);
}
.site-card-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px; gap: 12px; }
.site-card-id { display: flex; align-items: center; gap: 14px; }
.site-icon { width: 54px; height: 54px; color: #fff; flex: none; }
.site-icon svg { width: 100%; height: 100%; }
.site-name { font-weight: 800; font-size: 30px; letter-spacing: .22em; line-height: 1; }
.site-region { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; opacity: .92; margin-top: 7px; }
.site-tagline { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; line-height: 1.75; font-weight: 600; text-align: left; max-width: 150px; }
.site-card-foot { position: absolute; left: 24px; right: 24px; bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.site-card-go {
  width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--gold-500);
  display: grid; place-items: center; background: rgba(1, 36, 68, .55); backdrop-filter: blur(4px);
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.site-card-go .ic { width: 22px; height: 22px; }
.site-card:hover .site-card-go { background: var(--gold-500); color: var(--navy-900); transform: translateX(4px); }

.overview-card {
  margin-top: 24px; display: grid; grid-template-columns: 1.2fr 1fr auto; align-items: center; gap: 24px;
  padding: 26px 30px; border-radius: var(--radius); color: #fff; box-shadow: var(--shadow-1);
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700) 70%, #0d55a3);
  transition: opacity .6s var(--ease), transform .4s var(--ease), box-shadow .4s;
}
.overview-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.overview-card .eyebrow { color: var(--gold-400); }
.overview-card h2 { margin: 4px 0 6px; font-size: 26px; }
.overview-card p { margin: 0; opacity: .85; font-size: 14px; max-width: 48ch; }
.overview-card-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); font-size: 12px; letter-spacing: .1em;
}
.chip b { font-weight: 700; }

.tools-strip { margin-top: 40px; }
.tool-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 12px; }
.tool-card {
  display: grid; grid-template-columns: 230px 1fr; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); cursor: pointer; text-align: left; padding: 0;
  transition: opacity .6s var(--ease), transform .4s var(--ease), box-shadow .4s;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.tool-thumb { position: relative; overflow: hidden; background: var(--navy-900); min-height: 170px; }
.tool-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform 1s var(--ease); display: block; }
.tool-card:hover .tool-thumb img { transform: scale(1.05); }
.tool-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.tool-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.tool-name .ext { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.tool-tagline { margin: 0; color: var(--ink-2); font-size: 14px; }
.tool-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; padding: 0; list-style: none; }
.tool-steps li { font-size: 12px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.tool-steps li b { color: var(--navy-700); }
.tool-cta { margin-top: auto; padding-top: 10px; color: var(--navy-700); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.tool-cta .ic { transition: transform .3s var(--ease); }
.tool-card:hover .tool-cta .ic { transform: translateX(4px); }

/* ---------------------------------------------------------------- dashboards */
.dash { padding: 32px 0 60px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.dash-head h1 { margin: 2px 0 2px; font-size: 30px; }
.dash-head p { margin: 0; color: var(--ink-2); font-size: 16px; }
.dash-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); }
.select { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; color: var(--ink); cursor: pointer; }
.select .ic { width: 14px; height: 14px; }

/* site banners (overview) */
.banners { display: flex; --slant: 44px; margin-bottom: 22px; filter: drop-shadow(0 8px 18px rgba(1, 36, 68, .2)); }
.banner {
  position: relative; flex: 1 1 0; min-width: 0; color: #fff; background: var(--navy-900); isolation: isolate;
  display: flex; flex-direction: column; cursor: pointer;
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .4s;
}
.banner + .banner { margin-left: calc(var(--slant) * -1 + 5px); }
.banner:first-child { clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%); border-radius: 12px 0 0 12px; }
.banner:nth-child(2) { clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%); }
.banner:last-child { clip-path: polygon(var(--slant) 0, 100% 0, 100% 100%, 0 100%); border-radius: 0 12px 12px 0; }
.banner:hover { filter: brightness(1.08); z-index: 2; }
.banner-top {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 28px; height: 230px; gap: 10px;
}
.banner-img { position: absolute; inset: 0; background-size: cover; background-position: center 60%; z-index: -2; transition: transform 1.4s var(--ease); }
.banner:hover .banner-img { transform: scale(1.05); }
.banner-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(1, 36, 68, .72), rgba(1, 36, 68, .18) 50%, rgba(1, 36, 68, .12)); }
.banner:nth-child(n+2) .banner-top { padding-left: calc(var(--slant) + 22px); }
.banner:not(:last-child) .banner-top { padding-right: calc(var(--slant) + 10px); }
.banner-kpis {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 12px; align-items: start;
  background: rgba(1, 28, 55, .94); padding: 14px 28px 16px; min-height: 104px;
}
.banner[data-site="sandy"] .banner-kpis { background: rgba(46, 31, 19, .94); }
/* sandy-wide.png's saguaro sits at 13–17% of the width; a centered crop puts it under the slant */
.banner[data-site="sandy"] .banner-img { background-position: 20% 60%; }
.banner:nth-child(n+2) .banner-kpis { padding-left: calc(var(--slant) + 22px); }
.banner:not(:last-child) .banner-kpis { padding-right: calc(var(--slant) + 10px); }
.bk { min-width: 0; }
.bk-label { display: block; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; margin-bottom: 7px; white-space: nowrap; }
.bk-val { display: flex; align-items: baseline; gap: 6px; font-size: 22px; font-weight: 800; line-height: 1; flex-wrap: wrap; }
.bk-val small { font-size: 10.5px; font-weight: 500; opacity: .85; letter-spacing: .02em; }
.bk-val .delta { font-size: 10.5px; }
.banner-cta {
  position: absolute; right: calc(var(--slant) + 12px); top: 196px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; opacity: 0; transform: translateX(-6px);
  transition: opacity .3s, transform .3s var(--ease); padding: 6px 10px; border-radius: 999px; background: rgba(1, 36, 68, .6);
}
.banner:last-child .banner-cta { right: 24px; }
.banner:hover .banner-cta { opacity: 1; transform: none; }

/* KPI tiles */
.panel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.panel {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 16px; box-shadow: var(--shadow-1); cursor: pointer; outline: none;
  display: flex; flex-direction: column; gap: 14px; min-height: 250px;
  transition: opacity .6s var(--ease), transform .35s var(--ease), box-shadow .35s, border-color .3s;
}
.panel:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.panel:focus-visible { box-shadow: 0 0 0 3px var(--blue-100), var(--shadow-1); }
.panel.active { border-color: var(--gold-500); box-shadow: 0 0 0 2px var(--gold-500), var(--shadow-2); transform: translateY(-3px); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.panel-head h3 { margin: 0; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); padding-bottom: 8px; border-bottom: 2px solid var(--gold-500); display: inline-block; }
.panel-more { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding-top: 2px; transition: color .2s; }
.panel:hover .panel-more { color: var(--navy-700); }
.panel-more .ic { transition: transform .3s var(--ease); }
.panel.active .panel-more .ic { transform: rotate(180deg); }
.panel-body { flex: 1; }
.panel-foot { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); border-left: 3px solid var(--gold-500); padding-left: 10px; line-height: 1.6; }

.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.ring-fill { fill: none; stroke: var(--ok); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset 1.4s var(--ease); }
.ring-fill.warn { stroke: var(--warn); } .ring-fill.crit { stroke: var(--crit); } .ring-fill.blue { stroke: var(--blue-600); }
.ring-seg { fill: none; stroke-width: 12; stroke-dasharray: 0 314.16; transition: stroke-dasharray 1.2s var(--ease); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center b { font-size: 27px; font-weight: 800; line-height: 1; color: var(--ink); }
.ring-center span { font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-top: 5px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--ink-2); flex: 1; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend b { margin-left: auto; color: var(--ink); font-weight: 700; min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.legend .pct { color: var(--ink-3); min-width: 36px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }

.big-num { display: flex; align-items: center; gap: 12px; }
.big-num b { font-size: 46px; font-weight: 800; line-height: 1; color: var(--ink); }
.big-num span { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); max-width: 130px; line-height: 1.4; }
.big-num .delta { margin-left: auto; align-self: flex-start; }
.bar-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: 1fr 100px 24px; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--blue-600); border-radius: 0 5px 5px 0; transition: width 1.1s var(--ease); }
.bar-fill.ok { background: var(--ok); } .bar-fill.warn { background: var(--warn); } .bar-fill.crit { background: var(--crit); }
.bar-val { font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.ship-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ship-stat { display: flex; flex-direction: column; gap: 6px; }
.ship-stat .ic { width: 26px; height: 26px; color: var(--navy-700); }
.ship-stat b { font-size: 26px; font-weight: 800; line-height: 1; }
.ship-stat span { font-size: 11px; color: var(--ink-2); line-height: 1.3; }
.meter { margin-top: 16px; }
.meter-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.meter-label b { font-size: 16px; letter-spacing: 0; color: var(--ink); }
.meter .bar { height: 12px; }

/* detail drawer under the tiles */
.drawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease), margin .5s var(--ease); margin-top: 0; position: relative; }
.drawer.open { grid-template-rows: 1fr; margin-top: 18px; }
.drawer-inner { overflow: hidden; min-height: 0; }
.drawer-card { background: var(--surface); border: 1px solid var(--gold-500); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 20px 22px; margin: 10px 2px 4px; }
.drawer::before {
  content: ""; position: absolute; top: 1px; left: var(--caret-x, 50%); width: 16px; height: 16px; z-index: 1;
  background: var(--surface); border-left: 1px solid var(--gold-500); border-top: 1px solid var(--gold-500);
  transform: translate(-50%, 0) rotate(45deg); opacity: 0; transition: opacity .3s, left .4s var(--ease);
}
.drawer.open::before { opacity: 1; }
.drawer-body { transition: opacity .18s; }
.drawer-body.fade { opacity: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.drawer-head h4 { margin: 0; font-size: 16px; }
.drawer-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.drawer-close { border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: none; }
.drawer-close:hover { background: var(--line); }
.drawer-close .ic { width: 16px; height: 16px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters .lbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-right: 2px; }
.filters .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.filters .count { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.chip-filter { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .2s; }
.chip-filter:hover { border-color: var(--navy-700); color: var(--navy-700); }
.chip-filter.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }

/* tables */
.tbl-wrap { max-height: 440px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.tbl th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding: 10px 10px; border-bottom: 1px solid var(--line); z-index: 1; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
.tbl td.desc { min-width: 150px; }
.tbl td.risk { min-width: 180px; }
.tbl .sub { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--blue-100); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .muted { color: var(--ink-3); }
.tbl .nowrap { white-space: nowrap; }
.tbl .id { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.tbl .strong { font-weight: 600; }
.tbl .low-stock { color: var(--crit); font-weight: 700; }
.flags { display: flex; flex-wrap: wrap; gap: 4px; }
.flag { font-size: 10px; padding: 2px 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.link-ext { color: var(--navy-700); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; font-size: 12px; }
.link-ext:hover { text-decoration: underline; }
.link-ext .ic { width: 12px; height: 12px; }
.empty { padding: 24px; text-align: center; color: var(--ink-3); font-size: 13px; }
.score { display: inline-flex; align-items: center; gap: 8px; }
.score .bar { width: 60px; height: 6px; }
.score .bar-fill { transition: width .8s var(--ease); }
.progress { display: inline-flex; align-items: center; gap: 8px; }
.progress .bar { width: 80px; height: 8px; }

/* recent actions bar */
.actions-bar {
  margin-top: 22px; border-radius: var(--radius); color: #fff; padding: 22px 26px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center;
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(90deg, var(--navy-900), var(--navy-800) 60%, #0a2f5c);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.actions-bar .backdrop { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s; }
.actions-bar.has-backdrop .backdrop { opacity: .7; }
.actions-bar .net { position: absolute; right: -60px; top: -80px; width: 380px; height: 380px; opacity: .28; z-index: -1; pointer-events: none; transition: opacity 1s; }
/* the photo carries its own globe on the right; the SVG one would double it */
.actions-bar.has-backdrop .net { opacity: 0; }
.actions-title { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; border-bottom: 2px solid var(--gold-500); padding-bottom: 8px; white-space: nowrap; }
.actions-list { display: flex; min-width: 0; }
.action { flex: 1; padding: 0 18px; border-left: 1px solid rgba(255, 255, 255, .18); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.action:first-child { border-left: 0; padding-left: 0; }
.action-date { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; display: flex; gap: 8px; }
.action-date .site-tag { color: var(--gold-400); }
.action-text { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-sub { font-size: 12px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions-quote { font-style: italic; font-size: 16px; max-width: 230px; line-height: 1.4; opacity: .95; }

/* ---------------------------------------------------------------- site view */
.site-hero { position: relative; color: #fff; isolation: isolate; padding: 26px 0 64px; overflow: hidden; }
.site-hero-img { position: absolute; inset: 0; background-size: cover; background-position: center 55%; z-index: -2; transform: scale(1.03); }
.site-hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(1, 36, 68, .94) 0%, rgba(1, 36, 68, .62) 55%, rgba(1, 36, 68, .3) 100%); }
.crumbs { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; display: flex; gap: 8px; margin-bottom: 20px; }
.crumbs a:hover { text-decoration: underline; }
.site-hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.site-card-id.big .site-icon { width: 74px; height: 74px; }
.site-card-id.big .site-name { font-size: 46px; }
.site-card-id.big .site-region { font-size: 13px; }
.site-hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; }
.site-hero-right .site-tagline { text-align: right; max-width: none; }
.site-hero-tools { display: flex; gap: 10px; margin-top: 24px; align-items: center; flex-wrap: wrap; }
.site-switch { margin-left: auto; display: flex; gap: 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.site-switch a { padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); transition: background .2s; }
.site-switch a:hover { background: rgba(255, 255, 255, .16); }
.site-switch a.current { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }

.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: -36px 0 22px; position: relative; z-index: 2; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 7px;
  transition: opacity .6s var(--ease), transform .35s var(--ease), box-shadow .3s;
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.kpi-label { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.kpi-val { font-size: 28px; font-weight: 800; line-height: 1; display: flex; align-items: baseline; gap: 6px; }
.kpi-val small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.kpi-sub { font-size: 11px; color: var(--ink-3); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 20px 22px; margin-top: 22px; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid var(--gold-500); padding-bottom: 8px; display: inline-block; }
.card-head p { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); max-width: 78ch; }
.card .filters { margin-bottom: 12px; }

/* ---------------------------------------------------------------- misc */
.tip {
  position: fixed; z-index: 100; pointer-events: none; background: var(--navy-900); color: #fff;
  padding: 6px 10px; border-radius: 6px; font-size: 12px; box-shadow: var(--shadow-2); max-width: 260px;
}
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); z-index: 100;
  background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow-2); opacity: 0; transition: opacity .3s, transform .3s var(--ease); max-width: min(520px, 90vw);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .panel-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .banners { flex-direction: column; --slant: 0px; gap: 12px; filter: none; }
  .banner + .banner { margin-left: 0; }
  /* flex: none — with flex-basis 0 in a column container plus overflow hidden, the banners collapse to 0 height */
  .banner { flex: none; clip-path: none !important; border-radius: 12px !important; overflow: hidden; box-shadow: var(--shadow-1); }
  .banner-top { height: 180px; }
  .hdr-inner { flex-wrap: wrap; justify-content: center; }
  .hdr-right { align-items: center; }
  .pillars, .tagline { display: none; }
  .actions-bar { grid-template-columns: 1fr; }
  .actions-quote { display: none; }
  .tool-cards { grid-template-columns: 1fr; }
  .overview-card { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .container, .hdr-inner, .ftr-inner { width: min(1360px, 100% - 32px); }
  .site-cards, .panel-grid, .kpi-row { grid-template-columns: 1fr; }
  .nav { gap: 14px; flex-wrap: wrap; justify-content: center; }
  .wordmark { font-size: 30px; }
  .brand-title { font-size: 18px; }
  .tool-card { grid-template-columns: 1fr; }
  .tool-thumb { height: 150px; }
  .actions-list { flex-direction: column; gap: 12px; }
  .action { border-left: 0; padding: 0; }
  .dash-head { flex-direction: column; align-items: flex-start; }
  .site-card-id.big .site-name { font-size: 32px; }
  .ftr-inner { flex-wrap: wrap; }
}
