:root {
  --ink: #10252b;
  --ink-soft: #29434a;
  --muted: #61767a;
  --paper: #f7f4ed;
  --paper-2: #efeae0;
  --white: #fffdf8;
  --teal: #0d7f78;
  --teal-dark: #075b58;
  --teal-soft: #dff3ee;
  --amber: #c1842d;
  --line: rgba(22, 56, 61, 0.13);
  --shadow: 0 24px 70px rgba(33, 52, 53, 0.13);
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 620px at 88% -8%, rgba(53, 173, 161, 0.13), transparent 62%),
    radial-gradient(800px 500px at 5% 4%, rgba(207, 173, 111, 0.12), transparent 58%),
    var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 999; background: #fff; padding: 10px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 237, 0.84);
  backdrop-filter: blur(18px);
}
.header-inner { display: flex; min-height: 76px; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; width: 38px; height: 38px; place-items: center;
  border-radius: 11px; color: #effffb; font-weight: 900; font-size: 20px;
  background: linear-gradient(145deg, #0d7f78, #0a4a4a);
  box-shadow: 0 8px 22px rgba(13, 127, 120, 0.24);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 14px; letter-spacing: -0.02em; }
.brand-copy small { color: var(--muted); font-size: 8px; letter-spacing: 0.12em; }
.main-nav { display: flex; align-items: center; gap: 25px; margin-left: auto; }
.main-nav a { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.main-nav a:hover { color: var(--teal); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.vk-user { color: var(--muted); font-size: 12px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: transform .18s, background .18s, border-color .18s;
}
.button:hover { transform: translateY(-1px); }
.button-small { min-height: 36px; padding: 0 14px; font-size: 11.5px; }
.button-large { min-height: 50px; padding: 0 25px; font-size: 13.5px; }
.button-primary { color: #f6fffd; background: linear-gradient(135deg, #0f8d84, #07645f); box-shadow: 0 12px 28px rgba(13, 127, 120, .2); }
.button-dark { color: #f5fffc; background: var(--ink); }
.button-ghost { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.42); }
.button-vk { color: #fff; background: #0077ff; }
.button-vk span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: rgba(255,255,255,.2); font-size: 10px; }
.button-danger { color: #8d2638; border-color: rgba(180, 46, 70, .23); background: #fff1f3; }

.hero { padding: 78px 0 68px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); align-items: center; gap: 55px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-size: 9px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(13,127,120,.11); }
.hero h1 { margin: 19px 0 20px; font-size: clamp(44px, 5.4vw, 70px); line-height: .98; letter-spacing: -0.052em; font-weight: 850; }
.hero h1 em { color: var(--teal); font-style: normal; }
.hero-lead { max-width: 540px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 29px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 27px; color: var(--muted); font-size: 10.5px; }
.hero-facts strong { color: var(--ink); font-weight: 800; }
.hero-visual { position: relative; min-width: 0; }
.app-frame {
  overflow: hidden; border: 1px solid rgba(18, 63, 64, .18); border-radius: 20px;
  background: #e9e4d9; box-shadow: 0 35px 80px rgba(37, 54, 50, .19);
  transform: rotate(-1.2deg); transition: transform .4s;
}
.app-frame:hover { transform: rotate(0) translateY(-5px); }
.app-top { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: #f9f6ee; border-bottom: 1px solid var(--line); }
.app-top span { width: 7px; height: 7px; border-radius: 50%; background: #c3b8a4; }
.app-top span:first-child { background: #de806b; }
.app-top span:nth-child(2) { background: #d9ae58; }
.app-top span:nth-child(3) { background: #79ae91; }
.app-top b { margin-left: 8px; color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.app-frame img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.65); border-radius: 13px; background: rgba(255,253,248,.92);
  box-shadow: 0 15px 35px rgba(38,55,50,.17); backdrop-filter: blur(12px);
}
.float-card-top { top: -22px; right: 16px; }
.float-card-bottom { bottom: -26px; left: -18px; }
.float-card div { display: flex; flex-direction: column; line-height: 1.3; }
.float-card strong { font-size: 10.5px; }
.float-card small { color: var(--muted); font-size: 8px; }
.float-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 800; }
.float-icon.amber { background: #f5ead7; color: var(--amber); }

.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.28); }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 30px; min-height: 54px; color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.trust-inner strong { color: var(--ink); font-size: 11px; letter-spacing: .04em; }
.trust-sep { width: 1px; height: 18px; background: var(--line); }

.section { padding: 92px 0; }
.section-tinted { background: rgba(235, 231, 220, .58); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 650px; }
.section-head h2 { margin: 14px 0 13px; font-size: clamp(33px, 4vw, 48px); line-height: 1.04; letter-spacing: -.045em; }
.section-head p, .section-lead { color: var(--muted); font-size: 14px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; max-width: none; gap: 35px; }
.section-head-row p { max-width: 370px; margin: 0 0 8px; }
.advantages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.advantage { padding: 24px 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,248,.5); }
.adv-num { color: var(--amber); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.advantage h3 { margin: 22px 0 9px; font-size: 15px; line-height: 1.3; letter-spacing: -.02em; }
.advantage p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.65; }

.carousel3d { margin-top: 30px; }
.carousel-stage { position: relative; height: 600px; perspective: 1500px; transform-style: preserve-3d; }
.carousel-card {
  position: absolute; top: 0; left: 50%; width: min(720px, 68%);
  margin: 0; padding: 0; overflow: hidden; border: 1px solid rgba(165, 147, 113, .22);
  border-radius: 18px; background: var(--white); box-shadow: 0 24px 55px rgba(43,58,52,.16);
  transition: transform .55s cubic-bezier(.22,1,.36,1), opacity .4s; will-change: transform;
}
.carousel-card picture, .app-frame picture { display: block; }
.carousel-card img { display: block; width: 100%; height: auto; aspect-ratio: 36 / 25; object-fit: cover; object-position: top left; }
.carousel-card figcaption { display: flex; flex-direction: column; gap: 3px; padding: 13px 17px 15px; }
.carousel-card figcaption strong { font-size: 12px; }
.carousel-card figcaption span { color: var(--muted); font-size: 10px; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.circle-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--white); cursor: pointer; }
.circle-button:hover { border-color: var(--teal); color: var(--teal); }
.carousel-dots { display: flex; gap: 7px; }
.carousel-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(20,60,60,.22); cursor: pointer; }
.carousel-dots button.active { width: 20px; border-radius: 9px; background: var(--teal); }

.download-grid { display: grid; grid-template-columns: 1fr .78fr; align-items: center; gap: 60px; }
.download-bullets { display: flex; flex-direction: column; gap: 7px; margin-top: 24px; color: var(--ink-soft); font-size: 12px; }
.download-bullets span::first-letter { color: var(--teal); }
.download-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.download-card-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
.badge-live { color: var(--teal); font-weight: 800; }
.download-version { display: block; margin-top: 13px; font-size: 38px; font-weight: 850; letter-spacing: -.055em; }
.download-build { color: var(--muted); font-size: 9.5px; font-family: Consolas, monospace; }
.download-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; }
.download-meta span { padding: 5px 8px; border-radius: 7px; background: var(--paper-2); color: var(--muted); font-size: 8.5px; }
.button-download { width: 100%; }
.download-note { display: block; margin-top: 12px; color: var(--muted); font-size: 8px; }
.download-note code { font-size: 8px; }
.download-empty { display: flex; flex-direction: column; gap: 5px; color: var(--muted); }

.qa-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 65px; }
.qa-intro h2 { margin: 14px 0 16px; font-size: clamp(34px, 4vw, 48px); line-height: 1.03; letter-spacing: -.045em; }
.qa-intro p { color: var(--muted); font-size: 13px; }
.vk-signed { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.45); }
.vk-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #fff; background: #0077ff; font-size: 9px; font-weight: 800; }
.vk-signed div { display: flex; flex: 1; flex-direction: column; line-height: 1.3; }
.vk-signed strong { font-size: 10px; }
.vk-signed small { color: var(--muted); font-size: 8px; }
.text-button { padding: 0; border: 0; color: var(--muted); background: none; font-size: 10px; cursor: pointer; text-decoration: underline; }
.qa-panel { display: flex; flex-direction: column; gap: 14px; }
.alert { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; }
.alert.success { color: #176b58; border-color: rgba(32,150,117,.22); background: #ecf8f2; }
.alert.error { color: #8d2638; border-color: rgba(180,46,70,.22); background: #fff1f3; }
.ask-form { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.ask-form label { font-size: 10px; font-weight: 700; }
.ask-form textarea { min-height: 105px; resize: vertical; }
input, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fffefa; font-size: 12px; outline: none; }
input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,127,120,.1); }
.honeypot { position: absolute; left: -9999px; }
.qa-lock { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px dashed rgba(13,127,120,.28); border-radius: 13px; background: rgba(223,243,238,.35); }
.qa-lock strong { font-size: 12px; }
.qa-lock span { color: var(--muted); font-size: 10px; }
.qa-list { display: flex; flex-direction: column; }
.qa-item { border-bottom: 1px solid var(--line); }
.qa-item summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 2px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 650; }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary small { flex: 0 0 auto; color: var(--muted); font-size: 9px; font-weight: 400; }
.qa-item p { margin: 0 0 16px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.muted { color: var(--muted); font-size: 11px; }

.cta-final { padding: 65px 0; color: #f7fffd; background: var(--ink); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-final .eyebrow { color: #81d9ce; }
.cta-final h2 { margin: 12px 0 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: -.04em; }
.cta-final .button-dark { color: var(--ink); background: #e9fff8; }
.site-footer { padding: 43px 0 33px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 30px; align-items: start; }
.footer-inner strong { font-size: 13px; }
.footer-inner p { max-width: 340px; color: var(--muted); font-size: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 9px 18px; color: var(--muted); font-size: 10px; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--muted); font-size: 9px; }
.error-page { min-height: 60vh; padding-top: 100px; }
.error-page h1 { margin: 14px 0 10px; font-size: 45px; letter-spacing: -.05em; }
.error-page p { color: var(--muted); }

/* Admin */
.admin-body { background: #f3f0e9; }
.admin-header { border-bottom: 1px solid var(--line); background: #fffdf8; }
.admin-header-inner { display: flex; min-height: 66px; align-items: center; gap: 30px; }
.admin-header strong { font-size: 13px; }
.admin-nav { display: flex; gap: 22px; margin-left: auto; }
.admin-nav a { color: var(--muted); font-size: 11px; font-weight: 650; }
.admin-nav a.active, .admin-nav a:hover { color: var(--teal); }
.admin-main { padding-top: 39px; padding-bottom: 60px; }
.admin-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.admin-title h1 { margin: 8px 0 0; font-size: 35px; letter-spacing: -.045em; }
.admin-title p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.badge-count { display: inline-grid; min-width: 18px; height: 18px; place-items: center; border-radius: 99px; background: var(--amber); font-size: 9px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 18px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.stat-card span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { display: block; margin-top: 7px; font-size: 31px; letter-spacing: -.04em; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.admin-card { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.admin-card h2 { margin: 0 0 14px; font-size: 14px; letter-spacing: -.02em; }
.admin-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: 0; }
.admin-row strong { font-size: 10.5px; }
.admin-row p { margin: 2px 0 0; color: var(--muted); font-size: 9.5px; }
.admin-row small { color: var(--muted); font-size: 9px; }
.status { padding: 3px 7px; border-radius: 5px; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.status-pending { color: #8b5b16; background: #f8ecd7; }
.status-approved { color: #0d6b5b; background: #e2f4ed; }
.status-rejected { color: #8d2638; background: #fbe9ed; }
.question-admin-list { display: flex; flex-direction: column; gap: 12px; }
.question-admin-head { display: flex; justify-content: space-between; gap: 15px; }
.question-author-copy { display: flex; flex-direction: column; }
.question-admin-head strong { font-size: 11px; }
.question-admin-head small { color: var(--muted); font-size: 9px; }
.question-text { margin: 14px 0; padding: 12px; font-size: 12px; line-height: 1.65; }
.moderate-form { display: flex; flex-direction: column; gap: 8px; }
.moderate-form textarea { min-height: 90px; }
.moderate-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.data-table th { padding: 9px; text-align: left; color: var(--muted); border-bottom: 1px solid var(--line); }
.data-table td { padding: 9px; border-bottom: 1px solid var(--line); }
.login-card { width: min(420px, calc(100% - 36px)); margin: 12vh auto; padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.login-card h1 { margin: 17px 0 7px; font-size: 30px; letter-spacing: -.05em; }
.login-card > p { margin: 0 0 20px; color: var(--muted); font-size: 11px; }
.login-card form { display: flex; flex-direction: column; gap: 9px; }
.login-card label { font-size: 10px; font-weight: 700; }
.login-back { display: inline-block; margin-top: 20px; color: var(--muted); font-size: 10px; }
.admin-login-body { display: grid; min-height: 100vh; place-items: center; }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .hero { padding-top: 48px; }
  .hero-grid, .download-grid, .qa-grid { grid-template-columns: 1fr; gap: 42px; }
  .hero h1 { font-size: clamp(42px, 10vw, 64px); }
  .advantages { grid-template-columns: repeat(2, 1fr); }
  .section-head-row { display: block; }
  .section-head-row p { margin-top: 12px; }
  .carousel-stage { height: 460px; }
  .carousel-card { width: 78%; }
  .carousel-card img { aspect-ratio: 16 / 9; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { align-items: flex-start; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-columns { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 30px, 1180px); }
  .header-actions .button-ghost { display: none; }
  .brand-copy strong { font-size: 12px; }
  .hero { padding: 38px 0 45px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-facts { gap: 8px 15px; }
  .float-card-bottom { left: 0; }
  .float-card-top { right: 0; }
  .section { padding: 62px 0; }
  .advantages { grid-template-columns: 1fr; }
  .carousel-stage { height: 340px; }
  .carousel-card { width: 88%; }
  .carousel-card figcaption { padding: 10px 12px; }
  .carousel-card figcaption span { display: none; }
  .download-card { padding: 21px; }
  .cta-inner, .section-head-row { display: block; }
  .cta-inner .button { margin-top: 24px; }
  .admin-title { display: block; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-header-inner { flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .admin-nav { order: 3; width: 100%; gap: 17px; }
}


.auth-buttons { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 16px; }
.button-yandex { color: #fff; background: #fc3f1d; }
.button-yandex span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: rgba(255,255,255,.2); font-size: 10px; }
.consent { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.consent input { width: auto; margin: 3px 0 0; accent-color: var(--teal); }
.consent a { color: var(--teal); text-decoration: underline; }
.privacy-page { padding-top: 65px; }
.privacy-wrap { max-width: 820px; }
.privacy-wrap h1 { margin: 16px 0 18px; font-size: clamp(38px, 5vw, 58px); letter-spacing: -.05em; line-height: 1.02; }
.privacy-lead { color: var(--muted); font-size: 15px; }
.privacy-wrap h2 { margin: 33px 0 9px; font-size: 19px; letter-spacing: -.025em; }
.privacy-wrap p, .privacy-wrap li { color: var(--muted); font-size: 13px; line-height: 1.75; }
.privacy-wrap ul { padding-left: 20px; }
.privacy-note { margin: 30px 0 22px; padding: 17px 18px; border: 1px solid rgba(13,127,120,.18); border-radius: 12px; background: rgba(223,243,238,.36); color: var(--ink-soft); font-size: 12px; line-height: 1.65; }


.installer-card { width: min(900px, calc(100% - 30px)); margin: 5vh auto; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.installer-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.installer-head h1 { margin: 7px 0 4px; font-size: 28px; letter-spacing: -.04em; }
.installer-head p { margin: 0; color: var(--muted); font-size: 11px; }
.installer-requirements { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.installer-requirements span { padding: 5px 8px; border-radius: 7px; font-size: 9px; }
.installer-requirements .ok { color: #0d6b5b; background: #e2f4ed; }
.installer-requirements .bad { color: #8d2638; background: #fbe9ed; }
.installer-form { display: flex; flex-direction: column; gap: 13px; }
.installer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.installer-grid label { display: flex; flex-direction: column; gap: 5px; color: var(--ink-soft); font-size: 9px; font-weight: 700; }
.installer-grid label:last-child:nth-child(odd) { grid-column: 1 / -1; }
.installer-card .alert ul { margin: 7px 0 0; padding-left: 18px; }
.installer-card code { overflow-wrap: anywhere; font-size: 10px; }
@media (max-width: 720px) { .installer-grid { grid-template-columns: 1fr; } .installer-card { padding: 20px; } }


.settings-stack { display: grid; gap: 14px; margin-bottom: 14px; }
.settings-card { padding: 24px 26px; }
.settings-form { display: grid; gap: 0; }
.settings-row {
  display: grid;
  grid-template-columns: minmax(190px, .85fr) minmax(260px, 1.35fr);
  gap: 24px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.settings-row:last-of-type { border-bottom: 0; }
.settings-row > label,
.settings-label { font-size: 12px; font-weight: 700; color: var(--ink); }
.settings-row input,
.settings-row select {
  width: 100%;
  max-width: 430px;
  justify-self: end;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.settings-check { display: flex; align-items: center; justify-content: flex-end; gap: 9px; font-weight: 500 !important; color: var(--ink) !important; }
.settings-check input { width: auto; max-width: none; justify-self: auto; }
.settings-actions { display: flex; justify-content: center; padding-top: 20px; }
.settings-actions .button { min-width: 190px; }
@media (max-width: 620px) {
  .settings-row { grid-template-columns: 1fr; gap: 8px; }
  .settings-row input, .settings-row select { justify-self: stretch; max-width: none; }
  .settings-check { justify-content: flex-start; }
}


.table-scroll { overflow-x: auto; }
.data-table code { font-size: 9px; white-space: nowrap; }


/* Public live informer */
.live-informer { padding: 14px 0 0; }
.live-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(165, 147, 113, .22);
  border-radius: 17px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(43, 58, 52, .06);
}
.live-status { display: flex; align-items: center; gap: 9px; min-width: 180px; }
.live-shield {
  display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px;
  border-radius: 12px; background: #e4f7ec; color: #20a66a; font-size: 21px; font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(32, 166, 106, .18);
}
.live-status strong { display: block; font-size: 14px; line-height: 1.2; color: var(--ink); }
.live-status small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; line-height: 1.3; }
.live-online { display: flex; align-items: center; gap: 5px; margin-top: 2px; color: #20a66a; font-size: 10.5px; font-weight: 700; }
.live-online i { width: 6px; height: 6px; border-radius: 50%; background: #20a66a; box-shadow: 0 0 0 3px rgba(32,166,106,.12); }
.live-divider { width: 1px; height: 42px; background: var(--line); flex: 0 0 1px; }
.live-metric { display: flex; align-items: center; gap: 9px; min-width: 112px; }
.live-icon-wrap { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; }
.live-metric--unlocked .live-icon-wrap { background: linear-gradient(145deg, #e4f7ec, #f7fbf8); border-color: rgba(32,166,106,.18); }
.live-metric--terminals .live-icon-wrap { background: linear-gradient(145deg, #e6f3f2, #fbf8f0); border-color: rgba(13,127,120,.16); }
.live-metric--users .live-icon-wrap { background: linear-gradient(145deg, #f7ecd9, #fdfaf4); border-color: rgba(193,132,45,.18); }
.live-metric-copy { min-width: 0; }
.live-metric strong { display: block; font-size: 28px; line-height: 1; color: var(--ink); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.live-metric small { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 10.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.live-icon-img { width: 32px; height: 32px; flex: 0 0 32px; object-fit: contain; }
.live-icon { display: flex; align-items: flex-end; justify-content: center; flex: 0 0 24px; width: 24px; height: 24px; color: var(--teal); }
.live-icon-terminal { align-items: center; font-size: 22px; line-height: 1; font-weight: 300; }
.live-icon-bars { gap: 2px; padding-bottom: 2px; }
.live-icon-bars i { display: block; width: 4px; border-radius: 2px 2px 0 0; background: var(--teal); }
.live-icon-bars i:nth-child(1) { height: 8px; opacity: .5; }
.live-icon-bars i:nth-child(2) { height: 13px; opacity: .68; }
.live-icon-bars i:nth-child(3) { height: 18px; opacity: .84; }
.live-icon-bars i:nth-child(4) { height: 23px; }
.live-models { display: flex; flex: 1 1 auto; align-items: stretch; min-width: 0; max-width: none; margin-left: 0; overflow-x: auto; overflow-y: hidden; padding: 1px 1px 6px; scroll-snap-type: x proximity; scrollbar-width: auto; scrollbar-color: rgba(13,127,120,.65) rgba(13,127,120,.08); overscroll-behavior-x: contain; outline-offset: 2px; }
.live-models-track { display: flex; align-items: stretch; gap: 6px; width: max-content; min-width: 100%; justify-content: flex-start; }
.live-model {
  flex: 0 0 100px; min-height: 60px; scroll-snap-align: start; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 10px; background: rgba(255, 253, 248, .7);
}
.live-model strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.live-model > span:not(.live-bar) { display: block; margin-top: 2px; color: var(--ink); font-size: 18px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.live-model > span:not(.live-bar) .live-percent { color: var(--muted); font-size: 10.5px; font-style: normal; font-weight: 600; letter-spacing: 0; }
.live-model small { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; line-height: 1.1; }
.live-bar { display: block; overflow: hidden; height: 4px; margin-top: 4px; border-radius: 99px; background: #e8edf5; }
.live-bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.live-models::-webkit-scrollbar { height: 4px; }
.live-models::-webkit-scrollbar-track { background: transparent; }
.live-models::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(13,127,120,.4); }
.live-empty { display: flex; align-items: center; padding: 0 8px; color: var(--muted); font-size: 10.5px; }
@media (max-width: 980px) {
  .live-inner { flex-wrap: wrap; gap: 10px; }
  .live-models { flex-basis: 100%; width: 100%; max-width: none; margin-left: 0; }
  .live-divider { display: none; }
}
@media (max-width: 620px) {
  .live-informer { padding-top: 10px; }
  .live-inner { padding: 10px 12px; border-radius: 14px; }
  .live-status { min-width: 0; }
  .live-status small { display: none; }
  .live-metric { min-width: 76px; }
  .live-metric strong { font-size: 25px; }
  .live-model { flex-basis: 92px; }
}

.settings-section { margin: 22px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: .02em; }
.settings-value { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.settings-value input { max-width: 430px; }
.settings-hint { color: var(--muted); font-size: 10px; line-height: 1.45; }
.settings-readonly { justify-self: end; max-width: 430px; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; text-align: right; }
.settings-advanced { margin: 18px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.settings-advanced summary { cursor: pointer; color: var(--ink); font-size: 12px; font-weight: 700; }
.settings-advanced .settings-row:first-of-type { margin-top: 12px; }
@media (max-width: 620px) {
  .settings-readonly { justify-self: start; text-align: left; }
}

/* Compact admin */
.admin-header-inner { min-height: 58px; gap: 20px; }
.admin-nav { gap: 15px; }
.admin-nav a { font-size: 10.5px; }
.admin-main { padding-top: 24px; padding-bottom: 40px; }
.admin-title { margin-bottom: 16px; }
.admin-title h1 { margin-top: 4px; font-size: 30px; }
.admin-title p { margin-top: 4px; font-size: 10.5px; }
.admin-card { padding: 14px 16px; border-radius: 12px; }
.admin-card h2 {
  display: flex; align-items: center; min-height: 30px; margin: 0 0 10px;
  padding: 6px 10px; border-left: 3px solid var(--teal); border-radius: 5px;
  background: linear-gradient(90deg, rgba(223, 243, 238, .8), rgba(223, 243, 238, .18));
  font-size: 11.5px; letter-spacing: .02em;
}
.section-note { margin: -2px 0 10px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.admin-columns { gap: 10px; margin-bottom: 10px; }
.stat-grid { gap: 10px; margin-bottom: 12px; }
.stat-card { padding: 14px; border-radius: 11px; }
.stat-card span { font-size: 9.5px; }
.stat-card strong { font-size: 25px; }
.admin-row { padding: 7px 0; }
.admin-row strong { font-size: 10.5px; }
.admin-row p { font-size: 9.5px; }
.admin-row small { font-size: 9px; }
.data-table { font-size: 9.5px; }
.data-table th, .data-table td { padding: 6px 7px; }
.settings-stack { gap: 10px; margin-bottom: 10px; }
.settings-card { padding: 14px 16px; }
.settings-form { gap: 0; }
.settings-row {
  grid-template-columns: minmax(170px, .75fr) minmax(220px, 1.25fr);
  gap: 18px; padding: 9px 0;
}
.settings-row > label, .settings-label { font-size: 11.5px; }
.settings-row input, .settings-row select { max-width: 400px; padding: 8px 11px; font-size: 11.5px; }
.settings-section {
  margin: 14px 0 2px; padding: 6px 9px; border-top: 0;
  border-left: 2px solid var(--amber); border-radius: 4px;
  background: rgba(239, 234, 224, .62); font-size: 11px;
}
.settings-hint { font-size: 10px; }
.settings-actions { padding-top: 12px; }
.settings-actions .button { min-width: 165px; min-height: 38px; font-size: 11.5px; }
.settings-advanced { margin-top: 12px; padding-top: 9px; }
.settings-advanced summary { font-size: 11px; }
.admin-columns .admin-card h2 { margin-bottom: 8px; }
@media (max-width: 620px) {
  .admin-main { padding-top: 16px; padding-bottom: 28px; }
  .admin-title h1 { font-size: 26px; }
  .admin-card { padding: 12px; }
  .settings-row { gap: 7px; padding: 8px 0; }
}

/* Compact grouped live metrics */
.live-divider { height: 34px; }
.live-metrics { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 13px; background: rgba(247, 244, 237, .58); }
.live-metric { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 3px 6px; }
.live-icon-wrap { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; }
.live-icon-img { width: 29px; height: 29px; flex: 0 0 29px; object-fit: contain; }
.live-metric strong { font-size: 26px; }
.live-metric small { margin-top: 3px; color: var(--ink-soft); font-size: 10px; font-weight: 600; line-height: 1.15; white-space: nowrap; }
@media (max-width: 620px) {
  .live-metrics { width: 100%; justify-content: space-between; }
  .live-metric { min-width: 0; }
  .live-metric strong { font-size: 24px; }
}

.error-note { color: #8d2638; }

.settings-token-toggle { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 10.5px; font-weight: 600; }
.settings-token-toggle input { width: auto; max-width: none; padding: 0; }

.auth-note { display: block; max-width: 360px; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.45; }

.button-telegram { color: #fff; background: #229ed9; box-shadow: 0 10px 24px rgba(34,158,217,.2); }
.button-telegram span { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 6px; background: rgba(255,255,255,.18); font-size: 12px; }

/* Admin question management */
.questions-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.question-filters { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 253, 248, .65); }
.question-filter { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px; border-radius: 7px; color: var(--muted); font-size: 10.5px; font-weight: 650; white-space: nowrap; }
.question-filter span { display: inline-grid; min-width: 17px; height: 17px; padding: 0 4px; place-items: center; border-radius: 99px; background: var(--paper-2); color: var(--ink-soft); font-size: 9px; }
.question-filter:hover, .question-filter.active { color: var(--ink); background: var(--white); box-shadow: 0 2px 8px rgba(33, 52, 53, .06); }
.question-filter.active span { background: var(--teal-soft); color: var(--teal-dark); }
.question-search { display: flex; align-items: center; gap: 6px; }
.question-search input[type="search"] { width: 250px; min-height: 32px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 10.5px; }
.question-search .button { min-height: 32px; padding: 0 11px; font-size: 10.5px; }
.question-search-reset { color: var(--muted); font-size: 10px; text-decoration: underline; }
.question-admin--approved { border-left: 3px solid var(--teal); }
.question-admin--rejected { border-left: 3px solid #b42e46; }
.question-admin-head small { font-size: 9.5px; line-height: 1.5; }
.question-answer-published { margin: 0 0 12px; padding: 9px 11px; border-left: 2px solid var(--teal); border-radius: 0 7px 7px 0; background: rgba(223, 243, 238, .45); color: var(--ink-soft); font-size: 10.5px; line-height: 1.5; }
.question-answer-published strong { display: block; margin-bottom: 3px; color: var(--teal-dark); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.moderate-form label { color: var(--muted); font-size: 9.5px; font-weight: 600; }
.moderate-form textarea { min-height: 78px; font-size: 11px; }
.question-empty strong { display: block; font-size: 12px; }
.question-empty p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
@media (max-width: 620px) {
  .questions-toolbar { align-items: stretch; flex-direction: column; }
  .question-filters { overflow-x: auto; }
  .question-search { width: 100%; }
  .question-search input[type="search"] { flex: 1 1 auto; width: auto; min-width: 0; }
}

/* Professional question moderation */
.questions-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 14px; }
.question-filters { display: flex; align-items: center; gap: 3px; min-width: 0; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); overflow-x: auto; }
.question-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-size: 10.5px; font-weight: 650; white-space: nowrap; }
.question-filter span { display: inline-grid; min-width: 18px; height: 18px; padding: 0 5px; place-items: center; border-radius: 99px; background: rgba(255,255,255,.55); color: var(--ink-soft); font-size: 9px; line-height: 1; }
.question-filter.active { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(33,52,53,.08); }
.question-filter.active span { background: var(--teal-soft); color: var(--teal-dark); }
.question-search { display: flex; align-items: center; gap: 6px; }
.question-search input[type="search"] { width: 260px; min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 10.5px; }
.question-search .button { min-height: 34px; padding: 0 12px; font-size: 10.5px; }
.question-search-reset { color: var(--muted); font-size: 10px; text-decoration: underline; white-space: nowrap; }
.question-admin { padding: 14px 16px; }
.question-admin--approved { border-left: 3px solid var(--teal); }
.question-admin--rejected { border-left: 3px solid #b42e46; }
.question-admin-head { align-items: flex-start; gap: 12px; }
.question-author { min-width: 0; }
.question-author > strong { display: block; margin-bottom: 3px; font-size: 11.5px; line-height: 1.25; }
.question-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; color: var(--muted); font-size: 9.5px; line-height: 1.4; }
.question-meta a { color: var(--teal); text-decoration: none; }
.question-meta a:hover { text-decoration: underline; }
.question-meta code { font-size: 9px; }
.question-admin-head > .status { flex: 0 0 auto; margin-top: 1px; }
.question-text { margin: 11px 0 10px; padding: 10px 12px; border-radius: 8px; background: rgba(239,234,224,.55); font-size: 11.5px; line-height: 1.55; }
.question-answer-published { margin: 0 0 9px; padding: 10px 12px; border-left: 2px solid var(--teal); border-radius: 0 8px 8px 0; background: rgba(223,243,238,.48); color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.question-answer-published strong { display: block; margin-bottom: 4px; color: var(--teal-dark); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.question-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.question-actions .button { min-height: 32px; padding: 0 12px; font-size: 10.5px; }
.question-edit { flex: 1 1 100%; }
.question-edit > summary { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); font-size: 10.5px; font-weight: 650; cursor: pointer; list-style: none; }
.question-edit > summary::-webkit-details-marker { display: none; }
.question-edit > summary::before { content: '✎'; margin-right: 6px; color: var(--teal); }
.question-edit[open] > summary { margin-bottom: 8px; border-color: var(--teal); }
.question-edit .moderate-form { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.inline-question-action { margin: 0; }
.moderate-form label { color: var(--muted); font-size: 9.5px; font-weight: 600; }
.moderate-form textarea { min-height: 82px; padding: 9px 10px; font-size: 11px; line-height: 1.5; }
.moderate-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.moderate-actions .button { min-height: 32px; padding: 0 12px; font-size: 10.5px; }
.question-empty strong { display: block; font-size: 12px; }
.question-empty p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
@media (max-width: 760px) {
  .questions-toolbar { grid-template-columns: 1fr; }
  .question-search { width: 100%; }
  .question-search input[type="search"] { flex: 1 1 auto; width: auto; min-width: 0; }
  .question-admin { padding: 12px; }
}

/* ===== Premium themes ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0faf6; --ink-soft: #c6ddd7; --muted: #92aaa5;
  --paper: #0b1618; --paper-2: #102326; --white: #12282b;
  --teal: #46d2c3; --teal-dark: #9be9df; --teal-soft: #123b38;
  --amber: #e4b26b; --line: rgba(212, 240, 232, .16);
  --shadow: 0 24px 70px rgba(0, 0, 0, .52);
}
html[data-theme="graphite"] {
  color-scheme: dark;
  --ink: #f7f1e6; --ink-soft: #d8cfc0; --muted: #a89f91;
  --paper: #15181b; --paper-2: #1e2327; --white: #232a2f;
  --teal: #8bd8cb; --teal-dark: #c9f2ea; --teal-soft: #243b39;
  --amber: #e8bd7b; --line: rgba(245, 234, 216, .16);
  --shadow: 0 24px 70px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] body {
  background: radial-gradient(900px 620px at 88% -8%, rgba(70, 210, 195, .11), transparent 62%),
              radial-gradient(800px 500px at 5% 4%, rgba(228, 178, 107, .08), transparent 58%),
              var(--paper);
}
html[data-theme="graphite"] body {
  background: radial-gradient(900px 620px at 88% -8%, rgba(139, 216, 203, .10), transparent 62%),
              radial-gradient(800px 500px at 5% 4%, rgba(232, 189, 123, .08), transparent 58%),
              var(--paper);
}
html[data-theme="dark"] .site-header,
html[data-theme="graphite"] .site-header { background: rgba(11, 22, 24, .82); }
html[data-theme="graphite"] .site-header { background: rgba(21, 24, 27, .86); }
html[data-theme="dark"] .admin-body,
html[data-theme="graphite"] .admin-body { background: var(--paper); }
html[data-theme="dark"] .admin-header,
html[data-theme="graphite"] .admin-header { background: var(--white); }
html[data-theme="dark"] .trust-strip,
html[data-theme="graphite"] .trust-strip { background: rgba(255, 255, 255, .025); }
html[data-theme="dark"] .section-tinted,
html[data-theme="graphite"] .section-tinted { background: rgba(255, 255, 255, .045); }
html[data-theme="dark"] .float-card,
html[data-theme="graphite"] .float-card { border-color: var(--line); background: rgba(18, 40, 43, .94); }
html[data-theme="graphite"] .float-card { background: rgba(35, 42, 47, .95); }
html[data-theme="dark"] .float-icon.amber,
html[data-theme="graphite"] .float-icon.amber { background: rgba(228, 178, 107, .16); }
html[data-theme="dark"] .button-ghost,
html[data-theme="graphite"] .button-ghost { background: rgba(255, 255, 255, .055); }
html[data-theme="dark"] .button-dark,
html[data-theme="graphite"] .button-dark { color: var(--paper); background: var(--ink); }
html[data-theme="dark"] .button-danger,
html[data-theme="graphite"] .button-danger { color: #ffb9c5; border-color: rgba(255, 185, 197, .25); background: rgba(180, 46, 70, .16); }
html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select,
html[data-theme="graphite"] input, html[data-theme="graphite"] textarea, html[data-theme="graphite"] select { color: var(--ink); background: rgba(255, 255, 255, .055); border-color: var(--line); }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder,
html[data-theme="graphite"] input::placeholder, html[data-theme="graphite"] textarea::placeholder { color: var(--muted); }
html[data-theme="dark"] .alert.success,
html[data-theme="graphite"] .alert.success { color: #9be9df; border-color: rgba(70, 210, 195, .25); background: rgba(70, 210, 195, .10); }
html[data-theme="dark"] .alert.error,
html[data-theme="graphite"] .alert.error { color: #ffb9c5; border-color: rgba(255, 185, 197, .25); background: rgba(180, 46, 70, .13); }
html[data-theme="dark"] .qa-lock,
html[data-theme="graphite"] .qa-lock { background: rgba(70, 210, 195, .07); border-color: rgba(70, 210, 195, .28); }
html[data-theme="dark"] .vk-signed,
html[data-theme="graphite"] .vk-signed { background: rgba(255, 255, 255, .045); }
html[data-theme="dark"] .privacy-note,
html[data-theme="graphite"] .privacy-note { background: rgba(70, 210, 195, .075); border-color: rgba(70, 210, 195, .2); }
html[data-theme="dark"] .status-pending,
html[data-theme="graphite"] .status-pending { color: #e4b26b; background: rgba(228, 178, 107, .14); }
html[data-theme="dark"] .status-approved,
html[data-theme="graphite"] .status-approved { color: #9be9df; background: rgba(70, 210, 195, .12); }
html[data-theme="dark"] .status-rejected,
html[data-theme="graphite"] .status-rejected { color: #ffb9c5; background: rgba(180, 46, 70, .16); }
html[data-theme="dark"] .question-text,
html[data-theme="graphite"] .question-text { background: rgba(255, 255, 255, .055); }
html[data-theme="dark"] .question-answer-published,
html[data-theme="graphite"] .question-answer-published { background: rgba(70, 210, 195, .075); }
html[data-theme="dark"] .live-inner,
html[data-theme="graphite"] .live-inner { background: var(--white); }
html[data-theme="dark"] .live-metrics,
html[data-theme="graphite"] .live-metrics { background: rgba(255, 255, 255, .045); }
html[data-theme="dark"] .live-icon-wrap,
html[data-theme="graphite"] .live-icon-wrap { background: #eef4ef; border-color: rgba(255, 255, 255, .2); }
html[data-theme="dark"] .live-model,
html[data-theme="graphite"] .live-model { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .live-bar,
html[data-theme="graphite"] .live-bar { background: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .live-shield,
html[data-theme="graphite"] .live-shield { background: rgba(70, 210, 195, .15); color: #9be9df; }
html[data-theme="dark"] .settings-section,
html[data-theme="graphite"] .settings-section { background: rgba(255, 255, 255, .055); }
html[data-theme="dark"] .question-filters,
html[data-theme="graphite"] .question-filters { background: rgba(255, 255, 255, .045); }
html[data-theme="dark"] .question-filter.active,
html[data-theme="graphite"] .question-filter.active { background: var(--white); }
html[data-theme="dark"] .question-filter span,
html[data-theme="graphite"] .question-filter span { background: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .question-edit > summary,
html[data-theme="graphite"] .question-edit > summary { background: rgba(255, 255, 255, .055); }
html[data-theme="dark"] .question-edit .moderate-form,
html[data-theme="graphite"] .question-edit .moderate-form { background: rgba(255, 255, 255, .035); }
html[data-theme="dark"] .app-top,
html[data-theme="graphite"] .app-top { background: var(--paper-2); }
html[data-theme="dark"] .skip-link:focus,
html[data-theme="graphite"] .skip-link:focus { color: var(--paper); background: var(--ink); }

/* Theme switcher */
.theme-switcher { position: relative; z-index: 70; flex: 0 0 auto; }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: rgba(255, 255, 255, .35); font-size: 10px; font-weight: 650; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); border-color: var(--teal); }
.theme-toggle-icon { color: var(--teal); font-size: 15px; line-height: 1; }
.theme-menu { position: absolute; top: calc(100% + 7px); right: 0; display: none; width: 210px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); box-shadow: var(--shadow); }
.theme-switcher.open .theme-menu { display: block; }
.theme-choice { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.theme-choice:hover, .theme-choice.active { background: var(--teal-soft); }
.theme-choice > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.theme-choice strong { font-size: 10.5px; }
.theme-choice small { color: var(--muted); font-size: 9px; }
.theme-swatch { display: block; flex: 0 0 22px; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; }
.theme-swatch-light { background: linear-gradient(135deg, #f7f4ed 50%, #0d7f78 50%); }
.theme-swatch-dark { background: linear-gradient(135deg, #0b1618 50%, #46d2c3 50%); }
.theme-swatch-graphite { background: linear-gradient(135deg, #15181b 50%, #e8bd7b 50%); }

/* Mobile navigation */
.nav-toggle { display: none; width: 36px; height: 36px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; }
.nav-toggle span { display: block; width: 100%; height: 1.5px; margin: 4px 0; border-radius: 2px; background: var(--ink); }
@media (max-width: 900px) {
  .header-inner { position: relative; gap: 10px; }
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav { position: absolute; top: calc(100% + 1px); left: -12px; right: -12px; display: none; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 0 0 13px 13px; background: var(--white); box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 11px; border-radius: 7px; font-size: 12px; }
  .main-nav a:hover { background: var(--teal-soft); }
  .header-actions { margin-left: auto; }
  .header-actions .button-ghost { display: none; }
  .theme-toggle-label { display: none; }
  .theme-toggle { min-height: 34px; padding: 0 7px; }
}
@media (max-width: 620px) {
  .theme-menu { right: -4px; width: min(210px, calc(100vw - 24px)); }
  .header-actions .button-dark { padding: 0 10px; font-size: 10.5px; }
}
@media (max-width: 760px) {
  .admin-header-inner { flex-wrap: wrap; gap: 8px; padding: 9px 0; }
  .admin-nav { order: 3; width: 100%; margin-left: 0; gap: 14px; overflow-x: auto; }
  .admin-header-inner > form { margin-left: 0; }
  .admin-header-inner .theme-switcher { margin-left: auto; }
}

.admin-login-body { position: relative; }
.admin-login-body > .theme-switcher { position: fixed; top: 16px; right: 16px; }

html[data-theme="dark"] .theme-toggle,
html[data-theme="graphite"] .theme-toggle { background: rgba(255,255,255,.055); }
html[data-theme="dark"] .cta-final .button-dark,
html[data-theme="graphite"] .cta-final .button-dark { color: var(--paper); background: var(--ink); }
html[data-theme="dark"] .app-frame,
html[data-theme="graphite"] .app-frame { background: var(--paper-2); border-color: var(--line); }
html[data-theme="dark"] .carousel-card,
html[data-theme="graphite"] .carousel-card { background: var(--white); border-color: var(--line); }
html[data-theme="dark"] .download-card,
html[data-theme="dark"] .ask-form,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .stat-card,
html[data-theme="graphite"] .download-card,
html[data-theme="graphite"] .ask-form,
html[data-theme="graphite"] .login-card,
html[data-theme="graphite"] .admin-card,
html[data-theme="graphite"] .stat-card { background: var(--white); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* Compact moderation card and icon system */
.ui-icon { display: inline-block; width: 14px; height: 14px; flex: 0 0 14px; vertical-align: -.12em; }
.button .ui-icon, .question-filter .ui-icon { margin-right: 5px; }
.question-admin { padding: 12px 14px; }
.question-admin-head { align-items: flex-start; gap: 10px; }
.question-author { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; min-width: 0; }
.question-avatar { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: var(--teal-dark); background: var(--teal-soft); font-size: 11px; font-weight: 800; }
.question-author-copy { display: flex; flex-direction: column; min-width: 0; }
.question-author-copy > strong { display: block; margin: 0 0 2px; font-size: 11px; line-height: 1.25; }
.question-meta { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 2px 8px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.question-meta span + span::before, .question-meta a::before { content: '·'; margin-right: 7px; color: var(--line); }
.question-meta a::before { content: '·'; }
.question-meta code { font-size: 8.5px; }
.question-body-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 8px 0 6px; }
.question-body-grid .question-text, .question-body-grid .question-answer-published { margin: 0; min-height: 0; }
.question-text { margin: 8px 0 7px; padding: 8px 10px; border-radius: 7px; font-size: 10.5px; line-height: 1.5; }
.question-answer-published { margin: 0; padding: 8px 10px; border-radius: 0 7px 7px 0; font-size: 10.5px; line-height: 1.5; }
.question-answer-published strong { margin-bottom: 2px; font-size: 8px; }
.question-actions { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.question-actions .button { min-height: 30px; padding: 0 10px; font-size: 10px; }
.question-edit { flex: 0 0 auto; }
.question-edit > summary { min-height: 30px; padding: 0 10px; font-size: 10px; }
.question-edit > summary::before { display: none; }
.question-edit > summary .ui-icon { margin-right: 3px; vertical-align: -.18em; }
.question-edit[open] { flex: 1 1 100%; }
.question-edit .moderate-form { padding: 8px; gap: 6px; }
.question-edit .moderate-form textarea { min-height: 68px; }
.inline-question-action { display: inline-flex; margin: 0; }
.moderate-form { gap: 6px; }
.moderate-form label { font-size: 9px; }
.moderate-form textarea { min-height: 70px; padding: 8px 9px; font-size: 10.5px; }
.moderate-actions { gap: 5px; }
.moderate-actions .button { min-height: 30px; padding: 0 10px; font-size: 10px; }
.question-filter { min-height: 28px; }
.question-filter .ui-icon { margin-right: 0; width: 12px; height: 12px; flex-basis: 12px; }
.question-search .ui-icon { margin-right: 0; width: 12px; height: 12px; flex-basis: 12px; }
.question-search .button { gap: 4px; }
@media (max-width: 760px) {
  .question-body-grid { grid-template-columns: 1fr; }
  .question-edit[open] { flex-basis: 100%; }
}

.admin-nav a, .stat-card span, .text-button { display: inline-flex; align-items: center; gap: 5px; }
.admin-nav .ui-icon { width: 13px; height: 13px; flex-basis: 13px; }
.stat-card .ui-icon { width: 13px; height: 13px; flex-basis: 13px; color: var(--teal); }
.text-button .ui-icon { width: 12px; height: 12px; flex-basis: 12px; }
.main-nav a { display: inline-flex; align-items: center; gap: 5px; }
.main-nav .ui-icon { width: 13px; height: 13px; flex-basis: 13px; }
.nav-download { display: inline-flex; align-items: center; gap: 5px; }
.button-telegram .ui-icon { width: 15px; height: 15px; flex-basis: 15px; }

/* Final compact moderation layout */
.question-admin { padding: 10px 12px; }
.question-admin-head { display: flex; flex-direction: row; align-items: flex-start; gap: 9px; }
.question-admin-head .question-author { display: flex; flex-direction: row; align-items: flex-start; gap: 7px; }
.question-admin-head .question-author-copy { display: flex; flex-direction: column; gap: 1px; }
.question-admin-head .question-meta { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 1px 7px; }
.question-author > strong, .question-author-copy > strong { margin: 0; font-size: 10.5px; }
.question-avatar { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 7px; font-size: 10px; }
.question-meta { font-size: 8.5px; }
.question-meta span + span::before, .question-meta a::before { margin-right: 5px; }
.question-body-grid { margin: 6px 0 4px; gap: 6px; }
.question-text { margin: 5px 0 4px; padding: 6px 8px; font-size: 10px; line-height: 1.45; }
.question-body-grid .question-text { margin: 0; }
.question-answer-published { padding: 6px 8px; font-size: 10px; line-height: 1.45; }
.question-answer-published strong { font-size: 7.5px; }
.question-actions { gap: 5px; margin-top: 4px; }
.question-actions .button, .question-edit > summary { min-height: 27px; padding: 0 8px; font-size: 9.5px; }
.question-edit .moderate-form { margin-top: 5px; }
.question-edit .moderate-form textarea { min-height: 56px; }
.moderate-form textarea { min-height: 62px; }

/* Home: advantages and workflow */
.advantage { position: relative; }
.advantage-icon { display: grid; width: 34px; height: 34px; margin-bottom: 15px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--teal); background: var(--teal-soft); }
.advantage-icon .ui-icon { width: 17px; height: 17px; flex-basis: 17px; }
.advantage .adv-num { display: block; }
.advantage h3 { margin-top: 8px; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 32px; }
.process-step { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.process-icon { display: grid; width: 38px; height: 38px; margin-bottom: 20px; place-items: center; border-radius: 10px; color: var(--teal); background: var(--teal-soft); }
.process-icon .ui-icon { width: 19px; height: 19px; flex-basis: 19px; }
.process-num { position: absolute; top: 20px; right: 20px; color: var(--amber); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.process-step h3 { margin: 0 0 7px; font-size: 15px; letter-spacing: -.02em; }
.process-step p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
html[data-theme="dark"] .advantage,
html[data-theme="graphite"] .advantage { background: rgba(255, 255, 255, .045); }
@media (max-width: 900px) { .process-grid { grid-template-columns: 1fr; } }

.secret-field { display: flex; align-items: center; gap: 6px; min-width: 0; width: 100%; max-width: 430px; }
.secret-field input { flex: 1 1 auto; min-width: 0; }
.secret-toggle { flex: 0 0 auto; min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--teal); background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; }
.secret-toggle:hover { border-color: var(--teal); background: var(--teal-soft); }

/* Explicit two-column settings layout: label left, value right */
.settings-row {
  grid-template-columns: minmax(200px, .8fr) minmax(0, 1.2fr);
  align-items: center;
  column-gap: 26px;
}
.settings-row > label,
.settings-row > .settings-label {
  grid-column: 1;
  align-self: center;
  text-align: left;
}
.settings-row > input,
.settings-row > select,
.settings-row > .settings-value,
.settings-row > .secret-field,
.settings-row > .settings-readonly,
.settings-row > .settings-check,
.settings-row > .settings-check-list {
  grid-column: 2;
  justify-self: end;
  width: 100%;
  max-width: 430px;
}
.settings-row > .settings-check {
  justify-content: flex-start;
  width: auto;
}
.settings-row > .settings-check-list { justify-self: end; }
.settings-row > .settings-value > input,
.settings-row > .settings-value > .secret-field { width: 100%; max-width: 430px; }
.settings-row > .secret-field { justify-self: end; }
.settings-readonly { text-align: left; justify-self: end; }
.settings-section, .settings-form > .section-note { grid-column: 1 / -1; }
@media (max-width: 620px) {
  .settings-row { grid-template-columns: 1fr; row-gap: 6px; }
  .settings-row > label,
  .settings-row > .settings-label,
  .settings-row > input,
  .settings-row > select,
  .settings-row > .settings-value,
  .settings-row > .secret-field,
  .settings-row > .settings-readonly,
  .settings-row > .settings-check, .settings-row > .settings-check-list { grid-column: 1; justify-self: stretch; max-width: none; }
  .settings-row > .settings-check { justify-content: flex-start; }
}

.settings-check-list { display: grid; gap: 8px; }
.settings-check-list .settings-check { font-weight: 500 !important; color: var(--ink) !important; }

.ip-city { color: var(--muted); font-size: 10px; white-space: nowrap; }
.ip-city--unknown { opacity: .7; }
.data-table th small { display: block; margin-top: 2px; color: var(--muted); font-size: 8.5px; font-weight: 500; text-transform: none; letter-spacing: 0; }
