/* Shared visual language for the standalone course and NVMe posts. */
.nvme-note, .edition-tutorial {
  --paper: #eef1f2; --surface: #fff; --surface-2: #e6eaed; --ink: #11161a;
  --muted: #4d5761; --line: #ccd5d8; --accent: #0b766e; --soft: #e0f1ee;
  --example: #1c7a4d; --example-soft: #e2f3e8; --warning: #a8501a;
  --violet: #5b4b9e; --blue: #236baf; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Segoe UI", "Microsoft JhengHei", sans-serif;
  font-size: 17px; line-height: 1.8; -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  .nvme-note, .edition-tutorial { --paper: #0c1113; --surface: #12181a; --surface-2: #1a2427;
    --ink: #e7ecec; --muted: #acbab8; --line: #344447; --accent: #53d1c2; --soft: #103330;
    --example: #61d397; --example-soft: #142e22; --warning: #e7a56d; --violet: #b9a9ee; --blue: #83bafa; }
}
/* The main Jekyll theme switches with html[data-theme], not only with the OS preference. */
html[data-theme="dark"] .nvme-note, html[data-theme="dark"] .edition-tutorial {
  --paper: #0c1113; --surface: #12181a; --surface-2: #1a2427;
  --ink: #e7ecec; --muted: #acbab8; --line: #344447; --accent: #53d1c2; --soft: #103330;
  --example: #61d397; --example-soft: #142e22; --warning: #e7a56d; --violet: #b9a9ee; --blue: #83bafa;
}
html[data-theme="light"] .nvme-note, html[data-theme="light"] .edition-tutorial {
  --paper: #eef1f2; --surface: #fff; --surface-2: #e6eaed; --ink: #11161a;
  --muted: #4d5761; --line: #ccd5d8; --accent: #0b766e; --soft: #e0f1ee;
  --example: #1c7a4d; --example-soft: #e2f3e8; --warning: #a8501a; --violet: #5b4b9e; --blue: #236baf;
}
.nvme-note *, .edition-tutorial * { box-sizing: border-box; }
.edition-tutorial { margin: 0; background: var(--paper); }
.reader-shell { max-width: 1480px; margin: auto; padding-top: env(safe-area-inset-top); }
.reader-nav { padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.reader-nav summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.reader-nav summary::after { content: "+"; margin-left: auto; }
.reader-nav details[open] > summary::after { content: "−"; }
.reader-nav nav { display: grid; gap: 3px; }
.reader-nav a { display: flex; align-items: center; min-height: 44px; color: var(--muted); padding: 6px 8px; text-decoration: none; font-size: 14px; }
.reader-nav a:hover { background: var(--soft); color: var(--accent); }
.edition-tutorial main { max-width: 860px; padding: 24px 24px 64px; margin: auto; min-width: 0; }
.reader-heading { padding: 26px 0 30px; }
.reader-heading .eyebrow { color: var(--accent); font: 700 12px var(--mono); letter-spacing: .1em; }
.nvme-note h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.3; margin: 14px 0; }
.nvme-note h2 { font-size: clamp(22px, 3vw, 29px); line-height: 1.4; margin: 0 0 22px; color: var(--ink); }
.nvme-note h3 { font-size: 18px; line-height: 1.5; margin: 0 0 10px; color: var(--ink); }
.nvme-note p { margin: 0 0 16px; color: var(--ink); overflow-wrap: anywhere; }
.nvme-note .reader-paragraph { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: .8em; align-items: start; }
.nvme-note .paragraph-number { color: var(--accent); font: 700 .78em/1.8 var(--mono); text-align: right; padding-top: .12em; white-space: nowrap; min-width: 5.5ch; }
.nvme-note .paragraph-text { min-width: 0; }
.nvme-note .lesson-explanation { margin: 22px 0; line-height: 1.95; }
.nvme-note .lesson-explanation p { margin-bottom: 22px; }
.nvme-note .overview-connections { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 24px; }
.nvme-note .reading-link { display: block; padding: 12px 0; min-height: 44px; font-size: 14px; }
.nvme-note .figure-reading-fold { margin: 24px 0; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.nvme-note .figure-reading-fold > summary { color: var(--accent); font-weight: 700; }
.nvme-note .figure-reading-group { padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.nvme-note .review-answer { margin-bottom: 12px; }
.nvme-note .opening { font-size: 19px; line-height: 1.85; }
.nvme-note section { padding: 34px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.nvme-note .section-number, .nvme-note .axis-number { color: var(--accent); font-family: var(--mono); }
.nvme-note .topic-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.nvme-note .topic-map article { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.nvme-note .topic-map p { color: var(--muted); font-size: 15px; margin: 0; }
.nvme-note .topic-map .axis-paragraph { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: .55em; align-items: start; }
.nvme-note .axis-paragraph-number { color: var(--accent); font: 700 .78em/1.8 var(--mono); text-align: right; padding-top: .12em; white-space: nowrap; }
.nvme-note .axis-number { display: block; margin-bottom: 8px; font-size: 13px; }
.nvme-note .term-note { margin: -4px 0 22px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--soft); font-size: 14px; }
.nvme-note .term-note > div { margin: 5px 0; }
.nvme-note .term-note dt { font-family: var(--mono); font-weight: 700; overflow-wrap: anywhere; }
.nvme-note .term-note dd { margin: 0; color: var(--muted); }
.nvme-note a { color: var(--accent); }
.nvme-note h1, .nvme-note h2, .nvme-note h3, .nvme-note summary, .nvme-note caption { color: var(--ink); }
.nvme-note .source-note { font-size: 13px; color: var(--muted); margin: 4px 0 22px; }
.nvme-note details > summary { min-height: 44px; cursor: pointer; padding: 10px 0; line-height: 1.5; overflow-wrap: anywhere; }
.nvme-note .source-note p { color: var(--muted); margin-bottom: 6px; }
.nvme-note .technical-note { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 0 16px; margin: 20px 0; }
.nvme-note .technical-note > summary { color: var(--accent); font-weight: 650; }
.nvme-note .field-note { padding: 6px 0; border-top: 1px solid var(--line); }
.nvme-note article.field-note { margin: 22px 0; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; scroll-margin-top: 20px; }
.nvme-note .field-note h4 { color: var(--ink); font-size: 17px; line-height: 1.6; margin: 0 0 18px; overflow-wrap: anywhere; }
.nvme-note .field-note h5 { color: var(--accent); font-size: 13px; letter-spacing: .04em; margin: 0 0 8px; }
.nvme-note .figure-example { border-left: 3px solid var(--example); padding: 14px; background: var(--example-soft); margin: 20px 0; }
.nvme-note .figure-example h5 { color: var(--ink); }
.nvme-note .figure-example p { margin-bottom: 0; }
.nvme-note .figure-detail { border-top: 1px solid var(--line); font-size: 15px; }
.nvme-note .field-index { color: var(--muted); font-size: 14px; }
.nvme-note .field-index ul { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-left: 20px; }
.nvme-note .figure-reading-group > summary { font-size: 18px; font-weight: 700; }
.nvme-note .field-note:target { outline: 2px solid var(--accent); outline-offset: 3px; }
.nvme-note .field-note > summary { font-size: 15px; }
.nvme-note .table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 8px; }
.nvme-note table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 15px; margin: 0; }
.nvme-note th, .nvme-note td { padding: 11px 13px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.nvme-note th { background: var(--surface-2); font-weight: 700; white-space: normal; }
.nvme-note tr:last-child td { border-bottom: 0; }
.nvme-note caption { text-align: left; padding: 12px; font-weight: 700; }
.nvme-note .worked-example { background: var(--example-soft); border-left: 4px solid var(--example); border-radius: 6px; padding: 18px; margin: 24px 0; }
.nvme-note .worked-example p:last-child { margin-bottom: 0; }
.nvme-note figure { margin: 24px 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.nvme-note figcaption { color: var(--muted); font-size: 14px; margin-top: 12px; }
.nvme-note .diagram-scroll { overflow-x: auto; }
.nvme-note svg { width: 100%; height: auto; display: block; color: var(--ink); min-width: 440px; }
.nvme-note svg text { fill: var(--ink); font-family: var(--mono); }
.nvme-note .v-object { fill: var(--soft); stroke: var(--accent); stroke-width: 1.5; }
.nvme-note .v-command { fill: var(--surface-2); stroke: var(--blue); stroke-width: 1.5; }
.nvme-note .v-decision { fill: var(--surface-2); stroke: var(--violet); stroke-width: 1.5; }
.nvme-note .v-success { fill: var(--example-soft); stroke: var(--example); stroke-width: 1.5; }
.nvme-note .v-failure { fill: var(--surface-2); stroke: var(--warning); stroke-width: 1.5; stroke-dasharray: 5 3; }
.nvme-note .v-line { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.nvme-note .v-arrow { fill: var(--muted); }
.nvme-note .v-text { fill: var(--ink); font-size: 16px; }
.nvme-note .flow-steps { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: steps; }
.nvme-note .flow-steps li { counter-increment: steps; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.nvme-note .flow-steps li::before { content: counter(steps) ". "; font-family: var(--mono); color: var(--accent); font-weight: 700; }
.nvme-note .reference-editions { padding-top: 24px; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; padding: 12px; background: var(--surface); color: var(--ink); }
.skip-link:focus { top: 8px; }
.nvme-note :focus-visible, .edition-tutorial :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (min-width: 1200px) {
  .reader-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
  .reader-nav { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; border: 0; padding: 24px 14px; }
  .edition-tutorial main { width: 100%; padding-inline: 36px; }
}
@media (max-width: 600px) {
  .nvme-note .topic-map { grid-template-columns: 1fr; }
  .edition-tutorial main { padding-inline: 18px; }
  .nvme-note .reader-paragraph, .nvme-note .topic-map .axis-paragraph { grid-template-columns: max-content minmax(0, 1fr); column-gap: .45em; }
}
@media (prefers-reduced-motion: reduce) { .nvme-note *, .edition-tutorial * { scroll-behavior: auto; transition: none; animation: none; } }
@media print {
  .reader-nav, .skip-link { display: none; } .reader-shell { display: block; }
  .nvme-note, .edition-tutorial { --paper: #fff; --surface: #fff; --surface-2: #eee; --ink: #111; --muted: #333; --line: #aaa; background: #fff; }
  .nvme-note figure, .nvme-note tr { break-inside: avoid; } .nvme-note svg { min-width: 0; }
  .edition-tutorial main { max-width: none; }
}
/* Visible reasoning paths and one shared home for related fields. */
.nvme-note .course-walkthrough h4 { margin-top:1.8rem; margin-bottom:.65rem; }
.nvme-note .course-outcome { border-left:4px solid var(--accent); padding:.3rem 1rem; margin:1.5rem 0; }
.nvme-note .field-guide { border:1px solid var(--line); border-radius:10px; padding:1.15rem; margin:2rem 0; scroll-margin-top:5rem; }
.nvme-note .field-guide h4 { margin-top:0; }
.nvme-note .field-guide td:first-child { width:24%; font-weight:650; }
.nvme-note .field-guide td:nth-child(2) { width:38%; }
.nvme-note .figure-crossrefs { display:flex; flex-wrap:wrap; gap:.35rem .65rem; margin-top:.8rem; }
.nvme-note .figure-crossrefs a { display:inline-flex; align-items:center; min-height:44px; padding:0 .45rem; }
.nvme-note .field-guide:target { outline:2px solid var(--accent); outline-offset:3px; }
.nvme-note .spec-route td { overflow-wrap:anywhere; }
.nvme-note .route-table { min-width:620px; }
.nvme-note .route-table th:first-child { width:4.5em; white-space:nowrap; }
.nvme-note .route-table td:nth-child(2), .nvme-note .route-table td:last-child { width:19%; }
.nvme-note .route-table td:nth-child(3) { width:52%; line-height:1.75; }
.nvme-note .route-table tr:target { outline:2px solid var(--accent); outline-offset:-2px; }
.nvme-note .scope-selection { padding:0 1rem; background:var(--surface); border:1px solid var(--line); border-radius:8px; }
@media(max-width:900px) { .nvme-note .field-guide { padding:.8rem; } }
