/* ============ ElectroPars Design System ============ */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --accent: #22d3ee;
  --accent2: #a78bfa;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .55);
  --maxw: 1240px;
  --header-h: 70px;
}

html[data-theme="dark"] {
  --bg: #070b14;
  --bg2: #0b1220;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .075);
  --border: rgba(255, 255, 255, .10);
  --text: #e8eefc;
  --muted: #94a3b8;
  --head-bg: rgba(8, 13, 24, .78);
  --code-bg: #0a1526;
}

html[data-theme="light"] {
  --bg: #f4f7fb;
  --bg2: #ffffff;
  --surface: rgba(12, 32, 66, .035);
  --surface-2: rgba(12, 32, 66, .06);
  --border: rgba(12, 32, 66, .12);
  --text: #0f1e35;
  --muted: #5b6b85;
  --head-bg: rgba(255, 255, 255, .82);
  --code-bg: #eef3fb;
  --shadow: 0 18px 46px -24px rgba(15, 30, 53, .35);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-fa, Tahoma, sans-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  font-size: 15.5px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.6; margin: 0 0 .6em; font-weight: 800; letter-spacing: -.2px; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 18px; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- background FX ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
  opacity: .55;
}
.bg-glow {
  position: fixed; inset: -20% -10% auto -10%; height: 70vh; z-index: -3; pointer-events: none;
  background: radial-gradient(45% 55% at 20% 20%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
              radial-gradient(40% 50% at 80% 10%, color-mix(in srgb, var(--accent2) 28%, transparent), transparent 70%);
  filter: blur(30px); opacity: .5;
}

.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; width: 0; z-index: 999; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .1s linear; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; backdrop-filter: blur(16px); background: var(--head-bg); border-bottom: 1px solid var(--border); }
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6); }
.header-inner { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: #041018;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 22px -8px var(--accent); }
.brand-mark .ico { width: 24px; height: 24px; stroke-width: 2.2; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 17px; }
.brand-text small { font-size: 11px; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; overflow: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.nav-link { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 12px; font-size: 13.5px; color: var(--muted); white-space: nowrap; transition: .2s; }
.nav-link .ico { width: 17px; height: 17px; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

.header-actions { display: flex; align-items: center; gap: 50px; margin-inline-start: auto; }
.main-nav + .header-actions { margin-inline-start: 0; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: .2s; }
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.menu-btn { display: none; }
html[data-theme="dark"] .t-sun, html[data-theme="light"] .t-moon { display: none; }

/* ticker */
.ticker { border-top: 1px solid var(--border); overflow: hidden; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ticker-track { display: flex; gap: 34px; width: max-content; animation: tick 38s linear infinite; padding: 6px 0; }
.ticker-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ticker-item .ico { width: 14px; height: 14px; color: var(--accent); }
@keyframes tick { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 14px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: .22s cubic-bezier(.4, 0, .2, 1); position: relative; overflow: hidden; }
.btn .ico { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #05111c; box-shadow: 0 12px 28px -14px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px var(--accent); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-outline { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-danger { background: #ef4444; color: #fff; }
.btn::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, .28), transparent 55%); opacity: 0; transition: opacity .3s; }
.btn:hover::after { opacity: 1; }

/* ---------- cards / sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 25px; display: flex; align-items: center; gap: 10px; }
.section-head h2 .ico { color: var(--accent); }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .28s cubic-bezier(.4, 0, .2, 1); position: relative; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 16px; margin: 0; }
.card-desc { color: var(--muted); font-size: 13px; margin: 0; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; flex-wrap: wrap; }
.card-meta .ico { width: 14px; height: 14px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.badge.alt { background: color-mix(in srgb, var(--accent2) 14%, transparent); color: var(--accent2); border-color: color-mix(in srgb, var(--accent2) 30%, transparent); }
.badge.warn { background: rgba(245, 158, 11, .14); color: #f59e0b; border-color: rgba(245, 158, 11, .3); }
.badge.ok { background: rgba(52, 211, 153, .14); color: #34d399; border-color: rgba(52, 211, 153, .3); }
.badge.off { background: rgba(148, 163, 184, .14); color: #94a3b8; border-color: rgba(148, 163, 184, .3); }
.card-ribbon { position: absolute; inset-inline-start: 12px; top: 12px; z-index: 2; }

/* hero */
.hero { position: relative; padding: 68px 0 54px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; }
.hero h1 { font-size: 42px; line-height: 1.45; margin: 0 0 14px; }
.hero h1 .grad { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 16px; color: var(--muted); max-width: 56ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.hero-visual { position: relative; border-radius: 26px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero-visual img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, transparent 40%, color-mix(in srgb, var(--accent) 22%, transparent)); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; color: var(--muted); }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.stat b { display: block; font-size: 24px; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 12px; color: var(--muted); }

/* section tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { position: relative; padding: 20px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; transition: .25s; }
.tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tc, var(--accent)) 50%, transparent); }
.tile .t-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px;
  background: color-mix(in srgb, var(--tc, var(--accent)) 16%, transparent); color: var(--tc, var(--accent)); border: 1px solid color-mix(in srgb, var(--tc, var(--accent)) 28%, transparent); }
.tile h3 { margin: 0 0 4px; font-size: 16px; }
.tile p { margin: 0; font-size: 12.5px; color: var(--muted); }
.tile .t-count { position: absolute; top: 16px; inset-inline-end: 16px; font-size: 11px; color: var(--muted); }

/* owner card */
.owner-card { display: flex; gap: 18px; align-items: center; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface)); }
.owner-photo { position: relative; flex: none; }
.owner-photo img { width: 112px; height: 112px; border-radius: 99px; object-fit: cover; border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 14px 34px -16px var(--accent); }
.owner-photo::before { content: ""; position: absolute; inset: -7px; border-radius: 32px; background: conic-gradient(from 0deg, var(--accent), var(--accent2), var(--accent)); filter: blur(11px); opacity: .45; z-index: -1; animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.owner-info h3 { margin: 0 0 2px; font-size: 19px; }
.owner-info .role { color: var(--accent); font-size: 13px; font-weight: 700; }
.owner-info p { font-size: 13.5px; color: var(--muted); margin: 8px 0 10px; }
.owner-mini { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.owner-mini img { width: 44px; height: 44px; border-radius: 100px; object-fit: cover; border: 1px solid var(--border); }
.owner-mini strong { display: block; font-size: 13px; }
.owner-mini small { font-size: 11px; color: var(--muted); }

/* list page */
.page-head { padding: 34px 0 10px; }
.page-head h1 { font-size: 30px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.page-head h1 .ico { color: var(--accent); width: 26px; height: 26px; }
.page-head p { color: var(--muted); margin: 0; font-size: 14px; }
.breadcrumb { display: flex; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--accent); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 22px; }
.filters input, .filters select { flex: 1; min-width: 150px; }
.input, input[type=text], input[type=search], input[type=password], input[type=email], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: inherit; font-size: 14px; transition: .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { min-height: 120px; resize: vertical; line-height: 1.9; }
label.fl { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.field { margin-bottom: 15px; }

/* article */
.article-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 26px 0 60px; align-items: start; }
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.article-hero img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.article-inner { padding: 24px; }
.article-inner h1 { font-size: 27px; }
.prose { font-size: 15px; line-height: 2.1; }
.prose h2 { font-size: 20px; margin-top: 1.6em; padding-inline-start: 12px; border-inline-start: 4px solid var(--accent); }
.prose h3 { font-size: 17px; margin-top: 1.4em; color: var(--accent2); }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose li { margin-bottom: .45em; }
.prose code { background: var(--code-bg); padding: 2px 7px; border-radius: 7px; font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.prose pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 14px; padding: 16px; overflow: auto; }
.prose pre code { background: none; color: var(--text); padding: 0; line-height: 1.8; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 13.5px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: right; }
.prose th { background: var(--surface-2); }
.prose img { border-radius: 14px; margin: 1em 0; }
.callout { padding: 14px 16px; border-radius: 14px; margin: 1.2em 0; border: 1px solid var(--border); background: var(--surface-2); }
.callout.warn { border-color: rgba(245, 158, 11, .4); background: rgba(245, 158, 11, .08); }
.callout.tip { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 14px); }
.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.side-box h4 { margin: 0 0 12px; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.side-box h4 .ico { width: 17px; height: 17px; color: var(--accent); }
.side-list a { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.side-list a:last-child { border: 0; }
.side-list a:hover { color: var(--accent); }
.side-list img { width: 52px; height: 40px; border-radius: 9px; object-fit: cover; flex: none; }

.tags-row { display: flex; gap: 7px; flex-wrap: wrap; }
.tag { font-size: 11.5px; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.tag:hover { color: var(--accent); border-color: var(--accent); }

/* specs table */
.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.spec-table td:first-child { color: var(--muted); width: 45%; }
.spec-table tr:last-child td { border: 0; }

/* tools */
.tools-layout { display: grid; grid-template-columns: 270px 1fr; gap: 22px; padding: 22px 0 60px; align-items: start; }
.tool-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: calc(var(--header-h) + 14px); max-height: calc(100vh - 110px); overflow: auto; }
.tool-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px; font-size: 13.5px; border: 1px solid transparent; }
.tool-list a:hover { background: var(--surface); }
.tool-list a.active { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.calc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.calc h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.result-box { margin-top: 18px; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), color-mix(in srgb, var(--accent2) 10%, transparent)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.result-box .rv { font-size: 22px; font-weight: 800; color: var(--accent); direction: ltr; text-align: left; }
.result-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.result-line:last-child { border: 0; }
.result-line b { direction: ltr; }
.resistor-vis { display: flex; align-items: center; justify-content: center; gap: 0; height: 66px; margin: 16px 0; background: linear-gradient(180deg, #d9b382, #c79b63); border-radius: 12px; position: relative; max-width: 330px; margin-inline: auto; }
.rband { width: 17px; height: 100%; }

/* Q&A */
.qa-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.qa-q { display: flex; gap: 10px; font-weight: 700; }
.qa-q .ico { color: var(--accent); flex: none; }
.qa-a { margin-top: 12px; padding: 12px 14px; border-radius: 13px; background: var(--surface-2); font-size: 13.8px; color: var(--muted); border-inline-start: 3px solid var(--accent); }
.qa-meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); margin-top: 10px; align-items: center; flex-wrap: wrap; }

/* accordion */
.acc { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.acc summary { padding: 13px 16px; cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; color: var(--accent); font-size: 18px; }
.acc[open] summary::after { content: "−"; }
.acc .acc-body { padding: 0 16px 14px; color: var(--muted); font-size: 13.5px; }

/* flash / modal / misc */
.flash { position: fixed; top: 84px; inset-inline-end: 18px; z-index: 300; padding: 12px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 700; box-shadow: var(--shadow); animation: slideIn .4s; }
.flash-ok { background: #10b981; color: #04231a; }
.flash-err { background: #ef4444; color: #fff; }
@keyframes slideIn { from { transform: translateY(-16px); opacity: 0; } }

.search-modal { position: fixed; inset: 0; z-index: 200; background: rgba(4, 8, 16, .82); backdrop-filter: blur(9px); display: none; padding: 16vh 18px 0; }
.search-modal.open { display: block; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.search-box { max-width: 680px; margin-inline: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--border); }
.search-box .ico { color: var(--accent); margin-inline-start: 8px; }
.search-box input { border: 0; background: transparent; box-shadow: none !important; }
.search-hints { max-width: 680px; margin: 14px auto; display: flex; gap: 8px; flex-wrap: wrap; }
.search-hints a { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.search-hints a:hover { color: var(--accent); }

.backdrop { position: fixed; inset: 0; background: rgba(3, 7, 14, .6); backdrop-filter: blur(3px); z-index: 70; opacity: 0; pointer-events: none; transition: .3s; }
.backdrop.show { opacity: 1; pointer-events: auto; }

/* ---------- mobile panel styles ---------- */
.mobile-panel { position: fixed; z-index: 80; background: var(--bg2); border: 1px solid var(--border); display: flex; flex-direction: column; transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .3s; }
.mp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.mp-title { font-weight: 800; }
.mp-links { padding: 12px; display: flex; flex-direction: column; gap: 4px; overflow: auto; flex: 1; }
.mp-links a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14.5px; transition: .2s; }
.mp-links a:hover, .mp-links a:active { background: var(--surface-2); color: var(--accent); transform: translateX(-4px); }
.mp-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.mp-foot { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); justify-content: center; }
.mp-foot .soc { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); }
.mp-foot .soc:hover { color: var(--accent); border-color: var(--accent); }

/* style: drawer */
.mobile-panel[data-style="drawer"] { top: 0; bottom: 0; inset-inline-end: 0; width: min(310px, 86vw); transform: translateX(-102%); }
html[dir="rtl"] .mobile-panel[data-style="drawer"] { transform: translateX(102%); }
.mobile-panel[data-style="drawer"].open { transform: translateX(0) !important; }
/* style: fullscreen */
.mobile-panel[data-style="fullscreen"] { inset: 0; width: 100%; opacity: 0; pointer-events: none; transform: scale(.97); }
.mobile-panel[data-style="fullscreen"].open { opacity: 1; pointer-events: auto; transform: scale(1); }
.mobile-panel[data-style="fullscreen"] .mp-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-content: start; padding: 18px; }
.mobile-panel[data-style="fullscreen"] .mp-links a { flex-direction: column; text-align: center; gap: 8px; padding: 20px 10px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
/* style: bottom sheet */
.mobile-panel[data-style="bottom"] { inset-inline: 0; bottom: 0; border-radius: 26px 26px 0 0; max-height: 80vh; transform: translateY(102%); }
.mobile-panel[data-style="bottom"].open { transform: translateY(0); }
.mobile-panel[data-style="bottom"] .mp-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px; }
.mobile-panel[data-style="bottom"] .mp-links a { flex-direction: column; gap: 7px; text-align: center; font-size: 11.5px; padding: 14px 6px; background: var(--surface); border: 1px solid var(--border); }
/* style: classic */
.mobile-panel[data-style="classic"] { top: var(--header-h); inset-inline: 0; border-radius: 0 0 22px 22px; max-height: 76vh; transform: translateY(-110%); opacity: 0; }
.mobile-panel[data-style="classic"].open { transform: translateY(0); opacity: 1; }
.mobile-panel[data-style="classic"] .mp-head { display: none; }

/* dock */
.dock { position: fixed; z-index: 75; inset-inline: 12px; bottom: 12px; display: none; align-items: center; justify-content: space-around;
  padding: 8px 6px; border-radius: 22px; background: var(--head-bg); backdrop-filter: blur(18px); border: 1px solid var(--border); box-shadow: var(--shadow); }
.dock a, .dock button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--muted); background: none; border: 0; font-family: inherit; cursor: pointer; padding: 4px 8px; border-radius: 12px; }
.dock a:active, .dock button:active { color: var(--accent); }
.dock .ico { width: 21px; height: 21px; }

.to-top { position: fixed; inset-inline-start: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--head-bg); backdrop-filter: blur(10px); color: var(--text); cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: .3s; z-index: 74; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top .ico { transform: rotate(180deg); }

/* pwa banner */
.pwa-banner { position: fixed; bottom: 14px; inset-inline: 14px; max-width: 520px; margin-inline: auto; z-index: 90; display: none; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--border); box-shadow: var(--shadow); }
.pwa-banner.show { display: flex; animation: slideIn .4s; }
.pwa-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #04121b; flex: none; }
.pwa-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.5; }
.pwa-txt small { font-size: 11.5px; color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg2); margin-top: 40px; padding-top: 38px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 26px; padding-bottom: 26px; }
.f-col h4 { font-size: 14px; margin-bottom: 12px; }
.f-col a { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); padding: 4px 0; }
.f-col a:hover { color: var(--accent); }
.f-col .ico { width: 15px; height: 15px; }
.f-brand p { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.socials { display: flex; gap: 8px; margin-top: 12px; }
.socials a { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); }
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.footer-bottom a { color: var(--accent); }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ico { width: 44px; height: 44px; margin-inline: auto; opacity: .5; margin-bottom: 12px; }
.hide-sm { display: inline-flex; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: .6s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .article-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .tools-layout { grid-template-columns: 1fr; }
  .tool-list { position: static; flex-direction: row; overflow: auto; max-height: none; padding-bottom: 6px; }
  .tool-list a { white-space: nowrap; }
  .hero-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .hero { padding: 40px 0 30px; }
  .hero h1 { font-size: 29px; }
  .g3, .g2, .g4 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
  .section { padding: 38px 0; }
  .owner-card { flex-direction: column; text-align: center; }
  body.menu-bottom { padding-bottom: 82px; }
  body.menu-bottom .dock { display: flex; }
  body.menu-bottom .to-top { bottom: 84px; }
  body.menu-bottom .pwa-banner { bottom: 82px; }
  .article-inner { padding: 17px; }
  .article-inner h1 { font-size: 21px; }
  .flash { inset-inline: 14px; top: 78px; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { padding: 15px 13px; }
  .tile .t-ico { width: 38px; height: 38px; }
  .tile h3 { font-size: 13.5px; }
  .tile p { display: none; }
}
@media print { .site-header, .site-footer, .dock, .to-top, .pwa-banner { display: none !important; } }
