:root {
  color-scheme: light;
  --paper: #f8f6f2;
  --surface: #ffffff;
  --ink: #141311;
  --muted: #555048;
  --line: #dcd6cb;
  --soft: #efeae1;
  --link: #b83b04;
  --primary: #b83b04;
  --on-primary: #ffffff;
  --positive: #146c35;
  --positive-bg: #eefaf2;
  --caution: #7c4a03;
  --caution-bg: #fef3dc;
  --terminal: #171614;
  --terminal-ink: #faf8f5;
  --terminal-muted: #c6bfb4;
  --mint: #6ee7a8;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #11100f; --surface: #201e1b; --ink: #faf8f5; --muted: #bab3a8;
    --line: #35312b; --soft: #191715; --link: #ff9c6e; --primary: #c94610; --on-primary: #ffffff;
    --positive: #8ef2bd; --positive-bg: rgba(110, 231, 168, 0.12); --caution: #f8d791; --caution-bg: rgba(248, 215, 145, 0.14);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #11100f; --surface: #201e1b; --ink: #faf8f5; --muted: #bab3a8;
  --line: #35312b; --soft: #191715; --link: #ff9c6e; --primary: #c94610; --on-primary: #ffffff;
  --positive: #8ef2bd; --positive-bg: rgba(110, 231, 168, 0.12); --caution: #f8d791; --caution-bg: rgba(248, 215, 145, 0.14);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
.wrap { width: min(100% - 2 * var(--gutter), 74rem); margin-inline: auto; }
h1, h2, h3, h4, p, pre { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.16; }
h2 { max-width: 34ch; font-size: clamp(1.55rem, 3vw, 2.3rem); letter-spacing: -.04em; }
h3 { font-size: 1.12rem; letter-spacing: -.02em; }
p { max-width: 74ch; }
p + p { margin-top: .72rem; }
a { color: var(--link); text-underline-offset: .19em; text-decoration-thickness: .075em; }
a:hover { text-decoration-thickness: .13em; }
:where(a, button, select):focus-visible { outline: 3px solid #f27138; outline-offset: 3px; }
button { font: inherit; cursor: pointer; }
code, pre, samp { font-family: var(--mono); }
code, samp { font-size: .89em; overflow-wrap: anywhere; }
p code, li code, th code, td code, h2 code, h3 code, h4 code, strong code {
  color: inherit; background: var(--soft); border-radius: .24em; padding: .06em .29em;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.small, .muted { color: var(--muted); }
.small { font-size: .89rem; line-height: 1.52; }
[hidden] { display: none !important; }
section { scroll-margin-block-start: 1rem; }

.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem 1.25rem; padding-block: 1rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .65rem; font-size: .91rem; font-weight: 600; letter-spacing: -.015em; text-decoration: none; color: var(--ink); }
.eyebrow::before { content: ""; width: 1.6rem; height: 1.6rem; border-radius: .42rem; background: linear-gradient(150deg, transparent 32%, #f27138 32% 42%, transparent 42% 52%, #ff9c6e 52% 62%, transparent 62%), #171614; }
.topnav { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .85rem; }
.topnav a { display: inline-flex; align-items: center; text-decoration: none; color: var(--muted); font-size: .86rem; font-weight: 550; padding: .22rem .1rem; }
.topnav a:hover { color: var(--link); text-decoration: underline; }
.topnav a[aria-current="page"] { color: var(--ink); font-weight: 650; border-bottom: 2px solid var(--link); }
.topnav a.nav-cta { gap: .55rem; padding: .42rem .82rem; border-radius: .4rem; background: var(--primary); color: var(--on-primary); border-bottom: 0; }
.topnav a.nav-cta:hover { color: var(--on-primary); text-decoration: underline; }
.themesw { display: inline-flex; gap: .12rem; padding: .16rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--soft); }
.themesw button { border: 0; background: transparent; color: var(--muted); font: 600 .74rem/1 var(--sans); padding: .3rem .48rem; border-radius: .3rem; }
.themesw button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.16); }

.cover {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 24%);
  gap: clamp(1rem, 3.5vw, 3.4rem); padding: clamp(1.5rem, 3.8vw, 3.2rem);
  color: #faf8f5; background: linear-gradient(112deg, #11100f 8%, #1d1a17 65%, #2b1f18);
  border: 1px solid #35312b;
  border-radius: .85rem;
}
.cover::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 0 42%;
  background-image: linear-gradient(#f2713816 1px, transparent 1px), linear-gradient(90deg, #f2713816 1px, transparent 1px);
  background-size: 24px 24px; mask-image: linear-gradient(90deg, transparent, #000 52%);
}
.cover .kicker { font-size: .78rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #ff9c6e; margin-bottom: .55rem; }
.cover h1 { max-width: 22ch; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.05; letter-spacing: -.045em; font-weight: 600; }
.cover .lead { max-width: 65ch; color: #e2dcd2; font-size: clamp(1rem, 1.3vw, 1.13rem); line-height: 1.55; margin-top: .95rem; }
.cover a { color: #ff9c6e; }
.cover code { background: rgba(255,255,255,.12); color: #faf8f5; }
.cover a code { color: inherit; }
.cover a.btn { background: rgba(255,255,255,.08); border-color: #504a41; color: #faf8f5; }
.cover a.btn.primary { background: #c94610; border-color: #c94610; color: #ffffff; }
.cover a.btn code { background: rgba(255,255,255,.16); color: inherit; }
.layers { position: relative; width: min(100%, 13rem); height: 8.8rem; justify-self: center; }
.layers i {
  position: absolute; left: 50%; top: 50%; width: 69%; height: 69%; border-radius: 12px;
  transform: translate(-50%, -50%) rotate(-32deg) skewX(22deg) scaleY(.7);
  border: 1.5px solid #504a41; background: #23211e; box-shadow: 0 8px 12px #00000048;
}
.layers i:first-child { margin-top: 1.6rem; }
.layers i:nth-child(2) { margin-top: .4rem; background: #2d251f; border-color: #8c624c; }
.layers i:last-child {
  margin-top: -.85rem; border-color: #f27138;
  background: repeating-linear-gradient(0deg, transparent 0 17px, #ff9c6e26 17px 18px), linear-gradient(115deg, #c94610, #4a2617);
}
.layers i:last-child::after { content: ""; position: absolute; inset: 16% 59% 16% 14%; border: 1.5px solid #ffd4be; background: #f2713844; border-radius: 3px; }

.wrap > section { padding-block: clamp(2.25rem, 4vw, 3.6rem); border-bottom: 1px solid var(--line); }
.wrap > section:first-of-type { padding-top: 0; }
section > h2 + p { margin-top: .65rem; color: var(--muted); }

.two, .grid3, .grid4 { display: grid; gap: clamp(.8rem, 1.5vw, 1.25rem); margin-top: 1.25rem; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.card, .tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: .65rem; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; padding: clamp(1rem, 1.6vw, 1.35rem); min-width: 0; }
.card > p, .card > ul { margin: 0; }
.card p, .card ul { overflow-wrap: anywhere; }
.grid3 .card, .accent-top .card { border-top: 3px solid color-mix(in srgb, var(--link) 45%, var(--line)); }

.badge { display: inline-flex; width: fit-content; padding: .15rem .48rem; border-radius: .27rem; font-size: .74rem; line-height: 1.4; font-weight: 600; }
.badge.ok { color: var(--positive); background: var(--positive-bg); }
.badge.wait { color: var(--caution); background: var(--caution-bg); }
.badge.soft { color: var(--ink); background: var(--soft); }

.tabs { display: inline-flex; gap: .16rem; padding: .2rem; background: var(--soft); border-radius: .5rem; }
.tabs button { border: 0; background: transparent; color: var(--muted); font-size: .85rem; font-weight: 600; border-radius: .35rem; padding: .48rem .85rem; }
.tabs button:is([aria-selected="true"], [aria-pressed="true"]) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(20, 19, 17, 0.16); }

.filter-bar { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.chip { display: inline-flex; align-items: center; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: .34rem .8rem; font-size: .84rem; font-weight: 600; }
a.chip:hover { border-color: var(--link); color: var(--link); text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

.snip { position: relative; width: 100%; min-width: 0; border-radius: .48rem; background: var(--terminal); color: var(--terminal-ink); margin-block: .55rem; }
.snip pre, pre.term { font: .84rem/1.58 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; padding: .9rem 1rem; }
pre.term { border-radius: .48rem; background: var(--terminal); color: var(--terminal-ink); margin-block: .65rem; }
.term .dim { color: var(--terminal-muted); } .term .ok { color: var(--mint); } .term .wait { color: #f8d791; } .term .bad { color: #ffb5ac; }
.copy-btn { position: absolute; right: .5rem; top: .5rem; background: #282521; color: #faf8f5; border: 1px solid #504a41; border-radius: .3rem; padding: .28rem .52rem; font: 550 .74rem/1.2 var(--sans); }
.copy-btn:hover { background: #3a352f; }
.snip:has(.copy-btn) pre { padding-right: 4rem; }

.say { position: relative; width: 100%; background: var(--soft); color: var(--ink); border-radius: .36rem; padding: .75rem 3.8rem .75rem .85rem; font: .85rem/1.52 var(--mono); overflow-wrap: anywhere; }
.say .copy-btn { right: .45rem; top: .45rem; }

.buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .58rem .92rem; border: 1px solid var(--line); border-radius: .38rem; color: var(--ink); background: var(--surface); text-decoration: none; font-weight: 600; font-size: .9rem; }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn:hover { box-shadow: 0 2px 6px rgba(20, 19, 17, 0.14); text-decoration: underline; }

.tablewrap { overflow-x: auto; margin-top: 1.15rem; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: start; vertical-align: top; padding: .82rem .95rem; border-bottom: 1px solid var(--line); }
th { background: var(--soft); color: var(--muted); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.callout { margin-top: 1.1rem; padding: .95rem 1.15rem; border-left: 3px solid var(--link); background: var(--soft); border-radius: 0 .45rem .45rem 0; }
ul.tight { padding-left: 1.2rem; margin: .35rem 0 0; }
ul.tight li + li { margin-top: .4rem; }

.recipe-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; }
.recipe-controls label { display: flex; flex-direction: column; gap: .35rem; font-size: .84rem; font-weight: 600; color: var(--muted); }
.recipe-controls select { font: 550 .95rem/1.4 var(--sans); padding: .6rem .75rem; border-radius: .42rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.recipe-out { margin-top: 1rem; padding: 1.2rem 1.35rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--link); border-radius: .65rem; display: grid; gap: .65rem; }

.rung-next { margin-top: 1.5rem; padding: 1.15rem 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: .65rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.doc-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding-block: .6rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.doc-body h1 { font-size: clamp(1.85rem, 3.4vw, 2.65rem); letter-spacing: -.04em; margin-bottom: 1rem; }
.doc-body h2 { margin-top: 2.1rem; margin-bottom: .75rem; max-width: 44ch; }
.doc-body h3 { margin-top: 1.5rem; margin-bottom: .5rem; }
.doc-body h4 { margin-top: 1.2rem; margin-bottom: .4rem; font-size: 1rem; }
.doc-body p + p, .doc-body ul + p, .doc-body ol + p, .doc-body .tablewrap + p, .doc-body .snip + p, .doc-body blockquote + p, .doc-body details + p { margin-top: .85rem; }
.doc-body ul, .doc-body ol { max-width: 74ch; padding-left: 1.35rem; margin-block: .6rem; }
.doc-body li + li { margin-top: .38rem; }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin-block: 1.8rem; }
details { margin-block: 1rem; padding: .85rem 1.05rem; background: var(--surface); border: 1px solid var(--line); border-radius: .55rem; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details summary:hover { color: var(--link); }
details > :not(summary):first-of-type { margin-top: .75rem; }
.doc-body blockquote.callout { margin-block: 1rem; }
.doc-body blockquote.callout > p:first-child { margin-top: 0; }
.slide-frame { margin-top: 1rem; border-radius: .65rem; overflow: hidden; border: 1px solid var(--line); background: #11100f; box-shadow: 0 10px 26px rgba(17, 16, 15, .18); }
.slide-frame a { display: block; }
.slide-frame img { display: block; width: 100%; height: auto; }
.slide-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .7rem; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .slide-frame {
    border-color: #504a41;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(242, 113, 56, .16);
  }
}
:root[data-theme="dark"] .slide-frame {
  border-color: #504a41;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(242, 113, 56, .16);
}
footer { color: var(--muted); font-size: .89rem; padding-block: 1.6rem 2.4rem; line-height: 1.9; }
footer p { max-width: none; }

@media (max-width: 60rem) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 48rem) {
  .cover, .two, .grid3, .recipe-controls { grid-template-columns: 1fr; }
  .layers { display: none; }
}
@media (max-width: 32rem) {
  .grid4 { grid-template-columns: 1fr; }
  .topnav { gap: .35rem .65rem; }
  th, td { padding: .65rem .55rem; }
}
