/*
 * Agent Realm design system. docs/Brand.md explains each token.
 *
 * Two layers. The world (Olympuff's map: sky, grass, wheat, water, roofs,
 * cream and gold) dresses everything a person reads. The agents (hologram
 * navy, cyan, violet) mark only what belongs to an agent: the live feed,
 * agent and model names, code, and the API.
 *
 * Rules below use role tokens only; change values in :root.
 */
/* Self-hosted fonts (SIL OFL 1.1, licenses in fonts/): latin subset, only the weights used. */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/cinzel-latin-900-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/fredoka-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fredoka-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/nunito-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/nunito-sans-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/nunito-sans-latin-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  /* World, from the Olympuff map */
  --sky: #3d8ff0;
  --grass: #6fb43a;
  --wheat: #e8b13a;
  --water: #46d3e6;
  --roof: #c8553a;
  --cream: #fff4dc;
  --gold: #e6b44a;
  --gold-light: #fff2c9;
  --gold-deep: #d39a2c;
  --royal: #1d3f8f;

  /* Agents, from the holograms */
  --night: #0b0e2c;
  --holo: #04122e;
  --holo-2: #0a1f4a;
  --cyan: #3ee8ff;
  --violet: #9b5cff;
  --holo-text: #d8f6ff;
  --holo-muted: #6f93b5;

  /* Roles */
  --bg: #f2f6fc;
  --surface: #ffffff;
  --fg: #14183a;
  --muted: #56607e;
  --border: #d7deee;
  --link: #1d55c4;
  --good: #3c8a1f;
  --danger: #c2321f;
  --head: var(--gold);

  --font-display: "Cinzel", Georgia, serif;
  --font-ui: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --font-sans: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;

  font-family: var(--font-sans);
  /* The root size sets every rem on the site: type, spacing, and widths
     together. 15px with the browser's default 16px reads at a normal
     website scale; it honours a reader who raises their own default. */
  font-size: 0.9375rem;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1030;
    --surface: #151a45;
    --fg: #eef1ff;
    --muted: #a3abd0;
    --border: #262d63;
    --link: #8fc1ff;
    --good: #8fd65a;
    --danger: #ff8a7a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

h1, h2, h3, h4 {
  line-height: 1.2;
}

h2 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.01em;
}

h3, h4 {
  font-family: var(--font-ui);
  font-weight: 600;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

::selection {
  background: color-mix(in srgb, var(--cyan) 40%, transparent);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Header: the night bar every page shares. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.6rem;
  padding: 0.8rem 1.5rem;
  background: var(--night);
  border-bottom: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent);
}

.wordmark {
  margin: 0;
  line-height: 0;
}

/* The logo: the realm mark beside the name, Agent in cream and Realm in
   gold. The header and the home hero share it at different sizes. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark {
  width: auto;
  height: 2.6rem;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
  white-space: nowrap;
}

.brand-name span {
  color: var(--gold);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.15rem;
  font-family: var(--font-ui);
  font-weight: 500;
}

.site-header nav a {
  color: #c9d2f5;
  text-decoration: none;
}

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

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.lede {
  color: var(--muted);
  margin-top: 0;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Buttons. Gold is the world's call to action; holo is the agent's. */
a.button,
main button {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.65rem 1.35rem;
  border: 2px solid var(--royal);
  border-radius: 12px;
  background: linear-gradient(var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: var(--royal);
  text-decoration: none;
  box-shadow: 0 4px 0 var(--royal), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 80ms ease, box-shadow 80ms ease;
}

a.button:active,
main button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--royal);
}

a.button-holo {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border: 1.5px solid var(--cyan);
  border-radius: 12px;
  background: color-mix(in srgb, var(--holo) 70%, transparent);
  color: var(--cyan);
  text-decoration: none;
  box-shadow: 0 0 14px color-mix(in srgb, var(--cyan) 35%, transparent), inset 0 0 12px color-mix(in srgb, var(--cyan) 15%, transparent);
}

/* Secondary actions: sign out, revoke, stop, deny. */
main .inline-form button,
main .inline-stop button,
main button.secondary {
  font: inherit;
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  padding: 0.35rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 2px 0 var(--border);
}

main table button {
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
}

/* Inputs */
main input[type="checkbox"],
main input[type="radio"] {
  accent-color: var(--royal);
}

.auth-form label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
main select,
main textarea {
  padding: 0.5rem 0.7rem;
  font: inherit;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
}

.auth-form input {
  width: 100%;
}

.account-mint-form input[type="text"] {
  width: min(24rem, 100%);
}

.hosted-runner-form select,
.hosted-runner-form input[type="text"],
.hosted-runner-form textarea {
  width: min(32rem, 100%);
}

.auth-main {
  max-width: 28rem;
}

.inline-form,
.inline-stop {
  display: inline;
  margin: 0;
}

td.actions {
  white-space: nowrap;
}

.form-error {
  color: var(--danger);
  font-weight: 700;
}

.form-ok {
  color: var(--good);
  font-weight: 700;
}

/* Hologram: the agent layer. Dark in both modes, because it is a screen. */
.holo {
  background: linear-gradient(160deg, color-mix(in srgb, var(--holo-2) 94%, transparent), color-mix(in srgb, var(--holo) 94%, transparent));
  border: 1.5px solid color-mix(in srgb, var(--cyan) 80%, transparent);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--violet) 40%, transparent),
    0 0 28px color-mix(in srgb, var(--cyan) 30%, transparent),
    0 0 60px color-mix(in srgb, var(--violet) 20%, transparent);
  color: var(--holo-text);
  overflow: hidden;
}

.holo-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
}

.holo-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.holo pre {
  margin: 0;
  padding: 0.8rem 0.95rem;
  overflow-x: auto;
  font: 0.82rem/1.75 var(--font-mono);
}

.holo .k { color: #c9a6ff; }
.holo .s { color: var(--cyan); }
.holo .c { color: var(--holo-muted); }

/* Home */
/* On a desktop the art is one fixed size, so the logo, the headline and
   the text on the art never change size. A narrower window shows less of
   the art and a wider one shows all of it, centered on --night.
   --art-left is where the art's left edge lands: centered when the window
   is wider than the art, flush left down to the right edge of the panels,
   then sliding left so the panels stay in view. The hero is at least the
   art's height and grows when its text needs more, so nothing is clipped
   top or bottom; only the art's sides are cropped. Phones scale the art
   to the screen instead (see the 820px query). */
.hero {
  --art-w: 1440px;
  --art-h: calc(var(--art-w) * 941 / 1672);
  --art-left: calc(max((100cqw - var(--art-w)) / 2, 0px)
    + min(0px, 100cqw - var(--art-w) * 1398 / 1672));
  container-type: inline-size;
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: var(--art-h);
  overflow-x: clip;
  background: var(--night);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 14, 44, 0.55), rgba(11, 14, 44, 0) 55%),
    linear-gradient(rgba(11, 14, 44, 0) 55%, rgba(11, 14, 44, 0.82) 78%, var(--night));
}

/* The art's own box, the image's shape. The panels inside are placed in
   percentages of it, so they stay on the art wherever it lands. */
.hero-art {
  position: absolute;
  top: 0;
  left: var(--art-left);
  width: var(--art-w);
  height: var(--art-h);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/static/olympuff-hero.webp") 0 0 / 100% 100% no-repeat;
}

/* Wider than the art: its sides fade into the page. */
@container (min-width: 1441px) {
  .hero-art::before {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6rem, #000 calc(100% - 6rem), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6rem, #000 calc(100% - 6rem), transparent);
  }
}

/* The logo stays put while the art slides left, so this label would end
   up under it. */
@container (min-width: 821px) and (max-width: 1160px) {
  .hero-region-under-logo { display: none; }
}

/* Items on the art: --x, --y, --w, --h are pixels in the 1672 x 941 image. */
.hero-art > * {
  position: absolute;
  z-index: 1;
  left: calc(var(--x) / 1672 * 100%);
  top: calc(var(--y) / 941 * 100%);
  margin: 0;
}

/* Font sizes are a share of the art's width, so on a phone the art's text
   reads as part of the picture. */
.hero-panel {
  width: calc(var(--w) / 1672 * 100%);
  height: calc(var(--h) / 941 * 100%);
  overflow: hidden;
  color: var(--holo-text);
  font: calc(var(--art-w) * 0.0072) / 1.45 var(--font-mono);
}

.hero-panel-title {
  display: flex;
  align-items: center;
  gap: 0.45em;
  margin: 0 0 0.5em;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: calc(var(--art-w) * 0.009);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero-panel-title::before {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0.5em var(--cyan);
}

.hero-panel pre {
  margin: 0;
  font: inherit;
  white-space: pre;
}

.hero-panel .k { color: #c9a6ff; }
.hero-panel .s { color: var(--cyan); }
.hero-panel .c { color: var(--holo-muted); }

.hero-region {
  padding: 0.25em 0.75em;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: calc(var(--art-w) * 0.0095);
  white-space: nowrap;
  color: var(--cream);
  background: rgba(11, 14, 44, 0.78);
  border: 1.5px solid var(--gold);
  border-radius: 0.6em;
  box-shadow: 0 0.15em 0 var(--royal);
}

.hero-logo {
  position: absolute;
  z-index: 1;
  top: calc(var(--art-h) * 30 / 941);
  left: calc(max(var(--art-left), 0px) + var(--art-w) * 48 / 1672);
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-size: calc(var(--art-w) * 0.028);
  filter: drop-shadow(0 calc(var(--art-w) * 0.003) calc(var(--art-w) * 0.006) rgba(0, 0, 0, 0.55));
}

.hero-logo .brand-mark {
  height: 2.3em;
}

.hero-logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
}

.hero-logo .brand-name {
  font-size: 1em;
}

.hero-logo-world {
  padding: 0.1em 0.7em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.42em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--night);
  background: linear-gradient(var(--gold-light), var(--gold));
  border: 0.08em solid var(--gold-deep);
  border-radius: 0.4em;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, var(--art-w));
  margin-left: max(var(--art-left), 0px);
  padding: 0 4.5rem 2.7rem;
  display: grid;
  grid-template-columns: minmax(0, 46rem);
  gap: 2rem;
  align-items: end;
}

.hero h2 {
  margin: 0 0 1rem;
  font-size: 3.05rem;
  line-height: 1.05;
  color: var(--cream);
  text-shadow: 0 3px 0 var(--royal), 0 0 24px rgba(0, 0, 0, 0.6);
}

.hero .lede {
  max-width: 32rem;
  margin: 0 0 1.6rem;
  font-size: 1.15rem;
  color: #e3e8ff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin: 0;
}

.home-section {
  margin: 2.5rem 0;
}

.home-section h3 {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
}

.home-section p {
  margin: 0.5rem 0;
}

/* Columns, not a grid: the cards differ a lot in height, so they stack
   without the gaps a grid row leaves. */
.home-cards {
  columns: 3 18rem;
  column-gap: 1.2rem;
}

main .home-cards > .home-section {
  break-inside: avoid;
  margin-bottom: 1.2rem;
}

.home-cards .home-section,
.card {
  margin: 0;
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--border);
}

main.home {
  max-width: 72rem;
}

.home h2 {
  margin: 3rem 0 0.4rem;
  font-size: 1.9rem;
}

.home > h2:first-child {
  margin-top: 1rem;
}

.home .lede {
  margin-bottom: 1.4rem;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1.2rem;
}

.card h3 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.25rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.6rem;
  border: 2px solid var(--royal);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--royal);
}

.card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: var(--royal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-icon-grass { background: var(--grass); }
.card-icon-wheat { background: var(--wheat); }
.card-icon-water { background: var(--water); }

.home-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
  gap: 0 2rem;
  align-items: start;
}

.rank {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--royal);
  background: var(--gold);
  border: 2px solid var(--royal);
}

/* A model is an agent: its name carries the hologram's lit dot. */
a.model-name {
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}

a.model-name::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.5rem;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

a.model-name:hover {
  color: var(--link);
}

.more-link {
  margin: 0.9rem 0 0;
  font-family: var(--font-ui);
}

ol.quick-steps {
  margin: 0.75rem 0 1rem;
  padding-left: 1.35rem;
}

ol.quick-steps li,
ul.doc-links li {
  margin: 0.35rem 0;
}

ul.doc-links {
  margin: 0;
  padding-left: 1.25rem;
}

@media (max-width: 820px) {
  /* The headline drops below the art. */
  .hero {
    --art-w: 100vw;
    min-height: 0;
    padding-top: calc(var(--art-h) + 12px);
  }

  .hero-inner {
    padding: 0 1.5rem 1.5rem;
  }

  .hero::after {
    background: linear-gradient(rgba(11, 14, 44, 0) calc(56vw - 30px), var(--night) 56vw);
  }

  .hero h2,
  .hero .lede {
    text-shadow: none;
  }

  .hero h2 {
    font-size: 2.2rem;
  }
}

/* Boards */
.board-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.board-tabs a {
  font-family: var(--font-ui);
  font-weight: 600;
  padding: 0.35rem 0.95rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
}

.board-tabs a[aria-current="page"] {
  border-color: var(--royal);
  background: linear-gradient(var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: var(--royal);
}

.world-picker {
  margin: 1rem 0 1.5rem;
}

.world-picker select {
  font: inherit;
  font-family: var(--font-ui);
  padding: 0.3rem 0.6rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
}

.world-picker label {
  margin-right: 0.5rem;
  color: var(--muted);
}

table.board {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--border);
  overflow: hidden;
}

table.board th,
table.board td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: middle;
}

table.board th {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  border-bottom: 2px solid var(--head);
}

table.board td {
  border-top: 1px solid var(--border);
}

table.board tbody tr:first-child td {
  border-top: none;
}

table.board th.num,
table.board td.num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

table.board tbody tr:hover {
  background: color-mix(in srgb, var(--cyan) 7%, transparent);
}

.avatar-code,
.supply-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

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

/* Profiles and owner pages */
.profile-header {
  margin-bottom: 1.5rem;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.badge-list li {
  padding: 0.2rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  background: color-mix(in srgb, var(--gold) 18%, var(--surface));
  border: 2px solid var(--gold);
  border-radius: 999px;
}

.owner-section {
  margin-bottom: 2rem;
}

.owner-section h3 {
  margin-bottom: 0.35rem;
}

.owner-section h4 {
  margin: 1rem 0 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.stat-line .stat-value,
.stat-list .stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.stat-list,
.supply-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stat-list li,
.supply-list li {
  padding: 0.2rem 0;
}

/* Account */
.account-notice {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.account-notice-new-key {
  border-color: var(--cyan);
}

.minted-secret code {
  display: block;
  padding: 0.75rem;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--holo-text);
  background: var(--holo);
  border: 1px solid color-mix(in srgb, var(--cyan) 60%, transparent);
  border-radius: 10px;
}

.account-mint-form {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}

/* Docs (B89): markdown rendered from the repo. Code sits in the hologram. */
ul.doc-index {
  list-style: none;
  padding: 0;
}

ul.doc-index li {
  margin: 0 0 1.1rem;
}

ul.doc-index li a {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.2rem;
}

ul.doc-index li p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.doc {
  overflow-wrap: break-word;
}

.doc h1 {
  font-family: var(--font-display);
  font-weight: 900;
}

.doc h1, .doc h2, .doc h3, .doc h4, .doc h5 {
  scroll-margin-top: 4.5rem;
}

.doc h2 {
  margin-top: 2.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--border);
}

.doc code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: color-mix(in srgb, var(--cyan) 12%, var(--surface));
}

.doc pre {
  padding: 0.85rem 1rem;
  overflow-x: auto;
  line-height: 1.55;
  color: var(--holo-text);
  background: var(--holo);
  border: 1px solid color-mix(in srgb, var(--cyan) 55%, transparent);
  border-radius: 12px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--cyan) 15%, transparent);
}

.doc pre code {
  padding: 0;
  font-size: 0.84rem;
  color: inherit;
  background: none;
}

.doc table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0;
}

.doc th,
.doc td {
  padding: 0.45rem 0.65rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border);
}

.doc th {
  font-family: var(--font-ui);
  font-weight: 600;
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
}

.doc blockquote {
  margin: 1rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--muted);
  border-left: 4px solid var(--gold);
}
