:root {
  color-scheme: dark light;
  --bg: #07080b;
  --surface: #101218;
  --surface-2: #171a22;
  --text: #f3f1ec;
  --soft: #b8bbc4;
  --line: #343844;
  --accent: #ee4569;
  --code: #090a0e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  background: radial-gradient(circle at 90% 0%, rgb(197 50 80 / 12%), transparent 34rem), var(--bg);
  color: var(--text);
  line-height: 1.65;
  margin: 0 auto;
  max-width: 1180px;
  min-width: 280px;
  overflow-wrap: anywhere;
  padding: clamp(1rem, 4vw, 3.5rem);
}

body::before {
  color: var(--accent);
  content: "VALENTINEDESIGNS COMIC READER  /  WORKING NOTES";
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: 1.25rem;
}

h1, h2, h3 { line-height: 1.16; scroll-margin-top: 1rem; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 7vw, 4.4rem); font-weight: 500; letter-spacing: -0.045em; margin: 0 0 1.25rem; max-width: 18ch; }
h2 { border-top: 1px solid var(--line); font-size: clamp(1.25rem, 3vw, 1.8rem); margin-top: 3rem; padding-top: 1.5rem; }
h3 { color: var(--soft); font-size: 1rem; margin-top: 2rem; }
p, li { max-width: 78ch; }
a { color: var(--accent); text-underline-offset: 0.2em; }

nav#TOC {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 1.5rem 0 2.25rem;
  padding: 1rem 1.15rem;
}

nav#TOC::before { color: var(--soft); content: "ON THIS PAGE"; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; }
nav#TOC ul { columns: 2; margin-bottom: 0; padding-left: 1.2rem; }
nav#TOC li { break-inside: avoid; margin: 0.35rem 0; }

blockquote {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
}
blockquote p { margin: 0; }

code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
p code, li code, td code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

pre {
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #e8e8ec;
  font-size: 0.86rem;
  line-height: 1.55;
  max-width: 100%;
  overflow: auto;
  padding: 1rem;
  text-shadow: none;
}

table { border-collapse: separate; border-spacing: 0; display: block; margin: 1rem 0; max-width: 100%; overflow-x: auto; }
th, td { border-bottom: 1px solid var(--line); min-width: 8rem; padding: 0.7rem 0.8rem; text-align: left; vertical-align: top; }
th { background: var(--surface-2); color: var(--text); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
td { color: var(--soft); }
tr:hover td { background: rgb(255 255 255 / 2%); }

input[type="checkbox"] { accent-color: var(--accent); height: 1rem; margin-right: 0.35rem; width: 1rem; }

@media (max-width: 680px) {
  body { padding: 1rem; }
  nav#TOC ul { columns: 1; }
  pre { font-size: 0.76rem; }
  th, td { min-width: 10rem; }
}

@media (prefers-color-scheme: light) {
  :root { --bg: #f4f0ea; --surface: #fffdfa; --surface-2: #e9e4dd; --text: #191a1e; --soft: #52545c; --line: #c9c2b8; --accent: #9d1f3c; --code: #1a1c22; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
