/* CompliantTheme — content-first layout for sites pending AdSense review:
   clear navigation, generous reading width, no promotional chrome competing
   with the article content. Kept as an external stylesheet (no inline
   style="" attributes, no embedded <style> blocks) so a strict CSP can be
   applied to this theme without an 'unsafe-inline' style-src exception. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body    { font-family: 'Inter', sans-serif; color: var(--color-text, #1f2328); background: #fff; line-height: 1.5; }
a       { color: var(--color-primary, #1a5cff); text-decoration: none; }
a:hover { text-decoration: underline; }
img     { max-width: 100%; height: auto; display: block; }

/* ── Header / nav ─────────────────────────────────────────────────────── */
.ct-header {
  border-bottom: 1px solid #e6e8eb;
  padding: 18px 24px;
  display: flex; align-items: center; gap: 24px;
}
.ct-logo {
  font-family: 'Source Serif 4', serif;
  font-size: 22px; font-weight: 700;
  color: var(--color-text, #1f2328);
}
.ct-logo img { height: 36px; width: auto; }

.ct-nav { margin-left: auto; display: flex; gap: 4px; }
.ct-nav a {
  color: #444; font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 6px;
}
.ct-nav a:hover { background: #f2f4f6; text-decoration: none; }

.ct-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.ct-hamburger span { display: block; width: 22px; height: 2px; background: #333; margin: 5px 0; border-radius: 2px; }

/* ── Page shell ───────────────────────────────────────────────────────── */
.ct-wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.ct-main { padding: 40px 0 72px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.ct-footer { border-top: 1px solid #e6e8eb; padding: 32px 24px; margin-top: 40px; }
.ct-footer-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.ct-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid #e6e8eb; }
.ct-footer-links a { color: #555; font-size: 13px; }
.ct-footer-copy { font-size: 12px; color: #666; }

/* ── Flash messages ───────────────────────────────────────────────────── */
.ct-flash { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; }
.ct-flash.danger  { background: #fce8e6; color: #c5221f; border-left: 3px solid #c5221f; }
.ct-flash.success { background: #e6f4ea; color: #137333; border-left: 3px solid #137333; }
.ct-flash.info    { background: #e8f0fe; color: #1558d6; border-left: 3px solid #1558d6; }

/* ── Page headers (home hero / category header) ──────────────────────── */
.ct-hero        { margin-bottom: 36px; }
.ct-hero-title  { font-family: 'Source Serif 4', serif; font-size: clamp(24px, 4vw, 34px); font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
.ct-hero-sub    { font-size: 15.5px; color: #555; max-width: 640px; }

.ct-cat-header  { margin-bottom: 32px; }
.ct-breadcrumb  { font-size: 13px; color: #666; margin-bottom: 12px; }
.ct-breadcrumb a{ color: #666; }
.ct-cat-title   { font-family: 'Source Serif 4', serif; font-size: clamp(22px, 3.5vw, 30px); font-weight: 700; margin-bottom: 6px; }
.ct-cat-count   { font-size: 14px; color: #666; }

/* ── Article list (shared by home + category pages) ──────────────────── */
.ct-article-list      { display: flex; flex-direction: column; gap: 28px; }
.ct-article-row        { display: flex; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid #eee; }
.ct-article-thumb-link { flex: 0 0 160px; }
.ct-article-thumb      { width: 160px; height: 110px; object-fit: cover; border-radius: 8px; }
.ct-article-body       { flex: 1; min-width: 0; }
.ct-article-cat        { display: inline-block; color: var(--color-primary, #1a5cff); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.ct-article-title      { font-family: 'Source Serif 4', serif; font-size: 19px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.ct-article-title a    { color: #1f2328; }
.ct-article-excerpt    { font-size: 14px; color: #666; line-height: 1.6; }

.ct-empty   { text-align: center; padding: 80px 20px; color: #666; }
.ct-empty p { font-size: 15px; }

/* ── Article page ─────────────────────────────────────────────────────── */
.ct-article-wrap { max-width: 720px; margin: 0 auto; }
.ct-banner        { width: 100%; border-radius: 10px; margin-bottom: 28px; max-height: 420px; object-fit: cover; }
.ct-article-h1    { font-family: 'Source Serif 4', serif; font-size: clamp(22px, 3.5vw, 32px); font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.ct-article-lede  { font-size: 16.5px; color: #555; line-height: 1.6; margin-bottom: 20px; }
.ct-article-meta  { font-size: 12.5px; color: #666; margin-bottom: 32px; padding: 10px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.ct-article-meta a{ color: #666; text-decoration: none; }
.ct-hidden        { display: none; }

.article-body            { font-size: 16px; color: #2a2f34; }
.article-body h2         { font-size: 21px; font-weight: 700; margin: 30px 0 12px; font-family: 'Source Serif 4', serif; }
.article-body h3         { font-size: 17px; font-weight: 600; margin: 22px 0 10px; }
.article-body p          { margin-bottom: 18px; line-height: 1.8; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li         { margin-bottom: 6px; line-height: 1.7; }
.article-body blockquote {
  border-left: 3px solid var(--color-primary, #1a5cff);
  padding: 10px 18px; margin: 22px 0;
  background: #f7f8fa; border-radius: 0 6px 6px 0;
  font-style: italic; color: #555;
}
.article-body img { border-radius: 8px; margin: 22px auto; }

/* ── Responsive nav ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ct-hamburger { display: block; }
  .ct-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1); z-index: 200;
    border-bottom: 1px solid #e6e8eb;
  }
  .ct-nav.open { display: flex; }
  .ct-header { position: relative; flex-wrap: wrap; }
}
