/* KAL VPN — единая палитра и стекло Mini App поверх 3D-провода */
:root {
  --bg: #03060C;
  --bg2: #060B19;
  --card: rgba(12, 22, 48, 0.62);
  --card-hi: rgba(18, 32, 68, 0.72);
  --line: rgba(56, 189, 248, 0.24);
  --line-soft: rgba(56, 189, 248, 0.13);
  --acc: #00D2FF;
  --acc2: #0EA5E9;
  --ice: #BAE6FD;
  --tx: #F8FAFC;
  --mu: #94A3B8;
  --ok: #34D399;
  --bad: #FB7185;
  --warn: #FBBF24;
  --glow: 0 0 24px rgba(0, 210, 255, 0.34);
  --r: 22px;
  --font: Inter, "SF Pro Display", "Segoe UI", Roboto, system-ui, -apple-system, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; overflow-x: clip; background: var(--bg); color: var(--tx); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: clip; line-height: 1.45; background: var(--bg); color: var(--tx); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }

.wire-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.wire-bg canvas { display: block; width: 100%; height: 100%; }
.wire-vignette { position: absolute; inset: 0; background: radial-gradient(62% 48% at 62% 16%, rgba(0, 210, 255, 0.08), transparent 72%), radial-gradient(circle at 50% 50%, transparent 44%, rgba(3, 6, 12, 0.78) 100%); }

.shell { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.glass {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(280px circle at var(--gx, 50%) var(--gy, 50%), rgba(0, 210, 255, 0.12), rgba(14, 165, 233, 0.03) 45%, transparent 72%);
  transition: opacity .26s ease;
}
.glass.glow-on::before { opacity: 1; }
.glass::after {
  content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(200px circle at var(--gx, 50%) var(--gy, 50%), rgba(125, 211, 252, 0.6), rgba(0, 210, 255, 0.18) 45%, transparent 72%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude;
  transition: opacity .26s ease;
}
.glass.glow-on::after { opacity: .42; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: .04em; cursor: pointer; }
.brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(0, 210, 255, .45)); }
.kb-k { color: #FFFFFF; }
.kb-v { color: var(--acc); }

.hdr-wrap { position: sticky; top: 12px; z-index: 40; padding: 0 16px; margin-top: 12px; }
.hdr { max-width: 1120px; margin: 0 auto; border-radius: 999px; padding: 8px 14px 8px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav button, .nav a { padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #CBD5E1; transition: color .2s, background-color .2s; }
.nav button:hover, .nav a:hover, .nav .on { color: #FFF; background: rgba(0, 210, 255, 0.12); }
.hdr-r { display: flex; align-items: center; gap: 8px; }
.lang-pill { display: inline-flex; border-radius: 999px; border: 1px solid var(--line-soft); background: rgba(3, 6, 12, 0.55); padding: 3px; }
.lang-pill button { padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--mu); transition: .2s; }
.lang-pill button.on { background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #04122B; }
@media (max-width: 860px) { .nav { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 14px;
  white-space: nowrap; will-change: transform;
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), background-color .2s, border-color .2s, box-shadow .24s, opacity .2s;
}
.btn:active:not(:disabled) { transform: scale(.965); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.pri { background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #04122B; box-shadow: 0 0 22px rgba(0, 210, 255, .36); }
.btn.pri:hover:not(:disabled) { box-shadow: 0 0 32px rgba(0, 210, 255, .58); }
.btn.ghost { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--tx); }
.btn.ghost:hover:not(:disabled) { border-color: rgba(0, 210, 255, .55); background: rgba(0, 210, 255, .09); }
.btn.danger { background: rgba(251, 113, 133, .12); border: 1px solid rgba(251, 113, 133, .38); color: #FDA4AF; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.btn.pill { border-radius: 999px; }
.btn.block { width: 100%; }

.field {
  width: 100%; padding: 12px 14px; border-radius: 14px; font-size: 14px; color: var(--tx);
  background: rgba(4, 9, 22, 0.78); border: 1px solid var(--line-soft); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(0, 210, 255, .14); }
.field::placeholder { color: #64748B; }
label.lbl { display: block; font-size: 12.5px; font-weight: 600; color: #CBD5E1; margin-bottom: 6px; }

main.main { flex: 1; padding: 34px 0 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--acc); background: rgba(0, 210, 255, .1); border: 1px solid rgba(56, 189, 248, .28); }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.hero { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 32px; align-items: center; padding: 24px 0 18px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; line-height: 1.07; letter-spacing: -.025em; margin-top: 16px; }
.hero h1 span { background: linear-gradient(135deg, #FFFFFF 0%, #BAE6FD 48%, #00D2FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 16px; font-size: 16px; color: #CBD5E1; max-width: 540px; line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-pts { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 22px; font-size: 13px; color: #CBD5E1; }
.hero-pts span { display: inline-flex; align-items: center; gap: 6px; }
.hero-pts .ic { width: 15px; height: 15px; color: var(--acc); }
.hero-card { padding: 22px; display: grid; gap: 14px; }
.hc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 15px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line-soft); }
.hc-row b { font-size: 14px; }
.hc-row small { display: block; font-size: 12px; color: var(--mu); margin-top: 2px; }
.badge-ok { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--ok); background: rgba(52, 211, 153, .14); border: 1px solid rgba(52, 211, 153, .3); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 10px; } }

/* 3D Globe widget */
.globe-wrap { position: relative; display: grid; place-items: center; min-height: 360px; }
.globe-wrap canvas { width: min(410px, 100%); height: auto; aspect-ratio: 1; cursor: grab; touch-action: none; }
.globe-wrap canvas:active { cursor: grabbing; }
.globe-badge-tl { position: absolute; left: 4px; top: 14px; padding: 10px 14px; border-radius: 16px; pointer-events: none; }
.globe-badge-br { position: absolute; right: 4px; bottom: 18px; padding: 10px 14px; border-radius: 16px; display: flex; align-items: center; gap: 10px; pointer-events: none; }

/* Stats strip & Bento */
.stats-4 { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 780px) { .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-card { padding: 20px; }
.stat-card .v { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-card .v.c { color: var(--ice); }
.stat-card .l { font-size: 12.5px; color: #CBD5E1; margin-top: 6px; }

.sec { margin-top: 72px; scroll-margin-top: 86px; }
.sec-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.sec-h h2 { font-size: clamp(24px, 3.6vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.sec-h p { color: var(--mu); font-size: 14.5px; max-width: 560px; margin-top: 6px; }

.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .feat-grid { grid-template-columns: 1fr; } }
.feat-card { padding: 22px; display: grid; gap: 10px; align-content: start; }
.feat-card.span2 { grid-column: span 2; }
@media (max-width: 820px) { .feat-card.span2 { grid-column: span 1; } }
.tile { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(0, 210, 255, .1); border: 1px solid var(--line); color: var(--acc); flex: none; }
.feat-card h3 { font-size: 17px; font-weight: 800; }
.feat-card p { font-size: 13.5px; color: #CBD5E1; line-height: 1.55; }
.term-box { border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(3, 6, 14, .88); padding: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* OS selector cards (screenshot 4 style) */
.os-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 820px) { .os-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .os-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.os-card { position: relative; padding: 16px 10px; border-radius: 18px; display: grid; justify-items: center; gap: 9px; background: rgba(12, 22, 48, .54); border: 1px solid var(--line-soft); font-size: 13px; font-weight: 700; color: var(--mu); transition: .24s; }
.os-card .oi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: #CBD5E1; }
.os-card .oi .ic { width: 22px; height: 22px; }
.os-card.on { border-color: rgba(0, 210, 255, .68); background: rgba(0, 210, 255, .11); color: #FFF; box-shadow: 0 0 22px rgba(0, 210, 255, .18); }
.os-card.on .oi { background: rgba(0, 210, 255, .18); color: var(--acc); }

/* Plans & Custom Builder */
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .plans-grid { grid-template-columns: 1fr; } }
.plan-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.plan-card.pop { border-color: rgba(0, 210, 255, .62); box-shadow: 0 0 34px rgba(0, 210, 255, .18), 0 14px 40px rgba(0, 0, 0, .4); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.tag { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(0, 210, 255, .16); border: 1px solid rgba(0, 210, 255, .36); color: var(--ice); }
.tag.disc { background: linear-gradient(135deg, #34D399, #10B981); border: 0; color: #04122B; }
.plan-card h3 { font-size: 22px; font-weight: 800; }
.plan-meta { font-size: 13.5px; color: #CBD5E1; display: grid; gap: 4px; flex: 1; }
.plan-price { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.plan-price strong { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan-price s { font-size: 15px; color: var(--mu); }

.builder-wrap { margin-top: 20px; display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 16px; }
@media (max-width: 860px) { .builder-wrap { grid-template-columns: 1fr; } }
.builder { padding: 24px; display: grid; gap: 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(4, 9, 22, 0.72); border: 1px solid var(--line-soft); }
.seg button { padding: 9px 12px; border-radius: 11px; font-size: 13px; font-weight: 700; color: var(--mu); transition: .2s; }
.seg button.on { background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #04122B; }
.sl-row { display: grid; gap: 8px; }
.sl-top { display: flex; justify-content: space-between; font-size: 13.5px; }
.sl-top b { color: var(--acc); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--acc) var(--p, 0%), rgba(148, 163, 184, .25) var(--p, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #FFF; margin-top: -7px; box-shadow: 0 0 12px rgba(0, 210, 255, .85); }
.b-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.b-price { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
.info-side { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.info-list { list-style: none; display: grid; gap: 10px; font-size: 13px; color: #CBD5E1; }
.info-list li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.info-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.info-list strong { color: var(--ice); }

/* Locations & FAQ */
.locs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 820px) { .locs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .locs-grid { grid-template-columns: 1fr; } }
.loc-card { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.loc-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.loc-flag { width: 26px; height: 19px; border-radius: 4px; object-fit: cover; flex: none; background: rgba(255,255,255,.08); }
.loc-name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-r { display: flex; align-items: center; gap: 8px; flex: none; font-size: 12px; }
.ping { padding: 3px 8px; border-radius: 999px; background: rgba(4, 9, 22, 0.72); border: 1px solid var(--line-soft); color: var(--ice); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.off { background: #64748B; box-shadow: none; }

.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 780px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-card { padding: 16px; display: grid; gap: 10px; align-content: start; }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; font-size: 14.5px; font-weight: 700; width: 100%; }
.faq-a { font-size: 13px; color: #CBD5E1; line-height: 1.55; }

/* Dashboard / Embedded Mini App */
.dash-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.dash-tabs button { padding: 10px 16px; border-radius: 14px; font-size: 13.5px; font-weight: 700; color: #CBD5E1; background: rgba(12, 22, 48, .55); border: 1px solid var(--line-soft); display: inline-flex; align-items: center; gap: 8px; transition: .2s; }
.dash-tabs button.on { background: linear-gradient(135deg, rgba(0, 210, 255, .22), rgba(14, 165, 233, .12)); border-color: rgba(0, 210, 255, .6); color: #FFF; box-shadow: 0 0 18px rgba(0, 210, 255, .18); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 840px) { .dash-grid { grid-template-columns: 1fr; } }
.card-pad { padding: 22px; display: grid; gap: 14px; align-content: start; }
.rings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ring-box { padding: 16px; text-align: center; display: grid; place-items: center; gap: 8px; border-radius: 18px; background: rgba(4, 9, 22, .52); border: 1px solid var(--line-soft); }
.ring-svg { width: 120px; height: 120px; position: relative; }
.ring-svg svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; font-weight: 800; font-size: 20px; }
.key-box { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(4, 9, 22, .78); border: 1px solid var(--line-soft); }
.key-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ice); user-select: all; }
.list-rows { display: grid; gap: 8px; }
.lrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line-soft); font-size: 13.5px; }
.lrow b { display: block; font-size: 14px; }
.lrow small { display: block; font-size: 12px; color: var(--mu); margin-top: 2px; }

/* Support Chat */
.chat-wrap { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-height: 520px; max-height: 76vh; }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.chat-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.cmsg { max-width: 82%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.cmsg.user { align-self: flex-end; background: linear-gradient(135deg, rgba(0, 210, 255, .24), rgba(14, 165, 233, .16)); border: 1px solid rgba(0, 210, 255, .38); }
.cmsg.staff { align-self: flex-start; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-soft); }
.cmsg.sys { align-self: center; max-width: 92%; font-size: 12.5px; color: var(--ice); background: rgba(0, 210, 255, .08); border: 1px solid var(--line-soft); text-align: center; }
.cmsg .cm-meta { font-size: 11px; color: var(--mu); margin-top: 5px; display: flex; justify-content: flex-end; gap: 6px; }
.cmsg img.cm-img { max-width: 240px; max-height: 240px; border-radius: 12px; margin-top: 6px; display: block; border: 1px solid var(--line-soft); }
.chat-form { display: flex; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.chat-warn { padding: 14px; border-radius: 14px; background: rgba(244, 63, 94, .12); border: 1px solid rgba(251, 113, 133, .42); color: #FFE4E6; font-size: 13.5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rate-row { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(0, 210, 255, .08); border: 1px solid var(--line); }
.rate-row button { width: 38px; height: 38px; border-radius: 11px; font-weight: 800; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-soft); transition: .2s; }
.rate-row button:hover { background: var(--acc); color: #04122B; }

/* Dedicated Legal Page */
.leg-page { display: grid; gap: 20px; max-width: 980px; margin: 0 auto; }
.leg-top { display: grid; gap: 12px; }
.leg-h1 { font-size: clamp(28px, 4.5vw, 42px); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; }
.leg-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.leg-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #CBD5E1; background: rgba(12, 22, 48, .68); border: 1px solid var(--line-soft); }
.leg-pill .ic { width: 14px; height: 14px; color: var(--acc); }
.leg-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
@media (max-width: 560px) { .leg-switch { grid-template-columns: 1fr; } }
.leg-tab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; border-radius: 18px; transition: .24s; }
.leg-tab.on { border-color: rgba(0, 210, 255, .64); background: linear-gradient(135deg, rgba(0, 210, 255, .16), rgba(14, 165, 233, .08)); box-shadow: 0 0 24px rgba(0, 210, 255, .18); }
.leg-tab.on .tile { background: linear-gradient(135deg, var(--acc), var(--acc2)); border-color: transparent; color: #04122B; }
.leg-tab b { display: block; font-size: 14.5px; }
.leg-tab span { display: block; font-size: 12px; color: var(--mu); margin-top: 2px; }
.leg-short { padding: 18px; display: grid; gap: 14px; }
.leg-short-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: baseline; }
.leg-short-h b { font-size: 16px; }
.leg-short-h span { font-size: 12.5px; color: var(--mu); }
.leg-sgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.leg-sgrid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .leg-sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .leg-sgrid { grid-template-columns: 1fr; } }
.leg-scard { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; text-align: left; background: rgba(255, 255, 255, .035); border: 1px solid var(--line-soft); transition: .22s; }
.leg-scard:hover { border-color: rgba(0, 210, 255, .45); background: rgba(0, 210, 255, .07); }
.leg-scard b { font-size: 14px; }
.leg-scard p { font-size: 12.5px; color: var(--mu); line-height: 1.45; flex: 1; }
.leg-scard .ref { font-size: 12px; font-weight: 700; color: var(--acc); }
.leg-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 780px) { .leg-layout { grid-template-columns: 1fr; } }
.leg-toc { padding: 14px 10px; display: grid; gap: 8px; position: sticky; top: 82px; }
@media (max-width: 780px) { .leg-toc { position: static; } }
.leg-toc-h { padding: 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--mu); }
.leg-toc-list { display: grid; gap: 3px; max-height: calc(100vh - 200px); overflow-y: auto; }
.leg-toc-i { display: flex; gap: 10px; padding: 8px 10px; border-radius: 11px; text-align: left; font-size: 13px; color: var(--mu); transition: .2s; }
.leg-toc-i:hover { background: rgba(255, 255, 255, .05); color: var(--tx); }
.leg-toc-i.on { background: rgba(0, 210, 255, .14); color: #FFF; font-weight: 700; }
.leg-toc-i .n { color: var(--acc); font-weight: 700; width: 18px; flex: none; }
.leg-main { display: grid; gap: 14px; }
.leg-sec { padding: 18px; border-radius: 20px; background: rgba(12, 22, 48, .54); border: 1px solid var(--line-soft); display: grid; gap: 12px; scroll-margin-top: 86px; }
.leg-sec-h { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.leg-badge { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; color: var(--acc); background: rgba(0, 210, 255, .12); border: 1px solid rgba(56, 189, 248, .3); flex: none; }
.leg-sec-h h2 { font-size: 18px; font-weight: 800; }
.leg-clause { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.62; color: #E2E8F0; }
.leg-clause .cid { color: var(--mu); font-weight: 700; font-size: 13px; }
.leg-clause ul { margin: 6px 0 2px 18px; display: grid; gap: 5px; color: #CBD5E1; }
.leg-link { color: var(--acc); text-decoration: underline; font-weight: 700; cursor: pointer; }

/* Modals, Footer, Toast */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(2, 6, 16, 0.74); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; animation: fadeIn .2s ease; }
.modal { width: 100%; max-width: 450px; padding: 24px; display: grid; gap: 16px; max-height: 90vh; overflow-y: auto; }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-h h3 { font-size: 20px; font-weight: 800; }
.xbtn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-soft); }
.xbtn:hover { border-color: var(--acc); }
.divider { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--mu); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.err-box { padding: 10px 12px; border-radius: 12px; background: rgba(244, 63, 94, .14); border: 1px solid rgba(251, 113, 133, .38); color: #FECDD3; font-size: 13px; }
.ok-box { padding: 10px 12px; border-radius: 12px; background: rgba(52, 211, 153, .14); border: 1px solid rgba(52, 211, 153, .38); color: #A7F3D0; font-size: 13px; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(0, 210, 255, .2); border-top-color: var(--acc); animation: rot .75s linear infinite; margin: 18px auto; }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

footer.ftr { border-top: 1px solid var(--line-soft); background: rgba(3, 6, 12, 0.85); padding: 26px 0; font-size: 13px; color: var(--mu); }
.ftr-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.ftr-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; color: #CBD5E1; }
.ftr-links button:hover, .ftr-links a:hover { color: var(--acc); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 16px); z-index: 120; padding: 11px 18px; border-radius: 999px; background: rgba(6, 14, 32, 0.94); border: 1px solid rgba(0, 210, 255, .42); color: #FFF; font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: .26s ease; box-shadow: 0 12px 34px rgba(0, 0, 0, .6); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
