:root {
  --navy: #122740;
  --ink: #172d43;
  --muted: #566979;
  --line: #dbe4ec;
  --mint: #62e0c1;
  --accent: #146e5d;
  --language-accent: #5650d8;
  --soft: #f4f7fa;
  --page: #fff;
  --surface: #fff;
  --toolbar: rgb(255 255 255 / .96);
  --selected: #fff;
  --hover: #eff8f5;
  --text-hover: #e9f4f0;
  --card-hover: #f8fcfb;
  --panel: #f8fafc;
  --caption: #fcfdfe;
  --viewer-controls: #f7f9fb;
  --viewer-background: #eef2f6;
  --field: #f6f9fb;
  --field-border: #b7c6d4;
  --focus: #148970;
  --eyebrow: #466a7f;
  --number: #75909f;
  --section-number: #66879a;
  --section-tag: #526f83;
  --secondary: #71818d;
  --sidebar-width: 248px;
  --mobile-offset: 0px;
  color-scheme: light;
}
@media screen {
  :root[data-theme="dark"] {
    --navy: #0a1422;
    --ink: #e7edf5;
    --muted: #b0bfd0;
    --line: #304459;
    --accent: #83dec7;
    --language-accent: #b3abff;
    --soft: #1b2d41;
    --page: #0f1b2b;
    --surface: #152538;
    --toolbar: rgb(15 27 43 / .96);
    --selected: #2b435b;
    --hover: #203d3e;
    --text-hover: #203d3e;
    --card-hover: #1b3243;
    --panel: #1b2d41;
    --caption: #152538;
    --viewer-controls: #1b2d41;
    --viewer-background: #0a1422;
    --field: #0f1b2b;
    --field-border: #4b647d;
    --focus: #83dec7;
    --eyebrow: #a1bdcf;
    --number: #9ab3c8;
    --section-number: #9ab3c8;
    --section-tag: #a1bdcf;
    --secondary: #9ab3c8;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: Inter, -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; font-size: 16px; line-height: 1.85; -webkit-font-smoothing: antialiased; }
body:has(dialog[open]) { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.icon { flex: 0 0 auto; vertical-align: middle; }
.skip { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.skip:focus { top: 14px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 32px 24px 20px; color: #fff; background: var(--navy); }
.identity { display: flex; gap: 13px; align-items: center; font-size: 16px; font-weight: 650; letter-spacing: .01em; line-height: 1.55; }
.mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #678390; border-radius: 5px; color: var(--mint); font-size: 24px; font-weight: 550; }
.identity-text { white-space: nowrap; }
.identity small { display: block; color: #b4c4d1; font-size: 12px; letter-spacing: .025em; font-weight: 400; }
.nav-label { margin: 40px 12px 12px; color: #aabecf; font-size: 12px; letter-spacing: .09em; }
nav { display: grid; gap: 8px; }
nav a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 11px 12px; border-radius: 5px; color: #ccdae5; font-size: 14px; transition: background .15s, color .15s; }
.nav-icon { display: block; flex: 0 0 22px; width: 22px; height: 22px; }
.sidebar nav .nav-icon { flex-basis: 28px; width: 28px; height: 28px; }
.nav-brand { object-fit: contain; padding: 3px; border-radius: 5px; background: #fff; }
.nav-text { flex: 1; }
nav a:hover { background: #1d374f; color: #fff; }
nav a.active { background: #223e56; color: #fff; box-shadow: inset 3px 0 var(--mint); }
.sidebar nav a.active .nav-icon { color: var(--mint); }
.nav-num { color: #a8bfd0; font-size: 12px; font-variant-numeric: tabular-nums; }
.sidebar-foot { margin-top: auto; padding: 20px 4px 0; }
.sidebar-caption { color: var(--mint); font-size: 11px; letter-spacing: .12em; }
.sidebar-foot p { margin: 9px 0 20px; color: #bdcedb; font-size: 13px; line-height: 1.9; }
.reading-track { height: 2px; background: #39516a; overflow: hidden; }
.reading-track span { display: block; height: 100%; width: 100%; background: var(--mint); transform: scaleX(0); transform-origin: left; }
.sidebar-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin-top: 14px; padding: 10px 8px; border: 0; border-radius: 5px; background: transparent; color: #ccdae5; text-align: left; font-size: 14px; }
.sidebar-toggle:hover { background: #1d374f; color: #fff; }
.sidebar [data-sidebar-tooltip] { position: relative; }
.sidebar-shortcut-tooltip { display: none; }
main { max-width: 1550px; margin-left: var(--sidebar-width); padding: 0 clamp(28px, 5vw, 80px); }
.page-tools { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 80px; border-bottom: 1px solid var(--line); background: var(--toolbar); backdrop-filter: blur(12px); }
.language-switch { display: inline-flex; align-items: center; gap: 10px; }
.language-switch button { position: relative; min-height: 40px; padding: 6px 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 14px; line-height: 1.7; }
.language-switch button::after { content: ''; position: absolute; right: 0; bottom: 1px; left: 0; height: 2px; background: transparent; }
.language-switch button:hover { color: var(--language-accent); }
.language-switch button[aria-pressed="true"] { color: var(--language-accent); font-weight: 600; }
.language-switch button[aria-pressed="true"]::after { background: currentColor; }
.language-divider { color: var(--muted); font-size: 16px; line-height: 1; }
.theme-button { display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); }
.theme-button:hover { color: var(--accent); background: var(--hover); }
.theme-sun { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
[data-theme="dark"] .theme-moon { display: none; }
.print-button, .text-button, .share-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 6px 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-size: 14px; line-height: 1.6; }
.print-button { color: var(--muted); }
.print-button:hover, .share-button:hover { color: var(--accent); background: var(--hover); }
.text-button { color: var(--accent); }
.text-button:hover { background: var(--text-hover); }
header { padding-top: 47px; }
.eyebrow { color: var(--eyebrow); font-size: 12px; letter-spacing: .16em; font-weight: 600; }
h1 { margin: 26px 0 24px; font-size: clamp(32px, 3.2vw, 48px); line-height: 1.48; letter-spacing: .015em; font-weight: 620; }
html[lang="en"] h1 { line-height: 1.22; letter-spacing: -.035em; }
.intro { max-width: none; white-space: pre-line; margin: 0 0 30px; color: var(--muted); line-height: 2; }
.context { display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 20px 24px; border-left: 3px solid #268b76; background: var(--soft); }
.context h2 { font-size: 14px; font-weight: 600; margin: 3px 0 0; line-height: 1.75; }
.context p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.95; }
.index-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.index-card { display: grid; grid-template-rows: auto auto 1fr auto; gap: 9px; padding: 23px 21px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); transition: border-color .18s, background .18s, transform .18s; }
.index-card:hover { background: var(--card-hover); border-color: #84b7aa; transform: translateY(-2px); }
.card-number { color: var(--number); font-size: 12px; font-variant-numeric: tabular-nums; }
.index-card strong { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.card-summary { color: var(--muted); font-size: 13px; line-height: 1.65; }
.card-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; color: var(--accent); font-size: 14px; }
.study { margin-top: 64px; padding: 50px 0 56px; border-top: 1px solid var(--line); }
.study + .study { margin-top: 0; }
.section-top { display: flex; align-items: center; gap: 17px; }
.section-num { color: var(--section-number); font-size: 24px; line-height: 1; font-weight: 400; font-variant-numeric: tabular-nums; }
.section-tag { color: var(--section-tag); font-size: 11px; letter-spacing: .09em; }
.share-button { margin-left: auto; color: var(--muted); }
h2 { font-size: 32px; letter-spacing: -.02em; line-height: 1.5; margin: 14px 0 8px; font-weight: 620; }
.section-description { color: var(--muted); margin: 0 0 30px; }
.study-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 32px; margin: 0 0 32px; }
.study-details .environment { grid-column: 1 / -1; padding: 20px 24px; border-left: 3px solid #89b4a8; background: var(--soft); border-radius: 0 5px 5px 0; }
.study-details > div:last-child { border-left: 1px solid var(--line); padding-left: 32px; }
.study-details .environment h3 { margin-bottom: 8px; color: var(--accent); font-size: 14px; }
.study-details h3 { font-size: 16px; font-weight: 600; line-height: 1.65; margin: 0 0 13px; }
.study-details p, .study-details li { color: var(--muted); font-size: 16px; line-height: 1.95; }
.study-details p { margin: 0; }
.study-details ul { margin: 0; padding-left: 1.2em; }
.study-details li + li { margin-top: 10px; }
.study-details li::marker { color: #84a095; font-size: .7em; }
.architecture { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.panel-label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; min-height: 60px; padding: 9px 19px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 14px; font-weight: 550; }
.diagram-link { display: block; padding: 22px; cursor: zoom-in; background: #fff; }
.diagram-link:hover { background: #fcfefd; }
.diagram-link img { display: block; width: 100%; height: clamp(300px, 40vw, 460px); object-fit: contain; }
figcaption { padding: 12px 20px 14px; border-top: 1px solid var(--line); background: var(--caption); }
figcaption p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
figcaption p + p { margin-top: 4px; }
.original-note { color: var(--secondary); font-size: 12px; }
html[lang="ja"] .original-note { display: none; }
.agent-detail { margin-top: 42px; }
.agent-detail > h3 { margin: 0 0 12px; font-size: 24px; line-height: 1.5; font-weight: 620; letter-spacing: -.015em; }
.agent-intro { margin: 0 0 24px; max-width: 900px; color: var(--muted); }
.architecture-wide .diagram-link img { height: auto; max-width: 930px; margin: 0 auto; }
.collection-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 26px 0; padding: 0; list-style: none; }
.collection-steps li { display: flex; align-items: flex-start; gap: 12px; }
.collection-step-number { flex: none; color: var(--accent); font-size: 14px; line-height: 1.9; font-variant-numeric: tabular-nums; }
.collection-steps h4, .diagram-note h4 { margin: 0 0 7px; font-size: 16px; font-weight: 600; }
.collection-steps p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.85; }
.diagram-note { padding: 20px 24px; border-left: 3px solid var(--accent); border-radius: 0 5px 5px 0; background: var(--soft); }
.diagram-note > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.diagram-note .technical-references { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 12px; }
footer { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 29px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer > div { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
footer .footer-identity { flex-direction: column; align-items: flex-start; gap: 4px; }
footer .footer-updated { font-size: 12px; }
footer strong { color: var(--ink); letter-spacing: .07em; }
footer a { display: flex; align-items: center; gap: 7px; margin-left: auto; }
footer .footer-links { margin-left: auto; gap: 16px 24px; }
footer .footer-links a { margin: 0; }
.external-link { display: inline-flex; align-items: baseline; gap: 7px; color: var(--accent); text-decoration: none; border-bottom: 2px solid transparent; line-height: 1.6; }
.external-link:is(:hover, :focus-visible) { color: var(--ink); border-bottom-color: currentColor; text-decoration: none; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 14px; padding: 8px 4px; color: #d4e6e0; font-size: 13px; line-height: 1.6; border-radius: 5px; text-underline-offset: 4px; }
.sidebar-profile:hover { text-decoration: underline; text-decoration-thickness: 2px; }
footer p { flex-basis: 100%; margin: 0; font-size: 12px; }
dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 100px rgb(0 15 33 / .25); }
dialog::backdrop { background: rgb(7 20 34 / .72); backdrop-filter: blur(4px); }
#diagram-viewer { width: min(1440px, 96vw); height: min(980px, 94dvh); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; }
#diagram-viewer[open] { display: flex; flex-direction: column; }
.viewer-header { display: flex; align-items: center; gap: 15px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.viewer-header h2 { margin: 0; font-size: 18px; flex: 1; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.icon-button:hover:not(:disabled) { background: var(--soft); }
.viewer-controls { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px 16px; background: var(--viewer-controls); border-bottom: 1px solid var(--line); }
#zoom-value { min-width: 64px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.fit-button { margin-left: 10px; }
.viewer-viewport { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: none; background: var(--viewer-background); }
.viewer-canvas { display: flex; align-items: center; justify-content: center; width: max-content; min-width: 100%; min-height: 100%; padding: 24px; }
.viewer-artwork { position: relative; flex: none; }
.viewer-highlight { position: absolute; border: 3px solid #146e5d; border-radius: 4px; pointer-events: none; box-shadow: 0 0 0 2px #fff; }
.viewer-highlight span { position: absolute; top: -1px; left: -1px; padding: 1px 7px; border-radius: 0 0 4px 0; color: #fff; background: #146e5d; font-size: 13px; font-weight: 600; }
.viewer-regions { display: flex; flex: none; justify-content: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.viewer-regions button { display: flex; align-items: baseline; gap: 8px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 13px; line-height: 1.5; text-align: left; }
.viewer-regions button > span:first-child { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 600; }
.viewer-regions button:hover { background: var(--hover); }
.viewer-regions button[aria-pressed="true"] { border-color: var(--accent); background: var(--hover); }
.viewer-header, .viewer-controls, .viewer-help { flex: none; }
.viewer-help-touch { display: none; }
#viewer-image { display: block; flex: none; background: #fff; max-width: none; user-select: none; }
.viewer-viewport.zoomed { cursor: grab; }
.viewer-viewport.dragging { cursor: grabbing; user-select: none; }
#viewer-error { margin: 24px; }
.viewer-help { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
#share-dialog { width: min(540px, 92vw); padding: 24px; }
.share-header { display: flex; align-items: center; gap: 12px; }
.share-header h2 { flex: 1; margin: 0; font-size: 20px; }
#share-dialog p { color: var(--muted); font-size: 14px; }
#share-url { width: 100%; padding: 10px 12px; border: 1px solid var(--field-border); border-radius: 5px; color: var(--ink); background: var(--field); font-size: 14px; }
#share-status { min-height: 1.8em; }
#share-dialog .share-note { margin-bottom: 0; font-size: 12px; }
.toast { position: fixed; bottom: 24px; left: calc(50% + var(--sidebar-width) / 2); z-index: 30; max-width: 90vw; transform: translate(-50%, 15px); padding: 10px 18px; border-radius: 7px; background: var(--navy); color: #fff; font-size: 14px; box-shadow: 0 6px 28px rgb(18 39 64 / .18); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1440px) {
  .index-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 220px; }
  .sidebar { padding: 30px 14px 20px; }
  .sidebar nav a { gap: 8px; padding-right: 10px; padding-left: 10px; }
  main { padding: 0 4vw; }
  .study-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 26px; }
  .study-details .environment { padding: 18px 21px; }
  .study-details > div:last-child { padding-left: 26px; }
  .index-card { padding: 20px 16px; }
}
@media (min-width: 801px) {
  .sidebar { --sidebar-motion: 280ms cubic-bezier(.22, 1, .36, 1); transition: width var(--sidebar-motion), padding var(--sidebar-motion); }
  main { transition: margin-left 280ms cubic-bezier(.22, 1, .36, 1); }
  .sidebar .mark { flex: 0 0 44px; }
  .sidebar .identity, .sidebar nav a, .sidebar-profile, .sidebar-toggle { transition: padding var(--sidebar-motion), gap var(--sidebar-motion), background .15s, color .15s; }
  .sidebar .identity-text, .sidebar .nav-text, .sidebar .nav-num, .sidebar-profile-text, #sidebar-toggle-label { min-width: 0; max-width: 180px; overflow: hidden; white-space: nowrap; opacity: 1; transition: max-width var(--sidebar-motion), opacity 160ms ease, visibility 160ms; }
  .sidebar .nav-label, .sidebar-caption { white-space: nowrap; overflow: hidden; transition: opacity 160ms ease, visibility 160ms; }
  .sidebar-foot { transition: padding var(--sidebar-motion); }
  .collapse-icon { transition: transform var(--sidebar-motion); }

  .sidebar-shortcut-tooltip { position: absolute; z-index: 2; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; border: 1px solid #444; border-radius: 12px; background: #202020; color: #fff; font-size: 14px; font-weight: 400; line-height: 1.5; white-space: nowrap; box-shadow: 0 4px 14px rgb(0 0 0 / .2); visibility: hidden; }
  .sidebar-shortcut-tooltip kbd { padding: 2px 7px; border-radius: 7px; background: #484848; color: #efefef; font: inherit; line-height: 1.4; }
  .sidebar:not(.tooltips-dismissed) .sidebar-toggle:is(:hover, :focus-visible) .sidebar-shortcut-tooltip { visibility: visible; }
  .sidebar-toggle::before { content: ''; position: absolute; left: 100%; top: 0; width: 12px; height: 100%; }
  :root[data-sidebar-collapsed="true"] { --sidebar-width: 80px; }
  [data-sidebar-collapsed="true"] .sidebar { padding: 32px 12px 20px; }
  [data-sidebar-collapsed="true"] .identity { gap: 0; padding-left: 6px; }
  [data-sidebar-collapsed="true"] .identity-text,
  [data-sidebar-collapsed="true"] .nav-text,
  [data-sidebar-collapsed="true"] .nav-num,
  [data-sidebar-collapsed="true"] .sidebar-profile-text,
  [data-sidebar-collapsed="true"] #sidebar-toggle-label { max-width: 0; opacity: 0; visibility: hidden; }
  [data-sidebar-collapsed="true"] .nav-label, [data-sidebar-collapsed="true"] .sidebar-caption { opacity: 0; visibility: hidden; }
  [data-sidebar-collapsed="true"] .sidebar nav a { gap: 0; padding: 11px 14px; }
  [data-sidebar-collapsed="true"] .sidebar-foot { padding: 20px 0 0; }
  [data-sidebar-collapsed="true"] .sidebar-profile,
  [data-sidebar-collapsed="true"] .sidebar-toggle { gap: 0; padding-left: 17px; padding-right: 17px; }
  [data-sidebar-collapsed="true"] .collapse-icon { transform: rotate(180deg); }
  [data-sidebar-collapsed="true"] .sidebar:not(.tooltips-dismissed) [data-sidebar-tooltip]:not(.sidebar-toggle):is(:hover, :focus-visible)::after {
    content: attr(data-sidebar-tooltip); position: absolute; z-index: 1; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); padding: 8px 12px; border: 1px solid #526c82; border-radius: 6px; background: #122740; color: #fff; font-size: 13px; font-weight: 400; line-height: 1.6; letter-spacing: normal; white-space: nowrap; box-shadow: 0 5px 16px rgb(0 15 33 / .2);
  }
  [data-sidebar-collapsed="true"] .sidebar [data-sidebar-tooltip]::before { content: ''; position: absolute; left: 100%; top: 0; width: 12px; height: 100%; }
}
@media (min-width: 801px) and (max-height: 700px) {
  .sidebar-caption, .sidebar-foot p { display: none; }
  .sidebar .nav-label { margin-top: 28px; }
}
@media (max-width: 800px) {
  :root { --sidebar-width: 0px; }
  html { scroll-padding-top: calc(var(--mobile-offset) + 90px); }
  .sidebar { position: sticky; top: 0; width: 100%; padding: 13px 22px 10px; }
  .identity { gap: 10px; font-size: 14px; }
  .mark { height: 30px; width: 30px; font-size: 19px; }
  .identity > span:last-child { display: flex; align-items: baseline; gap: 10px; }
  .identity small { font-size: 11px; }
  .nav-label, .sidebar-foot { display: none; }
  nav { display: flex; gap: 4px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; }
  .sidebar nav a { flex: 1; justify-content: center; gap: 7px; min-height: 40px; padding: 6px 10px; font-size: 14px; white-space: nowrap; }
  .sidebar nav .nav-icon { flex-basis: 22px; width: 22px; height: 22px; }
  .sidebar nav .nav-brand { padding: 2px; border-radius: 4px; }
  nav .nav-num { display: none; }
  nav a.active { box-shadow: inset 0 -2px var(--mint); }
  main { padding: 0 24px; }
  .page-tools { top: var(--mobile-offset); min-height: 68px; }
  header { padding-top: 30px; }
  h1 { font-size: clamp(29px, 5.5vw, 40px); margin-top: 21px; }
  .index-grid { gap: 10px; }
  .index-card strong { font-size: 18px; }
  .study { margin-top: 44px; padding: 35px 0 42px; }
  h2 { font-size: 29px; }
  .diagram-link img { height: 350px; }
  .viewer-help { line-height: 1.6; }
  .collection-steps { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 560px) {
  .sidebar { padding-right: 17px; padding-left: 17px; }
  main { padding: 0 20px; }
  nav a { padding-right: 8px; padding-left: 8px; }
  .sidebar nav a { flex: 0 0 auto; }
  .page-tools { justify-content: flex-end; gap: 8px; }
  .theme-button { margin-right: auto; }
  .print-button { padding: 6px; }
  .context { grid-template-columns: 1fr; gap: 7px; padding: 17px 18px; }
  .context h2 { margin: 0; }
  .index-grid { grid-template-columns: 1fr; }
  .index-card { grid-template-columns: 23px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; padding: 16px; }
  .card-number { grid-column: 1; grid-row: 1; align-self: center; }
  .index-card strong { grid-column: 2; grid-row: 1; }
  .card-summary { grid-column: 2 / 4; grid-row: 2; }
  .card-action { grid-column: 3; grid-row: 1; margin: 0; }
  .card-action > span { display: none; }
  .section-tag { letter-spacing: .035em; font-size: 10px; }
  .section-top { gap: 10px; }
  .share-button { padding: 5px 7px; }
  .share-button > span { display: none; }
  .study-details { grid-template-columns: 1fr; gap: 23px; }
  .study-details > div + div { border: 0; padding: 0; }
  .study-details > div:last-child { border-top: 1px solid var(--line); padding-top: 22px; }
  .study-details p, .study-details li { line-height: 1.9; }
  .panel-label { padding-right: 12px; padding-left: 15px; }
  .diagram-link { padding: 13px; }
  .diagram-link img { height: 320px; }
  figcaption { padding: 10px 15px; }
  footer { align-items: flex-start; gap: 13px; }
  footer > div { flex-direction: column; align-items: flex-start; gap: 2px; }
  footer .footer-links { flex-direction: row; flex-wrap: wrap; width: 100%; margin: 4px 0 0; gap: 12px 24px; }
  footer a { font-size: 12px; white-space: nowrap; }
  #diagram-viewer { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .viewer-header { padding: 12px 14px; }
  .viewer-header h2 { font-size: 16px; }
  .viewer-controls { gap: 8px; }
  .viewer-help { padding: 8px 13px; font-size: 11px; }
  .viewer-canvas { padding: 16px; }
  .viewer-regions { gap: 6px; padding: 8px 12px; }
  .viewer-regions button { flex: 1; min-width: 0; flex-direction: column; gap: 3px; padding: 6px 8px; font-size: 12px; }
  .agent-detail { margin-top: 32px; }
  .agent-detail > h3 { font-size: 21px; }
  .diagram-note { padding: 17px 18px; }
}
@media (max-width: 380px) {
  .print-button > span { display: none; }
  .print-button { width: 40px; flex: 0 0 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  @page { size: A4; margin: 15mm; }
  :root { --ink: #111; --muted: #333; }
  html, body { overflow: visible !important; background: #fff; font-size: 11pt; }
  .sidebar, .skip, .page-tools, .index-grid, .share-button, .text-button, .diagram-hint, .toast, dialog, .footer-links { display: none !important; }
  main { margin: 0; padding: 0; max-width: none; }
  header { padding: 0 0 18px; }
  h1 { font-size: 28pt; margin: 15px 0; }
  .intro { font-size: 11pt; line-height: 1.8; margin-bottom: 20px; }
  .context { padding: 12px 16px; }
  .context p, .context h2 { font-size: 10pt; }
  .study { break-before: page; border-top: 0; padding: 0; margin: 0; }
  .section-top { margin-top: 0; }
  h2 { font-size: 24pt; }
  .section-description { margin-bottom: 18px; }
  .study-details { display: block; margin-bottom: 15px; }
  .study-details > div { border: 0 !important; padding: 0 !important; background: transparent !important; margin-bottom: 13px; }
  .study-details h3 { font-size: 11pt; margin-bottom: 4px; break-after: avoid; }
  .study-details p, .study-details li { font-size: 10pt; line-height: 1.6; }
  .study-details li + li { margin-top: 4px; }
  .architecture { break-inside: avoid; border-color: #bbb; }
  .panel-label { min-height: 0; padding: 7px 12px; font-size: 10pt; }
  .diagram-link { padding: 10px; }
  .diagram-link img { width: 100%; height: 85mm; }
  figcaption { padding: 6px 12px; }
  figcaption p { font-size: 8pt; }
  .agent-detail { break-before: page; margin-top: 0; }
  .agent-detail > h3 { font-size: 18pt; break-after: avoid; }
  .agent-intro { font-size: 10pt; margin-bottom: 14px; }
  .architecture-wide .diagram-link img { width: 100%; height: 85mm; max-width: none; }
  .collection-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 16px 0; }
  .collection-steps li { display: block; break-inside: avoid; }
  .collection-step-number { font-size: 9pt; }
  .collection-steps h4, .diagram-note h4 { font-size: 10pt; }
  .collection-steps p, .diagram-note > p { font-size: 9pt; line-height: 1.65; }
  .diagram-note { padding: 12px 16px; break-inside: avoid; }
  footer { margin-top: 24px; padding: 15px 0 0; }
  a { color: inherit; }
}

/* Concise introduction for interview reading. */
.eyebrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.eyebrow-divider { opacity: .45; }
.intro-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: 13px; }
header { padding-top: 32px; }
h1 { margin: 20px 0; font-size: clamp(30px, 3vw, 44px); }
.intro { margin-bottom: 18px; line-height: 1.85; }
.index-grid { margin-top: 24px; }
@media (max-width: 560px) { header { padding-top: 24px; } h1 { font-size: 29px; margin: 16px 0; } .intro-meta { gap: 4px 16px; font-size: 12px; } .eyebrow { font-size: 11px; gap: 8px; } }

/* Architecture reading guides stay paired with the original diagrams. */
.diagram-guide { padding: 23px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.diagram-guide > h3 { margin: 0 0 18px; font-size: 16px; font-weight: 600; }
.guide-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; }
.guide-steps li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.guide-number { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 13px; line-height: 1.9; }
.guide-steps h4 { margin: 0 0 8px; font-size: 15px; line-height: 1.7; font-weight: 600; }
.guide-steps p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.focus-link { margin-top: 10px; padding: 4px 0; border: 0; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; font-size: 14px; line-height: 1.8; }
.focus-link:hover { text-decoration-thickness: 2px; }
.viewer-context { flex: none; margin: 0; padding: 10px 20px; font-size: 14px; line-height: 1.7; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface); }
.telemetry-overview { margin: 34px 0; }
.telemetry-overview > h3 { margin: 0 0 10px; font-size: 23px; line-height: 1.5; font-weight: 600; }
.telemetry-overview > p { color: var(--muted); margin: 0 0 18px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
.telemetry-overview table { width: 100%; border-collapse: collapse; text-align: left; }
.telemetry-overview th, .telemetry-overview td { padding: 17px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.telemetry-overview thead { background: var(--panel); font-size: 13px; }
.telemetry-overview tbody th { width: 18%; font-size: 14px; font-weight: 600; }
.telemetry-overview td { font-size: 14px; color: var(--muted); line-height: 1.85; }
.telemetry-overview td:nth-child(2) { width: 44%; }
.telemetry-overview tr:last-child > * { border-bottom: 0; }
.telemetry-overview .telemetry-note { margin: 12px 0 0; font-size: 13px; }
.agent-detail { border: 1px solid var(--line); border-radius: 7px; }
.agent-detail > summary { padding: 19px 22px; font-weight: 600; cursor: pointer; font-size: 16px; background: var(--soft); border-radius: 7px; }
.agent-detail > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.agent-detail[open] > summary { border-bottom: 1px solid var(--line); border-radius: 7px 7px 0 0; }
.agent-detail-content { padding: 24px; }
.agent-detail-content > h3 { margin: 0 0 12px; font-size: 22px; line-height: 1.6; }
.nav-more { display: none; }
@media (max-width: 1000px) {
  .guide-steps { grid-template-columns: 1fr; gap: 20px; }
  .guide-steps li + li { padding-top: 17px; border-top: 1px solid var(--line); }
}
@media (max-width: 800px) {
  .sidebar { padding-top: 10px; padding-bottom: 8px; }
  .sidebar nav { margin-top: 8px; }
  .page-tools { min-height: 52px; }
  .print-button > span { display: none; }
  .print-button { width: 40px; flex: 0 0 40px; }
  .nav-shell { position: relative; min-width: 0; }
  .nav-shell.has-more .nav-more { display: grid; place-items: center; position: absolute; right: -1px; bottom: 0; width: 27px; height: 38px; color: #d4e3ee; background: linear-gradient(to right,transparent,var(--navy) 50%); font-size: 23px; pointer-events: none; }
  .compact-header .identity { height: 0; overflow: hidden; visibility: hidden; }
  .compact-header .sidebar nav { margin-top: 0; }
  .diagram-guide { padding: 20px; }
  .agent-detail-content { padding: 18px; }
  .telemetry-overview table, .telemetry-overview tbody, .telemetry-overview tr, .telemetry-overview th, .telemetry-overview td { display: block; width: auto; }
  .telemetry-overview thead { display: none; }
  .telemetry-overview tbody th { width: auto; background: var(--panel); padding: 12px 16px; font-size: 15px; border: 0; }
  .telemetry-overview td { border: 0; padding: 10px 16px; }
  .telemetry-overview td:nth-child(2) { width: auto; color: var(--ink); padding-bottom: 0; }
  .telemetry-overview td:last-child { padding-bottom: 17px; }
  .telemetry-overview tr + tr { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .viewer-context { padding: 8px 14px; font-size: 13px; max-height: 22dvh; overflow-y: auto; }
  .viewer-help-desktop { display: none; }
  .viewer-help-touch { display: inline; }
  .diagram-guide { padding: 18px 15px; }
  .agent-detail > summary { padding: 16px; font-size: 15px; }
  .agent-detail-content { padding: 15px; }
  .telemetry-overview > h3 { font-size: 21px; }
}
@media print {
  .intro-meta { font-size: 9pt; margin-bottom: 12px; }
  .focus-link, .nav-more { display: none !important; }
  .guide-steps { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
  .guide-steps li + li { border: 0; padding: 0; }
  .diagram-guide { padding: 12px; }
  .diagram-guide > h3 { font-size: 10pt; margin-bottom: 10px; }
  .guide-steps h4 { font-size: 9pt; }
  .guide-steps p { font-size: 8pt; line-height: 1.6; }
  .architecture { break-inside: auto; }
  .diagram-link, .diagram-guide, .telemetry-overview tr { break-inside: avoid; }
  .agent-detail { border: 0; }
  .agent-detail > summary { display: none; }
  .agent-detail-content { padding: 0; }
  .table-scroll { overflow: visible; }
  .telemetry-overview > h3 { font-size: 14pt; }
  .telemetry-overview > p, .telemetry-overview .telemetry-note { font-size: 9pt; }
  .telemetry-overview th, .telemetry-overview td { padding: 8px 10px; font-size: 9pt; }
  .telemetry-overview thead { display: table-header-group; }
  .telemetry-overview table { display: table; }
  .telemetry-overview tbody { display: table-row-group; }
  .telemetry-overview tr { display: table-row; }
  .telemetry-overview th, .telemetry-overview td { display: table-cell; }
  .telemetry-overview tbody th { width: 18%; }
  .telemetry-overview td:nth-child(2) { width: 44%; }
}
