/* ==========================================================================
   Solitary Web Solutions — base stylesheet (shared by every template)
   Layout and components only. Colours, fonts and personality live in
   /themes/<name>/theme.css through the CSS variables below.
   ========================================================================== */

:root {
  --bg: #ffffff;           --bg-alt: #f6f8fb;      --surface: #ffffff;   --surface-2: #f1f5f9;
  --border: #e2e8f0;       --text: #334155;        --muted: #64748b;     --heading: #0f172a;
  --accent: #2454ff;       --accent-2: #ff8a3d;    --accent-text: #ffffff; --accent-soft: rgba(36, 84, 255, .1);
  --success: #16a34a;      --warning: #d97706;     --danger: #dc2626;
  --radius: 14px;          --radius-sm: 8px;       --radius-pill: 6px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);     --shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-body);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1200px;     --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .92em; }
::selection { background: var(--accent); color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Layout ---------- */
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 820px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-sm { padding: 48px 0; }
.section-alt { background: var(--bg-alt); }
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.sidebar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.split > *, .product-hero > *, .sidebar-layout > *, .grid > * { min-width: 0; }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 2rem; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: var(--radius-pill);
  font: 600 .95rem/1 var(--font-body); border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--accent-text); box-shadow: 0 8px 22px var(--accent-soft); }
.btn-primary:hover { box-shadow: 0 12px 28px var(--accent-soft); }
.btn-outline { border-color: var(--border); color: var(--heading); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { color: var(--heading); background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.link-arrow .icon { width: 16px; height: 16px; transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg, var(--bg)); border-bottom: 1px solid var(--header-border, var(--border)); backdrop-filter: saturate(160%) blur(12px); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand small { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 1px; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 14px; border-radius: var(--radius-pill); color: var(--text); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--heading); text-decoration: none; background: var(--surface-2); }
.main-nav a.active { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--heading); background: transparent; border: 1px solid var(--border); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn .icon { width: 20px; height: 20px; }
.icon-btn .count { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent-2); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.nav-toggle { display: none; }

.topbar { font-size: .85rem; background: var(--topbar-bg, var(--heading)); color: var(--topbar-text, #cbd5e1); }
.topbar .container { display: flex; gap: 24px; align-items: center; height: 40px; }
.topbar a { color: inherit; }
.topbar .icon { width: 15px; height: 15px; display: inline-block; vertical-align: -3px; margin-right: 6px; }
.topbar .spacer { margin-left: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0 clamp(64px, 8vw, 100px); }
.hero h1 { margin-bottom: 22px; }
.hero .lead { max-width: 620px; font-size: 1.2rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-points { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: .94rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points .icon { width: 18px; height: 18px; color: var(--success); }
.hero-visual img { width: 100%; }
.hero-caption { font-size: .78rem; color: var(--muted); margin-top: 10px; text-align: center; }

.page-hero { padding: clamp(56px, 7vw, 90px) 0 clamp(40px, 5vw, 60px); background: var(--page-hero-bg, var(--bg-alt)); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.page-hero .lead { max-width: 680px; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; text-decoration: none; }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 22px; }
.card-icon .icon { width: 26px; height: 26px; }
a.card { display: block; color: inherit; }
.media-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.media-card .media { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.media-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.media-card:hover .media img { transform: scale(1.04); }
.media-card .body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.media-card .body .meta { margin-top: auto; padding-top: 14px; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .icon { width: 15px; height: 15px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--radius-pill); font-size: .74rem; font-weight: 700; letter-spacing: .03em; background: var(--accent-soft); color: var(--accent); }
.badge-success { background: rgba(22, 163, 74, .12); color: var(--success); }
.badge-warning { background: rgba(217, 119, 6, .14); color: var(--warning); }
.badge-danger { background: rgba(220, 38, 38, .12); color: var(--danger); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

/* ---------- Feature list / checks ---------- */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .icon { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--accent); }
.checks.cols-2 { grid-template-columns: 1fr 1fr; gap: 12px 28px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat strong { display: block; font: 800 2rem/1.1 var(--font-head); color: var(--heading); margin-bottom: 6px; }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font: 800 1.6rem/1 var(--font-head); color: var(--accent); margin-bottom: 16px; }

/* ---------- Product ---------- */
.product-card .media { aspect-ratio: 16/10; }
.price { font: 800 1.5rem/1 var(--font-head); color: var(--heading); }
.price small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.product-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
.product-shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.buy-box { position: sticky; top: calc(var(--header-h) + 20px); }
.edition { display: block; position: relative; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px 16px 48px; cursor: pointer; margin-bottom: 12px; transition: border-color .15s, background .15s; }
.edition input { position: absolute; left: 18px; top: 20px; accent-color: var(--accent); width: 18px; height: 18px; }
.edition:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.edition .row { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; color: var(--heading); }
.edition .desc { display: block; font-size: .86rem; color: var(--muted); margin-top: 4px; }
.edition .badge { position: absolute; top: -10px; right: 14px; background: var(--accent-2); color: #fff; }
.tabs-nav { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 28px; overflow-x: auto; }
.tabs-nav a { padding: 12px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-nav a.active, .tabs-nav a:hover { color: var(--heading); border-color: var(--accent); text-decoration: none; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.highlight { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.plan .price { font-size: 2.4rem; margin: 14px 0 6px; }
.plan .checks { margin: 22px 0 28px; }
.plan form { margin-top: auto; }

/* ---------- Content (blog posts, pages) ---------- */
.prose { font-size: 1.06rem; line-height: 1.8; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.8em; }
.prose img { border-radius: var(--radius); margin: 1.6em 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--heading); }
.prose pre { background: var(--code-bg, #0f172a); color: #e2e8f0; padding: 18px 20px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.post-cover { border-radius: var(--radius); overflow: hidden; margin: -10px 0 40px; border: 1px solid var(--border); }

.widget { margin-bottom: 28px; }
.widget h4 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li a { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.widget li a:hover { color: var(--accent); text-decoration: none; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 40px; }
.filters a, .filters button { padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text); font: 500 .9rem var(--font-body); background: transparent; cursor: pointer; }
.filters .active, .filters a:hover, .filters button:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); text-decoration: none; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 48px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); color: var(--text); padding: 0 10px; }
.pagination .current { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* ---------- Testimonials ---------- */
.quote { position: relative; }
.quote blockquote { margin: 0 0 20px; font-size: 1.05rem; color: var(--heading); }
.quote cite { font-style: normal; font-weight: 700; color: var(--heading); display: block; }
.quote cite span { display: block; font-weight: 500; color: var(--muted); font-size: .88rem; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--heading); list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 22px 18px; color: var(--text); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta { border-radius: calc(var(--radius) * 1.6); padding: clamp(40px, 6vw, 72px); background: var(--cta-bg, var(--accent)); color: var(--cta-text, #fff); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.cta h2 { color: inherit; margin-bottom: 10px; }
.cta p { margin: 0; opacity: .85; font-size: 1.08rem; }
.cta .btn-primary { background: var(--cta-btn-bg, #fff); color: var(--cta-btn-text, var(--accent)); box-shadow: none; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--heading); }
.field .hint { font-size: .82rem; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--input-bg, var(--surface)); color: var(--heading); font: inherit; font-size: .97rem; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { min-height: 140px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 17px; height: 17px; }
.hp { position: absolute; left: -5000px; }
.auth-box { max-width: 460px; margin: 0 auto; }

/* ---------- Alerts ---------- */
.flash-wrap { position: fixed; top: calc(var(--header-h) + 14px); right: 20px; z-index: 80; display: grid; gap: 10px; max-width: 420px; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid; font-size: .94rem; background: var(--surface); box-shadow: var(--shadow); }
.alert-success { border-color: rgba(22, 163, 74, .35); color: var(--success); }
.alert-error { border-color: rgba(220, 38, 38, .35); color: var(--danger); }
.alert-info { border-color: var(--accent); color: var(--accent); }
.notice { padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 4px solid var(--accent); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.table th, .table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.key { font-family: var(--font-mono); font-weight: 600; letter-spacing: .02em; color: var(--heading); background: var(--surface-2); padding: 4px 9px; border-radius: 6px; white-space: nowrap; }

/* ---------- Account ---------- */
.account-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 32px; }
.account-nav a { padding: 9px 16px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .92rem; }
.account-nav a.active { background: var(--accent); color: var(--accent-text); }
.account-nav a:hover { text-decoration: none; }
.licence-card { display: grid; gap: 14px; }
.licence-card .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: .93rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg, var(--bg-alt)); color: var(--footer-text, var(--muted)); padding: 80px 0 0; border-top: 1px solid var(--border); font-size: .95rem; }
.site-footer h4 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--footer-head, var(--heading)); margin-bottom: 18px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--footer-text, var(--muted)); }
.site-footer a:hover { color: var(--footer-head, var(--heading)); }
.site-footer .brand { color: var(--footer-head, var(--heading)); margin-bottom: 16px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); font-size: .74rem; font-weight: 700; }
.footer-bottom { margin-top: 60px; padding: 24px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .86rem; }
.footer-bottom ul { display: flex; gap: 20px; }

/* ---------- Error ---------- */
.error-page { text-align: center; padding: 120px 0; }
.error-page .code { font: 800 7rem/1 var(--font-head); color: var(--accent); opacity: .9; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-4, .stats, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav a { padding: 8px 10px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 20px 20px; display: none; box-shadow: var(--shadow-lg); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 12px 10px; font-size: 1.05rem; }
  .header-actions { margin-left: auto; }
  .header-actions .btn { display: none; }
  .split, .product-hero, .sidebar-layout, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .buy-box { position: static; }
  .cta { grid-template-columns: 1fr; }
  .topbar .hide-sm { display: none; }
}
@media (max-width: 600px) {
  .grid-4, .stats, .steps, .footer-grid, .form-grid, .checks.cols-2 { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .flash-wrap { left: 12px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Security check, social sign-in, avatars, add-ons ---------- */
.captcha-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.captcha-row img { border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; }
.captcha .cf-turnstile, .captcha .g-recaptcha, .captcha .h-captcha { margin: 6px 0; }
.social-login { display: grid; gap: 10px; margin: 18px 0 6px; }
.social-btn { justify-content: center; gap: 10px; }
.social-btn svg { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin-top: 6px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.quote-author { display: flex; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--accent-soft); }
.avatar-initials { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.addon { margin-top: 10px; }
.demo-card { display: flex; flex-direction: column; } .demo-card .btn { margin-top: auto; align-self: flex-start; }
.form-grid .check { margin: 4px 0; }

/* ---------- Categories (shop, blog, portfolio) ---------- */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cat-section { padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.cat-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text); font-size: .86rem; background: var(--surface); }
.cat-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.cat-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cat-btn.cat-all { font-weight: 700; }
.cat-btn .n { font-size: .74rem; padding: 1px 7px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }

/* Section 1: numbered index */
.cat-index-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cat-index-title { font-size: 1.35rem; margin: 0; }
.cat-index-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 40px; align-items: start; margin: 0; padding-left: 1.6em; list-style: decimal; }
.cat-index-item { margin: 0; padding-left: 4px; }
.cat-index-item::marker { font-weight: 800; font-size: 1.08rem; color: var(--accent); }
.cat-index-parent { font-size: 1.08rem; font-weight: 800; color: var(--heading); display: inline-flex; gap: 8px; align-items: baseline; }
.cat-index-parent .n, .cat-index-subs .n { font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.cat-index-subs { list-style: disc; margin: 8px 0 0; padding-left: 2.2em; display: grid; gap: 5px; }
.cat-index-subs li::marker { color: var(--muted); }
.cat-index-subs a { font-size: .9rem; font-weight: 400; color: var(--text); }
.cat-index-list a:hover { color: var(--accent); text-decoration: none; }
.cat-index-list a.active { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.blog-search { max-width: 420px; margin-bottom: 22px; }

/* Section 2: one block per category, sub-categories indented below */
.cat-tiles { display: grid; gap: 22px; }
.cat-block { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px; }
.cat-block.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cat-block-head { display: flex; gap: 18px; align-items: center; color: inherit; }
.cat-block-head:hover { text-decoration: none; }
.cat-block-head:hover strong { color: var(--accent); }
.cat-block-head img { width: 150px; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius-sm); flex: none; }
.cat-block-text { display: grid; gap: 2px; }
.cat-num { font: 800 .9rem var(--font-head); color: var(--accent); }
.cat-block-text strong { font: 800 1.3rem/1.25 var(--font-head); color: var(--heading); }
.cat-block-text .count { font-size: .85rem; font-weight: 700; color: var(--accent); }
.cat-block-text .desc { font-size: .9rem; color: var(--muted); }
.cat-children { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin: 16px 0 0 48px; padding-left: 18px; border-left: 2px solid var(--border); }
.cat-tile { display: flex; flex-direction: column; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; border-color: var(--accent); }
.cat-tile img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.cat-tile-body { display: grid; gap: 2px; padding: 9px 11px 11px; }
.cat-tile-body .sub-name { color: var(--heading); font-size: .86rem; font-weight: 500; line-height: 1.3; }
.cat-tile-body .count { font-size: .76rem; color: var(--accent); font-weight: 600; }
.cat-tile.empty .count { color: var(--muted); }
.cat-tile.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
@media (max-width: 1000px) { .cat-index-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cat-index-list { grid-template-columns: 1fr; }
  .cat-block-head img { width: 96px; }
  .cat-children { margin-left: 12px; padding-left: 12px; grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Tickets & directory ---------- */
.ticket-msg { padding: 20px 22px; }
.ticket-msg.from-staff { border-left: 4px solid var(--accent); }
.ticket-body { margin-top: 10px; white-space: normal; }
.directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.dir-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.dir-logo { width: 100%; height: 110px; display: grid; place-items: center; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.dir-logo img { max-height: 90px; max-width: 80%; object-fit: contain; }
.dir-logo span { font: 800 2rem var(--font-head); color: var(--accent); }
.dir-card h3 { margin: 0; }

/* ---------- Numbered services, filter counts ---------- */
.service-card { position: relative; }
.service-num { position: absolute; top: 22px; right: 26px; font: 800 1.6rem/1 var(--font-head); color: var(--accent); opacity: .35; }
.numbered-links { padding-left: 1.4em; margin: 0; }
.numbered-links li::marker { color: var(--accent); font-weight: 700; }
.filters .n { font-size: .74rem; padding: 0 6px; border-radius: 9px; background: var(--surface-2); color: var(--muted); margin-left: 4px; }
.filters .active .n { background: rgba(255,255,255,.25); color: inherit; }

/* ---------- Drop-down menus ---------- */
.main-nav li { position: relative; }
.main-nav a .caret { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-left: 2px; }
.main-nav .sub-toggle { display: none; }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px; margin: 0; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 60; flex-direction: column; gap: 2px; }
.main-nav .sub-menu a { border-radius: 8px; padding: 9px 12px; font-size: .92rem; white-space: nowrap; }
.main-nav li.has-sub:hover > .sub-menu, .main-nav li.has-sub:focus-within > .sub-menu { display: flex; }
@media (max-width: 900px) {
  .main-nav li.has-sub { display: flex; flex-wrap: wrap; align-items: center; }
  .main-nav li.has-sub > a { flex: 1; }
  .main-nav a .caret { display: none; }
  .main-nav .sub-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--heading); font-size: 1.2rem; cursor: pointer; }
  .main-nav .sub-menu, .main-nav li.has-sub:hover > .sub-menu { display: none; position: static; box-shadow: none; border: 0; padding: 0 0 6px 18px; min-width: 0; width: 100%; background: transparent; }
  .main-nav li.has-sub.open > .sub-menu { display: flex; }
}
.pagination .gap { border: 0; min-width: 20px; }
.pagination a[rel] { padding: 0 14px; }

/* Email guard: "Show email" looks like a link and adapts to both themes */
button.eguard { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--accent, #0d9488); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; cursor: pointer; }
button.eguard:hover, button.eguard:focus-visible { text-decoration-style: solid; }
button.eguard[disabled] { opacity: .6; cursor: progress; }
.eguard-msg { font-size: .85em; opacity: .85; }
.eg-trap { display: none !important; }
.topbar button.eguard, .topbar .eguard-shown, footer button.eguard { color: inherit; }
