/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN HQ (A11) — Founder's morgen-coffee dashboard
   prefix: .ahq-*
   Aesthetic: Editorial Mission Control × CEO journal · bolder typography
              than A1-A10 family · single tasteful coffee-cup detail.

   Inheritance:
     - Tokens via tokens.css (no hardcoded hex outside terminal-card recipes)
     - LOCK-001 admin sidebar (canonical markup copied into mockup head)
     - LOCK-002 popover (.user-dd-menu via components.css §20)
     - LOCK-003 theme: [data-theme="light"|"dark"] from localStorage

   Aesthetic North-Star:
     "Bloomberg terminal sitting on a Kinfolk magazine, on Alexander's desk,
      with a single mug-stain on the corner."
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Editorial display font (lazy-loaded per-page · NOT promoted to tokens.css). */
  --ahq-editorial: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Subtle grid texture for the editorial floor. */
  --ahq-grid-tone:  rgba(14, 14, 12, 0.045);
  --ahq-paper-tone: rgba(255, 245, 230, 0.45);   /* warm tea-stain wash */

  /* Founder-grade canonical status palette (matches A9). */
  --ahq-operational:     #2E9959;
  --ahq-degraded:        #C77A1D;
  --ahq-outage:          #D03B1A;
  --ahq-unknown:         #8B8B86;

  --ahq-operational-bg:  rgba(46, 153, 89, 0.07);
  --ahq-degraded-bg:     rgba(199, 122, 29, 0.08);
  --ahq-outage-bg:       rgba(208, 59, 26, 0.08);

  --ahq-operational-border: rgba(46, 153, 89, 0.32);
  --ahq-degraded-border:    rgba(199, 122, 29, 0.36);
  --ahq-outage-border:      rgba(208, 59, 26, 0.36);

  /* Hairline orange wash for hero coffee-stain & accents. */
  --ahq-orange-wash: rgba(255, 80, 0, 0.06);

  /* Brief-quote subdued ink. */
  --ahq-quote-bg:   rgba(255, 245, 230, 0.55);
  --ahq-quote-rule: rgba(255, 80, 0, 0.55);
}

:root[data-theme="dark"] {
  --ahq-grid-tone:  rgba(250, 250, 247, 0.045);
  --ahq-paper-tone: rgba(255, 220, 180, 0.04);

  --ahq-operational:     #6BB342;
  --ahq-degraded:        #D89952;
  --ahq-outage:          #E55A3A;
  --ahq-unknown:         #A8A8A2;

  --ahq-operational-bg:  rgba(107, 179, 66, 0.10);
  --ahq-degraded-bg:     rgba(216, 153, 82, 0.10);
  --ahq-outage-bg:       rgba(229, 90, 58, 0.10);

  --ahq-operational-border: rgba(107, 179, 66, 0.36);
  --ahq-degraded-border:    rgba(216, 153, 82, 0.40);
  --ahq-outage-border:      rgba(229, 90, 58, 0.40);

  --ahq-orange-wash: rgba(255, 110, 40, 0.08);
  --ahq-quote-bg:    rgba(255, 200, 140, 0.04);
  --ahq-quote-rule:  rgba(255, 110, 40, 0.55);
}

/* ─── Page scaffold ─────────────────────────────────────────────────────── */
.ahq-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ahq-content {
  padding: var(--sp-6) var(--sp-8) var(--sp-16);
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  background-image:
    linear-gradient(var(--ahq-grid-tone) 1px, transparent 1px),
    linear-gradient(90deg, var(--ahq-grid-tone) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

/* ─── Topbar (lean — admin doesn't use full topbar.html) ────────────────── */
.ahq-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-8);
  background: var(--surface);
  border-bottom: var(--rule-w) solid var(--rule);
  min-height: var(--topbar-h);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}
.ahq-breadcrumb {
  font: 500 var(--t-micro)/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.ahq-breadcrumb-sep     { color: var(--ink-ghost); }
.ahq-breadcrumb-current { color: var(--ink); }
.ahq-topbar-meta {
  font: 500 10px/1 var(--font-mono);
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.ahq-topbar-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ahq-operational);
  box-shadow: 0 0 0 0 var(--ahq-operational);
  animation: ahq-live-pulse 2.4s var(--ease-out) infinite;
}
@keyframes ahq-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46, 153, 89, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(46, 153, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 153, 89, 0); }
}

/* ═══════════════════════════════════════════════
   1. HERO — "Goddag, Alexander" · coffee-cup detail
   ═══════════════════════════════════════════════ */
.ahq-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--sp-8);
  padding: var(--sp-10) 0 var(--sp-8);
  border-bottom: var(--rule-w) solid var(--rule);
  margin-bottom: var(--sp-8);
  overflow: hidden;
}

/* Subtle radial "coffee-stain" in the top-right — tasteful, not gimmicky. */
.ahq-hero::before {
  content: "";
  position: absolute;
  top: -40px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--ahq-orange-wash) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.ahq-hero-left  { position: relative; z-index: 1; }
.ahq-hero-right { position: relative; z-index: 1; }

.ahq-hero-eyebrow {
  font: 700 var(--t-micro)/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: var(--sp-4);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.ahq-hero-eyebrow-line {
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--orange);
}

.ahq-hero-h1 {
  font-family: var(--ahq-editorial);
  font-size: clamp(3.5rem, 8vw, 7.5rem);   /* BOLDER than A10 · ~120-128px desktop */
  font-style: italic;
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: var(--sp-5);
}
.ahq-hero-h1 em {
  font-style: italic;
  font-weight: 700;
  color: var(--orange);
}

.ahq-hero-greeting {
  font: 400 1.25rem/1.35 var(--font-sans);
  color: var(--ink);
  margin-bottom: var(--sp-2);
  letter-spacing: -0.01em;
}
.ahq-hero-greeting .ahq-coffee {
  /* Single tasteful coffee-cup — subtle, not cartoony. */
  display: inline-block;
  font-size: 0.9em;
  opacity: 0.85;
  transform: translateY(-1px);
  margin-left: 2px;
  filter: saturate(0.85);
}
.ahq-hero-sub {
  font: 400 var(--t-small)/1.5 var(--font-sans);
  color: var(--ink-soft);
  max-width: 52ch;
}

.ahq-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-3);
  text-align: right;
}

.ahq-hero-date {
  font: 500 var(--t-small)/1.4 var(--font-mono);
  color: var(--ink-soft);
  letter-spacing: var(--ls-tight);
}
.ahq-hero-date strong { color: var(--ink); font-weight: 700; }

.ahq-hero-live {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px var(--sp-3);
  background: var(--ahq-operational-bg);
  border: 1px solid var(--ahq-operational-border);
  border-radius: var(--r-full);
  font: 700 var(--t-micro)/1 var(--font-mono);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ahq-operational);
}
.ahq-hero-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ahq-operational);
  box-shadow: 0 0 0 0 rgba(46, 153, 89, 0.6);
  animation: ahq-heart-pulse 1.7s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes ahq-heart-pulse {
  0%, 30%, 100% { box-shadow: 0 0 0 0 rgba(46, 153, 89, 0.55); transform: scale(1); }
  15%           { box-shadow: 0 0 0 6px rgba(46, 153, 89, 0); transform: scale(1.12); }
}

.ahq-hero-refresh {
  font: 400 var(--t-micro)/1 var(--font-mono);
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ═══════════════════════════════════════════════
   2. CEO-BRIEF executive-summary card  ★ NEW PATTERN
   ═══════════════════════════════════════════════ */
.ahq-brief {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-8);
  align-items: center;
  padding: var(--sp-7) var(--sp-8);
  margin-bottom: var(--sp-10);
  background:
    linear-gradient(135deg, var(--ahq-quote-bg) 0%, var(--surface) 70%),
    var(--surface);
  border: var(--rule-w) solid var(--rule);
  border-left: 4px solid var(--orange);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: ahq-fade-in 0.5s var(--ease-out) 0.08s forwards;
}

.ahq-brief-head {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.ahq-brief-stamp {
  font: 600 var(--t-micro)/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--orange);
}
.ahq-brief-stamp-sep { color: var(--ink-ghost); font-family: var(--font-mono); }
.ahq-brief-source {
  font: 400 var(--t-micro)/1 var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.ahq-brief-quote {
  font-family: var(--ahq-editorial);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 68ch;
}
.ahq-brief-quote .ahq-brief-q-mark {
  font-family: var(--ahq-editorial);
  font-style: italic;
  font-weight: 900;
  font-size: 2.5em;
  line-height: 0;
  color: var(--orange);
  vertical-align: -0.35em;
  margin-right: 0.05em;
  opacity: 0.72;
}
.ahq-brief-quote strong {
  font-style: normal;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.92em;
  color: var(--ink);
  padding: 1px 4px;
  background: var(--surface-alt);
  border-radius: 3px;
}

.ahq-brief-footer {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: var(--sp-2);
  text-align: right;
}
.ahq-brief-next-label {
  font: 600 var(--t-micro)/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.ahq-brief-next-value {
  font: 700 1.25rem/1 var(--font-mono);
  color: var(--ink);
  letter-spacing: var(--ls-tight);
  font-variant-numeric: tabular-nums;
}
.ahq-brief-next-rel {
  font: 500 var(--t-small)/1 var(--font-mono);
  color: var(--ink-soft);
}
.ahq-brief-next-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
  font: 600 var(--t-micro)/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--orange);
  cursor: pointer;
  transition: gap var(--dur-fast) var(--ease-out);
}
.ahq-brief-next-arrow:hover { gap: var(--sp-3); }

/* ═══════════════════════════════════════════════
   3. BIG-4 hero-KPIs  ★ NEW PATTERN
   ═══════════════════════════════════════════════ */
.ahq-big4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-10);
}

.ahq-big4-card {
  position: relative;
  display: flex; flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  background: var(--surface);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  opacity: 0;
  animation: ahq-fade-in 0.5s var(--ease-out) forwards;
  transition: transform var(--dur-base) var(--ease-spring),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  cursor: default;
}
.ahq-big4-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink-soft);
}
.ahq-big4-card:nth-child(1) { animation-delay: 0.12s; }
.ahq-big4-card:nth-child(2) { animation-delay: 0.18s; }
.ahq-big4-card:nth-child(3) { animation-delay: 0.24s; }
.ahq-big4-card:nth-child(4) { animation-delay: 0.30s; }

.ahq-big4-card--accent { border-color: var(--orange); }
.ahq-big4-card--accent::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--orange);
}
.ahq-big4-card--warn { border-color: var(--ahq-degraded-border); }
.ahq-big4-card--warn::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ahq-degraded);
}

.ahq-big4-eyebrow {
  font: 700 10px/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.ahq-big4-eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-ghost);
}
.ahq-big4-card--accent .ahq-big4-eyebrow { color: var(--orange); }
.ahq-big4-card--accent .ahq-big4-eyebrow-dot { background: var(--orange); }
.ahq-big4-card--warn .ahq-big4-eyebrow { color: var(--ahq-degraded); }
.ahq-big4-card--warn .ahq-big4-eyebrow-dot { background: var(--ahq-degraded); }
.ahq-big4-card--ok .ahq-big4-eyebrow { color: var(--ahq-operational); }
.ahq-big4-card--ok .ahq-big4-eyebrow-dot { background: var(--ahq-operational); }

.ahq-big4-value {
  font-family: var(--ahq-editorial);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.75rem, 4.2vw, 4rem);   /* ~56-64px scanning */
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ahq-big4-card--accent .ahq-big4-value { color: var(--orange); }
.ahq-big4-card--ok     .ahq-big4-value { color: var(--ahq-operational); }
.ahq-big4-card--warn   .ahq-big4-value { color: var(--ahq-degraded); }

.ahq-big4-unit {
  font-family: var(--font-mono);
  font-size: 0.32em;
  font-style: normal;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0;
  align-self: flex-end;
  padding-bottom: 0.55em;
}

.ahq-big4-trend {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font: 600 var(--t-small)/1 var(--font-mono);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.ahq-big4-trend--up   { color: var(--ahq-operational); }
.ahq-big4-trend--flat { color: var(--ink-faint); }
.ahq-big4-trend--down { color: var(--ahq-outage); }
.ahq-big4-trend-arrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

/* Sparkline-mini · 8 bars in last week */
.ahq-spark {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--rule-faint);
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
}
.ahq-spark-bar {
  flex: 1;
  background: var(--ink-soft);
  opacity: 0.32;
  border-radius: 1px;
  min-height: 2px;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.ahq-big4-card:hover .ahq-spark-bar { opacity: 0.55; }
.ahq-big4-card--accent .ahq-spark-bar { background: var(--orange); }
.ahq-big4-card--ok     .ahq-spark-bar { background: var(--ahq-operational); }
.ahq-big4-card--warn   .ahq-spark-bar { background: var(--ahq-degraded); }
.ahq-spark-bar--peak { opacity: 0.85; }

/* ═══════════════════════════════════════════════
   4. 2-col layout (60% LEFT / 40% RIGHT)
   ═══════════════════════════════════════════════ */
.ahq-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-10);
  align-items: start;
}

.ahq-col-left  { display: flex; flex-direction: column; gap: var(--sp-6); }
.ahq-col-right { display: flex; flex-direction: column; gap: var(--sp-6); }

/* ─── Card primitive ────────────────────────────────────────────────────── */
.ahq-card {
  background: var(--surface);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  opacity: 0;
  animation: ahq-fade-in 0.5s var(--ease-out) forwards;
}
.ahq-card:nth-child(1) { animation-delay: 0.34s; }
.ahq-card:nth-child(2) { animation-delay: 0.40s; }
.ahq-card:nth-child(3) { animation-delay: 0.46s; }
.ahq-card:nth-child(4) { animation-delay: 0.52s; }

.ahq-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6) var(--sp-4);
  border-bottom: 1px solid var(--rule-faint);
}
.ahq-card-eyebrow {
  font: 700 var(--t-micro)/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.ahq-card-title {
  font-family: var(--ahq-editorial);
  font-weight: 500;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.ahq-card-title em {
  font-style: italic;
  font-weight: 700;
  color: var(--orange);
}
.ahq-card-meta {
  font: 500 var(--t-micro)/1.3 var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.ahq-card-body  { padding: var(--sp-5) var(--sp-6) var(--sp-6); }
.ahq-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-6);
  border-top: 1px solid var(--rule-faint);
  background: var(--surface-alt);
  font: 500 var(--t-small)/1 var(--font-mono);
  color: var(--ink-soft);
}
.ahq-card-footer-link {
  color: var(--orange);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  font-size: var(--t-micro);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  transition: gap var(--dur-fast) var(--ease-out);
}
.ahq-card-footer-link:hover { gap: var(--sp-3); }

/* ─── Business metrics — 6-row mini-list ────────────────────────────────── */
.ahq-bm-list {
  display: flex; flex-direction: column;
}
.ahq-bm-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--sp-4);
  align-items: baseline;
  padding: var(--sp-4) 0;
  border-bottom: 1px dashed var(--rule-faint);
}
.ahq-bm-row:last-child { border-bottom: none; }
.ahq-bm-row:first-child { padding-top: 0; }

.ahq-bm-label {
  font: 500 var(--t-small)/1.4 var(--font-sans);
  color: var(--ink-soft);
}
.ahq-bm-label-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  color: var(--ink-faint);
  margin-right: 6px;
  vertical-align: -3px;
}
.ahq-bm-label-icon svg { width: 14px; height: 14px; }

.ahq-bm-value {
  font: 700 1.05rem/1 var(--font-mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--ls-tight);
}
.ahq-bm-value--accent { color: var(--orange); }
.ahq-bm-value--warn   { color: var(--ahq-degraded); }
.ahq-bm-value--good   { color: var(--ahq-operational); }
.ahq-bm-value-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 500;
  margin-left: 3px;
}
.ahq-bm-trend {
  font: 500 var(--t-micro)/1 var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  min-width: 64px;
  text-align: right;
}
.ahq-bm-trend--up   { color: var(--ahq-operational); }
.ahq-bm-trend--down { color: var(--ahq-outage); }

/* ─── 30-day Revenue chart (SVG · adapted from A8 AUDActivityChart) ────── */
.ahq-chart {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 240;
}
.ahq-chart svg { width: 100%; height: 100%; }

.ahq-chart-grid line {
  stroke: var(--rule-faint);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.7;
}
.ahq-chart-axis-label {
  font: 500 9px var(--font-mono);
  fill: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ahq-chart-x-label {
  font: 500 10px var(--font-mono);
  fill: var(--ink-faint);
}
.ahq-chart-threshold {
  stroke: var(--orange);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  opacity: 0.6;
}

/* Revenue area (warm orange fill) */
.ahq-chart-revenue-area {
  fill: url(#ahqRevGrad);
  opacity: 0.7;
}
.ahq-chart-revenue-line {
  stroke: var(--orange);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* New-customers line (subdued ink) */
.ahq-chart-customers-line {
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-dasharray: 3 3;
  fill: none;
  stroke-linecap: round;
}
.ahq-chart-customers-dot {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 2;
}

.ahq-chart-callout {
  fill: var(--surface);
  stroke: var(--orange);
  stroke-width: 1;
  opacity: 0.95;
}
.ahq-chart-callout-text {
  font: 600 10px var(--font-mono);
  fill: var(--ink);
}
.ahq-chart-callout-text--accent { fill: var(--orange); }

.ahq-chart-legend {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-5);
  font: 500 var(--t-micro)/1 var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.ahq-chart-legend-swatch {
  display: inline-block;
  width: 14px; height: 4px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.ahq-chart-legend-swatch--rev { background: var(--orange); }
.ahq-chart-legend-swatch--cust {
  background: transparent;
  border-top: 2px dashed var(--ink);
  height: 0;
  margin-bottom: 2px;
}

/* ─── Operations — 5-row compact list ───────────────────────────────────── */
.ahq-ops-list {
  display: flex; flex-direction: column;
}
.ahq-ops-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4) 0;
  border-bottom: 1px dashed var(--rule-faint);
}
.ahq-ops-row:last-child { border-bottom: none; }
.ahq-ops-row:first-child { padding-top: 0; }

.ahq-ops-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ahq-operational);
  justify-self: center;
}
.ahq-ops-dot--warn  { background: var(--ahq-degraded); }
.ahq-ops-dot--mute  { background: var(--ink-ghost); }
.ahq-ops-label {
  font: 500 var(--t-small)/1.4 var(--font-sans);
  color: var(--ink);
}
.ahq-ops-label small {
  font: 400 var(--t-micro)/1.2 var(--font-mono);
  color: var(--ink-faint);
  margin-left: var(--sp-2);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.ahq-ops-value {
  font: 700 1rem/1 var(--font-mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--ls-tight);
}
.ahq-ops-value--good  { color: var(--ahq-operational); }
.ahq-ops-value--warn  { color: var(--ahq-degraded); }
.ahq-ops-value--bad   { color: var(--ahq-outage); }
.ahq-ops-value-sub {
  font: 400 var(--t-micro)/1 var(--font-mono);
  color: var(--ink-faint);
  margin-left: var(--sp-2);
  letter-spacing: 0;
}

/* ═══════════════════════════════════════════════
   5. RIGHT COL — System health pulse (compact A9)
   ═══════════════════════════════════════════════ */
.ahq-pulse-card .ahq-card-body {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-6);
}
.ahq-pulse-wrap {
  position: relative;
  width: 152px; height: 152px;
  display: flex; align-items: center; justify-content: center;
}
.ahq-pulse-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--ahq-degraded);
  opacity: 0.35;
  animation: ahq-ring-pulse 2.8s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  pointer-events: none;
}
.ahq-pulse-ring--2 { animation-delay: 0.9s; }
.ahq-pulse-ring--3 { animation-delay: 1.8s; }
@keyframes ahq-ring-pulse {
  0%   { transform: scale(0.62); opacity: 0.55; }
  80%  { transform: scale(1.10); opacity: 0;    }
  100% { transform: scale(1.10); opacity: 0;    }
}
.ahq-pulse-core {
  position: relative;
  width: 108px; height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), var(--ahq-degraded-bg) 70%);
  border: 2.5px solid var(--ahq-degraded);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  box-shadow: 0 0 0 6px var(--ahq-degraded-bg);
  z-index: 1;
}
:root[data-theme="dark"] .ahq-pulse-core {
  background: radial-gradient(circle at 30% 30%, rgba(216, 153, 82, 0.15), var(--ahq-degraded-bg) 70%);
}
.ahq-pulse-score {
  font-family: var(--ahq-editorial);
  font-style: italic; font-weight: 500;
  font-size: 44px; line-height: 0.9;
  color: var(--ahq-degraded);
  letter-spacing: -0.04em;
}
.ahq-pulse-unit {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ahq-degraded);
  text-transform: uppercase; letter-spacing: var(--ls-caps);
  margin-top: 2px;
  font-weight: 600;
  opacity: 0.78;
}
.ahq-pulse-caption {
  font-family: var(--ahq-editorial);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.005em;
}
.ahq-pulse-caption em { color: var(--ahq-degraded); font-weight: 600; }
.ahq-pulse-legend {
  display: inline-flex; align-items: center; gap: var(--sp-4);
  font: 500 9px/1 var(--font-mono);
  color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: var(--ls-caps);
}
.ahq-pulse-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.ahq-pulse-legend-swatch { width: 8px; height: 8px; border-radius: 50%; }
.ahq-pulse-legend-swatch--op  { background: var(--ahq-operational); }
.ahq-pulse-legend-swatch--deg { background: var(--ahq-degraded); }
.ahq-pulse-legend-swatch--out { background: var(--ahq-outage); }

/* Mini service-counts strip */
.ahq-pulse-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: 100%;
  margin-top: var(--sp-2);
  background: var(--rule-faint);
  border: 1px solid var(--rule-faint);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ahq-pulse-count-cell {
  background: var(--surface);
  padding: var(--sp-3) var(--sp-2);
  text-align: center;
}
.ahq-pulse-count-num {
  font: 700 1.25rem/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}
.ahq-pulse-count-cell--op .ahq-pulse-count-num   { color: var(--ahq-operational); }
.ahq-pulse-count-cell--deg .ahq-pulse-count-num  { color: var(--ahq-degraded); }
.ahq-pulse-count-cell--out .ahq-pulse-count-num  { color: var(--ahq-outage); }
.ahq-pulse-count-label {
  font: 600 9px/1 var(--font-mono);
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
}

/* ─── Active incidents — service rows ───────────────────────────────────── */
.ahq-incident-list { display: flex; flex-direction: column; }
.ahq-incident-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-4) 0;
  border-bottom: 1px dashed var(--rule-faint);
}
.ahq-incident-row:last-child  { border-bottom: none; }
.ahq-incident-row:first-child { padding-top: 0; }
.ahq-incident-meta {
  display: flex; flex-direction: column; gap: 4px;
}
.ahq-incident-name {
  font: 600 var(--t-body)/1.2 var(--font-sans);
  color: var(--ink);
}
.ahq-incident-detail {
  font: 400 var(--t-micro)/1.3 var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: var(--ls-wide);
}
.ahq-incident-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  font: 700 9px/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  border-radius: var(--r-full);
  border: 1px solid;
}
.ahq-incident-pill--warn {
  color: var(--ahq-degraded);
  background: var(--ahq-degraded-bg);
  border-color: var(--ahq-degraded-border);
}
.ahq-incident-pill--out {
  color: var(--ahq-outage);
  background: var(--ahq-outage-bg);
  border-color: var(--ahq-outage-border);
}
.ahq-incident-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* Empty-state */
.ahq-empty {
  padding: var(--sp-6) 0 var(--sp-4);
  text-align: center;
}
.ahq-empty-icon {
  font-family: var(--ahq-editorial);
  font-style: italic;
  font-size: 2.5rem;
  color: var(--ahq-operational);
  line-height: 1;
  margin-bottom: var(--sp-3);
  opacity: 0.5;
}
.ahq-empty-text {
  font: 500 var(--t-small)/1.4 var(--font-sans);
  color: var(--ink-soft);
}

/* ─── Upcoming events list ──────────────────────────────────────────────── */
.ahq-events { display: flex; flex-direction: column; }
.ahq-event-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-4) 0;
  border-bottom: 1px dashed var(--rule-faint);
}
.ahq-event-row:last-child  { border-bottom: none; }
.ahq-event-row:first-child { padding-top: 0; }
.ahq-event-row.is-today {
  margin-left: -8px; margin-right: -8px;
  padding-left: 8px; padding-right: 8px;
  background: var(--ahq-orange-wash);
  border-radius: var(--r-md);
  border-bottom-color: transparent;
}
.ahq-event-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  font-size: 16px;
  background: var(--surface-alt);
  border-radius: var(--r-md);
}
.ahq-event-row.is-today .ahq-event-icon {
  background: var(--orange);
  color: var(--surface);
}
.ahq-event-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ahq-event-title {
  font: 600 var(--t-small)/1.3 var(--font-sans);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ahq-event-detail {
  font: 400 var(--t-micro)/1.2 var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.ahq-event-when {
  font: 600 var(--t-micro)/1 var(--font-mono);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--ls-tight);
  text-align: right;
  white-space: nowrap;
}
.ahq-event-when--today {
  color: var(--orange);
}
.ahq-event-today-pill {
  display: inline-block;
  padding: 1px 6px;
  background: var(--orange);
  color: var(--surface);
  font: 700 9px/1.4 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  border-radius: 3px;
  margin-left: var(--sp-2);
  vertical-align: 1px;
}

/* ─── ToDo list (NEW pattern: severity-pill + deadline-relative) ─────────── */
.ahq-todos { display: flex; flex-direction: column; }
.ahq-todo-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-4) 0;
  border-bottom: 1px dashed var(--rule-faint);
}
.ahq-todo-row:last-child  { border-bottom: none; }
.ahq-todo-row:first-child { padding-top: 0; }

.ahq-todo-pill {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  font: 700 9px/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  border-radius: var(--r-sm);
  border: 1px solid;
  min-width: 56px;
  justify-content: center;
}
.ahq-todo-pill--kritisk {
  color: var(--ahq-outage);
  background: var(--ahq-outage-bg);
  border-color: var(--ahq-outage-border);
}
.ahq-todo-pill--hoj {
  color: var(--ahq-degraded);
  background: var(--ahq-degraded-bg);
  border-color: var(--ahq-degraded-border);
}
.ahq-todo-pill--medium {
  color: var(--info);
  background: var(--info-tint);
  border-color: var(--info-border);
}
.ahq-todo-pill--lav {
  color: var(--ink-faint);
  background: var(--surface-alt);
  border-color: var(--rule-mid);
}

.ahq-todo-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ahq-todo-title {
  font: 600 var(--t-small)/1.35 var(--font-sans);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ahq-todo-id {
  font: 500 var(--t-micro)/1 var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: var(--ls-wide);
}
.ahq-todo-when {
  font: 700 var(--t-micro)/1 var(--font-mono);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}
.ahq-todo-when--urgent { color: var(--ahq-outage); }
.ahq-todo-when--soon   { color: var(--ahq-degraded); }

/* ═══════════════════════════════════════════════
   6. CROSS-LINK footer row · 6 cards
   ═══════════════════════════════════════════════ */
.ahq-cross {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}
.ahq-cross-card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--surface);
  border: var(--rule-w) solid var(--rule-mid);
  border-radius: var(--r-md);
  transition: all var(--dur-base) var(--ease-out);
  text-decoration: none;
}
.ahq-cross-card:hover {
  border-color: var(--ink);
  background: var(--surface-alt);
  transform: translateY(-1px);
}
.ahq-cross-title {
  font: 600 var(--t-body)/1.2 var(--font-sans);
  color: var(--ink);
  display: flex; align-items: center; gap: var(--sp-2);
}
.ahq-cross-desc {
  font: 400 var(--t-micro)/1.4 var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.ahq-cross-arrow {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-ghost);
  transition: color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.ahq-cross-card:hover .ahq-cross-arrow {
  color: var(--orange);
  transform: translateX(2px);
}

/* ═══════════════════════════════════════════════
   7. ANIMATIONS
   ═══════════════════════════════════════════════ */
@keyframes ahq-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ahq-brief, .ahq-big4-card, .ahq-card {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .ahq-pulse-ring,
  .ahq-topbar-pulse,
  .ahq-hero-live-dot { animation: none !important; }
}

/* ═══════════════════════════════════════════════
   8. SIDEBAR — Admin-distinction overrides (re-used from A1-A10)
   ═══════════════════════════════════════════════ */
.sidebar.sidebar--admin {
  background: linear-gradient(180deg, rgba(255,80,0,0.025) 0%, transparent 18%), var(--surface);
  border-right: var(--rule-w-emph) solid var(--rule);
}
.brand-admin-tag {
  display: inline-block; margin-left: var(--sp-2);
  padding: 2px 6px 1px;
  font: 600 9px/1 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--surface);
  background: var(--orange);
  border-radius: var(--r-sm);
  vertical-align: middle;
}
.sidebar-tenant-section--admin {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: var(--rule-w) solid var(--rule-faint);
}
.ao-admin-role-label {
  font: 600 var(--t-micro)/1.4 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--orange);
  display: flex; align-items: center; gap: var(--sp-2);
}
.ao-admin-role-label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 0 4px rgba(255,80,0,0.18);
}
.sidebar-avatar--admin { background: var(--ink); color: var(--bg); }
.nav-item.is-pending { opacity: 0.45; cursor: default; }
.nav-item.is-pending:hover { background: transparent; opacity: 0.55; }
.nav-item.is-pending .nav-soon-mini {
  margin-left: auto; font: 400 10px/1 var(--font-mono);
  color: var(--ink-faint); font-style: italic;
}
.nav-section {
  padding: var(--sp-4) var(--sp-5) var(--sp-1);
  font: 600 9px/1 var(--font-mono);
  text-transform: uppercase; letter-spacing: var(--ls-caps);
  color: var(--ink-ghost);
}
.sidebar-footer { position: relative; }
.user-dd-menu {
  position: absolute; bottom: calc(100% + 4px);
  left: var(--sp-3); right: var(--sp-3);
  min-width: 0;
}
.sidebar-user {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; padding: 8px var(--sp-3);
  background: transparent; border: 1px solid var(--rule-faint);
  border-radius: var(--r-md); cursor: pointer; text-align: left;
  transition: all var(--dur-fast) var(--ease-out);
}
.sidebar-user:hover { border-color: var(--rule-mid); background: var(--surface-alt); }
.sidebar-user-chevron {
  margin-left: auto; width: 14px; height: 14px; color: var(--ink-faint);
}
.sidebar-logout-btn {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  width: 100%; margin-top: var(--sp-2);
  padding: 8px var(--sp-3);
  font: 600 var(--t-small)/1 var(--font-sans);
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--rule-faint);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.sidebar-logout-btn svg { width: 14px; height: 14px; }
.sidebar-logout-btn:hover {
  color: var(--orange);
  background: var(--orange-tint);
  border-color: var(--orange-tint-md);
}
.sidebar-logout { display: none; }

/* ═══════════════════════════════════════════════
   9. RESPONSIVE — narrower viewports
   ═══════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .ahq-big4 { grid-template-columns: repeat(2, 1fr); }
  .ahq-cross { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .ahq-grid { grid-template-columns: 1fr; }
  .ahq-brief {
    grid-template-columns: 1fr;
  }
  .ahq-brief-footer { align-items: flex-start; text-align: left; }
}

/* ═══════════════════════════════════════════════
   10. DARK-MODE supplementary tweaks
   ═══════════════════════════════════════════════ */
:root[data-theme="dark"] .ahq-brief {
  background:
    linear-gradient(135deg, var(--ahq-quote-bg) 0%, var(--surface) 70%),
    var(--surface);
}
:root[data-theme="dark"] .ahq-big4-card:hover { border-color: var(--ink-soft); }
:root[data-theme="dark"] .ahq-chart-callout { fill: var(--surface-raised); }
:root[data-theme="dark"] .ahq-event-row.is-today .ahq-event-icon {
  background: var(--orange);
  color: #0E0E0C;
}
:root[data-theme="dark"] .ahq-cross-card { border-color: var(--rule-mid); }
:root[data-theme="dark"] .ahq-cross-card:hover {
  border-color: var(--ink-soft);
  background: var(--surface-raised);
}

/* ════════════════════════════════════════════════════════════════════════════
   L1 · AHQAgentChatPanel — embedded agent-chat (Dashboard mode right-col)
   skill-baked: frontend-design + polish + delight
════════════════════════════════════════════════════════════════════════════ */

.ahq-chat-card {
  display: flex;
  flex-direction: column;
}

.ahq-chat-card .ahq-card-head {
  align-items: center;
  gap: var(--sp-3, 12px);
}

.ahq-chat-card .ahq-card-title em {
  font-style: italic;
  color: var(--orange);
}

.ahq-agent-select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 24px !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ahq-agent-select:hover {
  background-color: var(--surface-raised, rgba(0, 0, 0, 0.02));
}

.ahq-agent-select:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.ahq-chat-body {
  border-top: none;
  background: var(--surface, #fff);
}

/* Override AIChatWindow shell-padding for compact embed */
.ahq-chat-body .aiw-shell {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  max-height: 400px;
  min-height: 280px;
}

.ahq-chat-body .aiw-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-3, 12px);
  scrollbar-width: thin;
}

.ahq-chat-body .aiw-input-wrap {
  border-top: 1px solid var(--rule);
  padding: var(--sp-3, 12px);
  background: var(--surface);
}

/* Dark-mode parity */
:root[data-theme="dark"] .ahq-chat-body { background: var(--surface, #1A1A1A); }
:root[data-theme="dark"] .ahq-agent-select {
  background-color: var(--surface, #1A1A1A);
  color: var(--ink);
}
:root[data-theme="dark"] .ahq-chat-body .aiw-input-wrap {
  background: var(--surface, #1A1A1A);
}

/* ════════════════════════════════════════════════════════════════════════════
   L2 · AHQBroadcastPanel — multi-agent parallel chat + synthesizer
   skill-baked: frontend-design + polish + delight (multi-perspective UX)
════════════════════════════════════════════════════════════════════════════ */

.ahq-broadcast-card {
  display: flex;
  flex-direction: column;
}

.ahq-broadcast-card .ahq-card-title em {
  font-style: italic;
  color: var(--orange);
}

.ahq-broadcast-chip {
  transition: all 0.12s ease;
}
.ahq-broadcast-chip:hover {
  transform: translateY(-1px);
}
.ahq-broadcast-chip:active {
  transform: scale(0.97);
}

.ahq-broadcast-input:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: var(--orange) !important;
}

.ahq-broadcast-send:not(:disabled):hover {
  filter: brightness(1.08);
}
.ahq-broadcast-send:not(:disabled):active {
  transform: scale(0.98);
}

/* Synthesis card: italic Fraunces · accent-bg · left-border (skill-baked editorial) */
.ahq-broadcast-synthesis {
  position: relative;
  animation: ahq-broadcast-synth-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes ahq-broadcast-synth-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Per-agent response · staggered fade-in */
.ahq-broadcast-response {
  animation: ahq-broadcast-resp-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: background 0.12s ease;
}
.ahq-broadcast-response:hover {
  background: var(--surface-raised, rgba(0,0,0,0.02)) !important;
}
@keyframes ahq-broadcast-resp-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Dark-mode parity */
:root[data-theme="dark"] .ahq-broadcast-input {
  background: var(--surface) !important;
}
:root[data-theme="dark"] .ahq-broadcast-synthesis {
  background: rgba(255, 80, 0, 0.10) !important;
}
:root[data-theme="dark"] .ahq-broadcast-response:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

@media (prefers-reduced-motion: reduce) {
  .ahq-broadcast-synthesis,
  .ahq-broadcast-response { animation: none !important; }
  .ahq-broadcast-chip:hover,
  .ahq-broadcast-send:hover { transform: none !important; }
}

/* ════════════════════════════════════════════════════════════════════════════
   L3 · AHQSkillExecutionPanel — skill-execution mod target_files
   skill-baked: frontend-design + polish + delight (developer-tool warmth)
════════════════════════════════════════════════════════════════════════════ */

.ahq-skill-card {
  display: flex;
  flex-direction: column;
}

.ahq-skill-card .ahq-card-title em {
  font-style: italic;
  color: var(--orange);
}

.ahq-skill-select,
.ahq-skill-files {
  transition: border-color 0.12s ease, background 0.12s ease;
}

.ahq-skill-select:hover,
.ahq-skill-files:hover {
  border-color: var(--ink-muted) !important;
}

.ahq-skill-select:focus,
.ahq-skill-files:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: var(--orange) !important;
}

/* Output animation · slide-in from below */
.ahq-skill-output {
  animation: ahq-skill-out-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes ahq-skill-out-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Run button · pulse-ring on hover when enabled */
.ahq-skill-card button[type="button"]:not(:disabled):hover {
  filter: brightness(1.08);
}
.ahq-skill-card button[type="button"]:not(:disabled):active {
  transform: scale(0.98);
}

/* Dark-mode parity */
:root[data-theme="dark"] .ahq-skill-select,
:root[data-theme="dark"] .ahq-skill-files {
  background: var(--surface) !important;
}
:root[data-theme="dark"] .ahq-skill-output pre {
  background: rgba(255, 255, 255, 0.03) !important;
}

@media (prefers-reduced-motion: reduce) {
  .ahq-skill-output { animation: none !important; }
  .ahq-skill-card button[type="button"]:hover,
  .ahq-skill-card button[type="button"]:active { transform: none !important; }
}

/* ════════════════════════════════════════════════════════════════════════════
   L4 · AHQAutonomousPanel — scheduler-jobs + review queue
   skill-baked: frontend-design + polish + delight (review-UX warmth)
════════════════════════════════════════════════════════════════════════════ */

.ahq-autonomous-card {
  display: flex;
  flex-direction: column;
}
.ahq-autonomous-card .ahq-card-title em {
  font-style: italic;
  color: var(--orange);
}

.ahq-autonomous-job-card {
  transition: border-color 0.12s ease, background 0.12s ease;
}
.ahq-autonomous-job-card:hover {
  border-color: var(--ink-muted) !important;
  background: var(--surface-raised, rgba(0,0,0,0.02)) !important;
}

.ahq-autonomous-queue-item {
  transition: border-color 0.12s ease, transform 0.12s ease;
  animation: ahq-autonomous-q-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ahq-autonomous-queue-item:hover {
  border-color: var(--ink-muted) !important;
}
@keyframes ahq-autonomous-q-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ahq-autonomous-action-btn {
  transition: background 0.12s ease, color 0.12s ease, transform 0.08s ease;
}
.ahq-autonomous-accept:hover {
  background: rgba(22, 163, 74, 0.10) !important;
}
.ahq-autonomous-defer:hover {
  background: var(--surface-raised, rgba(0,0,0,0.04)) !important;
  color: var(--ink) !important;
}
.ahq-autonomous-reject:hover {
  background: rgba(220, 38, 38, 0.10) !important;
}
.ahq-autonomous-action-btn:active {
  transform: scale(0.97);
}

/* Dark-mode parity */
:root[data-theme="dark"] .ahq-autonomous-job-card,
:root[data-theme="dark"] .ahq-autonomous-queue-item {
  background: var(--surface) !important;
}
:root[data-theme="dark"] .ahq-autonomous-job-card:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

@media (prefers-reduced-motion: reduce) {
  .ahq-autonomous-queue-item { animation: none !important; }
  .ahq-autonomous-action-btn:active { transform: none !important; }
}

/* ════════════════════════════════════════════════════════════════════════════
   A11 v2 closure · AHQSkillPassesPanel — 5-pass orchestrator
   skill-baked: frontend-design + polish + delight + taste-skill
════════════════════════════════════════════════════════════════════════════ */

.ahq-passes-card {
  display: flex;
  flex-direction: column;
}
.ahq-passes-card .ahq-card-title em {
  font-style: italic;
  color: var(--orange);
}

.ahq-pass-card {
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.08s ease;
  animation: ahq-pass-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ahq-pass-card:hover {
  border-color: var(--ink-muted) !important;
  background: var(--surface-raised, rgba(0,0,0,0.02)) !important;
}
@keyframes ahq-pass-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ahq-pass-card button:not(:disabled):hover {
  filter: brightness(1.08);
  transform: scale(1.02);
}
.ahq-pass-card button:not(:disabled):active {
  transform: scale(0.97);
}

/* Master-trigger button · extra prominent · pulse on hover */
.ahq-passes-master-trigger:not(:disabled) {
  position: relative;
  transition: background 0.12s ease, transform 0.08s ease, box-shadow 0.18s ease;
}
.ahq-passes-master-trigger:not(:disabled):hover {
  filter: brightness(1.08);
  box-shadow: 0 0 0 3px rgba(255, 80, 0, 0.18);
}
.ahq-passes-master-trigger:not(:disabled):active {
  transform: scale(0.99);
}

/* Dark-mode parity */
:root[data-theme="dark"] .ahq-pass-card {
  background: var(--surface) !important;
}
:root[data-theme="dark"] .ahq-pass-card:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

@media (prefers-reduced-motion: reduce) {
  .ahq-pass-card { animation: none !important; }
  .ahq-pass-card button:hover,
  .ahq-pass-card button:active,
  .ahq-passes-master-trigger:hover,
  .ahq-passes-master-trigger:active { transform: none !important; }
}
