:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --ink: #14181b;
  --muted: #667078;
  --line: #dfe4dd;
  --soft: #edf1ef;
  --green: #16785f;
  --green-soft: #e3f3ec;
  --amber: #a46816;
  --red: #b4422c;
  --blue: #315b96;
  --shadow: 0 18px 48px rgba(20, 24, 27, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 26px;
  align-items: center;
  min-height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 245, .92);
  backdrop-filter: blur(16px);
}
.brand, .site-nav, .account-actions, .signed-out-actions { display: flex; align-items: center; }
.brand { gap: 10px; font-size: 15px; font-weight: 800; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #b8c7bd;
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
}
.site-nav { gap: 6px; justify-content: center; }
.site-nav a, .ghost-link {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.site-nav a { position: relative; transition: color .18s ease, background-color .18s ease; }
.site-nav a.active, .site-nav a:hover, .ghost-link:hover { color: var(--ink); background: var(--soft); }
.account-actions { gap: 8px; justify-content: end; }
.signed-out-actions { gap: 8px; }
.user-menu { position: relative; }
.user-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  max-width: 300px;
  padding: 0 10px 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.user-menu-button #accountName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-chevron {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.user-menu-button[aria-expanded="true"] {
  border-color: #b8c7bd;
  box-shadow: 0 0 0 3px rgba(22, 120, 95, .11);
}
.avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 12px;
}
.user-menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  display: grid;
  min-width: 178px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  box-shadow: var(--shadow);
}
.user-menu-popover a, .user-menu-popover button {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}
.user-menu-popover a:hover, .user-menu-popover button:hover { background: var(--soft); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #0f624c;
  border-radius: 5px;
  color: white;
  background: var(--green);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.button, .ghost-link { transition: transform .18s ease, box-shadow .18s ease, color .18s ease, background-color .18s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20, 24, 27, .11); }
.button:active { transform: translateY(0); box-shadow: none; }
.ghost-link:hover { transform: translateY(-1px); }
.button.secondary { color: var(--ink); border-color: var(--line); background: white; }
.button.danger { color: var(--red); border-color: #efb7b2; background: #fff8f7; }
.button.compact { min-height: 34px; padding: 0 11px; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.ghost-link.strong { color: var(--green); }

.hero, .page-hero, .section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.hero { padding: 70px 0 34px; }
.home-hero { width: 100%; }
.home-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(420px, 1.06fr);
  gap: 42px;
  align-items: center;
}
.hero-copy { min-width: 0; }
.home-section { width: min(1120px, calc(100% - 40px)); }
.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: 58px; line-height: 1.02; letter-spacing: 0; }
h2 { margin-bottom: 10px; font-size: 25px; line-height: 1.2; letter-spacing: 0; }
h3 { margin-bottom: 8px; font-size: 16px; line-height: 1.35; letter-spacing: 0; }
.lead { max-width: 720px; margin-bottom: 14px; color: #2a3034; font-size: 23px; line-height: 1.35; }
.intro { max-width: 720px; color: var(--muted); font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }

.hero-console {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #26322f;
  border-radius: 8px;
  background: #0e1413;
  color: #d9e8e2;
  box-shadow: 0 22px 54px rgba(12, 18, 17, .18);
}
.console-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  color: #92a39b;
  font-size: 12px;
  font-weight: 800;
}
.console-top strong { color: #dce9e4; font-weight: 850; }
.console-body {
  display: grid;
  gap: 14px;
  padding: 17px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}
.console-line {
  overflow: hidden;
  color: #b9c8c1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.console-line.prompt { color: #f0f6f3; }
.console-sites {
  display: grid;
  gap: 8px;
}
.console-sites div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
}
.console-sites strong {
  overflow: hidden;
  color: #f3fbf7;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.console-sites small {
  color: #91a49c;
  white-space: nowrap;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot.online { background: #48c78e; box-shadow: 0 0 0 3px rgba(72, 199, 142, .13); }
.dot.pending { background: #d59d2a; box-shadow: 0 0 0 3px rgba(213, 157, 42, .13); }
.console-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #8fa096;
}
.console-footer span {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 5px;
  background: rgba(255, 255, 255, .04);
}

.section { padding: 34px 0; }
.section.narrow { max-width: 960px; }
.section-head { margin-bottom: 16px; }
.section-head.split, .dashboard-head {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
}
.section-head p, .page-hero p, .muted { color: var(--muted); }
.feature-grid, .dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.feature-grid article, .panel, .doc-block, .doc-link, .form-card, .install-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(20, 24, 27, .03);
}
.feature-grid article { padding: 20px; }
.feature-grid p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.install-card { min-width: 0; padding: 18px; }
.install-card p { margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.install-card pre { margin-bottom: 0; }
.agent-install-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.product-system {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: stretch;
  min-height: 270px;
  border: 1px solid #cbd5ce;
  border-radius: 8px;
  background: #eef2ef;
  box-shadow: var(--shadow);
}
.system-node { display: flex; flex-direction: column; justify-content: end; padding: 24px; background: white; transition: background-color .24s ease; }
.system-node:hover { background: #f8fbf9; }
.system-node:first-child { border-radius: 7px 0 0 7px; }
.system-node:last-child { border-radius: 0 7px 7px 0; }
.system-node strong { margin: 5px 0 8px; font-size: 22px; line-height: 1.2; }
.system-node small { color: var(--muted); font-size: 13px; }
.system-label { color: var(--green); font-size: 10px; font-weight: 900; }
.system-bridge { display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 900; }
.system-bridge::before, .system-bridge::after { content: ""; width: 100%; height: 1px; background: #aebbb2; }
.system-bridge span { padding: 8px 0; writing-mode: vertical-rl; animation: bridge-pulse 2.4s ease-in-out infinite; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product-card { position: relative; min-height: 280px; padding: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.product-card:hover { transform: translateY(-4px); border-color: #b9c9bf; box-shadow: 0 18px 38px rgba(20, 24, 27, .08); }
.product-card h2 { font-size: 28px; }
.product-card > p:not(.eyebrow) { max-width: 520px; color: var(--muted); }
.product-number { position: absolute; top: 18px; right: 22px; color: #d8dfda; font-size: 42px; font-weight: 900; line-height: 1; }
.product-card .ghost-link { position: absolute; left: 16px; bottom: 16px; }
.contact-band {
  display: flex;
  justify-content: space-between;
  gap: 34px;
  align-items: center;
  margin-top: 30px;
  margin-bottom: 48px;
  padding: 28px;
  border: 1px solid #b9cec2;
  border-radius: 8px;
  background: #e7f2ec;
}
.contact-band h2 { margin-bottom: 8px; }
.contact-band p { max-width: 680px; margin-bottom: 0; color: #4d5d55; }
.contact-band-actions { display: flex; flex-wrap: wrap; flex: 0 0 auto; gap: 10px; align-items: center; }
.site-capability-board { overflow: hidden; border: 1px solid #26322f; border-radius: 8px; background: #101715; color: #e8f3ee; box-shadow: 0 22px 54px rgba(12, 18, 17, .18); }
.board-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.1); color: #91a39a; font-size: 12px; }
.board-head strong { color: #e8f3ee; }
.board-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board-grid div { min-height: 98px; padding: 18px; border-right: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); transition: background-color .2s ease; }
.board-grid div:hover { background: rgba(255,255,255,.055); }
.board-grid div:nth-child(2n) { border-right: 0; }
.board-grid div:nth-last-child(-n+2) { border-bottom: 0; }
.board-grid strong, .board-grid span { display: block; }
.board-grid strong { margin-bottom: 5px; color: #73d1ad; font-size: 12px; }
.board-grid span { color: #d5e2dc; font-size: 14px; font-weight: 750; }
.capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-process .section-head p { max-width: 760px; }
.contact-hero { max-width: 1120px; padding-bottom: 6px; }
.contact-hero .lead { max-width: 860px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 14px; align-items: start; }
.contact-primary, .contact-aside { padding: 24px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.contact-primary > p:not(.eyebrow) { color: var(--muted); }
.contact-methods { display: grid; gap: 9px; margin-top: 22px; }
.contact-method { display: grid; gap: 3px; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf8; transition: border-color .18s ease, transform .18s ease; }
.contact-method:hover { transform: translateY(-2px); border-color: #b9c9bf; }
.contact-method span, .contact-method small { color: var(--muted); font-size: 12px; }
.contact-method strong { overflow-wrap: anywhere; font-size: 15px; }
.contact-checklist { display: grid; gap: 0; margin: 0; }
.contact-checklist div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-checklist div:first-child { border-top: 0; }
.contact-checklist dt { color: var(--green); font-size: 12px; font-weight: 900; }
.contact-checklist dd { margin: 0; }
.contact-checklist strong, .contact-checklist span { display: block; }
.contact-checklist span { margin-top: 2px; color: var(--muted); font-size: 12px; }

.agent-native-band {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(420px, 1.2fr);
  gap: 34px;
  align-items: center;
  margin-top: 20px;
  padding: 28px;
  border: 1px solid #25322e;
  border-radius: 8px;
  color: #eaf4ef;
  background: #101715;
  box-shadow: 0 20px 48px rgba(12, 18, 17, .14);
}
.agent-native-copy h2 { color: white; }
.agent-native-copy > p { color: #aebdb6; }
.agent-native-copy .ghost-link { display: inline-flex; margin-left: -10px; color: #73d1ad; }
.agent-conversation { overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: #18201e; }
.agent-turn { padding: 15px 17px; border-bottom: 1px solid rgba(255,255,255,.09); }
.agent-turn > span { display: flex; gap: 7px; align-items: center; margin-bottom: 5px; color: #7f9189; font-size: 11px; font-weight: 900; }
.agent-turn p { margin: 0; color: #edf5f1; font-size: 14px; }
.assistant-turn { background: rgba(255,255,255,.025); }
.assistant-turn p { color: #c9ddd4; }
.agent-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #61c99e; box-shadow: 0 0 0 4px rgba(97,201,158,.1); animation: agent-status 1.8s ease-in-out infinite; }
.agent-plan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.agent-plan div { min-width: 0; padding: 13px 15px; border-right: 1px solid rgba(255,255,255,.09); }
.agent-plan div:last-child { border-right: 0; }
.agent-plan dt { margin-bottom: 3px; color: #7f9189; font-size: 10px; font-weight: 850; }
.agent-plan dd { margin: 0; color: #eaf4ef; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }

@keyframes agent-status {
  0%, 100% { opacity: .55; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes bridge-pulse {
  0%, 100% { color: var(--muted); transform: translateY(0); }
  50% { color: var(--green); transform: translateY(-2px); }
}

.motion-ready .reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease var(--reveal-delay, 0ms), transform .5s ease var(--reveal-delay, 0ms);
}
.motion-ready .reveal-item.is-visible { opacity: 1; transform: translateY(0); }
.hero-console, .site-capability-board, .product-system { transition: transform .28s ease, box-shadow .28s ease; }
.hero-console:hover, .site-capability-board:hover, .product-system:hover { transform: translateY(-3px); box-shadow: 0 26px 58px rgba(12, 18, 17, .16); }
.console-sites div { transition: border-color .18s ease, background-color .18s ease; }
.console-sites div:hover { border-color: rgba(115, 209, 173, .28); background: rgba(255,255,255,.06); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .motion-ready .reveal-item { opacity: 1; transform: none; }
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}
.workflow-strip div {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  border-right: 1px solid var(--line);
}
.workflow-strip div:last-child { border-right: 0; }
.workflow-strip strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: white;
  background: var(--blue);
  font-size: 13px;
}
.workflow-strip span {
  color: #2f383d;
  font-size: 14px;
  font-weight: 800;
}

.compact-list, .site-list { display: grid; gap: 8px; }
.site-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(150px, .9fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 62px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.site-row.with-action { grid-template-columns: minmax(0, 1.3fr) minmax(150px, .9fr) auto auto; }
.site-row.selected { border-color: rgba(22, 120, 95, .5); background: #f8fcfa; }
.site-row strong, .site-row small { display: block; }
.site-row small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.status-pill {
  display: inline-flex;
  justify-self: end;
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
}
.status-pill.offline { color: var(--red); background: #fae8e4; }
.status-pill.personal { color: #3f5f8f; background: #e6edf7; }
.empty-state {
  padding: 16px;
  border: 1px dashed #c9d2cb;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, .58);
  font-size: 14px;
}

.page-hero { padding: 56px 0 18px; }
.page-hero h1 { font-size: 42px; }
.docs-layout { display: grid; gap: 14px; max-width: 860px; }
.doc-block { padding: 22px; }
pre {
  overflow: auto;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #d7ddd6;
  border-radius: 6px;
  background: #111817;
  color: #eef8f3;
  font-size: 13px;
}
.doc-list { display: grid; gap: 10px; }
.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}
.doc-link small { display: block; margin-top: 4px; color: var(--muted); }
.doc-link i { color: var(--green); font-style: normal; font-weight: 900; }

.docs-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 190px;
  gap: 34px;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 58px;
}
.docs-sidebar, .docs-toc {
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.docs-sidebar {
  padding-right: 18px;
  border-right: 1px solid var(--line);
}
.docs-home-link {
  display: block;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.docs-sidebar section { display: grid; gap: 2px; margin-bottom: 20px; }
.docs-sidebar h2 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.docs-sidebar a:not(.docs-home-link) {
  display: block;
  padding: 6px 8px;
  border-radius: 5px;
  color: #3c464c;
  font-size: 13px;
  font-weight: 700;
}
.docs-sidebar a:hover { background: var(--soft); color: var(--ink); }
.docs-main {
  min-width: 0;
  max-width: 820px;
  padding-bottom: 40px;
}
.docs-kicker {
  margin-bottom: 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}
.docs-main h1 {
  margin: 0 0 14px;
  font-size: 44px;
  line-height: 1.08;
}
.docs-lead {
  max-width: 700px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 16px;
}
.docs-card-grid { display: grid; gap: 18px; }
.docs-section-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.docs-section-label {
  margin-bottom: 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}
.docs-card-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid #edf0ed;
}
.docs-card-link:first-of-type { border-top: 0; }
.docs-card-link strong, .docs-card-link small { display: block; }
.docs-card-link small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.docs-card-link i { color: var(--green); font-style: normal; font-weight: 900; }
.docs-toc {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.docs-toc strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}
.docs-toc a, .docs-toc span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.docs-toc .toc-level-3 { padding-left: 10px; }
.docs-article {
  color: #252d32;
  font-size: 15px;
}
.docs-article h1 { margin-bottom: 18px; }
.docs-article h2 {
  margin: 36px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 24px;
}
.docs-article h3 { margin: 26px 0 8px; font-size: 18px; }
.docs-article h4 { margin: 20px 0 8px; font-size: 15px; }
.docs-article p { color: #3c464c; }
.docs-article a { color: var(--green); font-weight: 760; }
.docs-article ul { padding-left: 20px; }
.docs-article li { margin: 5px 0; }
.docs-article code {
  padding: 2px 5px;
  border: 1px solid #dce3dc;
  border-radius: 4px;
  background: #f3f6f2;
  font-size: .92em;
}
.docs-article pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.doc-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.docs-article table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
}
.docs-article th, .docs-article td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf0ed;
  text-align: left;
  vertical-align: top;
}
.docs-article th {
  color: #334047;
  background: #f3f6f2;
  font-weight: 850;
}

.auth-page {
  display: grid;
  place-items: start center;
  min-height: calc(100vh - 132px);
  padding: 62px 20px;
}
.form-card {
  display: grid;
  gap: 16px;
  width: min(440px, 100%);
  padding: 28px;
  box-shadow: var(--shadow);
}
label { display: grid; gap: 7px; color: #334047; font-size: 13px; font-weight: 760; }
input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #c8d1ca;
  border-radius: 5px;
  color: var(--ink);
  background: white;
  font: inherit;
}
textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid #c8d1ca;
  border-radius: 5px;
  color: var(--ink);
  background: white;
  font: inherit;
}
input:focus { border-color: var(--green); outline: 3px solid rgba(22, 120, 95, .13); }
textarea:focus { border-color: var(--green); outline: 3px solid rgba(22, 120, 95, .13); }
input[readonly] { color: var(--muted); background: #f5f7f4; }
select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #c8d1ca;
  border-radius: 5px;
  color: var(--ink);
  background: white;
  font: inherit;
}
select:focus { border-color: var(--green); outline: 3px solid rgba(22, 120, 95, .13); }
.form-message { min-height: 20px; margin: 0; color: var(--green); font-size: 13px; }
.form-message.error { color: var(--red); }

.dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, .78fr); align-items: start; }
.panel { padding: 18px; }
.panel.wide { grid-column: 1 / -1; }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.panel-head h2 { margin: 0; font-size: 18px; }
.panel-head span { color: var(--muted); font-size: 12px; font-weight: 800; }
.settings-list { display: grid; gap: 14px; margin: 0; }
.settings-list div { display: grid; gap: 3px; padding-bottom: 12px; border-bottom: 1px solid #edf0ed; }
.settings-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.settings-list dt { color: var(--muted); font-size: 12px; font-weight: 850; }
.settings-list dd { margin: 0; color: var(--ink); font-size: 14px; }
.settings-list.compact { gap: 8px; margin-bottom: 14px; }
.settings-list.compact div { padding-bottom: 8px; }
.token-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 190px) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}
.token-secret {
  display: grid;
  gap: 9px;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid #bfd8ca;
  border-radius: 6px;
  background: var(--green-soft);
}
.token-secret[hidden] { display: none; }
.token-copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.token-copy-row input { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.token-list { display: grid; gap: 8px; margin-top: 14px; }
.token-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, .9fr) minmax(160px, .8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.token-row strong, .token-row small { display: block; }
.token-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.bind-form { display: grid; gap: 12px; }
.site-edit-form { display: grid; gap: 12px; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.method-set {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.method-set legend { margin-bottom: 8px; color: #334047; font-size: 13px; font-weight: 760; }
.method-set label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f9faf8;
  cursor: pointer;
}
.method-set input { width: 14px; height: 14px; accent-color: var(--green); }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1040px) {
  .site-header { grid-template-columns: auto 1fr; gap: 8px 16px; padding: 10px 18px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: start; overflow-x: auto; }
  .account-actions { grid-column: 2; grid-row: 1; }
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; }
  .brand { grid-column: 1; grid-row: 1; }
  .account-actions { grid-column: 2; grid-row: 1; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; padding-bottom: 2px; }
  .site-nav a { flex: 0 0 auto; }
  .site-nav { justify-content: start; overflow-x: auto; }
  .signed-out-actions .ghost-link { display: none; }
  .hero, .page-hero, .section, .home-shell, .home-section { width: min(100% - 28px, 1120px); }
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .console-sites div { grid-template-columns: auto minmax(0, 1fr); }
  .console-sites small { grid-column: 2; white-space: normal; }
  h1 { font-size: 42px; }
  .lead { font-size: 19px; }
  .feature-grid, .dashboard-grid, .install-grid, .product-grid, .capability-grid, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .product-system { grid-template-columns: 1fr; min-height: auto; }
  .system-node:first-child, .system-node:last-child { border-radius: 0; }
  .system-bridge { grid-template-columns: 1fr auto 1fr; padding: 0 18px; }
  .agent-native-band { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .agent-plan { grid-template-columns: 1fr; }
  .agent-plan div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .agent-plan div:last-child { border-bottom: 0; }
  .system-bridge span { padding: 8px; writing-mode: initial; }
  .token-create-form, .token-row { grid-template-columns: 1fr; }
  .workflow-strip { grid-template-columns: 1fr; }
  .workflow-strip div { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-strip div:last-child { border-bottom: 0; }
  .docs-shell { grid-template-columns: 1fr; width: min(100% - 28px, 1120px); gap: 22px; }
  .docs-sidebar, .docs-toc { position: static; max-height: none; padding: 0; border: 0; }
  .docs-sidebar { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
  .docs-toc { display: none; }
  .docs-main h1 { font-size: 36px; }
  .section-head.split, .dashboard-head, .site-footer { display: grid; align-items: start; }
  .site-row, .site-row.with-action { grid-template-columns: 1fr; }
  .contact-band { display: grid; padding: 22px; }
  .contact-band-actions { align-items: start; }
  .status-pill { justify-self: start; }
}
