:root {
  --bg-color: #fcfcfc;
  --card-bg: #ffffff;
  --text-color: #1a1a1a;
  --text-muted: #555555;
  --border-color: #e0e0e0;
  --primary-color: #0b57d0;
  --primary-hover: #0842a0;
  --tag-bg: #eef3fc;
  --focus-ring: #0b57d0;
  --header-bg: #ffffff;
}

[data-theme="dark"] {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-color: #e3e3e3;
  --text-muted: #aaaaaa;
  --border-color: #333333;
  --primary-color: #8ab4f8;
  --primary-hover: #aecbfa;
  --tag-bg: #283347;
  --focus-ring: #8ab4f8;
  --header-bg: #181818;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.8;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.2s ease, color 0.2s ease;
}

a:focus, button:focus, [tabindex="0"]:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Audio Banner */
.audio-banner {
  background-color: #0b57d0;
  color: #ffffff;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.audio-banner button {
  background: #ffffff;
  color: #0b57d0;
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

/* Header & Controls - Non-Floating */
header {
  position: static !important;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

.nav-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-link {
  text-decoration: none;
}

.brand-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-color);
}

.controls-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ctrl-btn:hover {
  background-color: var(--tag-bg);
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #2e7d32;
}

.status-indicator.paused {
  background-color: #d32f2f;
}

/* Static Navigation Bar - Non-Floating */
.topics-nav-bar {
  position: static !important;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
}

.topics-nav-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.topic-nav-link {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
  background: var(--bg-color);
  color: var(--text-color);
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.topic-nav-link:hover,
.topic-nav-link.active {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* Content Area */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.2rem;
}

.content-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}

.article-header {
  margin-bottom: 1.2rem;
}

.article-title {
  font-size: 1.7rem;
  color: var(--text-color);
  line-height: 1.4;
}

.section-heading {
  font-size: 1.3rem;
  color: var(--text-color);
  margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.text-box {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1rem;
}

.item-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}

/* Cinema Grid for 30 Articles */
.cinema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.cinema-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cinema-card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--tag-bg);
  color: var(--primary-color);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
  width: fit-content;
}

.cinema-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.cinema-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.cinema-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: underline;
  width: fit-content;
}

/* Compliance Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  background-color: var(--card-bg);
  margin-top: 3.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.disclaimer-box {
  max-width: 800px;
  margin: 1.2rem auto 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}