:root {
  color-scheme: light dark;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #18202c;
  --muted: #5b6675;
  --line: #d8dee8;
  --accent: #126c5a;
  --on-accent: #ffffff;
  --accent-strong: #0b4d40;
  --blue: #244d8f;
  --gold: #8a6200;
  --soft: #e9f5f1;
  --shadow: 0 8px 22px rgba(29, 39, 56, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d;
    --panel: #1b2430;
    --text: #eef3f8;
    --muted: #b7c1ce;
    --line: #313b49;
    --accent: #80d8be;
    --on-accent: #07111f;
    --accent-strong: #a7e7d5;
    --blue: #9dbdff;
    --gold: #edcc79;
    --soft: #18372f;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

nav a,
.button,
.project-links a,
.index-list a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

code {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
  background: color-mix(in srgb, var(--panel) 78%, var(--soft));
  color: var(--text);
  font-size: 0.94em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 20px;
  align-items: center;
  min-height: 430px;
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.content-hero {
  grid-template-columns: minmax(0, 860px);
  align-content: center;
  min-height: 360px;
}

.content-hero .lede {
  max-width: 840px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
}

.lede {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.button {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.button.secondary {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}

.identity-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.portrait {
  width: 100%;
  max-width: 170px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.identity-panel p,
.project-card p,
.focus-grid p,
footer p {
  color: var(--muted);
}

.section {
  padding: 30px 0 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 12px;
}

.section-note {
  color: var(--muted);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.focus-grid article,
.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.focus-grid article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  padding: 12px;
}

.focus-grid span {
  display: inline-flex;
  grid-row: 1 / span 2;
  margin-bottom: 0;
  color: var(--blue);
  font-weight: 800;
}

.focus-grid h3 {
  margin-bottom: 4px;
}

.focus-grid p {
  font-size: 14px;
  line-height: 1.42;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 168px;
  padding: 12px;
}

.project-card h3 {
  margin-bottom: 4px;
}

.project-card p {
  font-size: 14px;
  line-height: 1.45;
}

.project-card.featured {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--panel) 90%, var(--soft));
}

.tag {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.project-links a {
  min-height: 30px;
  padding: 4px 8px;
  color: var(--accent);
}

.index-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.evidence-grid,
.resource-grid,
.learning-map,
.deep-grid,
.diagram-grid,
.term-grid,
.report-grid {
  display: grid;
  gap: 10px;
}

.evidence-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.evidence-grid article,
.learning-map article,
.deep-grid article,
.diagram-card,
.term-grid article,
.report-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.evidence-grid span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.evidence-grid p,
.learning-map li,
.pipeline span,
.deep-grid p,
.diagram-card p,
.term-grid p,
.report-grid p,
.report-flow span {
  color: var(--muted);
}

.evidence-grid p {
  font-size: 14px;
  line-height: 1.48;
}

.evidence-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.learning-map {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.learning-map ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.pipeline div {
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, var(--soft));
}

.pipeline strong,
.pipeline span {
  display: block;
}

.pipeline strong {
  margin-bottom: 6px;
}

.pipeline span {
  font-size: 13px;
  line-height: 1.35;
}

.resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deep-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deep-grid p,
.diagram-card p,
.report-grid p,
.term-grid p {
  font-size: 14px;
  line-height: 1.48;
}

.diagram-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diagram-card.wide {
  grid-column: 1 / -1;
}

.stack-graph,
.flow-graph,
.decision-graph,
.report-flow {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.stack-graph {
  max-width: 620px;
}

.stack-graph div,
.flow-graph div,
.decision-graph div,
.report-flow div {
  position: relative;
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, var(--soft));
}

.stack-graph div:not(:last-child)::after {
  content: "v";
  position: absolute;
  right: 10px;
  bottom: 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.flow-graph,
.decision-graph,
.report-flow {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.decision-graph {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.stack-graph span,
.flow-graph span,
.decision-graph span,
.report-flow span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.flow-graph div:not(:last-child)::after,
.decision-graph div:not(:last-child)::after,
.report-flow div:not(:last-child)::after {
  content: ">";
  position: absolute;
  top: 50%;
  right: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-50%);
}

.report-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-grid article {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-grid h3,
.term-grid h3 {
  margin-bottom: 0;
}

.report-grid p,
.term-grid p {
  margin-bottom: 0;
}

.report-grid a {
  display: inline-flex;
  align-self: flex-start;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  background: color-mix(in srgb, var(--panel) 86%, var(--soft));
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.report-flow {
  margin-top: 12px;
}

.term-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.directory-group {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.directory-group ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.directory-group li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  min-height: 26px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}

.directory-group li:first-child {
  border-top: 0;
}

.directory-group span {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
}

.directory-group a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  background: color-mix(in srgb, var(--panel) 86%, var(--soft));
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 32px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

footer p {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .focus-grid,
  .project-grid,
  .directory-grid,
  .evidence-grid,
  .evidence-grid.compact,
  .learning-map,
  .resource-grid,
  .pipeline,
  .deep-grid,
  .diagram-grid,
  .flow-graph,
  .decision-graph,
  .report-grid,
  .report-flow,
  .term-grid {
    grid-template-columns: 1fr;
  }

  .diagram-card.wide {
    grid-column: auto;
  }

  .flow-graph div:not(:last-child)::after,
  .decision-graph div:not(:last-child)::after,
  .report-flow div:not(:last-child)::after {
    content: "v";
    left: auto;
    right: 10px;
    top: auto;
    bottom: 4px;
    transform: none;
  }

  .hero {
    min-height: auto;
    gap: 16px;
    padding: 20px 0 24px;
  }

  .identity-panel {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
  }

  .portrait {
    max-width: 72px;
  }
}

@media (max-width: 1040px) and (min-width: 861px) {
  .focus-grid,
  .directory-grid,
  .evidence-grid,
  .evidence-grid.compact,
  .pipeline,
  .deep-grid,
  .diagram-grid,
  .report-grid,
  .term-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-graph,
  .decision-graph,
  .report-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .flow-graph div:nth-child(3n)::after,
  .decision-graph div:nth-child(3n)::after,
  .report-flow div:nth-child(3n)::after {
    display: none;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 40px;
  }

  .lede {
    font-size: 16px;
  }

  .identity-panel {
    gap: 12px;
    padding: 12px;
  }

  .identity-panel h2 {
    margin-bottom: 6px;
    font-size: 20px;
  }

  .identity-panel p {
    font-size: 14px;
  }

  .directory-group li {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
  }

  .directory-group a {
    width: auto;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ------------------------------------------------------------------ */
/* NPU page density pass (scoped to body.npu-page only)               */
/* Same layout, less empty space: wider column, shorter hero,         */
/* tighter section rhythm, fuller diagrams. Home page is unaffected.  */
/* ------------------------------------------------------------------ */
.npu-page .site-header,
.npu-page main,
.npu-page footer {
  width: min(1240px, calc(100% - 32px));
}

/* Hero: remove the tall vertically-centered band and shrink the headline */
.npu-page .content-hero {
  min-height: auto;
  align-content: start;
  padding: 22px 0 20px;
}

.npu-page h1 {
  max-width: 900px;
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.06;
}

.npu-page .lede {
  max-width: 940px;
  font-size: 17px;
}

.npu-page .hero-actions {
  margin-top: 14px;
}

/* Sections: tighter vertical spacing between blocks */
.npu-page .section {
  padding: 22px 0 0;
}

.npu-page .section-heading {
  max-width: 900px;
  margin-bottom: 10px;
}

/* Denser card grids now that the column is wider */
.npu-page .evidence-grid,
.npu-page .resource-grid,
.npu-page .learning-map,
.npu-page .deep-grid,
.npu-page .diagram-grid,
.npu-page .term-grid,
.npu-page .report-grid,
.npu-page .focus-grid,
.npu-page .project-grid {
  gap: 12px;
}

.npu-page .evidence-grid article,
.npu-page .learning-map article,
.npu-page .deep-grid article,
.npu-page .diagram-card,
.npu-page .term-grid article,
.npu-page .report-grid article,
.npu-page .project-card {
  padding: 13px 14px;
}

/* Let the software-stack diagram fill its card instead of stopping at 620px */
.npu-page .stack-graph {
  max-width: none;
}

/* Footer sits closer to the final section */
.npu-page footer {
  margin-top: 22px;
  padding: 20px 0 24px;
}

/* ------------------------------------------------------------------ */
/* Study-page components: comparison table + interview Q&A bank        */
/* ------------------------------------------------------------------ */

/* Accelerator comparison table */
.npu-page .compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.npu-page table.compare {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 13.5px;
}

.npu-page table.compare th,
.npu-page table.compare td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.4;
}

.npu-page table.compare tr th:last-child,
.npu-page table.compare tr td:last-child {
  border-right: 0;
}

.npu-page table.compare tbody tr:last-child th,
.npu-page table.compare tbody tr:last-child td {
  border-bottom: 0;
}

.npu-page table.compare thead th {
  background: color-mix(in srgb, var(--panel) 80%, var(--soft));
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.npu-page table.compare th[scope="row"] {
  background: color-mix(in srgb, var(--panel) 90%, var(--soft));
  font-weight: 800;
  white-space: nowrap;
}

/* Interview Q&A study bank */
.npu-page .qa-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.npu-page .qa-search {
  flex: 1 1 220px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.npu-page .qa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.npu-page .qa-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.npu-page .qa-chip[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.npu-page .qa-tools {
  display: flex;
  gap: 6px;
}

.npu-page .qa-tools button {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.npu-page .qa-count {
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.npu-page .qa-group {
  min-width: 0;
  margin-top: 16px;
}

.npu-page .qa-group > h3 {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
  font-size: 15px;
  color: var(--accent-strong);
}

.npu-page .qa-list {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.npu-page details.qa {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.npu-page details.qa > summary {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  line-height: 1.4;
}

.npu-page details.qa > summary::-webkit-details-marker {
  display: none;
}

.npu-page details.qa > summary::before {
  content: "\25B8";
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--accent);
  transition: transform 0.15s ease;
}

.npu-page details.qa[open] > summary::before {
  transform: rotate(90deg);
}

.npu-page details.qa .qa-q {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.npu-page details.qa .qa-a {
  margin: 0;
  padding: 0 13px 12px 33px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.npu-page .qa-badge {
  flex: 0 0 auto;
  margin-left: 8px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.npu-page .qa-badge[data-diff="Basic"] {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.npu-page .qa-badge[data-diff="Intermediate"] {
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
}

.npu-page .qa-badge[data-diff="Advanced"] {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
}

.npu-page .qa-empty {
  padding: 12px 0;
  color: var(--muted);
}
