/* Indian White Paper — public site
   Single hand-written stylesheet, no framework, no build step. */

:root {
    --brand: #0b5ed7;
    --brand-dark: #084298;
    --accent: #e63946;
    --topbar: #14181f;
    --bg: #f4f5f7;
    --surface: #ffffff;
    --text: #1b1f27;
    --muted: #6b7280;
    --line: #e4e7ec;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(16, 24, 40, .07);
    --shadow-lg: 0 6px 20px rgba(16, 24, 40, .1);
    --wrap: 1280px;
}

html[data-theme="dark"] {
    --topbar: #05070a;
    --bg: #0e1116;
    --surface: #171b22;
    --text: #e6e8ec;
    --muted: #98a1b0;
    --line: #262c36;
    --shadow: 0 1px 3px rgba(0, 0, 0, .5);
    --shadow-lg: 0 6px 20px rgba(0, 0, 0, .55);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

/* Inline icons scale with the text around them unless a rule says otherwise. */
svg { width: 1em; height: 1em; fill: currentColor; vertical-align: -.14em; flex: none; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 1rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------- top bar */
.topbar {
    background: var(--topbar);
    color: #cfd4dc;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
    flex-wrap: wrap;
}
.topbar a { color: #cfd4dc; }
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 20px; align-items: center; }
.topbar-contact { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.topbar-contact span { display: inline-flex; align-items: center; gap: 6px; }
.topbar svg { width: 14px; height: 14px; fill: currentColor; flex: none; }

.theme-toggle {
    background: none; border: 0; cursor: pointer; color: #cfd4dc;
    padding: 4px; display: inline-flex; line-height: 0;
}
.theme-toggle:hover { color: #fff; }
.theme-toggle svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------- masthead */
.masthead { background: var(--surface); }
.masthead .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 18px;
    padding-bottom: 18px;
}
.logo img { max-height: 62px; width: auto; }
.logo .logo-text {
    font-size: 30px; font-weight: 800; letter-spacing: .5px; line-height: 1.1;
}
.logo .logo-text small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 3px; }
.masthead-banner { flex: 1 1 auto; max-width: 728px; }
.masthead-banner img { width: 100%; border-radius: var(--radius); }

/* ---------------------------------------------------------- nav */
.mainnav {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 3px solid var(--brand);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--shadow);
}
.mainnav .wrap { display: flex; align-items: center; gap: 8px; }
.nav-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; align-items: center; flex: 1 1 auto; flex-wrap: wrap;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
    display: block; padding: 14px 11px; font-weight: 700; white-space: nowrap;
    font-size: 13.5px; text-transform: uppercase; letter-spacing: .2px;
    border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.nav-list > li > a:hover { color: var(--brand); }
.nav-list > li.is-active > a { color: var(--brand); border-bottom-color: var(--brand); }
.has-children > a::after { content: "▾"; margin-left: 5px; font-size: 11px; }

.submenu {
    position: absolute; top: 100%; left: 0; min-width: 200px;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius) var(--radius);
    list-style: none; margin: 0; padding: 6px 0; display: none; z-index: 50;
}
.nav-list > li:hover > .submenu, .nav-list > li:focus-within > .submenu { display: block; }
.submenu a { display: block; padding: 8px 16px; font-size: 14px; }
.submenu a:hover { background: var(--bg); color: var(--brand); }
.submenu-right { left: auto; right: 0; }

/* "•••" holds the categories that would otherwise wrap the bar. */
.nav-more > a { letter-spacing: 2px; }
.nav-more > a::after { content: none; }

.nav-toggle, .search-toggle {
    background: none; border: 0; cursor: pointer; color: var(--text);
    padding: 12px 10px; line-height: 0;
}
.nav-toggle { display: none; }
.nav-toggle svg, .search-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.search-toggle:hover { color: var(--brand); }

.navsearch { display: none; border-top: 1px solid var(--line); background: var(--surface); }
.navsearch.open { display: block; }
.navsearch form { display: flex; gap: 8px; padding: 12px 0; }
.navsearch input {
    flex: 1; padding: 10px 14px; border: 1px solid var(--line);
    border-radius: var(--radius); background: var(--bg); color: var(--text); font-size: 15px;
}

/* ---------------------------------------------------------- layout */
/* Two columns: content + one right rail holding federations, the QR block
   and every ad. Categories live in the top menu, not in a side column. */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
    padding: 24px 0 40px;
}
.col-main { min-width: 0; }
.col-right { display: flex; flex-direction: column; gap: 20px; }

/* Home: slider on the left, one ad standing beside it. */
.home-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: stretch;
}
.home-top.no-ad { grid-template-columns: minmax(0, 1fr); }
.home-top .ad-stack { justify-content: flex-start; }

/* ---------------------------------------------------------- widgets */
.widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.widget-title {
    margin: 0;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #fff;
    background: var(--brand);
}
.widget-body { padding: 12px 14px; }

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { border-bottom: 1px solid var(--line); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 14px; font-size: 14px; font-weight: 600;
}
.cat-list a:hover { background: var(--bg); color: var(--brand); padding-left: 18px; transition: padding .15s; }
.cat-list .count {
    background: var(--bg); color: var(--muted); border-radius: 20px;
    padding: 1px 9px; font-size: 12px; font-weight: 700;
}
.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-right: 2px; }
.cat-list a span:first-child { display: inline-flex; align-items: center; gap: 8px; }

.fed-list { list-style: none; margin: 0; padding: 0; }
.fed-list li { border-bottom: 1px solid var(--line); }
.fed-list li:last-child { border-bottom: 0; }
.fed-list a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13.5px; font-weight: 600; }
.fed-list a:hover { background: var(--bg); color: var(--brand); }
.fed-list img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line); background: #fff; }

/* ---------------------------------------------------------- ads */
.ad-stack { display: flex; flex-direction: column; gap: 16px; }
.ad-unit {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.ad-unit img { width: 100%; }
.ad-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--muted); text-align: center; padding: 4px; border-bottom: 1px solid var(--line);
}
.ad-footer img { width: 100%; border-radius: var(--radius); }

/* ---------------------------------------------------------- QR code */
.qr-widget .widget-body { text-align: center; }
.qr-widget img {
    width: 100%; max-width: 210px; margin: 0 auto;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 8px;
}
.qr-caption { margin: 10px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------------------------------------------------------- slider */
.slider {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: #0b0d11; box-shadow: var(--shadow);
}
.slides { position: relative; aspect-ratio: 16 / 9; }
.slide {
    position: absolute; inset: 0; opacity: 0; visibility: hidden;
    transition: opacity .5s ease;
}
.slide.active { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-body {
    position: absolute; inset: auto 0 0 0; padding: 40px 24px 22px; color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .88) 10%, rgba(0, 0, 0, .55) 55%, transparent);
}
.slide-body h2 { font-size: 26px; margin: 8px 0 6px; color: #fff; }
.slide-body h2 a { color: #fff; }
.slide-body h2 a:hover { color: #cfe0ff; }
.slide-meta { font-size: 12.5px; color: #cbd2dd; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.slide-meta span { display: inline-flex; align-items: center; gap: 5px; }

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer;
    font-size: 20px; line-height: 1; display: grid; place-items: center; z-index: 2;
}
.slider-btn:hover { background: var(--brand); }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }
.slider-dots { position: absolute; bottom: 12px; right: 18px; display: flex; gap: 6px; z-index: 2; }
.slider-dots button {
    width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    background: rgba(255, 255, 255, .45);
}
.slider-dots button.active { background: #fff; width: 22px; border-radius: 5px; }

/* ---------------------------------------------------------- category blocks */
.block { margin-top: 28px; }
.block:first-child { margin-top: 0; }
.block-head {
    display: flex; align-items: center; gap: 14px;
    border-bottom: 2px solid var(--line); margin-bottom: 16px;
}
.block-head h2 {
    margin: 0; font-size: 15px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .8px; color: #fff; background: var(--brand);
    padding: 8px 18px; border-radius: var(--radius) var(--radius) 0 0;
}
.block-head .more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--brand); }
.block-head .more:hover { text-decoration: underline; }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    display: flex; flex-direction: column; height: 100%;
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 15.5px; margin: 0 0 8px; line-height: 1.35; }
.card-body p { font-size: 13.5px; color: var(--muted); margin: 0 0 10px; }
.card-meta {
    margin-top: auto; font-size: 12px; color: var(--muted);
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.card-meta svg { width: 13px; height: 13px; fill: currentColor; vertical-align: -2px; margin-right: 3px; }

.chip {
    position: absolute; top: 10px; left: 10px; z-index: 1;
    background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .7px; padding: 4px 9px; border-radius: 3px;
}
.chip.breaking { background: var(--accent); left: auto; right: 10px; }

/* list rows (most read, related) */
.row-list { list-style: none; margin: 0; padding: 0; }
.row-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-list li:first-child { padding-top: 0; }
.row-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.row-list img { width: 72px; height: 54px; object-fit: cover; border-radius: 4px; flex: none; }
.row-list h4 { font-size: 13.5px; margin: 0 0 3px; font-weight: 600; line-height: 1.35; }
.row-list .meta { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------- article */
.panel {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--brand); }
.breadcrumb span { margin: 0 6px; }

.article-title { font-size: 30px; line-height: 1.25; margin-bottom: 12px; }
.article-meta {
    display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
    font-size: 13px; color: var(--muted);
    padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.article-meta span { display: inline-flex; align-items: center; gap: 5px; }
.article-figure { margin: 0 0 18px; }
.article-figure img { width: 100%; border-radius: var(--radius); }
.article-figure figcaption { font-size: 12.5px; color: var(--muted); padding-top: 8px; font-style: italic; }
.article-body { font-size: 16.5px; line-height: 1.8; }
.article-body p { margin: 0 0 1.15rem; }
.article-body h2 { font-size: 22px; margin: 1.6rem 0 .7rem; }
.article-body h3 { font-size: 18px; margin: 1.4rem 0 .6rem; }
.article-body img { border-radius: var(--radius); margin: 1rem 0; }
.article-body ul, .article-body ol { margin: 0 0 1.15rem; padding-left: 1.4rem; }
.article-body li { margin-bottom: .4rem; }
.article-body blockquote {
    margin: 1.2rem 0; padding: 12px 18px; border-left: 4px solid var(--brand);
    background: var(--bg); color: var(--text); font-style: italic;
}
.article-body a { color: var(--brand); text-decoration: underline; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.2rem; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
    background: var(--bg); border: 1px solid var(--line); border-radius: 20px;
    padding: 4px 12px; font-size: 12.5px; color: var(--muted);
}
.share { display: flex; gap: 8px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.share span { font-size: 13px; font-weight: 700; color: var(--muted); }
.share a {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--brand); color: #fff;
}
.share a:hover { background: var(--brand-dark); color: #fff; }
.share svg { width: 15px; height: 15px; fill: currentColor; }

/* ------------------------------------------- page / federation banner */
.page-banner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--bg);
}
.page-banner img { width: 100%; }

/* Two or three images share one frame and cross-fade. */
.page-banner.rotator .rotator-track { position: relative; aspect-ratio: 1000 / 280; }
.page-banner.rotator .rotator-item {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden; transition: opacity .5s ease;
}
.page-banner.rotator .rotator-item.active { opacity: 1; visibility: visible; }
.page-banner.rotator .rotator-item img { width: 100%; height: 100%; object-fit: cover; }

.rotator-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: 0; border-radius: 50%;
    background: rgba(0, 0, 0, .4); color: #fff; cursor: pointer;
    font-size: 18px; line-height: 1; display: grid; place-items: center; z-index: 2;
}
.rotator-btn:hover { background: var(--brand); }
.rotator-btn.prev { left: 10px; }
.rotator-btn.next { right: 10px; }

.rotator-dots {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 2;
}
.rotator-dots button {
    width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    background: rgba(255, 255, 255, .55); box-shadow: 0 0 3px rgba(0, 0, 0, .45);
}
.rotator-dots button.active { background: #fff; width: 22px; border-radius: 5px; }

/* ---------------------------------------------------------- federation page */
.fed-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.fed-head img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); background: #fff; }
.fed-head h1 { font-size: 26px; margin: 0 0 4px; }
.fed-head .sub { color: var(--muted); font-size: 14px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.info-item { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.info-item strong { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 3px; }

.fed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.fed-card { text-align: center; padding: 22px 16px; }
.fed-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 2px solid var(--line); background: #fff; }
.fed-card h3 { font-size: 16px; margin-bottom: 6px; }
.fed-card p { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------- forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 10px 12px; font: inherit; font-size: 14.5px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 94, 215, .13);
}
.field textarea { min-height: 150px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.error { color: var(--accent); font-size: 12.5px; margin-top: 4px; }

.btn {
    display: inline-block; padding: 11px 24px; border: 0; border-radius: var(--radius);
    background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 14.5px;
    cursor: pointer; text-align: center;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-outline:hover { background: var(--bg); color: var(--brand); }

.alert {
    padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px;
    border: 1px solid transparent; font-size: 14px;
}
.alert-success { background: #e7f6ec; border-color: #b7e2c5; color: #1b6b36; }
.alert-error { background: #fdecec; border-color: #f5c2c2; color: #9b2226; }
html[data-theme="dark"] .alert-success { background: #10281a; border-color: #1e5233; color: #7fd39d; }
html[data-theme="dark"] .alert-error { background: #2a1214; border-color: #5c2126; color: #f09098; }

/* ---------------------------------------------------------- pagination */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 26px 0 0; }
.pagination a, .pagination span {
    min-width: 38px; padding: 8px 12px; text-align: center;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); font-size: 14px; font-weight: 600;
}
.pagination a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .disabled { color: var(--muted); opacity: .5; }

/* ---------------------------------------------------------- footer */
.site-footer { background: var(--topbar); color: #aeb6c2; margin-top: 40px; padding: 36px 0 0; font-size: 14px; }
.site-footer a { color: #aeb6c2; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 30px; }
.site-footer h4 {
    color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .7px;
    margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); display: inline-block;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer li svg { margin-right: 6px; opacity: .8; }
.footer-logo img { max-height: 52px; margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 0;
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px;
}
.social { display: flex; gap: 10px; }
.social a {
    width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .09);
    display: grid; place-items: center;
}
.social a:hover { background: var(--brand); }
.social svg { width: 15px; height: 15px; fill: currentColor; }

.to-top {
    position: fixed; right: 20px; bottom: 20px; width: 42px; height: 42px;
    border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
    color: var(--text); cursor: pointer; display: none; place-items: center;
    box-shadow: var(--shadow-lg); z-index: 60;
}
.to-top.show { display: grid; }
.to-top svg { width: 18px; height: 18px; fill: currentColor; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }

/* ---------------------------------------------------------- responsive */
/* Stack the slider and its ad before the slider gets too narrow to read. */
@media (max-width: 1040px) {
    .home-top { grid-template-columns: minmax(0, 1fr); }
    .home-top .ad-stack { max-width: 340px; margin: 0 auto; }
}

@media (max-width: 880px) {
    .masthead .wrap { flex-direction: column; align-items: flex-start; }
    .masthead-banner { max-width: 100%; width: 100%; }

    .nav-toggle { display: inline-flex; }
    .nav-list {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch;
        background: var(--surface); border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-lg); max-height: 70vh; overflow-y: auto;
    }
    .nav-list.open { display: flex; }
    .nav-list > li > a { border-bottom: 1px solid var(--line); margin-bottom: 0; }
    .submenu { position: static; display: block; box-shadow: none; border: 0; background: var(--bg); border-radius: 0; }
    .mainnav .wrap { position: relative; justify-content: space-between; }

    .layout { grid-template-columns: minmax(0, 1fr); }
    /* Sidebar drops below the news and lays its widgets out side by side. */
    .col-right { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
    .col-right > * { flex: 1 1 280px; }
    .col-right .ad-stack { flex-direction: row; flex-wrap: wrap; }
    .col-right .ad-stack > * { flex: 1 1 280px; }

    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .slide-body h2 { font-size: 19px; }
    .slide-body { padding: 30px 16px 16px; }
    .article-title { font-size: 24px; }
    .article-body { font-size: 16px; }
    .panel { padding: 18px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .news-grid { grid-template-columns: minmax(0, 1fr); }
    .topbar .wrap { justify-content: center; gap: 6px; padding: 4px 10px; }
    .topbar-links { gap: 16px; font-size: 12.5px; }
    /* Keep the phone, email and theme toggle on one row on a 375 px screen. */
    .topbar-contact { gap: 10px; font-size: 11.5px; justify-content: center; }
    .topbar-contact span { gap: 4px; }
    .theme-toggle { padding: 2px; }
    .footer-grid { grid-template-columns: 1fr; }
    .slider-btn { width: 32px; height: 32px; font-size: 16px; }
}

@media print {
    .topbar, .mainnav, .col-right, .site-footer, .to-top, .ad-unit, .share { display: none !important; }
    .layout, .home-top { grid-template-columns: 1fr; }
}
