/* Mercado Phone — light design system (Stripe-docs-like).
   Used by the docs app (/) and the account console. The internal admin console
   keeps the dark system in app.css. Fonts: Instrument Sans + IBM Plex Mono. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-faint: #fafbfd;
  --ink: #0a2540;          /* headings, strong text */
  --body: #425466;         /* body text */
  --muted: #6b7c93;
  --faint: #8898aa;
  --ghost: #a3aec2;
  --brd: #e6e9f0;
  --brd-soft: #eef0f5;
  --brd-hover: #c9cede;
  --accent: #5b5bd6;
  --accent-ink: #4644c0;
  --accent-bg: #f0efff;
  --green: #31c48d;
  --green-ink: #0e7a4e;
  --green-bg: #e3f4ec;
  --blue-ink: #2450a8;
  --blue-bg: #e5edfb;
  --amber-ink: #9a5b13;
  --amber-bg: #fbf0e0;
  --red-ink: #b3261e;
  --red-bg: #fbe7e6;
  --code-bg: #0a2540;
  --code-fg: #e6edf6;
  --code-str: #7ee2b8;
  --code-key: #9db7d4;
  --code-num: #e8b464;
  --code-com: #8fa5bd;
  --grad: linear-gradient(135deg, #31c48d, #5b5bd6);
  --shadow-card: 0 2px 8px rgba(10, 37, 64, 0.06);
  --shadow-pop: 0 8px 28px rgba(10, 37, 64, 0.12);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--body);
  font-family: "Instrument Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #e3e2fb; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; }
p, li { text-wrap: pretty; }

/* =========================================================================
   Shell: 56px fixed header, sidebar + main with their own scroll (mock layout)
   ========================================================================= */
.shell { height: 100vh; display: flex; flex-direction: column; }
.shell-body { flex: 1; min-height: 0; display: flex; }

.topbar { height: 56px; flex: 0 0 auto; display: flex; align-items: center; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--brd); background: var(--bg); z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex: none; }
/* Novo.png is a light wordmark (made for dark backgrounds) — inverted to ink here */
.wordmark { height: 21px; width: auto; display: block; filter: invert(0.88); }
.brand .name { font-weight: 600; color: var(--ink); font-size: 15px; white-space: nowrap; }
.brand .sep { width: 1px; height: 18px; background: var(--brd); }
.brand .area { color: var(--muted); font-size: 14px; font-weight: 500; }
a.area-link { color: var(--muted); font-size: 14px; font-weight: 500; }
a.area-link:hover { color: var(--ink); text-decoration: none; }

.search-box { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--brd); border-radius: 8px; padding: 6px 12px; color: var(--faint); font-size: 13.5px; cursor: text; min-height: 34px; border-color: var(--brd); transition: border-color .12s; }
.search-box:hover { border-color: var(--brd-hover); }
.search-box kbd { margin-left: auto; font: 11.5px var(--mono); border: 1px solid #e0e4ec; border-radius: 4px; padding: 1px 5px; background: var(--bg); color: var(--faint); }

.topnav { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; }
.topnav a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 10px; color: var(--body); border-radius: 8px; transition: background .12s; }
.topnav a:hover { background: var(--bg-soft); text-decoration: none; }
.status-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; min-height: 40px; color: var(--muted); font-size: 13px; white-space: nowrap; cursor: default; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.status-dot.warn { background: #d97706; }
.status-dot.off { background: var(--ghost); }
/* uptime history popover (last 30 min, one bar per minute) */
.status-pop { position: absolute; top: calc(100% + 4px); right: 0; z-index: 55; width: 264px; background: var(--bg); border: 1px solid var(--brd); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 12px 14px; display: none; }
.status-pill:hover .status-pop, .status-pill:focus-within .status-pop { display: block; }
.status-pop .pop-title { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); white-space: normal; }
.status-bars { display: flex; gap: 3px; align-items: stretch; height: 26px; margin: 8px 0 7px; }
.status-bars .bar { flex: 1; border-radius: 2px; background: var(--green); }
.status-bars .bar.bad { background: #d97706; }
.status-bars .bar.na { background: var(--brd-soft); }
.status-pop .cap { font-size: 11.5px; color: var(--ghost); display: flex; justify-content: space-between; gap: 8px; }
.btn-outline { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px; color: var(--body); border: 1px solid #e0e4ec; border-radius: 6px; font-size: 13.5px; font-weight: 500; background: var(--bg); cursor: pointer; transition: border-color .12s, background .12s, transform .15s; }
.btn-outline:hover { border-color: var(--brd-hover); background: var(--bg-faint); text-decoration: none; color: var(--ink); }
.btn-outline:active { transform: scale(0.96); }

/* ---- sidebar ---- */
.sidebar { width: 264px; flex: 0 0 auto; overflow-y: auto; border-right: 1px solid var(--brd-soft); padding: 24px 16px 40px 20px; background: var(--bg); }
.nav-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.nav-group { margin-bottom: 22px; }
.nav-item { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; line-height: 1.5; color: var(--body); font-weight: 400; transition: background .12s, color .12s; }
.nav-item:hover { background: #f4f5f9; text-decoration: none; color: var(--body); }
.nav-item.active { color: var(--accent); font-weight: 600; background: var(--accent-bg); }
.sidebar-foot { margin-top: 32px; padding: 0 10px; font: 11.5px var(--mono); color: var(--ghost); }

/* ---- content column ---- */
main.content { flex: 1; min-width: 0; overflow-y: auto; background: var(--bg); }
.page { display: none; }
.page.active { display: block; }
.page-inner { max-width: 820px; margin: 0 auto; padding: 48px 56px 96px; }
.page-inner.narrow { max-width: 760px; }
.page-inner.wide { max-width: 1180px; padding: 48px 48px 96px; }

.eyebrow { font-size: 13px; font-weight: 500; color: var(--faint); margin-bottom: 8px; }
h1.title { font-size: 29px; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 12px; }
.lead { margin: 0 0 32px; font-size: 16.5px; color: var(--body); max-width: 620px; }
h2.sec { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
h2.step { margin: 24px 0 10px; font-size: 19px; font-weight: 600; }
.sec-sub { margin-bottom: 16px; color: var(--muted); font-size: 14px; }
strong { color: var(--ink); font-weight: 600; }

ol.steps, ul.plain { margin: 0 0 20px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }

/* ---- inline code + code panels ---- */
code { font: 13px var(--mono); background: #f2f4f8; border: 1px solid var(--brd); border-radius: 4px; padding: 1.5px 5px; color: var(--ink); }
pre.code { position: relative; margin: 0 0 24px; padding: 16px 20px; background: var(--code-bg); color: var(--code-fg); border-radius: 10px; font-family: var(--mono); font-size: 13px; line-height: 1.65; overflow-x: auto; }
.icon-btn.copy-code { position: absolute; top: 8px; right: 8px; color: var(--code-com); background: var(--code-bg); }
.icon-btn.copy-code:hover { background: rgba(255, 255, 255, 0.12); color: var(--code-fg); }
pre.code code, .code-panel pre code { all: unset; font: inherit; }
pre.code .s, .code-panel .s { color: var(--code-str); }
pre.code .k, .code-panel .k { color: var(--code-key); }
pre.code .n, .code-panel .n { color: var(--code-num); }
pre.code .c, .code-panel .c { color: var(--code-com); }

/* ---- cards / grids ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { border: 1px solid var(--brd); border-radius: 10px; padding: 20px 22px; background: var(--bg); transition: border-color .14s, box-shadow .14s; }
a.card, .card.click { cursor: pointer; }
a.card:hover, .card.click:hover { border-color: var(--brd-hover); box-shadow: var(--shadow-card); text-decoration: none; }
.card .tag { font: 12px var(--mono); display: inline-block; padding: 2px 8px; border-radius: 99px; margin-bottom: 10px; font-weight: 500; }
.tag.green { color: var(--green-ink); background: var(--green-bg); }
.tag.blue { color: var(--blue-ink); background: var(--blue-bg); }
.card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.card .mono-foot { margin-top: 12px; font: 12.5px var(--mono); color: var(--body); }
.card .count { margin-top: 10px; font: 12px var(--mono); color: var(--faint); }

.callout { border: 1px solid var(--brd); border-radius: 10px; padding: 14px 18px; margin: 0 0 28px; font-size: 14px; background: var(--bg-faint); }
.callout.warn { border-color: #f0dcb4; background: #fdf8ec; color: #7a5b12; }
.callout.info-mono { display: flex; flex-direction: column; gap: 6px; }
.callout .label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.callout .mono { font: 13px var(--mono); color: var(--ink); word-break: break-all; }

.quote { border: 1px solid var(--brd); border-left: 3px solid var(--green); border-radius: 8px; padding: 12px 16px; font-size: 14px; color: var(--ink); background: #fafdfb; }
.quote-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 32px; }

/* ---- table-card (rows in a bordered card) ---- */
.table-card { border: 1px solid var(--brd); border-radius: 10px; overflow: hidden; margin-bottom: 28px; }
.table-card .head { padding: 10px 18px; background: var(--bg-faint); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--brd-soft); }
.table-card .row { display: grid; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--brd-soft); font-size: 14px; }
.table-card .row:first-of-type { border-top: none; }
.table-card .row.cols-2a { grid-template-columns: 96px 1fr; }
.table-card .row.cols-2b { grid-template-columns: 170px 1fr; }
.table-card .mono-cell { font: 12.5px var(--mono); color: var(--body); line-height: 1.7; }
.table-card .code-cell { font: 13px var(--mono); color: var(--red-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.table-card .name-cell { font-weight: 600; color: var(--ink); }

/* =========================================================================
   Reference — every endpoint is an expandable block; several can stay open
   ========================================================================= */
.method-badge { font: 11.5px var(--mono); font-weight: 600; padding: 2px 8px; border-radius: 5px; min-width: 46px; text-align: center; display: inline-block; flex: none; }
.method-badge.get { color: var(--green-ink); background: var(--green-bg); }
.method-badge.post { color: var(--blue-ink); background: var(--blue-bg); }
.method-badge.put, .method-badge.patch { color: var(--amber-ink); background: var(--amber-bg); }
.method-badge.delete { color: var(--red-ink); background: var(--red-bg); }

.ref-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.lang-switch { display: flex; gap: 3px; background: var(--bg-soft); border: 1px solid var(--brd); border-radius: 8px; padding: 3px; flex-wrap: wrap; }
.lang-switch button { border: none; background: transparent; font: 12.5px var(--mono); min-height: 30px; padding: 0 10px; border-radius: 6px; color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.active { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-card); }

.op-list { display: flex; flex-direction: column; gap: 14px; }
.op-block { border: 1px solid var(--brd); border-radius: 10px; background: var(--bg); overflow: hidden; }
.op-block.highlight { border-color: var(--accent); }
.op-toggle { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 18px; background: var(--bg); border: none; cursor: pointer; font: inherit; text-align: left; transition: background .12s; }
.op-toggle:hover { background: var(--bg-faint); }
.op-toggle .chev { color: var(--ghost); transition: transform .15s; font-size: 17px; line-height: 1; flex: none; }
.op-block.open .op-toggle .chev { transform: rotate(90deg); }
.op-toggle .path { font: 13px var(--mono); color: var(--ink); font-weight: 500; }
.op-toggle .sum { margin-left: auto; font-size: 13px; color: var(--faint); text-align: right; }
.op-body { display: none; border-top: 1px solid var(--brd-soft); padding: 20px 18px; }
.op-block.open .op-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 24px; align-items: start; }
.op-code { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 1100px) { .op-block.open .op-body { grid-template-columns: 1fr; } }

.section-label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin: 0 0 6px; }

.param-list { border-top: 1px solid var(--brd); margin-bottom: 28px; }
.param-row { padding: 12px 2px; border-bottom: 1px solid var(--brd-soft); }
.param-row .line { display: flex; align-items: baseline; gap: 10px; margin-bottom: 2px; flex-wrap: wrap; }
.param-row .pname { font: 13px var(--mono); font-weight: 600; color: var(--ink); }
.param-row .ptype { font: 12px var(--mono); color: var(--faint); }
.param-row .preq { font-size: 12px; color: var(--ghost); }
.param-row .preq.required { color: var(--amber-ink); }
.param-row .pdesc { font-size: 13.5px; color: var(--muted); }

/* dark request/response panels */
.code-panel { background: var(--code-bg); border-radius: 12px; overflow: hidden; }
.code-panel .panel-head { display: flex; align-items: center; gap: 4px; padding: 10px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.code-panel .panel-title { font-size: 12px; color: var(--code-com); }
.code-panel pre { position: relative; margin: 0; padding: 16px 18px; color: var(--code-fg); font-family: var(--mono); font-size: 12.5px; line-height: 1.65; overflow-x: auto; }

/* ---- copy affordance (light + dark contexts) ---- */
.icon-btn { position: relative; background: transparent; border: none; color: var(--faint); cursor: pointer; width: 30px; height: 30px; border-radius: 8px; font-size: 16px; line-height: 1; transition: background .12s, color .12s, transform .15s; }
.icon-btn::after { content: ""; position: absolute; inset: -6px; } /* 42×42 hit area */
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn:active { transform: scale(0.96); }
.code-panel .icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--code-fg); }

.icon-swap { display: inline-grid; place-items: center; }
.icon-swap .ic { grid-area: 1 / 1; transition: opacity .3s cubic-bezier(0.2, 0, 0, 1), transform .3s cubic-bezier(0.2, 0, 0, 1), filter .3s cubic-bezier(0.2, 0, 0, 1); }
.icon-swap .ic.check { opacity: 0; transform: scale(0.25); filter: blur(4px); color: var(--green); }
.copied .icon-swap .ic:not(.check), .icon-swap.copied .ic:not(.check) { opacity: 0; transform: scale(0.25); filter: blur(4px); }
.copied .icon-swap .ic.check, .icon-swap.copied .ic.check { opacity: 1; transform: scale(1); filter: blur(0); }
/* Tabler variant used by the console */
.icon-swap .ti { grid-area: 1 / 1; transition: opacity .3s cubic-bezier(0.2, 0, 0, 1), transform .3s cubic-bezier(0.2, 0, 0, 1), filter .3s cubic-bezier(0.2, 0, 0, 1); }
.icon-swap .ti-check { opacity: 0; transform: scale(0.25); filter: blur(4px); color: var(--green-ink); }
.copied .icon-swap .ti:not(.ti-check), .icon-swap.copied .ti:not(.ti-check) { opacity: 0; transform: scale(0.25); filter: blur(4px); }
.copied .icon-swap .ti-check, .icon-swap.copied .ti-check { opacity: 1; transform: scale(1); filter: blur(0); }

/* =========================================================================
   Search overlay (⌘K)
   ========================================================================= */
.search-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(10, 37, 64, 0.32); display: grid; place-items: start center; padding: 12vh 24px 24px; }
.search-overlay.hidden { display: none; }
.search-panel { width: 100%; max-width: 560px; background: var(--bg); border: 1px solid var(--brd); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; }
.search-panel input { width: 100%; border: none; outline: none; padding: 14px 18px; font: inherit; font-size: 15px; color: var(--ink); border-bottom: 1px solid var(--brd-soft); }
.search-panel input::placeholder { color: var(--ghost); }
.search-results { max-height: 46vh; overflow-y: auto; padding: 6px; }
.search-hit { display: flex; align-items: baseline; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--body); }
.search-hit .crumb { font-size: 12px; color: var(--ghost); margin-left: auto; white-space: nowrap; }
.search-hit .mono { font: 12.5px var(--mono); color: var(--ink); }
.search-hit:hover, .search-hit.sel { background: var(--accent-bg); }
.search-empty { padding: 18px; text-align: center; color: var(--ghost); font-size: 13.5px; }

/* =========================================================================
   Console components (light) — used by account.html
   ========================================================================= */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 7px; font-weight: 500; }
input[type=text], input[type=email], input[type=password] { width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--brd); background: var(--bg); color: var(--ink); font: inherit; font-size: 14.5px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--ghost); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #e9e8fb; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 14px; border: 1px solid var(--brd); background: var(--bg); color: var(--body); cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--brd-hover); background: var(--bg-faint); }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #16375c; border-color: #16375c; }
.btn:active { transform: scale(0.96); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; color: var(--body); background: var(--bg-soft); border: 1px solid var(--brd); }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.badge .dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.badge-active { color: var(--green-ink); background: var(--green-bg); }
.badge-revoked { color: var(--faint); background: var(--bg-soft); border: 1px solid var(--brd); }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); padding: 14px 16px 12px; border-bottom: 1px solid var(--brd-soft); background: var(--bg-faint); }
.table td { padding: 15px 16px; border-bottom: 1px solid var(--brd-soft); font-size: 14px; vertical-align: middle; font-variant-numeric: tabular-nums; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--bg-faint); }
.table tr:last-child td { border-bottom: none; }

.row-menu { position: relative; }
.menu { position: absolute; right: 0; top: 36px; z-index: 30; min-width: 168px; padding: 6px; background: var(--bg); border: 1px solid var(--brd); border-radius: 10px; box-shadow: var(--shadow-pop); }
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; min-height: 36px; padding: 0 11px; border: none; background: none; color: var(--body); font: inherit; font-size: 13.5px; border-radius: 7px; cursor: pointer; }
.menu button:hover { background: var(--bg-soft); }
.menu button.danger { color: var(--red-ink); }

.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(10, 37, 64, 0.32); }
.modal { width: 100%; max-width: 460px; background: var(--bg); border: 1px solid var(--brd); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 26px; }
.modal h2 { font-size: 19px; margin-bottom: 6px; }
.modal .modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.reveal-key { margin-top: 12px; padding: 14px 16px; border-radius: 8px; border: 1px dashed var(--green); background: #f0faf5; display: flex; align-items: center; justify-content: space-between; gap: 12px; word-break: break-all; }
.reveal-key .mono { font: 13px var(--mono); color: var(--green-ink); }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); z-index: 80; padding: 11px 18px; border-radius: 99px; background: var(--ink); border: none; color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; display: flex; align-items: center; gap: 9px; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--green); }

.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* staggered section enter (subtle), skipped under reduced motion */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
  .page.active > .page-inner > * { animation: rise .3s cubic-bezier(0.2, 0, 0, 1) backwards; }
  .page.active > .page-inner > :nth-child(2) { animation-delay: .04s; }
  .page.active > .page-inner > :nth-child(3) { animation-delay: .08s; }
  .page.active > .page-inner > :nth-child(4) { animation-delay: .12s; }
  .page.active > .page-inner > :nth-child(n+5) { animation-delay: .16s; }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .search-box { display: none; }
  .topnav .hide-sm { display: none; }
  .sidebar { position: fixed; inset: 56px 25% 0 0; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .shell.nav-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-pop); }
  .nav-toggle { display: inline-flex !important; }
  .page-inner, .page-inner.narrow, .page-inner.wide { padding: 28px 20px 72px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .ref-aside { position: static; max-width: none; }
  .ep-row .desc { display: none; }
}
.nav-toggle { display: none; background: none; border: 1px solid var(--brd); border-radius: 8px; width: 36px; height: 36px; align-items: center; justify-content: center; cursor: pointer; color: var(--body); font-size: 16px; }
