/* How to Secure AI Agents: three-pane runbook. Page #EEF3F0, white surfaces, accent #0F6B3E.
   Public Sans (headings, nav, chips, labels), Atkinson Hyperlegible (body), IBM Plex Mono (code, IDs); all self-hosted. */
@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/public-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(/assets/fonts/public-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(/assets/fonts/public-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: italic; font-display: swap; src: url(/assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url(/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }

:root {
  --page: #EEF3F0; --surf: #fff; --acc: #0F6B3E; --ink: #142019; --mut: #4a5b52; --line: #cfdad3; --tint: #e3efe8; --idline: #8fb09d; --focus: #b35c00;
  --head: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--page); color: var(--ink); font: 1.0625rem/1.55 var(--body); }
h1, h2, h3, h4, h5, .nav, .chip, .k, legend, button, .colhead { font-family: var(--head); }
code, pre, .id { font-family: var(--mono); }
a { color: var(--acc); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* top bar */
.top { background: var(--surf); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 10px 20px; }
.brand { font: 700 1.0625rem var(--head); color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--idline); }
.nav a[aria-current], .nav a.on { border-bottom-color: var(--acc); font-weight: 600; }

/* panes */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 1320px; margin: 0 auto; padding: 18px 20px 40px; }
.shell.no-side { max-width: 1060px; }
.has-side .shell { grid-template-columns: 260px minmax(0, 1fr); }
.side { position: sticky; top: 12px; align-self: start; background: var(--surf); border: 1px solid var(--line); border-radius: 6px; padding: 14px; max-height: calc(100vh - 24px); overflow: auto; }
.side h2, .chips legend { font: 700 .875rem var(--head); margin: 0 0 6px; padding: 0; }
.chips { border: 0; margin: 0; padding: 0; min-width: 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; display: inline-block; border: 1px solid var(--acc); color: var(--acc); background: #fff; border-radius: 16px; padding: 4px 11px; font-size: .85rem; line-height: 1.3; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip:hover { background: var(--tint); }
.chip:has(input:checked) { background: var(--acc); color: #fff; }
.chip:has(input:checked)::before { content: "\2713\00a0"; }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.cnt { margin: 12px 0 0; font: 600 .8125rem var(--head); color: var(--mut); }
.idx { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.idx a { display: block; padding: 6px 8px; border-left: 3px solid transparent; text-decoration: none; color: var(--ink); }
.idx a:hover { background: var(--tint); }
.idx a:target, .idx a[aria-current] { border-left-color: var(--acc); background: var(--tint); font-weight: 600; }

main { min-width: 0; }
main h1 { font-size: 1.9rem; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 2rem 0 .6rem; }
h3 { font-size: 1.12rem; line-height: 1.3; margin: 1.5rem 0 .5rem; }
h4 { font-size: 1rem; line-height: 1.35; margin: 1.2rem 0 .4rem; }
h5 { font-size: 1rem; margin: 1.2rem 0 .3rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
main p, main li, main dd { max-width: 74ch; }
.answer, .lede { font-size: 1.0625rem; max-width: 72ch; margin: 0 0 .5rem; }
.updated { color: var(--mut); font-size: .875rem; margin: 0 0 1rem; }

/* content pages: one white surface per page body unless the page builds its own cards */
.page main > :where(h2, h3, h4, p, ul, ol, dl, pre, blockquote, .table-wrap, .downloads) { }
.pane { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 0 20px; align-items: start; }
.pane-main { min-width: 0; background: var(--surf); border: 1px solid var(--line); border-radius: 6px; padding: 6px 22px 18px; }
.pane-main > :first-child { margin-top: 1rem; }
.pane > .gut { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.no-side main > p, .no-side main > ul, .no-side main > ol, .no-side main > h2, .no-side main > h3, .no-side main > .table-wrap, .no-side main > pre { }

code { font-size: .88em; background: var(--tint); padding: .05em .3em; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: #102019; color: #e6f2ea; padding: 12px 14px; border-radius: 6px; overflow: auto; font: .84rem/1.5 var(--mono); margin: 8px 0 1rem; max-width: 100%; }
pre code { background: none; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }
blockquote { margin: 0 0 1rem; padding: .1rem 1rem; border-left: 3px solid var(--idline); color: var(--mut); }
sup.fn a { text-decoration: none; }
ol.sources { font-size: .92rem; color: var(--mut); padding-left: 1.6rem; }
ol.sources li { margin-bottom: .35rem; overflow-wrap: anywhere; }
main a { overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; margin: 0 0 1rem; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.45; background: var(--surf); }
th, td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
thead th { background: var(--tint); font-family: var(--head); font-size: .8rem; }
table.fw { min-width: 38rem; }
table.checklist { min-width: 62rem; }
table.checklist th[scope="row"] { font-weight: 600; min-width: 9rem; }
main > table { display: block; overflow-x: auto; }

/* runbook cards, gutter with framework IDs */
.rb { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 0 20px; border-top: 1px solid var(--line); padding: 14px 0; align-items: start; }
.rb > article, .rb > section { margin: 0; }
.rb-solo { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) { .rb > .gut { align-self: stretch; height: 0; min-height: 100%; overflow: auto; } }
article.control, .matrix-threat, article.threat { background: var(--surf); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; }
article.control > :first-child, .matrix-threat > :first-child, article.threat > :first-child { margin-top: 0; }
article.control h3, article.control h4, article.control h2 { margin: 0 0 6px; font-size: 1.12rem; }
article.control h2 { font-size: 1.3rem; }
article.control h3 a, article.control h4 a, article.control h2 a { color: var(--ink); text-decoration-color: var(--idline); }
article.threat { margin: 0 0 10px; padding: 10px 14px; }
article.threat h4, article.threat h3 { margin: 0 0 4px; font-size: 1rem; }
.matrix-threat h2, .matrix-threat h3 { margin-top: 0; }
.matrix-threat h3 { font-size: 1rem; }
.rb:first-of-type { border-top: 0; }
.reason, .naming, .src, .needs { font-size: .95rem; }
.naming { color: var(--mut); }
.what { margin: 4px 0; }
article p { margin: 4px 0 8px; }
dl.steps { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 4px 10px; margin: 8px 0; }
dl.steps dt { font: 700 .75rem var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--acc); padding-top: .25rem; }
dl.steps dd { margin: 0; }
.reason strong, .src strong, .needs strong, .chosen strong, .naming strong { font: 700 .75rem var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--acc); margin-right: 4px; }
.gut { font-size: .8125rem; padding: 4px 0 4px 10px; border-left: 3px solid var(--acc); min-width: 0; }
.gut b { display: block; font: 700 .72rem var(--head); color: var(--mut); text-transform: uppercase; letter-spacing: .06em; margin: 8px 0 3px; }
.gut b:first-child { margin-top: 0; }
.ids { display: block; }
.id { display: inline-block; background: var(--tint); border: 1px solid #bcd3c5; border-radius: 3px; padding: 0 5px; margin: 0 3px 3px 0; font-size: .78rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.id:hover { border-color: var(--acc); text-decoration: underline; }
.result > h2, .result > h3 { font: 700 .75rem var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--mut); border-bottom: 2px solid var(--ink); padding: 0 0 6px; margin: 1.4rem 0 12px; }
.result > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: -1px; }
.tool-page .result > h3:first-of-type::before { content: "Runbook: "; }
.tool-page .result > h3:first-of-type::after { content: "Framework entries"; float: right; width: 230px; padding-left: 13px; margin-right: 0; }
.chosen { font-size: .875rem; margin: 0 0 8px; color: var(--mut); }
.result > .order-logic { font-size: .9rem; color: var(--mut); margin: 12px 0 0; }
@media (max-width: 900px) { .tool-page .result > h3:first-of-type::after { content: none; } }
.chosen, .order-logic { font-size: .95rem; }
ul.fw-list, ol.mctl-list { padding-left: 1.3rem; }
.matrix-threat { margin: 0; }
.mctl { border-top: 1px solid var(--line); margin-top: 1rem; }
.toc ol { columns: 2 16rem; padding-left: 1.3rem; background: var(--surf); border: 1px solid var(--line); border-radius: 6px; padding-top: 10px; padding-bottom: 10px; padding-right: 10px; margin-left: 0; list-style-position: inside; }
.shapes { margin-top: 2rem; }
.shape { margin-top: 1.2rem; background: var(--surf); border: 1px solid var(--line); border-radius: 6px; padding: 8px 18px 10px; }
.shape h3 { margin-top: .6rem; }
.downloads { font-weight: 600; }
.cl-section h2 { margin-top: 1.5rem; }
ul.run-files { list-style: none; padding: 0; background: var(--surf); border: 1px solid var(--line); border-radius: 6px; }
ul.run-files li { padding: 6px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .9rem; max-width: none; }

/* threat details in the builder result */
article.threat details > summary { list-style: none; cursor: pointer; position: relative; padding-left: 1.3rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; list-style-position: outside; }
article.threat details > summary::-webkit-details-marker { display: none; }
article.threat details > summary::before { content: ""; position: absolute; left: .25rem; top: .45em; width: .45rem; height: .45rem; border-right: 2px solid var(--acc); border-bottom: 2px solid var(--acc); transform: rotate(-45deg); transition: transform .12s; }
article.threat details[open] > summary::before { transform: rotate(45deg); top: .35em; }
article.threat .cue { flex: 0 0 100%; font-size: .8rem; color: var(--acc); font-weight: 600; font-family: var(--head); }
article.threat details[open] .cue { display: none; }
article.threat summary h3, article.threat summary h4 { display: inline; margin: 0; }
article.threat summary .ids { display: inline; }
article.threat details[open] > summary { margin-bottom: 6px; }
@media print { details::details-content { content-visibility: visible; display: block; } }
/* tool */
.js-only { display: none; }
.js .js-only { display: block; }
.js .nojs { display: none; }
.rec, .print-only { display: none; }
ul.src { font-size: .92rem; margin-top: 0; }
table.rec-fields th { text-align: left; background: var(--tint); }
table.rec-fields td { min-width: 9rem; height: 1.8rem; }
.builder { margin: .4rem 0 1rem; }
.js .builder form { padding: 0; border: 0; background: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.builder h2 { flex: 0 0 100%; margin: 0; font-size: 1rem; }
.builder form > p:not(.presets):not(.actions) { flex: 0 0 100%; margin: 0; font-size: .875rem; color: var(--mut); max-width: none; }
.builder .presets, .builder .actions { margin: 0; font-size: .85rem; }
.builder .actions { gap: .35rem; }
.builder .presets select { font-size: .85rem; padding: .15rem .3rem; }
.builder .presets label { font-weight: 600; margin-right: 4px; }
.builder button { font-size: .75rem; padding: .25rem .5rem; }
.presets select { font: inherit; padding: .3rem .4rem; max-width: 100%; border: 1px solid var(--idline); border-radius: 4px; background: #fff; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 0; }
button { font: 600 .9rem var(--head); padding: .5rem .9rem; border: 1px solid var(--acc); background: var(--acc); color: #fff; border-radius: 4px; cursor: pointer; }
button[type="reset"] { background: #fff; color: var(--acc); }
button:disabled { opacity: .5; cursor: default; }
.result-wrap { margin-top: 1rem; }

.site-footer { max-width: 1320px; margin: 0 auto; padding: 0 20px 2rem; font-size: .92rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; border-top: 1px solid var(--line); padding-top: 1rem; }

@media (min-width: 901px) { .toc { display: none; } .jump { display: none; } }
.cnt-row { margin: 12px 0 0; }
.cnt-row .cnt { margin: 0; }
.jump { font: 600 .8125rem var(--head); margin-left: 8px; }
@media (max-width: 900px) {
  .matrix-threat + .gut { display: none; }
  .builder form { gap: 8px; }
  .has-side .shell, .shell { grid-template-columns: minmax(0, 1fr); padding: 12px 12px 32px; }
  .side { position: static; max-height: none; }
  .toc-side { display: none; }
  .rb, .pane { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gut { border-left: 0; border-top: 3px solid var(--acc); padding: 6px 0 0; }
  .pane > .gut { position: static; order: -1; max-height: none; }
  .pane-main { padding: 4px 14px 14px; }
  main h1 { font-size: 1.55rem; }
  .top { padding: 10px 12px; }
  .site-footer { padding: 0 12px 2rem; }
  dl.steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  dl.steps dt { padding-top: .5rem; }
  .builder form { padding: 12px; }
  article.control, .matrix-threat, article.threat { padding: 12px; }
}

@media screen and (max-width: 640px) {
  .table-wrap { overflow: visible; }
  table, table.fw, table.checklist { min-width: 0; display: block; }
  table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table tbody, table tr, table td:not(.rec), table th:not(.rec) { display: block; }
  table tr { background: var(--surf); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 0 0 10px; }
  table td, table th { border: 0; padding: 3px 0; }
  td[data-label]:not(.rec)::before, th[scope="row"][data-label]::before { content: attr(data-label); display: block; font: 700 .72rem var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--acc); }
  table.rec-fields tr { display: table-row; border: 0; padding: 0; margin: 0; }
  table.rec-fields td, table.rec-fields th { display: table-cell; }
}
@media print {
  .rec { display: table-cell; }
  .print-only { display: block; }
  table.checklist td.rec { min-width: 3.2rem; height: 2.2rem; }
  body { font-size: 10.5pt; line-height: 1.45; color: #000; background: #fff; }
  .top, .site-footer, .skip, .actions, .presets, .downloads, .toc, .side { display: none !important; }
  .shell, .has-side .shell { display: block; max-width: none; padding: 0; }
  a { color: #000; text-decoration: none; }
  table { font-size: 8.5pt; }
  table.checklist, table.fw { min-width: 0; }
  th, td { padding: 3pt 4pt; }
  tr, article, .mctl, .rb { break-inside: avoid; }
  h2, h3, h4 { break-after: avoid; }
  .table-wrap { overflow: visible; }
  .pane { display: block; }
  .pane-main, article.control, .matrix-threat, article.threat { border-color: #999; }
  pre { background: #fff; color: #000; border: 1px solid #999; white-space: pre-wrap; }
  .id { border-color: #999; background: #fff; }
  .rb { grid-template-columns: minmax(0, 1fr) 150pt; }
  /* the builder prints only its result */
  .js body.tool-page main > :not(.builder), .js body.tool-page .builder form { display: none !important; }
  .js body.tool-page .nojs { display: none !important; }
  .builder form { border: 0; }
}
@page { margin: 14mm; }

.capq{margin:10px 0 0;font-size:14px;line-height:1.45}
.capq summary{cursor:pointer;color:var(--acc);font-weight:600;font-family:"Public Sans",system-ui,sans-serif}
.capq dl{margin:8px 0 0}.capq dt{font-weight:700;margin-top:8px}.capq dd{margin:2px 0 0}.capq .ex{color:var(--mut)}
@media print{.capq{display:none}}
/* phone: the how-to gutter repeats the "What this control stops" table below it */
@media (max-width: 900px) { .pane > .gut { display: none; } }
