/* developers.openwaf.dev — OpenWAF brand tokens (apps/web/assets/css/site.css), docs layout of our own. */
@font-face { font-family: "Inter"; src: url(/fonts/inter-variable-ea94f85fc14285de.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans-variable-7bc27ab382f3c274.woff2) format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Inter fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; }

:root {
  --ink: #1a2030;
  --text: #333a4a;
  --muted: #5d6475;
  --page: #ffffff;
  --soft: #f5f6f8;
  --soft-2: #eceef2;
  --line: #e1e4ea;
  --line-2: #cfd4dd;
  --brand: #2456e8;
  --brand-hover: #1b45c4;
  --brand-ink: #1d47c7;
  --tint: #e8efff;
  --code-bg: #f5f6f8;
  --code-ink: #1a2030;
  --t-s: #0f6a3c;
  --t-n: #a1490a;
  --t-k: #7a33c8;
  --t-c: #6b7385;
  --t-p: #1d47c7;
  --t-v: #9a3412;
  --note: #2456e8; --note-bg: #eef3ff;
  --tip: #1f7a4a; --tip-bg: #ebf7f0;
  --caution: #a15c00; --caution-bg: #fdf5e6;
  --danger: #b42318; --danger-bg: #fdeeec;
  --mark: #fff0a8;
  --fuente: "Inter", "Inter fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --titulos: "Instrument Sans", "Inter", "Inter fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --top: 60px;
  --side: 272px;
  --tocw: 224px;
  --radius: 10px;
  --card: #ffffff;
  --sombra: 0 8px 24px -8px rgb(10 20 40 / .14), 0 0 0 1px rgb(96 106 128 / .14);
  color-scheme: light;
}
/* Dark theme = the dashboard's (apps/dash/src/styles/app.css): zinc black #09090b page, #121214 / #18181b surfaces,
   white hairlines, cobalt #2456e8 kept for primary buttons and active marks, links at cobalt 50 % + white. Same
   tokens in both blocks: explicit choice, or the system preference when nothing is saved. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #fafafa; --text: #d4d4d8; --muted: #a1a1aa; --page: #09090b; --card: #121214; --soft: #121214; --soft-2: #18181b;
    --line: rgb(255 255 255 / .08); --line-2: rgb(255 255 255 / .14);
    --brand: #2456e8; --brand-hover: color-mix(in srgb, #2456e8 84%, #000); --brand-ink: color-mix(in srgb, #2456e8 50%, #fff);
    --tint: color-mix(in srgb, #2456e8 20%, #121214);
    --code-bg: #121214; --code-ink: #e4e4e7; --t-s: #8bd5a6; --t-n: #f5b27a; --t-k: #c7a4ff; --t-c: #8a8a93;
    --t-p: color-mix(in srgb, #2456e8 50%, #fff); --t-v: #f5a97a;
    --note: color-mix(in srgb, #2456e8 50%, #fff); --note-bg: color-mix(in srgb, #2456e8 20%, #121214);
    --tip: #5fd39a; --tip-bg: rgb(46 160 100 / .16); --caution: #f2c063; --caution-bg: rgb(220 160 40 / .16);
    --danger: #ff8a80; --danger-bg: rgb(230 70 60 / .16); --mark: rgb(242 192 99 / .3);
    --sombra: 0 12px 32px -8px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 255 255 / .14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #fafafa; --text: #d4d4d8; --muted: #a1a1aa; --page: #09090b; --card: #121214; --soft: #121214; --soft-2: #18181b;
  --line: rgb(255 255 255 / .08); --line-2: rgb(255 255 255 / .14);
  --brand: #2456e8; --brand-hover: color-mix(in srgb, #2456e8 84%, #000); --brand-ink: color-mix(in srgb, #2456e8 50%, #fff);
  --tint: color-mix(in srgb, #2456e8 20%, #121214);
  --code-bg: #121214; --code-ink: #e4e4e7; --t-s: #8bd5a6; --t-n: #f5b27a; --t-k: #c7a4ff; --t-c: #8a8a93;
  --t-p: color-mix(in srgb, #2456e8 50%, #fff); --t-v: #f5a97a;
  --note: color-mix(in srgb, #2456e8 50%, #fff); --note-bg: color-mix(in srgb, #2456e8 20%, #121214);
  --tip: #5fd39a; --tip-bg: rgb(46 160 100 / .16); --caution: #f2c063; --caution-bg: rgb(220 160 40 / .16);
  --danger: #ff8a80; --danger-bg: rgb(230 70 60 / .16); --mark: rgb(242 192 99 / .3);
  --sombra: 0 12px 32px -8px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 255 255 / .14);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; background: var(--page); color: var(--text); font: 460 16px/1.65 var(--fuente); -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 8px; color: #fff; }
kbd, .kbd { font: 500 12px/1 var(--fuente); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; color: var(--muted); background: var(--page); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 550; font-size: 14px; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-prim { background: var(--brand); color: #fff; }
.btn-prim:hover { background: var(--brand-hover); color: #fff; }
.btn-ghost { background: var(--page); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--soft); color: var(--ink); }
.btn-s { height: 32px; padding: 0 12px; font-size: 13px; }
.btn .ico { width: 16px; height: 16px; }
.btn.done { border-color: var(--tip); color: var(--tip); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; font-size: 12px; font-weight: 600; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn .gh { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Header */
.top { position: sticky; top: 0; z-index: 40; height: var(--top); background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { height: 100%; display: flex; align-items: center; gap: 16px; padding: 0 20px; max-width: 1600px; margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.marca { width: 26px; height: 26px; }
.marca .mk-l { fill: var(--brand); }
.marca .mk-r { fill: var(--brand); opacity: .72; }
.logo-w { font: 700 16px/1 var(--titulos); letter-spacing: .06em; }
.logo-d { font: 500 15px/1 var(--titulos); color: var(--muted); padding-left: 8px; border-left: 1px solid var(--line-2); }
.top-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.top-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }
.top-nav a:hover, .top-nav a[aria-current] { background: var(--soft); color: var(--ink); }
.search-btn { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; max-width: 420px; height: 38px; padding: 0 8px 0 12px; margin-left: auto; border: 1px solid var(--line-2); border-radius: 10px; background: var(--soft); color: var(--muted); cursor: pointer; text-align: left; }
.search-btn:hover { border-color: var(--brand); }
.search-ph { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-tools { display: flex; align-items: center; gap: 4px; }
.top-tools .btn { margin-left: 4px; }
.theme .i-sun { display: none; }
.theme[aria-pressed="true"] .i-sun { display: block; }
.theme[aria-pressed="true"] .i-moon { display: none; }
.nav-toggle { display: none; }

/* Frame: sidebar + main (content + toc) */
.frame { display: flex; max-width: 1600px; margin: 0 auto; min-height: calc(100vh - var(--top)); }
.side { flex: 0 0 var(--side); border-right: 1px solid var(--line); }
.side-in { position: sticky; top: var(--top); max-height: calc(100vh - var(--top)); overflow-y: auto; padding: 20px 14px 40px; overscroll-behavior: contain; scrollbar-width: thin; }
.side-h { margin: 0 8px 8px; font: 600 12px/1.4 var(--fuente); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side-cat { margin: 14px 8px 4px; font: 600 12px/1.4 var(--fuente); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list a { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.4; }
.side-list a:hover { background: var(--soft); color: var(--ink); }
.side-list a[aria-current="page"] { background: var(--tint); color: var(--brand-ink); font-weight: 600; }
.side-list .ico { width: 16px; height: 16px; color: var(--muted); }
.side-list .badge { margin-left: auto; }
.side-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 6px 12px; font-size: 13px; color: var(--muted); text-decoration: none; }
.side-back .ico { width: 14px; height: 14px; }
.side-prod { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; padding: 6px; color: var(--ink); text-decoration: none; font: 500 17px/1.3 var(--titulos); letter-spacing: -.01em; }
.side-prod .ico { width: 22px; height: 22px; padding: 4px; box-sizing: content-box; border-radius: 8px; background: var(--tint); color: var(--brand-ink); }
.side-group { margin-top: 6px; }
.side-group summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.side-group[open] summary::after { transform: rotate(45deg); }
.side-group summary:hover { background: var(--soft); }
.side-group .side-list { padding-left: 8px; margin-left: 10px; border-left: 1px solid var(--line); }
.side-group + .side-list { margin-top: 6px; }
.side-group + .side-list a { font-weight: 600; color: var(--ink); font-size: 13px; }
.side-group + .side-list a[aria-current="page"] { color: var(--brand-ink); }

.main { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; gap: 48px; padding: 32px 40px 64px; }
.content { flex: 1 1 auto; min-width: 0; max-width: 780px; }
.toc-col { flex: 0 0 var(--tocw); }
.toc { position: sticky; top: calc(var(--top) + 28px); max-height: calc(100vh - var(--top) - 56px); overflow-y: auto; font-size: 13px; scrollbar-width: thin; }
.toc-h { margin: 0 0 8px; font-weight: 600; color: var(--ink); font-size: 13px; }
.toc ul, .toc-m ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a, .toc-m a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--brand-ink); border-left-color: var(--brand); font-weight: 550; }
.toc .toc-l3 a, .toc-m .toc-l3 a { padding-left: 24px; }
.toc code { font-size: 12px; }
.toc-m { display: none; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; font-size: 14px; }
.toc-m summary { padding: 10px 0; cursor: pointer; font-weight: 600; color: var(--ink); }
.toc-m ul { margin-bottom: 12px; }

/* Page head */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-ink); text-decoration: underline; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
/* Same title voice as openwaf.dev (.in-hero h1, .prosa h1: Instrument Sans 460, -0.0275em, 1.2). */
h1 { margin: 0; font: 460 clamp(28px, 3.2vw, 36px)/1.2 var(--titulos); color: var(--ink); letter-spacing: -.0275em; }
h1 .badge { vertical-align: middle; margin-left: 10px; font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.lead { margin: 12px 0 28px; font-size: 18px; line-height: 1.55; color: var(--muted); }

/* Prose */
.prose { color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { position: relative; color: var(--ink); font-family: var(--titulos); }
.prose h2 { margin: 44px 0 12px; font-size: 25px; font-weight: 460; line-height: 1.2; letter-spacing: -.0275em; padding-top: 8px; border-top: 1px solid var(--line); }
.prose h3 { margin: 32px 0 8px; font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.prose h4 { margin: 24px 0 6px; font-size: 16px; font-weight: 600; }
.anchor { position: absolute; left: -22px; padding-right: 6px; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: 1; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose li > p { margin-bottom: 8px; }
.prose li > ul, .prose li > ol { margin: 6px 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.prose a.ext::after { content: "↗"; font-size: .8em; margin-left: 2px; }
code { font: 500 .875em/1.5 var(--mono); background: var(--soft-2); color: var(--ink); padding: .12em .38em; border-radius: 5px; overflow-wrap: anywhere; }
a code { color: inherit; }

/* Code blocks */
.code { position: relative; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 0 6px 0 14px; border-bottom: 1px solid var(--line); background: var(--soft-2); }
.code-title { font: 500 13px/1.3 var(--mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.6 var(--mono); color: var(--code-ink); tab-size: 2; }
.code pre code { background: none; padding: 0; font: inherit; color: inherit; overflow-wrap: normal; }
.copy-btn { height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--page); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.copy-btn:hover { color: var(--ink); border-color: var(--brand); }
.copy-btn.done { color: var(--tip); border-color: var(--tip); }
.code > .copy-btn { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; }
.code:hover > .copy-btn, .code > .copy-btn:focus-visible, .code > .copy-btn.done { opacity: 1; }
@media (hover: none) { .code > .copy-btn { opacity: 1; } }
.t-s { color: var(--t-s); } .t-n { color: var(--t-n); } .t-k { color: var(--t-k); } .t-c { color: var(--t-c); font-style: italic; } .t-p { color: var(--t-p); } .t-v { color: var(--t-v); }

/* Tables */
.table-wrap { margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--soft); color: var(--ink); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td code { font-size: 12.5px; white-space: nowrap; }
td:first-child code { white-space: nowrap; }
.a-right { text-align: right; } .a-center { text-align: center; }

/* Callouts */
.callout { margin: 0 0 20px; padding: 12px 16px; border: 1px solid; border-left-width: 4px; border-radius: 8px; }
.callout-title { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-weight: 600; font-size: 14px; line-height: 1.5; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body { font-size: 15px; }
.callout-note { border-color: color-mix(in srgb, var(--note) 35%, transparent); border-left-color: var(--note); background: var(--note-bg); }
.callout-note .callout-title { color: var(--note); }
.callout-tip { border-color: color-mix(in srgb, var(--tip) 35%, transparent); border-left-color: var(--tip); background: var(--tip-bg); }
.callout-tip .callout-title { color: var(--tip); }
.callout-caution { border-color: color-mix(in srgb, var(--caution) 35%, transparent); border-left-color: var(--caution); background: var(--caution-bg); }
.callout-caution .callout-title { color: var(--caution); }
.callout-danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); border-left-color: var(--danger); background: var(--danger-bg); }
.callout-danger .callout-title { color: var(--danger); }
.callout .code { background: var(--page); }

/* Tabs */
.tabs { margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.tablist { display: flex; gap: 2px; overflow-x: auto; padding: 0 8px; border-bottom: 1px solid var(--line); background: var(--soft); border-radius: var(--radius) var(--radius) 0 0; }
.tablist [role="tab"] { padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font-size: 14px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.tablist [role="tab"]:hover { color: var(--ink); }
.tablist [role="tab"][aria-selected="true"] { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tabs [role="tabpanel"] { padding: 16px 16px 0; }
.tabs [role="tabpanel"] > :last-child { margin-bottom: 16px; }

/* Steps */
.steps > ol { list-style: none; counter-reset: step; padding-left: 0; }
.steps > ol > li { counter-increment: step; position: relative; padding: 0 0 8px 44px; margin: 0; }
.steps > ol > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--brand-ink); font: 600 14px/28px var(--fuente); text-align: center; }
.steps > ol > li::after { content: ""; position: absolute; left: 13.5px; top: 34px; bottom: 4px; width: 1px; background: var(--line-2); }
.steps > ol > li:last-child::after { display: none; }
.steps > ol > li > :first-child { margin-top: 2px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 0 0 24px; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--brand); box-shadow: var(--sombra); color: var(--text); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-weight: 600; font-size: 15px; }
.card-desc { font-size: 14px; line-height: 1.5; color: var(--muted); }
.card-arrow { width: 16px; height: 16px; color: var(--muted); }
.card:hover .card-arrow { color: var(--brand); }
.card-ico { width: 22px; height: 22px; padding: 6px; box-sizing: content-box; border-radius: 9px; background: var(--tint); color: var(--brand-ink); margin-bottom: 4px; }

/* Details */
.details { margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.details summary { padding: 12px 16px; cursor: pointer; font-weight: 600; color: var(--ink); }
.details-body { padding: 0 16px 4px; }

/* Badges */
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 600 11px/18px var(--fuente); letter-spacing: .02em; vertical-align: middle; background: var(--soft-2); color: var(--muted); white-space: nowrap; }
.badge-beta { background: var(--note-bg); color: var(--note); }
.badge-new { background: var(--tip-bg); color: var(--tip); }
.badge-deprecated, .badge-destructive { background: var(--danger-bg); color: var(--danger); }
.badge-admin, .badge-owner, .badge-tech, .badge-readonly { background: var(--tint); color: var(--brand-ink); }

/* Page foot */
.page-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.feedback p { margin: 0; }
.feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fb-btns { display: flex; gap: 6px; }
.updated { margin: 0; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.pn a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pn a:hover { border-color: var(--brand); }
.pn-next { grid-column: 2; text-align: right; align-items: flex-end; }
.pn-k { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.pn-k .ico { width: 14px; height: 14px; }
.pn-t { color: var(--ink); font-weight: 600; }

/* Home */
.main-home { padding-top: 40px; }
.home { width: 100%; max-width: 1080px; }
.hero { padding: 24px 0 36px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 48px); max-width: 18em; }
.hero .lead { max-width: 40em; }
.search-big { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; height: 52px; padding: 0 12px 0 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--page); color: var(--muted); font-size: 16px; cursor: pointer; box-shadow: var(--sombra); }
.search-big span { flex: 1; text-align: left; }
.search-big:hover { border-color: var(--brand); }
.home h2 { margin: 36px 0 14px; font: 460 22px/1.27 var(--titulos); letter-spacing: -.025em; color: var(--ink); }
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.dir-cat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px 8px; }
.dir-cat h3 { margin: 0 8px 6px; font: 600 12px/1.3 var(--fuente); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dir-cat ul { list-style: none; margin: 0; padding: 0; }
.dir-item { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--text); }
.dir-item:hover { background: var(--soft); color: var(--text); }
.dir-item .card-ico { grid-row: span 2; margin: 0; width: 18px; height: 18px; }
.dir-name { color: var(--ink); font-weight: 600; font-size: 15px; }
.dir-desc { font-size: 13px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 901px) { .home-page .side { display: none; } }
.card-prod, .card-start { min-height: 100%; }
.latest-list { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--line); }
.latest-list li { display: flex; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.latest-list time { flex: 0 0 150px; color: var(--muted); font-size: 14px; }

/* Changelog */
.cl-e { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.cl-d { margin: 0; font-size: 14px; color: var(--muted); padding-top: 4px; }
.cl-b h2 { margin: 0 0 8px; font: 460 21px/1.3 var(--titulos); letter-spacing: -.025em; }
.cl-b h2 a { color: var(--ink); text-decoration: none; }
.cl-b h2 a:hover { color: var(--brand-ink); }
.cl-tags, .cl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.cl-meta time { margin-right: 8px; }
.tag { display: inline-block; padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; font-weight: 550; color: var(--text); text-decoration: none; }
.tag:hover { border-color: var(--brand); color: var(--brand-ink); }

/* Search */
dialog.search { width: min(680px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 80px)); margin: 64px auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .45); overflow: hidden; }
dialog.search[open] { display: flex; flex-direction: column; }
dialog.search::backdrop { background: rgb(8 12 24 / .45); backdrop-filter: blur(2px); }
.search-form { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; color: var(--ink); font: 17px var(--fuente); outline: none; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-results { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 8px; }
.search-results:empty { padding: 0; }
.search-results li a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.search-results li[aria-selected="true"] a, .search-results li a:hover { background: var(--tint); }
.sr-p { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sr-t { color: var(--ink); font-weight: 600; }
.sr-h { color: var(--brand-ink); font-weight: 550; }
.sr-x { font-size: 13px; color: var(--muted); line-height: 1.45; }
.sr-none { padding: 18px 12px; color: var(--muted); }
mark { background: var(--mark); color: inherit; border-radius: 2px; }
.search-foot { display: flex; gap: 16px; margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.search-foot kbd { margin-right: 2px; }
.search-page { margin-bottom: 16px; }
.search-page .search-input { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 14px; background: var(--page); }
.search-results-page { padding: 0; }

/* 404 */
.nf { padding-top: 40px; }
.nf-code { margin: 0; font: 460 64px/1 var(--titulos); letter-spacing: -.0275em; color: var(--brand); }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--soft); font-size: 14px; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; max-width: 1280px; margin: 0 auto; padding: 40px 24px 16px; }
.foot-brand p { color: var(--muted); max-width: 30em; }
.foot-h { margin: 0 0 8px; font-weight: 600; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 6px 0; }
.foot a:not(.logo) { color: var(--text); text-decoration: none; }
.foot a:not(.logo):hover { color: var(--brand-ink); text-decoration: underline; }
.foot-copy { max-width: 1280px; margin: 0 auto; padding: 8px 24px 32px; color: var(--muted); }

.scrim { display: none; }
.side-mnav { display: none; list-style: none; margin: 0 0 16px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.side-mnav a:not(.btn) { display: block; padding: 6px 10px; border-radius: 7px; color: var(--ink); font-weight: 550; text-decoration: none; }
.side-mnav a:not(.btn):hover { background: var(--soft); }
.side-mbtns { display: flex; gap: 8px; padding: 8px 10px 0; }

/* Responsive */
@media (max-width: 1240px) {
  .toc-col { display: none; }
  .toc-m { display: block; }
  .main { padding: 28px 32px 56px; }
  .hide-s { display: none; }
}
@media (max-width: 1000px) {
  .top-nav { display: none; }
  .side-mnav { display: block; }
  .side-mbtns { display: none; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; margin-left: -8px; }
  .side { position: fixed; z-index: 45; top: var(--top); bottom: 0; left: 0; width: min(320px, 86vw); background: var(--page); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .2s ease; visibility: hidden; }
  .side-in { position: static; max-height: none; height: 100%; }
  .nav-open .side { transform: none; visibility: visible; box-shadow: var(--sombra); }
  .nav-open .scrim { display: block; position: fixed; inset: var(--top) 0 0 0; z-index: 44; background: rgb(8 12 24 / .4); }
  .main { padding: 24px 20px 48px; }
  .search-btn { flex: 0 0 auto; width: 36px; padding: 0; justify-content: center; border: 0; background: none; }
  .search-ph, .search-btn .kbd { display: none; }
  .top-in { gap: 8px; padding: 0 12px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .cl-e { grid-template-columns: 1fr; gap: 4px; }
  .anchor { display: none; }
}
@media (max-width: 520px) {
  .logo-d { display: none; }
  .lang span { display: none; }
  .top-tools .btn { display: none; }
  .side-mbtns { display: flex; }
  .lead { font-size: 17px; }
  .pn { grid-template-columns: 1fr; }
  .pn-next { grid-column: 1; }
  .latest-list li { flex-direction: column; gap: 2px; }
  .latest-list time { flex: none; }
  .page-actions .btn span { display: none; }
  .page-actions .btn { width: 32px; padding: 0; justify-content: center; }
  dialog.search { margin-top: 12px; max-height: calc(100vh - 24px); }
  .search-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .top, .side, .toc-col, .toc-m, .page-actions, .feedback, .pn, .foot, dialog { display: none !important; } .main { padding: 0; } }
