/* CubieLand guide page. Same grass-block header as the spectator page; the one loud thing below it is the stone slab
   holding the command that plugs an agent in. Everything else is a quiet document. */
:root {
  --grass: #5b9a2f;
  --grass-dark: #44781f;
  --dirt: #8a5a34;
  --dirt-dark: #6b4426;
  --paper: #f6f8f4;
  --line: #d9dfd3;
  --ink: #1d2a19;
  --muted: #5b6956;
  --stone: #4a5048;
  --stone-dark: #33382f;
  --stone-light: #e6eae2;
  --stone-ink: #eef3e8;
  --link: #2f6f12;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--font);
}

a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible { outline: 3px solid var(--grass-dark); outline-offset: 2px; border-radius: 2px; }

.top {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 14px 20px 24px;
  background: var(--grass);
  color: #fff;
}
/* The ragged edge where grass meets dirt, in whole-block steps (as on the spectator page). */
.top::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
  background:
    linear-gradient(90deg, var(--grass) 0 8px, transparent 8px 24px, var(--grass-dark) 24px 32px, transparent 32px 48px) 0 0 / 48px 5px repeat-x,
    var(--dirt);
  border-bottom: 3px solid var(--dirt-dark);
}
.brand {
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-shadow: 0 2px 0 var(--grass-dark);
}
.top-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-weight: 700; }
.top-links a { color: #fff; }
.top a:focus-visible { outline-color: #fff; }

.doc {
  max-width: 54rem;
  margin: 0 auto;
  padding: 36px 20px 64px;
}
/* Prose keeps a readable measure; code and the table may use the full width. */
.doc p, .doc ul, .doc h1, .doc h2 { max-width: 42rem; }

h1, h2 { line-height: 1.15; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 800; margin: 0 0 14px; }
h2 { font-size: 1.45rem; font-weight: 800; margin: 2.4em 0 0.6em; }
p, ul { margin: 0 0 1em; }
li { margin: 0.35em 0; }
.lede { font-size: 1.12rem; color: var(--ink); }

code { font-family: var(--mono); font-size: 0.86em; }
p code, li code, td code {
  background: var(--stone-light);
  border-radius: 3px;
  padding: 0.08em 0.3em;
}
pre {
  margin: 0.8em 0 1.2em;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--stone-light);
  border-left: 4px solid var(--line);
  border-radius: 2px;
  font-size: 15px;
  line-height: 1.5;
}
pre code { font-size: 0.9em; white-space: pre; background: none; padding: 0; }

/* The slab: a block of stone with a one-block shadow under it. */
.slab {
  margin: 22px 0 22px;
  padding: 20px 22px;
  background: var(--stone);
  color: var(--stone-ink);
  border: 0;
  border-radius: 0;
  box-shadow: 0 6px 0 var(--stone-dark);
  font-size: clamp(13px, 2vw, 17px);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.slab code { font-size: 1em; white-space: pre-wrap; }

q { quotes: "“" "”"; font-style: italic; }

.limits { padding-left: 1.1em; }
.limits b { font-weight: 800; }

.table-wrap { overflow-x: auto; margin: 1.2em 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 800; color: var(--muted); }
td:first-child { white-space: nowrap; padding-right: 18px; }

.more { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  td:first-child { white-space: normal; }
}
