:root {
  --llh-panel: #171c22;
  --llh-panel-soft: #1d232a;
  --llh-canvas: #202329;
  --llh-line: #303943;
  --llh-text: #f4f7fb;
  --llh-muted: #9aa6b2;
  --llh-bid: #42dc9a;
  --llh-ask: #ff6b7f;
  --llh-blue: #7abcf5;
}

.limit-liquidity-page { min-width: 0; padding-bottom: 72px; }
.llh-hero { display: grid; gap: 18px; padding: 24px 0 18px; }
.llh-hero h1 { max-width: 980px; margin: 5px 0 10px; color: var(--llh-text); font-size: clamp(30px, 4.2vw, 52px); line-height: 1.05; }
.llh-hero .section-lead { max-width: 920px; margin: 0; color: var(--llh-muted); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.55; }
.llh-disclaimer { max-width: 980px; margin: 0; padding: 13px 15px; border: 1px solid color-mix(in srgb, #f5ba55 52%, var(--llh-line)); border-radius: 12px; color: #f4d9a7; background: color-mix(in srgb, #f5ba55 8%, var(--llh-panel)); font-size: 13px; line-height: 1.55; }

.llh-filter-shell,
.llh-chart-card,
.llh-history,
.llh-detail,
.llh-summary article,
.llh-seo-card { border: 1px solid var(--llh-line); background: var(--llh-panel); }
.llh-filter-shell { padding: 14px; border-radius: 18px; }
.llh-filter-shell summary { display: none; color: var(--llh-text); font-weight: 800; cursor: pointer; }
.llh-filters { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 10px; align-items: start; }
.llh-filters label { display: grid; gap: 6px; min-width: 0; color: var(--llh-muted); font-size: 11px; font-weight: 800; }
.llh-filters select,
.llh-filters input[type="number"],
.llh-filters .llh-coin-search { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--llh-line); border-radius: 10px; color: var(--llh-text); background: var(--llh-panel-soft); font: inherit; font-size: 13px; }
.llh-filters select:focus,
.llh-filters input[type="number"]:focus,
.llh-filters .llh-coin-search:focus { border-color: var(--llh-blue) !important; outline: none !important; box-shadow: none !important; }
.llh-filters input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.llh-filters input[type="number"]::-webkit-inner-spin-button,
.llh-filters input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; appearance: none; }
.llh-coin-field { position: relative; }
.llh-coin-field small { min-height: 14px; color: var(--llh-muted); font-size: 9px; font-weight: 600; line-height: 1.35; }
.llh-coin-combobox { position: relative; min-width: 0; }
.llh-coin-search:invalid { border-color: var(--llh-ask) !important; }
.llh-coin-combobox:focus-within .llh-coin-search { border-color: var(--llh-blue) !important; outline: none !important; box-shadow: none !important; }
.llh-coin-listbox { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(300px, calc(100vw - 40px)); max-height: 256px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 6px; border: 1px solid var(--llh-line); border-radius: 12px; background: var(--llh-panel-soft); box-shadow: 0 18px 42px rgb(0 0 0 / 42%); scrollbar-gutter: stable; }
.llh-coin-listbox[hidden] { display: none; }
.llh-coin-list-title { position: sticky; z-index: 1; top: -6px; margin: -6px -6px 4px; padding: 9px 10px 7px; color: var(--llh-muted); background: var(--llh-panel-soft); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.llh-coin-option { display: grid; width: 100%; min-height: 44px; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--llh-text); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.llh-coin-option strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.llh-coin-option span { color: var(--llh-muted); font-size: 10px; font-weight: 800; }
.llh-coin-option:hover,
.llh-coin-option.is-active { border-color: color-mix(in srgb, var(--llh-blue) 55%, var(--llh-line)); background: color-mix(in srgb, var(--llh-blue) 14%, var(--llh-panel-soft)); }
.llh-coin-option[aria-selected="true"] span { color: var(--llh-blue); }
.llh-coin-empty { padding: 12px 10px; color: var(--llh-muted); font-size: 11px; font-weight: 600; line-height: 1.45; }
.llh-check { display: flex !important; grid-column: span 1; flex-direction: row !important; align-items: center; min-height: 44px; padding: 0 10px; border: 1px solid var(--llh-line); border-radius: 10px; background: var(--llh-panel-soft); }
.llh-check input { width: 18px; height: 18px; margin: 0 8px 0 0; accent-color: var(--llh-blue); }
.llh-filters .btn { min-height: 44px; white-space: nowrap; }
.llh-filters .btn:disabled { opacity: .6; cursor: wait; }

.llh-status { min-height: 22px; margin: 0; color: var(--llh-muted); font-size: 13px; }
.llh-status[data-state="ready"] { color: var(--llh-bid); }
.llh-status[data-state="warning"] { color: #f5ba55; }
.llh-status[data-state="error"] { color: var(--llh-ask); }
.llh-history { display: flex; gap: 10px; align-items: baseline; padding: 12px 14px; border-radius: 12px; color: var(--llh-muted); font-size: 12px; }
.llh-history strong { color: #f5ba55; }

.llh-summary { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.llh-summary article { display: grid; gap: 5px; min-width: 0; min-height: 94px; padding: 13px; border-radius: 13px; }
.llh-summary span { color: var(--llh-muted); font-size: 11px; }
.llh-summary strong { overflow: hidden; color: var(--llh-text); font-size: clamp(17px, 2vw, 23px); text-overflow: ellipsis; }
.llh-summary small { overflow: hidden; color: var(--llh-muted); font-size: 10px; text-overflow: ellipsis; }
.llh-summary .is-bid strong { color: var(--llh-bid); }
.llh-summary .is-ask strong { color: var(--llh-ask); }
.llh-summary[data-loading="true"]::after { position: absolute; z-index: 3; display: grid; place-items: center; inset: 0; min-height: 100%; padding: 16px; border: 1px solid var(--llh-line); border-radius: 14px; color: var(--llh-text); background: color-mix(in srgb, var(--llh-panel) 96%, transparent); content: "Обновляем текущий срез…"; font-size: 14px; font-weight: 800; text-align: center; }
.llh-summary[data-loading="true"] article { visibility: hidden !important; opacity: 0; }

.llh-chart-card { min-width: 0; padding: 14px; border-radius: 20px; box-shadow: 0 18px 50px rgb(0 0 0 / 17%); }
.llh-chart-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.llh-chart-head h2 { margin: 0 0 5px; color: var(--llh-text); font-size: clamp(18px, 2.4vw, 26px); }
.llh-chart-head p { margin: 0; color: var(--llh-muted); font-size: 12px; }
.llh-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 12px; color: var(--llh-muted); font-size: 11px; }
.llh-legend span { display: inline-flex; gap: 5px; align-items: center; }
.llh-legend i { width: 11px; height: 11px; border-radius: 3px; background: currentColor; }
.llh-legend .is-bid { color: var(--llh-bid); }
.llh-legend .is-ask { color: var(--llh-ask); }
.llh-canvas-wrap { position: relative; width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--llh-line); border-radius: 14px; background: var(--llh-canvas); }
.llh-canvas { display: block; width: 100%; height: clamp(420px, 56vw, 620px); touch-action: pan-y; }
.llh-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--llh-muted); text-align: center; pointer-events: none; }
.llh-empty[hidden] { display: none; }

.llh-detail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 12px; padding: 13px; border-radius: 13px; }
.llh-detail[hidden] { display: none; }
.llh-detail > div { display: grid; gap: 4px; min-width: 0; }
.llh-detail span { color: var(--llh-muted); font-size: 10px; }
.llh-detail strong { overflow: hidden; color: var(--llh-text); font-size: 12px; text-overflow: ellipsis; }
.llh-detail .is-bid { color: var(--llh-bid); }
.llh-detail .is-ask { color: var(--llh-ask); }
.llh-detail ul { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.llh-detail li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 8px; background: var(--llh-panel-soft); }
.llh-detail p { grid-column: 1 / -1; margin: 0; color: var(--llh-muted); font-size: 11px; }

.llh-seo { display: grid; gap: 18px; padding: 28px 0 0; }
.llh-seo > h2 { margin: 0; color: var(--llh-text); font-size: clamp(24px, 3vw, 34px); }
.llh-seo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.llh-seo-card { padding: 18px; border-radius: 15px; }
.llh-seo-card h3 { margin: 0 0 8px; color: var(--llh-text); font-size: 17px; }
.llh-seo-card p,
.llh-methodology p { margin: 0; color: var(--llh-muted); line-height: 1.65; }
.llh-methodology { padding: 20px; border-left: 3px solid var(--llh-blue); border-radius: 12px; background: color-mix(in srgb, var(--llh-blue) 6%, var(--llh-panel)); }
.llh-methodology h2 { margin: 0 0 8px; color: var(--llh-text); font-size: 21px; }
.llh-exchanges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.llh-exchanges li { padding: 7px 10px; border: 1px solid var(--llh-line); border-radius: 999px; color: var(--llh-text); background: var(--llh-panel-soft); font-size: 12px; }
.llh-related { display: flex; flex-wrap: wrap; gap: 9px; }
.llh-related a { min-height: 44px; padding: 11px 13px; border: 1px solid var(--llh-line); border-radius: 10px; color: var(--llh-text); text-decoration: none; }
.llh-related a:hover { border-color: var(--llh-blue); color: var(--llh-blue); }
.llh-faq { display: grid; gap: 8px; }
.llh-faq details { border: 1px solid var(--llh-line); border-radius: 12px; background: var(--llh-panel); }
.llh-faq summary { min-height: 44px; padding: 13px 15px; color: var(--llh-text); font-weight: 800; cursor: pointer; }
.llh-faq p { margin: 0; padding: 0 15px 15px; color: var(--llh-muted); line-height: 1.6; }

@media (max-width: 1180px) {
  .llh-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .llh-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .llh-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .limit-liquidity-page { padding-bottom: 105px; }
  .llh-hero { padding-top: 14px; }
  .llh-coin-listbox {
    position: absolute;
    z-index: 1006;
    top: calc(100% + 6px);
    right: auto;
    bottom: auto;
    left: 0;
    width: min(300px, calc(100vw - 44px));
    max-height: min(244px, calc(100dvh - 160px));
  }
  .llh-filter-shell summary { display: block; min-height: 44px; padding: 11px 2px; }
  .llh-filter-shell:not([open]) .llh-filters { display: none; }
  .llh-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 10px; }
  .llh-filters .btn { grid-column: 1 / -1; }
  .llh-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .llh-chart-card { padding: 8px; border-radius: 15px; }
  .llh-chart-head { display: grid; }
  .llh-legend { justify-content: flex-start; }
  .llh-canvas { height: 430px; }
  .llh-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .llh-detail ul { grid-template-columns: 1fr; }
  .llh-seo-grid { grid-template-columns: 1fr; }
  .llh-history { display: grid; }
}

@media (min-width: 1024px) and (max-height: 820px) {
  html body[data-page="spot-order-map"] .site-header.platform-header .platform-nav .navlinks.bitclac-main-nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 390px) {
  .llh-filters { grid-template-columns: 1fr; }
  .llh-check,
  .llh-filters .btn { grid-column: auto; }
  .llh-summary { gap: 8px; }
  .llh-summary article { min-height: 88px; padding: 10px; }
  .llh-detail { grid-template-columns: 1fr; }
}
/* Exact-level cards, interval labels and logarithmic BID/ASK scales (v399). */
.llh-summary-context { margin: 0; color: var(--llh-muted); font-size: 12px; line-height: 1.55; }
.llh-summary article[data-llh-summary="bid-wall"],
.llh-summary article[data-llh-summary="ask-wall"] { position: relative; cursor: default; }
.llh-wall-definition { color: var(--llh-muted); font-size: 10px; line-height: 1.35; }
.llh-chart-tools { display: grid; flex: 0 1 680px; width: min(55%, 680px); min-width: 520px; gap: 9px; justify-items: stretch; }
.limit-liquidity-page[data-llh-view-mode="bars"] .llh-canvas { cursor: pointer; }
.llh-scale { display: grid; min-width: 0; min-height: 112px; gap: 6px; color: var(--llh-muted); font-size: 9px; }
.llh-scale__title { color: var(--llh-text); font-size: 11px; line-height: 1.35; }
.llh-scale__edge { display: flex; justify-content: space-between; gap: 8px; margin-left: 116px; color: var(--llh-muted); font-size: 9px; font-weight: 800; }
.llh-scale__row { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px; align-items: center; color: var(--llh-text); font-size: 10px; font-weight: 800; }
.llh-scale__bar { display: block; height: 9px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--llh-line) 82%, transparent); border-radius: 999px; }
.llh-scale__bar.is-bid { background: linear-gradient(90deg, color-mix(in srgb, var(--llh-bid) 6%, var(--llh-canvas)), var(--llh-bid)); }
.llh-scale__bar.is-ask { background: linear-gradient(90deg, color-mix(in srgb, var(--llh-ask) 6%, var(--llh-canvas)), var(--llh-ask)); }
.llh-scale__ticks { position: relative; height: 15px; margin-left: 116px; }
.llh-scale__ticks span { position: absolute; left: var(--llh-scale-position); min-width: 0; color: var(--llh-text); font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%); }
.llh-scale__ticks span::before { position: absolute; top: -5px; left: 50%; width: 1px; height: 4px; background: var(--llh-muted); content: ''; }
.llh-scale__ticks .is-first { transform: none; }
.llh-scale__ticks .is-first::before { left: 0; }
.llh-scale__ticks .is-last { transform: translateX(-100%); }
.llh-scale__ticks .is-last::before { left: 100%; }
.llh-scale small { color: var(--llh-muted); font-size: 9px; line-height: 1.35; text-align: left; }
.llh-scale__depth { color: var(--llh-blue) !important; }
.llh-canvas { cursor: crosshair; }
.llh-tooltip { position: absolute; z-index: 5; width: min(300px, calc(100% - 16px)); max-height: calc(100% - 16px); overflow: auto; padding: 12px; border: 1px solid var(--llh-line); border-radius: 12px; color: var(--llh-text); background: rgb(13 18 23 / 96%); box-shadow: 0 14px 38px rgb(0 0 0 / 48%); pointer-events: none; backdrop-filter: blur(7px); }
.llh-tooltip[hidden] { display: none; }
.llh-tooltip[data-side="bid"] { border-color: color-mix(in srgb, var(--llh-bid) 72%, var(--llh-line)); }
.llh-tooltip[data-side="ask"] { border-color: color-mix(in srgb, var(--llh-ask) 72%, var(--llh-line)); }
.llh-tooltip__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-bottom: 7px; border-bottom: 1px solid var(--llh-line); }
.llh-tooltip__head strong { font-size: 13px; }
.llh-tooltip[data-side="bid"] .llh-tooltip__head strong { color: var(--llh-bid); }
.llh-tooltip[data-side="ask"] .llh-tooltip__head strong { color: var(--llh-ask); }
.llh-tooltip__head span { color: var(--llh-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.llh-tooltip__time { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0; color: var(--llh-muted); font-size: 10px; }
.llh-tooltip__time small { color: var(--llh-blue); font-size: inherit; }
.llh-tooltip dl { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 0; }
.llh-tooltip dl > div { display: grid; gap: 2px; min-width: 0; }
.llh-tooltip dt { color: var(--llh-muted); font-size: 9px; }
.llh-tooltip dd { overflow: hidden; margin: 0; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.llh-tooltip .is-amount dd { color: #fff; font-size: 16px; }
.llh-tooltip ul { display: grid; gap: 4px; margin: 9px 0 0; padding: 8px 0 0; border-top: 1px solid var(--llh-line); list-style: none; }
.llh-tooltip li { display: flex; justify-content: space-between; gap: 8px; color: var(--llh-muted); font-size: 10px; }
.llh-tooltip li strong { color: var(--llh-text); }
.llh-tooltip p { margin: 8px 0 0; color: var(--llh-blue); font-size: 9px; line-height: 1.4; }
.llh-tooltip__exact,
.llh-detail__exact { display: grid; gap: 3px; margin-top: 9px; padding: 8px; border: 1px solid color-mix(in srgb, var(--llh-blue) 45%, var(--llh-line)); border-radius: 8px; background: color-mix(in srgb, var(--llh-blue) 7%, transparent); }
.llh-tooltip__exact span,
.llh-detail__exact span { color: var(--llh-muted); font-size: 9px; }
.llh-tooltip__exact strong,
.llh-detail__exact strong { color: var(--llh-text); font-size: 11px; }

@media (max-width: 900px) {
  .llh-chart-head { display: grid; }
  .llh-chart-tools { width: 100%; min-width: 0; }
  .llh-legend { justify-content: flex-start; }
}

@media (max-width: 767px) {
  .llh-scale { min-width: 0; width: 100%; min-height: 142px; }
  .llh-scale__edge { margin-left: 0; }
  .llh-scale__row { grid-template-columns: 1fr; gap: 3px; }
  .llh-scale__ticks { margin-left: 0; font-size: 8px; }
  .llh-summary-context { font-size: 11px; }
  .llh-tooltip { width: min(278px, calc(100% - 16px)); padding: 10px; }
}

@media (max-width: 390px) {
  .llh-tooltip dl { grid-template-columns: 1fr; }
}
