/* =========================================================================
   Primara Quality Consulting — marketing site
   Brand: deep navy + brushed silver (aerospace / precision)
   ========================================================================= */

:root {
  /* Brand palette */
  --navy-900: #08172c;
  --navy-800: #0b1f3a;
  --navy-700: #12294f;
  --navy-600: #1b3a6b;
  --blue-500: #2f5c9e;
  --blue-400: #4f7cc4;

  --silver-100: #f4f6f9;
  --silver-200: #e4e8ee;
  --silver-300: #c7cdd7;
  --silver-400: #9aa3b2;
  --silver-500: #6b7382;

  --ink: #0d1626;
  --ink-soft: #46506180;
  --text: #33404f;
  --text-muted: #6b7382;
  --white: #ffffff;

  --bg: #ffffff;
  --bg-muted: #f5f7fa;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(8, 23, 44, .06), 0 4px 14px rgba(8, 23, 44, .06);
  --shadow-md: 0 10px 30px rgba(8, 23, 44, .12);
  --shadow-lg: 0 24px 60px rgba(8, 23, 44, .22);

  --maxw: 1160px;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: "Manrope", var(--font-body);

  --grad-metal: linear-gradient(135deg, #eef1f5 0%, #c7cdd7 40%, #9aa3b2 60%, #d7dbe2 100%);
  --grad-blue: linear-gradient(120deg, #4f7cc4, #9aa3b2);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-500); text-decoration: none; }
a:hover { color: var(--navy-700); }

h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; margin: 0 0 .4em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--navy-800);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
  color: #fff; box-shadow: var(--shadow-sm);
}
.btn-primary:hover { color: #fff; box-shadow: var(--shadow-md); transform: translateY(-2px); }

.btn-ghost {
  background: transparent; color: var(--navy-800);
  border-color: var(--silver-300);
}
.btn-ghost:hover { border-color: var(--navy-700); color: var(--navy-800); background: var(--silver-100); }

/* On dark sections */
.section-dark .btn-ghost, .cta-band .btn-ghost { color: #fff; border-color: #ffffff55; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--silver-200);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-mark { height: 60px; width: auto; }
.brand-wordmark { height: 34px; width: auto; }

.nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; }
.nav-menu a:not(.btn) { color: var(--navy-800); font-weight: 600; font-size: .96rem; }
.nav-menu a:not(.btn):hover { color: var(--blue-500); }
.nav-menu .btn-primary { color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 8px; cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-800); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); background: var(--bg); }
.hero-glow {
  position: absolute; inset: -30% -10% auto auto; width: 780px; height: 780px;
  background: radial-gradient(circle at 70% 30%, rgba(47,92,158,.18), transparent 60%);
  pointer-events: none; z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-500); margin: 0 0 14px;
}
.eyebrow-light { color: var(--silver-300); }
.hero h1 { margin-bottom: 20px; }
.grad {
  background: linear-gradient(120deg, var(--navy-700) 10%, var(--blue-500) 55%, var(--silver-400) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text); max-width: 40ch; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.hero-badges li {
  font-size: .82rem; font-weight: 600; color: var(--silver-500);
  border: 1px solid var(--silver-200); background: var(--silver-100);
  padding: 6px 13px; border-radius: 999px;
}

/* Hero panel (audit readiness card) */
.hero-panel { display: flex; justify-content: center; }
.panel-card {
  width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--silver-200);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-lg);
  position: relative;
}
.panel-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad-metal); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .5; pointer-events: none;
}
.panel-head { display: flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 700; color: var(--navy-800); font-size: .95rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--silver-400); display: inline-block; }
.dot-live { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.panel-score { display: flex; align-items: center; gap: 16px; margin: 20px 0 18px; }
.score-ring {
  width: 78px; height: 78px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; color: var(--navy-800);
  background:
    radial-gradient(closest-side, #fff 76%, transparent 77% 100%),
    conic-gradient(var(--blue-500) 98%, var(--silver-200) 0);
}
.score-ring span { font-size: 1.15rem; }
.score-meta strong { display: block; color: var(--ink); font-family: var(--font-head); }
.score-meta small { color: var(--text-muted); }
.panel-list { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--silver-200); display: grid; gap: 11px; }
.panel-list li { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--text); }
.panel-list .ok, .panel-list .warn { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; flex: none; }
.panel-list .ok { background: #dcfce7; color: #15803d; }
.panel-list .warn { background: #fef3c7; color: #b45309; }

/* ---------- Stats strip ---------- */
.stats { background: var(--navy-800); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 30px 24px; }
.stat { text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; background: var(--grad-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: #b9c2d0; font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 9vw, 108px) 0; }
.section-muted { background: var(--bg-muted); }
.section-dark { background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #eaf0f7; }
.section-dark h2 { color: #fff; }
.section-dark .section-sub { color: #b9c2d0; }

.section-head { max-width: 720px; margin: 0 auto clamp(38px, 5vw, 60px); text-align: center; }
.section-sub { font-size: 1.08rem; color: var(--text-muted); }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Service cards */
.card {
  background: #fff; border: 1px solid var(--silver-200); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--silver-300); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); margin: 0; font-size: .96rem; }
.card-icon {
  width: 50px; height: 50px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
}
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: #cdd6e4; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card-icon svg path:not(.stroke) { fill: rgba(205,214,228,.16); stroke: #cdd6e4; stroke-width: 1.6; }
.card-icon svg .stroke { stroke: #7fa8e0; }

/* Platform features (dark) */
.feature {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius); padding: 26px 24px; transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-4px); background: rgba(255,255,255,.07); border-color: rgba(127,168,224,.5); }
.feature h3 { color: #fff; margin-bottom: 8px; }
.feature p { color: #b9c2d0; margin: 0; font-size: .96rem; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 16px; font-size: 1.25rem;
  display: grid; place-items: center; color: var(--navy-900); font-weight: 800;
  background: var(--grad-metal);
}

/* ---------- Why Primara ---------- */
.why-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 52px; align-items: center; }
.check-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 34px; color: var(--text); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700;
  background: linear-gradient(135deg, var(--navy-700), var(--blue-500)); color: #fff;
}
.why-quote {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #fff;
  border-radius: var(--radius-lg); padding: 40px 36px; box-shadow: var(--shadow-md); position: relative;
}
.why-quote blockquote { margin: 0; }
.why-quote p { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; line-height: 1.3; color: #fff; }
.why-quote footer { color: #fff; margin-top: 16px; font-size: .95rem; font-weight: 600; }
.why-quote .quote-title { display: block; color: var(--silver-300); font-weight: 400; font-size: .85rem; margin-top: 4px; }

/* ---------- Process steps ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { background: #fff; border: 1px solid var(--silver-200); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-sm); position: relative; }
.step-num { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; color: var(--silver-300); display: block; margin-bottom: 10px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-muted); margin: 0; font-size: .94rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--navy-700), var(--navy-900)); color: #fff; padding: clamp(52px, 7vw, 84px) 0; text-align: center; }
.cta-inner h2 { color: #fff; margin-bottom: 8px; }
.cta-inner p { color: #c2cbdA; color: #c2cbda; margin-bottom: 26px; font-size: 1.1rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 52px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--text); }
.contact-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--silver-100); border: 1px solid var(--silver-200); color: var(--navy-700); }

.contact-form { background: #fff; border: 1px solid var(--silver-200); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-md); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; display: flex; flex-direction: column; }
.field label { font-size: .85rem; font-weight: 600; color: var(--navy-800); margin-bottom: 6px; }
.field .opt { color: var(--text-muted); font-weight: 400; }
.field input, .field textarea {
  font-family: var(--font-body); font-size: .98rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--silver-300); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47,92,158,.15); }
.field textarea { resize: vertical; }
.form-note { margin: 12px 0 0; font-size: .9rem; min-height: 1.2em; }
.form-note.ok { color: #15803d; }
.form-note.err { color: #b91c1c; }
.hp { position: absolute; left: -5000px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b9c2d0; padding: 54px 0 26px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.footer-logo { height: 52px; width: auto; margin-bottom: 14px; filter: brightness(1.05); }
.footer-brand p { max-width: 42ch; font-size: .95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: flex-end; align-content: start; }
.footer-nav a { color: #cdd6e4; font-weight: 600; font-size: .95rem; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.10); font-size: .82rem; color: var(--silver-500); }
.footer-bottom p { margin: 0; }

/* ---------- Reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-panel { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .why-grid, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .header-inner { height: 82px; }
  .brand { gap: 11px; }
  .brand-mark { height: 48px; }
  .brand-wordmark { height: 26px; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: 82px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 4px; background: #fff; padding: 14px 24px 22px; border-bottom: 1px solid var(--silver-200);
    box-shadow: var(--shadow-md); transform: translateY(-140%); transition: transform .28s ease; z-index: 90;
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu li { width: 100%; }
  .nav-menu a:not(.btn) { display: block; padding: 12px 4px; border-bottom: 1px solid var(--silver-100); }
  .nav-menu .btn { margin-top: 8px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .grid-4, .grid-3, .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 22px; }
}

/* =========================================================================
   Platform demos — clickable feature blocks + example-view modal
   ========================================================================= */
.section-hint { color: #9fc0ee; font-weight: 600; font-size: .95rem; margin: 10px 0 0; }

.feature-clickable { cursor: pointer; position: relative; display: flex; flex-direction: column; }
.feature-clickable:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 3px; }
.feature-clickable:hover { border-color: rgba(127,168,224,.6); }
.feature-cta {
  margin-top: 16px; font-family: var(--font-head); font-weight: 700; font-size: .84rem;
  color: #9fc0ee; letter-spacing: .01em; transition: color .2s ease, transform .2s ease;
}
.feature-clickable:hover .feature-cta { color: #fff; transform: translateX(3px); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 22px; }
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(8,23,44,.58); opacity: 0; transition: opacity .2s ease; }
.modal.open .modal-overlay { opacity: 1; }
.modal-dialog {
  position: relative; z-index: 1; width: 100%; max-width: 780px; max-height: 88vh; overflow: auto;
  background: #fff; border-radius: var(--radius-lg); padding: 30px 30px 34px; box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.98); opacity: 0; transition: transform .22s ease, opacity .22s ease;
}
.modal.open .modal-dialog { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-dialog { transition: none; }
  .modal-dialog { transform: none; }
}
.modal-close {
  position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--silver-200); background: #fff; font-size: 1.5rem; line-height: 1;
  color: var(--navy-800); cursor: pointer; transition: background .15s ease;
}
.modal-close:hover { background: var(--silver-100); }
.modal-eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue-500); margin: 0 0 4px;
}
.modal-title { font-size: 1.5rem; margin: 0 44px .2rem 0; }
.modal-content { margin-top: 6px; }

/* ---------- Mock app window ---------- */
.demo-window { border: 1px solid var(--silver-200); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.demo-topbar { display: flex; align-items: center; gap: 7px; padding: 11px 15px; background: linear-gradient(var(--navy-800), var(--navy-900)); }
.tb-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.28); }
.tb-title { color: #cdd6e4; font-size: .8rem; margin-left: 12px; font-weight: 600; font-family: var(--font-head); }
.demo-body { padding: 20px; background: var(--bg-muted); }
.demo-caption { color: var(--text-muted); font-size: .95rem; margin: 16px 2px 0; }

.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; font-family: var(--font-head); white-space: nowrap; }
.pill-green { background: #dcfce7; color: #15803d; }
.pill-amber { background: #fef3c7; color: #b45309; }
.pill-blue { background: #dbeafe; color: #1d4ed8; }

/* Audit / document control */
.demo-doc { background: #fff; border: 1px solid var(--silver-200); border-radius: var(--radius-sm); padding: 18px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.doc-title { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.doc-meta { color: var(--text-muted); font-size: .82rem; }
.doc-sign { margin: 14px 0 18px; padding: 9px 13px; background: var(--silver-100); border: 1px dashed var(--silver-300); border-radius: 8px; font-size: .85rem; color: var(--navy-700); }
.trail-title { font-family: var(--font-head); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 12px; }
.trail { list-style: none; margin: 0; padding: 0 0 0 6px; }
.trail li { position: relative; display: flex; gap: 12px; padding: 0 0 15px 18px; border-left: 2px solid var(--silver-200); }
.trail li:last-child { padding-bottom: 0; }
.trail-dot { position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue-500); border: 2px solid #fff; }
.trail li strong { display: block; font-size: .9rem; color: var(--ink); }
.trail li span { font-size: .78rem; color: var(--text-muted); }

/* Digital thread */
.thread-part { font-size: .92rem; color: var(--text); margin-bottom: 16px; }
.thread-chain { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.thread-node { flex: 1 1 92px; min-width: 92px; background: #fff; border: 1px solid var(--silver-200); border-radius: 10px; padding: 13px 10px; text-align: center; font-size: .82rem; font-weight: 700; color: var(--navy-800); display: flex; flex-direction: column; gap: 5px; align-items: center; }
.thread-node small { font-weight: 400; color: var(--text-muted); font-size: .72rem; }
.tn-ic { font-family: var(--font-head); font-weight: 800; font-size: .68rem; letter-spacing: .06em; color: #fff; background: linear-gradient(135deg, var(--navy-700), var(--blue-500)); padding: 4px 9px; border-radius: 6px; }
.thread-node.alert { border-color: #fca5a5; }
.thread-node.alert .tn-ic { background: #dc2626; }
.thread-arrow { align-self: center; color: var(--silver-400); font-weight: 800; }
.thread-note { font-size: .86rem; color: var(--text-muted); margin: 14px 0 0; }

/* Tables (AI + training) */
.demo-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-sm); overflow: hidden; font-size: .85rem; }
.demo-table th { text-align: left; background: var(--navy-800); color: #cdd6e4; padding: 10px 12px; font-family: var(--font-head); font-weight: 600; font-size: .76rem; }
.demo-table td { padding: 10px 12px; border-top: 1px solid var(--silver-200); color: var(--text); }
.sev { display: inline-block; min-width: 24px; text-align: center; border-radius: 6px; font-weight: 700; color: #fff; padding: 1px 6px; }
.sev-high { background: #dc2626; } .sev-med { background: #d97706; } .sev-low { background: #16a34a; }
.ai-head { margin-bottom: 14px; font-size: .9rem; color: var(--text); }
.ai-alert { margin-top: 15px; padding: 11px 13px; background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px; font-size: .86rem; color: #92400e; }
.matrix td.ok { color: #15803d; font-weight: 700; text-align: center; }
.matrix td.due { color: #b45309; font-weight: 700; text-align: center; }
.matrix th:not(:first-child) { text-align: center; }

/* Aerospace & defense */
.aero-banner { background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #fff; padding: 11px 15px; border-radius: 8px; font-size: .86rem; margin-bottom: 15px; }
.aero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.aero-card { background: #fff; border: 1px solid var(--silver-200); border-radius: 10px; padding: 13px; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.ac-h { font-family: var(--font-head); font-weight: 700; font-size: .92rem; color: var(--ink); }
.aero-card small { color: var(--text-muted); font-size: .76rem; }

/* Metrics dashboard */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 15px; }
.kpi { background: #fff; border: 1px solid var(--silver-200); border-radius: 10px; padding: 13px; }
.kpi small { color: var(--text-muted); font-size: .74rem; display: block; }
.kpi strong { font-family: var(--font-head); font-size: 1.55rem; color: var(--ink); display: block; line-height: 1.2; }
.kpi .up, .kpi .down { color: #15803d; font-size: .78rem; font-weight: 700; }
.chart { display: flex; align-items: flex-end; gap: 9px; height: 96px; background: #fff; border: 1px solid var(--silver-200); border-radius: 10px; padding: 13px; }
.chart .bar { flex: 1; height: var(--h); background: linear-gradient(var(--blue-500), var(--navy-700)); border-radius: 5px 5px 0 0; }
.mr-note, .train-note { font-size: .86rem; color: var(--text-muted); margin: 14px 0 0; }

@media (max-width: 560px) {
  .modal-dialog { padding: 26px 20px 28px; }
  .kpi-row { grid-template-columns: 1fr; }
  .aero-grid { grid-template-columns: 1fr; }
  .thread-arrow { transform: rotate(90deg); }
  .thread-node { flex-basis: 100%; }
}
