/* dnedev.github.io: hand-written, no framework, no external requests. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens. Strata bands run bottom to top, from deep to light. Orange is
   the one accent: link underlines, focus, and list and fold markers. */
:root {
  color-scheme: light;
  --paper: #F6F7F4;
  --ink: #17202B;
  --muted: #4B5563;
  --rule: #D3D9DE;
  --focus: #E4570B;
  --accent: #E4570B;
  --accent-soft: rgb(228 87 11 / 0.10);
  --band-edge: rgb(23 32 43 / 0.08);
  --s1: #0D3340;
  --s2: #134656;
  --s3: #1B5B6C;
  --s4: #9CC8CE;
  --s5: #B5D7DB;
  --s6: #CDE5E7;
  --s7: #E3F0F1;
  --on-deep: #FFFFFF;
  --on-deep-soft: #C9DDE2;
  --on-light: #17202B;
  --on-light-soft: #2E3B47;
  --chart-bar: #1B5B6C;
  /* The arrow after links to other sites, in --muted and --accent. */
  --ext-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 3h5v5M9 3 3 9' fill='none' stroke='%234B5563' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --ext-arrow-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 3h5v5M9 3 3 9' fill='none' stroke='%23E4570B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 38rem;
  --rail: 11rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #121922;
    --ink: #E6EBEF;
    --muted: #A3AEB8;
    --rule: #2C3743;
    --focus: #FF8A3D;
    --accent: #FF8A3D;
    --accent-soft: rgb(255 138 61 / 0.12);
    --band-edge: rgb(255 255 255 / 0.06);
    --s1: #173E4B;
    --s2: #1D4D5D;
    --s3: #245E70;
    --s4: #86BFC7;
    --s5: #A2CFD5;
    --s6: #BDDDE1;
    --s7: #D7EBED;
    --chart-bar: #86BFC7;
    --ext-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 3h5v5M9 3 3 9' fill='none' stroke='%23A3AEB8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --ext-arrow-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 3h5v5M9 3 3 9' fill='none' stroke='%23FF8A3D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121922;
  --ink: #E6EBEF;
  --muted: #A3AEB8;
  --rule: #2C3743;
  --focus: #FF8A3D;
  --accent: #FF8A3D;
  --accent-soft: rgb(255 138 61 / 0.12);
  --band-edge: rgb(255 255 255 / 0.06);
  --s1: #173E4B;
  --s2: #1D4D5D;
  --s3: #245E70;
  --s4: #86BFC7;
  --s5: #A2CFD5;
  --s6: #BDDDE1;
  --s7: #D7EBED;
  --chart-bar: #86BFC7;
  --ext-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 3h5v5M9 3 3 9' fill='none' stroke='%23A3AEB8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --ext-arrow-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 3h5v5M9 3 3 9' fill='none' stroke='%23FF8A3D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Wide screens. Everything is sized in rem, so a larger root size scales
   the whole page up a step: it fills more of the screen, and lines keep
   their length in characters. Media queries in rem follow the reader's
   default font size and zoom. */
@media (min-width: 100rem) {
  html { font-size: 112.5%; }
}
@media (min-width: 140rem) {
  html { font-size: 125%; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  overflow-x: hidden;
}
@media (min-width: 48rem) {
  body { font-size: 1.125rem; }
}

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 3px; }
/* Links that leave the site get a gray underline, orange on hover. */
a[href^="http://"],
a[href^="https://"] { text-decoration-color: var(--muted); }
a[href^="http://"]:hover,
a[href^="https://"]:hover { text-decoration-color: var(--accent); }
/* A small arrow after them, drawn as a background image (no mask, which
   some browsers paint as a box). An empty inline box keeps it on the line
   of the link's last word, and screen readers have nothing to announce. */
a[href^="http://"]::after,
a[href^="https://"]::after {
  content: "";
  padding-left: 0.75em;
  margin-left: 0.1em;
  background: var(--ext-arrow) no-repeat 50% 40% / 0.7em 0.7em;
}
a[href^="http://"]:hover::after,
a[href^="https://"]:hover::after { background-image: var(--ext-arrow-hover); }
::selection { background: var(--accent-soft); }
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  background: var(--paper);
  padding: 0.25rem 0.5rem;
}

.page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 100rem) {
  .page { max-width: 80rem; }
}

/* Header ---------------------------------------------------------- */

.masthead {
  padding: clamp(2.5rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem);
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 60rem) {
  .masthead {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 28rem);
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: end;
  }
}

.name {
  margin: 0 0 1.25rem;
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  line-height: 0.98;
  font-weight: 780;
  letter-spacing: -0.025em;
}
.lede {
  margin: 0 0 1.25rem;
  max-width: 30ch;
  text-wrap: balance;
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  line-height: 1.3;
  font-weight: 450;
  letter-spacing: -0.005em;
}
.intro {
  margin: 0 0 1.5rem;
  max-width: var(--measure);
  color: var(--muted);
}
.elsewhere {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.elsewhere a { font-weight: 600; }

/* Strata figure: list is in source order bottom-up, shown bottom-up. */
.strata { margin: 0; }
.strata ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
}
.strata li {
  position: relative;
  box-shadow: inset 0 0 0 1px var(--band-edge);
  font-size: 0.9375rem;
  line-height: 1.35;
}
.strata a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  color: inherit;
  text-decoration: none;
}
.strata a:hover .layer {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.strata a:focus-visible {
  outline-offset: -3px;
  box-shadow: inset 0 0 0 6px var(--paper);
}
.strata .layer { font-weight: 650; flex: none; }
.strata .work { text-align: right; min-width: 0; }
.strata li:nth-child(1) { background: var(--s1); }
.strata li:nth-child(2) { background: var(--s2); }
.strata li:nth-child(3) { background: var(--s3); }
.strata li:nth-child(4) { background: var(--s4); }
.strata li:nth-child(5) { background: var(--s5); }
.strata li:nth-child(6) { background: var(--s6); }
.strata li:nth-child(7) { background: var(--s7); }
.strata li:nth-child(-n+3) { color: var(--on-deep); }
.strata li:nth-child(-n+3) .work { color: var(--on-deep-soft); }
.strata li:nth-child(n+4) { color: var(--on-light); }
.strata li:nth-child(n+4) .work { color: var(--on-light-soft); }
.strata figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}
@media (max-width: 30rem) {
  .strata a { flex-direction: column; gap: 0.1rem; }
  .strata .work { text-align: left; }
}

/* One load moment: the stack builds from the storage layer up. */
@media (prefers-reduced-motion: no-preference) {
  .strata li {
    animation: lay 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .strata li:nth-child(2) { animation-delay: 70ms; }
  .strata li:nth-child(3) { animation-delay: 140ms; }
  .strata li:nth-child(4) { animation-delay: 210ms; }
  .strata li:nth-child(5) { animation-delay: 280ms; }
  .strata li:nth-child(6) { animation-delay: 350ms; }
  .strata li:nth-child(7) { animation-delay: 420ms; }
  @keyframes lay {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}

/* Sections -------------------------------------------------------- */

.section {
  border-top: 1px solid var(--rule);
  padding: 2.25rem 0 2.75rem;
  display: grid;
  gap: 1rem;
}
@media (min-width: 48rem) {
  .section {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    column-gap: 2rem;
  }
}
.section > h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
}
.section-body > :first-child { margin-top: 0; }
.section-body > :last-child { margin-bottom: 0; }
.section-body p { max-width: var(--measure); }

.strands {
  display: grid;
  gap: 2.25rem;
}
.focus {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.75rem 2.5rem;
  align-items: start;
}
@media (min-width: 60rem) {
  .focus { grid-template-columns: 1fr 1fr; }
}
.focus li {
  padding-left: 0.85rem;
  border-left: 2px solid var(--accent);
}
.focus strong { font-weight: 650; }
.strands h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}
.strands p { margin: 0 0 0.85rem; }

/* Dated entries: talks, writing, path, research. */
.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}
.entries > li {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.entries > li:first-child { padding-top: 0; }
.entries > li:last-child { border-bottom: 0; }
@media (min-width: 40rem) {
  .entries > li { grid-template-columns: 7.5rem minmax(0, 1fr); }
}
/* Wide screens: a long list of entries flows into two columns, down then
   across, so it still reads newest first. */
@media (min-width: 100rem) {
  .entries.two { column-count: 2; column-gap: 3rem; }
  .entries.two > li { break-inside: avoid; padding: 0 0 0.85rem; margin-bottom: 0.85rem; }
}
.when {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: lining-nums tabular-nums;
}
.what { margin: 0; max-width: var(--measure); }
.what strong { font-weight: 650; }
.what .detail {
  display: block;
  color: var(--muted);
}
.what p { margin: 0; }
.what .links { display: block; margin-top: 0.2rem; }
.what .links a + a { margin-left: 1rem; }
.roles {
  list-style: disc;
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.roles li { margin: 0.25rem 0; }
.roles li::marker { color: var(--accent); }
.roles .role { color: var(--ink); font-weight: 600; }
.entries > li, .strands > div { scroll-margin-top: 1.5rem; }
.strands > div:target {
  padding-left: 1rem;
  background: linear-gradient(var(--accent), var(--accent)) left top / 4px 100% no-repeat;
}
.entries > li:target {
  padding-left: 1rem;
  background: linear-gradient(var(--accent), var(--accent)) left top / 4px 100% no-repeat;
}
/* Folds for older material: closed by default. Stack bands for earlier
   work link to the fold itself, which lands on its summary in every
   browser; not all browsers open a closed fold for a link inside it. */
.fold {
  margin-top: 0.85rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1.5rem;
}
.fold > summary {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.85rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: "";
  flex: none;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-0.1em) rotate(-45deg);
}
.fold[open] > summary::before { transform: translateY(-0.25em) rotate(45deg); }
.fold > summary:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.fold > summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.fold > .entries { margin-bottom: 0.5rem; }
@media (prefers-reduced-motion: no-preference) {
  .fold > summary::before { transition: transform 150ms ease-out; }
}


.note {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 1.25rem 0 0;
  max-width: var(--measure);
}

.colophon {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 3rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.colophon p { margin: 0 0 0.4rem; max-width: var(--measure); }

/* Publications page ---------------------------------------------- */

.back { margin: 2rem 0 0; }
.pub-title {
  margin: 1.5rem 0 0.5rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.05;
  font-weight: 760;
  letter-spacing: -0.02em;
}
.pub-intro { max-width: var(--measure); color: var(--muted); margin: 0 0 2rem; }
.pubs .what em { font-style: italic; }
.pubs .links { display: block; margin-top: 0.15rem; }
.pubs .links a + a { margin-left: 1rem; }

@media print {
  .strata li { animation: none; }
  a { color: inherit; }
}

/* Agents page: the loop and the charts are inline SVG drawn from the same
   tokens, so they follow the theme. Nothing animates. */
.chart-title {
  margin: 2rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
}
.figure { margin: 1rem 0 2rem; }
.figure svg {
  display: block;
  width: 100%;
  max-width: 26rem;
  height: auto;
  overflow: visible;
}
.figure figcaption { margin-top: 0.85rem; max-width: var(--measure); }
/* On wide screens each chart sits beside its caption. */
@media (min-width: 100rem) {
  .figure {
    display: grid;
    grid-template-columns: 26rem minmax(0, var(--measure));
    column-gap: 2.5rem;
    align-items: start;
  }
  .figure figcaption { margin-top: 0; }
}
/* From laptop width, two diagrams or charts share a row, each with its
   caption under it. */
@media (min-width: 72rem) {
  .charts.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
    align-items: start;
  }
  .charts.two > p, .charts.two > .lead, .charts.two > .focus { grid-column: 1 / -1; }
  .charts.two > .focus { margin-top: 2.5rem; }
  .charts.two > .chart-title { grid-row: 2; }
  .charts.two > .figure { grid-row: 3; margin-bottom: 0; }
}
/* The three charts in a row, each with its caption under it, and the three
   Try it items side by side. */
@media (min-width: 100rem) {
  .charts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 2.5rem;
    align-items: start;
  }
  .charts > p, .charts > .lead, .charts > .focus { grid-column: 1 / -1; }
  .charts > .focus { margin-top: 2.5rem; }
  .charts > .chart-title { grid-row: 2; }
  .charts > .figure { grid-row: 3; display: block; margin-bottom: 0; }
  .charts > .figure figcaption { margin-top: 0.85rem; }
  .charts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .focus.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Some sections share a row. Their headings sit on top, because half a row
   is too narrow for the left rail. The reading order stays the same. */
@media (min-width: 100rem) {
  main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 3.5rem;
    align-items: start;
  }
  main > * { grid-column: 1 / -1; }
  main > .section.pair { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .pair .focus { grid-template-columns: minmax(0, 1fr); }
  .pair .figure { display: block; }
  .pair .figure figcaption { margin-top: 0.85rem; }
}
/* Agents page: The setup keeps the first row. Below it the loop diagram
   takes the right half, and the profile, the loop's heading, its lead-in and
   its caption stack on the left, so the short profile text no longer sits
   beside an empty column. Needs subgrid; without it the two sections stay
   side by side as above. */
@media (min-width: 100rem) {
  @supports (grid-template-rows: subgrid) {
    main.loop-beside { grid-template-rows: auto auto auto auto auto 1fr; }
    main.loop-beside > .section[aria-labelledby="setup"] { grid-row: 1; }
    main.loop-beside > .section[aria-labelledby="profile"] {
      grid-column: 1;
      grid-row: 2;
      position: relative;
      z-index: 1;
    }
    main.loop-beside > .section[aria-labelledby="loop"] {
      grid-column: 1 / -1;
      grid-row: 2 / span 5;
      grid-template-columns: subgrid;
      grid-template-rows: subgrid;
      column-gap: 3.5rem;
      row-gap: 0;
    }
    main.loop-beside > .section[aria-labelledby="loop"] > h2 { grid-column: 1; grid-row: 2; margin-bottom: 1rem; }
    main.loop-beside > .section[aria-labelledby="loop"] > .section-body,
    main.loop-beside > .section[aria-labelledby="loop"] .figure { display: contents; }
    main.loop-beside > .section[aria-labelledby="loop"] .section-body > p { grid-column: 1; grid-row: 3; margin: 0 0 1rem; }
    main.loop-beside > .section[aria-labelledby="loop"] .figure svg {
      grid-column: 2;
      grid-row: 1 / span 5;
    }
    main.loop-beside > .section[aria-labelledby="loop"] .figure figcaption { grid-column: 1; grid-row: 4; margin-top: 0; }
  }
}
/* Experience splits at the second job: the latest job with the folds under
   it on the left, the one before on the right. Needs subgrid. */
@media (min-width: 100rem) {
  @supports (grid-template-rows: subgrid) {
    .split .section-body {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      grid-template-rows: auto auto auto 1fr;
      column-gap: 3rem;
      align-items: start;
    }
    .split .section-body > .entries {
      grid-column: 1 / -1;
      grid-row: 1 / 5;
      display: grid;
      grid-template-columns: subgrid;
      grid-template-rows: subgrid;
      align-items: start;
    }
    .split .section-body > .entries > li {
      grid-template-columns: minmax(0, 1fr);
      align-content: start;
      padding: 0;
      border-bottom: 0;
    }
    .split .section-body > .entries > li:first-child { grid-column: 1; grid-row: 1; }
    .split .section-body > .entries > li:nth-child(2) { grid-column: 2; grid-row: 1 / 5; }
    .split .section-body > .fold { grid-column: 1; }
    .split .section-body > .fold:nth-of-type(1) { grid-row: 2; }
    .split .section-body > .fold:nth-of-type(2) { grid-row: 3; }
    .split .section-body > .note { grid-column: 1 / -1; grid-row: 5; }
  }
}
.figure .limit {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.figure svg text { fill: var(--ink); font-family: var(--font); font-size: 14px; }
.figure svg .svg-small { font-size: 13px; }
.figure svg .svg-bold { font-weight: 650; }
.figure svg .svg-muted { fill: var(--muted); }
.d-node { text-decoration: none; }
.d-node rect { fill: var(--paper); stroke: var(--muted); stroke-width: 1.25; }
.d-decision rect { stroke: var(--accent); stroke-width: 1.75; }
.d-node:hover rect { stroke: var(--accent); stroke-width: 2.5; }
.d-node:focus { outline: none; }
.d-node:focus-visible rect { stroke: var(--focus); stroke-width: 3; }
.d-line { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.d-line.dashed { stroke-dasharray: 5 4; }
.d-head { fill: var(--muted); }
.c-bar { fill: var(--chart-bar); }
.c-bar.c-accent { fill: var(--accent); }
.c-check { fill: var(--ink); }
.c-cell { fill: none; stroke: var(--muted); stroke-width: 1; }
.c-dot-pass { fill: var(--ink); }
.c-dot-fail { fill: var(--paper); stroke: var(--ink); stroke-width: 1.75; }
.c-dot-undecided { fill: var(--muted); }
.c-dot-pass.disagree { fill: var(--accent); }
.c-dot-fail.disagree { stroke: var(--accent); }

/* The setup diagrams share one key: how each piece reaches a session.
   Teal tints from the stack figure, a dashed outline for on demand, and
   the accent only for what is enforced. */
.d-node.k-always rect { fill: var(--s5); stroke: var(--s4); }
.d-node.k-run rect { fill: var(--s7); stroke: var(--s4); }
.d-node.k-always text, .d-node.k-run text { fill: var(--on-light); }
.d-node.k-always .svg-muted, .d-node.k-run .svg-muted { fill: var(--on-light-soft); }
.d-node.k-demand rect { fill: var(--paper); stroke: var(--muted); stroke-dasharray: 5 3; }
.d-node.k-enforced rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.75; }
.d-node:hover rect { stroke: var(--accent); stroke-width: 2.5; }
.d-session rect { fill: var(--s2); }
.figure svg .d-session text { fill: var(--on-deep); font-weight: 650; }
.keys { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0.5rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.key { display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.4em; border-radius: 3px; vertical-align: -0.12em; }
.key.k-always { background: var(--s5); border: 1px solid var(--s4); }
.key.k-run { background: var(--s7); border: 1px solid var(--s4); }
.key.k-demand { border: 1.5px dashed var(--muted); }
.key.k-enforced { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.d-node:focus-visible rect { stroke: var(--focus); stroke-width: 3; }
/* Chips inside the setup diagram's boxes: one per item. Light pills on the
   teal tints, thin solid outlines elsewhere; the text takes the box's color. */
.figure svg .d-node .chip rect { fill: none; stroke: var(--muted); stroke-width: 0.75; stroke-dasharray: none; }
.figure svg .d-node.k-always .chip rect,
.figure svg .d-node.k-run .chip rect { fill: rgb(255 255 255 / 0.55); stroke: var(--s4); }
.figure svg .d-node .chip text { font-size: 12px; }
