/* Evenbead docs (docs.evenbead.com). Brand: brand/BRAND.md. Mobile first; light and dark from the system setting. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #14181a; --paper: #ffffff; --muted: #56615c; --line: #dfe4e1; --soft: #f4f6f5;
  --accent: #17684a; --accent-soft: #e4f1eb; --code: #f1f3f2; --warn: #7f5300;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f2f4f3; --paper: #14181a; --muted: #a6b0ab; --line: #2c3431; --soft: #1b2120;
    --accent: #6fcf9f; --accent-soft: #1b3229; --code: #1f2624; --warn: #f0b75a; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1rem;
  line-height: 1.6; color: var(--ink); background: var(--paper); }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible, pre:focus-visible, .table-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.skip { position: absolute; left: -999px; top: 0; display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--paper); padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; }

/* header */
.top { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 60px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand .logo { width: 28px; height: 28px; }
.brand small { font-weight: 500; color: var(--muted); font-size: .95rem; }
.top-links { margin-left: auto; display: flex; gap: 4px; }
.top-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.top-links a:hover { background: var(--soft); }

/* layout: menu on small screens, sidebar from 900px */
.layout { display: block; max-width: 1200px; margin: 0 auto; }
.menu { border-bottom: 1px solid var(--line); }
.menu summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; cursor: pointer; font-weight: 600; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.side { display: none; }
.nav-list { list-style: none; margin: 0; padding: 4px 8px 12px; }
.nav-list a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav-list a:hover { background: var(--soft); }
.nav-list a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-list .sub a { padding-left: 38px; font-size: .95rem; }
.nav-head { margin: 12px 18px 2px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
main { padding: 8px 16px 48px; min-width: 0; }
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; }
  .menu { display: none; }
  .side { display: block; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); padding-top: 8px; }
  main { padding: 16px 24px 64px 8px; }
}
article { max-width: 760px; }

/* content */
h1 { font-size: 1.9rem; line-height: 1.2; margin: 20px 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 36px 0 10px; padding-top: 4px; }
h3 { font-size: 1.1rem; margin: 28px 0 8px; }
h4 { font-size: 1rem; margin: 20px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 1.4em; }
li { margin: 4px 0; }
.lede { font-size: 1.1rem; color: var(--muted); }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .88em; background: var(--code); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; max-width: 100%; margin: 0 0 16px; font-size: .86rem; line-height: 1.5; }
pre code { background: none; padding: 0; overflow-wrap: normal; white-space: pre; }
.note { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 0 0 16px; }
.note p { margin: 0; }
.table-wrap { overflow-x: auto; max-width: 100%; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
thead th { background: var(--soft); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

/* cards on the home page */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; margin: 20px 0; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.cards a { display: block; min-height: 44px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.cards a:hover { border-color: var(--accent); }
.cards strong { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.cards span { display: block; color: var(--muted); font-size: .95rem; margin-top: 4px; }

/* reference */
.op { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 18px; }
.op h3 { margin: 0 0 6px; font-size: 1rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.op h3 code { font-size: .92rem; overflow-wrap: anywhere; }
.method { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.method.post { background: var(--soft); color: var(--warn); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .9rem; margin: 6px 0 8px; padding: 0; list-style: none; }
.facts li { margin: 0; }
.op dl { margin: 6px 0 0; font-size: .93rem; }
.op dt { font-weight: 600; margin-top: 8px; }
.op dd { margin: 2px 0 0; }
.op ul { margin: 2px 0 0; }
.op .id { font-size: .85rem; color: var(--muted); }
.ref-index { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .ref-index { grid-template-columns: 1fr 1fr; } }
.ref-index a { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.ref-index a:hover { border-color: var(--accent); }
.ref-index .count { color: var(--muted); font-size: .9rem; }
.toc { list-style: none; padding: 0; margin: 0 0 20px; }
.toc a { display: flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 16px; text-align: center; }
footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.op, .op p, .facts li, .op li { overflow-wrap: anywhere; min-width: 0; }
