/* CallHub24 Yordam markazi — doc.callhub24.uz */
:root {
  --bg: #F6F7FA; --surface: #FFFFFF; --surface-2: #F1F3F7; --line: #E3E7EE; --line-soft: #EDF0F4;
  --ink: #0B1526; --ink-2: #3A4558; --muted: #5B6578; --faint: #7A8496;
  --brand: #1663F5; --brand-ink: #0F4FC7; --brand-soft: #EAF1FF; --navy: #0B1526;
  --ok: #12804A; --ok-soft: #E6F6EE; --warn: #8A5200; --warn-soft: #FFF4E0; --bad: #B42318; --bad-soft: #FDECEB;
  --code: #EEF1F6; --shadow: 0 1px 2px rgba(11,21,38,.05), 0 8px 24px rgba(11,21,38,.06);
  --top-h: 64px; --side-w: 272px; --toc-w: 220px; --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1117; --surface: #151A23; --surface-2: #1B212C; --line: #262D3A; --line-soft: #1F2632;
    --ink: #E8ECF3; --ink-2: #C3CAD6; --muted: #98A2B3; --faint: #7D8797;
    --brand: #5B9BFF; --brand-ink: #8AB8FF; --brand-soft: #16233B; --code: #1D2430;
    --ok: #4ADE80; --ok-soft: #0F2A1C; --warn: #FBBF5A; --warn-soft: #2B2211; --bad: #F87171; --bad-soft: #2E1515;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1117; --surface: #151A23; --surface-2: #1B212C; --line: #262D3A; --line-soft: #1F2632;
  --ink: #E8ECF3; --ink-2: #C3CAD6; --muted: #98A2B3; --faint: #7D8797;
  --brand: #5B9BFF; --brand-ink: #8AB8FF; --brand-soft: #16233B; --code: #1D2430;
  --ok: #4ADE80; --ok-soft: #0F2A1C; --warn: #FBBF5A; --warn-soft: #2B2211; --bad: #F87171; --bad-soft: #2E1515;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- yuqori panel ---------- */
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .mark { width: 30px; height: 30px; stroke: none; }
.wordmark { font: 800 19px/1 'Montserrat', sans-serif; letter-spacing: -.2px; }
.wordmark b { font-weight: 800; color: var(--ink); } .wordmark i { font-style: normal; color: #1A8CFC; }
.brand-sub { font-weight: 600; font-size: 14px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); }
.search { position: relative; flex: 1 1 auto; max-width: 520px; margin-left: 12px; }
.search > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 17px; pointer-events: none; }
.search input { width: 100%; height: 42px; padding: 0 40px 0 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  color: var(--ink); font: inherit; font-size: 15px; outline: none; transition: border-color .15s, background .15s; }
.search input:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); }
.kbd-hint { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
kbd { font: 600 12px/1 'Onest', sans-serif; padding: 4px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--muted); }
.results { position: absolute; left: 0; right: 0; top: 50px; max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px; }
.results a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.results a:hover, .results a[aria-selected="true"] { background: var(--brand-soft); text-decoration: none; }
.results .r-c { font-size: 12px; color: var(--faint); font-weight: 600; }
.results .r-t { font-weight: 700; } .results .r-x { font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.results mark { background: transparent; color: var(--brand); font-weight: 700; }
.results .empty { padding: 14px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang { display: flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.lang a { padding: 4px 10px; border-radius: 7px; font-weight: 700; font-size: 13px; color: var(--muted); }
.lang a:hover { text-decoration: none; color: var(--ink); }
.lang a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(11,21,38,.12); }
.theme-btn, .menu-btn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; }
.menu-btn { display: none; }
.btn-login { height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.btn-login:hover { color: #fff; text-decoration: none; filter: brightness(1.06); }

/* ---------- sahifa tuzilmasi ---------- */
.wrap { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w); max-width: 1440px; margin: 0 auto; }
.side { position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 24px 14px 40px 20px; border-right: 1px solid var(--line-soft); }
.side-group { margin-bottom: 18px; }
.side-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 6px 10px; }
.side-title .ic { font-size: 15px; color: var(--brand); }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; padding: 7px 10px 7px 33px; border-radius: 9px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.side li a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.side li a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.main { min-width: 0; padding: 36px 48px 64px; }
.toc { position: sticky; top: var(--top-h); align-self: start; padding: 36px 20px 20px 4px; font-size: 13.5px; }
.toc-title { font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.4; }
.toc li a:hover { color: var(--ink); text-decoration: none; }
.toc li a.active { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }

/* ---------- maqola ---------- */
.doc { max-width: 780px; }
.crumbs { font-size: 13.5px; color: var(--faint); display: flex; gap: 8px; margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.doc h1 { font-size: 36px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; margin: 0 0 12px; }
.lead { font-size: 18.5px; line-height: 1.6; color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 24px; line-height: 1.3; letter-spacing: -.01em; font-weight: 800; margin: 44px 0 12px; padding-top: 4px; position: relative; }
.doc h3 { font-size: 18.5px; font-weight: 700; margin: 30px 0 8px; position: relative; }
.anchor { position: absolute; left: -22px; color: var(--faint); opacity: 0; font-weight: 600; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; text-decoration: none; }
.doc p { margin: 0 0 16px; color: var(--ink-2); }
.doc strong { color: var(--ink); font-weight: 700; }
.doc ul, .doc ol { margin: 0 0 18px; padding-left: 22px; color: var(--ink-2); }
.doc li { margin: 6px 0; padding-left: 2px; }
.doc ol.steps { list-style: none; padding-left: 0; counter-reset: st; }
.doc ol.steps > li { counter-increment: st; position: relative; padding: 2px 0 6px 44px; margin: 0 0 10px; }
.doc ol.steps > li::before { content: counter(st); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
code { font: 500 .88em/1.4 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; background: var(--code); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
pre { background: var(--navy); color: #E6EDF7; padding: 16px 18px; border-radius: 12px; overflow-x: auto; margin: 0 0 18px; }
pre code { background: none; color: inherit; padding: 0; font-size: 13.5px; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 12.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; margin: 0 0 20px; border: 1px solid; }
.callout p { margin: 0 0 6px; color: inherit; } .callout p:last-child { margin: 0; }
.callout-ic { font-size: 19px; flex-shrink: 0; margin-top: 2px; }
.callout.tip { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ink); } .callout.tip .callout-ic { color: var(--ok); }
.callout.info { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--ink); } .callout.info .callout-ic { color: var(--brand); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--ink); } .callout.warn .callout-ic { color: var(--warn); }
.callout.danger { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); color: var(--ink); } .callout.danger .callout-ic { color: var(--bad); }

.shot { margin: 8px 0 26px; }
.shot-btn { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: zoom-in; box-shadow: var(--shadow); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: 13.5px; color: var(--faint); margin-top: 9px; text-align: center; }
.shot.phone .shot-btn { max-width: 320px; margin: 0 auto; border-radius: 28px; border: 8px solid #10151F; }

.help-box { max-width: 780px; margin: 48px 0 0; display: flex; align-items: center; gap: 20px; justify-content: space-between; padding: 22px 24px;
  border-radius: 16px; background: var(--navy); color: #fff; }
.help-box h2 { margin: 0 0 4px; font-size: 18px; color: #fff; } .help-box p { margin: 0; color: #B8C2D3; font-size: 14.5px; }
.btn { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 11px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.btn:hover { color: #fff; text-decoration: none; filter: brightness(1.08); }
.pager { max-width: 780px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.pager a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-weight: 700; }
.pager a span { display: block; font-size: 12.5px; font-weight: 600; color: var(--faint); margin-bottom: 2px; }
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager .next { text-align: right; grid-column: 2; }

/* ---------- bosh sahifa ---------- */
.is-home .wrap { grid-template-columns: var(--side-w) minmax(0, 1fr); }
.hero { padding: 48px 40px 44px; border-radius: 22px; background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(22,99,245,.45), transparent 70%); }
.hero h1 { margin: 0 0 10px; font-size: 40px; line-height: 1.15; letter-spacing: -.02em; position: relative; }
.hero p { margin: 0 0 26px; font-size: 18px; color: #B8C2D3; max-width: 620px; position: relative; }
.hero-search { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; height: 54px; padding: 0 18px; border: 0; border-radius: 14px;
  background: #fff; color: #5B6578; font: inherit; font-size: 15.5px; cursor: text; text-align: left; }
.hero-search svg { font-size: 19px; color: #7A8496; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 28px 0 8px; }
.cat { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.cat:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.cat-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 6px; }
.cat-t { font-weight: 800; font-size: 17px; } .cat-d { color: var(--muted); font-size: 14.5px; line-height: 1.5; flex: 1; } .cat-n { font-size: 12.5px; font-weight: 700; color: var(--faint); }
.popular { margin-top: 32px; } .popular h2 { font-size: 20px; margin: 0 0 12px; }
.popular ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 20px; }
.popular li a { display: flex; align-items: center; gap: 8px; padding: 9px 0; color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.popular li a::before { content: '→'; color: var(--brand); }
.is-home .help-box { max-width: none; }

/* ---------- rasmni kattalashtirish ---------- */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(6,10,18,.88); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox button { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- moslashuvchan ---------- */
@media (max-width: 1240px) { .wrap { grid-template-columns: var(--side-w) minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 900px) {
  :root { --top-h: 58px; }
  .menu-btn { display: inline-flex; }
  .brand-sub, .kbd-hint, .btn-login { display: none; }
  .top { gap: 10px; padding: 0 12px; }
  .search { margin-left: 0; }
  .wrap, .is-home .wrap { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: var(--top-h); left: 0; bottom: 0; width: min(86vw, 320px); height: auto; z-index: 25; background: var(--surface); transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
  body.side-open .side { transform: none; }
  .main { padding: 24px 16px 48px; }
  .doc h1 { font-size: 28px; } .lead { font-size: 17px; } .doc h2 { font-size: 21px; }
  .hero { padding: 32px 22px; } .hero h1 { font-size: 29px; } .hero p { font-size: 16px; }
  .help-box { flex-direction: column; align-items: flex-start; }
  .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; }
  .anchor { display: none; }
}
@media (max-width: 560px) { .wordmark { display: none; } .theme-btn { display: none; } }
@media print { .top, .side, .toc, .help-box, .pager { display: none; } .wrap { display: block; } }
