/* Shared silver desktop theme. Layout and behavior stay in each section's CSS. */
:root {
  color-scheme: light;
  --paper: #c0c0c0;
  --white: #ffffff;
  --ink: #161616;
  --muted: #505050;
  --line: #909090;
  --green: #000080;
  --lime: #d7d7d7;
  --mono: "Lucida Console", "Courier New", "Noto Sans Mono CJK SC", monospace;
  --retro-face: #c0c0c0;
  --retro-blue: #000080;
  --retro-raised: inset -1px -1px #404040, inset 1px 1px #ffffff,
    inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  --retro-sunken: inset -1px -1px #ffffff, inset 1px 1px #404040,
    inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono), "Microsoft YaHei", sans-serif;
}
body :is(h1, h2, h3, .brand, .wordmark) { letter-spacing: 0; }
body :is(button, input, select, textarea) { font-family: inherit; }
body a:hover { color: var(--retro-blue); }
body :is(a, button, input, select, summary):focus-visible {
  outline: 1px dotted #000000;
  outline-offset: 3px;
}
body ::selection { color: #ffffff; background: var(--retro-blue); }

/* Raised controls use the same four hard edges, with an inset pressed state. */
body :is(button, .button, .read-button, .text-link, .lecture-link,
  .graph-header nav a, .site-links a, .primary-nav a,
  .course-actions > a, .course-guide-links a, .hero-actions > a,
  .first-steps a, .wiki-pages .md-link) {
  background: var(--retro-face);
  color: #161616;
  border: 2px solid transparent;
  border-radius: 0;
  box-shadow: var(--retro-raised);
  padding: 8px 13px;
  min-height: 34px;
  font-family: inherit;
  font-size: 12px;
  text-decoration: none;
  line-height: 1.5;
  transition: none;
}
body :is(button, .button, .read-button, .text-link, .lecture-link,
  .graph-header nav a, .site-links a, .primary-nav a,
  .course-actions > a, .course-guide-links a, .hero-actions > a,
  .first-steps a, .wiki-pages .md-link):hover {
  background: #cecece;
  color: #000000;
}
body :is(button, .button, .read-button, .text-link, .lecture-link,
  .graph-header nav a, .site-links a, .primary-nav a,
  .course-actions > a, .course-guide-links a, .hero-actions > a,
  .first-steps a, .wiki-pages .md-link):active,
body :is(button[aria-pressed="true"], .filter.active,
  .graph-header nav a.current, .primary-nav .nav-home) {
  background: #d3d3d3;
  color: #000000;
  box-shadow: var(--retro-sunken);
}
body :is(button, .button):disabled { opacity: .55; cursor: default; }
body :is(.button.primary, .read-button, .primary-nav .nav-home) { font-weight: 700; }
body .graph-header nav a { height: auto; white-space: nowrap; }
body .graph-header nav { gap: 8px; }
body .site-links { gap: 8px; }
body .graph-controls button { width: 32px; height: 32px; padding: 2px; min-height: 32px; }
body .icon-button { min-height: 26px; width: 26px; padding: 0; font-size: 18px; }
body .copy-code { min-height: 24px; padding: 2px 8px; font-size: 10px; }

/* Window chrome and panels. */
body :is(.graph-header, .topbar) {
  background: var(--retro-face);
  border: 0;
  box-shadow: var(--retro-raised);
  min-height: 72px;
}
body :is(.wordmark, .brand) { color: #161616; }
body .wordmark i { color: var(--retro-blue); }
body :is(.brand-icon, .step-number) {
  border-radius: 0;
  color: #ffffff;
  background: var(--retro-blue);
  box-shadow: var(--retro-raised);
}
body .brand-icon span { color: #ffffff; }
body :is(.graph-workbench, .architecture, .progress-card, .phase,
  .principle-card, .resource-note, .course-notice, .course-extension, .source-task) {
  border: 0;
  border-radius: 0;
  background: var(--retro-face);
  color: var(--ink);
  box-shadow: var(--retro-raised);
}
body .graph-workbench { padding: 3px; }
body .graph-sidebar { background: var(--retro-face); border-right: 1px solid #808080; }
body .sidebar { background: var(--retro-face); box-shadow: var(--retro-raised); border: 0; }
body :is(.graph-stage-top, .architecture-top) {
  background: var(--retro-blue);
  color: #ffffff;
  padding: 8px 12px;
  min-height: 34px;
}
body :is(.graph-stage-top *, .architecture-top > span) { color: inherit; }
body :is(.graph-stage-top .live-dot, .architecture-top .status-dot) { background: #ffffff; }
body .architecture-bottom { background: #d8d8d8; color: #303030; }
body .graph-stage-bottom { background: var(--retro-face); border-color: #808080; color: #404040; }
body :is(.eyebrow, .workspace-label) {
  background: var(--retro-blue);
  color: #ffffff;
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: 1px;
}
body .eyebrow .edition { color: #ffffff; }
body :is(.live-dot, .status-dot, .nav-dot) { border-radius: 0; background: var(--retro-blue); }
body .eyebrow :is(.live-dot, .status-dot) { background: #ffffff; }

/* White inset fields and the graph canvas. */
body :is(.graph-searchbox, .wiki-toolbar input, .search, .note-content pre) {
  border: 0;
  border-radius: 0;
  box-shadow: var(--retro-sunken);
  background: #ffffff;
  color: var(--ink);
}
body .search { padding: 8px 10px; }
body :is(.search input, .graph-searchbox input) { background: transparent; color: var(--ink); }
body input::placeholder,
body :is(.graph-searchbox, .search) input::placeholder { color: #666666; }
body .graph-stage {
  background-color: #ffffff;
  background-image: radial-gradient(#b8b8b8 .65px, transparent .65px);
  box-shadow: var(--retro-sunken);
}
body .graph-edge { stroke: #8f8f8f; }
body .alias-edge { stroke: #777777; }
body .graph-node circle { fill: #808080; stroke: #ffffff; }
body .graph-node.has-body circle { fill: var(--retro-blue); }
body .graph-node.reference-node circle { fill: #b5b5b5; stroke: #606060; }
body .graph-node text { fill: #505050; stroke: #ffffff; font-family: var(--mono); }
body .graph-node.has-body text { fill: #202020; }
body .graph-node:hover circle, body .graph-node.is-selected circle { fill: #ffffff; stroke: var(--retro-blue); }
body .graph-node.is-selected text { fill: var(--retro-blue); }
body .graph-edge.is-emphasized { stroke: var(--retro-blue); }
body .graph-node a:focus-visible circle { stroke: #000000; }
body .legend-note { background: var(--retro-blue); }
body .legend-ref { background: #b5b5b5; border-color: #606060; }
body .note-list :is(a, button) {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  color: #202020;
  font-size: 12px;
  min-height: 32px;
  padding: 7px;
}
body .note-list :is(a, button):hover { background: #000080; color: #ffffff; }
body .note-list :is(a, button):hover small { color: #ffffff; }

/* Reading surfaces retain generous spacing and selectable, ordinary text. */
body :is(.wiki-directory, .note-shell, .blog-shell) {
  background: #ffffff;
  box-shadow: var(--retro-raised);
  margin-top: 28px;
  margin-bottom: 28px;
  padding: 30px 36px 0;
  width: calc(100% - 48px);
}
body .lesson-layout .note-shell { width: 100%; margin: 0; padding: 26px 28px 0; min-width: 0; }
body .lesson-layout { gap: 30px; }
body .lesson-toc { background: var(--retro-face); box-shadow: var(--retro-raised); padding: 18px 14px; }
body :is(.note-content, .blog-body) { color: #161616; }
body :is(.note-content a, .lesson-prerequisites a, .lesson-prev-next a,
  .course-guide-links a, .toc-all, .course-extension > a) {
  color: var(--retro-blue);
  text-decoration-color: #808080;
}
body .note-content li::marker, body .blog-body li::marker { color: #606060; }
body .note-content pre { background: #181818; color: #eeeeee; padding: 24px 18px 18px; }
body .note-content code { border-radius: 0; background: #e8e8e8; color: #161616; }
body .note-content pre code { background: transparent; color: inherit; }
body .note-content img { border-radius: 0; }
body .note-content blockquote { background: #ededed; color: #404040; border-color: #808080; }
body .note-content li:target { background: #e0e0ff; }
body .note-content .unpublished-reference { color: #505050; border-color: #808080; }
body :is(.catalog-stage li > a:hover, .resource-links > a:hover, .blog-entry > a:hover) { background: #e8e8e8; }
body .lesson-prev-next small { color: #505050; }

/* Training guide states and its shared local progress controls. */
body :is(.phase-guidance, .weekly-rhythm, .priority-list li) {
  background: #dedede;
  color: #303030;
  border-radius: 0;
  border-color: #808080;
}
body :is(.course-notice, .resource-note) { padding: 15px 18px; }
body .phase-gpu { color: #404040; border: 0; border-radius: 0; box-shadow: var(--retro-sunken); padding: 2px 6px; }
body .task input { width: 16px; height: 16px; flex-basis: 16px; border: 0; border-radius: 0; background: #ffffff; box-shadow: var(--retro-sunken); }
body .task input:checked { background: #ffffff; border: 0; }
body .task input:checked::after { color: #000000; font-weight: 700; }
body .task.is-done :is(strong, p) { color: #606060; }
body progress { border-radius: 0; background: #ffffff; box-shadow: var(--retro-sunken); height: 16px; padding: 3px; }
body progress::-webkit-progress-bar { background: #ffffff; }
body progress::-webkit-progress-value { background: repeating-linear-gradient(90deg, #000080 0, #000080 10px, #ffffff 10px, #ffffff 12px); }
body progress::-moz-progress-bar { background: repeating-linear-gradient(90deg, #000080 0, #000080 10px, #ffffff 10px, #ffffff 12px); }
body .principle-card :is(span, em, p, .principle-mark) { color: #303030; }
body .principle-card blockquote { color: #161616; }
body .source-task { border: 0; }
body .underlined::after { border-color: #808080; transform: none; }
body .phase-nav a { border-radius: 0; }
body .phase-nav a:hover { background: #000080; color: #ffffff; }
body .phase-nav a:hover span { color: #ffffff; }

/* Replace the previous muted green annotations with readable neutral ink. */
body :is(.graph-intro p, .graph-totals span, .graph-searchbox > span, .search-caption,
  .panel-kicker, .note-list small, .sidebar-hint, .sidebar-hint > span, .all-notes,
  .graph-sidebar #selected-meta, #no-related, .graph-controls > span, .graph-footer,
  .graph-footer a, .graph-footer b, .no-script, .nav-label, .phase-nav a > span,
  .bottom-nav, .sidebar-note, .hero-description, .hero-stats > div > span,
  .pipeline small, .pipeline span, .pipeline > b, .section-kicker,
  .progress-heading > span, .progress-count > span, .progress-caption,
  .progress-caption > span:first-child, .next-label, .local-note,
  .resource-note > span, .resource-note strong, .muted, .phase-title > small,
  .phase-count, .phase-chevron, .phase-number, .deliverable, .deliverable strong,
  .task p, .phase-extra, .resource-index, .resource-links small,
  .resource-links > a > span:last-child, .protocol-grid p, .weekly-rhythm b,
  .footer-brand, .footer-brand > span, footer, .catalog-stage li span,
  .lesson-meta, .lesson-prerequisites, .lesson-toc nav > a, .source-task,
  .source-task strong, .lesson-completion span, .course-extension p,
  .priority-list strong, .wiki-pages .page-link small, .note-tools) { color: #505050; }
body .storage-status { color: #663300; }
body :is(.blog-entry h2, .note-breadcrumb > span:last-child) { color: #161616; }

@media (max-width: 760px) {
  body :is(.graph-header, .topbar) { min-height: 64px; }
  body .graph-header { padding: 12px 17px; gap: 12px; }
  body .graph-header nav { height: auto; gap: 6px; flex-wrap: wrap; }
  body .graph-header nav a { padding: 7px 9px; min-height: 32px; font-size: 11px; }
  body .graph-header nav a:last-child::before { font-size: 11px; }
  body .site-links a { padding: 7px 9px; font-size: 11px; }
  body :is(.wiki-directory, .note-shell, .blog-shell) { width: calc(100% - 28px); padding: 24px 20px 0; margin-block: 18px; }
  body .lesson-layout { padding: 18px 14px; gap: 18px; }
  body .lesson-layout .note-shell { padding: 22px 18px 0; width: 100%; margin: 0; }
  body .lesson-toc { padding: 14px; }
  body .hero-actions { flex-wrap: wrap; gap: 12px; }
  body .course-actions { flex-wrap: wrap; gap: 14px; }
  body .lecture-link { margin-left: 26px; font-size: 11px; }
  body .graph-controls button { width: 30px; min-height: 30px; height: 30px; }
  body .eyebrow { font-size: 9px; letter-spacing: .5px; }
}
@media (max-width: 390px) {
  body .graph-header nav a { padding-inline: 7px; }
  body .graph-stage-bottom { align-items: flex-start; flex-wrap: wrap; }
  body .graph-stage-bottom > span { max-width: none; }
  body .graph-controls { margin-left: auto; }
  body .roadmap-controls .search { padding: 8px 10px; }
  body .filter { padding: 7px 9px; font-size: 11px; }
}
@media print {
  body { background: #ffffff; color: #000000; }
  body :is(.graph-header, .topbar, .lesson-toc) { display: none; }
  body :is(.wiki-directory, .note-shell, .blog-shell, .lesson-layout .note-shell,
    .architecture, .phase, .source-task, .course-notice) { box-shadow: none; background: #ffffff; width: 100%; }
  body .note-content pre { background: #ffffff; color: #000000; border: 1px solid #808080; }
}
