/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */
:root {
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --radius: 12px;
  --shadow: 0 2px 6px rgba(0,0,0,0.08);
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 4rem;   /* Ensures bottom-nav lifts off the bottom */
}

/* ============================================
   HEADERS
   ============================================ */
header {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  text-align: left;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

header p {
  color: var(--muted);
  font-size: 1rem;
}

/* ============================================
   MAIN LAYOUT (80/20)
   ============================================ */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 4fr 1fr;   /* 80% / 20% */
  gap: 2rem;
  margin-bottom: 3rem;              /* Lifts bottom-nav */
}

/* Stack on mobile */
@media (max-width: 800px) {
  main {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   CARD COMPONENTS (Shortcuts pages)
   ============================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge {
  background: #dbeafe;
  color: #1e40af;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.intro-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

/* ============================================
   SHORTCUT TABLES
   ============================================ */
.shortcut-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.shortcut-table th {
  background: #eef2ff;
  color: #1e3a8a;
  text-align: left;
  padding: 0.6rem;
  font-size: 0.85rem;
}

.shortcut-table td {
  border: 1px solid #e5e7eb;
  padding: 0.6rem;
}

kbd {
  background: #e5e7eb;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: monospace;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  background: var(--card-bg);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: fit-content;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-list span {
  background: #f3f4f6;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #374151;
}

/* ============================================
   ARTICLE WRAPPER (Basics pages)
   ============================================ */
.article-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
}

.article-content p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.callout {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.callout strong {
  display: block;
  margin-bottom: 0.35rem;
}

/* ============================================
   ARTICLE NAVIGATION
   ============================================ */
.article-nav {
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.article-nav a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

.article-nav a:hover {
  text-decoration: underline;
}

/* ============================================
   BACK LINK
   ============================================ */
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* ============================================
   BOTTOM NAVIGATION (PILLS)
   ============================================ */
.bottom-nav {
  margin-top: 3rem;
  padding-top: 1rem;
  padding-bottom: 3rem;
  text-align: center;
}

.bottom-nav h3 {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.bottom-nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.bottom-nav .nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  color: #374151;
  background: #f9fafb;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bottom-nav .nav-links a:hover {
  background: #e0ebff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.bottom-nav .nav-links a.active {
  background: #1f6feb;
  color: #ffffff;
  border-color: #1f6feb;
}

/* -----------------------------------------
   MEDIUM INLINE AFFILIATE CHIPS (TV PAGE)
------------------------------------------*/
.tv-chip-row {
    display: inline-flex;
    gap: 8px;
    margin-left: 12px;   /* updated */
    vertical-align: middle;
}

.tv-chip {
    background: #2563eb;
    color: #fff;
    padding: 3px 7px;    /* updated */
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
}

.tv-chip:hover {
    background: #1e4fb8;
}
