/* ==========================================================================
   Uddom User Documentation — docs.css
   Colours are taken from the Uddom app's own design tokens
   (--uddom-primary #008060, --uddom-bg #f6f6f7, --uddom-text #202223, ...).
   No frameworks, no build step.
   ========================================================================== */

:root {
  /* Uddom app tokens */
  --uddom-primary: #008060;
  --uddom-primary-dark: #006e52;
  --uddom-primary-soft: #e8f5f1;
  --uddom-primary-border: #95d5c4;
  --uddom-accent: #2f6b4f;
  --uddom-accent-tint: #eaf3ec;
  --uddom-bg: #f6f6f7;
  --uddom-surface: #ffffff;
  --uddom-border: #e1e3e5;
  --uddom-border-dark: #c9cccf;
  --uddom-text: #202223;
  --uddom-muted: #6d7175;

  /* Supporting semantics */
  --info: #2563eb;
  --info-soft: #eff6ff;
  --tip: #008060;
  --tip-soft: #e8f5f1;
  --warning: #b54708;
  --warning-soft: #fff6ed;
  --important: #7c3aed;
  --important-soft: #f5f3ff;
  --success: #16a34a;
  --success-soft: #ecfdf3;
  --note: #4b5563;
  --note-soft: #f3f4f6;

  /* Metrics */
  --header-h: 62px;
  --sidebar-w: 268px;
  --toc-w: 224px;
  --shell-max: 1440px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm:
    0 1px 2px rgba(32, 34, 35, 0.06), 0 1px 3px rgba(32, 34, 35, 0.05);
  --shadow-md:
    0 4px 14px rgba(32, 34, 35, 0.08), 0 1px 3px rgba(32, 34, 35, 0.06);
  --shadow-lg: 0 16px 40px rgba(32, 34, 35, 0.14);
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
  --focus: 0 0 0 3px rgba(0, 128, 96, 0.35);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--uddom-text);
  background: var(--uddom-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--uddom-primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  color: var(--uddom-text);
  line-height: 1.28;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.6rem;
}

h2 {
  font-size: 1.375rem;
  margin: 2.4rem 0 0.75rem;
  padding-top: 0.4rem;
}

h3 {
  font-size: 1.075rem;
  margin: 1.6rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

li {
  margin: 0.3rem 0;
}

strong {
  font-weight: 650;
}

hr {
  border: 0;
  border-top: 1px solid var(--uddom-border);
  margin: 2rem 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--uddom-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--uddom-border);
}

.header__inner {
  max-width: var(--shell-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--uddom-text);
  white-space: nowrap;
  /* The header shows the real logo lockup as a single image. Its text stays in
     the markup (below) so the link keeps an accessible name. */
  width: 130px;
  height: 38px;
  background: url("../images/uddom-user-docs-logo-transparent.png") left center /
    contain no-repeat;
}

/* Visually hidden, still read out: the lockup's words are in the image now. */
.brand > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(
    135deg,
    var(--uddom-primary),
    var(--uddom-primary-dark)
  );
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.brand__sub {
  font-weight: 500;
  color: var(--uddom-muted);
  font-size: 0.9375rem;
}

.header__spacer {
  flex: 1 1 auto;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--uddom-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--uddom-text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

/* Search */
.search {
  position: relative;
  width: min(420px, 46vw);
}

.search__field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--uddom-border-dark);
  border-radius: var(--radius-pill);
}

.search__field:focus-within {
  border-color: var(--uddom-primary);
  box-shadow: var(--focus);
}

.search__icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--uddom-muted);
}

.search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--uddom-text);
  outline: none;
}

.search__kbd {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--uddom-muted);
  border: 1px solid var(--uddom-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--uddom-bg);
}

.search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(60vh, 460px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--uddom-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 80;
}

.search__results[hidden] {
  display: none;
}

.search-result {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--uddom-text);
}

.search-result:hover,
.search-result[aria-selected="true"] {
  background: var(--uddom-primary-soft);
  text-decoration: none;
}

.search-result__title {
  font-weight: 620;
  font-size: 0.9375rem;
  display: block;
}

.search-result__section {
  display: block;
  font-size: 0.75rem;
  color: var(--uddom-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1px;
}

.search-result__match {
  display: block;
  font-size: 0.8125rem;
  color: var(--uddom-muted);
  margin-top: 2px;
}

.search-result mark {
  background: #fff2a8;
  color: inherit;
  border-radius: 2px;
}

.search__empty {
  padding: 14px 12px;
  color: var(--uddom-muted);
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   Shell / layout
   -------------------------------------------------------------------------- */
.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 32px;
  align-items: start;
  /* The sidebar is sticky and capped at the viewport height. On a page whose
     content is shorter than the sidebar, the sticky element is taller than its
     grid row and spills over whatever follows — the footer. Keeping the row at
     least a viewport tall gives the sidebar the height it needs. */
  min-height: calc(100vh - var(--header-h));
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 24px 8px 40px 0;
  scrollbar-width: thin;
}

.sidebar__section {
  margin-bottom: 18px;
}

.sidebar__heading {
  margin: 0 0 6px;
  padding: 0 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--uddom-muted);
}

.sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar__link {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--uddom-text);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.sidebar__link:hover {
  background: var(--uddom-bg);
  text-decoration: none;
}

.sidebar__link[aria-current="page"] {
  background: var(--uddom-primary-soft);
  color: var(--uddom-primary-dark);
  font-weight: 620;
}

.sidebar-backdrop {
  display: none;
}

/* Main */
.main {
  min-width: 0;
  padding: 24px 0 72px;
}

.breadcrumbs {
  font-size: 0.8125rem;
  color: var(--uddom-muted);
  margin-bottom: 14px;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs li + li::before {
  content: "›";
  color: var(--uddom-border-dark);
}

.breadcrumbs a {
  color: var(--uddom-muted);
}

.breadcrumbs a:hover {
  color: var(--uddom-primary-dark);
}

.lede {
  font-size: 1.075rem;
  color: #4b5563;
  margin: 0 0 1.4rem;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.6rem;
}

/* On this page */
.toc {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 28px 0 40px;
  font-size: 0.875rem;
}

.toc__heading {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--uddom-muted);
  margin: 0 0 8px;
}

.toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--uddom-border);
}

.toc__list a {
  display: block;
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--uddom-muted);
  line-height: 1.4;
}

.toc__list a:hover {
  color: var(--uddom-text);
  text-decoration: none;
}

.toc__list a.is-active {
  color: var(--uddom-primary-dark);
  border-left-color: var(--uddom-primary);
  font-weight: 600;
}

.toc__list .toc--h3 a {
  padding-left: 24px;
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   Content typography
   -------------------------------------------------------------------------- */
.content {
  max-width: 760px;
}

.content > :first-child {
  margin-top: 0;
}

.content h2 {
  border-top: 1px solid var(--uddom-border);
}

.content h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.anchor {
  opacity: 0;
  margin-left: 6px;
  color: var(--uddom-border-dark);
  font-weight: 400;
  text-decoration: none;
}

h2:hover .anchor,
h3:hover .anchor,
.anchor:focus {
  opacity: 1;
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
}

.steps > li {
  position: relative;
  padding: 2px 0 2px 44px;
  margin: 0 0 16px;
}

.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--uddom-primary-soft);
  color: var(--uddom-primary-dark);
  font-weight: 700;
  font-size: 0.875rem;
}

.steps > li::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 34px;
  bottom: -14px;
  width: 2px;
  background: var(--uddom-border);
}

.steps > li:last-child::after {
  display: none;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.4rem;
  border: 1px solid var(--uddom-border);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

thead th {
  text-align: left;
  background: var(--uddom-bg);
  color: var(--uddom-text);
  font-weight: 650;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 11px 14px;
  border-bottom: 1px solid var(--uddom-border);
  white-space: nowrap;
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--uddom-border);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafafa;
}

/* Definition-style list used for settings */
.settings {
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  border: 1px solid var(--uddom-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.settings > li {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--uddom-border);
}

.settings > li:last-child {
  border-bottom: 0;
}

.settings__name {
  font-weight: 620;
}

.settings__desc {
  color: var(--uddom-muted);
  font-size: 0.9375rem;
  margin-top: 2px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge--free {
  background: var(--uddom-primary-soft);
  color: var(--uddom-primary-dark);
  border-color: var(--uddom-primary-border);
}
.badge--grow {
  background: var(--info-soft);
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.badge--convert {
  background: var(--important-soft);
  color: #6d28d9;
  border-color: #ddd6fe;
}
.badge--scale {
  background: #fdf2f8;
  color: #a21caf;
  border-color: #fbcfe8;
}
.badge--soon {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: #fed7aa;
}
.badge--neutral {
  background: var(--note-soft);
  color: var(--note);
  border-color: var(--uddom-border);
}

/* Callouts */
.callout {
  position: relative;
  margin: 0 0 1.4rem;
  padding: 14px 16px 14px 46px;
  border-radius: var(--radius);
  border: 1px solid var(--uddom-border);
  background: #fff;
  font-size: 0.9375rem;
}

.callout::before {
  position: absolute;
  left: 14px;
  top: 13px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.callout__title {
  display: block;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.callout--info {
  background: var(--info-soft);
  border-color: #bfdbfe;
}
.callout--info::before {
  content: "i";
  background: var(--info);
  font-style: italic;
}
.callout--info .callout__title {
  color: #1d4ed8;
}

.callout--tip {
  background: var(--tip-soft);
  border-color: var(--uddom-primary-border);
}
.callout--tip::before {
  content: "\2713";
  background: var(--tip);
}
.callout--tip .callout__title {
  color: var(--uddom-primary-dark);
}

.callout--warning {
  background: var(--warning-soft);
  border-color: #fed7aa;
}
.callout--warning::before {
  content: "!";
  background: var(--warning);
}
.callout--warning .callout__title {
  color: var(--warning);
}

.callout--important {
  background: var(--important-soft);
  border-color: #ddd6fe;
}
.callout--important::before {
  content: "!";
  background: var(--important);
}
.callout--important .callout__title {
  color: #6d28d9;
}

.callout--success {
  background: var(--success-soft);
  border-color: #bbf7d0;
}
.callout--success::before {
  content: "\2713";
  background: var(--success);
}
.callout--success .callout__title {
  color: #15803d;
}

.callout--note {
  background: var(--note-soft);
  border-color: var(--uddom-border);
}
.callout--note::before {
  content: "\2139";
  background: var(--note);
}
.callout--note .callout__title {
  color: var(--note);
}

/* Screenshot placeholders */
.screenshot {
  margin: 0 0 1.6rem;
}

.screenshot__frame {
  border: 1px dashed var(--uddom-border-dark);
  border-radius: var(--radius);
  background: repeating-linear-gradient(
    45deg,
    #fbfbfc,
    #fbfbfc 10px,
    #f5f6f7 10px,
    #f5f6f7 20px
  );
  padding: 20px;
  text-align: center;
  color: var(--uddom-muted);
}
.screenshot__frame img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  width: 100%;
}
.screenshot__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--uddom-muted);
}

.screenshot__label::before {
  content: "▣";
  font-size: 15px;
}

.screenshot__hint {
  display: block;
  font-size: 0.8125rem;
  margin-top: 6px;
  color: #9ca3af;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.screenshot__caption {
  font-size: 0.8125rem;
  color: var(--uddom-muted);
  margin-top: 8px;
  text-align: center;
}

figure {
  margin: 0;
}

/* Inline code and keyboard keys */
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--note-soft);
  border: 1px solid var(--uddom-border);
  border-radius: 5px;
  padding: 1px 5px;
}

kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  border: 1px solid var(--uddom-border-dark);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  background: #fff;
}

/* FAQ details / summary */
details {
  border: 1px solid var(--uddom-border);
  border-radius: var(--radius);
  background: #fff;
  margin: 0 0 10px;
  overflow: hidden;
}

details[open] {
  border-color: var(--uddom-primary-border);
}

summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 620;
  list-style: none;
  position: relative;
  padding-right: 42px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--uddom-muted);
}

details[open] summary::after {
  content: "\2212";
}

summary:hover {
  background: var(--uddom-bg);
}

details > p,
details > ul,
details > ol {
  margin: 0 0 14px;
  padding: 0 16px;
}

details > p:first-of-type {
  margin-top: 2px;
}

/* Cards grid (section landing pages) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 0 0 1.8rem;
  padding: 0;
  list-style: none;
}

.card {
  display: block;
  padding: 16px;
  border: 1px solid var(--uddom-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--uddom-text);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.card:hover {
  text-decoration: none;
  border-color: var(--uddom-primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card__title {
  font-weight: 650;
  font-size: 1rem;
}

.card__desc {
  color: var(--uddom-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Next / previous */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 2.6rem 0 0;
}

.pager__link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--uddom-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--uddom-text);
}

.pager__link:hover {
  text-decoration: none;
  border-color: var(--uddom-primary-border);
  box-shadow: var(--shadow-sm);
}

.pager__link--next {
  text-align: right;
}

.pager__dir {
  display: block;
  font-size: 0.75rem;
  color: var(--uddom-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.pager__title {
  font-weight: 620;
  color: var(--uddom-primary-dark);
}

.pager__spacer {
  display: block;
}

.footer {
  border-top: 1px solid var(--uddom-border);
  background: #fff;
  margin-top: 24px;
}

.footer__inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 22px 20px 40px;
  color: var(--uddom-muted);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
}

.footer a {
  color: var(--uddom-muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .shell {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
    order: 3;
  }

  .search {
    width: auto;
    flex: 1 1 auto;
    order: 2;
  }

  .brand__sub {
    display: none;
  }

  .search__kbd {
    display: none;
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    /* The sidebar is a fixed drawer down here, so the viewport-tall row above
       would only add empty space. */
    min-height: auto;
  }

  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    max-height: none;
    padding: 20px 16px 40px;
    background: #fff;
    border-right: 1px solid var(--uddom-border);
    box-shadow: var(--shadow-lg);
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    z-index: 70;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(32, 34, 35, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 65;
  }

  .sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    padding-top: 18px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 1.625rem;
  }

  .header__inner {
    padding: 0 14px;
    gap: 10px;
  }

  .shell {
    padding: 0 14px;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Accessibility helpers
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .header,
  .sidebar,
  .toc,
  .pager,
  .footer {
    display: none !important;
  }

  .shell {
    display: block;
    min-height: auto;
  }
}
