/* =====================================================================
   pisowifi.pro — public theme
   Colors are injected from Admin › Customize as CSS variables (see base.html).
   ===================================================================== */
:root {
  --brand: #0866f0; --brand-ink: #fff;
  --header-bg: #fff; --header-text: #1e293b;
  --hero-bg: #0b57d0; --hero-text: #fff;
  --btn-bg: #fff; --btn-text: #0f172a;
  --accent: #f5b301;
  --bg: #fff; --text: #334155; --heading: #0f172a; --bg-soft: #f5f8fc;
  --footer-bg: #0b1220; --footer-text: #aab4c3;
  --radius: 10px;
  --muted: color-mix(in srgb, var(--text) 72%, var(--bg));
  --border: color-mix(in srgb, var(--heading) 10%, var(--bg));
  --brand-soft: color-mix(in srgb, var(--brand) 9%, var(--bg));
  --card: var(--bg);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .18);
  --max: 1160px;
  --read: 720px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  html.auto-dark { --bg: #0b1220; --text: #cbd5e1; --heading: #f1f5f9; --bg-soft: #111a2b; --card: #111a2b;
                   --header-bg: #0b1220; --header-text: #e2e8f0; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--bg);
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video, iframe { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 750; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
code { background: var(--bg-soft); border: 1px solid var(--border); padding: .08em .4em; border-radius: 6px; font-size: .9em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--brand); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius);
       font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2; border: 2px solid transparent; cursor: pointer;
       transition: background-color .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-lg { padding: 16px 30px; font-size: 1.06rem; }
.btn-sm { padding: 9px 16px; font-size: .94rem; }
.btn-block { display: flex; width: 100%; }
.btn-cta { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-cta:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-accent { background: var(--accent); color: #111; }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: transparent; color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn-dark { background: var(--heading); color: var(--bg); }
.btn-link { padding-left: 4px; padding-right: 4px; color: var(--brand); background: none; }
.btn-link::after { content: "→"; transition: transform .15s; }
.btn-link:hover::after { transform: translateX(3px); }
/* buttons on a brand-colored surface */
.on-brand .btn-cta { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.on-brand .btn-cta:hover { background: color-mix(in srgb, var(--btn-bg) 92%, #000); }
.on-brand .btn-ghost { color: var(--hero-text); border-color: color-mix(in srgb, var(--hero-text) 45%, transparent); }
.on-brand .btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--hero-text); }
.on-brand .btn-link { color: var(--hero-text); }

/* ---------- Header ---------- */
.site-header { background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--border); z-index: 60; }
.site-header.sticky { position: sticky; top: 0; }
.site-header.scrolled { box-shadow: 0 4px 18px rgba(15, 23, 42, .07); }
.nav { display: flex; align-items: center; gap: 24px; height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--header-text); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo img { height: 34px; width: auto; display: block; }
.logo .dot { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { display: block; color: var(--header-text); opacity: .82; padding: 8px 12px; border-radius: 8px; font-weight: 550; font-size: .97rem; }
.nav-links a:hover { opacity: 1; background: color-mix(in srgb, var(--header-text) 6%, transparent); text-decoration: none; }
.nav-links a[aria-current="page"] { opacity: 1; color: var(--brand); }
.nav-cta { margin-left: 10px; }
/* Colored (dark) header: light button + white active state so nothing clashes */
.site-header.tinted { border-bottom-color: transparent; }
.site-header.tinted .logo .dot { color: inherit; opacity: .75; }
.site-header.tinted .nav-links a[aria-current="page"] { color: var(--header-text); background: rgba(255,255,255,.14); }
.site-header.tinted .nav-cta .btn-cta { background: var(--btn-bg); color: var(--btn-text); box-shadow: none; }
.site-header.tinted .nav-cta .btn-cta:hover { background: color-mix(in srgb, var(--btn-bg) 90%, #000); }
.site-header.tinted .nav-toggle { border-color: rgba(255,255,255,.35); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 8px; width: 42px; height: 40px;
              color: var(--header-text); cursor: pointer; font-size: 1.15rem; }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; margin: 0; flex-direction: column; align-items: stretch;
               background: var(--header-bg); border-bottom: 1px solid var(--border); padding: 8px 20px 18px; box-shadow: 0 12px 24px rgba(15,23,42,.08); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-cta { margin: 14px 0 0; }
  .nav-cta .btn { width: 100%; }
  .nav > .nav-cta-mobile { display: none; }
}

/* ---------- Hero: homepage ---------- */
.hero-home { position: relative; overflow: hidden; color: var(--hero-text);
             background: radial-gradient(1200px 500px at 85% -10%, rgba(255,255,255,.16), transparent 60%),
                         linear-gradient(160deg, var(--hero-bg), color-mix(in srgb, var(--hero-bg) 72%, #000)); }
.hero-home .container { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; padding-top: 84px; padding-bottom: 92px; }
.hero-home.boxed { background: none; padding: 28px 0 0; overflow: visible; }
.hero-home.boxed .container { border-radius: calc(var(--radius) * 2); padding: 72px 56px;
  background: radial-gradient(900px 400px at 85% -10%, rgba(255,255,255,.16), transparent 60%),
              linear-gradient(160deg, var(--hero-bg), color-mix(in srgb, var(--hero-bg) 72%, #000)); }
.hero-home h1 { color: var(--hero-text); font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: 18px; }
.hero-home .lead { font-size: 1.18rem; line-height: 1.7; opacity: .92; max-width: 560px; margin-bottom: 32px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
           padding: 6px 12px; border-radius: 99px; margin-bottom: 20px; background: rgba(255,255,255,.14); color: var(--hero-text); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 30px 0 0; font-size: .93rem; opacity: .88; }
.trust li::before { content: "✓"; font-weight: 800; margin-right: 7px; }
.hero-visual img { width: 100%; height: auto; display: block; border-radius: calc(var(--radius) * 1.6); box-shadow: var(--shadow-lg); }

/* Portal mock (default hero visual) */
.portal-mock { background: #fff; color: #0f172a; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-lg); max-width: 400px; margin-left: auto;
               transform: rotate(-1.5deg); }
.pm-top { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; font-weight: 700; letter-spacing: .05em; color: #64748b; }
.pm-top .ok { display: inline-flex; align-items: center; gap: 6px; color: #16a34a; }
.pm-top .ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.pm-time { margin: 18px 0 12px; }
.pm-time small { display: block; color: #64748b; font-size: .85rem; }
.pm-time b { font-size: 2.6rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pm-bar { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.pm-bar span { display: block; height: 100%; width: 62%; background: var(--brand); border-radius: 99px; }
.pm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.pm-actions span { text-align: center; padding: 11px; border-radius: 10px; font-weight: 700; font-size: .92rem; background: var(--brand); color: #fff; }
.pm-actions span.ghost { background: #f1f5f9; color: #0f172a; }
.pm-rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pm-rates span { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 6px; text-align: center; font-size: .8rem; color: #475569; }
.pm-rates b { display: block; color: #0f172a; font-size: .95rem; }

@media (max-width: 900px) {
  .hero-home .container { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; padding-bottom: 64px; }
  .hero-home.boxed .container { padding: 48px 24px; }
  .portal-mock { margin: 0 auto; transform: none; }
}

/* ---------- Hero: inner pages ---------- */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.page-hero .container { padding-top: 44px; padding-bottom: 44px; }
.page-hero.has-image .container { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.page-hero h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); max-width: 860px; margin-bottom: 14px; }
.page-hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 720px; margin-bottom: 0; }
.page-hero .cta-row { margin-top: 26px; }
.page-hero .hero-visual img { box-shadow: var(--shadow); }
.page-hero.on-brand { background: linear-gradient(160deg, var(--hero-bg), color-mix(in srgb, var(--hero-bg) 75%, #000)); color: var(--hero-text); border: 0; }
.page-hero.on-brand h1 { color: var(--hero-text); }
.page-hero.on-brand .lead, .page-hero.on-brand .crumbs, .page-hero.on-brand .byline { color: color-mix(in srgb, var(--hero-text) 85%, transparent); }
.page-hero.on-brand .crumbs a { color: var(--hero-text); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { opacity: .5; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 20px; font-size: .92rem; color: var(--muted); }
.byline .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: inline-flex;
                  align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; }
.byline .sep { opacity: .4; }
@media (max-width: 860px) {
  .page-hero.has-image .container { grid-template-columns: 1fr; gap: 28px; }
  .page-hero .container { padding-top: 32px; padding-bottom: 32px; }
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.tight { padding: 56px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin: 0 0 36px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head .kicker { display: block; font-size: .8rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head-row .section-head { margin: 0; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 56px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 12px;
                    background: var(--brand-soft); color: var(--brand); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: .97rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 26px; }
a.card { display: flex; flex-direction: column; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; }
.card p { color: var(--muted); font-size: .97rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .more { margin-top: auto; padding-top: 16px; font-weight: 650; color: var(--brand); font-size: .95rem; }
.card-img { width: calc(100% + 52px); margin: -26px -26px 20px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius) + 3px) calc(var(--radius) + 3px) 0 0; }
.tag { align-self: flex-start; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.feature-card { padding: 30px; }
.feature-card .icon { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center;
                      justify-content: center; font-size: 1.4rem; margin-bottom: 18px; }
.feature-card h3 { font-size: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border: 1px solid var(--border); border-radius: 99px; font-size: .9rem; font-weight: 550; color: var(--heading); background: var(--bg); }
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip[aria-current="page"] { background: var(--heading); color: var(--bg); border-color: var(--heading); }

/* Calculator */
.calc-card { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; }
.calc-card label { display: block; font-size: .88rem; font-weight: 650; color: var(--heading); margin-bottom: 6px; }
.calc-result { font-size: 1.3rem; font-weight: 800; color: var(--heading); padding: 12px 18px; background: var(--brand-soft); border-radius: var(--radius); white-space: nowrap; }
@media (max-width: 700px) { .calc-card { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { border-radius: calc(var(--radius) * 2); padding: 52px 48px; display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap;
            color: var(--hero-text); background: linear-gradient(160deg, var(--hero-bg), color-mix(in srgb, var(--hero-bg) 72%, #000)); }
.cta-band h2 { color: var(--hero-text); margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .88; }
@media (max-width: 640px) { .cta-band { padding: 36px 24px; } .cta-band .btn { width: 100%; } }

/* ---------- Article layout ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; max-width: var(--max); margin: 0 auto; padding: 48px 20px 80px; align-items: start; }
.article-layout.single { grid-template-columns: minmax(0, var(--read)); justify-content: center; }
.article-main { min-width: 0; max-width: var(--read); }
.article-aside { position: sticky; top: 94px; display: grid; gap: 18px; }
@media (max-width: 1020px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .article-main { margin: 0 auto; }
  .article-aside { display: none; }
}
.aside-card { border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 20px; background: var(--bg); }
.aside-card h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; font-weight: 750; }
.aside-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.aside-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); font-size: .93rem; line-height: 1.4; }
.aside-toc a:hover { color: var(--heading); text-decoration: none; }
.aside-toc a.active { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.aside-cta { background: var(--bg-soft); }
.aside-cta p { font-size: .93rem; color: var(--muted); margin-bottom: 14px; }
.aside-cta .btn + .btn { margin-top: 8px; }
.toc-inline { display: none; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 32px; background: var(--bg-soft); }
.toc-inline summary { padding: 14px 18px; font-weight: 650; color: var(--heading); cursor: pointer; }
.toc-inline ol { margin: 0; padding: 0 18px 16px 38px; }
.toc-inline li { margin: 4px 0; }
@media (max-width: 1020px) { .toc-inline { display: block; } }

/* Prose */
.prose { font-size: 1.06rem; line-height: 1.8; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.2em 0 .6em; scroll-margin-top: 92px; }
.prose h3 { margin: 1.8em 0 .5em; scroll-margin-top: 92px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--heading); }
.prose img { height: auto; border-radius: var(--radius); }
.prose img.featured { display: block; width: auto; max-width: min(100%, 560px); max-height: 320px; height: auto; object-fit: contain; margin: 0 auto 28px; border-radius: var(--radius); }
.prose figure { margin: 28px 0; }
.prose figcaption { font-size: .9rem; color: var(--muted); text-align: center; margin-top: 8px; }
.prose blockquote { border-left: 3px solid var(--brand); margin: 28px 0; padding: 4px 0 4px 20px; color: var(--heading); font-size: 1.1rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: .96rem; display: block; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose thead th { background: var(--bg-soft); color: var(--heading); font-weight: 700; font-size: .9rem; }
.prose tr:last-child td { border-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.prose nav.toc { display: none; } /* legacy manual TOCs — the sidebar shows the TOC */
.callout { border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border)); background: var(--brand-soft); padding: 16px 20px; border-radius: var(--radius); margin: 28px 0; font-size: 1rem; }
.callout.warn { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.callout strong:first-child { display: block; margin-bottom: 4px; color: var(--heading); }
.dl-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; justify-content: center; }
.dl-buttons.dl-left { justify-content: flex-start; }
.dl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 200px; padding: 14px 26px; border-radius: var(--radius);
          font-weight: 700; font-size: 1rem; line-height: 1.2; border: 2px solid transparent; transition: transform .15s, background-color .15s; }
.dl-btn:hover { text-decoration: none; transform: translateY(-1px); }
.dl-btn::before { content: "⬇"; }
.dl-btn.no-icon::before { content: none; }
.dl-btn.dl-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 28%, transparent); }
.dl-btn.dl-secondary { background: var(--accent); color: #111; }
.dl-btn.dl-outline { background: transparent; color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.dl-btn.dl-dark { background: var(--heading); color: var(--bg); }
.sc-list { columns: 2 240px; padding-left: 1.2em; }
.sc-cards { margin: 24px 0 32px; }
.sc-cards .card { padding: 20px; }
.sc-cards .card h3 { font-size: 1.05rem; }

.author-box { display: flex; gap: 16px; align-items: flex-start; border-top: 1px solid var(--border); padding-top: 28px; margin-top: 48px; }
.author-box .avatar { flex: 0 0 48px; height: 48px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: flex; align-items: center;
                      justify-content: center; font-weight: 800; font-size: 1.15rem; }
.author-box strong { color: var(--heading); }
.author-box p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }

/* FAQ */
.faq { margin-top: 56px; }
.faq h2 { margin-bottom: 12px; }
.faq-list { border-top: 1px solid var(--border); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center;
                    padding: 20px 0; font-weight: 650; color: var(--heading); font-size: 1.04rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: 0 0 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
                           background: var(--bg-soft); color: var(--brand); font-size: 1.2rem; font-weight: 500; transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .answer { padding: 0 44px 20px 0; color: var(--muted); }
.faq-list .answer p:last-child { margin-bottom: 0; }

/* Forms */
.form-stack, #contact-form { display: grid; gap: 16px; margin-top: 8px; }
label { font-weight: 650; font-size: .92rem; color: var(--heading); }
input, textarea, select { width: 100%; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--heading) 18%, var(--bg)); border-radius: var(--radius);
                          font: inherit; background: var(--bg); color: var(--text); margin-top: 6px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.search-form { display: flex; gap: 10px; max-width: 560px; }
.search-form input { margin: 0; }
.muted-note { color: var(--muted); font-size: .92rem; margin-top: 16px; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 44px; color: var(--muted); }
.admin-bar { background: #0f172a; color: #e2e8f0; font-size: .88rem; padding: 8px 0; }
.admin-bar a { color: #fbbf24; margin-left: 8px; font-weight: 600; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* Mobile sticky CTA */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .sticky-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
                background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
                transform: translateY(110%); transition: transform .25s ease; }
  .sticky-cta.show { transform: none; }
  .sticky-cta .btn { width: 100%; }
  body.has-sticky-cta .site-footer { padding-bottom: 96px; }
}

/* ---------- Dropdown menus ---------- */
.has-sub { position: relative; display: flex; align-items: center; }
.sub-toggle { background: none; border: 0; color: var(--header-text); opacity: .7; cursor: pointer; padding: 8px 6px 8px 0; margin-left: -8px; display: inline-flex; }
.sub-toggle svg { transition: transform .2s; }
.has-sub.open > .sub-toggle svg { transform: rotate(180deg); }
.sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; z-index: 80;
            background: var(--bg); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-lg);
            opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* hover bridge */
.sub-menu a { color: var(--heading) !important; opacity: 1 !important; padding: 10px 12px; border-radius: 8px; font-size: .95rem; background: none !important; }
.sub-menu a:hover, .sub-menu a[aria-current="page"] { background: var(--bg-soft) !important; color: var(--brand) !important; }
@media (min-width: 961px) {
  .has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu, .has-sub.open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
}
@media (max-width: 960px) {
  .has-sub { flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .sub-toggle { margin: 0; padding: 12px; opacity: 1; }
  .sub-menu { position: static; display: none; width: 100%; min-width: 0; box-shadow: none; border: 0; padding: 0 0 6px 12px;
              opacity: 1; visibility: visible; transform: none; background: transparent; }
  .sub-menu::before { content: none; }
  .has-sub.open > .sub-menu { display: block; }
  .sub-menu a { color: var(--header-text) !important; }
  .site-header.tinted .sub-menu a:hover { background: rgba(255,255,255,.1) !important; color: var(--header-text) !important; }
}

/* Single-column articles: TOC sits inline at the top on every screen size */
.toc-inline.always { display: block; }
.article-layout.single.wide { grid-template-columns: minmax(0, calc(var(--read) + 140px)); }
.article-layout.single.wide .article-main { max-width: calc(var(--read) + 140px); }

/* Share bar */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 36px 0 8px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.share-bar + .faq, .tldr + .share-bar { margin-top: 0; }
.share-title { font-weight: 700; color: var(--heading); font-size: .95rem; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 99px; font-size: .88rem; font-weight: 650; line-height: 1.2;
             border: 1px solid var(--border); background: var(--bg); color: var(--heading); cursor: pointer; font-family: inherit; }
.share-btn:hover { text-decoration: none; border-color: currentColor; }
.share-facebook { color: #1877f2; } .share-x { color: #0f1419; } .share-whatsapp { color: #128c4b; } .share-messenger { color: #0866ff; }
.share-telegram { color: #229ed9; } .share-viber { color: #7360f2; } .share-linkedin { color: #0a66c2; } .share-pinterest { color: #e60023; }
.share-reddit { color: #ff4500; } .share-email, .share-copy { color: var(--heading); }

/* Ad slots — reserve a little space to limit layout shift */
.ad-slot { display: block; text-align: center; margin: 28px auto; max-width: var(--max); padding: 0 20px; overflow: hidden; }
.prose .ad-slot { margin: 32px 0; padding: 0; }
.ad-label { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad-after_header, .ad-before_footer { min-height: 90px; }

/* Author */
.author-box img.avatar { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.author-box .author-role { display: block; font-size: .88rem; color: var(--muted); }
.byline img.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* Quick answer box */
.tldr { border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; margin: 0 0 28px; }
.tldr strong { display: block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.tldr p { margin: 0; color: var(--heading); font-size: 1.06rem; line-height: 1.65; }
.updated-note { margin-top: 36px; font-size: .9rem; color: var(--muted); }

/* Back to top */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 65; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center;
          justify-content: center; background: var(--heading); color: var(--bg); box-shadow: var(--shadow); opacity: 0; visibility: hidden;
          transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; }
.to-top.show { opacity: .9; visibility: visible; transform: none; }
.to-top:hover { opacity: 1; text-decoration: none; }
@media (max-width: 760px) { body.has-sticky-cta .to-top { bottom: 92px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 64px 0 32px; font-size: .95rem; }
.site-footer .logo { color: #fff; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h3 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--footer-text); }
.footer-grid a:hover { color: #fff; }
.footer-about p { max-width: 320px; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 16px;
                 flex-wrap: wrap; font-size: .86rem; }
.footer-bottom a { color: var(--footer-text); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
