:root {
  --bg: #f4efe6;
  --bg-elev: #fffdf8;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: #d9d0c3;
  --accent: #1f4ea3;
  --accent-2: #8a3b12;
  --code-bg: #1c1915;
  --code-ink: #f3eee6;
  --steal: #1e4d3a;
  --steal-bg: #eef6f1;
  --caveat: #8a3b12;
  --caveat-bg: #f8efe6;
  --shadow: 0 10px 30px rgba(28, 25, 21, 0.08);
  --radius: 16px;
}
html[data-theme="dark"] {
  --bg: #161410;
  --bg-elev: #211e19;
  --ink: #f3eee6;
  --muted: #b7b0a4;
  --line: #3a342c;
  --accent: #8ab4ff;
  --accent-2: #e3a37a;
  --code-bg: #0e0c0a;
  --code-ink: #f3eee6;
  --steal: #9fd4b8;
  --steal-bg: #1a2a22;
  --caveat: #e3a37a;
  --caveat-bg: #2a2118;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #161410;
    --bg-elev: #211e19;
    --ink: #f3eee6;
    --muted: #b7b0a4;
    --line: #3a342c;
    --accent: #8ab4ff;
    --accent-2: #e3a37a;
    --code-bg: #0e0c0a;
    --code-ink: #f3eee6;
    --steal: #9fd4b8;
    --steal-bg: #1a2a22;
    --caveat: #e3a37a;
    --caveat-bg: #2a2118;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.125rem;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.topbar-actions { display: flex; gap: 0.6rem; align-items: center; }
.topbar a, .btn {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}
.topbar a:hover, .btn:hover { border-color: var(--accent); }
button.btn { cursor: pointer; font-family: inherit; color: var(--ink); }
.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4.5rem;
}
article {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cover {
  display: block;
  width: 100%;
  height: auto;
  background: #1c1915;
}
.cover-cap {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.55rem 1.5rem 0;
}
.body { padding: 1.25rem 1.5rem 2.75rem; }
@media (min-width: 720px) {
  .body { padding: 1.75rem 3rem 3.5rem; }
  .cover-cap { padding-left: 3rem; padding-right: 3rem; }
}
.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
  margin: 0.9rem 0 0.65rem;
}
h1 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4.2vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
}
h2 {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 2.6rem 0 0.9rem;
  letter-spacing: -0.02em;
}
h3 {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.22rem;
  line-height: 1.3;
  margin: 2rem 0 0.7rem;
}
p { margin: 0 0 1rem; }
a { color: var(--accent); }
.dek {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 1.25rem;
}
.byline {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin: 0 0 1.35rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.byline img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.byline strong { display: block; font-size: 1.02rem; }
.byline .meta { color: var(--muted); font-size: 0.86rem; }
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 1.4rem;
}
.split {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.split li { padding: 0.7rem 1rem; border-top: 1px solid var(--line); }
.split li:first-child { border-top: 0; }
.split strong { color: var(--accent-2); }
figure { margin: 1.25rem 0 1.4rem; }
figure img, figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #111;
}
figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.45rem; }
figure.portrait { max-width: 360px; margin-left: auto; margin-right: auto; }
.banner { margin: 0 0 1.1rem; }
.banner img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.facts { list-style: none; padding: 0; margin: 0 0 1.15rem; }
.facts li { padding: 0.35rem 0; }
.facts li + li { border-top: 1px dashed var(--line); }
ol.steps { padding-left: 1.25rem; margin: 0 0 1.15rem; }
ol.steps li { margin: 0 0 0.4rem; }
.callout { border-radius: 12px; padding: 0.85rem 1rem; margin: 0 0 1rem; }
.callout.steal {
  background: var(--steal-bg);
  border: 1px solid color-mix(in srgb, var(--steal) 35%, var(--line));
}
.callout.caveat {
  background: var(--caveat-bg);
  border: 1px solid color-mix(in srgb, var(--caveat) 35%, var(--line));
}
.callout .lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.callout.steal .lbl { color: var(--steal); }
.callout.caveat .lbl { color: var(--caveat); }
.callout p { margin: 0; }
.rules { padding-left: 1.2rem; margin: 0 0 1.15rem; }
.rules li { margin: 0 0 0.7rem; }
.toc {
  background: color-mix(in srgb, var(--bg) 70%, var(--bg-elev));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}
.toc strong { display: block; margin-bottom: 0.45rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.prompt {
  margin: 0 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-ink);
}
.prompt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(243,238,230,0.12);
}
.prompt-head h3 {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.95rem;
  margin: 0;
  color: var(--code-ink);
}
.prompt-note {
  margin: 0;
  padding: 0.45rem 1rem 0;
  font-size: 0.78rem;
  color: #c9c2b6;
}
.copy-btn {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--code-ink);
  background: transparent;
  border: 1px solid rgba(243,238,230,0.28);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}
.copy-btn:hover { border-color: #fff; }
.prompt pre {
  margin: 0;
  padding: 0.9rem 1rem 1.15rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.prompt code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.formula {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.15rem;
  text-align: center;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  margin: 0 0 1.15rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 0.35rem 0 1.2rem;
  line-height: 1.4;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.comments {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.comment {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.comment img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.comment .who { font-size: 0.9rem; }
.comment .who a { text-decoration: none; }
.comment .when { color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.foot { margin-top: 2rem; font-size: 0.84rem; color: var(--muted); }
.video-fallback { display: block; position: relative; }
.video-fallback img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-decoration: none;
}
