* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #f8fbff;
  --text: #102033;
  --muted: #5a6b7d;
  --border: #d7e2ee;
  --accent: #0f766e;
  --accent-2: #1d4ed8;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.06), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  color: var(--text);
  line-height: 1.7;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(215, 226, 238, 0.9);
}

.site-footer {
  background: #0f172a;
  color: #dbe7f5;
  margin-top: 56px;
}

.site-footer a {
  color: #93c5fd;
}

.header-inner,
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  flex-wrap: wrap;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.18rem;
}

.brand-tag,
.footer-title {
  margin: 4px 0 0;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-title {
  font-weight: 700;
  color: #ffffff;
}

.site-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-nav a,
a {
  color: var(--accent-2);
  text-decoration: none;
}

.site-nav a:hover,
a:hover {
  text-decoration: underline;
}

.main-content {
  padding: 36px 0 56px;
}

.hero,
.page-copy,
.category-page,
.article-page {
  margin-bottom: 32px;
}

.hero,
.page-copy,
.category-page,
.article-page,
.article-card,
.category-card {
  border-radius: 24px;
}

.hero,
.page-copy,
.category-page,
.article-page {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px;
}

.hero-home,
.category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: center;
}

.hero-visual,
.category-card-media img,
.article-card-image,
.article-hero-media img {
  margin: 0;
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.hero-visual img,
.category-card-media img,
.article-card-image,
.article-hero-media img {
  object-fit: cover;
}

.hero-visual img {
  max-height: 360px;
  aspect-ratio: 16 / 10;
}

.category-card-media img {
  height: 180px;
}

.article-card-image,
.article-hero-media img {
  aspect-ratio: 16 / 9;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-intro,
.article-dek,
.meta,
.article-meta {
  color: var(--muted);
}

.category-grid,
.article-list {
  display: grid;
  gap: 18px;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 32px;
}

.article-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.article-card,
.category-card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
}

.category-hero {
  margin-bottom: 24px;
}

.category-hero-copy {
  max-width: 62ch;
}

.category-card-media {
  overflow: hidden;
  padding: 0;
}

.category-card-media div {
  padding: 18px 20px 20px;
}

.article-card-image {
  margin-bottom: 14px;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.article-hero-media {
  margin: 0;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.article-layout > div {
  min-width: 0;
  max-width: 72ch;
}

.article-sidebar {
  min-width: 0;
}

.article-body h2,
.article-body h3 {
  margin-top: 32px;
  color: #0f172a;
}

.article-body p,
.article-body li {
  max-width: 72ch;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
}

.section-heading {
  margin-bottom: 16px;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  background: var(--accent-2);
  color: #ffffff;
}

.button-secondary {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
}

.panel-section {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 32px;
}

.ad-slot {
  display: none;
  margin: 24px 0;
  min-height: 0;
}

.ad-slot-group {
  margin: 24px 0;
}

.ad-slot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ad-slot-group .ad-slot {
  margin: 0;
}

.ad-slot.is-active {
  display: block;
}

.ad-slot a {
  color: inherit;
}

.ad-slot .empire-ad,
.ad-slot .yt-channel-ad {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
}

.ad-slot img,
.ad-slot .empire-ad-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.ad-slot .yt-channel-ad-icon {
  width: 56px;
  height: 56px;
}

.ad-slot .yt-channel-ad-icon svg {
  width: 100%;
  height: 100%;
}

.article-layout .ad-slot-row {
  max-width: 72ch;
}

.article-layout .ad-slot .empire-ad,
.article-layout .ad-slot .yt-channel-ad {
  padding: 12px;
}

.article-layout .ad-slot img,
.article-layout .ad-slot .empire-ad-img {
  height: 140px;
}

.article-sidebar .ad-slot.is-active {
  position: sticky;
  top: 88px;
}

.panel-accent {
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.decision-grid,
.feature-grid {
  display: grid;
  gap: 18px;
}

.decision-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.decision-card,
.feature-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel-2);
  padding: 20px;
}

.decision-card ul {
  padding-left: 20px;
}

@media (max-width: 860px) {
  .ad-slot-row {
    grid-template-columns: 1fr;
  }

  .hero-home,
  .category-hero,
  .article-hero,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-layout > div,
  .article-layout .ad-slot-row {
    max-width: 100%;
  }
}

/* hero without a picture: let the text use the full width */
.article-hero:not(:has(.article-hero-media)) { grid-template-columns: 1fr; }

/* related articles block under each article */
.related-articles { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.related-articles h2 { margin: 0 0 14px; font-size: 1.25rem; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.related-list li { display: grid; gap: 4px; }
.related-list a { font-weight: 700; }
.related-list span { color: var(--muted, inherit); font-size: 0.95rem; opacity: 0.85; }

/* tables: scroll sideways on small screens, readable borders */
.table-scroll { overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch; }
.table-scroll table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.table-scroll th, .table-scroll td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; }
.table-scroll th { background: var(--panel-2); font-weight: 700; }
.table-scroll tbody tr:nth-child(even) td { background: var(--panel-2); }
@media (max-width: 520px) {
  .table-scroll table { font-size: 0.82rem; }
  .table-scroll th, .table-scroll td { padding: 5px 4px; }
}

/* links inside running text are underlined so they do not rely on color alone */
.article-body a, .page-copy a, .category-intro a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* footer topics row */
.footer-links p { margin: 0 0 8px; }
.footer-topics { font-size: 0.92rem; }
