/* U.CASH Pay Docs - canonical stylesheet (2026-08-23b redesign)
 * Single source of truth; deploy.sh copies this over /docs/assets/css/style.css.
 * Sections: tokens, base, header, sidebar, layout + TOC, content typography,
 * code, tables, callouts, cards, pager, footer, search, responsive. */

:root {
    --gold: #C9A868;
    --gold-dark: #B89757;
    --gold-deep: #9A7C3E;
    --gold-tint: rgba(201, 168, 104, 0.12);
    --gold-tint-strong: rgba(201, 168, 104, 0.22);

    --ink: #1c1e22;
    --ink-soft: #3f444c;
    --muted: #6b7178;
    --faint: #9aa0a8;

    --bg: #fbfaf7;
    --surface: #ffffff;
    --surface-warm: #f6f3ec;
    --border: #e8e4db;
    --border-soft: #f0ede5;

    --code-bg: #14161a;
    --code-ink: #e9e6df;
    --code-border: #26292f;

    --note-accent: #5b7a99;
    --note-tint: #eef3f8;
    --warn-accent: #b8863b;
    --warn-tint: #fbf3e3;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SFMono-Regular', ui-monospace, Consolas, 'Liberation Mono', Menlo, monospace;

    /* Filled-accent law: solid accent fills pair with --on-accent text.
     * Light = deep gold fill + white text (AA 4.9:1); dark = bright gold fill + near-black text (8:1). */
    --accent-fill: #8A6C34;
    --accent-fill-hover: #866731;
    --on-accent: #ffffff;

    --zebra: #fdfcf9;

    --header-h: 64px;
    --sidebar-w: 276px;
    --toc-w: 232px;
    --content-w: 760px;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-1: 0 1px 2px rgba(28, 30, 34, 0.05);
    --shadow-2: 0 4px 16px rgba(28, 30, 34, 0.08);
    --shadow-3: 0 10px 32px rgba(28, 30, 34, 0.14);
}

/* Dark theme: class on <html>, resolved by assets/js/theme.js (system follows OS).
 * Light tokens above stay the default. */
html.uxc-dark-mode {
    color-scheme: dark;

    --accent-fill: #C9A868;
    --accent-fill-hover: #D4B67A;
    --on-accent: #14161a;

    --gold-deep: #D8BA80;
    --gold-tint: rgba(201, 168, 104, 0.10);
    --gold-tint-strong: rgba(201, 168, 104, 0.34);

    --ink: #e8e6df;
    --ink-soft: #c9c7bf;
    --muted: #9aa0a8;
    --faint: #6f747c;

    --bg: #0e0f11;
    --surface: #16181c;
    --surface-warm: #1c1f24;
    --border: #26292f;
    --border-soft: #1f2227;

    --code-bg: #0b0c0e;
    --code-border: #26292f;

    --note-accent: #7fa3c4;
    --note-tint: #18202a;
    --warn-accent: #d4a860;
    --warn-tint: #241d12;

    --zebra: #191c21;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 10px 32px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color-scheme: light;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(201, 168, 104, 0.35);
}

a {
    color: var(--gold-deep);
}

a:focus-visible,
input:focus-visible,
button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ============================================================
   Header
   ============================================================ */

.docs-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

html.uxc-dark-mode .docs-header {
    background: rgba(22, 24, 28, 0.92);
}

.docs-header-inner {
    max-width: 1560px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    display: none;
    height: 26px;
    width: auto;
}

.brand-logo.bl-light {
    display: block;
}

html.uxc-dark-mode .brand-logo.bl-light {
    display: none;
}

html.uxc-dark-mode .brand-logo.bl-dark {
    display: block;
}

.brand-sep {
    width: 1px;
    height: 22px;
    background: var(--border);
}

.brand-docs {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink-soft);
}

.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 1px;
    background: var(--ink-soft);
    transition: transform 0.2s, opacity 0.2s;
}

/* 9/7 fleet menu icon: menuarrow glyph (old span rules inert) */
.nav-toggle svg { display: block; width: 24px; height: 24px; transition: transform 0.2s; }
body.nav-open .nav-toggle svg, .nav-toggle[aria-expanded="true"] svg { transform: scaleX(-1); }

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.console-cta {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-deep);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.console-cta:hover {
    background: var(--accent-fill);
    color: var(--on-accent);
}

/* 3-state theme toggle (sun / moon / auto), state carried by data-uxc-theme */
.theme-toggle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
    color: var(--gold-deep);
    border-color: var(--gold);
}

.theme-toggle svg {
    display: none;
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle[data-uxc-theme="light"] .ico-sun,
.theme-toggle[data-uxc-theme="dark"] .ico-moon,
.theme-toggle[data-uxc-theme="system"] .ico-auto {
    display: block;
}

/* ============================================================
   Search (header + dropdown; js in assets/js/search.js)
   ============================================================ */

.search-box {
    position: relative;
    flex: 1;
    max-width: 420px;
    margin-left: auto;
}

.search-box input {
    width: 100%;
    padding: 9px 14px 9px 34px;
    font: inherit;
    font-size: 0.9rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa0a8' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
}

.search-box input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-tint);
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-width: 92vw;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-3);
    padding: 6px;
    z-index: 1100;
    text-align: left;
}

.search-results a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.9rem;
}

.search-results a:hover {
    background: var(--surface-warm);
}

.search-results strong {
    font-weight: 600;
}

.search-results span {
    color: var(--faint);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.search-results p {
    padding: 10px 12px;
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================================
   Layout: sidebar | content | toc
   ============================================================ */

.docs-main {
    display: block;
    padding-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

.docs-sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.docs-sidebar::-webkit-scrollbar { width: 8px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-nav {
    padding: 28px 16px 24px;
    flex: 1;
}

.nav-section {
    margin-bottom: 26px;
}

.nav-section h3 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--faint);
    margin: 0 0 8px 12px;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    margin: 1px 0;
}

.nav-section a {
    position: relative;
    display: block;
    padding: 6px 12px;
    font-size: 0.875rem;
    color: var(--ink-soft);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.12s, color 0.12s;
}

.nav-section a:hover {
    background: var(--surface-warm);
    color: var(--ink);
}

.nav-section a.active {
    background: var(--gold-tint);
    color: var(--gold-deep);
    font-weight: 600;
}

.nav-section a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 2px;
    background: var(--gold);
}

.sidebar-foot {
    border-top: 1px solid var(--border-soft);
    padding: 14px 28px 18px;
}

.sidebar-foot a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-deep);
    text-decoration: none;
}

.sidebar-foot a:hover {
    text-decoration: underline;
}

.sidebar-foot p {
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--faint);
}

/* Body column: content + toc rail side by side */
.docs-body {
    margin-left: var(--sidebar-w);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 48px;
    padding: 40px 40px 0;
}

.docs-content {
    width: 100%;
    max-width: var(--content-w);
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-1);
    padding: 44px 56px 48px;
    margin-bottom: 48px;
}

/* On-this-page rail */
.docs-toc {
    position: sticky;
    top: calc(var(--header-h) + 40px);
    width: var(--toc-w);
    flex-shrink: 0;
    padding: 4px 0 40px;
    max-height: calc(100vh - var(--header-h) - 60px);
    overflow-y: auto;
}

.docs-toc h3 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--faint);
    margin-bottom: 10px;
}

.docs-toc ul {
    list-style: none;
    border-left: 2px solid var(--border-soft);
}

.docs-toc li {
    margin: 0;
}

.docs-toc a {
    display: block;
    padding: 4px 0 4px 14px;
    margin-left: -2px;
    border-left: 2px solid transparent;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.12s, border-color 0.12s;
}

.docs-toc a:hover {
    color: var(--ink);
}

.docs-toc a.active {
    color: var(--gold-deep);
    border-left-color: var(--gold);
    font-weight: 600;
}

/* ============================================================
   Content typography
   ============================================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    margin-bottom: 22px;
    color: var(--faint);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--gold-deep);
}

.crumb-sep {
    color: var(--border);
}

.docs-content h1 {
    font-size: 2.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 12px;
    color: var(--ink);
}

.docs-content .lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-soft);
}

.docs-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 44px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--ink);
}

.docs-content h3 {
    font-size: 1.08rem;
    font-weight: 650;
    margin: 30px 0 10px;
    color: var(--ink);
}

.docs-content p {
    margin: 0 0 15px;
    color: var(--ink-soft);
}

.docs-content ul,
.docs-content ol {
    margin: 0 0 18px;
    padding-left: 24px;
    color: var(--ink-soft);
}

.docs-content li {
    margin-bottom: 7px;
}

.docs-content li::marker {
    color: var(--gold-dark);
}

.docs-content strong {
    color: var(--ink);
    font-weight: 620;
}

.docs-content a {
    text-decoration: none;
    border-bottom: 1px solid var(--gold-tint-strong);
    transition: border-color 0.12s;
}

.docs-content a:hover {
    border-bottom-color: var(--gold);
}

section[id],
h2[id] {
    scroll-margin-top: calc(var(--header-h) + 20px);
}

/* Hover anchor on h2 */
.h-anchor {
    margin-left: 10px;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--faint);
    border-bottom: none !important;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}

h2:hover .h-anchor,
.h-anchor:focus-visible {
    opacity: 1;
}

.h-anchor:hover {
    color: var(--gold-dark);
}

/* ============================================================
   Code
   ============================================================ */

.docs-content code {
    font-family: var(--font-mono);
    font-size: 0.855em;
    background: var(--surface-warm);
    border: 1px solid var(--border-soft);
    color: var(--ink);
    padding: 2px 6px;
    border-radius: 5px;
}

.docs-content pre {
    position: relative;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    overflow-x: auto;
    margin: 0 0 20px;
    box-shadow: var(--shadow-1);
}

.docs-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--code-ink);
    font-size: 0.84rem;
    line-height: 1.6;
}

.code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    font: 600 0.7rem var(--font-sans);
    letter-spacing: 0.03em;
    color: #a9adb4;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}

pre:hover .code-copy,
.code-copy:focus-visible,
.code-copy.copied {
    opacity: 1;
}

.code-copy:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.code-copy.copied {
    color: var(--gold);
    border-color: rgba(201, 168, 104, 0.5);
}

/* ============================================================
   Tables
   ============================================================ */

.table-wrap {
    overflow-x: auto;
    margin: 0 0 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.docs-content th {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    text-align: left;
    color: var(--muted);
    background: var(--surface-warm);
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.docs-content td {
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    color: var(--ink-soft);
    vertical-align: top;
}

.docs-content tr:last-child td {
    border-bottom: none;
}

.docs-content tbody tr:nth-child(even) {
    background: var(--zebra);
}

.docs-content tbody tr:hover {
    background: var(--gold-tint);
}

/* ============================================================
   Callouts
   ============================================================ */

.callout {
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    background: var(--surface-warm);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 24px 0;
}

.callout .callout-title {
    font-weight: 700;
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold-deep);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.callout .callout-title::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
}

.callout p,
.callout ul,
.callout ol {
    margin-bottom: 6px;
}

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

.callout.note {
    border-left-color: var(--note-accent);
    background: var(--note-tint);
}

.callout.note .callout-title { color: var(--note-accent); }
.callout.note .callout-title::before { background: var(--note-accent); }

.callout.warning {
    border-left-color: var(--warn-accent);
    background: var(--warn-tint);
}

.callout.warning .callout-title { color: var(--warn-accent); }
.callout.warning .callout-title::before { background: var(--warn-accent); }

/* ============================================================
   Cards, topics, badges, buttons
   ============================================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 24px 0 32px;
}

.card {
    background: var(--surface);
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-2);
    transform: translateY(-1px);
}

.card h3 {
    font-size: 1rem;
    margin: 0 0 8px;
}

.card p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.card-link {
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: none !important;
}

.card-link::after {
    content: " \2192";
}

.topic-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 24px 0 32px;
}

.topic {
    background: var(--surface);
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.topic:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-2);
    transform: translateY(-1px);
}

.topic h3 {
    color: var(--gold-deep);
    margin: 0 0 8px;
    font-size: 1rem;
}

.topic h3::after {
    content: " \2192";
    opacity: 0;
    transition: opacity 0.15s;
}

.topic:hover h3::after {
    opacity: 1;
}

.topic p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: var(--gold-tint);
    color: var(--gold-deep);
    border: 1px solid var(--gold-tint-strong);
    vertical-align: middle;
}

.badge.live {
    background: #ecf6ee;
    color: #2e7d43;
    border-color: #cfe7d6;
}

html.uxc-dark-mode .badge.live {
    background: rgba(46, 125, 67, 0.16);
    color: #85c795;
    border-color: rgba(46, 125, 67, 0.4);
}

.badge.gray {
    background: var(--surface-warm);
    color: var(--muted);
    border-color: var(--border);
}

.btn {
    display: inline-block;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid var(--gold);
    border-radius: 999px;
    padding: 10px 22px;
    margin: 4px 10px 4px 0;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn:hover {
    background: var(--accent-fill-hover);
    color: var(--on-accent);
    box-shadow: var(--shadow-2);
}

.btn.solid {
    background: var(--accent-fill);
    border-color: var(--accent-fill);
    color: var(--on-accent);
}

.btn.solid:hover {
    background: var(--accent-fill-hover);
    border-color: var(--accent-fill-hover);
}

.btn.ghost {
    border-color: var(--border);
    color: var(--ink-soft);
}

.btn.ghost:hover {
    background: var(--surface-warm);
    color: var(--ink);
    box-shadow: none;
}

.doc-actions {
    margin: 4px 0 8px;
}

/* ============================================================
   Prev / next pager
   ============================================================ */

.pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--border-soft);
}

.pager-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pager-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-2);
}

.pager-card.next {
    text-align: right;
    align-items: flex-end;
}

.pager-card.placeholder {
    visibility: hidden;
}

.pager-dir {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--faint);
}

.pager-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ink);
}

.pager-card.next .pager-title::after { content: " \2192"; }
.pager-card.prev .pager-title::before { content: "\2190  "; }

/* ============================================================
   Footer
   ============================================================ */

.docs-footer {
    margin-left: var(--sidebar-w);
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 36px 40px;
}

.docs-footer-inner {
    max-width: var(--content-w);
    margin: 0 auto;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-brand img {
    display: block;
    height: 19px;
    width: auto;
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--gold-deep);
}

.footer-legal {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
    align-items: center;
}

.footer-legal p {
    font-size: 0.76rem;
    color: var(--faint);
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: var(--muted);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--gold-deep);
}

/* ============================================================
   Mobile drawer + scrim (js in assets/js/docs.js)
   ============================================================ */

.scrim {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 26, 0.45);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.2s;
}

body.nav-open .scrim {
    opacity: 1;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1280px) {
    .docs-toc {
        display: none;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    .brand-sep,
    .brand-docs {
        display: none;
    }

    .console-cta {
        display: none;
    }

    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: var(--shadow-3);
        z-index: 999;
        width: min(300px, 84vw);
    }

    body.nav-open .docs-sidebar {
        transform: translateX(0);
    }

    .docs-body {
        margin-left: 0;
        padding: 20px 16px 0;
    }

    .docs-content {
        padding: 28px 22px 34px;
        border-radius: var(--radius);
    }

    .docs-content h1 {
        font-size: 1.7rem;
    }

    .docs-content h2 {
        font-size: 1.25rem;
    }

    .docs-footer {
        margin-left: 0;
        padding: 28px 22px 36px;
    }

    .search-box {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .docs-header-inner {
        gap: 12px;
        padding: 0 14px;
    }

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

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

    .pager-card.placeholder {
        display: none;
    }
}

@media print {
    .docs-header,
    .docs-sidebar,
    .docs-toc,
    .console-cta,
    .pager,
    .code-copy {
        display: none !important;
    }

    .docs-body {
        margin-left: 0;
        padding: 0;
    }

    .docs-content {
        border: none;
        box-shadow: none;
        padding: 0;
        max-width: none;
    }
}

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

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