/* frankensearch.com: shared styles for every page. The home page adds home.css. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #060806;
  --ink-1: #090c08;
  --ink-2: #0e120d;
  --ink-3: #151a13;
  --ink-4: #1c2219;
  --line: rgba(214, 255, 190, 0.085);
  --line-2: rgba(214, 255, 190, 0.15);
  --line-3: rgba(214, 255, 190, 0.26);
  --text: #eaf0e5;
  --soft: #c6cfc1;
  --mute: #96a291;
  --dim: #7b8777; /* 4.7:1 or better on every surface the site uses */
  --lime: #c4f135;
  --lime-2: #a6dc1f;
  --lime-ink: #0b1102;
  --kw: #ffb347;
  --mn: #5ad7e6;
  --both: #c4f135;
  --violet: #b49cff;
  --rose: #ff6b7a;
  --coral: #ff8f6b;
  --chapter: var(--lime);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(18px, 4vw, 40px);
  --r: 16px;
  --r-sm: 10px;
  --top: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top) + 16px);
  background: var(--ink);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  /* On a short page such as the 404, main grows so the footer sits at the bottom of the screen. */
  display: flex;
  flex-direction: column;
}
body > main {
  flex: 1 0 auto;
}
/* No one-word last lines in running text. */
p,
li,
figcaption,
dd {
  text-wrap: pretty;
}
/* A faint film grain over everything, on screens large enough to see it. */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection {
  background: rgba(196, 241, 53, 0.32);
  color: #fff;
}
code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.88em;
}
:not(pre) > code {
  padding: 0.12em 0.38em;
  border-radius: 6px;
  background: rgba(214, 255, 190, 0.07);
  border: 1px solid var(--line);
  color: #e3f5c0;
  white-space: nowrap;
}
/* Long commands, and the manual's paths and flags in running text, may break. */
code.long,
.prose :not(pre) > code {
  white-space: normal;
  overflow-wrap: anywhere;
}
.num {
  font-variant-numeric: tabular-nums;
}
.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 700;
}
.skip:focus {
  top: 12px;
}

/* ---------- Type ---------- */
.d1,
.d2,
.d3 {
  margin: 0;
  font-weight: 800;
  color: #f4f8f0;
  text-wrap: balance;
}
.d1 {
  font-size: clamp(2.6rem, 6.4vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.052em;
}
.d2 {
  font-size: clamp(2.1rem, 5vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.046em;
}
.d3 {
  font-size: clamp(1.6rem, 3.2vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: -0.036em;
}
em.g {
  font-style: normal;
  color: var(--chapter);
}
.d1 em.g {
  background: linear-gradient(100deg, #dcff6a 0%, var(--lime) 45%, #5ad7e6 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin: 20px 0 0;
  max-width: 42rem;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.6;
  color: var(--soft);
  text-wrap: pretty;
}
.kick,
.micro,
.pill {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--chapter);
}
.kick .num {
  color: var(--dim);
}
.kick.small {
  margin-bottom: 14px;
}
.micro {
  margin: 0 0 10px;
  color: var(--mute);
}
.joint {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.7;
}
.joint.on {
  background: var(--chapter);
  border-color: var(--chapter);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--chapter) 18%, transparent);
  opacity: 1;
}
a.txt {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--chapter) 55%, transparent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.2s;
}
a.txt:hover {
  text-decoration-color: var(--chapter);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(214, 255, 190, 0.04);
  color: var(--text);
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s var(--ease),
    color 0.2s;
}
.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.btn:hover {
  background: rgba(214, 255, 190, 0.08);
  border-color: var(--line-3);
}
.btn:active {
  transform: translateY(1px);
}
.btn.go {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--lime-ink);
  box-shadow:
    0 10px 30px -12px rgba(196, 241, 53, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn.go:hover {
  background: #d4ff4c;
  border-color: #d4ff4c;
}
.btn.sm {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 13.5px;
  gap: 7px;
}
.btn.sm svg {
  width: 15px;
  height: 15px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* A shell command with a copy button. */
.cmd {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-top: 18px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(4, 6, 4, 0.7);
  overflow: hidden;
}
.cmd pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 13px 14px 13px 34px;
  overflow-x: auto;
  scrollbar-width: thin;
  font-size: 13px;
  line-height: 1.55;
  color: #def2b4;
  white-space: pre;
}
.cmd pre::before {
  content: "$";
  position: absolute;
  left: 14px;
  color: var(--dim);
}
.cmd .copy {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--line);
  background: rgba(214, 255, 190, 0.03);
  color: var(--mute);
  font-size: 12.5px;
  font-weight: 600;
  transition:
    color 0.2s,
    background 0.2s;
}
.cmd .copy svg {
  width: 15px;
  height: 15px;
}
.cmd .copy:hover {
  color: var(--text);
  background: rgba(214, 255, 190, 0.08);
}
.cmd .copy.done {
  color: var(--lime);
}

/* ---------- Header ---------- */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--top);
  transition:
    background 0.3s,
    border-color 0.3s,
    backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
body.scrolled .top,
body.solid .top {
  background: rgba(6, 8, 6, 0.78);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}
.top .bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.03em;
  justify-self: start;
  min-height: 44px;
}
.mark {
  width: 28px;
  height: 28px;
  fill: none;
  stroke-linecap: round;
}
.mark .glass {
  stroke: var(--lime);
  stroke-width: 2.4;
}
.mark .handle {
  stroke: var(--lime);
  stroke-width: 3;
}
.mark .seam {
  stroke: var(--mn);
  stroke-width: 1.4;
}
.mark .stitch {
  stroke: var(--mn);
  stroke-width: 1.3;
}
.chapters {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 13, 9, 0.6);
}
.chapters a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--mute);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    color 0.2s,
    background 0.2s;
}
.chapters a .joint {
  width: 6px;
  height: 6px;
  color: var(--chapter, var(--lime));
}
.chapters a:hover {
  color: var(--text);
}
.chapters a[aria-current] {
  color: var(--text);
  background: rgba(214, 255, 190, 0.07);
}
.chapters a[aria-current] .joint {
  background: var(--chapter, var(--lime));
  border-color: var(--chapter, var(--lime));
}
.tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.find {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--mute);
  font-size: 13.5px;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.find svg {
  width: 16px;
  height: 16px;
}
.find:hover {
  color: var(--text);
  border-color: var(--line-2);
}
.find kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  font-size: 11px;
  color: var(--mute);
}
.menu {
  display: none;
  position: relative;
}
.menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  list-style: none;
  cursor: pointer;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu summary svg {
  width: 20px;
  height: 20px;
}
.menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  gap: 2px;
  width: min(300px, calc(100vw - 2 * var(--gutter)));
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: rgba(12, 16, 11, 0.97);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}
.menu nav a:not(.btn) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--soft);
}
.menu nav a:not(.btn) .joint {
  color: var(--chapter, var(--lime));
}
.menu nav a:not(.btn):hover,
.menu nav a[aria-current] {
  background: rgba(214, 255, 190, 0.06);
  color: var(--text);
}
.menu nav .btn {
  margin-top: 6px;
}
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--mn));
  transform: scaleX(0);
  transform-origin: left;
}
@media (max-width: 1080px) {
  .top .bar {
    grid-template-columns: 1fr auto;
  }
  .top .chapters {
    display: none;
  }
  .menu {
    display: block;
  }
  .tools > .btn {
    display: none;
  }
}
@media (max-width: 520px) {
  .find span,
  .find kbd {
    display: none;
  }
  .find {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    border-color: var(--line-2);
  }
  .find svg {
    width: 19px;
    height: 19px;
  }
}

/* ---------- Footer ---------- */
footer.end {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding: 34px 0 calc(34px + env(safe-area-inset-bottom));
  color: var(--mute);
  font-size: 14px;
}
footer.end .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}
footer.end .brand {
  color: var(--text);
  font-size: 15px;
}
footer.end .brand .mark {
  width: 22px;
  height: 22px;
}
footer.end a:not(.brand) {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
footer.end a:not(.brand):hover {
  color: var(--text);
}
footer.end > .wrap > span {
  margin-right: auto;
}
body.docked footer.end {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

/* ---------- Search palette ---------- */
dialog.palette {
  width: min(680px, calc(100vw - 24px));
  max-height: min(640px, calc(100dvh - 80px));
  margin: 72px auto auto;
  padding: 0;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: #0c100b;
  color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
dialog.palette[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: rgba(2, 4, 2, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.palette .q {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--line);
}
.palette .q svg {
  width: 19px;
  height: 19px;
  color: var(--mute);
  flex: none;
}
.palette input {
  flex: 1;
  min-width: 0;
  height: 60px;
  border: 0;
  background: none;
  outline: none;
  font-size: 17px;
}
.palette .esc {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: none;
  color: var(--mute);
  font-size: 12px;
  padding: 6px 9px;
}
.palette .found {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  overscroll-behavior: contain;
}
.palette .match {
  display: block;
  padding: 11px 13px;
  border-radius: 12px;
}
.palette .match[aria-selected="true"] {
  background: rgba(196, 241, 53, 0.08);
  box-shadow: inset 0 0 0 1px rgba(196, 241, 53, 0.22);
}
.palette .match strong {
  display: block;
  font-weight: 650;
  font-size: 15px;
}
.palette .match .where {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 3px;
}
.palette .match p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--mute);
  line-height: 1.5;
}
.palette mark,
.searchpage mark {
  background: rgba(196, 241, 53, 0.2);
  color: #f1ffd0;
  border-radius: 3px;
  padding: 0 2px;
}
.palette .note {
  margin: 0;
  padding: 14px;
  color: var(--mute);
  font-size: 14px;
}
.palette .suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}
.palette .suggest button {
  border: 1px solid var(--line-2);
  background: rgba(214, 255, 190, 0.03);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--soft);
}
.palette .suggest button:hover {
  border-color: var(--line-3);
  color: var(--text);
}
.palette .keys {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}
.palette .keys a {
  margin-left: auto;
  color: var(--mute);
}
.palette .keys kbd {
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 1px 5px;
}
.btnrow {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
}
@media (hover: none) {
  .palette .keys span {
    display: none;
  }
}

/* ---------- Manual ---------- */
.reader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 56px;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: calc(var(--top) + 48px) var(--gutter) 40px;
}
.reading {
  min-width: 0;
  max-width: 780px;
}
.reading > header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.rail {
  position: sticky;
  top: calc(var(--top) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--top) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 6px;
}
.rail nav a {
  display: block;
  padding: 5px 10px;
  border-left: 1px solid var(--line);
  color: var(--mute);
  font-size: 13.5px;
  line-height: 1.4;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.rail nav a.h3 {
  padding-left: 22px;
  font-size: 12.5px;
  color: var(--dim);
}
.rail nav a:hover {
  color: var(--text);
}
.rail nav a[aria-current] {
  color: var(--lime);
  border-left-color: var(--lime);
}
.inline-toc {
  display: none;
  margin: 22px 0 6px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--ink-1);
}
.inline-toc summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
  padding: 0 16px;
  font-weight: 650;
  cursor: pointer;
}
.inline-toc summary small {
  color: var(--dim);
  font-weight: 500;
}
.inline-toc div {
  display: grid;
  padding: 0 8px 10px;
}
.inline-toc a {
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--soft);
  font-size: 14.5px;
}
.inline-toc a:hover {
  background: rgba(214, 255, 190, 0.05);
}
@media (max-width: 1000px) {
  .reader {
    grid-template-columns: minmax(0, 1fr);
    padding-top: calc(var(--top) + 28px);
  }
  .reader .rail {
    display: none;
  }
  .inline-toc {
    display: block;
  }
}

.prose {
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--soft);
  overflow-wrap: break-word;
}
.prose > * {
  max-width: 100%;
}
.prose h2,
.prose h3,
.prose h4 {
  color: #f2f6ee;
  letter-spacing: -0.025em;
  line-height: 1.2;
  scroll-margin-top: calc(var(--top) + 20px);
}
.prose h2 {
  margin: 64px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 1.85rem;
  font-weight: 780;
}
/* The page header already draws a rule above the first section. */
.prose > h2:first-child {
  margin-top: 40px;
  padding-top: 0;
  border-top: 0;
}
.prose h3 {
  margin: 40px 0 12px;
  font-size: 1.3rem;
  font-weight: 720;
}
.prose h4 {
  margin: 30px 0 10px;
  font-size: 1.08rem;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li {
  margin: 5px 0;
}
.prose li::marker {
  color: var(--dim);
}
.prose strong {
  color: var(--text);
}
.prose a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(196, 241, 53, 0.45);
  text-underline-offset: 3px;
}
.prose a:hover {
  text-decoration-color: var(--lime);
}
.prose img {
  border-radius: 14px;
  margin: 10px auto 24px;
  height: auto;
}
.prose blockquote {
  margin: 0 0 16px;
  padding: 4px 18px;
  border-left: 3px solid var(--lime-2);
  color: var(--mute);
}
.code {
  position: relative;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #080b07;
}
.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  scrollbar-width: thin;
  font-size: 13px;
  line-height: 1.6;
  color: #d6e6c4;
  tab-size: 4;
}
.code[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  right: 74px;
  top: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.code .copy {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: #0e130d;
  color: var(--mute);
  font-size: 12px;
  font-weight: 600;
}
.code .copy:hover {
  color: var(--text);
}
.code pre:has(+ .copy:not([hidden])) {
  padding-top: 38px;
}
.table {
  margin: 0 0 22px;
  overflow-x: auto;
  scrollbar-width: thin;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
.table th,
.table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.table thead th {
  background: rgba(214, 255, 190, 0.035);
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
}
.table tr:last-child > * {
  border-bottom: 0;
}
.prose .table td,
.prose .table th {
  min-width: 110px;
}

/* ---------- Dock (manual, phones) ---------- */
.dock {
  display: none;
}
@media (max-width: 1000px) {
  .dock {
    display: block;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 60;
    border-radius: 18px;
    border: 1px solid var(--line-2);
    background: rgba(10, 13, 9, 0.9);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8);
  }
  .dock ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    padding: 6px;
    list-style: none;
  }
  .dock a {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-height: 54px;
    padding: 7px 4px;
    border-radius: 12px;
    color: var(--mute);
    font-size: 11.5px;
    font-weight: 600;
  }
  .dock a svg {
    width: 20px;
    height: 20px;
  }
  .dock a:active {
    background: rgba(214, 255, 190, 0.06);
  }
}
dialog.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 78dvh;
  margin: auto auto 0;
  padding: 0;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #0c100b;
  color: var(--text);
}
dialog.sheet[open] {
  display: flex;
  flex-direction: column;
}
.sheet header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.sheet nav {
  overflow-y: auto;
  padding: 8px 8px calc(16px + env(safe-area-inset-bottom));
}
.sheet nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--soft);
}
.sheet nav a.h3 {
  padding-left: 26px;
  color: var(--mute);
  font-size: 14.5px;
}

/* ---------- Small pages ---------- */
.simple {
  padding-top: calc(var(--top) + 18vh);
  padding-bottom: 18vh;
}
