/* ==========================================================================
   McElveen Solutions Group — brand system v2 (Section 9, msg_master_facts.md)
   Ink Black #0A0A0A · Platinum Silver #6E7278 · Circuit Blue #2E6E93
   Circuit Blue Glow #7FC4E8 (screen/dark only) · White · Muted Gray #8A8D91
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  --text-2xl: clamp(2.05rem, 1.5rem + 2.3vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  --ink: #0A0A0A;
  --platinum: #6E7278;
  --circuit: #2E6E93;
  --glow: #7FC4E8;
  --muted: #8A8D91;

  --container: 78rem;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Satoshi', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

/* surface scopes — every section declares one */
.on-dark {
  --bg: #0A0A0A;
  --panel: #121416;
  --panel-2: #17191c;
  --fg: #FFFFFF;
  --fg2: #8A8D91;
  --fg3: #6E7278;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.26);
  --accent: #7FC4E8;
  --accent-ink: #0A0A0A;
  --btn-fg: #0A0A0A;
}
.on-light {
  --bg: #FFFFFF;
  --panel: #F3F4F5;
  --panel-2: #EBEDEE;
  --fg: #0A0A0A;
  --fg2: #5C6066;
  --fg3: #6E7278;
  --line: rgba(10, 10, 10, 0.14);
  --line-strong: rgba(10, 10, 10, 0.3);
  --accent: #2E6E93;
  --accent-ink: #FFFFFF;
  --btn-fg: #FFFFFF;
}
/* manual theme toggle simply swaps the two scopes */
[data-theme='light'] .on-dark {
  --bg: #FFFFFF; --panel: #F3F4F5; --panel-2: #EBEDEE;
  --fg: #0A0A0A; --fg2: #5C6066; --fg3: #6E7278;
  --line: rgba(10, 10, 10, 0.14); --line-strong: rgba(10, 10, 10, 0.3);
  --accent: #2E6E93; --accent-ink: #FFFFFF; --btn-fg: #FFFFFF;
}
[data-theme='light'] .on-light {
  --bg: #0A0A0A; --panel: #121416; --panel-2: #17191c;
  --fg: #FFFFFF; --fg2: #8A8D91; --fg3: #6E7278;
  --line: rgba(255, 255, 255, 0.13); --line-strong: rgba(255, 255, 255, 0.26);
  --accent: #7FC4E8; --accent-ink: #0A0A0A; --btn-fg: #0A0A0A;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: #fff;
  background: #0A0A0A;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[data-theme='light'] body { background: #fff; color: #0A0A0A; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.06; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
table { border-collapse: collapse; width: 100%; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: #7FC4E8; color: #0A0A0A; padding: 0.75rem 1rem; font-weight: 600;
}
.skip:focus { left: 0; }

.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;
}

/* ---------- layout ---------- */
.section { background: var(--bg); color: var(--fg); position: relative; }
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.pad { padding-block: clamp(var(--space-16), 9vw, var(--space-24)); }
.pad-sm { padding-block: clamp(var(--space-12), 6vw, var(--space-16)); }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) { .split { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: start; } }

/* ---------- type utilities ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 var(--space-5);
  display: flex; align-items: center; gap: 0.7rem;
}
.eyebrow::before { content: ''; width: 1.75rem; height: 1px; background: currentColor; flex: none; }
.h-display { font-size: var(--text-3xl); }
.h1 { font-size: var(--text-2xl); }
.h2 { font-size: var(--text-xl); }
.h3 { font-size: var(--text-lg); }
.lede { font-size: var(--text-lg); line-height: 1.5; color: var(--fg2); max-width: 46ch; }
.body { color: var(--fg2); }
.small { font-size: var(--text-sm); color: var(--fg2); }
.xs { font-size: var(--text-xs); color: var(--fg3); }
.mono { font-family: var(--font-mono); font-variant-ligatures: none; }
.max60 { max-width: 60ch; }
.max70 { max-width: 70ch; }
.mt2 { margin-top: var(--space-2); } .mt3 { margin-top: var(--space-3); }
.mt4 { margin-top: var(--space-4); } .mt5 { margin-top: var(--space-5); } .mt6 { margin-top: var(--space-6); }
.mt8 { margin-top: var(--space-8); } .mt10 { margin-top: var(--space-10); }
.mt12 { margin-top: var(--space-12); } .mt16 { margin-top: var(--space-16); }
.accent { color: var(--accent); }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.95rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent); color: var(--btn-fg);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -8px rgba(127, 196, 232, 0.45), 0 0 0 1px rgba(127, 196, 232, 0.18); }
[data-theme='light'] .btn:hover, .on-light .btn:hover { box-shadow: 0 10px 28px -8px rgba(46, 110, 147, 0.35), 0 0 0 1px rgba(46, 110, 147, 0.14); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 10px 28px -10px rgba(127, 196, 232, 0.3); }
.btn svg { flex: none; }

.link {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: gap 0.25s var(--ease), border-color 0.25s var(--ease);
}
.link:hover { gap: 0.85rem; border-color: currentColor; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 90;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
[data-theme='light'] .site-head { background: rgba(255, 255, 255, 0.9); }
.head-in { display: flex; align-items: center; gap: var(--space-6); min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; flex: none; }
.brand img { width: 2.15rem; height: auto; }
.brand img.logo-for-dark { display: block; }
.brand img.logo-for-light { display: none; }
[data-theme='light'] .brand img.logo-for-dark { display: none; }
[data-theme='light'] .brand img.logo-for-light { display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem;
  letter-spacing: 0.005em; color: var(--fg); white-space: nowrap;
}
.brand-tag {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.115em;
  color: var(--accent); margin-top: 0.3rem; line-height: 1.5;
}
.site-head .brand-tag, .drawer-head .brand-tag { display: none; }
.brand-txt { min-width: 0; }
.site-head .brand-name, .drawer-head .brand-name { font-size: 1rem; }
@media (max-width: 26rem) {
  .site-head .brand img, .drawer-head .brand img { width: 1.9rem; }
  .site-head .brand-name, .drawer-head .brand-name { font-size: 0.875rem; white-space: normal; }
  .head-in { gap: var(--space-3); }
}
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(0.85rem, 1.5vw, 1.5rem); }
.nav a {
  font-size: 0.875rem; color: var(--fg2); white-space: nowrap;
  transition: color 0.2s var(--ease); position: relative; padding-block: 0.35rem;
}
.nav a:hover { color: var(--fg); }
.nav a[aria-current='page'] { color: var(--fg); }
.nav a[aria-current='page']::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -0.15rem; height: 1px; background: var(--accent);
}
.head-actions { display: flex; align-items: center; gap: var(--space-3); margin-left: var(--space-2); }
.icon-btn {
  width: 2.35rem; height: 2.35rem; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  border-radius: var(--radius); cursor: pointer; transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle { display: none; }
.head-cta { padding: 0.7rem 1.05rem; }

@media (max-width: 68rem) {
  .nav, .head-cta { display: none; }
  .nav-toggle { display: grid; }
  .head-actions { margin-left: auto; }
}

/* mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 100; background: #0A0A0A;
  transform: translateY(-100%); transition: transform 0.45s var(--ease);
  display: flex; flex-direction: column; overflow-y: auto;
}
[data-theme='light'] .drawer { background: #fff; }
.drawer[data-open='true'] { transform: translateY(0); }
.drawer-head { display: flex; align-items: center; min-height: 4.75rem; border-bottom: 1px solid var(--line); }
.drawer-nav { padding: var(--space-6) 0 var(--space-10); }
.drawer-nav a {
  display: flex; align-items: baseline; gap: 1rem; padding: 0.95rem 0;
  border-bottom: 1px solid var(--line); font-family: var(--font-display);
  font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; color: var(--fg);
}
.drawer-nav a span { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); letter-spacing: 0.1em; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-art-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-size: cover; background-position: center;
  opacity: 0.22; mix-blend-mode: screen;
  mask-image: radial-gradient(120% 100% at 78% 15%, #000 0%, rgba(0,0,0,0.45) 50%, transparent 82%);
  -webkit-mask-image: radial-gradient(120% 100% at 78% 15%, #000 0%, rgba(0,0,0,0.45) 50%, transparent 82%);
}
[data-theme='light'] .hero-art-bg { opacity: 0.10; mix-blend-mode: luminosity; }
.hero--art .hero-grid-bg { opacity: 0.22; }
.section--art { position: relative; background-size: cover; background-position: center; background-repeat: no-repeat; background-color: var(--bg); background-blend-mode: screen; }
.section--art > .wrap { position: relative; z-index: 1; }
[data-theme='light'] .section--art { background-blend-mode: luminosity; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 5.5rem 5.5rem;
  opacity: 0.4;
  mask-image: radial-gradient(130% 110% at 72% -10%, #000 0%, rgba(0,0,0,0.35) 45%, transparent 78%);
  -webkit-mask-image: radial-gradient(130% 110% at 72% -10%, #000 0%, rgba(0,0,0,0.35) 45%, transparent 78%);
}
.hero-glow {
  position: absolute; width: 58rem; height: 58rem; right: -16rem; top: -20rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(127, 196, 232, 0.34), transparent 55%),
    radial-gradient(circle at 70% 65%, rgba(46, 110, 147, 0.26), transparent 60%);
  pointer-events: none;
  animation: heroGlowDrift 14s ease-in-out infinite alternate;
}
[data-theme='light'] .hero-glow {
  background:
    radial-gradient(circle at 30% 30%, rgba(46, 110, 147, 0.20), transparent 55%),
    radial-gradient(circle at 70% 65%, rgba(127, 196, 232, 0.18), transparent 60%);
}
@keyframes heroGlowDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-3.5rem, 2.5rem) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .hero-glow { animation: none; } }

/* AI-enabled badge — pulsing status pill used near hero/panel headers */
.ai-badge {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem 0.4rem 0.65rem;
  border: 1px solid rgba(127, 196, 232, 0.4); border-radius: 100px;
  background: linear-gradient(90deg, rgba(127, 196, 232, 0.14), rgba(46, 110, 147, 0.08));
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-4);
}
.ai-badge .pulse-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.ai-badge .pulse-dot::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--accent);
  animation: pulseRing 1.8s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ai-badge .pulse-dot::after { animation: none; } }

/* gradient-accent stat numbers — used with existing .stat-counter (data-count-to) */
.stat-counter, .k.stat-counter {
  background: linear-gradient(120deg, var(--fg) 20%, var(--accent) 65%, rgba(127, 196, 232, 0.7) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-in { position: relative; padding-block: clamp(var(--space-16), 11vw, 8.5rem); }
@media (min-width: 62rem) { .hero-in.split { align-items: center; } }
.hero h1 { font-size: var(--text-3xl); max-width: 16ch; }
.hero .lede { margin-top: var(--space-6); max-width: 52ch; }
.hero-tag {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-3);
  white-space: nowrap;
}
@media (max-width: 26rem) {
  .hero-tag { white-space: normal; letter-spacing: 0.08em; }
}
@media (max-width: 30rem) {
  .btn { white-space: normal; text-align: center; }
}
.brand-line {
  font-family: var(--font-body); font-weight: 400; font-size: 0.9375rem;
  letter-spacing: 0.01em; color: var(--fg2); margin-bottom: var(--space-6);
}
.status {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0.8rem;
  border: 1px solid var(--line); border-radius: 100px; font-family: var(--font-mono);
  font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg2);
  margin-bottom: var(--space-6);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(127, 196, 232, 0.2); animation: dotPulse 2.4s ease-in-out infinite; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(127, 196, 232, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(127, 196, 232, 0.32); }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

/* hero panel (right rail) */
.panel {
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); margin-bottom: var(--space-5);
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg3);
}
.stack { display: grid; gap: var(--space-4); }
.row-item { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.row-num { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); padding-top: 0.2rem; }
.row-item strong { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.row-item p { font-size: var(--text-xs); color: var(--fg2); line-height: 1.55; margin-top: 2px; }

/* ---------- cards ---------- */
.card {
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius);
  padding: clamp(1.4rem, 2.4vw, 2rem); position: relative; overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex; flex-direction: column; gap: var(--space-3); min-width: 0;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 85%);
  opacity: 0; transition: opacity 0.3s var(--ease); pointer-events: none;
}
.card:hover {
  border-color: var(--line-strong); transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(127, 196, 232, 0.35);
}
.card:hover::before { opacity: 1; }
[data-theme='light'] .card:hover, .on-light .card:hover { box-shadow: 0 18px 40px -20px rgba(46, 110, 147, 0.28); }
.ico { color: var(--accent); width: 2.5rem; display: block; }
.ico svg { width: 100%; height: auto; }
.card .ico { color: var(--accent); width: 2.5rem; display: block; margin-bottom: var(--space-2); }
.card .ico svg { width: 100%; height: auto; }
.card .idx { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; color: var(--accent); }
.card h3 { font-size: var(--text-lg); }
.card p { font-size: var(--text-sm); color: var(--fg2); }
.card--bare { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: var(--space-6) 0 0; }
.card--bare:hover { transform: none; }

.ticks { display: grid; gap: 0.6rem; }
.ticks li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.7rem; font-size: var(--text-sm); color: var(--fg2); line-height: 1.55; }
.ticks li::before { content: ''; width: 7px; height: 7px; margin-top: 0.55rem; border: 1px solid var(--accent); transform: rotate(45deg); }
.ticks li > *:not(:first-child) { grid-column: 2; }

/* stat / metric strip */
.strip { display: grid; gap: 0; border-top: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.strip > div { padding: var(--space-6) var(--space-6) var(--space-6) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 60rem) {
  .strip > div + div { border-left: 1px solid var(--line); padding-left: var(--space-6); }
}
.strip .k { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; }
.strip .v { font-size: var(--text-sm); color: var(--fg2); margin-top: 0.35rem; }

/* tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { font-size: var(--text-sm); min-width: 36rem; }
table.data caption { text-align: left; padding: var(--space-4) var(--space-5); color: var(--fg3); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
table.data th, table.data td { text-align: left; padding: 0.85rem var(--space-5); border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); font-weight: 500; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.code { font-family: var(--font-mono); color: var(--accent); white-space: nowrap; }
table.data td strong { font-weight: 600; }

.pill {
  display: inline-block; font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.08em; text-transform: uppercase; padding: 0.22rem 0.55rem;
  border: 1px solid var(--line-strong); border-radius: 100px; color: var(--fg2); white-space: nowrap;
}
.pill--go { color: var(--accent); border-color: var(--accent); }

.codes { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.codes li {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.06em;
  border: 1px solid var(--line); padding: 0.4rem 0.65rem; color: var(--fg2); border-radius: var(--radius);
}
.codes li b { color: var(--accent); font-weight: 500; }

/* definition rows */
.defs { display: grid; gap: 0; }
.defs > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem; padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 45rem) { .defs > div { grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: var(--space-6); align-items: baseline; } }
.defs dt { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); }
.defs dd { margin: 0; font-size: var(--text-sm); color: var(--fg); overflow-wrap: break-word; hyphens: none; }

/* leadership */
.bio { border-top: 1px solid var(--line-strong); padding-top: var(--space-6); display: grid; gap: var(--space-4); min-width: 0; }
.bio .role { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.bio h3 { font-size: var(--text-lg); }
.creds { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.creds span { font-family: var(--font-mono); font-size: var(--text-xs); border: 1px solid var(--line); padding: 0.25rem 0.5rem; color: var(--fg2); }

/* quote / callout */
.callout { border-left: 2px solid var(--accent); padding: var(--space-2) 0 var(--space-2) var(--space-6); }
.callout p { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }

/* CTA band */
.cta-band {
  border: 1px solid var(--line); border-left: 2px solid var(--accent); background: var(--panel);
  padding: clamp(1.75rem, 4vw, 3rem); display: grid; gap: var(--space-6); align-items: center;
  position: relative; overflow: hidden;
}
.cta-band::after {
  content: ''; position: absolute; right: -10rem; top: -10rem; width: 22rem; height: 22rem;
  background: radial-gradient(circle, rgba(127, 196, 232, 0.14), transparent 65%);
  pointer-events: none;
}
[data-theme='light'] .cta-band::after, .on-light .cta-band::after { background: radial-gradient(circle, rgba(46, 110, 147, 0.12), transparent 65%); }
@media (min-width: 58rem) { .cta-band { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-10); } }
.cta-band h2 { font-size: var(--text-xl); }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.foot-top { display: grid; gap: var(--space-10); padding-block: clamp(var(--space-12), 6vw, var(--space-20)); }
@media (min-width: 60rem) { .foot-top { grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: var(--space-8); } }
.foot-col h3 { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); font-weight: 500; margin-bottom: var(--space-4); }
.foot-col li + li { margin-top: 0.55rem; }
.foot-col a, .foot-col p { font-size: var(--text-sm); color: var(--fg2); overflow-wrap: anywhere; }
.foot-col a:hover { color: var(--accent); }
.foot-contact-fn li { display: flex; flex-direction: column; gap: 0.15rem; }
.foot-contact-fn li + li { margin-top: 0.85rem; }
.foot-fn-label { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3); }
.foot-bottom { border-top: 1px solid var(--line); padding-block: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); justify-content: space-between; }
.foot-bottom p { font-size: var(--text-xs); color: var(--fg3); max-width: 78ch; }

/* forms */
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field label { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--text-sm); color: var(--fg);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.8rem 0.9rem; transition: border-color 0.2s var(--ease);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }

/* insights list */
.entry { display: grid; gap: var(--space-3); padding-block: var(--space-8); border-bottom: 1px solid var(--line); }
@media (min-width: 55rem) { .entry { grid-template-columns: 11rem minmax(0, 1fr); gap: var(--space-8); } }
.entry .meta { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg3); }
.entry h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.entry p { font-size: var(--text-sm); color: var(--fg2); }

/* page hero (interior) */
.phero { border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.phero-in { padding-block: clamp(var(--space-12), 8vw, var(--space-24)); position: relative; }
.phero h1 { font-size: var(--text-2xl); max-width: 18ch; }
.phero .lede { margin-top: var(--space-5); }
.crumb { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); margin-bottom: var(--space-5); }
.crumb a { color: var(--fg3); }
.crumb a:hover { color: var(--accent); }

/* circuit divider echoing the mark */
.circuit { width: 100%; height: 1.5rem; color: var(--line-strong); }

/* reveal */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

/* interior hero meta panel */
.phero-meta { border: 1px solid var(--line); background: var(--panel); padding: clamp(1.1rem, 2vw, 1.5rem); border-radius: var(--radius); }
.phero-meta .defs--tight > div { padding: 0.7rem 0; }
.phero-meta .defs--tight > div:last-child { border-bottom: 0; }
@media (min-width: 45rem) { .phero-meta .defs--tight > div { grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr); gap: var(--space-4); } }
.phero-meta dd { font-size: var(--text-xs); }
@media (min-width: 62rem) { .phero-in.split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; } }

/* ==========================================================================
   Wow-factor visual system — animated network canvas, art panels, motion
   ========================================================================== */

/* animated hero network canvas (behind content, above base bg) */
.hero-net {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55; z-index: 0;
}
[data-theme='light'] .hero-net { opacity: 0.28; }
@media (prefers-reduced-motion: reduce) { .hero-net { display: none; } }

/* stronger interior-page art hero (phero variant with generated art) */
.phero--art .hero-art-bg { opacity: 0.30; }
[data-theme='light'] .phero--art .hero-art-bg { opacity: 0.13; }

/* art panel — bordered illustration module used inside cards/sections */
.art-panel {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); aspect-ratio: 4 / 3; isolation: isolate;
}
.art-panel img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease); mix-blend-mode: screen; opacity: 0.92;
}
[data-theme='light'] .art-panel img { mix-blend-mode: luminosity; opacity: 0.8; }
.art-panel::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 40%, var(--panel) 100%);
}
.art-panel:hover img { transform: scale(1.05); }
.art-panel--wide { aspect-ratio: 16 / 9; }

/* section divider using a generated image, thin band between sections */
.divider-art {
  position: relative; height: clamp(5rem, 10vw, 8rem); overflow: hidden;
  background-size: cover; background-position: center;
}
.divider-art::before {
  content: ''; position: absolute; inset: 0; background: var(--bg); opacity: 0.62;
}
[data-theme='light'] .divider-art::before { opacity: 0.75; }

/* card with illustration top */
.card--visual { padding: 0; overflow: hidden; }
.card--visual .art-panel { border: 0; border-radius: 0; aspect-ratio: 16/10; }
.card--visual .card-body { padding: clamp(1.4rem, 2.4vw, 2rem); display: grid; gap: var(--space-3); }

/* ---------- scroll reveal upgrades (opacity/clip-path only — no CLS) ---------- */
.rv2 { opacity: 0; clip-path: inset(0 0 12% 0); transition: opacity 0.8s var(--ease), clip-path 0.8s var(--ease); }
.rv2.in { opacity: 1; clip-path: inset(0 0 0% 0); }
.rv-stagger > * { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.rv-stagger.in > * { opacity: 1; transform: none; }
.rv-stagger.in > *:nth-child(1) { transition-delay: 0.02s; }
.rv-stagger.in > *:nth-child(2) { transition-delay: 0.09s; }
.rv-stagger.in > *:nth-child(3) { transition-delay: 0.16s; }
.rv-stagger.in > *:nth-child(4) { transition-delay: 0.23s; }
.rv-stagger.in > *:nth-child(5) { transition-delay: 0.30s; }
.rv-stagger.in > *:nth-child(6) { transition-delay: 0.37s; }
@media (prefers-reduced-motion: reduce) {
  .rv2 { opacity: 1; clip-path: none; transition: none; }
  .rv-stagger > * { opacity: 1; transform: none; transition: none; }
}

/* stat counter */
.stat-counter { font-variant-numeric: tabular-nums; }

/* capability radar / bar diagram */
.radar-wrap { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center; }
@media (min-width: 55rem) { .radar-wrap { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }
.radar-svg { width: 100%; height: auto; overflow: visible; }
.radar-svg .grid-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-svg .axis-line { stroke: var(--line); stroke-width: 1; }
.radar-svg .axis-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em; fill: var(--fg2); text-transform: uppercase; }
.radar-svg .radar-shape {
  fill: rgba(127, 196, 232, 0.16); stroke: var(--accent); stroke-width: 1.5;
  stroke-linejoin: round; opacity: 0; transform-origin: center;
  transform: scale(0.85); transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.radar-svg.in .radar-shape { opacity: 1; transform: scale(1); }
.radar-svg .radar-pt { fill: var(--accent); opacity: 0; transition: opacity 0.6s var(--ease) 0.5s; }
.radar-svg.in .radar-pt { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .radar-svg .radar-shape, .radar-svg .radar-pt { opacity: 1; transform: none; transition: none; }
}

/* architecture diagram (systems-integration SVG) */
.arch-diagram { width: 100%; height: auto; }
.arch-diagram .node-box {
  fill: var(--panel); stroke: var(--line-strong); stroke-width: 1; transition: stroke 0.3s var(--ease);
}
.arch-diagram .node-group:hover .node-box { stroke: var(--accent); }
.arch-diagram .node-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; fill: var(--fg); text-transform: uppercase; }
.arch-diagram .node-sub { font-family: var(--font-mono); font-size: 8.5px; fill: var(--fg3); }
.arch-diagram .flow-line { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.arch-diagram .flow-dot { fill: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .arch-diagram .flow-dot { animation: flowmove 3.4s linear infinite; }
}
@keyframes flowmove {
  0% { offset-distance: 0%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* enhanced hover for nav / footer links already exist; add subtle lift to panel-head icons on hover groups */
.card--visual:hover { border-color: var(--line-strong); }

/* ==========================================================================
   Capability Fit Explorer — filterable/clickable division + focus-area matcher
   ========================================================================== */
.explorer { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.5rem); }
.explorer-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.explorer-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: var(--space-8); role: group; }
.filter-btn {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.6rem 1.05rem; border: 1px solid var(--line-strong); border-radius: 100px; background: transparent; color: var(--fg2);
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.18s var(--ease);
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap;
  min-height: 44px;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn:active { transform: translateY(1px); }
.filter-btn[aria-pressed='true'] { background: var(--accent); color: var(--btn-fg); border-color: var(--accent); }
.filter-btn .fdot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.65; flex: none; }

.explorer-grid { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: flex-start; }
.efit-card {
  border: 1px solid var(--line); background: var(--bg); border-radius: var(--radius); padding: clamp(1.2rem, 2vw, 1.6rem);
  display: grid; align-content: start; gap: var(--space-3); min-width: 0; opacity: 1; transform: scale(1);
  flex: 1 1 19rem; max-width: calc(33.333% - var(--space-5) * 2 / 3);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
@media (max-width: 62rem) { .efit-card { max-width: calc(50% - var(--space-5) / 2); } }
@media (max-width: 38rem) { .efit-card { max-width: 100%; } }
.efit-card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent); }
.efit-card[data-hidden='true'] {
  opacity: 0; transform: scale(0.96); flex: 0 0 0; max-width: 0; height: 0; min-height: 0; padding: 0; margin: 0; border: 0; overflow: hidden; gap: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), flex-basis 0.3s var(--ease) 0.1s, max-width 0.3s var(--ease) 0.1s, height 0.3s var(--ease) 0.1s, padding 0.3s var(--ease) 0.1s;
}
.efit-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.efit-tag { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.efit-card h3 { font-size: var(--text-base); font-weight: 700; letter-spacing: -0.01em; }
.efit-card p { font-size: var(--text-sm); color: var(--fg2); }
.efit-codes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.efit-codes span {
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--fg2);
  border: 1px solid var(--line); padding: 0.22rem 0.5rem; border-radius: var(--radius);
}
.efit-diff { display: grid; gap: 0.35rem; margin-top: 0.3rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.efit-diff li { font-size: var(--text-xs); color: var(--fg2); display: grid; grid-template-columns: 0.75rem minmax(0,1fr); gap: 0.4rem; line-height: 1.5; }
.efit-diff li::before { content: ''; width: 5px; height: 5px; margin-top: 0.4rem; background: var(--accent); border-radius: 50%; }
.explorer-empty { display: none; padding: var(--space-10) 0; text-align: center; color: var(--fg3); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; }
.explorer-empty[data-show='true'] { display: block; }
.explorer-count { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3); }
@media (prefers-reduced-motion: reduce) {
  .efit-card, .efit-card[data-hidden='true'] { transition: none; }
}

/* ==========================================================================
   Tech-domain ticker — continuous marquee of real technology domains
   ========================================================================== */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); overflow: hidden; position: relative; }
.ticker::before, .ticker::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: clamp(2.5rem, 8vw, 6rem); z-index: 2; pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(90deg, var(--panel), transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, var(--panel), transparent); }
.ticker-track {
  display: flex; align-items: center; gap: clamp(2rem, 4vw, 3.5rem); white-space: nowrap;
  padding-block: var(--space-5); width: max-content;
  animation: ticker-scroll 42s linear infinite;
}
.ticker:hover .ticker-track, .ticker-track:focus-within { animation-play-state: paused; }
.ticker-item {
  font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: 0.04em; color: var(--fg2);
  display: inline-flex; align-items: center; gap: 0.65rem;
}
.ticker-item b { color: var(--fg); font-weight: 600; }
.ticker-item .tdot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; overflow-x: auto; }
}

/* ==========================================================================
   Cursor-reactive glow — subtle pointer-following highlight on hero/section art
   ========================================================================== */
.glow-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cursor-glow {
  position: absolute; width: 26rem; height: 26rem; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(127, 196, 232, 0.16), transparent 70%);
  transform: translate(-50%, -50%); left: var(--gx, 50%); top: var(--gy, 30%);
  transition: opacity 0.4s var(--ease); opacity: 0; will-change: left, top;
}
[data-theme='light'] .cursor-glow { background: radial-gradient(circle, rgba(46, 110, 147, 0.12), transparent 70%); }
.glow-active .cursor-glow { opacity: 1; }
@media (prefers-reduced-motion: reduce), (hover: none) {
  .cursor-glow { display: none; }
}

/* tilt/parallax on art panels following pointer (desktop only, respects reduced motion) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .art-panel img { transition: transform 0.6s var(--ease); }
}


/* ==========================================================================
   MSG Assistant — curated, rule-based chat widget (no live AI billing)
   The widget is appended directly to <body>, outside any .on-dark/.on-light
   section wrapper, so it must carry its own theme-scoped variable values —
   it cannot rely on inheriting --bg/--fg/--accent/etc. from a parent section.
   Without this block every var() below resolves to nothing, which is why the
   widget previously rendered with a transparent background and unreadable
   text against both black and white page backgrounds.
   ========================================================================== */
.msg-assist {
  --bg: #0A0A0A; --panel: #121416; --panel-2: #17191c;
  --fg: #FFFFFF; --fg2: #8A8D91; --fg3: #6E7278;
  --line: rgba(255, 255, 255, 0.13); --line-strong: rgba(255, 255, 255, 0.26);
  --accent: #7FC4E8; --accent-ink: #0A0A0A; --btn-fg: #0A0A0A;
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 500; font-family: var(--font-body);
}
[data-theme='light'] .msg-assist {
  --bg: #FFFFFF; --panel: #F3F4F5; --panel-2: #EBEDEE;
  --fg: #0A0A0A; --fg2: #5C6066; --fg3: #6E7278;
  --line: rgba(10, 10, 10, 0.14); --line-strong: rgba(10, 10, 10, 0.3);
  --accent: #2E6E93; --accent-ink: #FFFFFF; --btn-fg: #FFFFFF;
}
.msg-assist-fab {
  display: flex; align-items: center; gap: 0.6rem; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  padding: 0.85rem 1.2rem 0.85rem 0.85rem; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); position: relative;
}
.msg-assist-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,0.45); }
.msg-assist-fab .dot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent-ink); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none; position: relative;
}
.msg-assist-fab .dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent-ink);
  opacity: 0.5; animation: msg-pulse 2.4s var(--ease) infinite;
}
@keyframes msg-pulse { 0% { transform: scale(0.85); opacity: 0.6; } 70% { transform: scale(1.35); opacity: 0; } 100% { opacity: 0; } }
.msg-assist[data-open='true'] .msg-assist-fab { display: none; }
.msg-assist-panel {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(5.5rem, 10vw, 6.5rem);
  width: min(23rem, calc(100vw - 2rem)); max-height: min(34rem, calc(100vh - 8rem));
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 4px; box-shadow: 0 24px 60px rgba(0,0,0,0.45); overflow: hidden;
  opacity: 0; transform: translateY(12px) scale(0.98); pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.msg-assist[data-open='true'] .msg-assist-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.msg-assist-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.9rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); color: var(--fg);
}
.msg-assist-head .who { display: flex; align-items: center; gap: 0.6rem; }
.msg-assist-head .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; flex: none; }
.msg-assist-head .title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm); }
.msg-assist-head .sub { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.msg-assist-close { background: none; border: 0; color: var(--fg2); cursor: pointer; padding: 0.3rem; line-height: 0; }
.msg-assist-close:hover { color: var(--fg); }
.msg-assist-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.65rem; background: var(--panel); }
.msg-bubble { max-width: 88%; padding: 0.6rem 0.8rem; border-radius: 3px; font-size: var(--text-sm); line-height: 1.45; }
.msg-bubble.bot { align-self: flex-start; background: var(--panel-2); color: var(--fg); border: 1px solid var(--line); }
.msg-bubble.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.msg-bubble a { color: inherit; text-decoration: underline; }
.msg-bubble ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.msg-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.8rem; background: var(--panel); }
.msg-chip {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--line-strong); background: transparent; color: var(--fg2); border-radius: 999px;
  padding: 0.4rem 0.7rem; cursor: pointer; transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.msg-chip:hover { border-color: var(--accent); color: var(--accent); }
.msg-assist-input { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--line); background: var(--bg); }
.msg-assist-input input {
  flex: 1; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 3px; color: var(--fg);
  padding: 0.6rem 0.75rem; font-family: var(--font-body); font-size: var(--text-sm);
}
.msg-assist-input input:focus { outline: none; border-color: var(--accent); }
.msg-assist-input button {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 3px; padding: 0 0.9rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.msg-assist-foot { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em; color: var(--fg3); padding: 0.5rem 1rem 0.7rem; background: var(--bg); text-align: center; }
@media (max-width: 480px) {
  .msg-assist-panel { right: 0.6rem; left: 0.6rem; width: auto; bottom: 4.6rem; max-height: min(30rem, calc(100vh - 7rem)); }
  .msg-assist { right: 0.6rem; bottom: 0.9rem; }
  .msg-assist-fab { padding: 0.7rem; border-radius: 50%; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
  .msg-assist-fab span:not(.dot) { display: none; }
  .msg-assist-fab .dot { width: 30px; height: 30px; }
}
