/* Evenkeel docs. Same tokens as the app (web/public/css/v2.css). */
@font-face { font-family: "Inter"; src: url("/assets/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/GeistMono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #F3F4F4; --s1: #FFFFFF; --s2: #F7F8F8; --s3: #EDEFEF;
  --line: rgba(12,24,20,.08); --line-2: rgba(12,24,20,.13);
  --text: #0D0F0E; --text-2: #535B58; --text-3: #646C69;
  --accent: #0E6B5C; --accent-soft: rgba(14,107,92,.09); --logo: #101614;
  --warn: #8A5600; --warn-soft: rgba(186,120,0,.11); --info: #2457C5; --info-soft: rgba(36,87,197,.09);
  --grad: linear-gradient(180deg, #9AF6DB, #6BE8C4); --on-grad: #04130F; --btn-ring: #4FBFA4;
  --shadow-card: 0 1px 2px rgba(12,24,20,.06), 0 1px 1px rgba(12,24,20,.03);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0A0B0B; --s1: #131514; --s2: #1A1D1C; --s3: #222625;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.11);
  --text: #F2F4F3; --text-2: #A7AFAC; --text-3: #7F8784;
  --accent: #7DDFC6; --accent-soft: rgba(125,223,198,.12); --logo: #F5F4EF;
  --warn: #F5BA4B; --warn-soft: rgba(245,186,75,.12); --info: #82AAFF; --info-soft: rgba(130,170,255,.12);
  --btn-ring: rgba(92,207,178,.6);
  --shadow-card: inset 0 1px 0 rgba(255,255,255,.04), 0 1px 2px rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body { margin: 0; font: 400 15px/26px var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--s1); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--logo); text-decoration: none; flex-shrink: 0; min-width: 0; }
.brand .mk { height: 26px; width: auto; display: block; }
.brand .wm { height: 14px; width: auto; display: block; margin-right: 2px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); background: var(--s2); border: 1px solid var(--line); border-radius: 6px; margin-left: 4px; }
.top-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn { position: relative; flex-shrink: 0; width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--s1); color: var(--text-2); font: inherit; cursor: pointer; transition: background .15s ease-out, color .15s ease-out; -webkit-tap-highlight-color: transparent; }
.icon-btn::after { content: ""; position: absolute; inset: -2px; }
.icon-btn:hover { background: var(--s3); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 12px; border-radius: 10px; font: 520 13px/18px var(--font); letter-spacing: -.01em; white-space: nowrap; flex-shrink: 0; color: var(--text); background: var(--s1); border: 1px solid var(--line-2); text-decoration: none; box-shadow: var(--shadow-card); transition: background .15s ease-out, border-color .15s ease-out; }
.btn::after { content: ""; position: absolute; inset: -2px; }
.btn:hover { background: var(--s3); text-decoration: none; }
.btn .arr { color: var(--text-3); margin-left: 4px; }
.menu-btn { display: none; }
.side-t { display: none; }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.scrim { display: none; }

.shell { max-width: 1280px; margin: 0 auto; padding: 32px 24px 64px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 48px; }
.side { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.side a { color: var(--text-2); text-decoration: none; font-size: 14px; line-height: 20px; padding: 8px 12px; border-radius: 10px; transition: background .15s ease-out, color .15s ease-out; }
.side a:hover { background: var(--s1); color: var(--text); }
.side a[aria-current="page"] { background: var(--s1); color: var(--text); font-weight: 560; box-shadow: var(--shadow-card), 0 0 0 1px var(--line); }
.side .side-app { margin-top: 12px; border-top: 1px solid var(--line); border-radius: 0; padding-top: 16px; font-size: 13px; }
.toc { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.toc-t { margin: 0 0 6px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.toc a { color: var(--text-2); text-decoration: none; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); line-height: 18px; }
.toc a:hover, .toc a.on { color: var(--text); border-left-color: var(--accent); }

.doc { min-width: 0; max-width: 760px; }
.doc h1 { font-size: 40px; line-height: 46px; font-weight: 560; letter-spacing: -.025em; margin: 0 0 16px; }
.doc h2 { font-size: 24px; line-height: 30px; font-weight: 560; letter-spacing: -.015em; margin: 48px 0 12px; }
.doc h3 { font-size: 17px; line-height: 24px; font-weight: 560; margin: 28px 0 8px; }
.doc h1 + p { font-size: 17px; line-height: 28px; color: var(--text-2); }
.doc p, .doc ul { margin: 0 0 14px; color: var(--text); }
.doc ul { padding-left: 20px; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--text-3); }
.doc strong { font-weight: 600; }
.doc code { font: 13px/1 var(--mono); background: var(--s3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tk { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -2px; margin-right: 6px; }
h2 .tk { width: 20px; height: 20px; vertical-align: -3px; margin-right: 8px; }
.anchor { margin-left: 8px; color: var(--text-3); text-decoration: none; opacity: 0; transition: opacity .15s ease-out; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus-visible { opacity: 1; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--text-2); }

.callout { margin: 20px 0; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--s1); box-shadow: var(--shadow-card); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-t { font-weight: 600; margin-bottom: 6px !important; }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout.warn .callout-t { color: var(--warn); }
.callout.info { background: var(--info-soft); }

.table-wrap { margin: 16px 0 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--s1); box-shadow: var(--shadow-card); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 21px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-2); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--s2); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.addr code { white-space: nowrap; }
.addr { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.addr .ext { font-size: 12px; }
.copy { margin-left: 6px; font: 500 11px/1 var(--font); color: var(--text-2); background: var(--s2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; cursor: pointer; }
.copy:hover { color: var(--text); background: var(--s3); }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.pn { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--s1); text-decoration: none; color: var(--text); font-weight: 560; transition: border-color .15s ease-out, transform .15s ease-out; }
.pn span { font: 500 12px/1.4 var(--font); color: var(--text-2); }
.pn:hover { border-color: var(--accent); transform: translateY(-1px); }
.pn.next { grid-column: 2; text-align: right; }

.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 1280px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.foot-in p { margin: 0; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot nav a { color: var(--text-2); text-decoration: none; }
.foot nav a:hover { color: var(--text); }

@media (max-width: 1100px) { .shell { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; } .toc { display: none; } }
@media (max-width: 767px) {
  html { scroll-padding-top: 72px; }
  body { font-size: 15px; line-height: 25px; }
  .top-in { height: 56px; padding: 0 16px; gap: 8px; }
  .brand .mk { height: 24px; }
  .brand .wm { height: 12.4px; }
  .menu-btn { display: inline-grid; }
  .shell { display: block; padding: 20px 16px 40px; }
  /* drawer: a sheet under the header, over the page */
  .side { display: none; position: fixed; z-index: 19; top: 56px; left: 0; right: 0; max-height: calc(100dvh - 56px); overflow-y: auto; padding: 8px 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); gap: 0; }
  .side.open { display: flex; }
  .side-t { display: block; margin: 8px 12px 6px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .side a { font-size: 15px; line-height: 20px; padding: 10px 12px; min-height: 40px; }
  .side a[aria-current="page"] { box-shadow: none; background: var(--s1); border: 1px solid var(--line); }
  .side .side-app { margin-top: 8px; padding-top: 14px; font-size: 14px; color: var(--accent); }
  .scrim:not([hidden]) { display: block; position: fixed; inset: 56px 0 0; z-index: 18; background: rgba(0,0,0,.28); }
  body.menu-open { overflow: hidden; }
  .doc h1 { font-size: 28px; line-height: 34px; letter-spacing: -.02em; margin-bottom: 12px; }
  .doc h2 { font-size: 20px; line-height: 26px; margin: 32px 0 10px; }
  .doc h3 { font-size: 16px; line-height: 22px; margin: 22px 0 6px; }
  .doc h1 + p { font-size: 16px; line-height: 25px; }
  .doc code { font-size: 12.5px; padding: 1px 5px; }
  .eyebrow { font-size: 11px; }
  .callout { padding: 12px 14px; border-radius: 12px; margin: 16px 0; }
  .anchor { display: none; }
  table { font-size: 13.5px; line-height: 20px; }
  .table-wrap { overflow: visible; border-radius: 12px; margin: 12px 0 16px; }
  .table-wrap thead { display: none; }
  .table-wrap tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-wrap tr:last-child { border-bottom: 0; }
  .table-wrap td { display: block; padding: 0; border: 0; overflow-wrap: anywhere; }
  .table-wrap td:first-child { font-weight: 560; }
  .table-wrap td + td { margin-top: 8px; }
  .table-wrap td::before { content: attr(data-l); display: block; font: 500 11px/16px var(--font); color: var(--text-3); margin-bottom: 2px; }
  .table-wrap td:first-child::before { display: none; }
  .table-wrap td:empty { display: none; }
  .addr code { font-size: 12.5px; }
  .copy { position: relative; padding: 5px 8px; }
  .copy::after { content: ""; position: absolute; inset: -8px -4px; }
  .prevnext { grid-template-columns: 1fr; gap: 8px; margin-top: 40px; }
  .pn { padding: 12px 14px; border-radius: 12px; }
  .pn.next { grid-column: 1; }
  .foot-in { padding: 20px 16px 28px; flex-direction: column; gap: 12px; }
  .foot nav { gap: 6px 16px; }
}
@media (max-width: 399px) { .tag { display: none; } }
@media (max-width: 379px) { .btn-app { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
