:root {
  --nav-width: 390px;
  --header-height: 60px;
  --ink: #27262b;
  --body: #5c5962;
  --muted: #76727c;
  --line: #eeebee;
  --line-strong: #d9d6dc;
  --sidebar: #f5f6fa;
  --surface: #ffffff;
  --link: #7253ed;
  --link-dark: #4f35bd;
  --orange: #ec7211;
  --blue: #146eb4;
  --green: #18794e;
  --red: #b12704;
  --amber: #9a6700;
  --code: #2f2e34;
  --soft-blue: rgba(44, 132, 250, .12);
  --soft-violet: rgba(114, 83, 237, .11);
  --soft-green: rgba(65, 214, 147, .14);
  --soft-red: rgba(247, 126, 126, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 3px 10px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--body);
  background: var(--surface);
  font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-wrap: break-word;
  overflow-x: hidden;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-dark); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
code, kbd { font-family: "SFMono-Regular", Menlo, Consolas, monospace; }
code {
  padding: .12em .35em;
  color: #514b58;
  background: #f5f4f5;
  border: 1px solid #ebe8ec;
  border-radius: 3px;
  font-size: .78em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -70px;
  left: 20px;
  padding: 10px 16px;
  color: #fff;
  background: var(--link-dark);
  border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; }

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: var(--nav-width);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}

.site-title {
  min-height: var(--header-height);
  padding: 9px 30px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}
.site-title:hover {
  background-image: linear-gradient(-90deg, #ebedf5 0%, rgba(235, 237, 245, .35) 85%, transparent 100%);
}
.site-title small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .025em;
}
.site-mark {
  width: 42px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: #232f3e;
  border-bottom: 3px solid #ff9900;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.close-menu { display: none; }

.nav-project {
  margin: 42px 31px 14px;
  padding: 0 0 17px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}
.sidebar nav > ul {
  margin: 0;
  padding: 0 0 24px;
  list-style: none;
}
.sidebar li { margin: 0; }
.sidebar nav a {
  display: block;
  min-height: 32px;
  padding: 6px 34px;
  color: #5c5962;
  font-size: 13px;
  line-height: 20px;
}
.sidebar nav a:hover,
.sidebar nav a.active {
  color: var(--ink);
  background-image: linear-gradient(-90deg, #e7e9f2 0%, rgba(231, 233, 242, .75) 80%, rgba(231, 233, 242, 0) 100%);
}
.sidebar nav a.active { font-weight: 650; }
.sidebar nav a.search-hidden { display: none; }

.sidebar-footer {
  margin-top: auto;
  padding: 18px 31px 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.sidebar-footer span,
.sidebar-footer small { display: block; }
.sidebar-footer span {
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: 9px;
}
.sidebar-footer strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 12px;
}

.page {
  width: calc(100% - var(--nav-width));
  min-width: 0;
  margin-left: var(--nav-width);
}
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: var(--header-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid var(--line);
}
.reading-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--link));
  transform: scaleX(0);
  transform-origin: left center;
}
.menu-button { display: none; }
.search-wrap {
  min-width: 0;
  max-width: 480px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
}
.search-wrap:focus-within {
  border-color: #bcb6d3;
  box-shadow: 0 0 0 3px rgba(114, 83, 237, .09);
}
.search-wrap svg {
  width: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: #817c86;
  stroke-width: 2;
}
.search-wrap input {
  min-width: 0;
  width: 100%;
  height: 40px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}
.search-wrap kbd {
  padding: 2px 6px;
  color: #8a8590;
  background: #f4f3f5;
  border: 1px solid #ddd9df;
  border-radius: 3px;
  font-size: 10px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.top-actions a,
.top-actions button {
  min-height: 38px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  color: var(--link);
  background: transparent;
  border: 0;
  font-size: 11px;
}
.top-actions a:hover,
.top-actions button:hover {
  color: var(--ink);
  background-image: linear-gradient(-90deg, #ebedf5, rgba(235, 237, 245, .45));
}

main {
  width: min(100%, 1000px);
  padding: 31px 32px 90px;
}
.breadcrumbs {
  margin: 0 0 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #8c8790;
  font-size: 11px;
}
.breadcrumbs b { color: #b7b3ba; }
.breadcrumbs strong { color: #68636d; font-weight: 600; }

article { max-width: 900px; }
.document-section {
  padding: 4px 0 38px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.document-section[hidden] { display: none; }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 520;
  line-height: 1.25;
}
h1 {
  max-width: 850px;
  margin: 10px 0 18px;
  font-size: clamp(34px, 4.2vw, 46px);
  letter-spacing: -.025em;
}
h2 {
  position: relative;
  margin: 34px 0 12px;
  font-size: 28px;
  letter-spacing: -.012em;
}
h3 { margin: 29px 0 8px; font-size: 20px; }
h4 { margin: 0 0 5px; font-size: 15px; font-weight: 650; }
p { margin: 0 0 16px; }
ul, ol { padding-left: 24px; }
li { margin: 6px 0; }
.anchor {
  position: absolute;
  top: 3px;
  left: -25px;
  color: var(--link);
  opacity: 0;
  font-size: 18px;
}
h2:hover .anchor, .anchor:focus { opacity: 1; }
.eyebrow {
  color: var(--link);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.summary {
  max-width: 870px;
  color: #46424a;
  font-size: 17px;
  line-height: 1.72;
}
.hero-actions {
  margin: 22px 0 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.button {
  min-height: 39px;
  padding: 8px 15px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 650;
}
.button.primary { color: #fff; background: var(--link); border-color: var(--link); }
.button.primary:hover { color: #fff; background: var(--link-dark); }
.button.secondary { color: var(--link); background: #fff; }
.button.secondary:hover { background: #f8f7fc; }

.callout {
  margin: 22px 0;
  padding: 14px 17px;
  border-left: 4px solid;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.callout strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.callout p { margin: 0; font-size: 14px; }
.callout.important { background: var(--soft-blue); border-color: #183385; }
.callout.important strong { color: #183385; }
.callout.note { background: var(--soft-violet); border-color: #381885; }
.callout.note strong { color: #381885; }
.callout.warning { background: var(--soft-red); border-color: #dd2e2e; }
.callout.warning strong { color: #a92323; }

blockquote {
  margin: 19px 0;
  padding: 5px 0 5px 18px;
  color: #47434b;
  border-left: 3px solid var(--line-strong);
  font-size: 18px;
  font-weight: 500;
}

.fact-grid {
  margin: 27px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}
.fact-grid div {
  min-height: 82px;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact-grid div:nth-child(3n) { border-right: 0; }
.fact-grid div:nth-last-child(-n+3) { border-bottom: 0; }
.fact-grid dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.fact-grid dd { margin: 6px 0 0; color: var(--ink); font-size: 13px; font-weight: 620; }

.principle-grid,
.comparison-grid,
.security-grid,
.cost-cards,
.limitation-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
  margin: 17px 0;
}
.principle-grid article,
.comparison-grid article,
.security-grid article,
.cost-cards article,
.limitation-list article {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}
.principle-grid article > span {
  color: var(--link);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.principle-grid p,
.comparison-grid p,
.cost-cards p,
.limitation-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.security-grid h3, .limitation-list h3 { margin: 0 0 7px; font-size: 15px; font-weight: 650; }
.security-grid ul { margin: 0; padding-left: 18px; font-size: 13px; }
.cost-cards article > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cost-cards strong { display: block; margin: 3px 0 7px; color: var(--ink); font-size: 20px; font-weight: 600; }

.feature-summary {
  margin: 20px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}
.feature-summary div { padding: 16px; border-right: 1px solid var(--line); }
.feature-summary div:last-child { border-right: 0; }
.feature-summary strong { display: block; color: var(--link); font-size: 25px; font-weight: 600; }
.feature-summary span { color: var(--muted); font-size: 11px; }

.table-scroll {
  margin: 17px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.5;
}
th, td {
  padding: 10px 12px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  color: #4f4a54;
  background: #f5f6fa;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
tbody tr:nth-child(even) td { background: #fbfbfc; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f8f7fc; }

.status {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.status.included { color: #126c4f; background: #e4f5ed; }
.status.restricted { color: #805400; background: #fff3d6; }
.status.conditional, .status.pending { color: #51409c; background: #efecfb; }
.status.denied { color: #9e2c15; background: #fff0ed; }

.diagram {
  margin: 22px 0 30px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}
.figure-toolbar {
  min-height: 60px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #f5f6fa;
  border-bottom: 1px solid var(--line);
}
.figure-toolbar span {
  display: block;
  color: var(--link);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.figure-toolbar strong { display: block; margin-top: 2px; color: var(--ink); font-size: 13px; }
.figure-toolbar em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
}
.diagram-open {
  width: 100%;
  padding: 0;
  display: block;
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 0;
  cursor: zoom-in;
}
.diagram-open img { width: 100%; display: block; }
.diagram-open > span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(39, 38, 43, .88);
  border-radius: 3px;
  font-size: 9px;
}
figcaption {
  padding: 9px 13px;
  color: var(--muted);
  background: #fafafa;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.architecture-steps { padding: 0; list-style: none; }
.architecture-steps li {
  display: grid;
  grid-template-columns: 29px 1fr;
  gap: 11px;
  align-items: start;
  margin: 11px 0;
}
.architecture-steps li > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--link);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 750;
}
.architecture-steps p { margin: 1px 0 0; font-size: 14px; }

.code-wrap { position: relative; margin: 14px 0 22px; }
pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #f4f1f6;
  background: var(--code);
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.62;
}
pre code { padding: 0; color: inherit; background: transparent; border: 0; font-size: inherit; }
.copy-code {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  padding: 5px 8px;
  color: #e6e2e8;
  background: #47454c;
  border: 1px solid #605d65;
  border-radius: 3px;
  font-size: 9px;
}

.flow-list { margin: 16px 0 24px; border-top: 1px solid var(--line); }
.flow-list article {
  min-height: 72px;
  padding: 13px 0;
  display: grid;
  grid-template-columns: 35px 1fr auto;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}
.flow-list article > span {
  color: var(--link);
  font-size: 10px;
  font-weight: 800;
}
.flow-list p { margin: 0; color: var(--muted); font-size: 13px; }
.flow-list article > b {
  padding: 3px 6px;
  color: #7c7780;
  background: #f6f5f6;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 650;
}

.choice-card { margin: 15px 0 24px; padding: 17px; border: 1px solid var(--line-strong); border-radius: 4px; }
.choice-card.selected { border-left: 4px solid var(--green); background: rgba(65, 214, 147, .08); }
.choice-card > div { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.choice-card p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.choice-number {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.check-list { margin: 15px 0 24px; padding: 0; list-style: none; }
.check-list li { display: grid; grid-template-columns: 29px 1fr; gap: 10px; margin: 10px 0; }
.check-list p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.check {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid #9a959f;
  border-radius: 50%;
  font-size: 10px;
}
.check.done { color: #fff; background: var(--green); border-color: var(--green); }
.check.pending { color: var(--amber); background: #fff4d6; border-color: #d7ad46; }
.check-list.dense li { grid-template-columns: 24px 1fr; font-size: 13px; }

.deployment-timeline, .demo-script { margin: 18px 0 24px; }
.deployment-timeline article,
.demo-script article {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 14px;
  position: relative;
  padding: 0 0 19px;
}
.deployment-timeline article::before,
.demo-script article::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 21px;
  width: 1px;
  background: var(--line-strong);
}
.deployment-timeline article:last-child::before,
.demo-script article:last-child::before { display: none; }
.deployment-timeline article > span {
  width: 42px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--link);
  border-radius: 14px;
  font-size: 10px;
  font-weight: 800;
}
.demo-script article > span { color: var(--link-dark); font: 700 11px/1.5 "SFMono-Regular", Menlo, monospace; }
.deployment-timeline h3, .demo-script h3 { margin: 1px 0 3px; font-size: 15px; font-weight: 650; }
.deployment-timeline p, .demo-script p { margin: 0; color: var(--muted); font-size: 13px; }

/* Embedded dashboard preview */
.dashboard-shell {
  margin: 24px 0 30px;
  color: #354255;
  background: #f3f6f9;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(30, 42, 59, .12);
  font-family: Inter, system-ui, sans-serif;
}
.dashboard-top {
  min-height: 65px;
  padding: 0 19px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: #fff;
  background: #172235;
}
.dashboard-brand { display: flex; align-items: center; gap: 10px; }
.dashboard-brand > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #172235;
  background: #ff9900;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
}
.dashboard-brand strong, .dashboard-brand small { display: block; }
.dashboard-brand strong { font-size: 13px; }
.dashboard-brand small { margin-top: 1px; color: #aebbd0; font-size: 8px; }
.dashboard-badges {
  padding: 6px 10px;
  color: #cbd7e8;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px;
  font-size: 8px;
}
.dashboard-badges b { margin-left: 8px; color: #fff; }
.health-dot { width: 7px; height: 7px; display: inline-block; margin-right: 4px; background: #4bd49a; border-radius: 50%; }
.dashboard-user { display: flex; justify-content: flex-end; align-items: center; gap: 9px; color: #cbd7e8; font-size: 9px; }
.dashboard-user span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #405678;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 750;
}
.dashboard-body { padding: 0 18px 19px; }
.dashboard-nav {
  min-height: 46px;
  display: flex;
  align-items: end;
  gap: 20px;
  border-bottom: 1px solid #d4dce6;
}
.dashboard-nav button {
  height: 46px;
  padding: 0 1px;
  color: #69788d;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 9px;
  font-weight: 650;
}
.dashboard-nav button.active { color: #146eb4; border-bottom-color: #146eb4; }
.dashboard-panel { display: none; padding-top: 17px; }
.dashboard-panel.active { display: block; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.metric-grid article,
.dashboard-card,
.playground-controls,
.chat-preview,
.audit-list,
.evidence-card {
  background: #fff;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
  box-shadow: 0 2px 7px rgba(35, 48, 66, .04);
}
.metric-grid article { padding: 12px; }
.metric-grid span, .metric-grid small { display: block; }
.metric-grid span { color: #6d7c90; font-size: 8px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.metric-grid strong { display: block; margin: 4px 0 2px; color: #1c2a3f; font-size: 20px; font-weight: 650; }
.metric-grid small { color: #8794a5; font-size: 7px; }
.dashboard-columns { margin-top: 11px; display: grid; grid-template-columns: 1.55fr 1fr; gap: 11px; }
.dashboard-card { min-width: 0; overflow: hidden; }
.dashboard-card > header,
.evidence-card > header {
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e1e7ed;
}
.dashboard-card header strong,
.dashboard-card header small,
.evidence-card header strong,
.evidence-card header small { display: block; }
.dashboard-card header strong, .evidence-card header strong { color: #24334a; font-size: 10px; }
.dashboard-card header small, .evidence-card header small { margin-top: 1px; color: #8390a0; font-size: 7px; }
.dashboard-card header > span { color: #146eb4; font-size: 8px; font-weight: 750; }
.chart {
  height: 126px;
  padding: 23px 13px 12px;
  display: flex;
  align-items: end;
  gap: 6px;
  background:
    linear-gradient(#edf1f5 1px, transparent 1px) 0 0 / 100% 33%,
    linear-gradient(180deg, rgba(20, 110, 180, .04), transparent);
}
.chart i {
  flex: 1;
  min-width: 3px;
  background: linear-gradient(180deg, #2e96d1, #146eb4);
  border-radius: 2px 2px 0 0;
  opacity: .86;
}
.policy-card ul { margin: 0; padding: 7px 12px 10px; list-style: none; }
.policy-card li { margin: 0; padding: 7px 0; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #edf1f4; }
.policy-card li:last-child { border-bottom: 0; }
.policy-card .ok {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #16805b;
  border-radius: 50%;
  font-size: 8px;
}
.policy-card b, .policy-card small { display: block; }
.policy-card b { color: #334258; font-size: 8px; }
.policy-card small { color: #8490a1; font-size: 7px; }
.request-table { margin-top: 11px; }
.request-table header button {
  padding: 5px 8px;
  color: #146eb4;
  background: #eef6fb;
  border: 0;
  border-radius: 3px;
  font-size: 7px;
}
.request-table .table-scroll { margin: 0; border: 0; }
.request-table table { font-size: 8px; }
.request-table th, .request-table td { padding: 8px 10px; }
.request-table code { font-size: 7px; }
.request-table .status { font-size: 6px; }
.playground, .audit-preview { display: grid; grid-template-columns: .8fr 1.5fr; gap: 12px; }
.playground-controls, .chat-preview, .audit-list, .evidence-card { padding: 14px; }
.playground-controls label, .audit-list label { display: block; margin-bottom: 11px; color: #68778b; font-size: 8px; font-weight: 650; }
.playground-controls select, .audit-list input {
  width: 100%;
  height: 31px;
  margin-top: 4px;
  padding: 0 8px;
  color: #344359;
  background: #fff;
  border: 1px solid #ccd6e0;
  border-radius: 4px;
  font-size: 8px;
}
.scenario-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scenario-buttons button {
  padding: 7px;
  color: #146eb4;
  background: #eef6fb;
  border: 1px solid #cbdfea;
  border-radius: 4px;
  font-size: 7px;
}
.chat-preview { min-height: 250px; }
.chat-message {
  max-width: 82%;
  margin-bottom: 12px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 8px;
  line-height: 1.5;
}
.chat-message.user { margin-left: auto; color: #fff; background: #146eb4; border-bottom-right-radius: 2px; }
.chat-message.assistant { color: #354359; background: #f0f3f6; border-bottom-left-radius: 2px; }
.decision-strip { margin: 10px 0; display: flex; flex-wrap: wrap; gap: 5px; }
.decision-strip span { padding: 3px 6px; color: #126c4f; background: #e7f6ef; border-radius: 999px; font-size: 6px; font-weight: 700; }
.chat-preview > small { color: #8490a1; font-size: 7px; }
.audit-result { margin-top: 7px; padding: 9px; border: 1px solid #e0e6ec; border-radius: 4px; }
.audit-result.selected { background: #eef6fb; border-color: #9dc7df; }
.audit-result code, .audit-result strong, .audit-result small { display: block; }
.audit-result code { width: fit-content; font-size: 7px; }
.audit-result strong { margin: 4px 0 1px; color: #304056; font-size: 8px; }
.audit-result small { color: #8592a1; font-size: 7px; }
.evidence-card { padding: 0; }
.evidence-card dl { margin: 0; padding: 8px 13px 13px; }
.evidence-card dl div { padding: 7px 0; display: grid; grid-template-columns: 42% 1fr; border-bottom: 1px solid #edf1f4; font-size: 8px; }
.evidence-card dl div:last-child { border-bottom: 0; }
.evidence-card dt { color: #7b8899; }
.evidence-card dd { margin: 0; color: #344359; font-weight: 650; overflow-wrap: anywhere; }

.reference-list { padding-left: 20px; }
.reference-list a { text-decoration: underline; text-decoration-color: #ddd6fb; text-underline-offset: 2px; }
.license { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; }
.last-reviewed { color: var(--muted); font-size: 11px; }

.search-empty {
  position: fixed;
  z-index: 50;
  top: 74px;
  left: calc(var(--nav-width) + 32px);
  padding: 9px 13px;
  color: #fff;
  background: var(--ink);
  border-radius: 3px;
  font-size: 11px;
}
.back-to-top {
  position: fixed;
  z-index: 15;
  right: 22px;
  bottom: 22px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--link);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(54, 36, 128, .25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: .16s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

dialog {
  width: min(96vw, 1500px);
  max-height: 94vh;
  padding: 44px 15px 15px;
  background: #f5f6fa;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}
dialog::backdrop { background: rgba(28, 27, 31, .78); }
dialog img { width: 100%; max-height: calc(94vh - 62px); object-fit: contain; background: #fff; }
dialog button {
  position: absolute;
  top: 7px;
  right: 10px;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  font-size: 19px;
}

@media (min-width: 1400px) {
  main { padding-left: 48px; padding-right: 48px; }
}

@media (max-width: 1050px) {
  :root { --nav-width: 330px; }
  .sidebar {
    z-index: 45;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 8px 0 30px rgba(0, 0, 0, .14);
  }
  .sidebar.open { transform: translateX(0); }
  .close-menu {
    position: absolute;
    top: 13px;
    right: 10px;
    display: block;
    color: var(--ink);
    background: transparent;
    border: 0;
    font-size: 23px;
  }
  .page {
    width: 100vw;
    max-width: 100vw;
    margin-left: 0;
  }
  .menu-button {
    width: 28px;
    display: grid;
    gap: 4px;
    padding: 5px;
    background: transparent;
    border: 0;
  }
  .menu-button span { height: 2px; background: var(--ink); }
  .search-empty { left: 22px; }
}

@media (max-width: 760px) {
  html { font-size: 15px; }
  .topbar { padding: 0 16px; gap: 12px; }
  .top-actions a { display: none; }
  .top-actions { margin-left: 0; }
  .top-actions button { display: none; }
  main {
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    padding: 24px 20px 75px;
    overflow: hidden;
  }
  article,
  .document-section,
  .summary {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  h1 { font-size: 34px; }
  h2 { font-size: 25px; }
  .anchor { display: none; }
  .fact-grid, .principle-grid, .comparison-grid, .security-grid, .cost-cards, .limitation-list,
  .feature-summary, .metric-grid, .dashboard-columns, .playground, .audit-preview {
    grid-template-columns: 1fr;
  }
  .fact-grid div,
  .fact-grid div:nth-child(3n),
  .fact-grid div:nth-last-child(-n+3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .fact-grid div:last-child { border-bottom: 0; }
  .feature-summary div { border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-summary div:last-child { border-bottom: 0; }
  .dashboard-top { grid-template-columns: 1fr auto; }
  .dashboard-badges { display: none; }
  .dashboard-shell { margin-right: -10px; margin-left: -10px; }
  .flow-list article { grid-template-columns: 32px 1fr; }
  .flow-list article > b { display: none; }
}

@media (max-width: 470px) {
  .search-wrap kbd, .top-actions { display: none; }
  .topbar { gap: 9px; }
  .hero-actions .button { width: 100%; justify-content: center; }
  .figure-toolbar { align-items: flex-start; }
  .figure-toolbar em { display: none; }
  .dashboard-body { padding-right: 10px; padding-left: 10px; }
  .scenario-buttons { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .topbar, .diagram-open > span, .copy-code, dialog, .back-to-top, .dashboard-nav { display: none !important; }
  .page { margin: 0; }
  main { width: 100%; padding: 0; }
  article { max-width: none; }
  .document-section { break-inside: auto; }
  .diagram, table, .callout, .principle-grid article, .dashboard-shell { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  body { font-size: 10pt; }
  h1 { font-size: 27pt; }
  h2 { font-size: 19pt; break-after: avoid; }
  .dashboard-panel { display: block !important; }
}
