/*
Theme Name: BankShebaBD
Theme URI: https://bankshebabd.com
Author: BankShebaBD
Description: ব্যাংকিংয়ের জটিল নিয়ম, সহজ বাংলায়। বাংলা নিউজ-পোর্টালের কাঠামোয় তৈরি একটি দ্রুত ও সহজে পড়া যায় এমন থিম।
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bankshebabd
*/
/* Layout concept: a Bangla news-portal grid (masthead, sticky category bar, three-column lead with hairline column rules,
   ruled section blocks, right-hand rail) applied to a library of banking guides. Colour comes from the BankShebaBD navy and green. */
@counter-style bn { system: numeric; symbols: '০' '১' '২' '৩' '৪' '৫' '৬' '৭' '৮' '৯'; }

:root {
  --paper: #ffffff;
  --paper-2: #f2f6f9;
  --paper-3: #e6eef4;
  --ink: #0d1a24;
  --ink-2: #34444f;
  --mute: #627280;
  --rule: #d6dee5;
  --rule-strong: #47535d;
  --brand: #0b4f6c;
  --brand-weak: #e1eff6;
  --on-brand: #ffffff;
  --green: #12805f;
  --green-weak: #e2f4ec;
  --gold: #f2b134;
  --note-bg: #fff6dc;
  --note-line: #d9a517;
  --note-ink: #5b4300;
  --foot-bg: #0a2e3f;
  --foot-ink: #d3e3ec;
  --foot-mute: #8fb0c2;
  --shadow: 0 12px 32px rgba(10, 30, 45, .16);
  --k-mobile-banking: #12805f;
  --k-banking-basics: #0b4f6c;
  --k-savings-investment: #946300;
  --k-tax-income-tax: #6a3fb5;
  --k-cards-atm: #c2410c;
  --k-security: #b3122b;
  --k-expat-freelancing: #1d6fc4;
  --f-ui: 'Hind Siliguri', 'Noto Sans Bengali', 'Nirmala UI', 'Kalpurush', system-ui, sans-serif;
  --f-read: 'Noto Serif Bengali', 'Kalpurush', 'SolaimanLipi', 'Nirmala UI', serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1720; --paper-2: #152230; --paper-3: #1c2d3d; --ink: #e9f0f5; --ink-2: #b6c4cf; --mute: #8ea0ae;
    --rule: #26384a; --rule-strong: #6b7d8c; --brand: #7ccbf0; --brand-weak: #16384a; --on-brand: #06212e;
    --green: #4fd3a6; --green-weak: #123a2e; --gold: #f2b134; --note-bg: #2e2509; --note-line: #a97d12; --note-ink: #f1d98a;
    --foot-bg: #08121a; --foot-ink: #c9dbe6; --foot-mute: #7f9aab; --shadow: 0 12px 32px rgba(0, 0, 0, .55);
    --k-mobile-banking: #4fd3a6; --k-banking-basics: #7ccbf0; --k-savings-investment: #f0c04a; --k-tax-income-tax: #b99cf0;
    --k-cards-atm: #ff9b6b; --k-security: #ff8a9b; --k-expat-freelancing: #7ab8f5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1720; --paper-2: #152230; --paper-3: #1c2d3d; --ink: #e9f0f5; --ink-2: #b6c4cf; --mute: #8ea0ae;
  --rule: #26384a; --rule-strong: #6b7d8c; --brand: #7ccbf0; --brand-weak: #16384a; --on-brand: #06212e;
  --green: #4fd3a6; --green-weak: #123a2e; --gold: #f2b134; --note-bg: #2e2509; --note-line: #a97d12; --note-ink: #f1d98a;
  --foot-bg: #08121a; --foot-ink: #c9dbe6; --foot-mute: #7f9aab; --shadow: 0 12px 32px rgba(0, 0, 0, .55);
  --k-mobile-banking: #4fd3a6; --k-banking-basics: #7ccbf0; --k-savings-investment: #f0c04a; --k-tax-income-tax: #b99cf0;
  --k-cards-atm: #ff9b6b; --k-security: #ff8a9b; --k-expat-freelancing: #7ab8f5;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-ui); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 70; background: var(--paper); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
main:focus, main:focus-visible { outline: none; }
.wrap {
  width: 100%; max-width: 1272px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border: 0; border-radius: 4px; z-index: 100; }
.skip:focus { left: 16px; }

.k-mobile-banking { --c: var(--k-mobile-banking); }
.k-banking-basics { --c: var(--k-banking-basics); }
.k-savings-investment { --c: var(--k-savings-investment); }
.k-tax-income-tax { --c: var(--k-tax-income-tax); }
.k-cards-atm { --c: var(--k-cards-atm); }
.k-security { --c: var(--k-security); }
.k-expat-freelancing { --c: var(--k-expat-freelancing); }

/* ---------- top bar, masthead, nav ---------- */
.topbar { background: var(--paper-2); border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.topbar nav { display: flex; gap: 20px; }
.topbar a:hover { color: var(--brand); text-decoration: underline; }

.mast { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 36px; padding-block: 16px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--brand); }
.logo-badge {
  position: relative; width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: var(--on-brand);
  display: grid; place-items: center; font: 700 27px/1 var(--f-ui); flex: none;
}
.logo-badge::after { content: ""; position: absolute; top: -1px; right: -1px; width: 15px; height: 15px; border-radius: 50%; background: var(--green); border: 2.5px solid var(--paper); }
.logo-word { font-weight: 700; font-size: 33px; line-height: 1; letter-spacing: -.01em; }
.logo-word b { color: var(--green); font-weight: 700; margin-left: 6px; }
.logo small { display: block; font-size: 13.5px; font-weight: 500; color: var(--mute); margin-top: 6px; letter-spacing: 0; }

.teasers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.teaser { display: flex; gap: 10px; align-items: flex-start; padding-inline: 18px; border-left: 1px solid var(--rule); min-width: 0; }
.teaser:first-child { border-left: 0; padding-left: 0; }
.teaser img { width: 46px; height: 46px; object-fit: cover; object-position: 72% 50%; border-radius: 2px; flex: none; background: var(--paper-3); }
.teaser .lab { display: block; font-size: 12.5px; font-weight: 700; color: var(--c); line-height: 1.3; }
.teaser .tt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.teaser:hover .tt { text-decoration: underline; }

.navbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.navbar .wrap { display: flex; align-items: stretch; position: relative; }
.menu { display: flex; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { display: flex; align-items: center; padding: 0 15px; min-height: 52px; font-weight: 700; font-size: 17px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.menu a:first-child { padding-left: 0; }
.menu a:hover { color: var(--c, var(--brand)); }
.menu a[aria-current="page"] { border-bottom-color: var(--c, var(--brand)); color: var(--c, var(--brand)); }
.actions { display: flex; flex: none; border-left: 1px solid var(--rule); }
.actions button { display: flex; align-items: center; gap: 8px; padding: 0 16px; border: 0; border-left: 1px solid var(--rule); background: none; font-weight: 600; font-size: 15.5px; cursor: pointer; min-height: 52px; }
.actions button:first-child { border-left: 0; }
.actions button:hover { background: var(--paper-2); }
.actions svg { width: 20px; height: 20px; flex: none; }
.actions .lbl { white-space: nowrap; }

.searchbar { background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.searchbar form { display: flex; gap: 10px; padding-block: 12px; }
.searchbar input { flex: 1; min-width: 0; font: 500 17px var(--f-ui); padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--paper); color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 4px; background: var(--brand); color: var(--on-brand); font: 700 16px var(--f-ui); padding: 10px 22px; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }

.drawer { position: absolute; left: 0; right: 0; top: 100%; z-index: 65; background: var(--paper); border: 1px solid var(--rule); border-top: 0; box-shadow: var(--shadow); padding: 24px 28px 28px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; max-height: calc(100vh - 140px); overflow-y: auto; }
.drawer h3 { font-size: 14px; color: var(--mute); font-weight: 600; margin-bottom: 8px; letter-spacing: .02em; }
.drawer a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-weight: 600; }
.drawer a:hover { color: var(--c, var(--brand)); }
.drawer a span { color: var(--mute); font-weight: 500; font-size: 14.5px; }


/* ---------- story pieces ---------- */
.hl { text-wrap: pretty; }
.hl a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.t { font-weight: 700; line-height: 1.38; }
.d { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 13.5px; color: var(--mute); line-height: 1.4; }
.meta .k { color: var(--c); font-weight: 700; }
.meta .k:hover { text-decoration: underline; }
.thumb, .pic { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 72% 50%; background: var(--paper-3); border-radius: 2px; }
.pic { aspect-ratio: 1200 / 630; object-position: 50% 50%; }
.ti { display: block; }

.st { display: grid; gap: 8px; }
.st.has-img { grid-template-columns: minmax(0, 1fr) 86px; grid-template-areas: "t i" "d d" "m m"; column-gap: 14px; }
.st.has-img .hl { grid-area: t; }
.st.has-img .ti { grid-area: i; }
.st.has-img .d { grid-area: d; }
.st.has-img .meta { grid-area: m; }
.st .t { font-size: 19.5px; }
.st.sm .t { font-size: 17.5px; font-weight: 600; }
.stack > * { padding-block: 16px; border-bottom: 1px solid var(--rule); }
.stack > *:first-child { padding-top: 0; }
.stack > *:last-child { border-bottom: 0; padding-bottom: 0; }

.hero { display: grid; grid-template-columns: minmax(0, 23fr) minmax(0, 51fr) minmax(0, 26fr); padding-block: 26px 22px; }
.hero > * { min-width: 0; }
.hero > * + * { border-left: 1px solid var(--rule-strong); padding-left: 24px; }
.hero > *:not(:last-child) { padding-right: 24px; }
.hero-mid { display: grid; align-content: start; }
.lead { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 22px; align-items: start; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.lead .t { font-size: 31px; line-height: 1.3; text-wrap: balance; }
.lead .d { margin-top: 12px; font-size: 16px; -webkit-line-clamp: 5; }
.lead .meta { margin-top: 12px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--rule); }
.duo > * { padding: 18px 20px 18px 0; }
.duo > * + * { padding: 18px 0 18px 20px; border-left: 1px solid var(--rule); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 18px; }
.trio > * { padding-right: 18px; display: grid; gap: 10px; align-content: start; }
.trio > * + * { padding-left: 18px; border-left: 1px solid var(--rule); }
.trio .t { font-size: 18px; }

.note-card { border: 1px solid var(--rule); background: var(--paper-2); border-radius: 4px; padding: 16px 18px; margin-bottom: 18px; }
.note-card h2 { font-size: 19px; line-height: 1.35; margin-bottom: 8px; }
.note-card ul { padding-left: 1.15em; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.note-card li { margin-block: 5px; }
.note-card li::marker { color: var(--green); }
.note-card a.more { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--brand); font-size: 15.5px; }
.note-card a.more:hover { text-decoration: underline; }
.opin { display: grid; grid-template-columns: minmax(0, 1fr) 80px; column-gap: 14px; }
.opin .hl { font-size: 17.5px; font-weight: 600; line-height: 1.4; }
.opin .pre { color: var(--c); font-weight: 700; }
.opin .meta { margin-top: 6px; }

.topics { display: flex; align-items: center; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-block: 18px; border-top: 1px solid var(--rule); }
.topics::-webkit-scrollbar { display: none; }
.topics b { white-space: nowrap; font-size: 15px; }
.chip { white-space: nowrap; border: 1px solid var(--rule-strong); border-radius: 99px; padding: 3px 15px; font-size: 15px; background: var(--paper); color: var(--ink); cursor: pointer; font-family: inherit; }
.chip:hover { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

.band { background: var(--paper-2); border-block: 1px solid var(--rule); padding-block: 26px 28px; }
.band-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.band-h h2 { font-size: 25px; line-height: 1.25; }
.band-h p { font-size: 14.5px; color: var(--mute); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.fact { display: flex; flex-direction: column; gap: 4px; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 16px 18px 14px; min-width: 0; }
.fact .lab { font-size: 14.5px; font-weight: 600; color: var(--mute); }
.fact .big { font-size: 25px; line-height: 1.3; font-weight: 700; color: var(--brand); }
.fact .sub { font-size: 15.5px; color: var(--ink-2); }
.fact .src { margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--mute); line-height: 1.5; }
.fact a.go { font-size: 14.5px; font-weight: 700; color: var(--brand); padding-top: 8px; }
.fact a.go:hover { text-decoration: underline; }

.cols { display: grid; grid-template-columns: minmax(0, 26fr) minmax(0, 74fr); padding-block: 34px 8px; }
.rail { padding-right: 26px; border-right: 1px solid var(--rule-strong); }
.rail-in { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 10px 8px; margin-bottom: -1px; font-weight: 600; font-size: 16.5px; cursor: pointer; color: var(--ink-2); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.num { list-style: none; padding: 0; counter-reset: n; }
.num li { counter-increment: n; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.num li::before { content: counter(n, bn); font: 700 30px/1 var(--f-ui); color: var(--mute); opacity: .7; }
.num .t { font-size: 17.5px; font-weight: 600; }
.num .meta { margin-top: 5px; }
.blocks { padding-left: 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; align-content: start; }
.blocks .wide { grid-column: 1 / -1; }
.sec { border-top: 3px solid var(--c, var(--rule-strong)); padding-top: 12px; min-width: 0; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-h h2 { display: flex; align-items: center; gap: 10px; font-size: 24px; line-height: 1.25; }
.sec-h h2::before { content: ""; width: 13px; height: 13px; border-radius: 50%; background: var(--c, var(--brand)); flex: none; }
.sec-h a.all { font-size: 15px; font-weight: 700; color: var(--c, var(--brand)); white-space: nowrap; }
.sec-h a.all:hover { text-decoration: underline; }
.sec .lead-c { display: grid; gap: 10px; }
.sec .lead-c .t { font-size: 21px; }
.sec .list { list-style: none; padding: 0; margin-top: 14px; }
.sec .list li { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 14px; padding-block: 13px; border-top: 1px solid var(--rule); }
.sec .list .t { font-size: 17px; font-weight: 600; }
.sec .list .meta { margin-top: 4px; }
.sec.wide .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.sec.wide .row > * { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.sec.wide .row .t { font-size: 19px; }
.sec.wide .row .d { margin-top: 8px; font-size: 15px; -webkit-line-clamp: 3; }

/* ---------- footer ---------- */
.foot { background: var(--foot-bg); color: var(--foot-ink); margin-top: 56px; padding-top: 46px; }
.foot .logo { color: #fff; }
.foot .logo-badge { background: #fff; color: #0b4f6c; }
.foot .logo-badge::after { border-color: var(--foot-bg); }
.foot .logo small { color: var(--foot-mute); }
.foot-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.25fr; gap: 38px; }
.foot h3 { font-size: 14.5px; color: var(--foot-mute); font-weight: 600; margin-bottom: 10px; letter-spacing: .02em; }
.foot a:not(.logo) { display: block; padding-block: 4px; font-size: 16px; }
.foot a:not(.logo):hover { text-decoration: underline; }
.foot p { font-size: 15px; line-height: 1.7; }
.foot .safety { border: 1px solid rgba(255, 255, 255, .22); border-radius: 4px; padding: 14px 16px; font-size: 14.5px; line-height: 1.7; }
.foot .safety b { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 38px; padding-block: 18px; display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; font-size: 14px; color: var(--foot-mute); }

/* ---------- article ---------- */
.art-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-block: 26px 8px; }
.art-main { min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14.5px; color: var(--mute); }
.crumbs a:hover { text-decoration: underline; color: var(--ink); }
.catlabel { display: inline-block; margin: 16px 0 10px; font-weight: 700; font-size: 16.5px; color: var(--c); border-bottom: 2px solid var(--c); line-height: 1.5; }
.art-t { font-size: clamp(28px, 4.4vw, 42px); line-height: 1.34; font-weight: 700; text-wrap: balance; margin-bottom: 14px; }
.art-deck { font-size: 20px; line-height: 1.65; color: var(--ink-2); margin-bottom: 20px; text-wrap: pretty; }
.byline { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-block: 13px; border-block: 1px solid var(--rule); margin-bottom: 22px; }
.by-l { display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; font-size: 21px; flex: none; }
.by-n { font-weight: 700; line-height: 1.3; }
.by-s { font-size: 14px; color: var(--mute); line-height: 1.4; }
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { border: 1px solid var(--rule-strong); border-radius: 99px; padding: 4px 15px; font: 600 14.5px var(--f-ui); background: var(--paper); color: var(--ink); cursor: pointer; }
.pill:hover { background: var(--paper-2); }
.art-fig { margin-bottom: 22px; }
.art-fig img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 2px; background: var(--paper-3); }
.art-fig figcaption { font-size: 14px; color: var(--mute); padding-block: 8px 10px; border-bottom: 1px solid var(--rule); }
.verify { display: flex; gap: 12px; align-items: flex-start; background: var(--green-weak); border: 1px solid var(--rule); border-radius: 4px; padding: 12px 16px; font-size: 15.5px; line-height: 1.6; margin-bottom: 22px; }
.verify svg { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 3px; }
.verify a { font-weight: 700; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.toc { border: 1px solid var(--rule); background: var(--paper-2); border-radius: 4px; padding: 14px 20px 16px; margin-bottom: 28px; }
.toc b { display: block; font-size: 16.5px; margin-bottom: 6px; }
.toc ol { list-style: none; padding: 0; counter-reset: tc; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.toc li { counter-increment: tc; }
.toc a { display: grid; grid-template-columns: 26px minmax(0, 1fr); text-align: left; width: 100%; padding: 6px 0; background: none; border: 0; border-bottom: 1px solid var(--rule); cursor: pointer; font-size: 16px; line-height: 1.5; color: var(--ink); }
.toc a::before { content: counter(tc, bn) "."; color: var(--mute); font-weight: 600; }
.toc a:hover { color: var(--brand); text-decoration: underline; }

.prose { font-family: var(--f-read); font-size: 19.5px; line-height: 1.95; color: var(--ink); overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.1em; }
.prose > p, .prose > ul, .prose > ol, .prose > h3 { max-width: 40em; }
.prose h2 { font-family: var(--f-ui); font-size: 28px; line-height: 1.35; font-weight: 700; margin-top: 1.9em; padding-top: .85em; border-top: 1px solid var(--rule); scroll-margin-top: calc(78px + env(safe-area-inset-top, 0px)); text-wrap: balance; }
.prose h2.pg-h { margin-top: 1.7em; }
.prose h3 { font-family: var(--f-ui); font-size: 22px; line-height: 1.45; font-weight: 700; margin-top: 1.5em; }
.prose a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 700; font-family: var(--f-ui); }
.prose ul { padding-left: 1.3em; }
.prose li { margin-block: .35em; padding-left: .2em; }
.prose ul li::marker { color: var(--green); }
.prose ol { list-style: none; padding: 0; counter-reset: o; }
.prose ol > li { counter-increment: o; position: relative; padding-left: 2.7em; margin-block: .75em; }
.prose ol > li::before { content: counter(o, bn); position: absolute; left: 0; top: .28em; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--brand); color: var(--on-brand); font: 700 .82em/1.9em var(--f-ui); text-align: center; }
.prose .tbl { overflow-x: auto; border: 1px solid var(--rule); border-radius: 4px; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--f-ui); font-size: 16.5px; line-height: 1.55; min-width: 440px; }
.prose th { background: var(--brand-weak); color: var(--brand); text-align: left; font-weight: 700; padding: 10px 14px; }
.prose td { padding: 10px 14px; border-top: 1px solid var(--rule); vertical-align: top; }
.prose tbody tr:nth-child(even) td { background: var(--paper-2); }
.prose em { font-style: italic; }
.prose > p > em:only-child { display: block; font-family: var(--f-ui); font-size: 16px; font-style: normal; color: var(--ink-2); border-left: 3px solid var(--gold); padding-left: 14px; line-height: 1.7; }

.prose p.updated { font-family: var(--f-ui); font-size: 15px; color: var(--mute); line-height: 1.7; margin-top: 1.4em; }
.prose p.updated em { display: inline; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose p.sources { font-family: var(--f-ui); font-size: 16px; line-height: 1.75; border: 1px solid var(--rule); background: var(--paper-2); padding: 12px 16px; border-radius: 4px; margin-top: 1.7em; }
.faq { border-top: 1px solid var(--rule); margin-top: .6em !important; }
.qa { padding-block: 16px; border-bottom: 1px solid var(--rule); }
.qa h3.q { font-family: var(--f-ui); font-size: 19.5px; line-height: 1.5; margin: 0 0 6px; }
.qa p { font-size: 18.5px; line-height: 1.85; }
.cf-slot { margin-top: 1em; }

.cf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; font-family: var(--f-ui); font-size: 16px; border: 1px solid var(--rule); background: var(--paper-2); border-radius: 4px; padding: 22px; }
.f2 { display: grid; gap: 6px; }
.f2.full, .cf .full { grid-column: 1 / -1; }
.f2 label { font-weight: 600; font-size: 15.5px; }
.f2 input, .f2 select, .f2 textarea { font: 500 16.5px var(--f-ui); padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--paper); color: var(--ink); width: 100%; }
.cf-warn { grid-column: 1 / -1; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }

.note-box { margin-top: 28px; padding: 14px 18px; border: 1px solid var(--rule); border-left: 4px solid var(--gold); background: var(--paper-2); border-radius: 4px; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.note-box b { color: var(--ink); }
.note-box a { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 24px; padding: 18px 0; border-block: 1px solid var(--rule); }
.author-box .avatar { width: 56px; height: 56px; font-size: 25px; }
.author-box p { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.author-box a { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.pn a { display: block; border: 1px solid var(--rule); border-radius: 4px; padding: 12px 16px; font-weight: 600; line-height: 1.5; min-width: 0; }
.pn a small { display: block; font-size: 13px; color: var(--mute); font-weight: 500; }
.pn a:hover { background: var(--paper-2); }
.pn a:last-child { text-align: right; }
.rel { margin-top: 36px; }
.rel .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.side { min-width: 0; }
.side-in { display: grid; gap: 28px; }
.side-in .ad { margin-block: 12px; }
.side .sec h2 { font-size: 20px; }
.side .sec .sec-h { margin-bottom: 4px; }
.side .sec .sec-h h2::before { width: 11px; height: 11px; }
.side .list { margin-top: 4px; }
.side .num li { padding-block: 12px; }
.side .num li::before { font-size: 26px; }
.side .num .t { font-size: 16.5px; }
.side .help { border: 1px solid var(--rule); border-radius: 4px; padding: 16px 18px; background: var(--paper-2); }
.side .help b { display: block; font-size: 17.5px; margin-bottom: 4px; }
.side .help p { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.side .help a { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--brand); }
.side .help a:hover { text-decoration: underline; }

/* ---------- lists, category, page, search ---------- */
.pagehead { padding-block: 30px 22px; border-bottom: 1px solid var(--rule); }
.pagehead .bar { border-top: 4px solid var(--c, var(--brand)); padding-top: 18px; }
.pagehead h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.25; font-weight: 700; display: flex; align-items: center; gap: 14px; }
.pagehead h1::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--c, var(--brand)); flex: none; }
.pagehead p { margin-top: 10px; font-size: 19px; color: var(--ink-2); max-width: 46rem; }
.pagehead .cnt { margin-top: 10px; font-size: 14.5px; color: var(--mute); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding-block: 16px 4px; }
.chips a { border: 1px solid var(--rule-strong); border-radius: 99px; padding: 3px 15px; font-size: 15px; font-weight: 600; }
.chips a:hover, .chips a[aria-current="page"] { background: var(--c, var(--brand)); border-color: var(--c, var(--brand)); color: #fff; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 28px; padding-block: 28px 8px; }
.card { display: grid; gap: 10px; align-content: start; min-width: 0; }
.card .t { font-size: 20px; }
.card .d { font-size: 15.5px; }
.big-lead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; align-items: center; padding-block: 28px 26px; border-bottom: 1px solid var(--rule); }
.big-lead .t { font-size: 32px; line-height: 1.3; text-wrap: balance; }
.big-lead .d { margin-top: 12px; font-size: 17px; -webkit-line-clamp: 4; }
.big-lead .meta { margin-top: 12px; }

.page-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-block: 30px 8px; }
.page-nav { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); align-self: start; }
.page-nav h2 { font-size: 14px; color: var(--mute); font-weight: 600; margin-bottom: 8px; letter-spacing: .02em; }
.page-nav a { display: block; padding: 9px 0 9px 14px; border-left: 3px solid var(--rule); font-weight: 600; font-size: 16px; line-height: 1.45; }
.page-nav a:hover { color: var(--brand); }
.page-nav a[aria-current="page"] { border-left-color: var(--brand); color: var(--brand); background: var(--paper-2); }
.page-main { min-width: 0; max-width: 780px; }
.page-main h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.28; font-weight: 700; padding-bottom: 16px; border-bottom: 4px solid var(--brand); margin-bottom: 8px; text-wrap: balance; }
.page-main .prose > h2:first-child { border-top: 0; margin-top: .8em; padding-top: 0; }

.res { list-style: none; padding: 0; }
.res li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding-block: 18px; border-bottom: 1px solid var(--rule); }
.res .t { font-size: 21px; }
.res .d { margin-top: 6px; }
.empty { padding: 40px 0; color: var(--ink-2); font-size: 18px; }
.empty a { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 11px 20px; border-radius: 6px; font-size: 15px; z-index: 90; max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--shadow); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 0; }
  .hero-mid { grid-column: 1 / -1; order: -1; padding-right: 0 !important; border-left: 0 !important; padding-left: 0 !important; }
  .hero > *:nth-child(1) { padding-right: 24px; }
  .hero > *:nth-child(3) { padding-left: 24px; border-left: 1px solid var(--rule-strong); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-wrap { grid-template-columns: minmax(0, 1fr); }
  .side-in, .rail-in, .page-nav { position: static; }
  .side-in { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .teasers { display: none; }
  .mast { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .rail { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--rule-strong); padding-bottom: 24px; margin-bottom: 30px; }
  .blocks { padding-left: 0; }
  .grid3, .rel .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .big-lead { grid-template-columns: minmax(0, 1fr); }
  .page-wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .page-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .page-nav h2 { display: none; }
  .page-nav a { border: 1px solid var(--rule-strong); border-radius: 99px; padding: 4px 14px; white-space: nowrap; font-size: 15px; }
  .page-nav a[aria-current="page"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
  .drawer { grid-template-columns: 1fr; padding: 18px; }
}
@media (max-width: 700px) {
  body { font-size: 16.5px; }
  .topbar nav { display: none; }
  .topbar .wrap { justify-content: center; }
  .logo-word { font-size: 28px; }
  .logo-badge { width: 42px; height: 42px; font-size: 23px; }
  .mast { padding-block: 12px; }
  .actions .lbl { display: none; }
  .actions button { padding: 0 13px; }
  .menu a { padding: 0 12px; font-size: 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 18px; }
  .hero > *:nth-child(n) { padding-left: 0; padding-right: 0; border-left: 0; }
  .hero > * + * { border-top: 1px solid var(--rule-strong); padding-top: 22px; }
  .lead { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .lead .t { font-size: 26px; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .duo > *, .duo > * + * { padding: 16px 0; border-left: 0; }
  .duo > * + * { border-top: 1px solid var(--rule); }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .trio > *, .trio > * + * { padding: 16px 0; border-left: 0; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
  .trio > * + * { border-top: 1px solid var(--rule); }
  .trio .t { font-size: 17px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .blocks, .sec.wide .row { grid-template-columns: minmax(0, 1fr); }
  .sec.wide .row > * { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .grid3, .rel .cards { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .toc ol { grid-template-columns: minmax(0, 1fr); }
  .side-in { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 18.5px; line-height: 1.9; }
  .prose table { min-width: 0; font-size: 15px; line-height: 1.5; }
  .prose th, .prose td { padding: 8px 9px; }
  .prose h2 { font-size: 24px; }
  .art-deck { font-size: 18px; }
  .cf { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .res li { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .res .t { font-size: 18.5px; }
  .pn { grid-template-columns: minmax(0, 1fr); }
  .pn a:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* ---------- additions for WordPress ---------- */
.screen-reader-text { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pill { display: inline-block; }
.chip { display: inline-block; }
.by-n a:hover { text-decoration: underline; }
.author-box a:hover, .note-box a:hover { text-decoration-thickness: 2px; }
.pg-search { display: flex; gap: 10px; margin-top: 16px; max-width: 640px; }
.pg-search input { flex: 1; min-width: 0; font: 500 17px var(--f-ui); padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--paper); color: var(--ink); }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding-block: 30px 6px; }
.pagination .page-numbers { border: 1px solid var(--rule-strong); border-radius: 99px; padding: 3px 15px; font-weight: 600; font-size: 15px; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.author-head { display: flex; align-items: center; gap: 16px; }
.avatar.big { width: 64px; height: 64px; font-size: 30px; }
.pagehead h1.plain::before { display: none; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border: 1px solid var(--rule); border-left: 4px solid var(--green); background: var(--green-weak); border-radius: 4px; padding: 12px 16px; margin: 0 0 16px; font-family: var(--f-ui); font-size: 16px; line-height: 1.6; }
.notice.err { border-left-color: #b3122b; background: var(--note-bg); }
.ad { display: block; margin: 40px auto; max-width: 728px; text-align: center; }
.ad .ad-l { display: block; text-align: left; font-size: 12px; letter-spacing: .04em; color: var(--mute); margin-bottom: 4px; }
.ad.in-art { margin-block: 2.2em; max-width: 100%; }
.ad.tall { max-width: 336px; }
.side-in .ad { margin-block: 12px; }
.prose .wp-block-heading { margin-bottom: 0; }
@media (max-width: 700px) { .author-head .avatar.big { width: 52px; height: 52px; font-size: 24px; } }

.admin-bar .navbar{top:32px}
@media (max-width:782px){.admin-bar .navbar{top:46px}}

img.avatar { object-fit: cover; display: block; background: var(--brand); }
.about-photo { float: right; margin: 4px 0 12px 20px; width: 150px; }
.about-photo img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; display: block; }
@media (max-width: 600px) { .about-photo { float: none; margin: 0 0 14px; } }

/* Logo image */
.logo-img { height: 58px; width: auto; display: block; background: #fff; border-radius: 8px; padding: 3px 8px; }
.foot .logo-img { height: 64px; }
@media (max-width: 700px) { .logo-img { height: 46px; } .foot .logo-img { height: 52px; } }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.post-tags a { font-size: 14.5px; padding: 4px 12px; border: 1px solid var(--line, #d9e2e8); border-radius: 999px; color: var(--mute); background: var(--paper); text-decoration: none; }
.post-tags a:hover { color: var(--brand); border-color: var(--brand); }
