/* =============================================================
   S&G USER GUIDES
   The StudioOne support-site LAYOUT (3-column, sticky nav, doc
   sections, spec cards, callouts) rendered in S&G's palette.

   Colours come from /assets/css/tokens.css, which is loaded first —
   so the seasonal accent themes and light mode work here for free.
   The few names below are local aliases onto those tokens; never
   hard-code a brand colour in this file.
   ============================================================= */

:root {
    --g-nav-h:     70px;
    --g-sidebar-w: 268px;
    --g-toc-w:     240px;
    --g-panel:     var(--surface);
    --g-line:      var(--line);
    --g-line-soft: var(--line-soft);
    --g-ok:        #3ddc84;
    --g-warn:      var(--gold);
    --g-bad:       #ff5b6e;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(58% 48% at 100% -6%, var(--accent-tint), transparent 56%),
        radial-gradient(54% 44% at -6% 106%, rgba(150,24,70,.10), transparent 56%),
        var(--ink);
    background-attachment: fixed;
    color: var(--text);
    font: 400 16px/1.75 var(--font-body), system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   TOP NAV
   ============================================================ */
.top-nav {
    position: sticky; top: 0; z-index: 100;
    height: var(--g-nav-h);
    display: flex; align-items: center; gap: 26px;
    padding: 0 26px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--g-line);
}
.nav-logo {
    font-family: var(--font-display), system-ui, sans-serif;
    font-weight: 700; font-size: 1.02rem; letter-spacing: .04em;
    color: var(--text); white-space: nowrap;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo b { color: var(--accent); }

.nav-search { position: relative; flex: 1; max-width: 520px; }
.nav-search > i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--dim); font-size: .85rem; pointer-events: none;
}
.nav-search input {
    width: 100%; padding: 10px 74px 10px 38px;
    background: var(--surface-2); border: 1px solid var(--g-line);
    border-radius: var(--pill); color: var(--text);
    font: inherit; font-size: .88rem; outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.nav-search input::placeholder { color: var(--dim); }
.nav-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.shortcut-badge {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    font-size: .62rem; font-weight: 700; letter-spacing: .06em;
    color: var(--dim); background: var(--surface); border: 1px solid var(--g-line);
    border-radius: 6px; padding: 3px 7px; pointer-events: none;
}

.nav-links { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-link {
    color: var(--muted); font-size: .86rem; font-weight: 500;
    padding: 8px 12px; border-radius: var(--pill); white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--accent); color: #fff;
    font-size: .84rem; font-weight: 600;
    padding: 9px 16px; border-radius: var(--pill); white-space: nowrap;
}
.nav-btn:hover { background: var(--accent-deep); text-decoration: none; }

/* ============================================================
   SEARCH DROPDOWN
   ============================================================ */
.search-results-dropdown {
    display: none; position: absolute; top: calc(100% + 9px); left: 0; right: 0;
    max-height: 62vh; overflow-y: auto; z-index: 200;
    background: var(--surface); border: 1px solid var(--g-line);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 6px;
}
.result-group {
    font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--dim); padding: 10px 12px 6px;
}
.result-item {
    display: block; padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text); font-size: .86rem;
}
.result-item:hover { background: var(--surface-2); text-decoration: none; }
.result-cat { display: block; font-size: .68rem; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.result-title { font-weight: 600; }
.result-snippet { display: block; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.result-snippet mark, mark.search-hit {
    background: var(--accent-tint); color: var(--text);
    border-radius: 3px; padding: 0 2px;
}
.result-empty { padding: 16px 12px; color: var(--dim); font-size: .86rem; text-align: center; }

/* ============================================================
   3-COLUMN LAYOUT
   ============================================================ */
.layout-wrapper {
    display: grid;
    grid-template-columns: var(--g-sidebar-w) minmax(0, 1fr) var(--g-toc-w);
    gap: 34px;
    max-width: 1520px; margin: 0 auto; padding: 34px 26px 0;
    align-items: start;
}

/* ---- left sidebar ---- */
.left-sidebar {
    position: sticky; top: calc(var(--g-nav-h) + 26px);
    max-height: calc(100vh - var(--g-nav-h) - 46px);
    overflow-y: auto; padding-right: 6px;
    scrollbar-width: thin;
}
.cat-group { margin-bottom: 6px; }
.cat-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted); cursor: pointer; list-style: none;
}
.cat-toggle::-webkit-details-marker { display: none; }
.cat-toggle:hover { background: var(--surface-2); color: var(--text); }
.cat-icon { color: var(--accent); font-size: .82rem; width: 16px; text-align: center; }
.cat-chevron { margin-left: auto; font-size: .68rem; transition: transform .2s; }
.cat-group[open] > .cat-toggle .cat-chevron { transform: rotate(180deg); }

.dir-link {
    display: block; padding: 8px 12px 8px 38px;
    color: var(--muted); font-size: .88rem;
    border-left: 2px solid transparent; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.dir-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.dir-link.active {
    color: var(--accent); background: var(--accent-tint);
    border-left-color: var(--accent); font-weight: 600;
}
.dir-link .ext { font-size: .62rem; opacity: .6; margin-left: 3px; }

/* ---- main column ---- */
.main-content { min-width: 0; padding-bottom: 80px; }

.breadcrumb {
    font-size: .8rem; color: var(--dim); margin-bottom: 26px;
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.doc-section { margin-bottom: 62px; scroll-margin-top: 100px; }
.doc-section > h1 {
    font-family: var(--font-display), system-ui, sans-serif;
    font-size: 2.35rem; font-weight: 700; line-height: 1.15;
    margin: 0 0 16px; letter-spacing: -.02em;
}
.doc-section h2 {
    font-family: var(--font-display), system-ui, sans-serif;
    font-size: 1.42rem; font-weight: 700; line-height: 1.3;
    margin: 42px 0 14px; padding-bottom: 11px;
    border-bottom: 1px solid var(--g-line-soft);
}
.doc-section h3 {
    font-family: var(--font-display), system-ui, sans-serif;
    font-size: 1.06rem; font-weight: 600; margin: 28px 0 10px;
}
.doc-section p  { color: var(--muted); margin: 0 0 15px; }
.doc-section ul, .doc-section ol { color: var(--muted); margin: 0 0 16px; padding-left: 22px; }
.doc-section li { margin-bottom: 8px; }
.doc-section strong { color: var(--text); font-weight: 600; }

.gradText {
    display: inline-block; margin-bottom: 10px;
    font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
    background: linear-gradient(90deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Inline UI labels — "tap <mark>Customize</mark>" */
.doc-section mark, mark.ui {
    background: var(--accent-tint); color: var(--accent-light);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: 6px; padding: 1px 7px;
    font-size: .9em; font-weight: 600; white-space: nowrap;
}

code, .code-badge {
    font-family: var(--font-mono), ui-monospace, monospace;
    font-size: .86em; background: var(--surface-2);
    border: 1px solid var(--g-line); border-radius: 6px;
    padding: 2px 8px; color: var(--accent-light);
}

/* ---- right sidebar (on this page + update log) ---- */
.right-sidebar {
    position: sticky; top: calc(var(--g-nav-h) + 26px);
    max-height: calc(100vh - var(--g-nav-h) - 46px);
    overflow-y: auto; font-size: .84rem; scrollbar-width: thin;
}
.toc-title {
    font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--dim); margin-bottom: 12px;
}
.toc-link {
    display: block; padding: 6px 0 6px 13px; color: var(--muted);
    border-left: 2px solid var(--g-line); line-height: 1.45;
}
.toc-link:hover { color: var(--text); text-decoration: none; }
.toc-link.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc-link.sub { padding-left: 26px; font-size: .95em; }

/* ============================================================
   CONTENT COMPONENTS
   ============================================================ */
.spec-card {
    background: var(--g-panel); border: 1px solid var(--g-line);
    border-radius: var(--radius); padding: 20px 22px;
}
.spec-card h3 { margin-top: 0; }
.spec-card p:last-child { margin-bottom: 0; }

.card-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 26px 0; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 26px 0; }

/* Callouts. .pro-tip is the friendly one; the other three escalate. */
.pro-tip, .alert-box, .warn-box, .danger-box {
    border: 1px solid var(--g-line); border-left: 3px solid var(--accent);
    background: var(--accent-tint);
    border-radius: var(--radius); padding: 16px 20px; margin: 24px 0;
    color: var(--muted); font-size: .92rem; line-height: 1.65;
}
.pro-tip  > i:first-child, .alert-box > i:first-child,
.warn-box > i:first-child, .danger-box > i:first-child { color: var(--accent); margin-right: 7px; }
.pro-tip strong, .alert-box strong, .warn-box strong, .danger-box strong { color: var(--text); }

.alert-box  { border-left-color: var(--blue, #5aa6ff); background: rgba(90,166,255,.09); }
.alert-box  > i:first-child { color: var(--blue, #5aa6ff); }
.warn-box   { border-left-color: var(--g-warn); background: var(--gold-tint); }
.warn-box   > i:first-child { color: var(--g-warn); }
.danger-box { border-left-color: var(--g-bad); background: rgba(255,91,110,.09); }
.danger-box > i:first-child { color: var(--g-bad); }

/* Tables */
.doc-section table {
    width: 100%; border-collapse: collapse; margin: 22px 0;
    font-size: .9rem; background: var(--g-panel);
    border: 1px solid var(--g-line); border-radius: var(--radius); overflow: hidden;
}
.doc-section th {
    text-align: left; padding: 12px 16px;
    background: var(--surface-2); color: var(--text);
    font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    border-bottom: 1px solid var(--g-line);
}
.doc-section td { padding: 12px 16px; color: var(--muted); border-bottom: 1px solid var(--g-line-soft); }
.doc-section tr:last-child td { border-bottom: none; }
.doc-section td strong { color: var(--text); }
.table-scroll { overflow-x: auto; margin: 22px 0; }
.table-scroll table { margin: 0; }

/* Menu path breadcrumb — "Customize › Sound › Select" */
.menu-path {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px;
    font-size: .86rem; font-weight: 600;
    background: var(--surface-2); border: 1px solid var(--g-line);
    border-radius: var(--pill); padding: 5px 14px; margin: 2px 0;
    color: var(--text);
}
.menu-path i { color: var(--dim); font-size: .62rem; }

/* Numbered steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 26px 0; }
.steps > li {
    counter-increment: s; position: relative;
    padding: 0 0 22px 52px; margin: 0;
    border-left: 2px solid var(--g-line);
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
    content: counter(s);
    position: absolute; left: -17px; top: -2px;
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--accent); color: #fff;
    font-family: var(--font-display), system-ui, sans-serif;
    font-size: .86rem; font-weight: 700;
}
.steps h3 { margin: 0 0 6px; }
.steps p  { margin-bottom: 10px; }

/* Images / diagrams */
.diagram-img, .hero-img {
    max-width: 100%; height: auto; display: block;
    border: 1px solid var(--g-line); border-radius: var(--radius);
    margin: 22px 0; background: var(--surface-2);
}
/* Phone screenshots (the Lovense app steps) are portrait and shot at full phone
   resolution, so at full width they dwarf the text. Cap and centre them instead.
   Inside a <figure> the vertical margin is dropped so the caption sits close. */
.shot-phone { max-width: 250px; margin-left: auto; margin-right: auto; }
.shot-wide  { max-width: 560px; margin-left: auto; margin-right: auto; }
figure > .shot-phone, figure > .shot-wide { margin: 0 auto; }
figure { margin: 26px 0; }
figcaption { color: var(--dim); font-size: .82rem; text-align: center; margin-top: 10px; }

/* ---- screenshot placeholders ----------------------------------------------
   Drop-in slots for pictures that haven't been taken yet. Replace the whole
   <div class="shot-todo"> with an <img class="diagram-img"> (plus a <figcaption>
   if it needs one) and nothing else has to change. */
.shot-todo {
    display: grid; place-items: center; gap: 8px;
    min-height: 150px; padding: 26px 22px; text-align: center;
    border: 1px dashed color-mix(in srgb, var(--accent) 42%, transparent);
    border-radius: var(--radius); background: var(--accent-tint);
    color: var(--muted); font-size: .84rem; margin: 0;
}
.shot-todo i { font-size: 1.5rem; color: var(--accent); opacity: .75; }
.shot-todo b { display: block; color: var(--text); font-size: .9rem; }
.shot-todo span { display: block; max-width: 46ch; line-height: 1.55; }
.shot-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px; margin: 24px 0;
}
.shot-row figure { margin: 0; }

/* Tighter gaps when a row is packed to a fixed count (see the .cols-* utilities). */
.shot-row.cols-4 { gap: 14px; }
.shot-row.cols-5 { gap: 12px; }
.shot-row.cols-7 { gap: 10px; }   /* seven across is tight — claw back what the gaps were taking */

/* Slimmer tile for a 5-across row — at ~145px there is no room for the full card. */
.shot-todo.is-compact { min-height: 116px; padding: 18px 10px; gap: 6px; }
.shot-todo.is-compact i { font-size: 1.2rem; }
.shot-todo.is-compact b { font-size: .8rem; }

@media (max-width: 620px) { .shot-row { grid-template-columns: 1fr; } }

/* ---- the arousal gauge (a labelled 0-100% bar) ---- */
.gauge { margin: 30px 0 38px; }
.gauge-bar {
    position: relative; height: 26px; border-radius: var(--pill);
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--accent) 18%, var(--surface-2)) 0%,
        var(--accent) 45%,
        var(--accent-light) 100%);
    border: 1px solid var(--g-line);
}
.gauge-mark { position: absolute; top: -7px; bottom: -7px; width: 2px; background: var(--text); opacity: .55; }
.gauge-mark span {
    position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
    font-size: .68rem; font-weight: 700; color: var(--text); white-space: nowrap;
}
.gauge-legend {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px; margin-top: 30px;
}
.gauge-legend div {
    background: var(--g-panel); border: 1px solid var(--g-line);
    border-radius: var(--radius-sm); padding: 12px 14px; font-size: .84rem; color: var(--muted);
}
.gauge-legend b { display: block; color: var(--accent); font-size: .78rem; margin-bottom: 3px; }

/* ---- fixed-count grid utilities -------------------------------------------
   For sets the reader is meant to COMPARE, where auto-fit's wrapping breaks the
   comparison: it drops to the next line the moment the items hit their minimum,
   so five firmness tiles split 4 + 1 and six gauge bands split 5 + 1.

   minmax(0, 1fr) rather than 1fr so columns may shrink BELOW their content width
   instead of overflowing the page.

   These must stay AFTER .shot-row and .gauge-legend: a bare .cols-6 ties with
   .gauge-legend on specificity (0,1,0), so source order is what makes it win.
   Applies to any grid container, so a future row just needs the class. */
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }

@media (max-width: 1100px) {
    .cols-5, .cols-6, .cols-7 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    /* Below this a 5- or 6-across tile is under ~120px, which is unreadable. */
    .cols-3, .cols-4, .cols-5, .cols-6, .cols-7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- timeline (the cum-model worked example) ---- */
.timeline { list-style: none; padding: 0; margin: 28px 0; }
.timeline > li {
    position: relative; padding: 0 0 26px 78px; margin: 0;
    border-left: 2px solid var(--g-line);
}
.timeline > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline > li::before {
    content: attr(data-t);
    position: absolute; left: -34px; top: -3px;
    width: 66px; text-align: right;
    font-family: var(--font-mono), monospace; font-size: .76rem; font-weight: 600;
    color: var(--accent);
}
.timeline > li::after {
    content: ''; position: absolute; left: -5px; top: 6px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.timeline b { color: var(--text); }
.timeline .t-note { display: block; color: var(--dim); font-size: .84rem; margin-top: 3px; }

/* ============================================================
   LIBRARY (guides/index.php)
   ============================================================ */
.lib-hero { margin-bottom: 44px; }
.lib-hero h1 {
    font-family: var(--font-display), system-ui, sans-serif;
    font-size: 2.5rem; font-weight: 700; margin: 0 0 12px; letter-spacing: -.02em;
}
.lib-hero p { color: var(--muted); font-size: 1.02rem; max-width: 60ch; }
.lib-search { position: relative; max-width: 520px; margin-top: 26px; }
.lib-search > i {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--dim); pointer-events: none;
}
.lib-search input {
    width: 100%; padding: 14px 18px 14px 44px;
    background: var(--surface-2); border: 1px solid var(--g-line);
    border-radius: var(--pill); color: var(--text); font: inherit; outline: none;
}
.lib-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

.category-title {
    display: flex; align-items: center; gap: 11px;
    font-family: var(--font-display), system-ui, sans-serif;
    font-size: 1.2rem; font-weight: 700;
    margin: 46px 0 20px; scroll-margin-top: 100px;
}
.category-title i { color: var(--accent); font-size: 1rem; }

.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.guide-card {
    display: flex; flex-direction: column;
    background: var(--g-panel); border: 1px solid var(--g-line);
    border-radius: var(--radius); overflow: hidden;
    color: inherit; transition: border-color .18s, transform .18s;
}
.guide-card:hover {
    border-color: var(--accent); transform: translateY(-3px); text-decoration: none;
}
.card-img-wrapper { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    font-size: 2.2rem; color: var(--accent); background: var(--accent-tint);
}
.guide-card .gc-body { padding: 18px 20px 20px; }
.guide-card h3 { font-family: var(--font-display), system-ui, sans-serif; font-size: 1.02rem; margin: 0 0 7px; }
.guide-card p  { color: var(--muted); font-size: .86rem; margin: 0; line-height: 1.6; }
.gc-go { margin-top: 14px; font-size: .82rem; font-weight: 600; color: var(--accent); }

/* ============================================================
   UPDATE LOG (right sidebar)
   ============================================================ */
.log-item { position: relative; padding: 0 0 20px 20px; border-left: 2px solid var(--g-line); }
.log-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.log-dot {
    position: absolute; left: -5px; top: 5px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.log-version { font-weight: 700; color: var(--text); font-size: .86rem; }
.log-date    { color: var(--dim); font-size: .74rem; margin-bottom: 6px; }
.log-notes   { margin: 0; padding-left: 16px; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.log-notes li { margin-bottom: 4px; }

/* ============================================================
   FOOTER + BACK TO TOP
   ============================================================ */
.guides-footer {
    border-top: 1px solid var(--g-line);
    margin-top: 40px; padding: 60px 24px 48px; text-align: center;
}
.gf-brand {
    font-family: var(--font-display), system-ui, sans-serif;
    font-weight: 700; letter-spacing: .05em; color: var(--muted); margin-bottom: 26px;
}
.gf-brand b { color: var(--accent); }
.gf-pills { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.social-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface-2); border: 1px solid var(--g-line);
    border-radius: var(--pill); padding: 9px 17px;
    color: var(--muted); font-size: .84rem; font-weight: 500;
}
.social-pill:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.gf-note { color: var(--dim); font-size: .8rem; line-height: 1.7; margin: 0; }

.back-to-top {
    position: fixed; bottom: 30px; right: 30px; z-index: 99;
    width: 48px; height: 48px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    background: var(--accent); color: #fff; border: none;
    cursor: pointer; box-shadow: var(--shadow);
}
.back-to-top:hover { background: var(--accent-deep); }

/* ============================================================
   FOCUS VISIBILITY
   ============================================================ */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
.nav-btn:focus-visible { outline-color: #fff; outline-offset: -3px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
    .layout-wrapper { grid-template-columns: var(--g-sidebar-w) minmax(0, 1fr); }
    .right-sidebar  { display: none; }
}
@media (max-width: 900px) {
    .layout-wrapper { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 22px 18px 0; }
    .left-sidebar {
        position: static; max-height: none; overflow: visible;
        margin-bottom: 26px; padding: 14px;
        background: var(--g-panel); border: 1px solid var(--g-line); border-radius: var(--radius);
    }
    .card-grid, .card-grid-3 { grid-template-columns: 1fr; }
    .doc-section > h1 { font-size: 1.85rem; }
    .doc-section h2   { font-size: 1.24rem; }
    .lib-hero h1      { font-size: 1.95rem; }
}
@media (max-width: 760px) {
    .top-nav { gap: 12px; padding: 0 14px; }
    .nav-search { max-width: none; }
    .shortcut-badge { display: none; }
    .nav-links .nav-link { display: none; }
    .steps > li    { padding-left: 42px; }
    .timeline > li { padding-left: 20px; border-left: 2px solid var(--g-line); }
    .timeline > li::before { position: static; display: block; width: auto; text-align: left; margin-bottom: 3px; }
    .timeline > li::after  { left: -5px; top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .guide-card:hover { transform: none; }
}
