/* HypoDoc pure-HTML base styles shared by slides and documents.
   Everything is driven by CSS custom properties so external themes can
   restyle without touching the DOM. Light is the default palette; the
   "dark" palette applies via [data-theme="dark"]. */
:root {
  --hypo-bg: #ffffff;
  --hypo-ink: #1f2933;
  --hypo-muted: #5f6b7a;
  --hypo-accent: #245b8f;
  --hypo-surface: #f4f6f9;
  --hypo-border: #d6dce4;
  --hypo-note: #3a6ea5;
  --hypo-tip: #2f855a;
  --hypo-warning: #c05621;
  --hypo-answer: #2f855a;
  --hypo-solution: #6b46c1;
  --hypo-font: "Inter", "Segoe UI", "Helvetica Neue", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --hypo-serif: "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  --hypo-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Noto Sans Mono CJK SC", monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --hypo-bg: #121a27;
  --hypo-ink: #e8eef7;
  --hypo-muted: #a9b6c8;
  --hypo-accent: #77c8ff;
  --hypo-surface: #1b2637;
  --hypo-border: #33445c;
  --hypo-note: #7fb2e5;
  --hypo-tip: #68d391;
  --hypo-warning: #f6ad55;
  --hypo-answer: #68d391;
  --hypo-solution: #b794f4;
  color-scheme: dark;
}
.hypo-block, .hypo-qa {
  margin: .9em 0; border: 1px solid var(--hypo-border); border-left: 4px solid var(--hypo-kind, var(--hypo-note));
  border-radius: 6px; background: var(--hypo-surface); padding: .6em .9em; break-inside: avoid;
}
.hypo-block-title, .hypo-qa-title { font-weight: 700; color: var(--hypo-kind, var(--hypo-note)); margin-bottom: .3em; }
.hypo-block-body > :first-child { margin-top: 0; }
.hypo-block-body > :last-child { margin-bottom: 0; }
.hypo-tip, .hypo-hint, .hypo-objective { --hypo-kind: var(--hypo-tip); }
.hypo-warning, .hypo-requirement { --hypo-kind: var(--hypo-warning); }
.hypo-answer { --hypo-kind: var(--hypo-answer); }
.hypo-solution { --hypo-kind: var(--hypo-solution); }
.hypo-qa { --hypo-kind: var(--hypo-accent); }
.hypo-qa .hypo-block { background: transparent; }
.hypo-choices { padding-left: 1.6em; }
.hypo-tasks { list-style: none; padding-left: .2em; }
.hypo-figure { margin: 1em auto; text-align: center; }
.hypo-figure img { max-width: 100%; max-height: 80vh; height: auto; }
figcaption, caption { color: var(--hypo-muted); font-size: .9em; margin-top: .4em; caption-side: top; }
.hypo-label { font-weight: 700; color: var(--hypo-ink); }
.hypo-table-wrap { overflow-x: auto; margin: 1em 0; }
.hypo-table { border-collapse: collapse; width: 100%; font-size: .95em; }
.hypo-table th { background: var(--hypo-surface); text-align: left; }
.hypo-table th, .hypo-table td { border-bottom: 1px solid var(--hypo-border); padding: .35em .6em; vertical-align: top; }
.hypo-table-comparison tbody tr:nth-child(even), .hypo-table-rubric tbody tr:nth-child(even) { background: var(--hypo-surface); }
.hypo-cols { display: flex; gap: 1.5em; align-items: flex-start; }
.hypo-col { flex: 1 1 0; min-width: 0; }
.hypo-grid { display: grid; grid-template-columns: repeat(var(--hypo-columns, 2), minmax(0, 1fr)); gap: 1em; }
.hypo-cell { border: 1px solid var(--hypo-border); border-radius: 6px; padding: .6em .8em; background: var(--hypo-surface); min-width: 0; }
.hypo-cell img { max-width: 100%; height: auto; }
.hypo-ref { color: var(--hypo-accent); text-decoration: none; }
.hypo-placeholder { display: inline-block; padding: 2em; border: 1px dashed var(--hypo-border); color: var(--hypo-muted); }
.hypo-widget-fallback > :first-child { margin-top: 0; }
pre { background: var(--hypo-surface); border-radius: 6px; padding: .7em .9em; overflow-x: auto; }
code { font-family: var(--hypo-mono); font-size: .92em; }
:not(pre) > code { background: var(--hypo-surface); border: 1px solid var(--hypo-border); border-radius: 3px; padding: 0 .25em; overflow-wrap: anywhere; }
blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid var(--hypo-border); color: var(--hypo-muted); }
a { color: var(--hypo-accent); }
.math.display { display: block; text-align: center; overflow-x: auto; margin: .6em 0; }
.hypo-tikz { max-width: 100%; height: auto; }
@media (max-width: 640px) {
  .hypo-cols { flex-direction: column; gap: .4em; }
  .hypo-col { flex-basis: auto !important; width: 100%; }
  .hypo-grid { grid-template-columns: minmax(0, 1fr); }
}
