/* Brand tokens mirror seedworkslab.github.io/assets/css/styles.css.
   Keep the wiki's reading/navigation layout separate from the marketing layout. */
:root {
  color-scheme: light;
  --bg: #fbf9f4;
  --surface: #ffffff;
  --surface-2: #f3f0e9;
  --surface-3: #e9e4d9;
  --text: #1d1b18;
  --text-muted: #5f5b53;
  --outline: #d8d2c5;
  --primary: #3f6b3f;
  --primary-hover: #345a34;
  --on-primary: #ffffff;
  --primary-container: #d8efd6;
  --on-primary-container: #173a17;
  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 28px;
  --radius-xl: 36px;
  --shadow-1: 0 1px 2px rgba(29, 27, 24, .08), 0 1px 3px 1px rgba(29, 27, 24, .06);
  --font-sans: "Roboto", "Helvetica Neue", Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Roboto", "Helvetica Neue", Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-height: 72px;
  font-family: var(--font-sans);
  font-size: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #131412;
    --surface: #1c1d1a;
    --surface-2: #24251f;
    --surface-3: #2e2f28;
    --text: #e9e6df;
    --text-muted: #b1ada2;
    --outline: #3e3f36;
    --primary: #9ed49e;
    --primary-hover: #b4e2b4;
    --on-primary: #0b2b0b;
    --primary-container: #284828;
    --on-primary-container: #d8efd6;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px 1px rgba(0, 0, 0, .22);
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--primary-container); color: var(--on-primary-container); }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
button, input { font: inherit; }
button { cursor: pointer; }

.header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--outline);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 32px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.03em;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand img { display: block; width: 34px; height: 34px; }
.brand span { font-weight: 500; color: var(--text-muted); }
.header-label { font-size: 13px; color: var(--text-muted); border-left: 1px solid var(--outline); padding-left: 28px; }
.site-link {
  margin-left: auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.site-link:hover { background: var(--surface-2); color: var(--text); }

.layout { display: grid; grid-template-columns: 260px minmax(0, 800px) 210px; max-width: 1440px; margin: auto; justify-content: center; }
.sidebar {
  padding: 28px 22px;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow: auto;
  border-right: 1px solid var(--outline);
  font-size: 13px;
}
.search-shortcut {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
}
.search-shortcut:hover { background: var(--surface-2); }
kbd { font: 12px monospace; border: 1px solid var(--outline); padding: 0 6px; border-radius: 4px; }
.nav-group { margin-top: 25px; }
.nav-group h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .13em; color: var(--text-muted); margin: 0 12px 8px; font-weight: 800; }
.nav-group a { display: block; color: var(--text-muted); padding: 6px 12px; text-decoration: none; border-radius: 999px; line-height: 1.6; margin: 2px 0; font-weight: 500; }
.nav-group a:hover { background: var(--surface-2); color: var(--text); }
.nav-group a[aria-current] { background: var(--primary-container); color: var(--on-primary-container); font-weight: 600; }
.nav-foot { font-size: 11px; color: var(--text-muted); margin: 32px 12px; }

main { padding: 48px 48px 24px; min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; text-transform: uppercase; font-size: .78rem; letter-spacing: .13em; color: var(--primary); font-weight: 800; }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
h1, article h2, article h3 { font-family: var(--font-display); font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(32px, 3.5vw, 46px); line-height: 1.12; letter-spacing: -.035em; margin: 18px 0 20px; }
.lead { font-size: 18px; line-height: 1.65; color: var(--text-muted); margin: 0 0 24px; text-wrap: pretty; }
.page-meta { font-size: 11px; color: var(--text-muted); border-bottom: 1px solid var(--outline); padding-bottom: 22px; }
.page-meta span { padding: 0 8px; }
article h2 { font-size: 26px; letter-spacing: -.035em; line-height: 1.25; margin: 44px 0 18px; }
article h3 { font-size: 19px; letter-spacing: -.02em; line-height: 1.35; margin: 30px 0 14px; }
article p, article ul, article ol { font-size: 15px; }
article li { margin: 6px 0; }
article ul, article ol { padding-left: 24px; }
strong { font-weight: 700; }
.anchor { font-size: 16px; margin-left: 10px; opacity: 0; text-decoration: none; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
code { font: .84em ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--surface-2); padding: 3px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { padding: 20px; border: 1px solid var(--outline); border-radius: var(--radius-m); background: var(--surface-2); overflow: auto; line-height: 1.7; font-size: 13px; }
pre code { padding: 0; white-space: pre; overflow-wrap: normal; }
table { display: block; overflow: auto; border-collapse: separate; border-spacing: 0; max-width: 100%; font-size: 13px; line-height: 1.65; margin: 24px 0; border: 1px solid var(--outline); border-radius: var(--radius-m); background: var(--surface); }
th, td { border-right: 1px solid var(--outline); border-bottom: 1px solid var(--outline); padding: 12px 14px; text-align: left; min-width: 125px; vertical-align: top; }
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface-2); font-weight: 700; }
blockquote { background: var(--primary-container); color: var(--on-primary-container); border-left: 3px solid var(--primary); margin: 24px 0; padding: 8px 20px; border-radius: 0 var(--radius-m) var(--radius-m) 0; }
blockquote a { color: inherit; }
blockquote code { background: color-mix(in srgb, var(--surface) 50%, transparent); }
blockquote p { font-size: 14px; }
.source-link { font-size: .94em; }

.toc { position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); overflow: auto; padding: 46px 18px 24px; font-size: 12px; }
.toc > p { font-size: 10px; font-weight: 800; letter-spacing: .13em; color: var(--text-muted); margin: 0 0 14px; }
.toc nav a { display: block; color: var(--text-muted); text-decoration: none; line-height: 1.6; margin: 10px 0; }
.toc nav a:hover { color: var(--primary); }
.toc nav .level-3 { padding-left: 12px; font-size: 11px; }
.top-link { display: block; border-top: 1px solid var(--outline); margin-top: 22px; padding-top: 14px; text-decoration: none; }
.page-nav { border-top: 1px solid var(--outline); display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 22px; font-size: 12px; }
.page-nav a { max-width: 50%; text-decoration: none; border-radius: var(--radius-s); padding: 10px 12px; background: var(--surface-2); }
.page-nav a:hover { background: var(--primary-container); color: var(--on-primary-container); }
footer { font-size: 11px; color: var(--text-muted); margin: 42px 0 12px; }
footer a { color: var(--text-muted); }
.skip { position: fixed; top: -100px; left: 16px; z-index: 10; background: var(--primary); color: var(--on-primary); border-radius: var(--radius-s); padding: 10px 20px; font-weight: 700; }
.skip:focus { top: 10px; }
.menu-button { display: none; }
label { display: block; margin: 24px 0 8px; font-size: 14px; }
input[type=search] { width: 100%; padding: 14px 18px; background: var(--surface); color: var(--text); border: 1px solid var(--outline); border-radius: 999px; }
#search-status { font-size: 13px; color: var(--text-muted); }
.search-result { padding: 22px; margin: 16px 0; border: 1px solid var(--outline); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-1); }
.search-result a { font-weight: 700; }
.search-result p { font-size: 14px; margin-bottom: 0; color: var(--text-muted); }

@media (min-width: 1500px) {
  main { padding-left: 64px; padding-right: 64px; }
}
@media (max-width: 1150px) {
  .layout { grid-template-columns: 240px minmax(0, 800px); }
  .toc { display: none; }
  main { padding: 40px 36px; }
}
@media (max-width: 760px) {
  :root { --header-height: 64px; }
  .header { padding: 0 18px; gap: 12px; }
  .header-label, .site-link { display: none; }
  .brand { font-size: 1.1rem; }
  .js .menu-button { display: block; margin-left: auto; background: var(--primary-container); color: var(--on-primary-container); border: 0; border-radius: 999px; padding: 9px 14px; font-size: 12px; font-weight: 600; }
  .layout { display: block; }
  .sidebar { position: static; width: auto; height: auto; border-bottom: 1px solid var(--outline); }
  .js .sidebar { display: none; position: fixed; top: var(--header-height); bottom: 0; left: 0; width: min(340px, 90vw); height: calc(100dvh - var(--header-height)); z-index: 4; background: var(--bg); box-shadow: 16px 0 36px #0003; padding-bottom: 45px; border-radius: 0 var(--radius-l) var(--radius-l) 0; }
  .js .sidebar.is-open { display: block; }
  main { padding: 30px 22px; }
  .lead { font-size: 16px; }
  article h2 { font-size: 23px; }
  .page-nav { font-size: 11px; }
  th, td { padding: 9px; }
}
@media (max-width: 380px) {
  .brand { font-size: 1rem; }
  .brand span { display: none; }
}
@media print {
  .header, .sidebar, .toc, .page-nav, .anchor { display: none; }
  .layout { display: block; }
  main { padding: 0; }
  body { background: #fff; color: #000; }
  a { color: inherit; }
  pre, table { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}
