:root {
  color-scheme: light;
  --bg: #eae5da;
  --paper: #f6f1e7;
  --slip: #e8ddcd;
  --ink: #292724;
  --muted: #605b55;
  --accent: #bc3828;
  --action: #b73425;
  --action-text: #fffaf2;
  --control-radius: 10px;
  --control-height: 56px;
  --control-min-touch: 44px;
  --focus-ring: 3px solid var(--accent);
  --focus-offset: 3px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #201f1c;
  --paper: #2b2925;
  --slip: #38332d;
  --ink: #f6f1e7;
  --muted: #c9c1b4;
  --accent: #f5846f;
  --action: #e86d56;
  --action-text: #201f1c;
  --code-bg: #262421;
  --code-fg: #f4f0e8;
  --code-muted: #9a9388;
  --code-keyword: #a9c0ff;
  --code-string: #e4c4a4;
  --code-comment: #9a9388;
  --code-border: #3f3b36;
  --code-btn-bg: #fffdf8;
  --code-btn-border: #ddd6ca;
  --code-btn-fg: #6f685f;
}

/* Code blocks. Line numbers and the copy button are added by code-block.js.
   These rules also style a bare <pre> when JavaScript is off. */
:root {
  --code-bg: #f6f7f9;
  --code-fg: #1c1f24;
  --code-muted: #aeb4bd;
  --code-keyword: #1e3a8a;
  --code-string: #6e4c32;
  --code-comment: #8b939e;
  --code-border: #e5e7eb;
  --code-btn-bg: #ffffff;
  --code-btn-border: #e4e6ea;
  --code-btn-fg: #8d939c;
  --code-font: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --code-size: 13.5px;
  --code-lh: 1.65;
  --code-pad-y: 14px;
}

code {
  overflow-wrap: anywhere;
}

body pre {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0 0 1em;
  padding: var(--code-pad-y) 16px;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  font-family: var(--code-font);
  font-size: var(--code-size);
  line-height: var(--code-lh);
  white-space: pre;
  tab-size: 2;
}

body pre code {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  white-space: inherit;
  overflow-wrap: normal;
}

.code-frame {
  position: relative;
  max-width: 100%;
  margin: 0 0 1em;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
}

.code-scroll {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  overflow-x: auto;
  border-radius: inherit;
}

.code-frame pre {
  flex: none;
  width: max-content;
  max-width: none;
  margin: 0;
  padding: var(--code-pad-y) 48px var(--code-pad-y) 12px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.code-gutter {
  position: sticky;
  left: 0;
  z-index: 1;
  flex: none;
  margin: 0;
  padding: var(--code-pad-y) 14px var(--code-pad-y) 16px;
  background: var(--code-bg);
  color: var(--code-muted);
  font-family: var(--code-font);
  font-size: var(--code-size);
  line-height: var(--code-lh);
  text-align: right;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  counter-reset: code-line;
}

.code-gutter-line {
  display: block;
  min-width: 2ch;
  min-height: calc(var(--code-size) * var(--code-lh));
}

.code-gutter-line::before {
  content: counter(code-line);
  counter-increment: code-line;
}

.code-frame pre code {
  display: block;
  white-space: normal;
}

.code-line {
  display: block;
  min-height: calc(var(--code-size) * var(--code-lh));
  white-space: pre;
}

body pre .token.keyword,
body pre .token.boolean,
body pre .token.null,
body pre .token.builtin,
body pre .token.property,
body pre .token.method,
body pre .token.request-line {
  color: var(--code-keyword);
}

body pre .token.string,
body pre .token.url,
body pre .token.attr-value {
  color: var(--code-string);
}

body pre .token.comment {
  color: var(--code-comment);
}

button.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  max-width: 30px;
  min-height: 30px;
  margin: 0;
  padding: 0;
  background: var(--code-btn-bg);
  color: var(--code-btn-fg);
  border: 1px solid var(--code-btn-border);
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
  font: 400 14px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  appearance: none;
  -webkit-appearance: none;
}

button.code-copy-btn svg {
  display: block;
}

button.code-copy-btn:hover {
  background: #f3f4f6;
  border-color: #c5cad1;
  --code-btn-bg: #f3f4f6;
}

:root[data-theme="dark"] button.code-copy-btn:hover {
  background: #f6f3ec;
  border-color: #c9c1b4;
  --code-btn-bg: #f6f3ec;
}

button.code-copy-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

button.code-copy-btn:active {
  transform: none;
}

button.code-copy-btn[data-state="copied"] {
  color: #1f7a46;
  border-color: #c5ddd0;
}

.code-copy-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Option C masthead mark: open cream plate. Shared by every page that links this file. */
.masthead-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

a.brand-mark {
  display: flex;
  flex: none;
  line-height: 0;
  color: inherit;
  text-decoration: none;
}

a.brand-mark:hover {
  color: inherit;
}

a.brand-mark img {
  width: 40px;
  height: 40px;
  display: block;
}

/* Hunch newsletter line. Sits above the footer link row and uses the Option C
   tokens already on the page: cream paper, ink, and red. Type size and weight
   come from .page-footer (13px / 11px, weight 700). */
.page-footer {
  flex-wrap: wrap;
  align-items: baseline;
}

.page-footer .footer-hunch {
  flex: 1 0 100%;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: 1.45;
}

.page-footer .footer-hunch-lead {
  color: var(--ink);
  font-weight: 700;
}

.page-footer a.footer-hunch-bet {
  display: inline-block;
  margin-inline-start: 10px;
  padding: 2px 12px 3px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  letter-spacing: inherit;
  line-height: 1.35;
  text-decoration: none;
  vertical-align: baseline;
  white-space: nowrap;
}

.page-footer a.footer-hunch-bet:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.page-footer a.footer-hunch-bet:focus {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.page-footer a.footer-hunch-bet:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  color: var(--paper);
}

.page-footer .footer-hunch-note {
  display: block;
  margin-top: 4px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 1.45;
}

@media (max-width: 580px) {
  .page-footer .footer-hunch {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .page-footer a.footer-hunch-bet {
    margin-inline-start: 0;
  }
}

/* Keep "RIZZ IPSUM © 2026" together. The unit may still wrap as a whole. */
.page-footer .footer-mark {
  white-space: nowrap;
}

/*
 * Links row. Each entry is a nowrap footer-item whose · is in a leading gutter.
 * The track is shifted left by one gutter and the clip hides that overflow, so
 * the gutter of whichever item starts a line is not visible. Breaks happen
 * only between items, so a line cannot end on a · either.
 */
.page-footer .footer-links {
  --sep: 1.35em;
  --focus-pad: 4px;
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: var(--focus-pad);
}

.page-footer .footer-links-track {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  width: calc(100% + var(--sep));
  margin-left: calc(var(--sep) * -1);
  row-gap: 0.7em;
}

.page-footer .footer-item {
  display: flex;
  align-items: baseline;
  flex: none;
  white-space: nowrap;
}

.page-footer .sep {
  /* Glyph sits in the clipped part of the gutter. The margin is the blank
     focus padding, so a line-start separator cannot peek into view. */
  display: inline-block;
  width: calc(var(--sep) - var(--focus-pad));
  margin-right: var(--focus-pad);
  text-align: center;
  letter-spacing: 0;
  line-height: 1;
}
