/* ──────────────────────────────────────────────────────────────────────────────
   Manual de Fyal — sistema de diseño

   Tokens de fluidfunctionalism.com (tamaños, motion, fluid hover, superficies,
   scrollbars) sobre la paleta de la app. Como en la app: plano, sin sombras,
   cada capa que se abre sube un peldaño de fondo.

   Sizes (escala «default» de FF):
     control 36px · text 13px · icon 16px · px 12px · itemPx 8px · gap 8px
     segmentItem 28px + segmentPad 4px
     display 28 · title 16 · subtitle 14 · body 13 · caption 12
   La columna de lectura sube un punto (14px) porque es texto largo, no UI.

   Motion: tres muelles. fast 80ms (hover, toggles) · moderate 160ms (menús,
   tabs, sin rebote) · slow 240ms (diálogos, con rebote 0,12). Salidas un
   escalón más rápidas: 60 / 120 / 160.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  /* Superficies (niveles anidados; el que se abre encima sube un peldaño) */
  --bg: #0c0c0d;
  --surface: #17171a;
  --surface-2: #1f1f23;
  --surface-hover: #2a2a2f;
  --control-fill: #212125;
  --control-fill-hover: #2a2a2f;
  --scrim: rgba(0, 0, 0, 0.6);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f5;
  --text-muted: #9a9aa1;
  --text-subtle: #6b6b72;
  --brand: #3ECF8E;
  --brand-fg: #0c0c0d;
  --brand-dim: rgba(62, 207, 142, 0.14);
  --green: #3ECF8E;
  --yellow: #E8B84A;
  --red: #F06A6A;
  --blue: #5B9CF5;
  --code-bg: #131316;
  --selection: rgba(62, 207, 142, 0.28);

  /* Sizes */
  --control-h: 36px;
  --control-h-sm: 28px;
  --text-ui: 13px;
  --icon: 16px;
  --px: 12px;
  --item-px: 8px;
  --gap: 8px;
  --segment-item: 28px;
  --segment-pad: 4px;

  --fs-display: 28px;
  --fs-title: 16px;
  --fs-subtitle: 14px;
  --fs-body: 13px;
  --fs-caption: 12px;
  --fs-prose: 14px;
  --fs-h2: 20px;
  --fs-h3: 15px;

  /* Los radios de la app: casi cuadrados */
  --radius-sm: 5px;
  --radius: 5px;
  --radius-lg: 7px;
  --radius-pill: 12px;

  /* Motion: aproximaciones CSS de los tres muelles */
  --spring-fast: 80ms cubic-bezier(0.2, 0, 0, 1);
  --spring-fast-exit: 60ms cubic-bezier(0.4, 0, 1, 1);
  --spring-moderate: 160ms cubic-bezier(0.2, 0, 0, 1);
  --spring-moderate-exit: 120ms cubic-bezier(0.4, 0, 1, 1);
  --spring-slow: 240ms linear(0, 0.223 12.1%, 0.595 26.9%, 0.842 39.1%, 0.985 52.3%, 1.037 63.9%, 1.028 74.5%, 1.008 86.2%, 1);
  --spring-slow-exit: 160ms cubic-bezier(0.4, 0, 1, 1);

  --sidebar-w: 256px;
  --toc-w: 200px;
  --prose-w: 860px;
  --topbar-h: 56px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #e9e9ec;
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --surface-hover: #ebebee;
  --control-fill: rgba(0, 0, 0, 0.05);
  --control-fill-hover: rgba(0, 0, 0, 0.09);
  --scrim: rgba(0, 0, 0, 0.5);
  --border: rgba(0, 0, 0, 0.12);
  --border-strong: rgba(0, 0, 0, 0.2);
  --text: #1d1d1f;
  --text-muted: #5e5e63;
  --text-subtle: #86868b;
  --brand: #1F9D67;
  --brand-fg: #ffffff;
  --brand-dim: rgba(31, 157, 103, 0.12);
  --green: #1F9D67;
  --yellow: #B8860B;
  --red: #D14343;
  --blue: #2F6FD6;
  --code-bg: #f4f4f6;
  --selection: rgba(31, 157, 103, 0.22);
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-prose);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "tnum";
  transition: background-color var(--spring-slow), color var(--spring-slow);
}
::selection { background: var(--selection); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font-family: inherit; font-size: inherit; color: inherit; }
img, svg { max-width: 100%; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-sm); }
kbd {
  display: inline-block;
  font-family: var(--font);
  font-size: var(--fs-caption);
  font-weight: 500;
  line-height: 1;
  padding: 4px 6px 3px;
  min-width: 22px;
  text-align: center;
  color: var(--text);
  background: var(--control-fill);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  vertical-align: 1px;
}
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--control-fill);
  border-radius: 4px;
  padding: 1px 5px;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
  font-size: var(--fs-caption);
  line-height: 1.6;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* Sin barra de scroll, como en la app: la página y el menú se desplazan
   igual, solo que sin el carril a la vista. */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; width: 0; height: 0; }
.sidebar-nav, .toc, .cmdk-list { scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar, .toc::-webkit-scrollbar, .cmdk-list::-webkit-scrollbar { display: none; }
/* Las tablas anchas sí la conservan, fina, para que se sepa que hay más */
.table-scroll, .bulk-table-wrap { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.table-scroll::-webkit-scrollbar, .bulk-table-wrap::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-thumb, .bulk-table-wrap::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ── Shell ────────────────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100dvh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 12px 8px 12px 12px;
  z-index: 40;
  background: var(--bg);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--control-h);
  padding: 0 var(--px);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  -webkit-user-select: none; user-select: none;
}
.sidebar-logo:hover { text-decoration: none; opacity: 0.8; }
.sidebar-logo .mark { width: 12px; height: 12px; background: var(--brand); transform: rotate(45deg); border-radius: 2px; flex-shrink: 0; }
.sidebar-logo .tag { font-size: var(--fs-caption); font-weight: 500; letter-spacing: 0; color: var(--text-muted); margin-left: 2px; margin-top: 4px; }

.sidebar-nav {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 12px 4px 12px 0;
  margin-top: 8px;
  /* scroll-fade: la lista se apaga en los bordes cuando desborda */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.nav-group { margin-bottom: 14px; }
.nav-group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 0 var(--px);
  margin: 0 0 4px;
}
.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--gap);
  height: var(--control-h);
  padding: 0 var(--px);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: var(--text-ui);
  font-weight: 450;
  font-variation-settings: "wght" 450;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--spring-fast), font-variation-settings var(--spring-moderate);
}
.nav-item:hover { text-decoration: none; color: var(--text); }
.nav-item .nav-icon { width: var(--icon); height: var(--icon); flex-shrink: 0; opacity: 0.7; }
.nav-item.active { color: var(--text); font-weight: 600; font-variation-settings: "wght" 600; }
.nav-item.active .nav-icon { opacity: 1; color: var(--brand); }
.nav-item.active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--control-fill-hover);
  z-index: -1;
}

/* Fluid hover: un solo resaltado que se desliza al ítem más cercano */
.fluid-highlight {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  border-radius: var(--radius);
  background: var(--surface-hover);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: transform var(--spring-moderate), width var(--spring-moderate), height var(--spring-moderate), opacity var(--spring-fast);
  will-change: transform;
}
.fluid-highlight.visible { opacity: 1; }
.fluid-highlight.instant { transition: opacity var(--spring-fast); }

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.sidebar-foot .nav-item { height: 32px; }
.sidebar-foot .nav-item .nav-icon { opacity: 0.6; }

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.topbar .crumbs { font-size: var(--fs-body); color: var(--text-muted); display: flex; gap: 6px; align-items: center; min-width: 0; }
.topbar .crumbs .sep { opacity: 0.5; }
.topbar .crumbs .here { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }

.search-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  height: var(--control-h);
  padding: 0 var(--px);
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--control-fill);
  color: var(--text-muted);
  font-size: var(--text-ui);
  cursor: pointer;
  transition: background var(--spring-fast), border-color var(--spring-fast), color var(--spring-fast);
}
.search-btn:hover { background: var(--control-fill-hover); color: var(--text); border-color: var(--border-strong); }
.search-btn .nav-icon { width: var(--icon); height: var(--icon); opacity: 0.7; }
.search-btn kbd { margin-left: auto; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-h);
  height: var(--control-h);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--spring-fast), color var(--spring-fast), transform var(--spring-fast);
}
.icon-btn:hover { background: var(--control-fill-hover); color: var(--text); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: var(--icon); height: var(--icon); }

.lang-switch {
  display: inline-flex;
  padding: var(--segment-pad);
  gap: 2px;
  background: var(--control-fill);
  border-radius: var(--radius);
}
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--segment-item); padding: 0 10px;
  border-radius: 5px;
  color: var(--text-muted); font-size: var(--fs-caption); font-weight: 500;
  text-decoration: none;
  transition: background var(--spring-fast), color var(--spring-fast);
}
.lang-switch a:hover { color: var(--text); text-decoration: none; }
.lang-switch a.active { background: var(--surface); color: var(--text); }

/* ── Contenido ────────────────────────────────────────────────────────────── */
.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, var(--prose-w)) var(--toc-w);
  gap: 56px;
  padding: 16px 32px 80px;
  max-width: calc(var(--prose-w) + var(--toc-w) + 56px + 64px);
  /* Centrado en el área que queda a la derecha del menú, como la app */
  margin: 0 auto;
  width: 100%;
}
.prose { min-width: 0; }
.prose h1 {
  font-size: var(--fs-display);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 8px 0 6px;
}
.prose .lead { font-size: var(--fs-title); color: var(--text-muted); margin: 0 0 32px; line-height: 1.55; }
.prose h2 {
  font-size: var(--fs-h2);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 650;
  margin: 48px 0 12px;
  padding-top: 8px;
  scroll-margin-top: calc(var(--topbar-h) + 8px);
}
.prose h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin: 28px 0 8px;
  scroll-margin-top: calc(var(--topbar-h) + 8px);
}
.prose h2 .anchor, .prose h3 .anchor {
  color: var(--text-subtle);
  margin-left: 8px;
  opacity: 0;
  font-weight: 400;
  transition: opacity var(--spring-fast);
}
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin-bottom: 5px; }
.prose li::marker { color: var(--text-subtle); }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body);
  margin: 0 0 18px;
}
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 600; color: var(--text-muted); font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.04em; }
.prose td:first-child { white-space: nowrap; }
.table-scroll { overflow-x: auto; }

/* Callouts */
.callout {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--fs-body);
  margin: 0 0 18px;
}
.callout > svg { width: 18px; height: 18px; margin-top: 2px; color: var(--text-muted); }
.callout p:last-child { margin: 0; }
.callout p { margin: 0 0 6px; }
.callout--tip > svg { color: var(--brand); }
.callout--warn > svg { color: var(--yellow); }
.callout--note > svg { color: var(--blue); }
.callout-title { font-weight: 600; display: block; margin-bottom: 2px; }

/* Pasos */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 20px; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin-bottom: 16px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--control-fill);
  color: var(--text);
  font-size: var(--fs-caption);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.steps > li > strong:first-child { display: block; margin-bottom: 2px; }

/* Tarjetas de sección (portada) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0 0 24px; }
.card {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background var(--spring-fast), border-color var(--spring-fast), transform var(--spring-fast);
}
.card:hover { text-decoration: none; border-color: var(--border-strong); background: var(--surface-2); }
.card:active { transform: scale(0.99); }
.card .card-icon { width: 18px; height: 18px; color: var(--brand); margin-bottom: 10px; display: block; }
.card .card-title { font-size: var(--fs-subtitle); font-weight: 600; display: block; margin-bottom: 3px; }
.card .card-desc { font-size: var(--fs-caption); color: var(--text-muted); display: block; line-height: 1.5; }

/* Atajos */
.shortcuts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shortcut { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; background: var(--surface); font-size: var(--fs-body); }
.shortcut + .shortcut { border-top: 1px solid var(--border); }
.shortcut .keys { display: flex; gap: 4px; flex-shrink: 0; }
.shortcut.is-live { background: var(--brand-dim); }

/* Prev / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 56px; }
.pager a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  transition: background var(--spring-fast), border-color var(--spring-fast);
}
.pager a:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; }
.pager a.next { text-align: right; align-items: flex-end; }
.pager .pager-label { font-size: var(--fs-caption); color: var(--text-muted); }
.pager .pager-title { font-size: var(--fs-subtitle); font-weight: 600; }

.page-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); font-size: var(--fs-caption); color: var(--text-subtle); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-foot a { color: var(--text-muted); }

/* TOC (en esta página) */
.toc {
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  align-self: start;
  max-height: calc(100dvh - var(--topbar-h) - 32px);
  overflow-y: auto;
  font-size: var(--fs-caption);
}
.toc-title { font-weight: 600; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; margin: 0 0 8px; }
.toc-list { position: relative; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li a {
  display: block;
  padding: 4px 0 4px 12px;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  text-decoration: none;
  transition: color var(--spring-fast);
}
.toc li.h3 a { padding-left: 24px; }
.toc li a:hover { color: var(--text); text-decoration: none; }
.toc li a.active { color: var(--text); font-weight: 500; }
.toc .toc-rail {
  position: absolute; left: 0; width: 1px; height: 0; top: 0;
  background: var(--brand);
  transition: transform var(--spring-moderate), height var(--spring-moderate), opacity var(--spring-fast);
  opacity: 0;
}

/* ── Command menu (búsqueda) ─────────────────────────────────────────────── */
.cmdk-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: var(--scrim);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 16px 16px;
  opacity: 0;
  transition: opacity var(--spring-slow-exit);
}
.cmdk-scrim.open { opacity: 1; transition: opacity var(--spring-slow); }
.cmdk {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: scale(0.98) translateY(-6px);
  transition: transform var(--spring-slow-exit);
}
.cmdk-scrim.open .cmdk { transform: none; transition: transform var(--spring-slow); }
.cmdk-input {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.cmdk-input svg { width: var(--icon); height: var(--icon); color: var(--text-muted); }
.cmdk-input input {
  flex: 1; height: 100%; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: var(--fs-subtitle);
}
.cmdk-input input::placeholder { color: var(--text-subtle); }
.cmdk-list { position: relative; max-height: 380px; overflow-y: auto; padding: 6px; }
.cmdk-empty { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: var(--fs-body); }
.cmdk-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-subtle); padding: 10px 10px 4px; }
.cmdk-item {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-body);
}
.cmdk-item:hover { text-decoration: none; }
.cmdk-item .cmdk-page { font-size: var(--fs-caption); color: var(--text-muted); }
.cmdk-item mark { background: var(--brand-dim); color: inherit; border-radius: 2px; }
.cmdk-item.active { color: var(--text); }
.cmdk-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: var(--fs-caption); color: var(--text-subtle); }
.cmdk-foot span { display: inline-flex; gap: 4px; align-items: center; }

/*DEMOS*/

/* Vista móvil */
@media (max-width: 1080px) {
  .content-wrap { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); width: 280px; transition: transform var(--spring-slow-exit); border-right: 1px solid var(--border); }
  .sidebar.open { transform: none; transition: transform var(--spring-slow); }
  .nav-scrim { position: fixed; inset: 0; z-index: 39; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity var(--spring-moderate); }
  .nav-scrim.open { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; gap: 8px; }
  .search-btn { min-width: 0; }
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn { width: var(--control-h); padding: 0; justify-content: center; }
  .content-wrap { padding: 8px 16px 64px; }
  .d-grid--3, .d-grid--2 { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
}
.menu-btn { display: none; }
@media (max-width: 860px) { .menu-btn { display: inline-flex; } }
