/* Agentic AI Reference Architecture — static site styles.
   Colour roles follow the validated reference palette (light & dark). */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6f6d67;
  --hair: #e1e0d9;
  --axis: #c3c2b7;
  --ring: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --g1: #2a78d6; --g2: #eb6834; --g3: #1baf7a; --g4: #eda100;
  --g5: #e87ba4; --g6: #008300; --g7: #4a3aa7; --g8: #e34948;
  --edge: rgba(82, 81, 78, 0.35);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7;
    --muted: #9a988f; --hair: #2c2c2a; --axis: #383835; --ring: rgba(255, 255, 255, 0.10);
    --accent: #3987e5; --accent-ink: #86b6ef;
    --g1: #3987e5; --g2: #d95926; --g3: #199e70; --g4: #c98500;
    --g5: #d55181; --g6: #008300; --g7: #9085e9; --g8: #e66767;
    --edge: rgba(195, 194, 183, 0.30);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7;
  --muted: #9a988f; --hair: #2c2c2a; --axis: #383835; --ring: rgba(255, 255, 255, 0.10);
  --accent: #3987e5; --accent-ink: #86b6ef;
  --g1: #3987e5; --g2: #d95926; --g3: #199e70; --g4: #c98500;
  --g5: #d55181; --g6: #008300; --g7: #9085e9; --g8: #e66767;
  --edge: rgba(195, 194, 183, 0.30);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 15px/1.55 var(--font);
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 0.4rem 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 0.6rem; display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
h3 { font-size: 1rem; margin: 0 0 0.4rem; }
.lead { font-size: 1.08rem; color: var(--ink); max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

/* header / footer */
.site-header {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; padding: 0.6rem 16px; background: var(--surface);
  border-bottom: 1px solid var(--hair);
}
.brand { font-weight: 650; color: var(--ink); }
.site-header nav { display: flex; gap: 0.2rem; flex-wrap: wrap; flex: 1; }
.site-header nav a { color: var(--ink-2); padding: 0.25rem 0.55rem; border-radius: 6px; }
.site-header nav a[aria-current="page"], .site-header nav a:hover {
  background: var(--page); color: var(--ink); text-decoration: none;
}
.theme-toggle {
  border: 1px solid var(--hair); background: var(--surface); color: var(--ink);
  border-radius: 6px; padding: 0.2rem 0.55rem; cursor: pointer; font-size: 1rem;
}
main { max-width: 1120px; margin: 0 auto; padding: 1.2rem 16px 3rem; }
.site-footer { max-width: 1120px; margin: 0 auto; padding: 1rem 16px 2rem; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--hair); }

/* identity marks */
.dot { width: 0.7em; height: 0.7em; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 2px var(--surface); }
.dot.g1, circle.g1 { background: var(--g1); fill: var(--g1); }
.dot.g2, circle.g2 { background: var(--g2); fill: var(--g2); }
.dot.g3, circle.g3 { background: var(--g3); fill: var(--g3); }
.dot.g4, circle.g4 { background: var(--g4); fill: var(--g4); }
.dot.g5, circle.g5 { background: var(--g5); fill: var(--g5); }
.dot.g6, circle.g6 { background: var(--g6); fill: var(--g6); }
.dot.g7, circle.g7 { background: var(--g7); fill: var(--g7); }
.dot.g8, circle.g8 { background: var(--g8); fill: var(--g8); }
.comp { display: inline-flex; align-items: center; gap: 0.35rem; }
.badges { min-width: 0; display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.badge, .tag, .chip, .src {
  display: inline-block; border: 1px solid var(--hair); background: var(--surface);
  border-radius: 999px; padding: 0.05rem 0.6rem; font-size: 0.8rem; color: var(--ink-2);
}
.badge.accent { border-color: var(--accent); color: var(--accent-ink); }
.tag { font-size: 0.72rem; padding: 0 0.45rem; }
.src { font-family: var(--mono); font-size: 0.72rem; padding: 0 0.45rem; white-space: nowrap; }
.src.more { cursor: help; }
.chip { margin: 0 0.3rem 0.3rem 0; }
.crumbs { margin: 0; color: var(--muted); font-size: 0.9rem; }
.criterion { border-left: 3px solid var(--accent); padding: 0.4rem 0.8rem; background: var(--surface); border-radius: 0 6px 6px 0; }

/* layout blocks */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.ego-wrap { margin: 0; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 0.4rem; }
.ego-wrap figcaption { color: var(--muted); font-size: 0.8rem; text-align: center; }
svg.ego { width: 100%; height: auto; display: block; }
svg.ego line { stroke: var(--axis); stroke-width: 1.2; }
svg.ego circle { stroke: var(--surface); stroke-width: 2; }
svg.ego circle.center { stroke: var(--ink); stroke-width: 2; }
svg.ego text { fill: var(--ink-2); font: 13px var(--font); }
svg.ego text.more { fill: var(--muted); }
svg.ego a:hover text { fill: var(--ink); text-decoration: underline; }

.rels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 0.8rem; }
.rel { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 0.7rem 0.9rem; }
.rel ul { margin: 0; padding-left: 1.1rem; }
.rel li { margin: 0.15rem 0; }
.cat { font-weight: 400; color: var(--muted); font-size: 0.75rem; margin-left: 0.3rem; }
.guidance li, .sources li, .biblio li { margin: 0.3rem 0; }
.concepts dt { font-weight: 600; margin-top: 0.6rem; }
.concepts dd { margin: 0.3rem 0 0; }

table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden; font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--hair); }
th { color: var(--ink-2); font-weight: 600; background: var(--page); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.wide { display: block; overflow-x: auto; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.tile { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 0.8rem 1rem; display: flex; flex-direction: column; }
.tile b { font-size: 1.6rem; }
.tile span { color: var(--ink-2); font-size: 0.88rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 0.8rem; }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 0.8rem 1rem; }
.card h3 { display: flex; align-items: center; gap: 0.45rem; }
.card ul { margin: 0; padding-left: 1.1rem; }

.search { width: 100%; max-width: 640px; padding: 0.55rem 0.8rem; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: 8px; }
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.results { padding-left: 1.2rem; max-width: 760px; }
.results li { margin: 0.35rem 0; }
.results .def { display: block; color: var(--muted); font-size: 0.85rem; }

.tree { list-style: none; padding-left: 1.1rem; border-left: 1px solid var(--hair); margin: 0.3rem 0; }
.tree li { margin: 0.35rem 0; }
.vp, .profile { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 0.4rem 1rem 0.8rem; margin: 0.9rem 0; }
.vp h2, .profile h2 { margin-top: 0.6rem; }
.chips .comp { margin-right: 0.8rem; }

/* explorer */
body:has(.explore) main { max-width: none; padding: 0; }
body:has(.explore) .site-footer { display: none; }
.explore { display: grid; grid-template-columns: 260px minmax(0, 1fr) 330px; height: calc(100vh - 52px); min-height: 520px; }
.controls, .panel { background: var(--surface); padding: 0.9rem 1rem; overflow-y: auto; }
.controls { border-right: 1px solid var(--hair); }
.panel { border-left: 1px solid var(--hair); }
.graph { position: relative; background: var(--page); min-height: 420px; }
.block { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.h-small { font-size: 0.9rem; margin: 1.1rem 0 0.4rem; color: var(--ink-2); }
.legend { display: flex; flex-direction: column; gap: 0.2rem; }
.legend-item { display: flex; align-items: center; gap: 0.5rem; background: none; border: 1px solid transparent; color: var(--ink); text-align: left; font: inherit; font-size: 0.88rem; padding: 0.2rem 0.4rem; border-radius: 6px; cursor: pointer; }
.legend-item:hover { border-color: var(--hair); }
.legend-item[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; }
.legend-item[aria-pressed="false"] .dot { opacity: 0.25; }
.cats { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.88rem; }
.button { margin-top: 1rem; font: inherit; padding: 0.35rem 0.8rem; border-radius: 6px; border: 1px solid var(--axis); background: var(--surface); color: var(--ink); cursor: pointer; }
.panel h2 { margin-top: 0.2rem; }
.panel ul { padding-left: 1.1rem; margin: 0.3rem 0; }
.panel li { margin: 0.12rem 0; font-size: 0.88rem; }
.panel .reltype { color: var(--muted); font-size: 0.8rem; }
@media (max-width: 980px) {
  .explore { grid-template-columns: 1fr; height: auto; }
  .graph { height: 70vh; }
  .controls, .panel { border: 0; border-top: 1px solid var(--hair); }
}
@media (forced-colors: active) { .dot { forced-color-adjust: none; } }

/* small screens: single-row, swipeable nav; never overflow horizontally */
main, .panel, .controls { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .site-header { position: relative; gap: 0.3rem; padding-right: 64px; }
  .brand { flex: 1 1 100%; }
  .site-header nav { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .site-header nav a { white-space: nowrap; }
  .theme-toggle { position: absolute; right: 16px; top: 0.55rem; }
  h1 { font-size: 1.45rem; }
  .explore { height: auto; }
}

/* ND-SKIN BEGIN — generated from theme preset "ndstudio" by .github/scripts/skin_reference_architecture.py.
   Do not edit by hand: change docs/_data/themes/ndstudio.yml and re-run the script. */
:root { --page: #ffffff; --surface: #f5f5f5; --ink: #010101; --ink-2: #3a3a3a; --muted: #6b6b6b; --hair: #d9d9d9; --axis: #c4c4c4; --accent: #3760f2; --accent-ink: #3760f2; --edge: rgba(58, 58, 58, 0.35); --rule: #010101; --radius: 0; --font: "PP Neue Montreal", "Neue Montreal", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #a09f98; --hair: #2c2c2a; --axis: #383835; --accent: #8ba2ff; --accent-ink: #8ba2ff; --edge: rgba(195, 194, 183, 0.3); --rule: #ffffff; }
}
:root[data-theme="dark"] { --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #a09f98; --hair: #2c2c2a; --axis: #383835; --accent: #8ba2ff; --accent-ink: #8ba2ff; --edge: rgba(195, 194, 183, 0.3); --rule: #ffffff; }

body {
  background: var(--page); color: var(--ink); font-family: var(--font);
  font-weight: 400; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* header */
.site-header { background: var(--page); border-bottom-color: var(--hair); align-items: center; }
.brand { font-weight: 500; letter-spacing: -0.035em; }
.site-header nav a { border-radius: var(--radius); color: var(--ink-2); }
.site-header nav a[aria-current="page"], .site-header nav a:hover {
  background: transparent; color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink);
}
.nd-back { color: var(--ink-2); font-size: 0.9rem; white-space: nowrap; padding-right: 0.9rem; border-right: 1px solid var(--hair); }
.nd-back:hover { color: var(--ink); }
.theme-toggle {
  width: 2rem; height: 2rem; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink);
}
.theme-toggle:hover { background: var(--ink); color: var(--page); }

/* shapes: square, hairline, flat */
.badge, .tag, .chip, .src { border-radius: var(--radius); }
.criterion { border-left-color: var(--ink); border-radius: 0; }
.search { border-radius: var(--radius); border-color: var(--axis); background: var(--page); }
.search:focus { outline-color: var(--ink); }
.legend-item, .button { border-radius: var(--radius); }
.button { border-color: var(--ink); background: transparent; font-weight: 500; }
.button:hover { background: var(--ink); color: var(--page); }
.tile b { font-weight: 500; letter-spacing: -0.035em; }
.tile, .card, .rel, .vp, .profile, .ego-wrap { border-color: var(--hair); }

/* tables: hairlines only */
table { background: transparent; border: 0; border-radius: 0; }
th { background: transparent; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--rule); }

/* note added by theme.js */
.nd-note { margin: 0.6rem 0 0; }
.nd-note a { color: var(--ink); text-decoration: underline; }
/* ND-SKIN END */
