/* ==========================================================================
   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;
}
.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; }
details.section-editor[open] > summary::after { transform: rotate(90deg); }
details.section-editor > summary:hover { background: var(--bg-alt); }
details.section-editor > div { padding: 18px 20px 22px; border-top: 1px solid var(--rule); }

/* ==========================================================================
   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;
}

/* ==========================================================================
   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 {
  align-self: stretch;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.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__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;
}

.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: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.architect-diagram__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-alt);
  font-size: 11.5px;
}
.architect-diagram__status { color: var(--text-3); font-size: 10.5px; }
.architect-diagram__canvas {
  flex: 1 1 auto;
  overflow: auto;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: var(--bg-alt);
}
.architect-diagram__canvas svg { max-width: 100%; height: auto; background: #fff; padding: 14px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.architect-diagram__placeholder {
  color: var(--text-3);
  font-size: 13px;
  max-width: 360px;
  text-align: center;
  margin: auto;
  padding: 20px;
  background: #fff;
  border: 1px dashed var(--rule-2);
  border-radius: var(--radius);
}
.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; }
}
