/* ===== Theme tokens ===== */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f4f6;
  --text: #1c2330;
  --muted: #5f6b7a;
  --border: #e2e6eb;
  --primary: #0f766e;
  --primary-ink: #ffffff;
  --primary-soft: #e6f4f2;
  --link: #0b5fbf;
  --danger: #c62828;
  --warn-bg: #fff6e0;
  --ok: #1b7f3b;
  --h-dates: #0f766e;
  --h-fee: #b45309;
  --h-age: #6d28d9;
  --h-elig: #1d4ed8;
  --h-links: #be123c;
  --h-advt: #0e7490;
  --h-misc: #475569;
  --h-instr: #9a3412;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --radius: 10px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f1419;
  --surface: #171d24;
  --surface-2: #1e252e;
  --text: #e5e9ee;
  --muted: #98a3b1;
  --border: #2a333d;
  --primary: #2dd4bf;
  --primary-ink: #04201d;
  --primary-soft: #12302d;
  --link: #7cb7ff;
  --danger: #ff6b6b;
  --warn-bg: #3a2f12;
  --ok: #4ade80;
  --h-dates: #2dd4bf;
  --h-fee: #f59e0b;
  --h-age: #a78bfa;
  --h-elig: #60a5fa;
  --h-links: #fb7185;
  --h-advt: #22d3ee;
  --h-misc: #94a3b8;
  --h-instr: #fb923c;
  --shadow: none;
  color-scheme: dark;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  padding-bottom: 64px; /* room for social bar */
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.break { word-break: break-all; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 99; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===== Header ===== */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.2rem; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: var(--primary-ink); font-size: 1rem; }
.search { display: flex; flex: 1; max-width: 460px; margin-left: auto; }
.search input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px; background: var(--surface-2); color: var(--text); font: inherit; }
.search button { padding: 0 14px; border: 1px solid var(--primary); border-radius: 0 8px 8px 0; background: var(--primary); color: var(--primary-ink); cursor: pointer; font: inherit; }
.search.big { max-width: 560px; margin: 16px auto; }
.nav { border-top: 1px solid var(--border); }
.nav-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-row::-webkit-scrollbar { display: none; }
.nav a { padding: 10px 12px; color: var(--muted); font-weight: 500; font-size: .95rem; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

main { padding-top: 16px; padding-bottom: 24px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs span { margin: 0 2px; }

/* ===== Boxes / sections ===== */
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.box-title { --c: var(--primary); font-size: 1.1rem; margin: -16px -16px 14px; padding: 10px 16px; border-bottom: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: var(--radius) var(--radius) 0 0; background: var(--surface-2); }
.box-title a { color: inherit; }
.box-title small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.sec-dates .box-title { --c: var(--h-dates); }
.sec-fee .box-title { --c: var(--h-fee); }
.sec-age .box-title { --c: var(--h-age); }
.sec-elig .box-title { --c: var(--h-elig); }
.sec-links .box-title { --c: var(--h-links); }
.sec-advt .box-title { --c: var(--h-advt); }
.sec-misc .box-title { --c: var(--h-misc); }
.sec-instr .box-title { --c: var(--h-instr); }
.empty { margin: 8px 0; }
.note { margin: 12px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; font-size: .95rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col > .box { margin-bottom: 16px; }

/* ===== Home ===== */
.hero { text-align: center; padding: 8px 0 12px; }
.hero h1 { font-size: 1.35rem; }
.hero p { margin: 0 auto; max-width: 720px; font-size: .95rem; }
.featured { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.chip { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 64px; padding: 10px; border-radius: var(--radius); color: #fff; font-weight: 600; font-size: .9rem; line-height: 1.35; }
.chip:hover { text-decoration: none; filter: brightness(1.08); }
.chip.c0 { background: #0f766e; } .chip.c1 { background: #b45309; } .chip.c2 { background: #6d28d9; } .chip.c3 { background: #be123c; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); line-height: 1.45; }
.post-list li:last-child { border-bottom: 0; }
.post-list a { font-weight: 500; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; vertical-align: middle; text-transform: uppercase; letter-spacing: .02em; }
.badge.new { background: #dc2626; color: #fff; animation: pulse 2s infinite; }
.badge.cat { background: var(--primary-soft); color: var(--primary); }
.badge.draft { background: var(--warn-bg); color: #9a6700; }
.badge.ok { background: var(--primary-soft); color: var(--ok); }
@keyframes pulse { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .badge.new { animation: none; } }

.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 16px 0 4px; }
.pager a, .pager .cur { min-width: 38px; padding: 6px 12px; text-align: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-weight: 600; font-size: .92rem; }
.pager a:hover { border-color: var(--primary); text-decoration: none; }
.pager .cur { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.pager .gap { color: var(--muted); }

/* ===== Page layout: left sidebar + main ===== */
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: "side main"; gap: 16px; align-items: start; }
.main-col { grid-area: main; min-width: 0; }
.sidebar { grid-area: side; min-width: 0; align-self: stretch; }
.side-sticky { position: sticky; top: 118px; }
.side-box { padding-bottom: 8px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .93rem; line-height: 1.4; }
.side-list li:last-child { border-bottom: 0; }
.side-list a { color: var(--text); font-weight: 500; }
.side-list a.active { color: var(--primary); }
.side-list.closing li { flex-direction: column; gap: 2px; }
.count-pill { font-size: .75rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 0 8px; }
.urgent { color: var(--danger); font-weight: 600; }

/* ===== List view with thumbnails ===== */
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: -16px -16px 12px; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius) var(--radius) 0 0; }
.list-title { font-size: 1.1rem; margin: 0; }
.tabs { display: inline-flex; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; background: var(--surface); }
.tabs a { padding: 4px 12px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { background: var(--primary); color: var(--primary-ink); }
.cards { list-style: none; margin: 0; padding: 0; }
.card { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.card:first-child { padding-top: 4px; }
.card:last-child { border-bottom: 0; }
.card-ad { padding: 12px 0; border-bottom: 1px solid var(--border); }
.thumb { position: relative; flex: 0 0 168px; height: 112px; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: left center; display: block; }
.card.is-ended .thumb img, .card.is-ended .thumb-ph { filter: grayscale(.85); opacity: .75; }
.thumb-ph { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; font-weight: 800; font-size: 1.6rem; letter-spacing: .04em; background: linear-gradient(135deg, #0f766e, #14b8a6); }
.ph-admit-card { background: linear-gradient(135deg, #b45309, #f59e0b); }
.ph-result { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.ph-answer-key { background: linear-gradient(135deg, #be123c, #fb7185); }
.ph-syllabus { background: linear-gradient(135deg, #1d4ed8, #60a5fa); }
.ph-admission { background: linear-gradient(135deg, #0e7490, #22d3ee); }
.ov { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 99px; font-size: .7rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.ov-active { background: #16a34a; }
.ov-ended { background: #dc2626; }
.ov-lg { left: 12px; top: 12px; padding: 4px 12px; font-size: .8rem; }
.card-body { flex: 1; min-width: 0; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.card-title { font-size: 1.02rem; font-weight: 600; line-height: 1.4; margin: 0 0 4px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--link); }
.card-info { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; }
.card-info .ended { color: var(--muted); text-decoration: line-through; }
.badge.upd { background: #2563eb; color: #fff; }

/* ===== Post header / status ===== */
.post-thumb { position: relative; max-height: 360px; margin: 0 0 12px; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 1200 / 630; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; font-size: .95rem; border: 1px solid; }
.status-active { background: rgba(22, 163, 74, .1); border-color: rgba(22, 163, 74, .4); }
.status-ended { background: rgba(220, 38, 38, .1); border-color: rgba(220, 38, 38, .4); }
.status-active .dot { width: 10px; height: 10px; border-radius: 50%; background: #16a34a; animation: ping 1.6s infinite; }
.status-note { margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: #dc2626; color: #fff; font-size: .78rem; font-weight: 700; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } }
@media (prefers-reduced-motion: reduce) { .status-active .dot { animation: none; } }
.ended-note { margin: 0 0 10px; background: rgba(220, 38, 38, .1); }
.post > .share { margin-bottom: 16px; }

/* ===== Post ===== */
.post-head { margin-bottom: 16px; }
.post-head h1 { margin-top: 8px; font-size: 1.6rem; }
.meta { margin: 0 0 10px; }
.last-date { color: var(--danger); }
.short-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px; }

.org-card { text-align: center; background: var(--primary-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.org-card h2 { color: var(--primary); font-size: 1.3rem; margin-bottom: 2px; }
.org-post { margin: 0 0 8px; font-weight: 600; }
.org-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: .95rem; }

table { width: 100%; border-collapse: collapse; }
.kv th, .kv td, .grid th, .grid td, .links th, .links td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.kv th { width: 55%; font-weight: 500; background: var(--surface-2); }
.kv td { font-weight: 600; }
.grid thead th { background: var(--surface-2); font-weight: 600; font-size: .92rem; }
.grid td.num { text-align: center; white-space: nowrap; }
.links th { font-weight: 600; width: 60%; background: var(--surface-2); }
.links td { text-align: center; }
.table-scroll { overflow-x: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 16px; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary); color: var(--primary-ink); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.07); }
.btn-lg { padding: 10px 22px; font-size: 1rem; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-sm { padding: 4px 10px; font-size: .85rem; }
.btn-block { width: 100%; }

.prose { line-height: 1.7; }
.instructions { margin: 0; padding-left: 1.4em; }
.instructions li { margin: 6px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { font-size: .85rem; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }

/* ===== Share / save ===== */
.share { display: flex; flex-wrap: wrap; gap: 6px; }
.s-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.s-btn:hover { text-decoration: none; border-color: var(--primary); }
.s-save[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.s-save[aria-pressed="true"] svg { fill: currentColor; }
.s-wa { color: #128c7e; } .s-tg { color: #229ed9; } .s-fb { color: #1877f2; }
[data-theme="dark"] .s-wa { color: #25d366; } [data-theme="dark"] .s-fb { color: #6ea8ff; }
.share-end { text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.share-end p { margin: 0 0 8px; }
.share-end .share { justify-content: center; }

/* ===== Ads ===== */
.ad { position: relative; margin: 0 0 16px; min-height: 90px; text-align: center; overflow: hidden; }
.ad-label { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.ad-sidebar { min-height: 250px; }
.side-sticky .ad-sidebar { min-height: 600px; }
.ad-infeed { min-height: 100px; margin: 0; }
.ad-article { min-height: 250px; }
.ad-ph { display: grid; place-items: center; border: 2px dashed var(--border); border-radius: var(--radius); background: repeating-linear-gradient(45deg, transparent 0 10px, var(--surface-2) 10px 20px); color: var(--muted); font-size: .8rem; font-weight: 600; }

/* ===== Static pages ===== */
.prose-page h2 { font-size: 1.1rem; margin-top: 1.2em; }

/* ===== Footer ===== */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 20px 0 8px; margin-top: 16px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer-grid p { margin: 4px 0 0; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: flex-start; }
.footer-grid nav a { color: var(--muted); font-size: .92rem; }
.follow { display: flex; flex-wrap: wrap; gap: 10px; font-size: .9rem; }

/* ===== Floating theme toggle (sits above the social bar) ===== */
.theme-toggle { position: fixed; right: 16px; bottom: 76px; z-index: 30; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer; display: grid; place-items: center; }
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
body:not(:has(.social-bar)) .theme-toggle { bottom: 20px; }

/* ===== Bottom social join bar ===== */
.social-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 8px; justify-content: center; padding: 8px 16px; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.social-bar a { flex: 1; max-width: 240px; text-align: center; padding: 8px 12px; border-radius: 8px; color: #fff; font-weight: 700; font-size: .92rem; }
.social-bar a:hover { text-decoration: none; filter: brightness(1.08); }
.sb-wa { background: #1faa55; } .sb-tg { background: #229ed9; }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 8px; font-size: .9rem; z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: 1fr; grid-template-areas: "main" "side"; }
  .side-sticky { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .site-header { position: static; }
  .header-row { flex-wrap: wrap; gap: 8px; }
  .search { max-width: none; flex-basis: 100%; }
  .two-col { grid-template-columns: 1fr; }
  .thumb { flex-basis: 104px; height: 78px; }
  .thumb-ph { font-size: 1.1rem; }
  .ov { left: 4px; top: 4px; font-size: .6rem; padding: 1px 6px; }
  .ov-lg { font-size: .75rem; padding: 3px 10px; }
  .card { gap: 10px; }
  .card-title { font-size: .95rem; }
  .post-head h1 { font-size: 1.3rem; }
  .kv th { width: 50%; }
}
@media print {
  .site-header, .site-footer, .share, .share-end, .ad, .sidebar, .theme-toggle, .social-bar { display: none !important; }
  body { background: #fff; padding: 0; }
}

/* ===== Category-wise boxes (home, below Latest Updates) ===== */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.cat-box { display: flex; flex-direction: column; margin: 0; }
.cat-box .box-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cat-latest-jobs .box-title { --c: #0f766e; }
.cat-admit-card .box-title { --c: #b45309; }
.cat-result .box-title { --c: #6d28d9; }
.cat-answer-key .box-title { --c: #be123c; }
.cat-syllabus .box-title { --c: #1d4ed8; }
.cat-admission .box-title { --c: #0e7490; }
.cat-box .post-list { flex: 1; }
.more { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-weight: 600; font-size: .9rem; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; }
.st { font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .02em; }
.st-active { color: #16a34a; }
.st-ended { color: var(--danger); }
[data-theme="dark"] .st-active { color: #4ade80; }
.post-list li.is-ended > a { color: var(--muted); }
@media (max-width: 640px) { .cat-grid { grid-template-columns: 1fr; } }

/* ===== Search filters ===== */
.search-cat { flex: 0 0 auto; max-width: 130px; padding: 0 8px; border: 1px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; }
.search-cat + input { border-radius: 0; }
.filter-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.filter-main { display: flex; gap: 8px; }
.filter-main input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; }
.filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.filter-grid label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.filter-grid select, .filter-grid input { width: 100%; padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; }
.filter-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip-btn { padding: 4px 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.chip-btn:hover { border-color: var(--primary); }
.chip-btn.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.clear-link { margin-left: auto; }
@media (max-width: 900px) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .search-cat { max-width: 96px; } }

/* Active filter chips + mobile collapsible panel */
.filter-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: .82rem; font-weight: 600; }
.fchip:hover { text-decoration: none; filter: brightness(.95); }
.fchip span { font-size: .7rem; opacity: .8; }
.filter-toggle, .filter-apply { display: none; }
.filter-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--primary); color: var(--primary-ink); font-size: .72rem; }
@media (max-width: 640px) {
  .filter-box { padding: 12px; gap: 10px; }
  .filter-main { flex-wrap: wrap; }
  .filter-main input { flex-basis: 100%; }
  .filter-main .btn { flex: 1; padding: 9px 12px; }
  .filter-toggle { display: inline-flex; }
  .filter-box:not(.is-open) .filter-panel { display: none; }
  .filter-panel { padding-top: 10px; border-top: 1px dashed var(--border); }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filter-grid label:last-child { grid-column: 1 / -1; }
  .filter-grid select, .filter-grid input { padding: 9px 8px; font-size: 16px; } /* 16px stops iOS zoom */
  .filter-apply { display: flex; padding: 10px; }
  .filter-presets .clear-link { margin-left: 0; flex-basis: 100%; }
}

/* ===== Footer columns (managed in Admin → Menus) ===== */
.site-footer .footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col a { color: var(--muted); font-size: .92rem; }
.footer-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px; }
.footer-copy { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ===== Branding / announcement / maintenance ===== */
.logo-img { height: 40px; width: auto; max-width: 220px; object-fit: contain; display: block; }
.logo-mode-image .logo-img { height: 44px; }
.announce { border-bottom: 1px solid var(--border); font-size: .92rem; }
.announce-row { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.announce p { margin: 0; flex: 1; }
.announce a { font-weight: 700; }
.announce-info { background: var(--primary-soft); }
.announce-warning { background: var(--warn-bg); }
.announce-danger { background: rgba(220, 38, 38, .12); }
.announce-success { background: rgba(22, 163, 74, .12); }
.announce-close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 4px 8px; }
.announce.is-hidden { display: none; }
.maint-notice { background: #dc2626; color: #fff; text-align: center; padding: 6px 12px; font-size: .9rem; font-weight: 600; }
.maint-notice a { color: #fff; text-decoration: underline; }
.maintenance-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.maint-card { max-width: 480px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 24px; }
.maint-card .logo-mark { width: 56px; height: 56px; font-size: 1.6rem; border-radius: 14px; margin-bottom: 12px; }
.cat-intro { margin: 0 0 12px; color: var(--muted); font-size: .95rem; }
.prose h2 { font-size: 1.1rem; margin-top: 1.2em; }
.prose h3 { font-size: 1rem; margin-top: 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
