:root {
  --mb-black: #0a0a0a;
  --mb-black-soft: #111110;
  --mb-black-mid: #181816;
  --mb-card: #222220;
  --mb-border: #34342c;
  --mb-green: #2d5a3d;
  --mb-green-light: #5fa878;
  --mb-gold: #c9a033;
  --mb-gold-light: #d4ad4a;
  --mb-cream: #f3efe8;
  --mb-text: #f2efea;
  --mb-muted: #a8a39a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--mb-black);
  color: var(--mb-text);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.mb-wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.mb-topbar {
  background: linear-gradient(90deg, #152f20, #1b3f2a, #152f20);
  text-align: center;
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #d8d2c8;
}

.mb-topbar strong {
  color: var(--mb-gold-light);
}

.mb-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(12, 12, 11, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 215px;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(201, 160, 51, 0.2);
}

.brand span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  color: var(--mb-gold);
}

.nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 10px;
  font-size: 13px;
  color: #ddd7ce;
  border-radius: 8px;
}

.nav-links a:hover {
  color: var(--mb-gold-light);
  background: rgba(201, 160, 51, 0.08);
}

.nav-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(155deg, var(--mb-gold-light), #b88d26);
  color: #12110f;
  box-shadow: 0 8px 26px rgba(201, 160, 51, 0.18);
}

.btn-outline {
  border-color: rgba(201, 160, 51, 0.5);
  color: var(--mb-gold-light);
  background: rgba(201, 160, 51, 0.04);
}

.hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-bg.jpeg");
  background-size: cover;
  background-position: center 34%;
  transform: scale(1.03);
  filter: saturate(0.78) brightness(0.8);
}

.hero-ov {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(201, 160, 51, 0.12), transparent 45%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.87) 85%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  padding: 120px 24px 92px;
}

.eyebrow {
  color: var(--mb-gold-light);
  letter-spacing: 0.14em;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  color: #ffffff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 680px;
  color: #d5d0c7;
  font-size: 17px;
}

.hero-meta {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-meta > div {
  background: rgba(10, 10, 10, 0.68);
  border: 1px solid rgba(201, 160, 51, 0.24);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}

.hero-meta .k {
  display: block;
  color: var(--mb-gold-light);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero-meta .v {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #ece8e2;
}

.kpi-strip {
  margin-top: -48px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-strip article {
  background: var(--mb-card);
  border: 1px solid var(--mb-border);
  border-top: 2px solid rgba(201, 160, 51, 0.5);
  border-radius: 12px;
  padding: 16px 18px;
}

.kpi-strip .lbl {
  margin: 0;
  color: #aaa49b;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.kpi-strip .val {
  margin: 6px 0 0;
  color: var(--mb-gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.brand-surface {
  margin-top: 24px;
  background:
    linear-gradient(145deg, rgba(20, 20, 18, 0.96), rgba(14, 20, 15, 0.96)),
    repeating-linear-gradient(
      -45deg,
      transparent 0,
      transparent 8px,
      rgba(201, 160, 51, 0.05) 8px,
      rgba(201, 160, 51, 0.05) 16px
    );
  border: 1px solid rgba(201, 160, 51, 0.28);
  border-radius: 14px;
  padding: 20px;
}

.brand-surface h2 {
  margin: 0;
  color: var(--mb-gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(24px, 2.8vw, 36px);
}

.brand-surface p {
  margin: 8px 0 0;
  color: #b6b0a6;
}

.journey-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.journey-grid a {
  border: 1px solid rgba(95, 168, 120, 0.45);
  background: rgba(45, 90, 61, 0.16);
  color: #def5e7;
  border-radius: 10px;
  padding: 12px 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.journey-grid a:hover {
  border-color: rgba(201, 160, 51, 0.58);
  color: #f3deaa;
  background: rgba(201, 160, 51, 0.12);
}

.filter-bar {
  margin-top: 42px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-bar h2,
.pipeline h2,
.guardrail-panel h2 {
  margin: 0;
  color: var(--mb-gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(26px, 3.1vw, 40px);
}

.filter-bar p,
.pipeline p {
  margin: 8px 0 0;
  color: var(--mb-muted);
  max-width: 620px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  appearance: none;
  border: 1px solid rgba(95, 168, 120, 0.35);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #cae0d2;
  background: rgba(45, 90, 61, 0.22);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.chip.active {
  background: linear-gradient(145deg, var(--mb-gold-light), #b88d26);
  color: #17150f;
  border-color: transparent;
}

.agent-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.agent-card {
  background: linear-gradient(170deg, var(--mb-card), #191915);
  border: 1px solid var(--mb-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.agent-card .head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.agent-card .idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(201, 160, 51, 0.2);
  color: var(--mb-gold-light);
  font-size: 12px;
  font-weight: 700;
}

.agent-card h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-family: "Playfair Display", Georgia, serif;
}

.agent-card .mission {
  margin-top: 8px;
  color: #e8e2d8;
  font-size: 14px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(201, 160, 51, 0.1);
  border: 1px solid rgba(201, 160, 51, 0.24);
  color: #f2ddaa;
}

.agent-card .cols {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.block {
  background: rgba(8, 8, 8, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px;
}

.block h4 {
  margin: 0 0 7px;
  color: var(--mb-gold-light);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.block ul,
.block ol {
  margin: 0;
  padding-left: 18px;
  color: #c8c2b8;
  font-size: 12px;
}

.block p {
  margin: 0;
  color: #c8c2b8;
  font-size: 12px;
}

.agent-actions {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.agent-actions .sla {
  color: #89c69f;
  font-size: 12px;
  font-weight: 600;
}

.agent-actions button {
  border: 1px solid rgba(201, 160, 51, 0.4);
  background: rgba(201, 160, 51, 0.09);
  color: var(--mb-gold-light);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.agent-actions .action-row {
  display: flex;
  gap: 8px;
}

.agent-actions .run-btn {
  border-color: rgba(95, 168, 120, 0.55);
  background: rgba(45, 90, 61, 0.3);
  color: #d3f1de;
}

.mb-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 250;
  max-width: 360px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(201, 160, 51, 0.44);
  background: rgba(17, 17, 16, 0.95);
  color: #eadab2;
  font-size: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mb-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.pipeline {
  margin-top: 36px;
  background: linear-gradient(165deg, #141411, #0f120f);
  border: 1px solid rgba(95, 168, 120, 0.3);
  border-radius: 14px;
  padding: 22px;
}

.steps {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.step {
  background: rgba(45, 90, 61, 0.24);
  border: 1px solid rgba(95, 168, 120, 0.4);
  color: #d5e7dc;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}

.arrow {
  color: #b6b0a5;
}

.guardrail-panel {
  margin-top: 36px;
  margin-bottom: 44px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  background: var(--mb-cream);
  color: #2b2823;
  border-radius: 16px;
  border: 1px solid #ddd6cb;
  overflow: hidden;
}

.guardrail-panel .assistant {
  background: linear-gradient(180deg, #0e2015, #152f20);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.guardrail-panel .assistant img {
  width: 100%;
  max-width: 170px;
  border-radius: 12px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.guardrail-panel .content {
  padding: 20px 22px 18px;
}

.guardrail-panel h2 {
  color: #2a2824;
}

.guardrail-panel ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.guardrail-panel li {
  margin-bottom: 8px;
  color: #4f4a42;
}

.site-footer {
  border-top: 1px solid rgba(201, 160, 51, 0.25);
  background: #111110;
}

.footer-inner {
  padding: 20px 24px 30px;
  text-align: center;
}

.footer-inner .brand-line {
  margin: 0;
  color: var(--mb-gold-light);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 19px;
}

.footer-inner p {
  margin: 8px auto 0;
  max-width: 900px;
  color: #9c968d;
  font-size: 13px;
}

dialog {
  border: 1px solid rgba(201, 160, 51, 0.4);
  border-radius: 12px;
  padding: 0;
  width: min(720px, 94vw);
  background: #131310;
  color: #ece7dd;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-head h3 {
  margin: 0;
  color: var(--mb-gold-light);
  font-family: "Playfair Display", Georgia, serif;
}

.modal-head button {
  border: 1px solid rgba(201, 160, 51, 0.5);
  background: transparent;
  color: var(--mb-gold-light);
  border-radius: 7px;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}

#schemaCode {
  margin: 0;
  padding: 16px;
  font-size: 12px;
  white-space: pre-wrap;
  color: #d7d2c7;
  max-height: 64vh;
  overflow: auto;
}

@media (max-width: 1020px) {
  .hero-meta,
  .kpi-strip,
  .agent-grid {
    grid-template-columns: 1fr 1fr;
  }

  .journey-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guardrail-panel {
    grid-template-columns: 1fr;
  }

  .guardrail-panel .assistant {
    padding: 22px;
  }

  .guardrail-panel .assistant img {
    max-width: 210px;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    order: 3;
  }

  .hero {
    min-height: 64vh;
  }

  .hero-meta,
  .kpi-strip,
  .agent-grid,
  .agent-card .cols,
  .journey-grid {
    grid-template-columns: 1fr;
  }

  .agent-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-actions .action-row {
    flex-direction: column;
  }
}
