/* RepOcean help center (/doc). Same tokens as the app (assets/css/app.css). */
:root {
    --primary: #0d6efd;
    --primary-text: #0a58ca;
    --primary-soft: #eaf2ff;
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text: #19212e;
    --muted: #647082;
    --line: #e6e9ef;
    --success: #16803c;
    --danger: #d7263d;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body.doc { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.doc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.doc-skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 12px; background: var(--surface); border-radius: 8px; }
.doc-skip:focus { left: 8px; }

/* Buttons */
.doc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--primary); font-weight: 600; font-size: 14px; white-space: nowrap; }
.doc-btn:hover { text-decoration: none; }
.doc-btn-primary { background: var(--primary); color: #fff; }
.doc-btn-primary:hover { background: #0b5ed7; color: #fff; }

/* Top bar */
.doc-top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--line); }
.doc-top-in { max-width: 1280px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.doc-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; white-space: nowrap; }
.doc-brand:hover { text-decoration: none; }
.doc-brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.doc-brand-sub { color: var(--muted); font-weight: 500; }
.doc-search { position: relative; flex: 1 1 auto; max-width: 560px; margin-left: auto; }
.doc-search input { width: 100%; height: 40px; padding: 0 40px 0 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; color: var(--text); }
.doc-search input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px rgba(13, 110, 253, .15); }
.doc-search-icon { position: absolute; left: 13px; top: 12px; color: var(--muted); font-size: 14px; }
.doc-search-kbd { position: absolute; right: 10px; top: 9px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; font: 12px/18px inherit; color: var(--muted); background: var(--surface); }
.doc-results { position: absolute; left: 0; right: 0; top: 46px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .14); max-height: 70vh; overflow: auto; }
.doc-results a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); }
.doc-results a:hover, .doc-results li.is-active a { background: var(--primary-soft); text-decoration: none; }
.doc-results strong { display: block; font-weight: 600; }
.doc-results span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-results-none { padding: 12px; color: var(--muted); font-size: 14px; }

/* Home */
.doc-hero { background: linear-gradient(180deg, var(--primary-soft), var(--bg)); border-bottom: 1px solid var(--line); }
.doc-hero-in { max-width: 860px; margin: 0 auto; padding: 56px 24px 40px; text-align: center; }
.doc-hero h1 { margin: 0 0 10px; font-size: 36px; line-height: 1.2; letter-spacing: -.02em; }
.doc-hero p { margin: 0 auto 20px; max-width: 620px; color: var(--muted); font-size: 17px; }
.doc-popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 14px; }
.doc-popular span { color: var(--muted); }
.doc-popular a { padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.doc-popular a:hover { border-color: var(--primary); color: var(--primary-text); text-decoration: none; }
.doc-wrap { max-width: 1280px; margin: 0 auto; padding: 32px 24px 48px; }
.doc-start { display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin-bottom: 28px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: var(--radius); box-shadow: var(--shadow); }
.doc-start > div { flex: 1 1 auto; }
.doc-start h2 { margin: 0 0 2px; font-size: 17px; }
.doc-start p { margin: 0; color: var(--muted); }
.doc-start-icon, .doc-topic-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); font-size: 18px; }
.doc-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.doc-topic { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.doc-topic-head { display: flex; gap: 14px; margin-bottom: 14px; }
.doc-topic h2 { margin: 0 0 2px; font-size: 17px; }
.doc-topic-head p { margin: 0; color: var(--muted); font-size: 14px; }
.doc-topic ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc-topic li a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 14px; }
.doc-topic li:last-child a { border-bottom: 0; }
.doc-topic li a::after { content: "\203A"; float: right; color: var(--muted); }
.doc-topic li a:hover { color: var(--primary-text); text-decoration: none; }

/* Article page */
.doc-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 40px; align-items: start; }
.doc-aside { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 4px; }
.doc-nav-toggle { display: none; }
.doc-nav-group { margin-bottom: 18px; }
.doc-nav-title { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.doc-nav-title i { width: 16px; text-align: center; }
.doc-nav ul { list-style: none; margin: 0; padding: 0; }
.doc-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); font-size: 14px; line-height: 1.4; }
.doc-nav a:hover { background: var(--surface); text-decoration: none; }
.doc-nav a.is-active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.doc-article { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 44px; }
.doc-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.doc-crumbs i { font-size: 9px; }
.doc-article h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.25; letter-spacing: -.015em; }
.doc-lede { margin: 0 0 28px; font-size: 17px; color: var(--muted); }
.doc-aside-right { position: sticky; top: 80px; }
.doc-toc-title { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.doc-toc { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.doc-toc a { display: block; padding: 4px 0; color: var(--muted); font-size: 13px; }
.doc-toc a:hover { color: var(--primary-text); text-decoration: none; }

/* Article body building blocks */
.doc-body h2 { margin: 36px 0 12px; font-size: 21px; line-height: 1.3; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { margin: 24px 0 8px; font-size: 17px; }
.doc-body p { margin: 0 0 14px; }
.doc-body ul, .doc-body ol { margin: 0 0 16px; padding-left: 22px; }
.doc-body li { margin-bottom: 6px; }
.doc-body li > ul, .doc-body li > ol { margin: 6px 0 0; }
.doc-body strong { font-weight: 600; }
.ui { display: inline-block; padding: 0 7px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; line-height: 1.6; color: var(--text); white-space: nowrap; }
ol.doc-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 20px; }
ol.doc-steps > li { position: relative; counter-increment: step; padding: 2px 0 12px 44px; margin: 0; }
ol.doc-steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
ol.doc-steps > li::after { content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 2px; width: 1px; background: var(--line); }
ol.doc-steps > li:last-child::after { display: none; }
.doc-tip, .doc-note, .doc-warn { display: flex; gap: 12px; padding: 14px 16px; margin: 0 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.doc-tip > i, .doc-note > i, .doc-warn > i { margin-top: 4px; }
.doc-tip > div, .doc-note > div, .doc-warn > div { flex: 1 1 auto; min-width: 0; }
.doc-tip > div > :last-child, .doc-note > div > :last-child, .doc-warn > div > :last-child { margin-bottom: 0; }
.doc-tip { background: var(--primary-soft); border-color: transparent; }
.doc-tip > i { color: var(--primary); }
.doc-note > i { color: var(--muted); }
.doc-warn { border-left: 3px solid var(--danger); }
.doc-warn > i { color: var(--danger); }
.doc-body table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; }
.doc-body th, .doc-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-body th { background: var(--bg); font-weight: 600; }
.doc-body details { margin: 0 0 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; }
.doc-body details[open] { background: var(--bg); }
.doc-body summary { cursor: pointer; font-weight: 600; }
.doc-body details > :not(summary) { margin-top: 10px; }
.doc-body code { padding: 1px 6px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; }

.doc-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 32px 0 0; padding: 18px 20px; border-radius: 12px; background: var(--primary-soft); }
.doc-cta strong { display: block; }
.doc-cta span { color: var(--muted); font-size: 14px; }
.doc-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc-pager a { display: flex; flex-direction: column; max-width: 48%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.doc-pager a:hover { border-color: var(--primary); text-decoration: none; }
.doc-pager span { font-size: 12px; color: var(--muted); }
.doc-pager strong { font-weight: 600; color: var(--primary-text); }
.doc-pager-next { margin-left: auto; text-align: right; }

.doc-foot { border-top: 1px solid var(--line); background: var(--surface); }
.doc-foot-in { max-width: 1280px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; }

@media (max-width: 1199.98px) {
    .doc-grid { grid-template-columns: 240px minmax(0, 1fr); }
    .doc-aside-right { display: none; }
}
@media (max-width: 991.98px) {
    .doc-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .doc-grid { grid-template-columns: 1fr; gap: 16px; }
    .doc-aside { position: static; max-height: none; overflow: visible; }
    .doc-nav-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }
    .doc-nav { display: none; margin-top: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
    .doc-nav.is-open { display: block; }
}
@media (max-width: 640px) {
    body.doc { font-size: 16px; }
    .doc-top-in { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
    .doc-search { order: 3; flex-basis: 100%; max-width: none; }
    .doc-search-kbd { display: none; }
    .doc-top-app { margin-left: auto; padding: 7px 12px; }
    .doc-hero-in { padding: 36px 16px 28px; }
    .doc-hero h1 { font-size: 28px; }
    .doc-wrap { padding: 20px 16px 36px; }
    .doc-topics { grid-template-columns: 1fr; }
    .doc-start { flex-wrap: wrap; }
    .doc-start .doc-btn { width: 100%; }
    .doc-article { padding: 24px 18px; }
    .doc-article h1 { font-size: 25px; }
    .doc-cta { flex-direction: column; align-items: stretch; }
    .doc-pager { flex-direction: column; }
    .doc-pager a { max-width: none; }
    html { scroll-padding-top: 130px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
