/* ============================================================
   GitCMS News — Professional News Template
   Light/dark mode, responsive editorial layout, ad slots.
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --surface-3: #e9edf5;
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --brand: #0f3d91;
  --brand-2: #d61f26;
  --brand-soft: #e8f0ff;
  --accent: #f59e0b;
  --success: #16a34a;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, .10);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, .16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1180px;
  --narrow: 760px;
  --font-ui: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-news: "Newsreader", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1020;
    --surface: #111827;
    --surface-2: #151f34;
    --surface-3: #1f2937;
    --text: #f8fafc;
    --text-soft: #d1d5db;
    --muted: #9ca3af;
    --line: #263244;
    --line-strong: #334155;
    --brand: #7aa7ff;
    --brand-2: #ff646b;
    --brand-soft: #172544;
    --accent: #fbbf24;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, .28);
    --shadow-lg: 0 22px 60px rgba(0, 0, 0, .36);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020;
  --surface: #111827;
  --surface-2: #151f34;
  --surface-3: #1f2937;
  --text: #f8fafc;
  --text-soft: #d1d5db;
  --muted: #9ca3af;
  --line: #263244;
  --line-strong: #334155;
  --brand: #7aa7ff;
  --brand-2: #ff646b;
  --brand-soft: #172544;
  --accent: #fbbf24;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .28);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, .36);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
.container { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.post-narrow { max-width: var(--narrow); }
.site-main { min-height: 60vh; }

/* HEADER */
.site-header { position: relative; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.top-strip { background: linear-gradient(90deg, #0b1020, #111827 52%, #1f2937); color: #ffffff; font-size: 13px; }
.top-strip-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; overflow: hidden; }
.breaking { min-width: 0; max-width: 100%; flex: 1 1 auto; display: flex; align-items: center; gap: 10px; overflow: hidden; }
.breaking-label { flex: 0 0 auto; background: var(--brand-2); color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; border-radius: 999px; padding: 3px 9px; font-size: 11px; }
.ticker-link { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; opacity: .92; }
.ticker-link:hover { color: #fff; opacity: 1; }
.top-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; margin-left: auto; }
.top-actions a { opacity: .86; font-weight: 700; }
.theme-toggle { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.85); color: #0f172a; background: #ffffff; border-radius: 999px; padding: 5px 11px; cursor: pointer; font: inherit; font-weight: 900; box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.theme-toggle:hover { background: #f8fafc; color: #d61f26; }
.theme-toggle .toggle-icon { color: #d61f26; font-weight: 900; }
.main-header { background: var(--surface); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.site-logo-img { width: auto; max-width: 190px; max-height: 58px; object-fit: contain; }
.site-logo-mark { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; font-family: var(--font-news); font-size: 25px; line-height: 1; font-weight: 900; box-shadow: var(--shadow-md); }
.site-logo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-logo-text strong { font-family: var(--font-news); font-size: clamp(26px, 4vw, 38px); line-height: 1; letter-spacing: -.04em; font-weight: 800; }
.site-logo-text small { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { color: var(--text-soft); font-size: 14px; font-weight: 800; }
.site-nav a:hover { color: var(--brand-2); }
.category-bar { border-top: 1px solid var(--line); background: var(--surface-2); }
.category-bar-inner { min-height: 42px; display: flex; align-items: center; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.category-bar-inner::-webkit-scrollbar { display: none; }
.category-bar a { flex: 0 0 auto; color: var(--text-soft); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.category-bar a:hover { color: var(--brand-2); }

/* ADS */
.ad-slot { width: min(100% - 32px, var(--maxw)); margin: 24px auto; min-height: 92px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px); color: var(--muted); display: grid; place-items: center; text-align: center; padding: 18px; }
.ad-slot span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; font-weight: 900; color: var(--brand-2); }
.ad-slot strong { display: block; margin-top: 2px; color: var(--text-soft); font-size: 14px; }
.ad-slot small { display: block; font-size: 12px; }
.ad-sidebar { width: 100%; min-height: 250px; margin: 0; position: relative; }
.ad-sidebar.tall { min-height: 420px; }
.ad-between, .ad-in-content { width: 100%; }
.ad-in-content { margin: 34px 0; min-height: 110px; }
.ad-top { margin-top: 26px; margin-bottom: 26px; }

/* HOME */
.home-hero { padding: 18px 0 44px; }
.hero-kicker { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 20px; border-bottom: 1px solid var(--line-strong); padding-bottom: 16px; position: relative; }
.hero-kicker::before { content: ""; position: absolute; left: 0; bottom: -1px; width: 160px; height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--accent)); }
.hero-kicker span { color: var(--brand-2); font-weight: 900; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.hero-kicker h2 { font-family: var(--font-news); font-size: clamp(30px, 4vw, 46px); line-height: .96; letter-spacing: -.055em; margin-top: 5px; }
.hero-kicker p { color: var(--muted); font-weight: 700; max-width: 440px; line-height: 1.45; }
.highlight-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(320px, .88fr); gap: 24px; align-items: stretch; }
.feature-card { overflow: hidden; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.feature-card-premium { min-height: 560px; position: relative; isolation: isolate; }
.feature-card-premium .feature-image { position: absolute; inset: 0; aspect-ratio: auto; background: var(--surface-3); }
.feature-card-premium .feature-image img, .feature-card-premium .feature-image .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.feature-card-premium:hover .feature-image img, .feature-card-premium:hover .feature-image .thumb-placeholder { transform: scale(1.045); }
.feature-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(2,6,23,.08) 0%, rgba(2,6,23,.24) 35%, rgba(2,6,23,.88) 100%); }
.feature-content { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(24px, 5vw, 44px); color: #fff; }
.feature-label-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.feature-label-row > span { display: inline-flex; min-height: 26px; align-items: center; border-radius: 999px; padding: 4px 10px; color: rgba(255,255,255,.92); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.feature-card-premium .category-pill { background: #fff; color: #d61f26; }
.feature-content h1 { font-family: var(--font-news); font-size: clamp(38px, 6vw, 72px); line-height: .9; letter-spacing: -.065em; margin: 10px 0 16px; max-width: 880px; text-wrap: balance; }
.feature-content h1 a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.feature-content p { max-width: 760px; color: rgba(255,255,255,.88); font-size: clamp(16px, 2vw, 20px); line-height: 1.55; }
.feature-content .meta-line { color: rgba(255,255,255,.8); }
.highlight-side { display: grid; gap: 14px; align-content: start; }
.highlight-side-title { color: var(--brand-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; width: max-content; max-width: 100%; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; box-shadow: var(--shadow-sm); }
.compact-headline { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); }
.compact-headline:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.compact-thumb { display: block; aspect-ratio: 1.2/1; overflow: hidden; border-radius: 12px; background: var(--surface-3); }
.compact-thumb img { width: 100%; height: 100%; object-fit: cover; }
.compact-headline h2 { font-family: var(--font-news); line-height: 1.12; font-size: 21px; letter-spacing: -.025em; margin: 6px 0 8px; }
.compact-headline h2 a:hover { color: var(--brand-2); }
.category-pill { display: inline-flex; align-items: center; align-self: flex-start; width: max-content; border-radius: 999px; color: var(--brand-2); background: rgba(214, 31, 38, .10); padding: 5px 10px; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.category-pill:hover { background: var(--brand-2); color: #fff; }
.category-pill.tiny { padding: 4px 8px; font-size: 10px; }
.meta-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 13px; font-weight: 700; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; padding: 22px 0 52px; }
.main-column, .sidebar-column { min-width: 0; }
.sidebar-column { display: grid; gap: 22px; position: sticky; top: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--line-strong); padding-bottom: 12px; margin-bottom: 20px; }
.section-heading span { display: block; color: var(--brand-2); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 900; }
.section-heading h2 { font-family: var(--font-news); font-size: clamp(27px, 3vw, 36px); line-height: 1; letter-spacing: -.04em; }
.section-heading a { color: var(--brand); font-weight: 900; font-size: 14px; }
.latest-grid, .post-grid, .related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.post-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-thumb { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-3); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .38s ease; }
.post-card:hover .card-thumb img { transform: scale(1.04); }
.card-body { padding: 18px; }
.card-title { font-family: var(--font-news); font-size: 25px; line-height: 1.08; letter-spacing: -.035em; margin: 10px 0; }
.card-title a:hover { color: var(--brand-2); }
.card-excerpt { color: var(--text-soft); font-size: 14.5px; line-height: 1.55; }
.sidebar-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.sidebar-box h2 { font-family: var(--font-news); font-size: 26px; line-height: 1; margin-bottom: 14px; letter-spacing: -.03em; }
.text-news-list { display: grid; gap: 0; }
.text-news-list a { display: block; border-top: 1px solid var(--line); padding: 13px 0; }
.text-news-list a:first-child { border-top: 0; padding-top: 0; }
.text-news-list span { display: block; color: var(--text); font-weight: 800; line-height: 1.35; }
.text-news-list small { color: var(--muted); font-weight: 700; }

.category-blocks { padding: 10px 0 64px; }
.category-section { margin-top: 28px; }
.category-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 22px; }
.category-lead .card-title { font-size: 30px; }
.category-list { display: grid; gap: 14px; }
.empty-note { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); padding: 20px; }

/* ARCHIVE + PAGES */
.page-head { padding: 54px 0 36px; background: radial-gradient(circle at top left, var(--brand-soft), transparent 42%), var(--surface); border-bottom: 1px solid var(--line); }
.page-head .container { text-align: center; }
.page-head span { color: var(--brand-2); font-weight: 900; letter-spacing: .13em; text-transform: uppercase; font-size: 12px; }
.page-head h1 { font-family: var(--font-news); font-size: clamp(38px, 6vw, 64px); line-height: .98; margin-top: 6px; letter-spacing: -.055em; }
.page-head p { color: var(--muted); font-weight: 700; margin-top: 10px; }
.archive-grid-wrap { padding: 38px 0 64px; }
.archive-layout .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-weight: 800; font-size: 14px; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.page-link:hover:not(.disabled) { border-color: var(--brand); color: var(--brand); }
.page-link.disabled { opacity: .38; pointer-events: none; }

/* SINGLE POST */
.post-detail { padding-bottom: 64px; }
.post-head-wrap { padding: 22px 0 24px; }
.post-header { text-align: center; max-width: 900px; margin: 0 auto; }
.post-header .category-pill { margin: 0 auto 14px; }
.post-header h1 { font-family: var(--font-news); font-size: clamp(38px, 7vw, 76px); line-height: .94; letter-spacing: -.065em; margin-bottom: 18px; }
.post-header p { color: var(--text-soft); font-size: clamp(17px, 2vw, 21px); max-width: 740px; margin: 0 auto; }
.post-byline { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 14px; font-weight: 700; }
.post-cover { width: min(100% - 32px, 1060px); margin: 10px auto 40px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface-3); }
.post-cover img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--narrow)) 300px; gap: 48px; align-items: start; justify-content: center; }
.article-sidebar { display: grid; gap: 22px; position: sticky; top: 24px; }
.article-main { min-width: 0; }
.post-content { color: var(--text-soft); font-size: 18px; line-height: 1.82; }
.post-content > * + * { margin-top: 1.35em; }
.post-content h2, .post-content h3, .post-content h4 { color: var(--text); scroll-margin-top: 48px; }
.post-content h2 { font-family: var(--font-news); font-size: clamp(30px, 4vw, 42px); line-height: 1.08; letter-spacing: -.04em; margin-top: 2em; }
.post-content h3 { font-size: 24px; line-height: 1.25; margin-top: 1.7em; }
.post-content h4 { font-size: 20px; margin-top: 1.5em; }
.post-content p { color: var(--text-soft); }
.post-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; font-weight: 700; }
.post-content ul, .post-content ol { padding-left: 1.3em; }
.post-content li { margin-top: .55em; }
.post-content blockquote { border-left: 4px solid var(--brand-2); padding: 8px 0 8px 22px; font-family: var(--font-news); color: var(--text); font-size: 24px; line-height: 1.35; }
.post-content img { border-radius: var(--radius); box-shadow: var(--shadow-md); margin: 2em auto; }
.post-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; color: var(--text); font-size: .88em; }
.post-content pre { overflow-x: auto; background: #020617; color: #e5e7eb; border-radius: var(--radius); padding: 20px; font-size: 14px; }
.post-content pre code { border: 0; background: transparent; padding: 0; color: inherit; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post-content th { background: var(--surface-2); color: var(--text); }
.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-tags a { border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); padding: 7px 12px; color: var(--text-soft); font-size: 13px; font-weight: 800; }
.post-tags a:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
.related-section { background: var(--surface-2); border-top: 1px solid var(--line); padding: 48px 0 70px; }

/* PLACEHOLDER IMAGES */
.thumb-placeholder { width: 100%; height: 100%; min-height: 150px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-soft), var(--surface-3)); color: var(--brand); }
.thumb-placeholder span { font-family: var(--font-news); font-size: clamp(42px, 8vw, 80px); font-weight: 800; }

/* FOOTER */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-top: 48px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, .7fr) minmax(180px, .7fr); gap: 34px; padding-bottom: 34px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.footer-logo-img { max-width: 190px; max-height: 62px; width: auto; height: auto; object-fit: contain; display: block; }
.footer-logo-mark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 900; box-shadow: 0 12px 30px rgba(30,64,175,.22); }
.footer-title { font-family: var(--font-news); font-size: 32px; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.footer-desc { color: var(--muted); margin-top: 14px; max-width: 520px; }
.site-footer h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; color: var(--brand-2); }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: var(--text-soft); font-weight: 700; }
.footer-links a:hover { color: var(--brand-2); }
.social-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.social-links a { color: var(--brand); font-weight: 900; }
.footer-bottom { border-top: 1px solid var(--line); min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 13px; font-weight: 700; flex-wrap: wrap; }

/* 404 */
.error-page { text-align: center; padding: 110px 0; }
.error-page h1 { font-family: var(--font-news); font-size: 112px; line-height: .9; letter-spacing: -.06em; color: var(--brand-2); }
.error-page p { color: var(--muted); font-size: 20px; margin: 16px 0 26px; }
.btn-home { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--text); color: var(--surface); min-height: 46px; padding: 10px 20px; font-weight: 900; }
.btn-home:hover { background: var(--brand-2); color: #fff; }

/* RESPONSIVE */
@media (max-width: 1080px) {
  .highlight-grid, .content-layout, .article-layout, .category-layout { grid-template-columns: 1fr; }
  .feature-card-premium { min-height: 480px; }
  .sidebar-column, .article-sidebar { position: static; }
  .sidebar-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-sidebar.tall { min-height: 260px; }
  .article-layout { max-width: var(--narrow); }
}

@media (max-width: 820px) {
  .container { width: min(100% - 24px, var(--maxw)); }
  .top-strip-inner { align-items: stretch; flex-direction: column; padding: 8px 0; gap: 8px; }
  .breaking { width: 100%; flex-basis: auto; }
  .top-actions { width: 100%; justify-content: space-between; }
  .header-inner { min-height: auto; padding: 18px 0; align-items: flex-start; flex-direction: column; gap: 16px; }
  .site-nav { width: 100%; justify-content: flex-start; gap: 16px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .highlight-side, .latest-grid, .post-grid, .related-grid, .archive-layout .post-grid, .sidebar-column, .footer-grid { grid-template-columns: 1fr; }
  .compact-headline { grid-template-columns: 112px minmax(0, 1fr); }
  .hero-kicker, .section-heading, .pagination, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .post-header h1 { font-size: clamp(34px, 11vw, 54px); }
  .post-content { font-size: 17px; }
}

@media (max-width: 520px) {
  body { font-size: 15.5px; }
  .category-bar-inner { gap: 14px; }
  .ad-slot { min-height: 84px; border-radius: 14px; }
  .feature-content { padding: 20px; }
  .feature-card-premium { min-height: 420px; border-radius: 20px; }
  .feature-content p { font-size: 16px; }
  .compact-headline { grid-template-columns: 1fr; }
  .compact-thumb { aspect-ratio: 16/9; }
  .card-title { font-size: 23px; }
  .post-cover img { aspect-ratio: 16/10; }
  .theme-toggle .toggle-text { display: inline; }
}

/* Custom HTML ads from admin */
.ad-slot.ad-custom {
  display: block;
  text-align: center;
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}
.ad-slot.ad-custom .ad-slot-inner {
  max-width: 100%;
  overflow: hidden;
}
.ad-slot.ad-custom iframe,
.ad-slot.ad-custom img,
.ad-slot.ad-custom ins {
  max-width: 100%;
}
