/* Shared light theme for AgentGateway lab pages (LLM + MCP). */
:root {
  --bg: #f6f4ef;
  --bg-2: #ffffff;
  --ink: #141820;
  --muted: #5a6478;
  --line: #e2e0d8;
  --line-2: #d0cec4;
  --gold: #b8860b;
  --gold-soft: #f5e6b8;
  --teal: #0d8f7c;
  --teal-soft: #d8f3ee;
  --coral: #c44b3c;
  --coral-soft: #f8e4e1;
  --panel: #ffffff;
  --panel-2: #f0eee7;
  --code-bg: #0f141f;
  --code-fg: #eef2fa;
  --code-comment: #9aa8c7;
  --code-cmd: #f0f4ff;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --disp: "Bricolage Grotesque", system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(20, 24, 32, 0.06);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.theme-light {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--disp);
  font-weight: 380;
  line-height: 1.6;
  min-height: 100vh;
}
code, pre, kbd, .mono { font-family: var(--mono); }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

/* Light override for shared env bar */
body.theme-light #goose-env-bar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(20, 24, 32, 0.05);
}
body.theme-light #goose-env-bar .geb-brand { color: var(--ink); }
body.theme-light #goose-env-bar .geb-brand b { color: var(--gold); }
body.theme-light #goose-env-bar .geb-label { color: var(--muted); }
body.theme-light #goose-env-bar a.geb-btn {
  background: var(--bg);
  border-color: var(--line);
  color: var(--muted);
}
body.theme-light #goose-env-bar a.geb-btn:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: #fff;
}
body.theme-light #goose-env-bar a.geb-btn.on {
  background: linear-gradient(180deg, #e8b44a, #c9962e);
  border-color: #c9962e;
  color: #1a1405;
}
body.theme-light #goose-env-bar .geb-chip {
  border-color: var(--line);
  color: var(--muted);
  background: var(--bg);
}
body.theme-light #goose-env-bar .geb-chip b { color: var(--teal); }

.page-nav {
  position: sticky;
  top: var(--goose-env-bar-h, 52px);
  z-index: 40;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.page-nav .in {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  align-items: center;
}
.page-nav .mark {
  font-weight: 720;
  font-size: 0.88rem;
  color: var(--ink);
  white-space: nowrap;
}
.page-nav a {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}
.page-nav a:hover { color: var(--ink); text-decoration: none; }
.page-nav a.on { color: var(--gold); border-bottom-color: var(--gold); }

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.8rem 1.25rem 1.6rem;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.65rem);
  font-weight: 730;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0.55rem 0 0.85rem;
  max-width: 22ch;
  color: var(--ink);
}
.hero h1 .g { color: var(--gold); }
.hero .sub {
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.02rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.chip b { color: var(--teal); font-weight: 650; }
.chip.gold b { color: var(--gold); }

section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.1rem 1.25rem;
}
h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
  color: var(--ink);
}
h2 .hash { color: var(--gold); margin-right: 0.3rem; font-weight: 500; }
h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 0.45rem;
  color: var(--ink);
}
.lede {
  color: var(--muted);
  max-width: 68ch;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
p { margin: 0.45rem 0; color: var(--muted); font-size: 0.92rem; max-width: 72ch; }
p strong, li strong { color: var(--ink); font-weight: 620; }
ul, ol { margin: 0.4rem 0 1rem 1.2rem; color: var(--muted); font-size: 0.9rem; max-width: 70ch; }
li { margin: 0.3rem 0; }
li code, p code, td code {
  font-size: 0.82rem;
  color: #8a6508;
  background: var(--gold-soft);
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
}

.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 1rem 0 1.3rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 560px; }
th {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: left;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
td {
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink);
}
tr:last-child td { border-bottom: none; }
td.muted { color: var(--muted); }

.diagram {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 0.75rem;
  margin: 1rem 0 1.4rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.diagram svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.dg-t {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.2rem 0 0.55rem;
}

.scenario {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  margin: 1.4rem 0;
  overflow: hidden;
}
.scenario .head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffefb, var(--panel-2));
}
.scenario .head h3 { margin: 0; }
.scenario .tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 650;
}
.scenario .tag.warn { background: var(--coral-soft); color: var(--coral); }
.scenario .body { padding: 1rem 1.15rem 1.2rem; }
.scenario .why {
  border-left: 3px solid var(--gold);
  background: #fffaf0;
  padding: 0.7rem 0.9rem;
  border-radius: 0 8px 8px 0;
  margin: 0.6rem 0 1rem;
}
.scenario .why .t {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.25rem;
  font-weight: 650;
}
.scenario .why p { margin: 0; max-width: none; font-size: 0.88rem; }

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0.6rem 0 1rem;
  padding: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.75rem;
  margin: 0.55rem 0;
  align-items: start;
}
.steps li::before {
  content: counter(step);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold);
  width: 32px;
  height: 32px;
  border: 1px solid var(--gold-soft);
  background: #fff;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.steps li .s { font-size: 0.9rem; color: var(--ink); }
.steps li .s small { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }

.codeblock {
  position: relative;
  background: var(--code-bg);
  border: 1px solid #3a4660;
  border-radius: 10px;
  margin: 0.7rem 0 0.9rem;
  box-shadow: 0 8px 24px rgba(10, 14, 24, 0.18);
}
/* If a copy bar is nested in a light card, force dark panel so pre text stays readable */
.card > .bar:has(+ pre),
.card > .codeblock,
.card .codeblock {
  background: var(--code-bg);
  border: 1px solid #3a4660;
  border-radius: 10px;
}
.card > .bar:has(+ pre) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.9rem;
  border-bottom: 1px solid #3a4660;
  border-radius: 10px 10px 0 0;
  margin: 0;
}
.card > .bar:has(+ pre) + pre {
  border-radius: 0 0 10px 10px;
  margin: 0;
  background: var(--code-bg);
  color: var(--code-fg);
}
.card > .bar:has(+ pre) .fn {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #c5d0ea;
  letter-spacing: 0.02em;
}
.codeblock .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.9rem;
  border-bottom: 1px solid #3a4660;
}
.codeblock .bar .fn {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #c5d0ea;
  letter-spacing: 0.02em;
}
.copy {
  appearance: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #e8eefc;
  background: #2a3348;
  border: 1px solid #4a5674;
  border-radius: 6px;
  padding: 0.22rem 0.6rem;
  cursor: pointer;
}
.copy:hover { color: #f0c14d; border-color: #c9962e; background: #323c54; }
pre {
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  font-weight: 450;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--code-cmd);
  background: var(--code-bg);
  -webkit-font-smoothing: antialiased;
}
/* Bare pre inside light cards (without codeblock wrapper) */
.card > pre:not(.diagram-fallback) {
  border: 1px solid #3a4660;
  border-radius: 10px;
  margin: 0.5rem 0 0;
}
pre .c { color: var(--code-comment); font-weight: 500; }
pre .ok { color: #5eecc8; font-weight: 600; }
pre .bad { color: #ff8a7a; font-weight: 650; }
pre .s { color: #f0c14d; font-weight: 600; }

/* Sequence / architecture diagrams */
.diagram-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 0.75rem 0.75rem;
  margin: 1rem 0 1.2rem;
  overflow-x: auto;
}
.diagram-panel .dg-cap {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.65rem 0.35rem;
}
.diagram-panel svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
  margin: 0 auto;
}
.flow-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.45rem;
  margin: 0.9rem 0 1.1rem;
  align-items: stretch;
}
.flow-row .box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.7rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.flow-row .box .k {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.flow-row .box .v {
  font-size: 0.88rem;
  color: var(--ink);
  margin-top: 0.3rem;
  font-weight: 620;
  line-height: 1.3;
}
.flow-row .box.accent { border-color: #c9a227; background: linear-gradient(180deg, #fff9e8, #fff); }
.flow-row .box.teal { border-color: #7ec9bc; background: linear-gradient(180deg, #eefaf7, #fff); }

.out {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaf6;
  margin: 0.6rem 0 0.2rem;
}
.out .bar {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.out pre {
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
  margin: 0;
}
.out pre .ok { color: var(--teal); }
.out pre .bad { color: var(--coral); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 0.95rem; }
.card p { font-size: 0.84rem; max-width: none; margin: 0.25rem 0; }
.card .ns {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: #fff;
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1.05rem;
  margin: 1rem 0;
}
.callout.warn { border-left-color: var(--coral); }
.callout.ok { border-left-color: var(--teal); }
.callout .t {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
  font-weight: 650;
}
.callout.warn .t { color: var(--coral); }
.callout.ok .t { color: var(--teal); }
.callout p { margin: 0.2rem 0; max-width: none; }

/* Customer demo story cards — why / watch / prove / run */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin: 1.1rem 0 1.4rem;
}
@media (max-width: 980px) {
  .story-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .story-grid { grid-template-columns: 1fr; }
}
.story-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 1.05rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 100%;
}
.story-card .sc-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.story-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}
.story-card .sc-why {
  font-size: 0.86rem;
  color: var(--ink);
  margin: 0;
}
.story-card .sc-row {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.35rem 0.5rem;
  font-size: 0.8rem;
  align-items: start;
}
.story-card .sc-row .lbl {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  padding-top: 0.15rem;
}
.story-card .sc-row .lbl.watch { color: var(--gold); }
.story-card .sc-row .lbl.prove { color: var(--teal); }
.story-card .sc-row .val { color: var(--muted); line-height: 1.4; }
.story-card .sc-flow {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  line-height: 1.45;
  margin-top: 0.15rem;
}
.story-card .sc-run {
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink);
  word-break: break-all;
}
.story-card .sc-run a { color: var(--gold); font-weight: 650; }
.story-card.tone-teal { border-top: 3px solid var(--teal); }
.story-card.tone-gold { border-top: 3px solid var(--gold); }
.story-card.tone-blue { border-top: 3px solid #7a9fd4; }
.story-card.tone-coral { border-top: 3px solid var(--coral); }
.story-card.tone-ink { border-top: 3px solid #5a6478; }

.pair-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}
.pair-links a.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 620;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
}
.pair-links a.btn:hover { border-color: var(--gold); text-decoration: none; }
.pair-links a.btn.primary {
  background: linear-gradient(180deg, #e8b44a, #c9962e);
  border-color: #c9962e;
  color: #1a1405;
}

/* Config / policy browser (dropdown) */
.cfg-browser {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 1rem 1.15rem 1.15rem;
  margin: 1rem 0 1.4rem;
}
.cfg-browser-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}
.cfg-browser-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.cfg-repo {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
}
.cfg-select {
  width: 100%;
  appearance: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6478' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 0.7rem 2.2rem 0.7rem 0.9rem;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(20, 24, 32, 0.04);
}
.cfg-select:hover { border-color: var(--gold); }
.cfg-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}
.cfg-select optgroup {
  font-family: var(--disp);
  font-weight: 700;
  color: var(--muted);
  font-size: 0.75rem;
}
.cfg-select option {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink);
  padding: 0.3rem;
}
.cfg-detail {
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffefb, var(--panel-2));
}
.cfg-detail[hidden] { display: none !important; }
.cfg-kind {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 650;
  margin-bottom: 0.25rem;
}
.cfg-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--ink);
}
.cfg-path {
  display: inline-block;
  font-size: 0.78rem;
  color: #8a6508;
  background: var(--gold-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.55rem;
}
.cfg-summary {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.35rem 0 0.75rem;
  max-width: none;
}
.cfg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cfg-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 620;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8b44a, #c9962e);
  border: 1px solid #c9962e;
  color: #1a1405 !important;
  text-decoration: none !important;
}
.cfg-link:hover { filter: brightness(1.05); }
.cfg-link.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink) !important;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  background: #fff;
}
.foot-in {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.4rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Mermaid flow diagrams (test steps / architecture) ───────────────────── */
.mermaid-wrap {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 0.6rem;
  margin: 1rem 0 1.25rem;
  overflow-x: auto;
  box-shadow: var(--shadow);
}
.mermaid-wrap .cap {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.mermaid-wrap pre.mermaid,
.mermaid-wrap .mermaid {
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0.25rem 0 0.5rem !important;
  text-align: center;
  overflow: visible;
}
.mermaid-wrap svg {
  max-width: 100%;
  height: auto;
}
