/* ==========================================================================
   BlkBx AI — Sovereign AI Decision Support Systems
   Style guide: premium white-background strategy-consulting aesthetic.
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --bg-alt: #FCFCFD;
  --bg-dark: #0B1D2E;
  --text: #111111;
  --text-2: #4B5563;
  --text-3: #8A94A6;
  --rule: #E5E7EB;
  --rule-2: #DDE3EA;
  --accent: #163A5F;
  --accent-2: #173F6B;
  --teal: #0F766E;
  --teal-2: #116E7A;
  --soft: #EAF1F7;
  --soft-2: #DCE8F5;

  --radius: 6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);

  --fs-title: clamp(28px, 3.2vw, 44px);
  --fs-h2: clamp(22px, 2.4vw, 30px);
  --fs-h3: 16px;
  --fs-body: 15px;
  --fs-small: 13px;
  --fs-tiny: 11px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', 'Aptos', 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 { color: var(--text); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }

ul, ol, dl { margin: 0; padding: 0; list-style: none; }

img { max-width: 100%; display: block; }

button, .btn {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: #0f2d4d; border-color: #0f2d4d; }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--soft); border-color: var(--rule-2); text-decoration: none; }
.btn--danger { background: #B42318; color: #fff; border-color: #B42318; }
.btn--danger:hover { background: #912018; border-color: #912018; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, background 120ms ease;
}
.topbar--scrolled { border-bottom-color: var(--rule); }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 28px; height: 28px; }
.brand__wordmark { font-size: 16px; }
.mainnav { display: flex; gap: 22px; }
.mainnav a {
  color: var(--text-2);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.mainnav a:hover { color: var(--accent); text-decoration: none; }
.topbar__actions { display: flex; gap: 10px; }

@media (max-width: 860px) {
  .mainnav { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 72px 0 88px;
  background:
    radial-gradient(1200px 600px at 20% 0%, #E8F0F8 0%, transparent 60%),
    linear-gradient(180deg, #F3F7FB 0%, #FFFFFF 80%);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero__globe {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 78% 50%, rgba(22,58,95,0.08) 1px, transparent 1.5px),
    radial-gradient(circle at 30% 30%, rgba(22,58,95,0.04) 1px, transparent 1.5px);
  background-size: 18px 18px, 26px 26px;
  opacity: 0.55;
  pointer-events: none;
  mask-image: radial-gradient(700px 500px at 80% 55%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(700px 500px at 80% 55%, #000 0%, transparent 70%);
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: start;
  gap: 18px;
}
.hero__title {
  font-size: var(--fs-title);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
.hero__subtitle {
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: 0.2em;
  color: var(--teal);
  font-weight: 600;
  text-transform: uppercase;
}
.hero__cube {
  margin: 28px auto 12px;
  width: 180px;
  height: 180px;
  justify-self: center;
}
.hero__cube img { width: 100%; height: 100%; }
.hero__caption {
  align-self: center;
  justify-self: center;
  font-style: italic;
  color: var(--text-2);
  font-size: var(--fs-small);
}

/* ==========================================================================
   Section wrappers
   ========================================================================== */

.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--rule);
}
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: var(--bg-dark);
  color: #EAF2F9;
  border-bottom: 0;
}
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark a { color: #9DD1CB; }

.sectionhead {
  max-width: 900px;
  margin-bottom: 36px;
  border-top: 3px solid var(--accent);
  padding-top: 18px;
}
.section--dark .sectionhead { border-top-color: var(--teal); }
.sectionhead__title {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.sectionhead__subtitle {
  color: var(--text-2);
  font-size: var(--fs-body);
}
.section--dark .sectionhead__subtitle { color: #B7C5D4; }

.section__lead {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text);
  max-width: 960px;
  margin-bottom: 36px;
  line-height: 1.55;
  font-weight: 500;
}

/* ==========================================================================
   Grid helpers
   ========================================================================== */

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid--4, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ==========================================================================
   Pillars (3 numbered)
   ========================================================================== */

.pillars__grid { margin-top: 12px; }
.pillar {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.pillar:hover { border-color: var(--rule-2); box-shadow: var(--shadow-md); }
.pillar__eyebrow {
  color: var(--accent);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.pillar__num { color: var(--teal); margin-right: 6px; }
.pillar__title { font-size: var(--fs-h3); font-weight: 600; margin-bottom: 8px; }
.pillar__body { color: var(--text-2); font-size: 14px; }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: #fff;
}
.card--soft { background: var(--soft); border-color: transparent; }
.card__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.card__body { color: var(--text); font-size: 14px; }

/* ==========================================================================
   Strategic insight callout
   ========================================================================== */

.insight {
  margin-top: 36px;
  padding: 18px 22px;
  background: var(--soft);
  border-left: 3px solid var(--teal);
  border-radius: 3px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
}
.insight__label {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-right: 4px;
}
.insight--inline { margin-top: 20px; }

/* ==========================================================================
   Origin section
   ========================================================================== */

.origin__layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  margin-bottom: 44px;
}
@media (max-width: 900px) { .origin__layout { grid-template-columns: 1fr; } }

.origin__regions {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.region {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
}
.region__name {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.region__stats { display: grid; gap: 10px; }
.region__stat dt { color: var(--text-3); font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.region__stat dd { color: var(--text); font-size: 13px; margin: 0; }

.landscape {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
}
.landscape__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.landscape__subtitle {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 20px;
}
.landscape__list { display: grid; gap: 16px; }
.landscape__row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 14px;
  align-items: center;
}
.landscape__row--highlighted {
  background: var(--soft);
  padding: 10px 12px;
  margin: 4px -12px;
  border-radius: var(--radius);
  border: 1px solid var(--soft-2);
}
.landscape__region strong { display: block; font-size: 13px; color: var(--text); }
.landscape__region span { display: block; font-size: 11px; color: var(--text-2); margin-top: 2px; }
.landscape__bar {
  background: var(--rule);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}
.landscape__fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}
.landscape__row--highlighted .landscape__fill { background: var(--teal); }
.landscape__score { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }

.positioning {
  padding: 26px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 28px;
}
.positioning__title {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.positioning__body { color: var(--text-2); font-size: 14px; margin-bottom: 18px; }
.positioning__eyebrow { font-size: 13px; color: var(--accent); margin-bottom: 4px; }
.positioning__point p { font-size: 13px; color: var(--text-2); }

.origin__tagline {
  background: var(--bg-dark);
  color: #E8F0F8;
  padding: 20px 24px;
  font-size: 14px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  border-left: 3px solid var(--teal);
}

.drivers { margin-bottom: 20px; }
.driver {
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
}
.driver__title {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.driver__body { font-size: 13px; color: var(--text-2); }

.footnote { color: var(--text-3); font-size: 11px; margin-top: 12px; }

/* ==========================================================================
   Leadership founders
   ========================================================================== */

.leader {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: #fff;
}
.leader__head { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.leader__name { font-size: 18px; font-weight: 700; color: var(--accent); letter-spacing: -0.01em; }
.leader__role { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.leader__items { display: grid; gap: 12px; }
.leader__item dt { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 2px; }
.leader__item dd { color: var(--text); font-size: 13px; margin: 0; line-height: 1.55; }

/* ==========================================================================
   Team pillars
   ========================================================================== */

.teampillar {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  height: 100%;
}
.teampillar__title {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.teampillar__lead { color: var(--text-2); font-size: 13px; margin-bottom: 12px; }
.teampillar__items { display: grid; gap: 10px; font-size: 13px; color: var(--text); }
.teampillar__items li { padding-left: 14px; position: relative; }
.teampillar__items li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.teampillar__items strong { color: var(--accent); font-weight: 600; }

.locations {
  margin-top: 32px;
  padding: 22px 26px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
}
.locations__title {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.locations__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.locations__list li {
  font-size: 13px;
  color: var(--text);
  padding: 6px 12px;
  background: var(--soft);
  border-radius: 999px;
}

/* ==========================================================================
   Leadership profiles
   ========================================================================== */

.profile {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
}
.profile__head {
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.profile__name { font-size: 20px; color: var(--accent); font-weight: 700; letter-spacing: -0.01em; }
.profile__role { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.profile__columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 1000px) { .profile__columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .profile__columns { grid-template-columns: 1fr; } }
.profile__colhead {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  text-transform: none;
}
.profile__col ul { display: grid; gap: 8px; }
.profile__col li {
  font-size: 13px;
  color: var(--text);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.profile__col li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ==========================================================================
   Org overview
   ========================================================================== */

.orggroup { margin-bottom: 28px; }
.orggroup__heading {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.orggroup__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.orgperson { padding: 12px 14px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); }
.orgperson__name { font-size: 13px; font-weight: 600; color: var(--text); }
.orgperson__role { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ==========================================================================
   Clients logo row
   ========================================================================== */

.logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.logos__item {
  padding: 22px 16px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
  background: #fff;
  transition: background 150ms ease, color 150ms ease;
}
.logos__item:hover { color: var(--accent); background: var(--soft); }

/* ==========================================================================
   Track record
   ========================================================================== */

.trackgrid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.trackgrid__cat {
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
}
.trackgrid__head {
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.trackgrid__row { margin-bottom: 8px; font-size: 13px; }
.trackgrid__row dt { display: inline; font-weight: 700; color: var(--text); }
.trackgrid__row dd { display: inline; margin: 0; color: var(--text-2); }

/* ==========================================================================
   Capabilities
   ========================================================================== */

.caps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 44px;
}
@media (max-width: 1100px) { .caps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .caps { grid-template-columns: 1fr; } }

.caps__col {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.caps__head {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.caps__lead { color: var(--text-2); font-size: 12px; margin-bottom: 12px; }
.caps__col ul { display: grid; gap: 8px; font-size: 13px; }
.caps__col li { padding-left: 14px; position: relative; color: var(--text); }
.caps__col li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 4px; height: 4px;
  background: var(--teal);
  border-radius: 50%;
}

.caps__delivery-head {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.delivery {
  padding: 18px 20px;
  background: var(--soft);
  border-radius: var(--radius);
}
.delivery__title { color: var(--accent); font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.delivery__body { color: var(--text-2); font-size: 13px; }

/* ==========================================================================
   BlkBx SOS stack
   ========================================================================== */

.soslayer { margin-bottom: 44px; }
.soslayer__head {
  padding: 16px 20px;
  background: var(--bg-dark);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.soslayer__heading {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.soslayer__desc { color: #B7C5D4; font-size: 13px; }

.soslayer__modules {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.sosmod {
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
}
.sosmod__name {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sosmod__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.18);
}
.sosmod__icon img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1); /* force white silhouette regardless of source color */
}
.sosmod__lead { color: var(--text-2); font-size: 13px; margin-bottom: 12px; }
.sosmod__sub { color: var(--text); font-size: 12px; font-weight: 600; margin: 10px 0 6px; }
.sosmod__points { display: grid; gap: 6px; margin-bottom: 8px; }
.sosmod__points li {
  padding-left: 14px;
  position: relative;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.sosmod__points li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 4px; height: 4px;
  background: var(--teal);
  border-radius: 50%;
}
.sosmod__outcome {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.sosnarrative {
  margin-top: 16px;
  padding: 28px;
  background: var(--soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.sosnarrative__heading { color: var(--accent); font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.sosnarrative__body { color: var(--text); font-size: 14px; margin-bottom: 18px; line-height: 1.65; }
.sosflow {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 16px;
}
.sosflow__step {
  background: #fff;
  padding: 12px 14px;
  border-radius: var(--radius);
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--rule-2);
}
.sosflow__num { color: var(--teal); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; }
.sosflow__label { font-size: 13px; color: var(--text); font-weight: 500; }

/* ==========================================================================
   Case studies
   ========================================================================== */

.cases { margin-top: 12px; }
.case {
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
}
.case__sector { color: var(--accent); font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.case__body { color: var(--text); font-size: 13px; margin-bottom: 16px; line-height: 1.55; }
.case__metric {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.case__metric span { color: var(--accent); font-weight: 700; margin-right: 4px; }

/* ==========================================================================
   Contact
   ========================================================================== */

.section--dark { padding-bottom: 112px; }
.contact__head {
  position: relative;
  max-width: 900px;
  margin-bottom: 36px;
}
.contact__rule {
  display: inline-block;
  width: 56px;
  height: 3px;
  background: var(--teal);
  margin-bottom: 18px;
}
.contact__title {
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 18px;
}
.contact__lead { color: #B7C5D4; font-size: 18px; max-width: 520px; }
.contact__highlight { color: #3EDAD0; font-weight: 600; }

.contact__card {
  margin: 0 auto 42px;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 28px;
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius-lg);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.contact__icon {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #E6F4F3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact__heading {
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.contact__card a { color: var(--accent); }
.contact__response { margin-top: 10px; font-size: 13px; color: var(--text-2); }
.contact__response-label { color: var(--teal); font-weight: 700; letter-spacing: 0.04em; margin-right: 4px; }
.contact__response-value { color: var(--teal); font-weight: 700; }

.contact__pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
}
@media (max-width: 720px) { .contact__pillars { grid-template-columns: repeat(2, 1fr); } }
.contact__pillars li { display: grid; gap: 2px; }
.contact__pillars strong { color: #fff; font-size: 14px; font-weight: 600; }
.contact__pillars span { color: #B7C5D4; font-size: 12px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.sitefoot {
  background: #06111c;
  color: #B7C5D4;
  padding: 22px 0;
  font-size: 12px;
}
.sitefoot__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sitefoot__tagline { color: #6C7A8A; letter-spacing: 0.08em; }

/* ==========================================================================
   Admin shared
   ========================================================================== */

body.admin {
  background: var(--bg-alt);
}
.adminbar {
  background: #fff;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
}
.adminbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.adminbar__brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.adminbar__brand img { width: 24px; height: 24px; }
.adminbar__nav { display: flex; gap: 18px; }
.adminbar__nav a {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}
.adminbar__nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.adminbar__user { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; }
.adminbar__user form { margin: 0; }

.admin-main { padding: 32px 0 80px; }

.adminhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.adminhead h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.adminhead p { color: var(--text-2); font-size: 13px; margin-top: 4px; }

.admin-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 20px;
}

.admin-card h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.form-row { display: grid; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em; }
.form-row input, .form-row textarea, .form-row select {
  font: inherit;
  border: 1px solid var(--rule);
  background: #fff;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  width: 100%;
  font-family: inherit;
}
.form-row textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.form-row--inline {
  grid-template-columns: 160px 1fr;
  align-items: center;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.form-row__hint { color: var(--text-3); font-size: 11px; margin-top: 2px; }

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 18px;
}
.flash--ok { background: #ECFDF3; color: #027A48; border: 1px solid #ABEFC6; }
.flash--err { background: #FEF3F2; color: #B42318; border: 1px solid #FECDCA; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--rule);
}
.admin-table th {
  background: var(--bg-alt);
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td form { display: inline; margin: 0; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.pill--admin { background: var(--soft); color: var(--accent); }
.pill--editor { background: #F2F4F7; color: var(--text-2); }

details.section-editor { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 14px; }
details.section-editor > summary {
  cursor: pointer;
  padding: 14px 20px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}
details.section-editor > summary::after { content: '▸'; color: var(--text-3); font-size: 11px; transition: transform 120ms ease; margin-left: auto; }
details.section-editor[open] > summary::after { transform: rotate(90deg); }
details.section-editor > summary:hover { background: var(--bg-alt); }
details.section-editor > summary > code { flex: 0 0 auto; }
details.section-editor > div { padding: 18px 20px 22px; border-top: 1px solid var(--rule); }
details.section-editor--off > summary > code { color: var(--text-3); text-decoration: line-through; }
details.section-editor--off { opacity: 0.78; }

.vis-toggle {
  flex: 0 0 auto;
  margin-left: 12px;
  font: 600 11px/1 "Inter", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.vis-toggle--on { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.vis-toggle--on:hover { background: #BBF7D0; }
.vis-toggle--off { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.vis-toggle--off:hover { background: #FECACA; }
.vis-toggle:disabled { opacity: 0.55; cursor: progress; }
.vis-toggle:focus-visible { outline: 2px solid var(--accent, #0F766E); outline-offset: 2px; }

/* ==========================================================================
   Login
   ========================================================================== */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1000px 500px at 20% 0%, #E8F0F8 0%, transparent 60%),
    linear-gradient(180deg, #F3F7FB 0%, #FFFFFF 80%);
  padding: 24px;
}
.login {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 32px 32px 28px;
  box-shadow: 0 20px 40px rgba(16, 24, 40, 0.06);
}
.login__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.login__brand img { width: 32px; height: 32px; }
.login__brand strong { color: var(--accent); font-size: 16px; }
.login h1 { font-size: 18px; margin-bottom: 4px; }
.login p.muted { color: var(--text-2); font-size: 13px; margin-bottom: 20px; }
.login .btn { width: 100%; }
.login__footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}
.login__brand-sub {
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  margin-left: 2px;
}
.login__chip {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
}
.login__crumb {
  font-size: 12px;
  margin: -8px 0 16px;
}
.login__crumb a { color: var(--text-3); text-decoration: none; }
.login__crumb a:hover { color: var(--accent); }

/* ==========================================================================
   Portal picker — /login landing with 4 portal cards.
   ========================================================================== */
.portals-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 600px at 50% -10%, #E8F0F8 0%, transparent 65%),
    linear-gradient(180deg, #F5F8FB 0%, #FFFFFF 70%);
  padding: 56px 24px 64px;
}
.portals {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}
.portals__head {
  text-align: center;
  margin-bottom: 36px;
}
.portals__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}
.portals__brand img { width: 30px; height: 30px; }
.portals__head h1 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.portals__head .muted {
  color: var(--text-2);
  font-size: 14px;
  max-width: 540px;
  margin: 0 auto;
}
.portals__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  overflow: hidden;
}
.portal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.85;
}
.portal-card--investor::before { background: linear-gradient(90deg, #0F766E, #14B8A6); }
.portal-card--partner::before  { background: linear-gradient(90deg, #7C3AED, #A78BFA); }
.portal-card--client::before   { background: linear-gradient(90deg, #B45309, #F59E0B); }
.portal-card--admin::before    { background: linear-gradient(90deg, #163A5F, #2563EB); }
.portal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.08);
  border-color: var(--rule-2);
  text-decoration: none;
}
.portal-card__chip {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
}
.portal-card h2 {
  font-size: 17px;
  margin: 4px 0 0;
  letter-spacing: -0.01em;
}
.portal-card p {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  flex: 1 1 auto;
}
.portal-card__cta {
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
}
.portals__footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* ==========================================================================
   CMS live preview — split shell (right / bottom) with drag-resizable gutter.
   ========================================================================== */
.preview-shell {
  --split: 50%;
  display: grid;
  gap: 0;
  align-items: stretch;
  min-height: calc(100vh - 160px);
}
.preview-shell--off {
  grid-template-columns: 1fr;
  min-height: 0;
}
.preview-shell--off .preview-pane,
.preview-shell--off .preview-gutter { display: none; }
.preview-shell--off .preview-editor { padding: 0; }

.preview-shell--right {
  grid-template-columns: minmax(240px, var(--split)) 6px minmax(240px, 1fr);
  grid-template-rows: 1fr;
}
.preview-shell--bottom {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(240px, var(--split)) 6px minmax(240px, 1fr);
}

.preview-editor {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
}
.preview-shell--bottom .preview-editor { padding-right: 0; padding-bottom: 8px; }

.preview-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  background: #fff;
  font-size: 12px;
  color: var(--text-2);
}
.preview-toolbar--standalone {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 8px 12px;
}
.preview-toolbar__modes {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.preview-toolbar__modes button {
  border: 0;
  border-radius: 0;
  padding: 5px 10px;
  font-size: 12px;
  background: #fff;
  color: var(--text-2);
  border-right: 1px solid var(--rule);
}
.preview-toolbar__modes button:last-child { border-right: 0; }
.preview-toolbar__modes button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}
.preview-toolbar__status {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.preview-toolbar__status--ok { color: var(--teal); }
.preview-toolbar__status--err { color: #B42318; }

.preview-iframe {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: #fff;
}

.preview-gutter {
  background: transparent;
  position: relative;
  z-index: 2;
}
.preview-shell--right .preview-gutter { cursor: col-resize; }
.preview-shell--bottom .preview-gutter { cursor: row-resize; }
.preview-gutter::before {
  content: "";
  position: absolute;
  background: var(--rule);
  transition: background-color 120ms ease;
}
.preview-shell--right .preview-gutter::before {
  top: 0; bottom: 0; left: 2px; right: 2px;
}
.preview-shell--bottom .preview-gutter::before {
  left: 0; right: 0; top: 2px; bottom: 2px;
}
.preview-gutter:hover::before,
.preview-gutter[data-dragging="true"]::before { background: var(--accent); }

.preview-shell[data-dragging="true"] { user-select: none; }
.preview-shell[data-dragging="true"] .preview-iframe { pointer-events: none; }

@media (max-width: 900px) {
  .preview-shell--right {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(240px, var(--split)) 6px minmax(240px, 1fr);
  }
  .preview-shell--right .preview-gutter { cursor: row-resize; }
}

/* ==========================================================================
   Solution Architect — chat + mermaid split.
   ========================================================================== */

/* The architect page locks to the viewport: the page itself does not scroll,
   and the chat log + diagram canvas each scroll internally. The class is
   mirrored on <html> too (see admin-head.ejs) so both root elements are
   height-clamped; otherwise the window can still scroll even when the body
   is locked. */
html.architect-page {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
body.architect-page {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0;
}
body.architect-page > * { min-height: 0; }
body.architect-page .adminbar { flex: 0 0 auto; }
body.architect-page .admin-main {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 0;
  overflow: hidden;
  display: flex;
}
body.architect-page .admin-main > .container {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.architect-page .adminhead {
  flex: 0 0 auto;
  margin-bottom: 10px;
  padding-bottom: 8px;
}
body.architect-page .adminhead h1 { font-size: 18px; }
body.architect-page .adminhead p { font-size: 12px; margin-top: 2px; }
body.architect-page .flash { flex: 0 0 auto; font-size: 12px; }
body.architect-page .admin-main { padding: 14px 0 18px; }

.architect-shell {
  --architect-split: 50%;
  display: grid;
  grid-template-columns: minmax(280px, var(--architect-split)) 6px minmax(280px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
}
.architect-shell[data-dragging="true"] { user-select: none; cursor: col-resize; }
.architect-shell > * { min-height: 0; }

.architect-gutter {
  position: relative;
  cursor: col-resize;
  z-index: 2;
}
.architect-gutter::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 2px; right: 2px;
  background: var(--rule);
  transition: background-color 120ms ease;
}
.architect-gutter:hover::before,
.architect-shell[data-dragging="true"] .architect-gutter::before { background: var(--accent); }

.architect-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.architect-chat__log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-alt);
}
.architect-bubble {
  max-width: 94%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--rule);
  background: #fff;
  font-size: 12.5px;
  line-height: 1.5;
}
.architect-bubble p { margin: 0 0 6px; }
.architect-bubble p:last-child { margin-bottom: 0; }
.architect-bubble ul { padding-left: 18px; margin: 4px 0; list-style: disc; }
.architect-bubble li { margin: 2px 0; }
.architect-bubble code {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 11.5px;
  background: var(--soft);
  padding: 1px 4px;
  border-radius: 3px;
}
.architect-bubble pre {
  background: var(--bg-dark);
  color: #E5E7EB;
  padding: 8px 10px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 11.5px;
  margin: 6px 0;
}
.architect-bubble pre code { background: transparent; padding: 0; color: inherit; }
.architect-bubble h3, .architect-bubble h4, .architect-bubble h5 {
  margin: 8px 0 4px; font-size: 12.5px; font-weight: 600;
}
.architect-bubble--user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.architect-bubble--user code { background: rgba(255,255,255,0.18); color: inherit; }
.architect-bubble--assistant { align-self: flex-start; }
.architect-bubble--streaming::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  animation: architect-blink 1s steps(2, start) infinite;
  color: var(--text-3);
}
@keyframes architect-blink { to { visibility: hidden; } }

/* Onboarding context card (inside the chat log). */
.architect-context {
  position: sticky;
  top: 0;
  z-index: 5;
  align-self: stretch;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  /* Subtle shadow under the card so chat bubbles sliding behind it look layered. */
  transition: box-shadow 180ms ease;
}
.architect-context[open] {
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.10), 0 1px 0 rgba(16, 24, 40, 0.04);
}
/* Cap the open card body to half the chat log so it always leaves chat room.
   The body itself scrolls when content (fit bubble + manual fields) exceeds the cap. */
.architect-context[open] > .architect-context__body {
  max-height: min(58vh, 520px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.architect-context > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: baseline;
  background: var(--bg-alt);
  border-bottom: 1px solid transparent;
  transition: background-color 120ms ease;
}
.architect-context > summary:hover { background: var(--soft); }
.architect-context[open] > summary { border-bottom-color: var(--rule); background: #fff; }
.architect-context > summary::-webkit-details-marker { display: none; }
.architect-context > summary::before {
  content: "";
  grid-row: 1 / span 2;
  align-self: center;
  width: 8px; height: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 150ms ease;
}
.architect-context[open] > summary::before { transform: rotate(45deg); }
.architect-context__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.architect-context__optional {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--soft);
  padding: 1px 6px;
  border-radius: 999px;
}
.architect-context__changed {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #B45309;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  animation: arch-changed-pulse 1.6s ease-in-out infinite;
}
.architect-context__changed[hidden] { display: none; }
@keyframes arch-changed-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35); }
  50%      { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0); }
}
.architect-context__actions {
  grid-column: 2;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.architect-context__actions[hidden] { display: none; }
.architect-context__refactor {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 5px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, #163A5F, #0F766E);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}
.architect-context__refactor:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.28);
}
.architect-context__subtitle {
  grid-column: 2;
  font-size: 11.5px;
  color: var(--text-2);
  font-weight: 400;
  margin-top: 2px;
}
.architect-context__body {
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.architect-context__section { display: flex; flex-direction: column; gap: 8px; }
.architect-context__sectionhead {
  display: flex;
  align-items: center;
  gap: 8px;
}
.architect-context__sectionhead h3 {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.architect-context__badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--teal);
  color: #fff;
}
.architect-context__badge--auto { background: linear-gradient(135deg, var(--teal), var(--accent)); }

.architect-context__urlrow {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.architect-context__urlrow input {
  flex: 1 1 auto;
  font: inherit;
  font-size: 12px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  min-width: 0;
}
.architect-context__urlrow input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 58, 95, 0.12);
}
.architect-context__autofillbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 110px;
  justify-content: center;
}
.architect-context__autofillbtn:disabled { opacity: 0.85; cursor: wait; }
.architect-context__spinner {
  width: 13px; height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: architect-spin 0.7s linear infinite;
}
.architect-context__autofillbtn[data-loading="true"] .architect-context__spinner { display: inline-block; }
@keyframes architect-spin { to { transform: rotate(360deg); } }

.architect-context__status {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.45;
  padding: 7px 10px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.architect-context__status::before {
  flex: 0 0 auto;
  width: 14px; height: 14px;
  display: inline-block;
  margin-top: 2px;
}
.architect-context__status[data-status-kind="idle"]::before {
  content: "";
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238A94A6' stroke-width='1.5'><circle cx='8' cy='8' r='6.5'/><path d='M8 5v3.5M8 11v.01' stroke-linecap='round'/></svg>") center/contain no-repeat;
}
.architect-context__status[data-status-kind="loading"] {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1E3A8A;
}
.architect-context__status[data-status-kind="loading"]::before {
  content: "";
  width: 14px; height: 14px; margin-top: 3px;
  border: 2px solid #BFDBFE; border-top-color: #1D4ED8;
  border-radius: 50%;
  animation: architect-spin 0.7s linear infinite;
}
.architect-context__status[data-status-kind="ok"] {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #166534;
}
.architect-context__status[data-status-kind="ok"]::before {
  content: "";
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23166534' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 8l3.5 3.5L13 4.5'/></svg>") center/contain no-repeat;
}
.architect-context__status[data-status-kind="err"] {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}
.architect-context__status[data-status-kind="err"]::before {
  content: "";
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23991B1B' stroke-width='2' stroke-linecap='round'><path d='M4 4l8 8M12 4l-8 8'/></svg>") center/contain no-repeat;
}

/* BlkBx-fit info bubble — surfaces under the autofill row after the model
   analyzes the company. */
.architect-fit {
  position: relative;
  margin-top: 10px;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
  border: 1px solid #C7D7E8;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(22, 58, 95, 0.08);
  animation: architect-fit-in 320ms ease-out both;
}
.architect-fit[hidden] { display: none; }
@keyframes architect-fit-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.architect-fit__arrow {
  position: absolute;
  top: -7px;
  left: 22px;
  width: 12px; height: 12px;
  background: linear-gradient(135deg, #F8FAFC 50%, transparent 50%);
  border-top: 1px solid #C7D7E8;
  border-left: 1px solid #C7D7E8;
  transform: rotate(45deg);
}
.architect-fit__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.architect-fit__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff;
}
.architect-fit__close {
  border: 0;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.architect-fit__close:hover { background: var(--soft); color: var(--accent); }
.architect-fit__body { font-size: 12.5px; color: var(--text); line-height: 1.55; }
.architect-fit__company {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0 0 4px;
  text-transform: uppercase;
}
.architect-fit__headline {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.45;
}
.architect-fit__list {
  list-style: none;
  counter-reset: fit;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.architect-fit__list li {
  position: relative;
  counter-increment: fit;
  padding: 8px 10px 8px 32px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.architect-fit__list li::before {
  content: counter(fit);
  position: absolute;
  left: 8px; top: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.architect-fit__list li strong {
  font-weight: 600;
  color: var(--text);
  font-size: 12.5px;
}
.architect-fit__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.architect-fit__tag {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 10.5px;
  background: var(--soft);
  color: var(--accent);
  padding: 2px 7px 2px 4px;
  border-radius: 999px;
  border: 1px solid var(--soft-2);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.architect-fit__tagicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff;
}
.architect-fit__tagicon svg { width: 12px; height: 12px; }
.architect-fit__diff,
.architect-fit__next {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--bg-alt);
  border-left: 3px solid var(--teal);
  border-radius: 4px;
}
.architect-fit__next { border-left-color: var(--accent); }
.architect-fit__difflabel,
.architect-fit__nextlabel {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 3px;
}
.architect-fit__diff p,
.architect-fit__next p { margin: 0; font-size: 12px; color: var(--text-2); line-height: 1.5; }

.architect-context__divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}
.architect-context__divider::before,
.architect-context__divider::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid var(--rule);
}

.architect-context__grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.architect-field {
  display: grid;
  grid-template-columns: minmax(130px, 170px) 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
}
.architect-field--wide { grid-column: auto; }
.architect-field__label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.architect-field select,
.architect-field input {
  font: inherit;
  font-size: 12px;
  color: var(--text);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
}
.architect-field select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%234B5563' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3 4.5l3 3 3-3'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}
.architect-field select:focus,
.architect-field input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 58, 95, 0.12);
}
.architect-field__flash {
  animation: architect-field-flash 1.6s ease-out;
}
@keyframes architect-field-flash {
  0%   { background-color: #ECFDF5; border-color: #6EE7B7; box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
  100% { background-color: #fff; border-color: var(--rule); box-shadow: none; }
}
.architect-field select:not([value=""]):valid,
.architect-field input:not(:placeholder-shown) {
  border-color: var(--rule-2);
  background-color: #fff;
}

@media (max-width: 640px) {
  .architect-field { grid-template-columns: 1fr; gap: 6px; }
  .architect-context__urlrow { flex-direction: column; }
  .architect-context__autofillbtn { width: 100%; }
}

.architect-input {
  border-top: 1px solid var(--rule);
  padding: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.architect-input textarea {
  resize: none;
  min-height: 40px;
  max-height: 180px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.45;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.architect-input textarea:focus {
  outline: 0;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 58, 95, 0.12);
}
.architect-input__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.architect-input__row .btn { font-size: 11.5px; padding: 6px 12px; }
.architect-input__hint { font-size: 10.5px; color: var(--text-3); }
.architect-input__hint code { font-size: 10px; background: var(--soft); padding: 1px 4px; border-radius: 3px; }

.architect-diagram {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #0B1220;
  border: 1px solid #1E293B;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(8, 17, 32, 0.18);
}
.architect-diagram__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #1E293B;
  background: linear-gradient(180deg, #0F172A, #0B1220);
  color: #E2E8F0;
  font-size: 11.5px;
}
.architect-diagram__toolbar strong { color: #F1F5F9; font-weight: 600; letter-spacing: 0.01em; }
.architect-diagram__toolbar strong::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #22D3EE;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6);
  animation: arch-pulse-dot 1.6s ease-out infinite;
  vertical-align: middle;
}
@keyframes arch-pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}
.architect-diagram__status { color: #7DD3FC; font-size: 11px; letter-spacing: 0.01em; }
.architect-diagram__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.architect-diagram__iconbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
  color: #BAE6FD;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid #1E40AF55;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.architect-diagram__iconbtn:hover {
  background: #0F4C75;
  border-color: #38BDF8;
  color: #F0F9FF;
}
.architect-diagram__iconbtn svg { flex: 0 0 auto; }
.architect-diagram__canvas {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(56, 189, 248, 0.10) 0%, transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(20, 241, 149, 0.08) 0%, transparent 65%),
    linear-gradient(180deg, #0B1220 0%, #060A14 100%);
}
.architect-diagram__canvas::before {
  /* Ambient organic pulse — slow, low-opacity, never distracting. */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(280px 280px at 30% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 70%),
    radial-gradient(220px 220px at 70% 60%, rgba(34, 211, 238, 0.06) 0%, transparent 70%);
  animation: arch-canvas-breathe 9s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes arch-canvas-breathe {
  0%   { transform: scale(1) translate(0, 0); opacity: 0.85; }
  100% { transform: scale(1.06) translate(8px, -6px); opacity: 1; }
}
.architect-diagram__canvas::after {
  /* Faint dotted neural-net grid behind the diagram. */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(125, 211, 252, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}
.architect-diagram__canvas > * { position: relative; z-index: 1; }
.architect-diagram__canvas svg {
  /* The SVG fills the canvas in both directions; preserveAspectRatio="meet"
     handles aspect-ratio fit so the entire diagram (labels + icons) stays
     visible. Same approach as the popout window — they now look identical. */
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 12px rgba(34, 211, 238, 0.12));
}
/* ==========================================================================
   Architect placeholder — pulsing engine animation shown until a real diagram
   exists. Replaces the static "No diagram yet" message.
   ========================================================================== */
.architect-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  margin: auto;
  max-width: 420px;
  text-align: center;
  animation: arch-pl-fade-in 600ms ease-out both;
}
.architect-placeholder--leaving {
  animation: arch-pl-leave 420ms cubic-bezier(.4, .14, .3, 1) forwards;
  pointer-events: none;
}
@keyframes arch-pl-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes arch-pl-leave {
  to { opacity: 0; transform: scale(0.86); filter: blur(2px); }
}
.architect-placeholder__svg {
  width: clamp(180px, 28vw, 260px);
  height: auto;
}
.architect-placeholder__svg .arch-pl__core {
  transform-origin: 120px 120px;
  animation: arch-pl-core-pulse 2.4s cubic-bezier(.4, 0, .2, 1) infinite;
}
.architect-placeholder__svg .arch-pl__core-glow {
  transform-origin: 120px 120px;
  animation: arch-pl-core-glow 2.4s cubic-bezier(.4, 0, .2, 1) infinite;
  mix-blend-mode: screen;
}
@keyframes arch-pl-core-pulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50%      { transform: scale(1.18); opacity: 1; }
}
@keyframes arch-pl-core-glow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50%      { transform: scale(1.4); opacity: 1; }
}
.architect-placeholder__svg .arch-pl__ring {
  transform-origin: 120px 120px;
  animation: arch-pl-ring 4s cubic-bezier(.4, 0, .2, 1) infinite;
}
.architect-placeholder__svg .arch-pl__ring--1 { animation-delay: 0s; }
.architect-placeholder__svg .arch-pl__ring--2 { animation-delay: 1.3s; }
.architect-placeholder__svg .arch-pl__ring--3 { animation-delay: 2.6s; }
@keyframes arch-pl-ring {
  0%   { transform: scale(0.55); opacity: 0; }
  20%  { opacity: 0.55; }
  100% { transform: scale(1.6); opacity: 0; }
}
.architect-placeholder__svg .arch-pl__lattice line {
  animation: arch-pl-lattice-fade 6s ease-in-out infinite alternate;
}
@keyframes arch-pl-lattice-fade {
  from { stroke-opacity: 0.10; }
  to   { stroke-opacity: 0.28; }
}
.architect-placeholder__svg .arch-pl__orbit-1,
.architect-placeholder__svg .arch-pl__orbit-2,
.architect-placeholder__svg .arch-pl__orbit-3 {
  transform-origin: 120px 120px;
  animation: arch-pl-orbit 11s linear infinite;
}
.architect-placeholder__svg .arch-pl__orbit-2 { animation-delay: -3.7s; animation-duration: 13s; }
.architect-placeholder__svg .arch-pl__orbit-3 { animation-delay: -7.3s; animation-duration: 15s; }
@keyframes arch-pl-orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.architect-placeholder__caption {
  font-size: 12.5px;
  color: #94A3B8;
  line-height: 1.55;
  margin: 0;
  max-width: 320px;
}
.architect-placeholder__captionlabel {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #67E8F9;
  margin-bottom: 6px;
  position: relative;
}
.architect-placeholder__captionlabel::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22D3EE;
  margin-right: 7px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6);
  animation: arch-pl-dot 1.6s ease-out infinite;
}
@keyframes arch-pl-dot {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

/* Diagram morph transitions — fired when the SVG is replaced. The leaving
   SVG dissolves with a soft blur + scale-down; a cyan shimmer sweeps the
   canvas; the new SVG fades in fresh and then per-node animations stagger. */
.architect-diagram__canvas svg.arch-svg--entering {
  animation: arch-svg-enter 540ms cubic-bezier(.2, .9, .2, 1) both;
}
@keyframes arch-svg-enter {
  from { opacity: 0; transform: scale(0.95); filter: blur(2px) drop-shadow(0 2px 12px rgba(34, 211, 238, 0.12)); }
  to   { opacity: 1; transform: scale(1); filter: blur(0) drop-shadow(0 2px 12px rgba(34, 211, 238, 0.12)); }
}
.architect-diagram__canvas svg.arch-svg--leaving {
  animation: arch-svg-leave 240ms cubic-bezier(.4, .14, .3, 1) forwards;
  pointer-events: none;
}
@keyframes arch-svg-leave {
  from { opacity: 1; transform: scale(1); filter: blur(0) drop-shadow(0 2px 12px rgba(34, 211, 238, 0.12)); }
  to   { opacity: 0; transform: scale(0.96); filter: blur(4px) drop-shadow(0 2px 12px rgba(34, 211, 238, 0.12)); }
}

/* ==========================================================================
   Architect sessions dropdown — toolbar control listing saved sessions.
   ========================================================================== */
#arch-adminhead-actions { display: flex; align-items: center; gap: 8px; }
.arch-sessions { position: relative; }
.arch-sessions__toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  max-width: 240px;
  white-space: nowrap;
}
.arch-sessions__toggle::-webkit-details-marker { display: none; }
.arch-sessions__toggle:hover { background: var(--bg-alt); border-color: var(--rule-2); }
.arch-sessions__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  color: var(--text-2);
}
.arch-sessions__label {
  flex: 1 1 auto;
  overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.arch-sessions__chevron {
  font-size: 9px;
  color: var(--text-3);
  transition: transform 120ms ease;
}
.arch-sessions[open] .arch-sessions__chevron { transform: rotate(180deg); }
.arch-sessions__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  width: 320px;
  max-height: 60vh;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.10), 0 1px 2px rgba(16, 24, 40, 0.06);
  padding: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: arch-sessions-in 140ms ease-out both;
}
@keyframes arch-sessions-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.arch-sessions__newrow {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-align: left;
}
.arch-sessions__newrow:hover { background: var(--soft); }
.arch-sessions__newicon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff;
  font-size: 14px;
  line-height: 1;
}
.arch-sessions__divider {
  height: 1px;
  background: var(--rule);
  margin: 4px 4px;
}
.arch-sessions__list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 2px;
}
.arch-sessions__empty {
  padding: 12px 10px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}
.arch-session {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 100ms ease;
}
.arch-session:hover { background: var(--bg-alt); }
.arch-session--active {
  background: var(--soft);
}
.arch-session__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.arch-session__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arch-session__time {
  font-size: 10.5px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  letter-spacing: 0.01em;
}
.arch-session__delete {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  color: var(--text-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 100ms ease, background-color 100ms ease, color 100ms ease;
}
.arch-session:hover .arch-session__delete { opacity: 1; }
.arch-session__delete:hover { background: #FEE2E2; color: #B42318; }

/* Cyan diagonal sweep that fires across the canvas on every morph. */
.architect-canvas-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(34, 211, 238, 0.18) 48%,
    rgba(20, 241, 149, 0.14) 52%,
    transparent 70%);
  transform: translateX(-100%);
  animation: arch-canvas-sweep 720ms cubic-bezier(.4, .14, .3, 1) forwards;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 4;
}
@keyframes arch-canvas-sweep {
  0%   { transform: translateX(-100%); opacity: 0; }
  18%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* Node entry: each node fades + scales in, staggered by --arch-stagger.
   "Fresh" nodes (newly added on this turn) get a longer pulse and brighter glow. */
.architect-diagram__canvas svg g.node.arch-node {
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  animation: arch-node-grow 700ms cubic-bezier(.2, .9, .2, 1) both;
  animation-delay: var(--arch-stagger, 0ms);
}
.architect-diagram__canvas svg g.node.arch-node--fresh {
  animation: arch-node-grow 720ms cubic-bezier(.2, .9, .2, 1) both,
             arch-node-pulse 1.8s ease-in-out 800ms 2;
}
@keyframes arch-node-grow {
  0%   { opacity: 0; transform: scale(0.55) translateY(8px); }
  60%  { opacity: 1; transform: scale(1.04) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes arch-node-pulse {
  0%, 100% { filter: url(#blkbx-fresh-glow) drop-shadow(0 0 0 rgba(20, 241, 149, 0)); }
  50%      { filter: url(#blkbx-fresh-glow) drop-shadow(0 0 6px rgba(20, 241, 149, 0.6)); }
}

/* Edge "drawing" — stroke-dashoffset tween. */
.architect-diagram__canvas svg .arch-edge {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: arch-edge-draw 1100ms ease-out both;
  animation-delay: var(--arch-edge-stagger, 200ms);
}
@keyframes arch-edge-draw {
  to { stroke-dashoffset: 0; }
}
.architect-diagram__canvas svg .arch-edge--fresh {
  animation: arch-edge-draw 1100ms ease-out both,
             arch-edge-pulse 2.4s ease-in-out 1200ms infinite;
}
@keyframes arch-edge-pulse {
  0%, 100% { stroke: #7DD3FC; }
  50%      { stroke: #14F195; }
}

/* Cluster (subgraph) entry — soft fade in. */
.architect-diagram__canvas svg g.cluster {
  animation: arch-cluster-in 600ms ease-out both;
}
@keyframes arch-cluster-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.architect-diagram__canvas svg .cluster-label .nodeLabel,
.architect-diagram__canvas svg .cluster text {
  fill: #93C5FD !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}
/* Force every text-bearing element inside any node to use a light fill /
   color, with a subtle dark text-shadow so labels stay legible regardless
   of which gradient stop sits behind them. Mermaid in strict mode renders
   labels as SVG <text> + <tspan>; in HTML-label mode they're inside
   foreignObject with arbitrary tag nesting — this rule covers both. */
.architect-diagram__canvas svg .node text,
.architect-diagram__canvas svg .node tspan,
.architect-diagram__canvas svg .node .nodeLabel,
.architect-diagram__canvas svg .node .nodeLabel *,
.architect-diagram__canvas svg .node foreignObject,
.architect-diagram__canvas svg .node foreignObject *,
.architect-diagram__canvas svg .label > text,
.architect-diagram__canvas svg .label > text *,
.architect-diagram__canvas svg .label foreignObject,
.architect-diagram__canvas svg .label foreignObject *,
.architect-diagram__canvas svg foreignObject .nodeLabel,
.architect-diagram__canvas svg .nodeLabel,
.architect-diagram__canvas svg .label foreignObject div {
  fill: #F1F5F9 !important;
  color: #F1F5F9 !important;
  stroke: none !important;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(8, 17, 32, 0.85);
}
.architect-diagram__canvas svg .edgeLabel,
.architect-diagram__canvas svg .edgeLabel rect {
  fill: #0B1220 !important;
}
.architect-diagram__canvas svg .edgeLabel .label foreignObject,
.architect-diagram__canvas svg .edgeLabel text,
.architect-diagram__canvas svg .edgeLabel span {
  color: #BAE6FD !important;
  fill: #BAE6FD !important;
  font-size: 11px;
  font-weight: 500;
}

/* Edge arrowheads should match the cyan stroke palette. */
.architect-diagram__canvas svg defs marker path,
.architect-diagram__canvas svg marker path {
  fill: #7DD3FC !important;
  stroke: #7DD3FC !important;
}

/* In-node module icon — uses currentColor; sits at the left edge of the node. */
.architect-diagram__canvas svg .arch-node-icon {
  color: #E0F2FE;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.architect-diagram__canvas svg g.node.arch-node--has-icon .arch-node-icon {
  animation: arch-icon-glow 4.5s ease-in-out infinite alternate;
}
@keyframes arch-icon-glow {
  from { filter: drop-shadow(0 0 0 rgba(125, 211, 252, 0)); }
  to   { filter: drop-shadow(0 0 4px rgba(125, 211, 252, 0.55)); }
}
.architect-diagram__canvas svg g.node.arch-node--fresh .arch-node-icon { color: #ECFEFF; }

/* Hover affordance + active highlight on clickable nodes. */
.architect-diagram__canvas svg g.node.arch-node {
  transition: transform 160ms ease;
}
.architect-diagram__canvas svg g.node.arch-node:hover {
  transform: scale(1.04);
}
.architect-diagram__canvas svg g.node.arch-node:hover [data-blkbx-fill] {
  filter: url(#blkbx-fresh-glow) !important;
}
.architect-diagram__canvas svg g.node.arch-node--active [data-blkbx-fill] {
  stroke: #14F195 !important;
  stroke-width: 2.2 !important;
  filter: url(#blkbx-fresh-glow) !important;
}

/* ==========================================================================
   Per-node explanation panel — slides in from the right inside the diagram.
   ========================================================================== */
.architect-diagram { position: relative; }
.architect-nodepanel {
  position: absolute;
  top: 38px;       /* below the toolbar */
  right: 0;
  bottom: 0;
  width: min(360px, 88%);
  background: linear-gradient(180deg, #0F172A 0%, #0B1220 100%);
  border-left: 1px solid #1E40AF55;
  box-shadow: -16px 0 40px rgba(8, 17, 32, 0.55);
  color: #E2E8F0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
  animation: arch-nodepanel-in 220ms ease-out both;
  overflow: hidden;
}
.architect-nodepanel[hidden] { display: none; }
@keyframes arch-nodepanel-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.architect-nodepanel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.architect-nodepanel__kind {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #67E8F9;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.25);
  min-height: 20px;
}
.architect-nodepanel__kind:empty { display: none; }
.architect-nodepanel__close {
  border: 0;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 2px 8px;
  border-radius: 4px;
}
.architect-nodepanel__close:hover { background: rgba(148, 163, 184, 0.12); color: #F1F5F9; }
.architect-nodepanel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #F1F5F9;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1E293B;
}
.architect-nodepanel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 4px;
  color: #67E8F9;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(20, 241, 149, 0.14));
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 7px;
  flex: 0 0 auto;
}
.architect-nodepanel__icon svg {
  width: 20px;
  height: 20px;
  color: inherit;
}
.architect-nodepanel__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #CBD5E1;
}
.architect-nodepanel__body section { margin-bottom: 14px; }
.architect-nodepanel__body section:last-child { margin-bottom: 0; }
.architect-nodepanel__body h3 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7DD3FC;
  margin: 0 0 6px;
}
.architect-nodepanel__body h4 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94A3B8;
  margin: 0 0 4px;
}
.architect-nodepanel__body p { margin: 0; }
.architect-nodepanel__body ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.architect-nodepanel__body li {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  color: #BAE6FD;
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 4px;
  padding: 4px 8px;
}
.architect-nodepanel__io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.architect-nodepanel__value {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(20, 241, 149, 0.07);
  border: 1px solid rgba(20, 241, 149, 0.22);
  border-radius: 6px;
}
.architect-nodepanel__valuelabel {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #34D399;
  margin-bottom: 4px;
}
.architect-nodepanel__loading {
  color: #94A3B8;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.architect-nodepanel__spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(125, 211, 252, 0.25);
  border-top-color: #38BDF8;
  border-radius: 50%;
  animation: architect-spin 0.7s linear infinite;
}
.architect-nodepanel__err {
  color: #FCA5A5;
  font-size: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 8px 10px;
  border-radius: 4px;
}
.architect-diagram__errdetails {
  width: 100%;
  margin-top: 14px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 12px;
}
.architect-diagram__errdetails summary { cursor: pointer; color: #991B1B; font-weight: 500; }
.architect-diagram__errmsg { color: #991B1B; margin: 6px 0 8px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; }
.architect-diagram__errdetails pre {
  background: #fff;
  border: 1px solid #FECACA;
  padding: 8px 10px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 11.5px;
  margin: 0;
}

@media (max-width: 900px) {
  .architect-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(300px, var(--architect-split)) 6px minmax(300px, 1fr);
  }
  .architect-gutter { cursor: row-resize; }
}

/* ==========================================================================
   Per-section AI edit panel (on /admin/content).
   ========================================================================== */
.ai-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.ai-panel__label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ai-panel__label code { text-transform: none; color: var(--accent); }
.ai-panel__prompt {
  width: 100%;
  resize: vertical;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
}
.ai-panel__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.ai-panel__status {
  font-size: 12px;
  color: var(--text-3);
  margin-left: auto;
}
.ai-panel__status--ok { color: var(--teal); }
.ai-panel__status--err { color: #B42318; }
.ai-panel__status--busy { color: var(--text-2); }
.ai-panel__status--busy::before {
  content: "●";
  display: inline-block;
  margin-right: 4px;
  animation: ai-pulse 0.9s ease-in-out infinite;
}
@keyframes ai-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================================
   Experience Matcher — admin/experience
   Light cards matching the rest of the admin; only the match
   visualization goes dark (mirrors the architect diagram pane).
   ============================================================ */

/* Tooling subnav — secondary tab strip that appears below the main admin
   bar whenever the user is on a tooling subpage (Energy, Architect,
   Experience Matcher, SOS Demo). */
.tooling-subbar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--rule);
}
.tooling-subbar__inner {
  display: flex; align-items: stretch; gap: 0;
  height: 40px;
}
.tooling-subbar a {
  display: inline-flex; align-items: center;
  padding: 0 16px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 140ms ease, border-color 140ms ease;
}
.tooling-subbar a:hover { color: var(--text); }
.tooling-subbar a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Dark-page overrides — Energy and Architect both run on near-black layouts
   so the subbar needs its own dark palette to read correctly. */
body.energy-page .tooling-subbar {
  background: var(--en-panel);
  border-bottom-color: var(--en-border);
}
body.energy-page .tooling-subbar a { color: var(--en-text-2); }
body.energy-page .tooling-subbar a:hover { color: var(--en-text); }
body.energy-page .tooling-subbar a.active {
  color: var(--en-yellow);
  border-bottom-color: var(--en-yellow);
}
body.architect-page .tooling-subbar {
  background: #0F172A;
  border-bottom-color: rgba(56, 189, 248, 0.18);
}
body.architect-page .tooling-subbar a { color: #94A3B8; }
body.architect-page .tooling-subbar a:hover { color: #F1F5F9; }
body.architect-page .tooling-subbar a.active {
  color: #22D3EE;
  border-bottom-color: #22D3EE;
}

.adminhead__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.exp-engagement-dl {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px;
}
.exp-engagement-dl svg { color: var(--accent); flex: 0 0 auto; }
.exp-meta-pill {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 500;
  padding: 5px 11px;
  background: var(--soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--accent);
}

/* Give this admin page more horizontal room than the default 1200px so the
   13-column project grid and the proposed-project textarea don't feel cramped.
   The page is admin-only — desktop-first — so widening here is fine. */
body.experience-page .admin-main > .container {
  max-width: 1500px;
  padding: 0 24px;
}

/* min-width: 0 on the page + every flex/grid level above the table is what
   actually lets `.exp-db-table-wrap`'s `overflow: auto` win against a wide
   table. Without it, the table pushes its parents (and the page) wider. */
.exp-page {
  display: flex; flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.exp-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.exp-card-head h2 {
  font-size: 15px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.02em; margin: 0 0 4px;
}
.exp-card-head p { color: var(--text-2); font-size: 13px; margin: 0; line-height: 1.55; max-width: 680px; }

/* ----- input panel ----- */
.exp-input-card { padding: 24px 28px; }
.exp-input-form { display: flex; flex-direction: column; gap: 14px; }
.exp-input-text {
  width: 100%; box-sizing: border-box;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit; font-size: 14px; line-height: 1.6;
  padding: 14px 16px;
  resize: vertical;
  min-height: 160px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.exp-input-text::placeholder { color: var(--text-3); }
.exp-input-text:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 58, 95, 0.12);
  background: #fff;
}
.exp-input-row {
  display: flex; flex-wrap: wrap;
  gap: 14px; align-items: center;
  padding-top: 4px;
}
.exp-input-spacer { flex: 1 1 auto; min-width: 12px; }

.exp-input-control { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.exp-input-control__label { font-weight: 600; color: var(--text); }
.exp-input-control select {
  background: #fff; color: var(--text);
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 6px 10px; font: inherit; font-size: 13px;
  cursor: pointer;
}
.exp-input-control select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 58, 95, 0.12); }
.exp-input-control--toggle { gap: 7px; cursor: pointer; user-select: none; }
.exp-input-control--toggle input { accent-color: var(--accent); }

/* Range slider — Min relevance. Live value sits next to the label so the
   user always knows the current cutoff. Both Webkit and Firefox tracks/thumbs
   are styled explicitly so the control looks the same in every browser. */
.exp-input-control--range { gap: 10px; min-width: 220px; }
.exp-input-control--range .exp-input-control__label {
  display: inline-flex; align-items: center; gap: 8px;
}
.exp-input-rangeval {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; color: var(--accent);
  background: var(--soft);
  border: 1px solid var(--soft-2);
  border-radius: 4px;
  padding: 1px 7px;
  min-width: 28px;
  font-variant-numeric: tabular-nums;
}
.exp-input-range {
  -webkit-appearance: none; appearance: none;
  background: transparent;
  width: 120px; height: 18px;
  margin: 0; padding: 0;
  cursor: pointer;
}
.exp-input-range:focus { outline: none; }
.exp-input-range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: var(--rule-2);
}
.exp-input-range::-moz-range-track {
  height: 4px; border-radius: 2px;
  background: var(--rule-2);
  border: none;
}
.exp-input-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; margin-top: -5px;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--rule);
  border-radius: 50%; cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.exp-input-range::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--rule);
  border-radius: 50%; cursor: pointer;
}
.exp-input-range:focus::-webkit-slider-thumb,
.exp-input-range:hover::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(22, 58, 95, 0.16);
}
.exp-input-range:focus::-moz-range-thumb,
.exp-input-range:hover::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(22, 58, 95, 0.16);
}

.exp-input-status { font-size: 12.5px; color: var(--text-2); min-height: 18px; }
.exp-input-status[data-status-kind="loading"] { color: var(--accent); }
.exp-input-status[data-status-kind="loading"]::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 7px; vertical-align: middle;
  animation: ai-pulse 0.9s ease-in-out infinite;
}
.exp-input-status[data-status-kind="ok"]   { color: #15803D; }
.exp-input-status[data-status-kind="err"]  { color: #B42318; }
.exp-input-status[data-status-kind="warn"] { color: #B45309; }

.exp-input-submit {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 220px; justify-content: center;
}
.exp-input-submit.is-loading svg { animation: exp-spin 0.9s linear infinite; }
@keyframes exp-spin { to { transform: rotate(360deg); } }

/* ----- match section (viz + results, side-by-side on wide screens) ----- */
.exp-match-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .exp-match-section { grid-template-columns: 1fr; } }

/* The viz panel is dark — it mirrors the architect diagram canvas, which is
   the existing precedent for "an AI-rendered visualization sits inside a
   dark frame against a light page". */
.exp-viz {
  background: linear-gradient(180deg, #0B1220 0%, #060A14 100%);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 380px;
}
.exp-viz__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 18px 8px;
  gap: 12px; flex-wrap: wrap;
}
.exp-viz__head h3 {
  font-size: 13px; font-weight: 700; color: #F1F5F9;
  letter-spacing: 0.04em; text-transform: uppercase; margin: 0;
}
.exp-viz__head h3::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #22D3EE; margin-right: 8px;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
  vertical-align: middle;
}
.exp-viz__summary { color: #BAE6FD; font-size: 12px; line-height: 1.5; }
.exp-viz__canvas { flex: 1 1 auto; padding: 4px 8px 8px; min-height: 320px; }
.exp-viz__svg { width: 100%; height: 100%; min-height: 320px; display: block; }

.exp-viz-center-glow { animation: exp-pulse 3.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.exp-viz-center-core { animation: exp-pulse 2.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.exp-viz-center-label { fill: #F1F5F9; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
@keyframes exp-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.4)); }
  50%      { filter: drop-shadow(0 0 16px rgba(34, 211, 238, 0.9)); }
}

.exp-viz-scan-dot {
  fill: #38BDF8; opacity: 0.55;
  transform-origin: center; transform-box: fill-box;
  animation: exp-scan-dot 1.2s ease-in-out infinite;
}
@keyframes exp-scan-dot {
  0%, 100% { transform: scale(0.85); opacity: 0.30; }
  50%      { transform: scale(1.30); opacity: 1.00; }
}

.exp-viz-edge {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: exp-edge-draw 900ms cubic-bezier(.2,.9,.2,1) var(--viz-stagger, 0ms) forwards;
}
@keyframes exp-edge-draw { to { stroke-dashoffset: 0; } }

.exp-viz-node {
  opacity: 0;
  animation: exp-node-in 480ms cubic-bezier(.2,.9,.2,1) var(--viz-stagger, 0ms) forwards;
  cursor: pointer;
}
.exp-viz-node:hover .exp-viz-node__halo { fill: rgba(34, 211, 238, 0.30); }
.exp-viz-node--strong .exp-viz-node__halo {
  transform-origin: center; transform-box: fill-box;
  animation: exp-halo-pulse 2.6s ease-in-out infinite;
}
@keyframes exp-halo-pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.6; }
  50%      { transform: scale(1.20); opacity: 1; }
}
@keyframes exp-node-in {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.exp-viz-node__num { fill: #F1F5F9; font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.exp-viz-node__chip { fill: #0B1220; font-size: 9px; font-weight: 700; font-family: 'JetBrains Mono', monospace; pointer-events: none; }
.exp-viz-node__initials {
  fill: #BAE6FD;
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  pointer-events: none;
}
.exp-viz-node__logo {
  pointer-events: none;
  /* Grayscale + brightness lift so logos stay visible against the dark
     match-map background regardless of their original tonal value. */
  filter: grayscale(100%) brightness(1.6) contrast(1.05);
}
.exp-viz-node__label { fill: #CBD5E1; font-size: 11px; font-weight: 500; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .exp-viz-center-glow, .exp-viz-center-core, .exp-viz-scan-dot,
  .exp-viz-node, .exp-viz-edge, .exp-viz-node--strong .exp-viz-node__halo {
    animation: none;
  }
  .exp-viz-edge { stroke-dashoffset: 0; }
  .exp-viz-node { opacity: 1; }
}

/* ----- result cards ----- */
.exp-results { padding: 22px 26px; }
.exp-results__list {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 720px; overflow-y: auto;
  margin-right: -8px; padding-right: 8px; /* preserve scrollbar without misaligning content */
}
.exp-results__list::-webkit-scrollbar { width: 8px; }
.exp-results__list::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 4px; }
.exp-results__list::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
.exp-results__empty,
.exp-results__error {
  padding: 22px; border-radius: var(--radius); text-align: center;
  font-size: 13px;
}
.exp-results__empty { color: var(--text-2); background: var(--bg-alt); border: 1px dashed var(--rule-2); }
.exp-results__error { color: #B42318; background: #FEF2F2; border: 1px solid #FECACA; text-align: left; }

.exp-result {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.exp-result:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(22, 58, 95, 0.08); }
.exp-result--flash { animation: exp-card-flash 1.2s ease-out; }
@keyframes exp-card-flash {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
  30%  { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.40); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.exp-result__head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.exp-result__logo {
  width: 40px; height: 40px;
  min-width: 40px; min-height: 40px;
  max-width: 40px; max-height: 40px;
  border-radius: var(--radius);
  object-fit: cover; object-position: center;
  background: #fff;
  border: 1px solid var(--rule);
  flex: 0 0 auto;
  filter: grayscale(100%) contrast(0.95);
}
.exp-result__logo--placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 12px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace; letter-spacing: 0.06em;
}
.exp-result__title-wrap { flex: 1 1 auto; min-width: 0; }
.exp-result__title { margin: 0 0 2px; font-size: 14px; color: var(--text); font-weight: 600; }
.exp-result__client { margin: 0; font-size: 12.5px; color: var(--text-2); }
.exp-result__scores { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.exp-result__score {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 4px 14px;
  border: 1px solid var(--score-color, var(--accent));
  border-radius: var(--radius);
  background: #fff;
  color: var(--score-color, var(--accent));
  min-width: 62px;
}
.exp-result__scorenum { font-size: 18px; font-weight: 700; font-family: 'JetBrains Mono', monospace; line-height: 1; }
.exp-result__scorelabel { font-size: 9.5px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-3); margin-top: 2px; }
.exp-result__confidence { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--conf-color, var(--text-3)); font-weight: 600; }
.exp-result__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.exp-result__chip {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--soft-2);
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
}
.exp-result__chip--theme { border-color: #D1FAE5; background: #ECFDF5; color: #166534; }
.exp-result__section { margin-bottom: 10px; }
.exp-result__section h4 {
  margin: 0 0 4px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--text-3);
}
.exp-result__section p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text); }
.exp-result__section--proposal {
  margin-top: 12px; padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.exp-result__section--proposal p { font-style: italic; color: var(--text-2); }

/* Source-evidence block — citations from the project record. Styled to read
   as a footnote-y reference, not marketing prose. */
.exp-result__section--evidence {
  margin-top: 10px; padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
}
.exp-result__section--evidence h4 {
  display: flex; align-items: baseline; gap: 8px;
  color: var(--text-3);
}
.exp-result__evhint {
  font-size: 10px; font-weight: 500; letter-spacing: 0.04em;
  text-transform: none; color: var(--text-3); font-style: italic;
}
.exp-result__evlist {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.exp-result__evlist li {
  font-size: 11.5px; line-height: 1.5;
  color: var(--text-2);
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  padding-left: 12px; position: relative;
}
.exp-result__evlist li::before {
  content: "›"; position: absolute; left: 0;
  color: var(--accent); font-weight: 700;
}
.exp-result__copybtn { margin-top: 10px; }
.exp-result__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ----- Google Sheets sync card ----- */
.exp-sync-card { padding: 22px 26px; }
.exp-sync-form { display: flex; flex-direction: column; gap: 12px; }
.exp-sync-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: end;
}
@media (max-width: 760px) {
  .exp-sync-fields { grid-template-columns: 1fr; }
}
.exp-sync-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.exp-sync-field__label {
  font-size: 11px; font-weight: 700;
  color: var(--text-2); letter-spacing: 0.06em; text-transform: uppercase;
}
.exp-sync-url,
.exp-sync-sheet {
  width: 100%; box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: 13.5px;
  padding: 10px 14px; line-height: 1.5;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.exp-sync-url:focus,
.exp-sync-sheet:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 58, 95, 0.12);
}
.exp-sync-row {
  display: flex; align-items: center; gap: 14px;
  padding-top: 2px;
}
.exp-sync-status {
  flex: 1 1 auto;
  font-size: 12.5px; color: var(--text-2); min-height: 18px;
}
.exp-sync-status[data-status-kind="loading"] { color: var(--accent); }
.exp-sync-status[data-status-kind="loading"]::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 7px; vertical-align: middle;
  animation: ai-pulse 0.9s ease-in-out infinite;
}
.exp-sync-status[data-status-kind="ok"]   { color: #15803D; }
.exp-sync-status[data-status-kind="err"]  { color: #B42318; }
.exp-sync-status[data-status-kind="warn"] { color: #B45309; }
.exp-sync-submit,
.exp-sync-push {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 160px; justify-content: center;
}
.exp-sync-submit.is-loading svg,
.exp-sync-push.is-loading svg { animation: exp-spin 0.9s linear infinite; }

/* ----- Sheet write access (Apps Script setup) ----- */
.exp-sync-write {
  margin-top: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.exp-sync-write[open] { background: #fff; }
.exp-sync-write__summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--accent);
  user-select: none;
}
.exp-sync-write__summary::-webkit-details-marker { display: none; }
.exp-sync-write__summary:hover { background: var(--soft); }
.exp-sync-write__chevron {
  display: inline-block; font-size: 13px; line-height: 1;
  color: var(--text-3);
  transition: transform 160ms ease;
  transform: rotate(-90deg);
}
.exp-sync-write[open] .exp-sync-write__chevron { transform: rotate(0deg); }
.exp-sync-write__body {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--text-2); line-height: 1.55;
}
.exp-sync-write__body p { margin: 0 0 10px; }
.exp-sync-write__steps {
  margin: 0 0 12px; padding-left: 20px;
  font-size: 12.5px; color: var(--text-2);
}
.exp-sync-write__steps li { margin-bottom: 4px; }
.exp-sync-write__steps code {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
  background: var(--soft); border: 1px solid var(--soft-2);
  padding: 1px 5px; border-radius: 3px; color: var(--accent);
}
.exp-sync-write__code-wrap {
  position: relative;
  margin-bottom: 12px;
}
.exp-sync-write__code {
  margin: 0;
  background: #0B1220; color: #E2E8F0;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; line-height: 1.5;
  overflow-x: auto; max-height: 280px;
}
.exp-sync-write__code code { background: none; padding: 0; color: inherit; }
.exp-sync-write__copy {
  position: absolute; top: 8px; right: 8px;
  background: #1E293B; color: #F1F5F9;
  border: 1px solid #334155; border-radius: 4px;
  padding: 4px 10px; cursor: pointer;
  font: inherit; font-size: 11.5px;
  z-index: 1;
}
.exp-sync-write__copy:hover { background: #334155; }
.exp-sync-writeurl {
  width: 100%; box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: 13px;
  padding: 9px 12px;
  font-family: 'JetBrains Mono', monospace;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.exp-sync-writeurl:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 58, 95, 0.12);
}

/* ----- media library (collapsible <details>) ----- */
.exp-media-card { padding: 0; overflow: hidden; }
.exp-media-card[open] .exp-media-card__chevron { transform: rotate(0deg); }
.exp-media-card .exp-media-card__chevron { transform: rotate(-90deg); }
.exp-media-card__summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.exp-media-card__summary::-webkit-details-marker { display: none; }
.exp-media-card[open] .exp-media-card__summary {
  border-bottom-color: var(--rule);
  background: var(--bg-alt);
}
.exp-media-card__summary:hover { background: var(--bg-alt); }
.exp-media-card__chevron {
  font-size: 14px;
  color: var(--text-3);
  transition: transform 160ms ease;
  display: inline-block;
  line-height: 1;
}
.exp-media-card__title { flex: 1 1 auto; min-width: 0; }
.exp-media-card__title h2 {
  font-size: 15px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.02em; margin: 0 0 2px;
}
.exp-media-card__title p { margin: 0; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.exp-media-card__body { padding: 18px 22px 22px; }

.exp-media-count {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 500; color: var(--text-2);
  padding: 4px 10px;
  background: #fff; border: 1px solid var(--rule); border-radius: 999px;
  white-space: nowrap;
}

.exp-media-drop {
  display: flex; align-items: center; justify-content: center;
  padding: 26px 18px;
  border: 1.5px dashed var(--rule-2);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
  margin-bottom: 14px;
}
.exp-media-drop:hover,
.exp-media-drop:focus-visible {
  border-color: var(--accent); color: var(--accent); outline: none;
  background: #fff;
}
.exp-media-drop.is-dragging {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent);
  border-style: solid;
}
.exp-media-drop__inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  pointer-events: none;
}
.exp-media-drop__primary {
  font-weight: 600; font-size: 14px; color: inherit;
}
.exp-media-drop__hint { font-size: 11.5px; color: var(--text-3); }

.exp-media-status {
  font-size: 12.5px;
  padding: 7px 12px; border-radius: var(--radius);
  margin-bottom: 12px;
}
.exp-media-status[data-kind="info"] { color: var(--accent); background: var(--soft); border: 1px solid var(--soft-2); }
.exp-media-status[data-kind="ok"]   { color: #166534; background: #ECFDF5; border: 1px solid #BBF7D0; }
.exp-media-status[data-kind="warn"] { color: #B45309; background: #FFFBEB; border: 1px solid #FDE68A; }
.exp-media-status[data-kind="err"]  { color: #B42318; background: #FEF2F2; border: 1px solid #FECACA; }

.exp-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.exp-media-empty {
  padding: 22px; text-align: center;
  color: var(--text-2); font-size: 13px;
  border: 1px dashed var(--rule-2); border-radius: var(--radius);
  background: var(--bg-alt);
}

.exp-media-item {
  position: relative;
  margin: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 10px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.exp-media-item:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(22, 58, 95, 0.08); }
.exp-media-thumb {
  width: 50px; height: 50px;
  min-width: 50px; min-height: 50px;
  max-width: 50px; max-height: 50px;
  background: var(--soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex: 0 0 50px;
}
.exp-media-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.exp-media-thumb.is-broken::before {
  content: "?"; font-size: 18px; font-weight: 700;
  color: var(--text-3);
}
.exp-media-meta {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.exp-media-name {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.exp-media-sub { font-size: 10.5px; color: var(--text-3); }
.exp-media-actions {
  display: flex; gap: 4px;
  flex: 0 0 auto;
  opacity: 0;
  transition: opacity 140ms ease;
}
.exp-media-item:hover .exp-media-actions,
.exp-media-item:focus-within .exp-media-actions { opacity: 1; }
.exp-media-actbtn {
  background: #fff; color: var(--text);
  border: 1px solid var(--rule); border-radius: 4px;
  width: 24px; height: 24px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.exp-media-actbtn:hover { color: var(--accent); border-color: var(--accent); }
.exp-media-actbtn--danger:hover { color: #B42318; border-color: #FCA5A5; background: #FEF2F2; }

/* ----- logo picker (in project editor modal) ----- */
.exp-logo-picker { display: flex; gap: 10px; align-items: center; }
.exp-logo-select { flex: 1 1 auto; min-width: 0; }
.exp-logo-preview {
  width: 38px; height: 38px;
  min-width: 38px;
  border-radius: 4px;
  background: var(--soft);
  border: 1px solid var(--rule);
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.exp-logo-preview img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.exp-logo-preview:empty::after {
  content: ""; display: block; width: 14px; height: 14px;
  background: linear-gradient(135deg, transparent 45%, var(--rule-2) 45%, var(--rule-2) 55%, transparent 55%);
}

/* ----- project library / grid ----- */
.exp-db-card {
  padding: 22px 26px 24px;
  /* Clip the table so its horizontal scroll lives inside the card, not the
     page. The combination of overflow:hidden here + overflow:auto on the
     table wrap + min-width:0 on the whole chain is what isolates the grid. */
  overflow: hidden;
  min-width: 0;
}
.exp-db-card__head { align-items: center; }
.exp-db-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.exp-db-toolbar__minor { margin-left: 4px; }
.exp-db-search {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: 13px;
  padding: 7px 11px; min-width: 240px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.exp-db-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 58, 95, 0.12); }
.exp-db-search::placeholder { color: var(--text-3); }

.exp-db-menu { position: relative; }
.exp-db-menu > summary { list-style: none; cursor: pointer; }
.exp-db-menu > summary::-webkit-details-marker { display: none; }
.exp-db-menu__panel {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  padding: 6px; min-width: 200px; z-index: 5;
  display: flex; flex-direction: column;
}
.exp-db-menu__panel button {
  background: none; border: 0; padding: 7px 10px; text-align: left;
  font: inherit; font-size: 13px; color: var(--text); cursor: pointer;
  border-radius: 4px;
}
.exp-db-menu__panel button:hover { background: var(--soft); color: var(--accent); }

.btn--danger {
  background: #FEF2F2;
  color: #B42318;
  border: 1px solid #FECACA;
}
.btn--danger:hover:not(:disabled) { background: #FEE2E2; border-color: #FCA5A5; }
.btn--danger:disabled { opacity: 0.45; cursor: not-allowed; }

.exp-db-flash { padding: 9px 14px; border-radius: var(--radius); font-size: 13px; margin: 0 0 12px; }
.exp-db-flash[data-kind="ok"]   { color: #166534; background: #ECFDF5; border: 1px solid #BBF7D0; }
.exp-db-flash[data-kind="err"]  { color: #B42318; background: #FEF2F2; border: 1px solid #FECACA; }
.exp-db-flash[data-kind="warn"] { color: #B45309; background: #FFFBEB; border: 1px solid #FDE68A; }

.exp-db-table-wrap {
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  max-height: 70vh;
  background: #fff;
  /* Scroll boundary — must allow shrinking under flex/grid parents. */
  min-width: 0; max-width: 100%;
}
.exp-db-table {
  border-collapse: separate; border-spacing: 0;
  font-size: 12.5px; color: var(--text);
  /* No width:100% — let the table take its natural width and let the wrap
     handle horizontal scrolling. Otherwise narrow viewports fight the table. */
}
.exp-db-th, .exp-db-td {
  padding: 7px 10px; vertical-align: top;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  /* Wrap text inside resized cells so contents flow to the column width
     rather than spilling horizontally. Long words break gracefully. */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.exp-db-th {
  background: var(--bg-alt);
  position: sticky; top: 0; z-index: 2;
  font-weight: 700; color: var(--accent);
  font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom: 1px solid var(--rule-2);
}
.exp-db-th--select, .exp-db-th--actions { width: 1%; }
.exp-db-th { position: relative; }
.exp-db-sort {
  background: none; border: 0; color: inherit; cursor: pointer; padding: 0;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
}

/* Column-resize handle — small invisible drag strip on each column's right
   edge. Tinted on hover so users can find it; the cursor change is the
   primary affordance. */
.exp-db-resizer {
  position: absolute;
  top: 0; right: -3px; bottom: 0;
  width: 7px;
  cursor: col-resize;
  user-select: none;
  z-index: 3;
  background: transparent;
  transition: background-color 120ms ease;
}
.exp-db-resizer::after {
  content: ""; position: absolute;
  top: 25%; bottom: 25%; left: 3px; width: 1px;
  background: transparent;
  transition: background-color 120ms ease;
}
.exp-db-resizer:hover::after { background: var(--accent); }
.exp-db-th--select .exp-db-resizer,
.exp-db-th--actions .exp-db-resizer { display: none; }

body.exp-db-resizing,
body.exp-db-resizing * { cursor: col-resize !important; user-select: none !important; }
body.exp-db-resizing .exp-db-table-wrap { pointer-events: none; }
body.exp-db-resizing .exp-db-resizer { pointer-events: auto; }

/* Cells wrap by default — the resizer dictates the column width and content
   flows to that width. Drop the old nowrap/ellipsis rules so the grid reads
   as an Airtable-style spreadsheet rather than a marquee. */
.exp-db-td--chips { word-break: normal; }
.exp-db-sort::after { content: " ↕"; color: var(--text-3); }
.exp-db-sort--active[data-dir="asc"]::after  { content: " ↑"; color: var(--accent); }
.exp-db-sort--active[data-dir="desc"]::after { content: " ↓"; color: var(--accent); }
.exp-db-filters th {
  background: #fff;
  position: sticky; top: 28px; z-index: 1;
  padding: 4px 6px;
  border-bottom: 1px solid var(--rule);
}
.exp-db-filterinput {
  width: 100%; box-sizing: border-box;
  background: #fff; border: 1px solid var(--rule); border-radius: 4px;
  color: var(--text); font: inherit; font-size: 11.5px;
  padding: 3px 6px;
  min-width: 0; /* Let inputs shrink to fit the column width */
}
.exp-db-filterinput::placeholder { color: var(--text-3); }
.exp-db-filterinput:focus { outline: none; border-color: var(--accent); }
.exp-db-regex-toggle {
  font-size: 11px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none;
}
.exp-db-regex-toggle input { accent-color: var(--accent); }

.exp-db-row:hover .exp-db-td { background: var(--bg-alt); }
.exp-db-row--selected .exp-db-td { background: var(--soft); }
/* Editable cells get a double-click cursor hint; the select + actions cells
   keep the default pointer/cursor for their controls. */
.exp-db-td:not(.exp-db-td--select):not(.exp-db-td--actions) { cursor: cell; }
.exp-db-td--editing {
  padding: 4px 6px !important;
  background: #fff !important;
  box-shadow: inset 0 0 0 2px var(--accent);
  white-space: normal;
}
.exp-db-td--saving { opacity: 0.6; pointer-events: none; }
.exp-db-cell-editor {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 4px 6px;
  line-height: 1.4;
  resize: vertical;
}
.exp-db-cell-editor:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(22, 58, 95, 0.12);
}
textarea.exp-db-cell-editor { min-height: 64px; }

/* Default widths — when a user hasn't manually resized a column, these
   give the grid a sensible first paint. After resizing, the user's width
   wins (applied inline by the resize handler) and these defaults no longer
   apply. */
.exp-db-td--title {
  color: var(--text); font-weight: 600;
  max-width: 320px;
}
.exp-db-td--long {
  max-width: 320px;
  color: var(--text-2);
}
.exp-db-td--chips {
  max-width: 240px;
  line-height: 1.5;
}
.exp-db-td--actions { white-space: nowrap; }
.exp-db-td--logo { width: 40px; white-space: nowrap; }
/* Every cell in the Logo column renders the same rectangle, whether it
   holds an image or the client-initials placeholder. The <img> fills the
   wrapper via object-fit:cover so source dimensions don't leak through. */
.exp-db-logo {
  display: inline-block;
  width: 28px; height: 28px;
  min-width: 28px; min-height: 28px;
  max-width: 28px; max-height: 28px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--rule);
  vertical-align: middle;
  line-height: 0;
}
.exp-db-logo > img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  /* Restrained desaturated look so the column reads as a uniform list of
     brand marks rather than a parade of color blocks. */
  filter: grayscale(100%) contrast(0.95);
}
.exp-db-logo--placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 10px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}
.exp-db-empty-cell { color: var(--text-3); font-style: italic; }
.exp-db-chip {
  display: inline-block;
  font-size: 10.5px;
  margin: 1px 3px 1px 0;
  padding: 1px 7px;
  border: 1px solid var(--soft-2);
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
}
.exp-db-status {
  display: inline-block; padding: 1.5px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid var(--rule);
  color: var(--text-2); background: var(--bg-alt);
}
.exp-db-status--published { border-color: #BBF7D0; color: #166534; background: #ECFDF5; }
.exp-db-status--internal  { border-color: var(--soft-2); color: var(--accent); background: var(--soft); }
.exp-db-status--draft     { border-color: #FDE68A; color: #B45309; background: #FFFBEB; }
.exp-db-status--archived  { border-color: var(--rule-2); color: var(--text-3); background: var(--bg-alt); }

.exp-db-actbtn {
  background: var(--bg-alt); color: var(--accent);
  border: 1px solid var(--rule);
  width: 24px; height: 24px; border-radius: 4px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; margin-right: 3px;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.exp-db-actbtn:hover { background: var(--soft); border-color: var(--accent); }
.exp-db-actbtn--danger:hover { background: #FEE2E2; color: #B42318; border-color: #FCA5A5; }
.exp-db-noresults { text-align: center; padding: 18px; color: var(--text-3); font-style: italic; }
.exp-db-empty {
  padding: 40px 24px; text-align: center;
  color: var(--text-2); font-size: 13.5px; line-height: 1.6;
  border-top: 1px dashed var(--rule-2);
  background: var(--bg-alt);
}

/* ----- modal (editor + import) ----- */
.exp-modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.exp-modal[hidden] { display: none; }
.exp-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(11, 29, 46, 0.45);
  backdrop-filter: blur(4px);
}
.exp-modal__panel {
  position: relative; z-index: 1;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  width: min(720px, 100%); max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 60px rgba(11, 29, 46, 0.20);
  overflow: hidden;
}
.exp-modal__panel--wide { width: min(920px, 100%); }
.exp-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-alt);
}
.exp-modal__head h3 { margin: 0; font-size: 15px; color: var(--text); font-weight: 700; }
.exp-modal__close {
  background: none; border: 0; color: var(--text-3); font-size: 22px;
  cursor: pointer; padding: 0 6px; line-height: 1;
  border-radius: 4px;
}
.exp-modal__close:hover { color: var(--text); background: var(--soft); }
.exp-modal__foot {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--rule);
  background: var(--bg-alt);
}
.exp-modal__foot .exp-editor-msg { flex: 1 1 auto; font-size: 12.5px; color: var(--text-2); }
.exp-editor-form { padding: 20px 22px; overflow-y: auto; flex: 1 1 auto; }
.exp-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.exp-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.exp-field--wide { grid-column: 1 / -1; }
.exp-field__label {
  font-size: 11px; font-weight: 700;
  color: var(--text-2); letter-spacing: 0.06em; text-transform: uppercase;
}
.exp-field input, .exp-field textarea, .exp-field select {
  background: #fff;
  border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: 13.5px;
  padding: 8px 12px; line-height: 1.5;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.exp-field input:focus, .exp-field textarea:focus, .exp-field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 58, 95, 0.12);
}
.exp-field textarea { resize: vertical; }

/* ----- import preview ----- */
.exp-import-body { padding: 18px 22px; overflow-y: auto; flex: 1 1 auto; }
.exp-import-help { margin: 0 0 14px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.exp-import-help code {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
  background: var(--soft); border: 1px solid var(--soft-2);
  padding: 1px 5px; border-radius: 3px; color: var(--accent);
}
.exp-import-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; align-items: flex-start; }
.exp-import-file {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; cursor: pointer;
  background: var(--soft); border: 1px dashed var(--accent); border-radius: var(--radius);
  font-size: 13px; color: var(--accent); font-weight: 600;
  transition: background-color 140ms ease;
}
.exp-import-file:hover { background: var(--soft-2); }
.exp-import-file input { display: none; }
.exp-import-mode, .exp-import-dup {
  margin: 0; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 8px 14px;
  background: var(--bg-alt);
}
.exp-import-mode legend, .exp-import-dup legend {
  font-size: 10.5px; color: var(--text-2); padding: 0 4px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.exp-import-mode label, .exp-import-dup label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text); margin-right: 12px; cursor: pointer;
}
.exp-import-mode input, .exp-import-dup input { accent-color: var(--accent); }
.exp-import-preview h4 {
  margin: 0 0 6px;
  font-size: 11px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.exp-import-preview-meta {
  font-size: 11.5px; color: var(--text-3); margin-left: 8px;
  font-weight: 400; text-transform: none; letter-spacing: 0;
}
.exp-import-preview-wrap {
  overflow: auto; max-height: 280px;
  border: 1px solid var(--rule); border-radius: var(--radius);
}
.exp-import-preview-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; }
.exp-import-preview-table th, .exp-import-preview-table td {
  padding: 6px 9px; white-space: nowrap;
  border-bottom: 1px solid var(--rule);
  color: var(--text); text-align: left;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis;
}
.exp-import-preview-table th {
  background: var(--bg-alt); color: var(--accent); font-weight: 700;
  position: sticky; top: 0;
  font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
}
.exp-import-errors { margin-top: 12px; font-size: 12.5px; color: #B42318; }
.exp-import-errlist { margin: 4px 0 0; padding-left: 18px; }
.exp-import-errlist li { margin-bottom: 2px; }
.exp-import-note { color: #B45309; font-size: 12px; margin: 6px 0 0; }

/* ============================================================
   BlkBx Energy — admin/energy
   Industrial dark theme. Control-room aesthetic.
   Scoped under body.energy-page so the rest of the admin stays
   on its existing light palette.
   ============================================================ */

body.energy-page {
  --en-bg:        #0A0A0A;
  --en-panel:     #111111;
  --en-surface:   #1A1A1A;
  --en-border:    #2A2A2A;
  --en-border-2:  #3A3A3A;
  --en-yellow:    #F0C419;
  --en-blue:      #00D4FF;
  --en-red:       #FF4444;
  --en-green:     #22C55E;
  --en-text:      #F5F5F5;
  --en-text-2:    #888888;
  --en-text-3:    #555555;
  --en-mono-disp: 'DM Mono', 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --en-sub:       'Syne', 'Inter', system-ui, sans-serif;
  --en-body:      'IBM Plex Sans', 'Inter', system-ui, sans-serif;
  --en-mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  background: var(--en-bg);
  color: var(--en-text);
  font-family: var(--en-body);
}

/* Lift the admin shell so the energy page can render full-bleed
   sections under the navbar. */
body.energy-page .admin-main { padding: 0 0 0; background: var(--en-bg); }
body.energy-page .admin-main > .container { max-width: none; padding: 0; }
body.energy-page .adminbar { background: var(--en-panel); border-bottom: 1px solid var(--en-border); }
body.energy-page .adminbar a,
body.energy-page .adminbar__user,
body.energy-page .adminbar__brand { color: var(--en-text); }
body.energy-page .adminbar a.active { color: var(--en-yellow); }

/* Shared building blocks */
body.energy-page .container {
  max-width: 1280px; margin: 0 auto; padding: 0 28px;
}
body.energy-page .en-section { padding: 96px 0; position: relative; }
body.energy-page .en-section + .en-section { border-top: 1px solid var(--en-border); }
body.energy-page .en-section-label {
  font-family: var(--en-mono-disp);
  font-size: 11px; letter-spacing: 0.18em; color: var(--en-text-2);
  text-transform: uppercase;
  margin-bottom: 18px;
}
body.energy-page .en-section-label--center { text-align: center; }
body.energy-page .en-section-headline {
  font-family: var(--en-sub);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--en-text);
  margin: 0 0 24px;
}
body.energy-page .en-section-headline--center { text-align: center; }
body.energy-page .en-section-body {
  font-family: var(--en-body);
  font-size: 15px; line-height: 1.65; color: var(--en-text-2);
  max-width: 680px;
}
body.energy-page .en-section-body--center { margin-left: auto; margin-right: auto; text-align: center; }
body.energy-page .en-accent-line { color: var(--en-yellow); font-weight: 600; }
body.energy-page .en-accent { color: var(--en-yellow); }
body.energy-page .en-revealed { animation: en-fade-up 700ms cubic-bezier(.2,.9,.2,1) var(--en-stagger, 0ms) both; }
[data-energy-reveal] { opacity: 0; }
.en-revealed { opacity: 1; }
@keyframes en-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* Buttons */
body.energy-page .en-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--en-mono-disp); font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  padding: 14px 22px;
  border: 1px solid transparent; border-radius: 2px;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
body.energy-page .en-btn--primary {
  background: var(--en-yellow); color: #000; border-color: var(--en-yellow);
}
body.energy-page .en-btn--primary:hover { box-shadow: 0 0 22px rgba(240, 196, 25, 0.45); transform: translateY(-1px); }
body.energy-page .en-btn--ghost {
  background: transparent; color: var(--en-text); border-color: var(--en-border-2);
}
body.energy-page .en-btn--ghost:hover { border-color: var(--en-yellow); color: var(--en-yellow); }

/* ----- SECTION 1: hero ----- */
body.energy-page .en-hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  background:
    radial-gradient(1000px 600px at 20% 0%, rgba(240, 196, 25, 0.08) 0%, transparent 65%),
    radial-gradient(900px 600px at 100% 100%, rgba(0, 212, 255, 0.07) 0%, transparent 60%),
    var(--en-bg);
}
.en-hero__grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(240, 196, 25, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 196, 25, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.en-hero__flow {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.en-flow__edges path {
  fill: none; stroke: url(#en-flow-yellow);
  stroke-width: 1.8; stroke-linecap: round;
  filter: url(#en-flow-glow);
}
.en-flow__edges path:nth-of-type(even) { stroke: url(#en-flow-blue); }
.en-flow-node circle, .en-flow-node rect {
  fill: rgba(26, 26, 26, 0.92);
  stroke: var(--en-border-2);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 12px rgba(240, 196, 25, 0.15));
}
.en-flow-node--core circle { stroke: var(--en-yellow); stroke-width: 1.8; }
.en-flow-node--grid rect { stroke: var(--en-blue); stroke-width: 1.6; }
.en-flow-node__label {
  fill: var(--en-text-2);
  font: 600 10px var(--en-mono-disp);
  letter-spacing: 0.12em;
  text-anchor: middle;
}
.en-flow-node__icon {
  fill: var(--en-yellow);
  font: 18px var(--en-body);
  text-anchor: middle;
}
.en-flow-node--core .en-flow-node__icon { fill: var(--en-yellow); font-size: 22px; }
.en-flow-node--grid + * .en-flow-node__icon { fill: var(--en-blue); }

.en-hero__content {
  position: relative; z-index: 2;
  padding: 80px 28px;
  max-width: 1100px;
}
.en-hero__headline {
  font-family: var(--en-mono-disp); font-weight: 500;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.1; letter-spacing: -0.01em;
  color: var(--en-text);
  margin: 0 0 28px;
  max-width: 900px;
}
.en-hero__sub {
  font-family: var(--en-body); font-size: 16px; line-height: 1.65;
  color: var(--en-text-2);
  max-width: 760px;
  margin: 0 0 40px;
}
.en-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 820px;
  margin: 0 0 44px;
}
@media (max-width: 720px) { .en-hero__stats { grid-template-columns: repeat(2, 1fr); } }
.en-stat {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 18px 20px;
  position: relative;
}
.en-stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--en-yellow) 30%, var(--en-yellow) 70%, transparent 100%);
  opacity: 0.6;
}
.en-stat__num {
  font-family: var(--en-mono);
  font-size: 38px; font-weight: 600;
  color: var(--en-yellow);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.en-stat__label {
  font-family: var(--en-mono-disp);
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--en-text-2);
  text-transform: uppercase;
  margin-top: 8px;
}
.en-hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ----- SECTION 2: problem ----- */
.en-problem__inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
}
@media (max-width: 900px) { .en-problem__inner { grid-template-columns: 1fr; gap: 32px; } }
.en-problem__right { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .en-problem__right { grid-template-columns: 1fr; } }
.en-pain-card {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 22px 22px 24px;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  position: relative;
}
.en-pain-card:hover {
  border-color: var(--en-yellow);
  box-shadow: 0 0 0 1px rgba(240, 196, 25, 0.18), 0 12px 30px rgba(240, 196, 25, 0.06);
}
.en-pain-card__id {
  font-family: var(--en-mono-disp);
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--en-yellow);
  text-transform: uppercase;
  display: block; margin-bottom: 10px;
}
.en-pain-card__title {
  font-family: var(--en-sub); font-weight: 700; font-size: 19px;
  color: var(--en-text); margin: 0 0 8px;
}
.en-pain-card p { font-size: 14px; line-height: 1.6; color: var(--en-text-2); margin: 0; }

/* ----- SECTION 3: definition ----- */
.en-definition { text-align: center; }
.en-definition__statement {
  font-family: var(--en-sub);
  font-size: clamp(20px, 2.4vw, 28px); line-height: 1.45; font-weight: 600;
  max-width: 920px; margin: 0 auto 40px;
  color: var(--en-text);
}
.en-spec-card {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 22px 26px;
  text-align: left;
  max-width: 720px; margin: 0 auto 44px;
  position: relative;
}
.en-spec-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 4px; bottom: 0;
  background: var(--en-yellow);
}
.en-spec-card pre {
  margin: 0;
  font-family: var(--en-mono);
  font-size: 13px; line-height: 1.7;
  color: var(--en-text);
  white-space: pre-wrap;
}
.en-spec-key { color: var(--en-yellow); }
.en-spec-false { color: var(--en-red); }
.en-spec-comment { color: var(--en-text-3); }

.en-principles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 12px;
}
@media (max-width: 900px) { .en-principles { grid-template-columns: repeat(2, 1fr); } }
.en-principle {
  background: var(--en-panel);
  border: 1px solid var(--en-border);
  padding: 22px 20px;
  text-align: center;
}
.en-principle__sigil {
  display: inline-block; font-size: 24px; color: var(--en-yellow);
  margin-bottom: 10px; font-family: var(--en-body);
}
.en-principle h4 {
  font-family: var(--en-mono-disp);
  font-size: 12px; letter-spacing: 0.14em;
  color: var(--en-text); margin: 0 0 8px;
}
.en-principle p { font-size: 13px; line-height: 1.55; color: var(--en-text-2); margin: 0; }

/* ----- SECTION 4: architecture pipeline ----- */
.en-pipeline {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 32px 0 56px;
}
.en-pipeline__node {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 14px 22px;
  font-family: var(--en-mono-disp); font-size: 13px;
  color: var(--en-text-2);
  letter-spacing: 0.04em;
  min-width: 280px; text-align: center;
  transition: border-color 320ms ease, color 320ms ease, box-shadow 320ms ease;
}
.en-pipeline__node.is-active {
  border-color: var(--en-yellow);
  color: var(--en-yellow);
  box-shadow: 0 0 0 1px rgba(240, 196, 25, 0.20), 0 0 18px rgba(240, 196, 25, 0.12);
}
.en-pipeline__node--core { background: var(--en-panel); }
.en-pipeline__arrow { color: var(--en-text-3); font-family: var(--en-mono); font-size: 14px; }
.en-pipeline__split { display: flex; gap: 220px; }
.en-pipeline__row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 720px) {
  .en-pipeline__node { min-width: 0; width: 100%; }
  .en-pipeline__split { gap: 140px; }
}

.en-rolling-horizon {
  background: var(--en-panel);
  border: 1px solid var(--en-border);
  padding: 28px 30px;
  margin-top: 40px;
}
.en-rolling-horizon h3 {
  font-family: var(--en-mono-disp);
  font-size: 13px; letter-spacing: 0.15em;
  color: var(--en-yellow);
  margin: 0 0 12px;
}
.en-rolling-horizon__intro { color: var(--en-text-2); margin: 0 0 18px; font-size: 14px; }
.en-rolling-horizon__steps {
  list-style: none; padding: 0; margin: 0 0 18px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px;
}
@media (max-width: 720px) { .en-rolling-horizon__steps { grid-template-columns: 1fr; } }
.en-rolling-horizon__steps li {
  font-family: var(--en-mono); font-size: 13px;
  color: var(--en-text); display: flex; gap: 12px; align-items: baseline;
}
.en-step-num { color: var(--en-yellow); }
.en-rolling-horizon__tag {
  font-family: var(--en-mono-disp);
  font-size: 13px; color: var(--en-text-2);
  border-top: 1px solid var(--en-border);
  padding-top: 14px; margin: 0;
}

/* ----- SECTION 5: modules grid ----- */
.en-modules__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 32px;
}
@media (max-width: 1000px) { .en-modules__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .en-modules__grid { grid-template-columns: 1fr; } }
.en-module {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 22px 22px 24px;
  transition: border-color 220ms ease, box-shadow 220ms ease;
  display: flex; flex-direction: column;
  min-height: 280px;
}
.en-module:hover {
  border-color: var(--en-yellow);
  box-shadow: 0 0 0 1px rgba(240, 196, 25, 0.20);
}
.en-module__head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.en-module__id {
  font-family: var(--en-mono); font-size: 11px;
  color: var(--en-yellow);
  background: rgba(240, 196, 25, 0.08);
  border: 1px solid rgba(240, 196, 25, 0.25);
  padding: 2px 8px;
  letter-spacing: 0.08em;
}
.en-module__name {
  font-family: var(--en-sub); font-weight: 700; font-size: 15px;
  color: var(--en-text); margin: 0;
  letter-spacing: 0.02em;
}
.en-module__lead { font-size: 13.5px; color: var(--en-text-2); line-height: 1.55; margin: 0 0 12px; }
.en-module__detail { font-size: 12.5px; color: var(--en-text-2); line-height: 1.6; margin: 0 0 16px; }
.en-module__arrow { color: var(--en-yellow); margin-right: 4px; }
.en-module__out {
  margin-top: auto;
  border-top: 1px solid var(--en-border);
  padding-top: 12px;
}
.en-module__out-label {
  font-family: var(--en-mono-disp);
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--en-blue);
}
.en-module__out p { margin: 4px 0 0; font-size: 13px; color: var(--en-text); line-height: 1.5; }

/* ----- SECTION 6: operating modes ----- */
.en-modes__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 32px;
}
@media (max-width: 900px) { .en-modes__grid { grid-template-columns: 1fr; } }
.en-mode {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 26px 24px 28px;
  display: flex; flex-direction: column;
}
.en-mode__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.en-mode__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--en-text-3);
  box-shadow: 0 0 0 2px var(--en-bg), 0 0 0 3px var(--en-text-3);
}
.en-mode__dot--core { background: var(--en-yellow); box-shadow: 0 0 0 2px var(--en-bg), 0 0 0 3px var(--en-yellow), 0 0 14px rgba(240, 196, 25, 0.6); }
.en-mode__num {
  font-family: var(--en-mono-disp);
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--en-text-2);
}
.en-mode__name {
  font-family: var(--en-mono-disp);
  font-size: 18px; letter-spacing: 0.06em;
  color: var(--en-text); margin: 0;
  flex-basis: 100%;
}
.en-mode--core .en-mode__name { color: var(--en-yellow); }
.en-mode__lead { font-size: 14px; color: var(--en-text); line-height: 1.55; margin: 0 0 16px; }
.en-mode__list { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.en-mode__list li { font-size: 13px; color: var(--en-text-2); line-height: 1.55; padding-left: 16px; position: relative; }
.en-mode__list li::before { content: "·"; position: absolute; left: 4px; color: var(--en-yellow); }
.en-mode__list--quotes li { font-style: italic; color: var(--en-text); }
.en-mode__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.en-tag {
  font-family: var(--en-mono-disp);
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--en-text-2);
  background: var(--en-panel);
  border: 1px solid var(--en-border);
  padding: 3px 8px;
  text-transform: uppercase;
}
.en-tag--green { color: var(--en-green); border-color: rgba(34, 197, 94, 0.30); background: rgba(34, 197, 94, 0.07); }
.en-tag--yellow { color: var(--en-yellow); border-color: rgba(240, 196, 25, 0.30); background: rgba(240, 196, 25, 0.07); }

/* ----- SECTION 7: safety gate ----- */
.en-terminal {
  background: #050505;
  border: 1px solid var(--en-border);
  margin: 32px auto 32px;
  max-width: 800px;
  font-family: var(--en-mono);
  position: relative;
  overflow: hidden;
}
.en-terminal::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0px,
    rgba(255,255,255,0) 2px,
    rgba(255,255,255,0.018) 3px,
    rgba(255,255,255,0) 4px
  );
  pointer-events: none;
}
.en-terminal__head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--en-border);
  background: var(--en-panel);
}
.en-terminal__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--en-border-2);
}
.en-terminal__dot:nth-of-type(1) { background: #5a1a1a; }
.en-terminal__dot:nth-of-type(2) { background: #5a4a1a; }
.en-terminal__dot:nth-of-type(3) { background: #1a5a2a; }
.en-terminal__title {
  font-family: var(--en-mono);
  font-size: 11.5px;
  color: var(--en-text-2);
  margin-left: 8px;
}
.en-terminal__body {
  padding: 18px 22px;
  font-size: 13.5px;
  line-height: 1.85;
}
.en-terminal__line {
  display: flex; align-items: baseline; gap: 12px;
  color: var(--en-text);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.en-terminal__line.is-shown { opacity: 1; transform: translateY(0); }
.en-terminal__check { color: var(--en-green); font-weight: 700; }
.en-terminal__arrow { color: var(--en-yellow); }
.en-terminal__line--ok { color: var(--en-yellow); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--en-border); }

.en-quote {
  font-family: var(--en-sub);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: var(--en-yellow);
  text-align: center;
  max-width: 760px;
  margin: 40px auto 0;
  padding: 24px 0;
  border-top: 1px solid var(--en-border);
  border-bottom: 1px solid var(--en-border);
  font-style: italic;
}

/* ----- SECTION 8: markets ----- */
.en-markets__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 32px;
}
@media (max-width: 1000px) { .en-markets__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .en-markets__grid { grid-template-columns: 1fr; } }
.en-market {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 22px 22px 24px;
  transition: border-color 220ms ease;
}
.en-market:hover { border-color: var(--en-yellow); }
.en-market__name {
  font-family: var(--en-mono-disp);
  font-size: 13px; letter-spacing: 0.10em;
  color: var(--en-yellow);
  margin: 0 0 14px;
}
.en-market__assets { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.en-market__assets li {
  font-family: var(--en-body);
  font-size: 12px;
  color: var(--en-text-2);
  background: var(--en-panel);
  border: 1px solid var(--en-border);
  padding: 3px 9px;
}

/* ----- SECTION 9: case studies ----- */
.en-cases__tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--en-border);
  margin: 24px 0 32px;
  flex-wrap: wrap;
}
.en-cases__tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 22px;
  font-family: var(--en-mono-disp);
  font-size: 12.5px;
  letter-spacing: 0.10em;
  color: var(--en-text-2);
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 140ms ease, border-color 140ms ease;
}
.en-cases__tab:hover { color: var(--en-text); }
.en-cases__tab.is-active { color: var(--en-yellow); border-bottom-color: var(--en-yellow); }
.en-case {
  background: var(--en-panel);
  border: 1px solid var(--en-border);
  padding: 28px 30px;
}
.en-case[hidden] { display: none; }
.en-case__head h3 {
  font-family: var(--en-sub); font-weight: 700; font-size: 24px;
  margin: 0 0 6px; color: var(--en-text);
}
.en-case__head p {
  font-family: var(--en-mono);
  font-size: 12.5px; color: var(--en-text-2);
  margin: 0 0 22px;
  line-height: 1.55;
}
.en-case__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  margin-bottom: 22px;
}
@media (max-width: 800px) { .en-case__grid { grid-template-columns: 1fr; } }
.en-case__col h4,
.en-case__outhdr {
  font-family: var(--en-mono-disp);
  font-size: 11px; letter-spacing: 0.16em;
  color: var(--en-yellow);
  margin: 0 0 12px;
  text-transform: uppercase;
}
.en-case__col ul, .en-case__outputs {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.en-case__col ul li, .en-case__outputs li {
  font-size: 13.5px; color: var(--en-text); line-height: 1.55;
  padding-left: 14px; position: relative;
}
.en-case__col ul li::before, .en-case__outputs li::before {
  content: "—"; position: absolute; left: 0; color: var(--en-text-3);
}
.en-case__actions li { color: var(--en-text); }
.en-case__params {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 22px 0;
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 18px 20px;
  font-family: var(--en-mono);
}
@media (max-width: 720px) { .en-case__params { grid-template-columns: repeat(2, 1fr); } }
.en-case__params > div { display: flex; justify-content: space-between; gap: 10px; }
.en-case__pk { color: var(--en-text-2); font-size: 12px; letter-spacing: 0.06em; }
.en-case__pv { color: var(--en-yellow); font-size: 13px; }
.en-case__outhdr { margin-top: 22px; }
.en-case__critical {
  font-family: var(--en-mono);
  font-size: 13px;
  background: rgba(255, 68, 68, 0.06);
  border: 1px solid rgba(255, 68, 68, 0.35);
  color: var(--en-text);
  padding: 14px 16px;
  margin: 0 0 22px;
  border-left: 4px solid var(--en-red);
}
.en-case__critical strong { color: var(--en-red); display: block; margin-bottom: 4px; letter-spacing: 0.06em; }
.en-tier-table {
  display: grid; gap: 6px;
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 16px 18px;
  margin: 0 0 22px;
  font-family: var(--en-mono);
  font-size: 13px;
}
.en-tier {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 14px;
  align-items: center;
}
.en-tier__t { color: var(--en-yellow); font-weight: 700; }
.en-tier__rule { color: var(--en-text-2); }
.en-tier__rule--never { color: var(--en-red); }
.en-tier__rule--first { color: var(--en-text-3); }
.en-case__why {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 18px 22px;
  margin: 0 0 22px;
}
.en-case__why h4 {
  font-family: var(--en-mono-disp);
  font-size: 11px; letter-spacing: 0.16em;
  color: var(--en-yellow);
  margin: 0 0 8px;
}
.en-case__why p { font-size: 13.5px; line-height: 1.6; color: var(--en-text-2); margin: 0 0 8px; }

/* ----- SECTION 10: tech specs ----- */
.en-tech__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-top: 28px;
}
@media (max-width: 900px) { .en-tech__grid { grid-template-columns: 1fr; } }
.en-tech__col {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 22px 24px;
}
.en-tech__col h3 {
  font-family: var(--en-mono-disp);
  font-size: 12px; letter-spacing: 0.16em;
  color: var(--en-yellow);
  margin: 0 0 16px;
}
.en-tech__col pre {
  font-family: var(--en-mono);
  font-size: 12.5px; line-height: 1.7;
  color: var(--en-text);
  margin: 0;
  white-space: pre-wrap;
}

/* ----- SECTION 11: DSL ----- */
.en-dsl__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 32px;
}
@media (max-width: 1000px) { .en-dsl__grid { grid-template-columns: 1fr; } }
.en-dsl__block {
  background: #050505;
  border: 1px solid var(--en-border);
  border-left: 3px solid var(--en-yellow);
  padding: 20px 22px;
  font-family: var(--en-mono);
  font-size: 12.5px; line-height: 1.65;
  color: var(--en-text);
  margin: 0;
  overflow-x: auto;
}

/* ----- SECTION 12: deployment ----- */
.en-weeks {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 32px 0 48px;
}
@media (max-width: 900px) { .en-weeks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .en-weeks { grid-template-columns: 1fr; } }
.en-week {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 22px 22px 24px;
  position: relative;
}
.en-week::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--en-yellow);
}
.en-week__head { margin-bottom: 16px; }
.en-week__num {
  font-family: var(--en-mono-disp);
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--en-yellow);
  text-transform: uppercase;
  display: block; margin-bottom: 4px;
}
.en-week__title {
  font-family: var(--en-sub);
  font-size: 18px; font-weight: 700;
  color: var(--en-text); margin: 0;
}
.en-week__items {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.en-week__items li { font-size: 13px; color: var(--en-text-2); line-height: 1.55; }
.en-week__items li::before { content: "· "; color: var(--en-yellow); }

.en-matrix {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
@media (max-width: 900px) { .en-matrix { grid-template-columns: 1fr; } }
.en-matrix__col {
  background: var(--en-panel);
  border: 1px solid var(--en-border);
  padding: 22px 22px 24px;
}
.en-matrix__col h3 {
  font-family: var(--en-mono-disp);
  font-size: 12px; letter-spacing: 0.16em;
  margin: 0 0 14px;
}
.en-matrix__col--must h3   { color: var(--en-green); }
.en-matrix__col--should h3 { color: var(--en-yellow); }
.en-matrix__col--later h3  { color: var(--en-text-2); }
.en-matrix__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.en-matrix__col ul li { font-family: var(--en-mono); font-size: 12.5px; color: var(--en-text); padding-left: 18px; position: relative; }
.en-matrix__col--must ul li::before   { content: "✓"; position: absolute; left: 0; color: var(--en-green); }
.en-matrix__col--should ul li::before { content: "◎"; position: absolute; left: 0; color: var(--en-yellow); }
.en-matrix__col--later ul li::before  { content: "○"; position: absolute; left: 0; color: var(--en-text-3); }

/* ----- SECTION 13: FAQ ----- */
.en-faq__list {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 28px;
}
.en-faq__item {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 0;
  transition: border-color 160ms ease;
}
.en-faq__item[open] { border-color: var(--en-yellow); }
.en-faq__item > summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 22px;
  font-family: var(--en-sub); font-weight: 600;
  color: var(--en-text);
  font-size: 15.5px;
}
.en-faq__item > summary::-webkit-details-marker { display: none; }
.en-faq__chevron {
  color: var(--en-yellow);
  font-size: 14px;
  transition: transform 180ms ease;
  display: inline-block; line-height: 1;
  transform: rotate(-90deg);
}
.en-faq__item[open] .en-faq__chevron { transform: rotate(0deg); }
.en-faq__a {
  margin: 0;
  padding: 0 22px 18px 50px;
  font-size: 14.5px; line-height: 1.65;
  color: var(--en-text-2);
}

/* ----- SECTION 14: CTA + form ----- */
.en-cta { background: var(--en-panel); border-top: 1px solid var(--en-border); }
.en-cta__buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 28px 0 18px; }
.en-cta__sub { color: var(--en-text-2); font-size: 14.5px; line-height: 1.65; text-align: center; max-width: 640px; margin: 0 auto 44px; }
.en-form {
  background: var(--en-surface);
  border: 1px solid var(--en-border);
  padding: 30px 32px;
  max-width: 880px; margin: 0 auto;
}
.en-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .en-form__grid { grid-template-columns: 1fr; } }
.en-form__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.en-form__field--wide { grid-column: 1 / -1; }
.en-form__label {
  font-family: var(--en-mono-disp);
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--en-yellow);
  text-transform: uppercase;
}
.en-form__field input, .en-form__field select {
  background: var(--en-bg);
  border: 1px solid var(--en-border);
  color: var(--en-text);
  font: inherit; font-size: 14px;
  padding: 11px 14px;
  transition: border-color 140ms ease;
}
.en-form__field input:focus, .en-form__field select:focus { outline: none; border-color: var(--en-yellow); }
.en-form__checks { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 4px; }
.en-form__checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--en-text); }
.en-form__checks input { accent-color: var(--en-yellow); }
.en-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--en-border); flex-wrap: wrap; }
.en-form__status { font-family: var(--en-mono-disp); font-size: 12px; letter-spacing: 0.08em; }
.en-form__status[data-kind="ok"] { color: var(--en-green); }

/* ----- footer ----- */
.en-footer {
  background: var(--en-bg);
  border-top: 1px solid var(--en-border);
  padding: 34px 0 60px;
}
.en-footer p {
  font-family: var(--en-mono-disp);
  font-size: 11.5px; letter-spacing: 0.06em; line-height: 1.7;
  color: var(--en-text-3);
  max-width: 820px;
  text-transform: none;
}

@media (prefers-reduced-motion: reduce) {
  body.energy-page * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}


