/* ============================================================
   AI Storm Theme — Main Stylesheet
   Apple-inspired: clean, minimal, generous whitespace
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-dark: #1d1d1f;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-light: #e8f0fe;
  --red: #ff3b30;
  --green: #34c759;
  --border: #d2d2d7;
  --border-light: #f0f0f0;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', ui-monospace, 'Cascadia Code', monospace;
  --max-width: 1200px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); line-height: 1.75; }

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 100px 0; }
.section-sm { padding: 60px 0; }

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 56px;
}

/* ── Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: var(--text-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-logo .logo-icon svg { fill: white; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.nav-cta {
  background: var(--text-primary) !important;
  color: white !important;
  border-radius: 20px !important;
  padding: 8px 18px !important;
}

.nav-cta:hover { opacity: 0.85; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* ── Hero ── */
.hero {
  padding: 120px 0 100px;
  text-align: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,113,227,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  max-width: 800px;
  margin: 0 auto 24px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #0071e3, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  max-width: 560px;
  margin: 0 auto 48px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Stat Bar ── */
.stat-bar {
  background: var(--bg-secondary);
  padding: 48px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 24px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.stat-value.negative { color: var(--red); }
.stat-value.positive { color: var(--green); }
.stat-value.neutral  { color: var(--accent); }

.stat-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,113,227,0.3);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: #e8e8ed;
  color: var(--text-primary);
}

.btn-ghost {
  color: var(--accent);
  padding: 12px 0;
}

.btn-ghost svg {
  transition: transform 0.2s;
}

.btn-ghost:hover svg { transform: translateX(4px); }

/* ── Cards ── */
.card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-image {
  display: block;
  height: 220px;
  background: var(--bg-secondary);
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.card:hover .card-image img { transform: scale(1.04); }

.card-body { padding: 24px; }

.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.35;
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.card-meta-dot {
  width: 3px;
  height: 3px;
  background: var(--border);
  border-radius: 50%;
}

/* ── Section: Layoffs ── */
.layoffs-section { background: var(--bg-secondary); }

.data-panel {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.data-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.chart-placeholder {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  border: 2px dashed var(--border);
  flex-direction: column;
  gap: 12px;
}

.chart-placeholder svg { opacity: 0.3; }

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.mini-stat {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.mini-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.mini-stat-label {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 380px;
}

.layoffs-section .section-subtitle,
.jobs-section .section-subtitle,
.game-section .section-subtitle { max-width: none; }

/* ── Chart mode toggle (Stack by Industry / Country) ── */
.chart-mode-toggles {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.chart-mode-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: none;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.chart-mode-btn.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #fff;
}

.chart-mode-btn:hover:not(.active) {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* ── Trend toggle buttons ── */
.trend-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.trend-btn {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: none;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.trend-btn.active {
  background: var(--btn-color, var(--text-primary));
  border-color: var(--btn-color, var(--text-primary));
  color: #fff;
}

.trend-btn:hover:not(.active) {
  border-color: var(--btn-color, var(--text-primary));
  color: var(--btn-color, var(--text-primary));
}

/* ── Aggregation controls (Month / Year toggle) ── */
.agg-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}

.agg-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font);
  white-space: nowrap;
}

.agg-group {
  display: flex;
}

.agg-btn {
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.4;
}

.agg-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.agg-btn:last-child {
  border-radius: 0 6px 6px 0;
  border-left: none;
}

.agg-btn.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #fff;
}

.agg-btn:hover:not(.active) {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* ── Section: New Jobs ── */
.jobs-section { background: var(--bg); }

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split-layout.reverse { direction: rtl; }
.split-layout.reverse > * { direction: ltr; }

/* ── News Grid ── */
.news-section { background: var(--bg-secondary); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.post-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Job Listings ── */
.listings-section { background: var(--bg); }

.job-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
}

.job-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  transform: translateX(4px);
}

.job-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.job-info { flex: 1; }

.job-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.job-company {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.job-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  white-space: nowrap;
}

.tag.remote { background: #e8f5e9; color: #2e7d32; }
.tag.new    { background: var(--accent-light); color: var(--accent); }

.job-list { display: flex; flex-direction: column; gap: 12px; }

/* ── Footer ── */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand p {
  font-size: 0.9rem;
  margin-top: 16px;
  color: rgba(255,255,255,0.5);
  max-width: 280px;
  line-height: 1.6;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.03em;
}

.footer-col h4 {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }

.footer-col a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: var(--transition);
}

.footer-col a:hover { color: white; }

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

/* ── Single Post ── */
.post-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border-light);
}

.post-hero .container { max-width: 900px; }

.post-body {
  padding: 60px 0 100px;
}

.post-body .container {
  max-width: 900px;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content h2 { font-size: 1.8rem; margin: 48px 0 20px; }
.post-content h3 { font-size: 1.35rem; margin: 36px 0 16px; }
.post-content p  { margin-bottom: 24px; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 24px; }
.post-content li { margin-bottom: 8px; }

.source-cta {
  margin-top: 40px;
  text-align: center;
}
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-content pre {
  background: var(--bg-dark);
  color: #e8e8ed;
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 24px;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.post-meta-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.post-category-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
}

.post-date {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* ── 404 ── */
.error-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--bg-secondary);
  line-height: 1;
  margin-bottom: 0;
}

/* ── Archive ── */
.archive-header {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border-light);
}

.archive-header h1 { margin-bottom: 12px; }

.archive-body { padding: 60px 0; }

/* ── Table search bar ── */
.table-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 980px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

.country-filter {
  width: 18ch;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 980px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236e6e73' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.country-filter:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

/* ── Table meta / count ── */
.table-meta {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

/* ── Data table ── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.data-table th.col-num,
.data-table td.col-num {
  text-align: right;
}

.data-table th.col-date,
.data-table td.col-date {
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.data-table tbody tr:last-child { border-bottom: none; }

.data-table tbody tr:hover { background: var(--bg-secondary); }

.data-table td {
  padding: 14px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table td a {
  color: var(--text-primary);
  font-weight: 500;
}

.data-table td a:hover { color: var(--accent); }

/* ── No results ── */
.no-results {
  text-align: center;
  padding: 80px 0;
  color: var(--text-secondary);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 64px;
}

.page-numbers {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--text-primary);
  color: white;
}

/* ── Widgets / Sidebar ── */
.widget-area { display: flex; flex-direction: column; gap: 32px; }

.widget {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 28px;
}

.widget-title {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split-layout { grid-template-columns: 1fr; gap: 48px; }
  .split-layout.reverse { direction: ltr; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .post-grid { grid-template-columns: 1fr; }
  .post-grid.cols-2 { grid-template-columns: 1fr; }
  .post-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    align-items: center;
    align-content: flex-start;
  }
  .site-logo {
    height: 64px;
    display: flex;
    align-items: center;
  }
  .menu-toggle {
    display: flex;
    align-items: center;
    height: 64px;
    margin-left: auto;
  }
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
    border-top: 1px solid var(--border-light);
    padding: 12px 0 16px;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 2px;
  }
  .main-nav li { width: 100%; }
  .main-nav a {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius);
  }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .mini-stats { grid-template-columns: 1fr; }
  .data-panel { padding: 24px; }
  .hero { padding: 80px 0 64px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .post-grid.cols-4 { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

/* ── Sortable table column headers ── */
.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  font-weight: 500;
}
.sort-link:hover { color: var(--text-primary); }
.sort-link.active { color: var(--text-primary); }
.sort-icon { font-size: 1em; opacity: 0.35; }
.sort-link.active .sort-icon { opacity: 1; }

/* ── Archive disclaimer (jobs page) ── */
.archive-disclaimer {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-secondary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.archive-disclaimer strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* ── Site-wide disclaimer strip ── */
.site-disclaimer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 28px 0;
}
.site-disclaimer p {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.8;
  margin: 0;
}
.site-disclaimer strong {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* ── Cookie consent banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  padding: 20px 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-banner--hiding {
  opacity: 0;
  transform: translateY(100%);
}
.cookie-banner__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner__text {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
.cookie-banner__link {
  color: var(--accent);
  text-decoration: underline;
  margin-left: 4px;
}
.cookie-banner__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.cookie-banner__btn {
  white-space: nowrap;
}
