:root {
  /* Mafia theme: monochrome black & white */
  --bg: #000000; --surface: #0a0a0a; --surface-2: #141414; --border: #222222; --border-strong: #3a3a3a;
  --text: #f4f4f4; --muted: #8b8b8b;
  --accent: #ffffff; --accent-2: #d9d9d9; --accent-soft: rgba(255,255,255,.07); --on-accent: #000000;
  --ok: #5bd28c; --ok-bg: rgba(91,210,140,.10); --warn: #f0b85a; --warn-bg: rgba(240,184,90,.10);
  --bad: #ff6b6b; --bad-bg: rgba(255,107,107,.10); --info: #d6d6d6; --info-bg: rgba(255,255,255,.08);
  --radius: 12px; --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.8);
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font: Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* layout: admin */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; align-self: start; }
.brand { font-weight: 700; font-size: 15px; padding: 4px 10px 16px; display: flex; gap: 8px; align-items: center; }
.brand-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.nav a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: 14px; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .section { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 6px; }
.main { padding: 26px 32px 60px; max-width: 1240px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

/* layout: portal */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; }
.topbar nav { display: flex; gap: 16px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.topbar nav a { color: var(--text); font-size: 14px; }
.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }
.narrow { max-width: 440px; margin: 40px auto; }

/* components */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.tight { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-danger { color: var(--bad); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
form.inline { display: inline; }

label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.help { font-size: 12px; color: var(--muted); margin-top: 3px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 14px; margin-bottom: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 160px; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-bad { background: var(--bad-bg); color: var(--bad); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--info-bg); color: var(--info); }

.key { font-family: var(--mono); font-size: 15px; background: var(--surface-2); border: 1px dashed var(--border); padding: 8px 12px; border-radius: 8px; display: inline-block; user-select: all; word-break: break-all; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 8px; }
.bars .bar { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; }
.bars-labels { display: flex; gap: 6px; font-size: 11px; color: var(--muted); }
.bars-labels span { flex: 1; text-align: center; }
.product-card { display: flex; flex-direction: column; }
.product-card .kind { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.product-card .price { font-size: 20px; font-weight: 700; margin: 10px 0; }
.plan { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.plan.selected, .plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.plan .price { font-size: 22px; font-weight: 700; }
.plan ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.msg { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); margin-bottom: 10px; white-space: pre-wrap; }
.msg.staff { background: var(--accent-soft); }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.steps { counter-reset: s; padding: 0; list-style: none; }
.steps li { counter-increment: s; padding-left: 34px; position: relative; margin-bottom: 10px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
details summary { cursor: pointer; font-weight: 600; }
.pager { display: flex; gap: 8px; margin-top: 12px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; }
  .sidebar .section { display: none; }
  .brand { width: 100%; padding-bottom: 6px; }
  .main { padding: 18px 16px 40px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .topbar-in { flex-wrap: wrap; }
}


/* ═══════════════ Mafia theme ═══════════════ */
body { background:
  radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,255,255,.07), transparent 60%), #000; background-attachment: fixed; }
::selection { background: #fff; color: #000; }
a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }
a:hover { text-decoration-color: #fff; }
.nav a, .btn, .card[href], a.card, a.product-card, .brand, .badge { text-decoration: none !important; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
h3 { font-weight: 600; }
.muted { color: var(--muted); }

/* wordmark */
.brand { gap: 10px; align-items: baseline; padding: 6px 10px 22px; }
.brand-dot { display: none; }
.wordmark { font-weight: 700; font-size: 26px; letter-spacing: -.02em; color: #fff; line-height: 1; text-shadow: 0 0 24px rgba(255,255,255,.18); }
.wordmark-sub { font-size: 9.5px; letter-spacing: .38em; text-transform: uppercase; color: var(--muted); }

/* sidebar */
.sidebar { background: linear-gradient(180deg, #070707, #000); border-right: 1px solid #161616; }
.nav a { color: #bdbdbd; font-weight: 500; font-size: 13.5px; padding: 9px 12px; border-radius: 8px; transition: background .2s, color .2s; }
.nav a:hover { background: #111; color: #fff; }
.nav a.active { background: #fff; color: #000; font-weight: 600; box-shadow: 0 0 24px rgba(255,255,255,.12); }
.nav .section { color: #555; font-size: 10px; letter-spacing: .28em; padding: 20px 12px 8px; }

/* cards */
.card { background: linear-gradient(180deg, #0d0d0d, #080808); border: 1px solid var(--border); box-shadow: var(--shadow); position: relative; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 40%); }
a.card:hover, a.product-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
a.card, a.product-card { transition: border-color .25s, transform .25s; }
.stat .label { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.stat .value { font-size: 28px; letter-spacing: -.02em; }
.stat .value a { text-decoration: none; }

/* tables */
th { background: #0f0f0f; color: #777; font-size: 10.5px; letter-spacing: .14em; font-weight: 600; }
td, th { border-bottom-color: #1a1a1a; }
tr:hover td { background: rgba(255,255,255,.015); }

/* buttons */
.btn { background: transparent; border: 1px solid var(--border-strong); color: #eaeaea; border-radius: 8px; font-weight: 500; transition: all .2s; }
.btn:hover { background: #151515; border-color: #555; color: #fff; }
.btn-primary { background: #fff; border-color: #fff; color: #000; font-weight: 600; letter-spacing: .02em; }
.btn-primary:hover { background: #fff; color: #000; box-shadow: 0 0 28px rgba(255,255,255,.28); }
.btn-danger { color: var(--bad); border-color: rgba(255,107,107,.35); }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* forms */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], input[type=file], select, textarea {
  background: #050505; border-color: #262626; color: #fff; border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
input::placeholder, textarea::placeholder { color: #555; }
label { color: #bdbdbd; font-weight: 500; }
input[type=checkbox], input[type=radio] { accent-color: #fff; }
select option { background: #0a0a0a; }

/* badges & alerts */
.badge { border: 1px solid currentColor; background: transparent !important; font-weight: 600; font-size: 11px; letter-spacing: .03em; padding: 2px 9px; }
.badge-ok { color: var(--ok); } .badge-warn { color: var(--warn); } .badge-bad { color: var(--bad); }
.badge-info { color: #e5e5e5; } .badge-muted { color: #777; }
.alert { background: #0b0b0b; border: 1px solid #222; border-left: 3px solid #fff; color: #eee; border-radius: 8px; }
.alert-ok { border-left-color: var(--ok); } .alert-bad { border-left-color: var(--bad); }
.alert-warn { border-left-color: var(--warn); } .alert-info { border-left-color: #fff; }

/* misc */
.key { background: #050505; border: 1px dashed #333; color: #fff; }
.bars .bar { background: linear-gradient(180deg, #fff, rgba(255,255,255,.35)); opacity: 1; border-radius: 3px 3px 0 0; }
.plan { background: #070707; border-color: #222; transition: border-color .2s, box-shadow .2s; }
.plan:hover { border-color: #444; }
.plan.selected, .plan:has(input:checked) { border-color: #fff; box-shadow: 0 0 0 1px #fff, 0 0 30px rgba(255,255,255,.08); }
.msg { background: #101010; border: 1px solid #1c1c1c; }
.msg.staff { background: #fff; color: #000; }
.msg.staff .muted { color: #555; }
.steps li::before { background: #fff; color: #000; }
pre { background: #050505 !important; border: 1px solid #1c1c1c; }
.product-card .kind { color: #777; letter-spacing: .2em; font-size: 10.5px; }
.product-card .price { font-size: 24px; letter-spacing: -.02em; }
details summary { color: #ddd; }
.empty { color: #666; }

/* portal topbar */
.topbar { background: rgba(0,0,0,.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #141414; position: sticky; top: 0; z-index: 10; }
.topbar .brand { padding: 0; }
.topbar nav a { color: #bdbdbd; text-decoration: none; font-weight: 500; font-size: 13.5px; }
.topbar nav a:hover { color: #fff; }

/* hero with planet (portal) */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid #111; margin-bottom: 8px; }
.hero-scene { position: absolute; inset: 0; pointer-events: none; }
.hero-planet { position: absolute; left: 50%; top: 140px; width: 1500px; height: 1500px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.08), transparent 22%), radial-gradient(circle, #010101 0%, #030303 60%, #000 100%);
  box-shadow: inset 0 3px 2px -1px rgba(255,255,255,.9), inset 0 14px 22px -10px rgba(255,255,255,.4), 0 -1px 10px rgba(255,255,255,.5), 0 -18px 80px rgba(255,255,255,.1); }
.hero-ring { position: absolute; left: 50%; top: 300px; width: 2000px; height: 380px; transform: translate(-50%, -50%) rotate(-8deg); border-radius: 50%;
  border: 1px solid transparent; border-top-color: rgba(255,255,255,.35); border-left-color: rgba(255,255,255,.15); filter: drop-shadow(0 0 5px rgba(255,255,255,.4)); }
.hero-flare { position: absolute; left: calc(50% - 470px); top: 205px; width: 220px; height: 220px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,.9) 0%, rgba(255,255,255,.3) 6%, rgba(255,255,255,.06) 24%, transparent 55%); }
.hero-in { position: relative; max-width: 1080px; margin: 0 auto; padding: 72px 20px 150px; text-align: center; }
.hero h1 { font-size: clamp(56px, 10vw, 112px); font-weight: 700; letter-spacing: -.03em; line-height: 1; margin: 0; text-shadow: 0 0 40px rgba(255,255,255,.18); }
.hero .rule { display: inline-flex; align-items: center; gap: 16px; margin-top: 20px; font-size: 12px; letter-spacing: .34em; text-transform: uppercase; color: #ddd; }
.hero .rule::before, .hero .rule::after { content: ""; width: 44px; height: 1px; background: rgba(255,255,255,.5); }
.hero p { color: #9a9a9a; max-width: 560px; margin: 22px auto 0; font-size: 15px; }
.hero .cta { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .cta .btn { padding: 12px 22px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.fade-up { animation: fadeUp .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
footer.container { border-top: 1px solid #111; padding-top: 22px !important; margin-top: 30px; }
@media (max-width: 900px) {
  .hero-in { padding: 54px 16px 110px; }
  .hero-planet { width: 1100px; height: 1100px; top: 150px; }
  .hero-flare { left: calc(50% - 300px); }
}
@media (prefers-reduced-motion: reduce) { .fade-up { animation: none; } }
.topbar nav a.btn-primary, .topbar nav a.btn-primary:hover { color: #000; }
td a, .kv a, .spread a { text-decoration: none; }
td a:hover, .kv a:hover, .spread a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .hero-planet { top: 290px; }
  .hero-ring { top: 420px; }
  .hero-flare { top: 355px; left: calc(50% - 260px); }
}

/* ═══════════════ Motion & smoothness ═══════════════ */
:root { --ease: cubic-bezier(.2,.8,.2,1); --ease-out: cubic-bezier(.16,1,.3,1); }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }

/* cross-page transitions (Chrome/Edge): no white flash, content glides */
@view-transition { navigation: auto; }
.sidebar { view-transition-name: sidebar; }
.topbar { view-transition-name: topbar; }
main.main, div.container { view-transition-name: page; }
::view-transition-old(page) { animation: vtOut .18s var(--ease) both; }
::view-transition-new(page) { animation: vtIn .38s var(--ease-out) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-6px); filter: blur(2px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } }

/* first paint fade for browsers without view transitions */
main.main, div.container { animation: pageIn .45s var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }

/* scroll reveal (enabled by JS) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* top progress bar */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 1000; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.2), #fff); box-shadow: 0 0 12px rgba(255,255,255,.7); opacity: 0;
  transition: width .4s var(--ease), opacity .3s; }
.progress.run { opacity: 1; width: 70%; transition: width 8s cubic-bezier(.1,.6,.1,1), opacity .2s; }
.progress.done { opacity: 0; width: 100%; transition: width .2s, opacity .4s .15s; }

/* toasts */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 900; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 16px; border-radius: 12px;
  background: rgba(16,16,16,.88); border: 1px solid #2a2a2a; color: #f2f2f2; font-size: 14px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9);
  animation: toastIn .5s var(--ease-out) both; }
.toast.out { animation: toastOut .35s var(--ease) both; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; flex: none; }
.toast-ok .toast-dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.toast-bad .toast-dot { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.toast-warn .toast-dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.toast-x { margin-left: auto; background: none; border: 0; color: #777; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.toast-x:hover { color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }
.shake { animation: shake .45s var(--ease) both; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* buttons: press feedback + loading spinner */
.btn { transition: background .2s, border-color .2s, color .2s, box-shadow .25s, transform .12s; }
.btn:active { transform: scale(.97); }
.btn.loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; border: 2px solid currentColor; border-color: #888 #888 transparent transparent; animation: spin .7s linear infinite; }
.btn-primary.loading::after { border-color: #000 #000 transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* spotlight that follows the cursor on cards */
.card { --mx: 50%; --my: 0%; transition: border-color .3s, transform .3s var(--ease-out), box-shadow .3s; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255,255,255,.06), transparent 45%); }
.card:hover::after { opacity: 1; }
.card:hover { border-color: #2e2e2e; }

/* nav & links */
.nav a { position: relative; }
.nav a:not(.active)::before { content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 0; background: #fff; transform: translateY(-50%);
  transition: height .25s var(--ease); border-radius: 2px; }
.nav a:not(.active):hover::before { height: 16px; }
a { transition: color .2s, text-decoration-color .2s; }
tr td { transition: background .2s; }

/* chart & numbers */
.bars .bar { transform-origin: bottom; animation: grow .9s var(--ease-out) both; }
.bars .bar:nth-child(n) { animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes grow { from { transform: scaleY(0); } }
.bars .bar:hover { filter: brightness(1.3); box-shadow: 0 0 18px rgba(255,255,255,.35); }

/* inputs */
input, select, textarea { transition: border-color .2s, box-shadow .25s, background .2s; }
:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; border: 3px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* hero planet gentle motion */
.hero-planet { animation: heroPlanet 1.6s var(--ease-out) both; }
.hero-ring { animation: heroRing 2.2s .2s var(--ease-out) both; }
.hero-flare { animation: heroFlare 6s ease-in-out infinite; }
@keyframes heroPlanet { from { opacity: 0; transform: translateX(-50%) translateY(60px); } }
@keyframes heroRing { from { opacity: 0; } }
@keyframes heroFlare { 50% { opacity: .7; transform: translate(-50%, -50%) scale(1.12); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.qr svg { width: 100%; height: auto; display: block; }

/* ── reviews ─────────────────────────────────────────────── */
.stars{--r:5;display:inline-block;font-size:15px;line-height:1;letter-spacing:2px;
  background:linear-gradient(90deg,#f5c451 calc(var(--r)/5*100%),rgba(255,255,255,.18) 0);
  -webkit-background-clip:text;background-clip:text;color:transparent}
.stars::before{content:"★★★★★"}
.rating-line{display:inline-flex;gap:6px;align-items:center;margin:-4px 0 14px;text-decoration:none;color:inherit}
.review{padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius);background:rgba(255,255,255,.02)}
.review p{margin:8px 0;white-space:pre-wrap}
.review-reply{margin:8px 0;padding:10px 12px;border-left:2px solid var(--border);color:var(--muted);font-size:14px}
.review-form{display:grid;gap:10px;margin-top:12px}
.star-input{display:inline-flex;flex-direction:row-reverse;justify-content:flex-end;gap:4px}
.star-input input{position:absolute;opacity:0;pointer-events:none}
.star-input label{font-size:28px;cursor:pointer;color:rgba(255,255,255,.2);transition:color .15s,transform .15s}
.star-input label:hover,.star-input label:hover~label,.star-input input:checked~label{color:#f5c451}
.star-input label:hover{transform:scale(1.12)}
.star-input input:focus-visible+label{outline:1px solid var(--muted);border-radius:4px}
.tabs{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:14px;border-bottom:1px solid var(--border)}
.tabs a{padding:8px 14px;color:var(--muted);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color .15s,border-color .15s}
.tabs a:hover{color:var(--text)}
.tabs a.active{color:var(--text);border-bottom-color:var(--text)}

/* ═══════════════ Landing (public site) ═══════════════ */
.l-hero .hero-in { padding-bottom: 130px; }
.l-wordmark { font-size: clamp(60px, 11vw, 124px); font-weight: 700; letter-spacing: -.035em; line-height: .95; text-shadow: 0 0 40px rgba(255,255,255,.18); }
.hero h1.l-h1 { font-size: clamp(22px, 3.2vw, 34px); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin: 26px auto 0; max-width: 760px; text-shadow: none; }
.l-hero p { font-size: 15.5px; max-width: 620px; }
.l-trust { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 10px 22px; justify-content: center; flex-wrap: wrap; color: #9a9a9a; font-size: 13px; }
.l-trust li { display: inline-flex; align-items: center; gap: 6px; }
.l-trust li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #444; margin-right: 16px; }
.l-trust b { color: #fff; }

.l-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin: 6px 0 10px;
  background: linear-gradient(180deg, #0b0b0b, #060606); }
.l-stats > div { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 4px; }
.l-stats > div + div { border-left: 1px solid var(--border); }
.l-stats b { font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.l-stats span { color: var(--muted); font-size: 13px; }

.l-section { padding: 64px 0 8px; scroll-margin-top: 70px; }
.l-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.l-head h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin: 0; max-width: 640px; }
.l-eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { font: inherit; font-size: 13px; color: #bbb; background: transparent; border: 1px solid #2a2a2a; border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: all .2s; }
.chips button:hover { color: #fff; border-color: #555; }
.chips button[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }

.l-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.l-product { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0; transition: border-color .25s, transform .3s var(--ease-out); }
.l-product:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.l-product[hidden] { display: none; }
.l-product-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.l-product-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.l-product-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-bottom: 1px solid var(--border); background: #070707; height: auto; }
.l-product-ph { display: grid; place-items: center; background: radial-gradient(circle at 50% 120%, #1c1c1c, #050505 60%); }
.l-product-ph span { font-size: 64px; font-weight: 700; color: #1d1d1d; text-shadow: 0 0 1px #444; }
.l-product-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.l-product .kind { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #777; }
.l-product h3 { font-size: 19px; letter-spacing: -.01em; margin: 2px 0 0; }
.l-product p { margin: 0; font-size: 13.5px; }
.l-ticks { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; color: #cfcfcf; display: grid; gap: 4px; }
.l-ticks li { padding-left: 18px; position: relative; }
.l-ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg); }
.l-product-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.l-product .price { font-size: 20px; font-weight: 700; letter-spacing: -.02em; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.l-product:hover .btn { background: #fff; color: #000; border-color: #fff; }

.l-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: none; }
.l-steps li { border-top: 1px solid #2a2a2a; padding-top: 18px; }
.l-num { font-size: 13px; letter-spacing: .2em; color: #666; font-variant-numeric: tabular-nums; }
.l-steps h3 { font-size: 18px; margin: 10px 0 6px; }
.l-steps p { color: #9a9a9a; font-size: 14px; }

.l-features { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.l-feature { padding: 26px 24px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #050505; transition: background .3s; }
.l-feature:nth-child(3n) { border-right: 0; }
.l-feature:nth-last-child(-n+3) { border-bottom: 0; }
.l-feature:hover { background: #0b0b0b; }
.l-icon { width: 26px; height: 26px; color: #fff; margin-bottom: 14px; filter: drop-shadow(0 0 8px rgba(255,255,255,.25)); }
.l-feature h3 { font-size: 16px; margin: 0 0 6px; }
.l-feature p { color: #9a9a9a; font-size: 13.5px; margin: 0; }

.l-rating { display: flex; align-items: center; gap: 12px; }
.l-rating > b { font-size: 40px; letter-spacing: -.03em; line-height: 1; }
.l-reviews { columns: 3 280px; column-gap: 18px; }
.l-review { break-inside: avoid; margin: 0 0 18px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(180deg, #0c0c0c, #070707); }
.l-review blockquote { margin: 12px 0; font-size: 14.5px; line-height: 1.6; color: #e8e8e8; }
.l-review figcaption { font-size: 13px; color: var(--muted); }
.l-review figcaption a { color: var(--muted); }

.l-articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.l-article { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.l-article img { width: calc(100% + 36px); margin: -18px -18px 10px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.l-article h3 { font-size: 17px; margin: 0; }

.l-faq { max-width: 820px; }
.l-faq details { border-bottom: 1px solid var(--border); }
.l-faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; }
.l-faq summary::-webkit-details-marker { display: none; }
.l-faq summary h3 { display: inline; font-size: 16.5px; font-weight: 600; margin: 0; }
.l-faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 1.5px solid #888; border-bottom: 1.5px solid #888;
  transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease-out); }
.l-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.l-faq details p { color: #a8a8a8; margin: 0 0 20px; max-width: 720px; animation: fadeUp .4s var(--ease-out) both; }

.l-cta { margin: 72px 0 10px; padding: 56px 28px; text-align: center; border: 1px solid #222; border-radius: 22px; position: relative; overflow: hidden;
  background: radial-gradient(ellipse 60% 120% at 50% 130%, rgba(255,255,255,.13), transparent 60%), #050505; }
.l-cta::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 60%; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, #fff, transparent); }
.l-cta h2 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -.03em; margin: 0 0 10px; }
.l-cta p { color: #9a9a9a; max-width: 560px; margin: 0 auto; }
.l-cta .cta { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* footer */
.site-footer { border-top: 1px solid #141414; margin-top: 60px; background: #030303; }
.site-footer-in { max-width: 1080px; margin: 0 auto; padding: 44px 20px 26px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.site-footer .brand { padding: 0; }
.f-brand p { color: #777; font-size: 13px; margin-top: 14px; max-width: 300px; }
.f-col { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.f-col a { color: #a5a5a5; text-decoration: none; }
.f-col a:hover { color: #fff; }
.f-title { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: #555; margin-bottom: 4px; }
.site-footer-bottom { max-width: 1080px; margin: 0 auto; padding: 18px 20px 30px; border-top: 1px solid #111; color: #555; font-size: 12.5px; }

/* breadcrumbs */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); list-style: none; padding: 0; margin: 0 0 14px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #333; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }

@media (max-width: 900px) {
  .l-products, .l-articles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-stats { grid-template-columns: repeat(2, 1fr); }
  .l-stats > div:nth-child(3) { border-left: 0; }
  .l-stats > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .l-features { grid-template-columns: repeat(2, 1fr); }
  .l-feature:nth-child(3n) { border-right: 1px solid var(--border); }
  .l-feature:nth-child(2n) { border-right: 0; }
  .l-feature:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .l-feature:nth-last-child(-n+2) { border-bottom: 0; }
  .site-footer-in { grid-template-columns: 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .l-products, .l-articles, .l-steps, .l-features { grid-template-columns: 1fr; }
  .l-feature { border-right: 0 !important; border-bottom: 1px solid var(--border) !important; }
  .l-feature:last-child { border-bottom: 0 !important; }
  .l-section { padding-top: 48px; }
  .l-trust li + li::before { display: none; }
  .l-stats b { font-size: 24px; }
  .l-stats > div { padding: 16px; }
  .topbar nav { gap: 12px; }
  .site-footer-in { grid-template-columns: 1fr; }
}
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 14px; }
.product-ticks { margin: 0 0 16px; font-size: 14px; gap: 6px; }
.l-page-h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.03em; line-height: 1.12; margin: 0; }
.l-article-title { font-size: 18px; margin: 0; letter-spacing: -.01em; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; }
.article { max-width: 720px; }
.article-meta { margin-top: 12px; }
.article-lead { font-size: 18px; color: #c9c9c9; line-height: 1.6; margin: 18px 0 0; }
.article-cover { width: 100%; border-radius: 14px; border: 1px solid var(--border); margin-top: 22px; }
.prose { font-size: 16.5px; line-height: 1.75; color: #dedede; margin-top: 26px; }
.prose h2 { font-size: 25px; letter-spacing: -.02em; margin: 40px 0 12px; scroll-margin-top: 80px; color: #fff; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; color: #fff; }
.prose h4 { font-size: 16px; margin: 22px 0 6px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin: 6px 0; }
.prose img { max-width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.prose blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 2px solid #fff; color: #bdbdbd; }
.prose code { background: #111; border: 1px solid #222; border-radius: 6px; padding: 1px 6px; font-size: 14px; }
.prose pre { padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose a { text-decoration-color: rgba(255,255,255,.45); }
.article-side { position: sticky; top: 80px; }
.toc { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.toc a { color: #a5a5a5; text-decoration: none; }
.toc a:hover { color: #fff; }
.article-product { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } .article-side { position: static; } }
.article-edit { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1000px) { .article-edit { grid-template-columns: 1fr; } }
.l-product .kind .trial { color: var(--warn); }
.l-product-ph span { color: #262626; text-shadow: 0 0 1px #666, 0 0 30px rgba(255,255,255,.08); }
.l-cta + * , .container:has(.l-cta) + .site-footer { margin-top: 0; }
@media (max-width: 600px) {
  .l-hero .hero-in { padding-bottom: 120px; }
  .l-hero .hero-planet { top: auto; bottom: -1010px; }
  .l-hero .hero-ring { display: none; }
  .l-hero .hero-flare { top: auto; bottom: 30px; left: calc(50% - 210px); }
}
pre.goods { max-height: 360px; overflow: auto; padding: 14px 16px; border-radius: 10px; font-size: 13px; line-height: 1.6; margin: 10px 0 12px; white-space: pre; user-select: all; }

/* ═══════════════ Shop ═══════════════ */
.shop-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.shop-cat { margin: 0; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.shop-cat img { width: calc(100% + 36px); margin: -18px -18px 8px; aspect-ratio: 16/8; object-fit: cover; border-bottom: 1px solid var(--border); }
.shop-cat h2 { font-size: 18px; margin: 4px 0 0; }
.shop-cat p { margin: 0; }
.shop-cat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; font-weight: 700;
  background: radial-gradient(circle at 30% 20%, #262626, #0a0a0a); border: 1px solid #2a2a2a; }
.shop-cat-icon.big { width: 64px; height: 64px; font-size: 32px; border-radius: 16px; flex: none; }
.shop-cat-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.shop-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.shop-desc { margin: 10px 0 0; max-width: 720px; white-space: pre-wrap; }
.shop-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.shop-badges span { font-size: 12.5px; color: #cfcfcf; border: 1px solid #262626; border-radius: 999px; padding: 4px 11px; background: #0a0a0a; }
.shop-sub { margin: 0 0 18px; }
a.chip { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: #ddd; border: 1px solid #2a2a2a; border-radius: 999px; padding: 7px 14px; text-decoration: none; transition: all .2s; }
a.chip:hover { border-color: #fff; color: #fff; }
.shop-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #050505; }
.shop-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 130px 110px; gap: 16px; align-items: center; padding: 16px 18px; transition: background .2s; }
.shop-row + .shop-row { border-top: 1px solid var(--border); }
.shop-row:hover { background: #0b0b0b; }
.shop-row.out { opacity: .55; }
.shop-row h2 { font-size: 15.5px; margin: 0 0 2px; font-weight: 600; letter-spacing: 0; }
.shop-row h2 a { text-decoration: none; }
.shop-row p { margin: 4px 0 0; }
.shop-row-price { font-size: 18px; font-weight: 700; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.shop-row-stock { text-align: center; }
.shop-row .btn { justify-self: end; }
.shop-tiers { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.shop-tiers span { font-size: 11.5px; color: var(--ok); border: 1px solid rgba(91,210,140,.35); border-radius: 999px; padding: 2px 9px; }
.shop-rules { margin-top: 18px; }
.qty { display: flex; align-items: stretch; border: 1px solid #262626; border-radius: 8px; overflow: hidden; width: fit-content; }
.qty input { width: 90px; text-align: center; border: 0 !important; border-radius: 0; box-shadow: none !important; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty button { width: 40px; background: #0d0d0d; color: #fff; border: 0; font-size: 18px; cursor: pointer; transition: background .2s; }
.qty button:hover { background: #1a1a1a; }
.buy-total { margin: 4px 0 14px; font-size: 15px; }
.buy-total b { font-size: 24px; letter-spacing: -.02em; }
@media (max-width: 700px) {
  .shop-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .shop-row-main { grid-column: 1 / -1; }
  .shop-row-stock { text-align: left; }
  .shop-row-price { align-items: flex-start; }
  .shop-row .btn { grid-column: 1 / -1; justify-self: stretch; }
  .shop-head { flex-direction: column; }
}
.shop-cat { position: relative; transition: border-color .25s, transform .3s var(--ease-out); }
.shop-cat:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.shop-cat-subs { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.shop-cat-subs a { font-size: 12px; color: #bbb; border: 1px solid #262626; border-radius: 999px; padding: 3px 10px; text-decoration: none; background: #080808; }
.shop-cat-subs a:hover { color: #fff; border-color: #fff; }
.shop-row .btn, .btn-block { justify-content: center; text-align: center; }
.product-grid h1 { line-height: 1.2; }
@media (max-width: 600px) {
  .topbar-in { flex-wrap: wrap; row-gap: 8px; }
  .topbar nav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav .btn { flex: none; }
}

/* ═══════════════ Catalog structure ═══════════════ */
.cat-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 26px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: #050505; width: fit-content; max-width: 100%; overflow-x: auto; }
.cat-tabs a { padding: 8px 16px; border-radius: 9px; color: #a5a5a5; text-decoration: none; font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s; }
.cat-tabs a:hover { color: #fff; background: #111; }
.cat-tabs a.active { background: #fff; color: #000; }
.cat-section { margin-bottom: 40px; }
.cat-section-head { margin-bottom: 14px; }
.cat-custom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; text-decoration: none; color: inherit; padding: 26px 28px;
  background: radial-gradient(ellipse 50% 140% at 100% 50%, rgba(255,255,255,.08), transparent 60%), linear-gradient(180deg, #0d0d0d, #080808); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cab-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: -6px 0 24px; overflow-x: auto; scrollbar-width: none; }
.cab-tabs::-webkit-scrollbar { display: none; }
.cab-tabs a, .cab-tabs button { padding: 10px 14px; color: #a5a5a5; text-decoration: none; font: inherit; font-size: 13.5px; border: 0; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.cab-tabs a:hover, .cab-tabs button:hover { color: #fff; }
.cab-tabs a.active { color: #fff; border-bottom-color: #fff; }
.cab-tabs form { margin-left: auto; }
.mainnav a.active:not(.btn) { color: #fff; }
.topbar nav.mainnav { gap: 20px; }

/* ═══════════════ Portfolio ═══════════════ */
.pf-hero { max-width: 780px; margin-bottom: 30px; }
.pf-hero p { margin-top: 14px; font-size: 15.5px; }
.pf-hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pf-card { padding: 0; margin: 0; overflow: hidden; display: flex; flex-direction: column; transition: border-color .25s, transform .3s var(--ease-out); }
.pf-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.pf-card[hidden] { display: none; }
.pf-featured { grid-column: span 2; }
.pf-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-bottom: 1px solid var(--border); }
.pf-featured .pf-cover { aspect-ratio: 21 / 9; }
.pf-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.pf-body .kind { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #777; }
.pf-body h2 { font-size: 18px; margin: 2px 0 0; letter-spacing: -.01em; }
.pf-body p { margin: 0; }
.pf-results { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pf-results span { font-size: 12px; color: var(--ok); border: 1px solid rgba(91,210,140,.35); border-radius: 999px; padding: 2px 10px; }
.pf-stack { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.pf-stack span { font-size: 11.5px; color: #aaa; background: #111; border: 1px solid #222; border-radius: 6px; padding: 2px 8px; font-family: var(--mono); }
.pf-case { max-width: 900px; }
.pf-case-head .article-lead { max-width: 760px; }
.pf-meta { display: flex; gap: 14px 34px; flex-wrap: wrap; margin: 22px 0 0; }
.pf-meta div { min-width: 120px; }
.pf-meta dt { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #666; margin-bottom: 4px; }
.pf-meta dd { margin: 0; font-size: 14.5px; }
.pf-case-cover { width: 100%; border-radius: 16px; border: 1px solid var(--border); margin: 26px 0 0; }
.pf-result-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; margin: 26px 0 0; }
.pf-result-row div { background: #070707; padding: 20px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.pf-case-body { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 34px; }
.pf-case-body h2 { font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: #777; margin: 0 0 10px; }
.pf-case-body .prose { margin: 0; font-size: 15.5px; }
.pf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 30px; }
.pf-gallery img { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; transition: transform .3s var(--ease-out); }
.pf-gallery a:hover img { transform: scale(1.015); }
.pf-quote { margin: 34px 0 10px; padding: 26px 28px; border-left: 2px solid #fff; background: #070707; border-radius: 0 14px 14px 0; }
.pf-quote blockquote { margin: 0; font-size: 18px; line-height: 1.6; }
.pf-quote figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
.pf-steps li { border-top-color: #2a2a2a; }
.lead-form { max-width: 820px; margin: 0; }
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-grid { align-items: start; gap: 40px; }
@media (max-width: 900px) {
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-case-body { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-featured { grid-column: auto; }
}
.admin-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.admin-gallery label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.admin-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.nav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: #000; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center; margin-left: 8px; }
.nav a.active .nav-count { background: #000; color: #fff; }
.pf-h { font-size: 13px !important; letter-spacing: .24em; text-transform: uppercase; color: #777 !important; margin: 0 0 12px !important; font-weight: 600; }
.pf-gallery-wrap { margin-top: 40px; }
.pf-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 14px !important; margin-top: 0 !important; }
.pf-gallery a:first-child { grid-column: 1 / -1; }
.pf-gallery img { cursor: zoom-in; box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); }
.pf-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 0; }
.pf-links .btn { display: inline-flex; align-items: center; gap: 8px; }
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 40px 60px;
  animation: fadeUp .25s var(--ease-out) both; backdrop-filter: blur(6px); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); border-radius: 12px; border: 1px solid #333; box-shadow: 0 40px 100px rgba(0,0,0,.8); }
.lightbox button { position: absolute; background: rgba(20,20,20,.8); color: #fff; border: 1px solid #333; border-radius: 999px; width: 44px; height: 44px;
  font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: #fff; color: #000; }
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #aaa; font-size: 13px; }
@media (max-width: 600px) { .pf-gallery { grid-template-columns: 1fr !important; } .lightbox { padding: 60px 8px; } }
.pf-gallery a:last-child:nth-child(even) { grid-column: 1 / -1; }
.pf-concept { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(240,184,90,.5); color: var(--warn);
  font-size: 10px; letter-spacing: .14em; vertical-align: 1px; }
.pf-concept-note { margin: 26px 0 0; }
.pf-result-row + .pf-case-body, .pf-concept-note + .pf-result-row { margin-top: 14px; }
.pf-result-row { display: flex !important; flex-wrap: wrap; }
.pf-result-row div { flex: 1 1 200px; }
.pf-result-row + .pf-case-body { margin-top: 34px; }
.site-footer-in { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .site-footer-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .site-footer-in { grid-template-columns: 1fr; } }
.cat-tabs a.extra { margin-left: 10px; position: relative; color: #8b8b8b; }
.cat-tabs a.extra::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 1px; background: #262626; }
.cat-tabs a.extra.active { color: #000; }
.l-extra .shop-cat { padding: 14px 16px; }
.langs { display: inline-flex; border: 1px solid #262626; border-radius: 8px; overflow: hidden; }
.langs a { padding: 4px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: #8b8b8b !important; text-decoration: none; }
.langs a + a { border-left: 1px solid #262626; }
.langs a:hover { color: #fff !important; }
.langs a.on { background: #fff; color: #000 !important; }
.i18n-tabs { display: inline-flex; border: 1px solid #262626; border-radius: 8px; overflow: hidden; }
.i18n-tabs button { background: none; border: 0; color: #9a9a9a; padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.i18n-tabs button.on { background: #fff; color: #000; font-weight: 600; }
.i18n-pane[hidden] { display: none; }

/* ═══════════════ Polish (public site) ═══════════════ */
body.pub { font-size: 15.5px; line-height: 1.6; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: #fff; color: #000 !important; padding: 8px 12px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 10px; }
body.pub :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
body.pub ::selection { background: #fff; color: #000; }

/* readable small text */
body.pub .l-eyebrow { font-size: 12px; letter-spacing: .22em; color: #9a9a9a; }
body.pub .l-product .kind { font-size: 12px; letter-spacing: .14em; color: #8f8f8f; }
body.pub .wordmark-sub { font-size: 11px; letter-spacing: .32em; }
body.pub .f-title { font-size: 12px; letter-spacing: .2em; color: #8f8f8f; }
body.pub .l-num { font-size: 14px; color: #8f8f8f; }
body.pub .l-stats span, body.pub .l-trust, body.pub .crumbs { font-size: 14px; }
body.pub .l-product p, body.pub .l-feature p, body.pub .l-steps p, body.pub .l-article p, body.pub .l-review blockquote { font-size: 15px; }
body.pub .l-ticks { font-size: 14px; }
body.pub .help, body.pub .small { font-size: 13.5px; }

/* rhythm: more air between sections, comfortable line length */
body.pub .container { max-width: 1160px; padding-left: 24px; padding-right: 24px; }
body.pub .topbar-in { max-width: 1160px; padding-left: 24px; padding-right: 24px; }
body.pub .l-section { padding-top: 88px; }
body.pub .l-head { margin-bottom: 30px; }
body.pub .l-head p, body.pub .l-cta p, body.pub .pf-hero p, body.pub .article-lead { max-width: 62ch; }
body.pub .hero p { font-size: 16px; line-height: 1.6; color: #a8a8a8; }
body.pub .l-products, body.pub .l-articles { gap: 20px; }

/* product placeholder: the name over the planet arc instead of one grey letter */
body.pub .l-product-ph { position: relative; overflow: hidden; background: #050505; display: grid; place-items: center; }
body.pub .l-product-ph .ph-arc { position: absolute; left: 50%; top: 58%; width: 170%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: #020202; box-shadow: inset 0 2px 1px -1px rgba(255,255,255,.85), inset 0 10px 18px -10px rgba(255,255,255,.35), 0 -10px 40px rgba(255,255,255,.07);
  transition: transform .6s var(--ease-out); }
body.pub .l-product-ph .ph-name { position: relative; font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.03em; color: #f2f2f2;
  text-shadow: 0 0 24px rgba(255,255,255,.18); margin-top: -12%; padding: 0 16px; text-align: center; line-height: 1.1; }
body.pub .l-product:hover .ph-arc { transform: translateX(-50%) translateY(-6px); }

/* mobile header: logo, language, sign-up and a menu instead of a scrolling row */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; place-content: center; gap: 6px; border: 1px solid #262626; border-radius: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 18px; height: 1.5px; background: #fff; transition: transform .25s var(--ease-out); }
.menu[open] summary span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu[open] summary span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; display: flex; flex-direction: column; padding: 6px;
  background: #0b0b0b; border: 1px solid #222; border-radius: 12px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.9); animation: toastIn .3s var(--ease-out) both; }
.topbar .menu-panel a { padding: 11px 14px; border-radius: 8px; color: #e8e8e8; font-size: 15px; }
.topbar .menu-panel a:hover { background: #151515; color: #fff; }
@media (max-width: 760px) {
  body.pub .topbar-in { flex-wrap: nowrap; padding-left: 16px; padding-right: 16px; }
  body.pub .topbar nav.mainnav { width: auto; margin-left: auto; overflow: visible; gap: 10px; }
  body.pub .topbar nav [data-nl] { display: none; }
  .menu { display: block; }
  body.pub .container { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 420px) {
  body.pub .topbar nav .btn-primary { display: none; }
  body.pub .hero h1.l-h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .menu-panel { animation: none; } }

/* ═══════════════ Admin on phones: sticky top bar + drop-down menu ═══════════════ */
.side-menu { display: block; }
.side-top { display: block; }
.menu-toggle, .sidebar .menu-btn, .menu-scrim { display: none; }
.shell > .main { min-width: 0; }
.shell { grid-template-columns: 232px minmax(0, 1fr); }
@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 60; height: auto; overflow: visible; display: block; padding: 0; padding-top: env(safe-area-inset-top);
             border-right: 0; border-bottom: 1px solid #161616; background: rgba(0,0,0,.82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
  .sidebar .side-top { display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 6px 0 16px; }
  .sidebar .brand { width: auto; padding: 0; }
  .sidebar .wordmark { font-size: 22px; }
  .sidebar .menu-btn { display: grid; place-content: center; gap: 5px; width: 48px; height: 48px; border-radius: 10px; cursor: pointer; margin: 0; -webkit-tap-highlight-color: transparent; }
  .sidebar .menu-btn:active { background: #111; }
  .sidebar .menu-btn span { display: block; width: 20px; height: 1.5px; background: #fff; transition: transform .3s var(--ease-out), opacity .2s; }
  .menu-toggle:checked ~ .side-top .menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .menu-toggle:checked ~ .side-top .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-toggle:checked ~ .side-top .menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .sidebar .side-menu { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100dvh - 58px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain;
             background: #050505; border-bottom: 1px solid #1c1c1c; padding: 4px 10px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 30px 60px -30px #000;
             opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none;
             transition: opacity .25s var(--ease), transform .3s var(--ease-out), visibility 0s linear .3s; }
  .menu-toggle:checked ~ .side-menu { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .sidebar .section { display: block; padding: 16px 12px 6px; }
  .sidebar .nav a { font-size: 15.5px; padding: 0 14px; min-height: 48px; align-items: center; }
  .menu-scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
  .shell:has(.menu-toggle:checked) .menu-scrim { opacity: 1; pointer-events: auto; }
  body:has(.menu-toggle:checked) { overflow: hidden; }

  .main { padding: 18px 16px calc(48px + env(safe-area-inset-bottom)); }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  .page-head h1 { font-size: 23px; }
  .page-head > div:last-child:not(:first-child) { display: flex; flex-wrap: wrap; gap: 8px; }
  .card { padding: 16px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters input, .filters select { min-width: 0; width: 100%; }
  .filters input[type=text], .filters input[type=search], .filters input[name=q] { grid-column: 1 / -1; }
  .filters .btn { justify-content: center; }
  .stat .value { font-size: 22px; }
  .kv { gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .admin-gallery { grid-template-columns: repeat(2, 1fr); }
  .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.g4 > .card { margin-bottom: 0; }
  .bars { gap: 2px; }
  .bars-labels { gap: 2px; }
  .bars-labels span { min-width: 0; overflow: visible; white-space: nowrap; font-size: 10px; }
  .bars-labels:has(span:nth-child(15)) span:not(:nth-child(4n+1)) { visibility: hidden; }
  .bars-labels:not(:has(span:nth-child(15))) span:nth-child(even) { visibility: hidden; }
  .pager { flex-wrap: wrap; }

  /* tables: stacked cards when they are simple lists, horizontal scroll otherwise (JS decides) */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap.stack thead, .table-wrap.stack tr.head-row { display: none; }
  .table-wrap.stack table, .table-wrap.stack tbody, .table-wrap.stack tr, .table-wrap.stack td { display: block; width: 100%; }
  .table-wrap.stack tr.note-row td { display: block; text-align: center; }
  .table-wrap.stack tr { border-bottom: 1px solid var(--border); padding: 10px 14px; }
  .table-wrap.stack tr:last-child { border-bottom: 0; }
  .table-wrap.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .table-wrap.stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; text-align: left; flex: none; max-width: 45%; }
  .table-wrap.stack td.lead { display: block; text-align: left; font-weight: 600; padding-top: 2px; }
  .table-wrap.stack td.lead::before { content: none; }
  .table-wrap.stack td:empty { display: none; }
  .table-wrap.stack td.num { text-align: right; }
  .card.tight .table-wrap.stack tr { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 420px) {
  .filters { grid-template-columns: 1fr; }
}

/* ═══════════════ Touch comfort everywhere (site, portal, admin) ═══════════════ */
@media (max-width: 760px) {
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=tel],
  input[type=datetime-local], input[type=date], select, textarea { font-size: 16px; min-height: 46px; }
  textarea { min-height: 110px; }
  .btn { min-height: 44px; justify-content: center; }
  .btn-sm { min-height: 38px; }
  .check { min-height: 40px; }
  .check input { width: 20px; height: 20px; flex: none; }
  .check:has(> a) { display: block; position: relative; padding: 9px 0 0 30px; line-height: 1.55; }
  .check:has(> a) input { position: absolute; left: 0; top: 10px; margin: 0; }
  form .btn-primary:only-child, .narrow form .btn-primary, .narrow .btn-block { width: 100%; }
  .site-footer a { display: inline-block; padding: 6px 0; }
  .toasts { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: none; }
  .narrow { margin: 20px auto; }
}
