/* Book theme (/book/): the editor pane from the homepage card. Slate, monospace,
   magenta accent, yellow headings. Loaded after style.css on that page only. */
.theme-code {
  --bg: #1b1d23;
  --panel: #23262e;
  --panel-bar: #16181d;
  --ink: #c8ccd4;
  --dim: #7f848e;
  --line: #333743;
  --accent: #d94fa3;      /* magenta */
  --accent-soft: #e88bc4;
  --key: #e06c75;         /* yaml keys */
  --str: #d19a66;         /* strings */
  --fn: #e5c07b;          /* headings */
  --link: #56b6c2;        /* links */
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.75;
}

.theme-code .site-header,
.theme-code .site-footer { background: var(--panel-bar); border-color: var(--line); }
.theme-code .site-nav a[aria-current="page"],
.theme-code .site-nav a:hover { color: var(--accent); }

.theme-code a { color: var(--link); }
.theme-code a:hover { color: var(--accent-soft); }

/* Photo above the editor pane */
.theme-code .banner { border: 1px solid var(--line); border-radius: 10px 10px 0 0; margin: 0; border-bottom: 0; }

/* Editor pane: a tab bar with the open file, then the text with a magenta rule */
.theme-code .pane {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 14px 40px rgba(217, 79, 163, 0.10);
  margin-bottom: 1rem;
}
.theme-code .tabs {
  display: flex;
  height: 2.1rem;
  background: var(--panel-bar);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
}
.theme-code .tabs span { display: flex; align-items: center; padding: 0 1.25rem; color: var(--dim); box-shadow: 1px 0 0 var(--line); }
.theme-code .tabs .on { background: var(--bg); color: var(--ink); box-shadow: inset 0 2px 0 var(--accent), 1px 0 0 var(--line); }
.theme-code .pane-body { padding: 1.75rem 1.75rem 1.25rem; box-shadow: inset 3px 0 0 var(--accent); }

/* Headings as markdown */
.theme-code h1 { font-family: var(--mono); font-weight: 600; color: var(--fn); font-size: 1.8rem; letter-spacing: -0.01em; }
.theme-code h1::before { content: "# "; color: var(--accent); }
.theme-code h2 { font-family: var(--mono); color: var(--fn); font-weight: 600; font-size: 1.1rem; border-bottom: 1px dashed var(--line); margin-top: 2.25rem; }
.theme-code h2::before { content: "## "; color: var(--accent); }

/* Badge, like the card's */
.theme-code .tag { display: inline-flex; margin: 0 0 1.25rem; font-size: 0.75rem; line-height: 1; letter-spacing: 0; text-transform: none; border-radius: 4px; overflow: hidden; }
.theme-code .tag span { padding: 0.35rem 0.6rem; }
.theme-code .tag .k { background: #2c2f38; color: var(--key); }
.theme-code .tag .v { background: var(--accent); color: #fff; }

.theme-code .lead { color: var(--ink); font-size: 1rem; }
.theme-code .lead em { color: var(--str); font-style: normal; }

/* An entry shown as a small yaml block */
.theme-code pre {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}
.theme-code pre code { background: none; padding: 0; font-size: inherit; }
.theme-code pre .k { color: var(--key); }
.theme-code pre .s { color: var(--str); }
.theme-code pre .c { color: var(--dim); font-style: italic; }

/* Links written like markdown links */
.theme-code .md-links { list-style: none; padding: 0; margin: 0; }
.theme-code .md-links li { margin: 0 0 0.3rem; }
.theme-code .md-links a::before { content: "["; color: var(--dim); }
.theme-code .md-links a::after { content: "](\2026)"; color: var(--dim); }

.theme-code .note { background: var(--panel); border-color: var(--line); border-left: 3px solid var(--accent); border-radius: 6px; color: var(--ink); }

.theme-code .back a, .theme-code .site-footer a { color: var(--dim); }
.theme-code .x-note { color: var(--dim); }

@media (max-width: 640px) {
  .theme-code .pane-body { padding: 1.25rem 1.1rem 1rem; }
  .theme-code h1 { font-size: 1.45rem; }
}

/* Verse sample as a quoted block */
.theme-code blockquote.verses { background: var(--panel); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; padding: 0.85rem 1.1rem; margin: 1rem 0 1.25rem; }
.theme-code blockquote.verses p { margin: 0 0 0.6rem; }
.theme-code blockquote.verses p:last-child { margin-bottom: 0; }
.theme-code blockquote.verses .vn { font-family: var(--mono); color: var(--accent); margin-right: 0.35rem; }
.theme-code .pane-body ul:not(.md-links) li::marker { color: var(--accent); }
