/* ==========================================================================
   COMPONENTS - Consolidated
   Contains: header, tabs, status-indicators, evidence-preview, feed-cards,
   featured-section, section-headers, emoji-fixes, click-feedback, skeleton,
   focus-styles, lazy-loading, performance, mobile-adjustments
   ========================================================================== */

/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
    background: var(--page-bg);
    color: #2d2d2d;
    padding: 18px 36px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: none;
    height: auto;
    min-height: 88px;
    position: fixed;
    left: 0; right: 0;
    top: 0;
    z-index: 100;
    box-sizing: border-box;
    overflow: visible;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.header.header-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.header h1 {
    margin: 0;
    font-size: 1.75rem;
    color: #2d2d2d;
    font-weight: var(--weight-black);
    font-family: 'Fungis Grotesque', serif;
    cursor: pointer;
    transition: color 0.15s;
}

.header h1:hover { color: #007CAF; }

.logo-section {
    display: flex;
    align-items: center;
    margin-top: 0;
    align-self: center;
}

.logo-section img {
    height: 56px;
    width: auto;
    margin-right: 8px;
    object-fit: contain;
    display: block;
    transform: translateY(var(--logo-align-offset, -4px));
    will-change: transform;
}

.logo-section h1 {
    font-family: 'Fungis Grotesque', serif;
    font-weight: 900;
    font-synthesis: weight style;
    font-size: 36px;
    margin-top: 0px;
    letter-spacing: -0.03em;
    line-height: 1;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    text-rendering: geometricPrecision;
    text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
    paint-order: stroke fill;
    -webkit-text-stroke: 0.3px currentColor;
}

.content-container {
    position: relative;
    left: auto;
    transform: translateY(var(--nav-align-offset, 0px));
    justify-self: center;
    height: 100%;
    display: flex;
    align-items: center;
    align-self: center;
    will-change: transform;
}

.nav-bubble {
    display: inline-flex;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 6px;
    margin-bottom: 0;
    margin-top: 0;
    justify-content: center;
    align-items: center;
    height: 56px;
    box-sizing: border-box;
}

.nav-bubble button {
    background-color: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-radius: 30px;
    padding: 8px 18px;
    font-weight: var(--weight-medium);
    color: #52667a;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    box-sizing: border-box;
    line-height: 1;
    min-width: 62px;
    font-family: 'Noto Color Emoji', var(--font-family-inter), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.nav-bubble button[data-emoji="🔍"]::before {
    filter: hue-rotate(260deg) saturate(1.3) brightness(0.9);
}

.nav-bubble button[data-emoji="👤"]::before {
    filter: saturate(0.3) brightness(0.8);
}

.nav-bubble button[data-emoji="⚖️"]::before {
    filter: hue-rotate(45deg) saturate(1.4) brightness(1.2);
}

@media (max-width: 768px) {
    .header { padding: 0 16px; }
    .header h1 { font-size: 26px; }
    .header-tab { padding: 6px 12px; font-size: 14px; }
}

/* ==========================================================================
   TABS
   ========================================================================== */

.figure-tabs {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--ui-border);
}

.tab {
    padding: 12px 8px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.15s ease;
}

.tab.active {
    color: #007CAF;
    border-bottom: 2px solid #007CAF;
}

.tab:hover:not(.active) { color: #333; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.tabs-container { display: flex; gap: 24px; }

.header-tabs {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-tab {
    padding: 8px 16px;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.15s;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    gap: 6px;
}

.header-tab span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-tab.active {
    color: #007CAF;
    background-color: rgba(0,124,175,0.08);
}

.header-tab:hover:not(.active) {
    background-color: rgba(0,0,0,0.05);
}

/* ==========================================================================
   STATUS INDICATORS
   ========================================================================== */

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: -0.005em;
    text-transform: capitalize;
    font-family: var(--font-family-inter);
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(255,255,255,0.2);
    opacity: 0.92;
    height: 26px;
    line-height: 18px;
}

.chip {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  text-transform: capitalize;
  font-family: var(--font-family-inter);
  display: inline-block;
  margin-left: 12px;
  vertical-align: middle;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(255,255,255,0.2);
  opacity: 0.92;
  height: 26px;
  line-height: 18px;
}

.chip--leading { margin-left: 0; margin-right: 12px; }
.chip--page { height: 32px; padding: 8px 16px; }
.chip--claim { height: 28px; padding: 6px 14px; }
.chip--micro { height: 20px; padding: 2px 10px; opacity: 0.8; }

.chip-true { background-color: var(--chip-true-base); color: var(--chip-true-text); border: none; }
.chip-mostly-true { background-color: var(--chip-mostly-true-base); color: var(--chip-mostly-true-text); border: none; }
.chip-mixed { background-color: var(--chip-mixed-base); color: var(--chip-mixed-text); border: none; }
.chip-mostly-false { background-color: var(--chip-mostly-false-base); color: var(--chip-mostly-false-text); border: none; }
.chip-false { background-color: var(--chip-false-base); color: var(--chip-false-text); border: none; }
.chip-unverifiable { background-color: var(--chip-unverifiable-base); color: var(--chip-unverifiable-text); border: none; }

.status-verified, .status-true {
    background-color: var(--status-verified-bg-tint);
    color: var(--status-verified-text);
    border-color: var(--status-verified-border);
}

.status-disputed, .status-false, .status-misleading {
    background-color: var(--status-disputed-bg-tint);
    color: var(--status-disputed-text);
    border-color: var(--status-disputed-border);
}

.status-under-review {
    background-color: var(--status-under-review-bg-tint);
    color: var(--status-under-review-text);
    border-color: var(--status-under-review-border);
}

.status-pill {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    white-space: nowrap;
    margin-right: 8px;
    font-family: var(--font-family-inter);
    letter-spacing: 0.01em;
    text-transform: lowercase;
}

/* Thematic pills */
.accuracy-high { background-color: #e3f6e8; color: #2a6b3c; }
.accuracy-moderate { background-color: #fff1d6; color: #7c6332; }
.accuracy-low { background-color: #ffe8e8; color: #9e3b3b; }
.activity-high { background-color: #e6f0ff; color: #2a5396; }
.activity-moderate { background-color: #f0f0f0; color: #555555; }
.evidence-strong { background-color: #e3f6e8; color: #2a6b3c; }
.evidence-mixed { background-color: #fff1d6; color: #7c6332; }
.evidence-weak { background-color: #ffe8e8; color: #9e3b3b; }
.consensus-broad { background-color: #e3f6e8; color: #2a6b3c; }
.consensus-mixed { background-color: #fff1d6; color: #7c6332; }
.consensus-limited { background-color: #ffe8e8; color: #9e3b3b; }
.reasoning-strong { background-color: #e3f6e8; color: #2a6b3c; }
.reasoning-moderate { background-color: #fff1d6; color: #7c6332; }
.reasoning-limited { background-color: #ffe8e8; color: #9e3b3b; }
.agreement-broad { background-color: #e3f6e8; color: #2a6b3c; }
.agreement-mixed { background-color: #fff1d6; color: #7c6332; }
.agreement-contested { background-color: #ffe8e8; color: #9e3b3b; }

.card-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }

/* Chip labels via pseudo-elements */
.status-verified, .chip-true { font-size: 0; }
.status-verified::after, .chip-true::after {
  content: "verified";
  font-family: var(--font-family-inter);
  font-weight: 650;
  font-size: 0.75rem;
  letter-spacing: -0.005em;
  text-transform: capitalize;
}

.status-disputed, .chip-false { font-size: 0; }
.status-disputed::after, .chip-false::after {
  content: "false";
  font-family: var(--font-family-inter);
  font-weight: 650;
  font-size: 0.75rem;
  letter-spacing: -0.005em;
  text-transform: capitalize;
}

.status-mixed, .chip-mixed { font-size: 0; }
.status-mixed::after, .chip-mixed::after {
  content: "mixed";
  font-family: var(--font-family-inter);
  font-weight: 650;
  font-size: 0.75rem;
  letter-spacing: -0.005em;
  text-transform: capitalize;
}

.status-mostly-true, .chip-mostly-true { font-size: 0; }
.status-mostly-true::after, .chip-mostly-true::after {
  content: "mostly true";
  font-family: var(--font-family-inter);
  font-weight: 650;
  font-size: 0.75rem;
  letter-spacing: -0.005em;
  text-transform: capitalize;
}

.status-mostly-false, .chip-mostly-false { font-size: 0; }
.status-mostly-false::after, .chip-mostly-false::after {
  content: "mostly false";
  font-family: var(--font-family-inter);
  font-weight: 650;
  font-size: 0.75rem;
  letter-spacing: -0.005em;
  text-transform: capitalize;
}

.status-under-review, .chip-unverifiable { font-size: 0; }
.status-under-review::after, .chip-unverifiable::after {
  content: "unverified";
  font-family: var(--font-family-inter);
  font-weight: 650;
  font-size: 0.75rem;
  letter-spacing: -0.005em;
  text-transform: capitalize;
}

.chip--page::after { font-size: 0.875rem; font-weight: 700; }
.chip--claim::after { font-size: 0.8125rem; font-weight: 650; }
.chip--micro::after { font-size: 0.6875rem; font-weight: 600; opacity: 0.9; }

.claim-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.claim-row .chip { margin: 2px 10px 0 0; }

/* ==========================================================================
   EVIDENCE PREVIEW
   ========================================================================== */

:root {
  --color-text-primary: #2d2d2d;
  --color-text-secondary: #5a5a5a;
  --color-border: #e5e7eb;
  --color-background-light: #f5f5f5;
  --color-primary: #007CAF;
  --color-primary-dark: #005a80;
  
  --color-verified-bg: #b6e4d1;
  --color-verified-text: #1b4637;
  --color-needs-evidence-bg: #ffeecc;
  --color-needs-evidence-text: #665201;
  --color-disputed-bg: #ffc8dd;
  --color-disputed-text: #813c47;
  --color-under-review-bg: #90dcff;
  --color-under-review-text: #0b71a7;
  
  --color-why-it-matters-bg: #e7f4ea;
  --color-context-bg: #e7f2f9;
  --color-core-claim-bg: #f0e7f9;
  --color-supporting-bg: #faf0e6;
}

.evidence-preview {
  position: relative;
  padding: 24px;
  background-color: var(--color-background-light);
  border-radius: 12px;
  margin-left: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 32px;
  border: none;
}

@media (min-width: 1024px) { .evidence-preview { padding: 20px 24px; } }
@media (max-width: 700px) { .evidence-preview { padding: 16px; } }

.evidence-title {
  font-weight: 600;
  font-size: 0;
  color: var(--text-hook-label);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  opacity: 0.7;
}

.evidence-title::before {
  content: "What we found";
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-hook-label);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 1;
}

.evidence-title.context::before { content: "The real story"; font-size: 0.7rem; font-weight: 600; color: var(--text-hook-label); text-transform: uppercase; letter-spacing: 0.02em; opacity: 1; }
.evidence-title.analysis::before { content: "Breaking it down"; font-size: 0.7rem; font-weight: 600; color: var(--text-hook-label); text-transform: uppercase; letter-spacing: 0.02em; opacity: 1; }
.evidence-title.data::before { content: "What the data shows"; font-size: 0.7rem; font-weight: 600; color: var(--text-hook-label); text-transform: uppercase; letter-spacing: 0.02em; opacity: 1; }
.evidence-title.findings::before { content: "The facts say..."; font-size: 0.7rem; font-weight: 600; color: var(--text-hook-label); text-transform: uppercase; letter-spacing: 0.02em; opacity: 1; }

.expand-button {
  font-size: 14px;
  color: var(--color-primary);
  background: none;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  margin-left: -6px;
  font-weight: var(--weight-medium);
}

.expand-button:hover { background-color: rgba(0, 124, 175, 0.08); text-decoration: none; }

.expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  transition: transform 0.3s ease;
  font-size: 14px;
}

.expanded .expand-icon { transform: rotate(180deg); }

.evidence-details {
  display: none;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.expanded .evidence-details { display: block; }

.evidence-source { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 8px; }

.evidence-stats { display: flex; gap: 16px; font-size: 14px; color: var(--color-text-secondary); }
.evidence-stats span { display: flex; align-items: center; }
.evidence-stats .icon { margin-right: 4px; }

.demo-container {
  padding: 24px;
  border: none;
  border-radius: 12px;
  margin-bottom: 24px;
  background-color: var(--color-background-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.demo-controls { margin-bottom: 24px; display: flex; gap: 16px; }

.demo-button {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.demo-button:hover { background-color: var(--color-primary-dark); }

.claim-section { margin-bottom: 24px; }

.claim-container { position: relative; margin-bottom: 16px; }

.claim-content { font-size: 18px; font-weight: 500; margin-bottom: 16px; line-height: 1.5; }

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.evidence-controls { display: flex; gap: 10px; margin-top: 20px; }

.evidence-control-btn {
  padding: 8px 16px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.evidence-control-btn:hover { background-color: #e0e0e0; }

/* ==========================================================================
   FEED CARDS
   ========================================================================== */

.feed-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
}

.page-header { margin-bottom: 24px; }

.page-title {
  font-family: var(--font-family-outfit);
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: balance;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-headline);
}

.page-subtitle { font-size: 16px; color: #6b7280; }

.card {
  background-color: var(--card-bg, #ffffff);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.featured-large.card { padding: 0; }
.featured-large .card-image { margin-bottom: 0; }
.featured-large .card-content { padding: 24px; }

.card-image img { display: block; width: 100%; height: auto; }

.card-content { display: flex; flex-direction: column; }

.card-meta {
  font-family: var(--font-family-inter);
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.card-title {
  font-family: var(--font-family-outfit);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  color: var(--text-card-title);
}

.featured-large .card-title { font-size: 1.5rem; }

.card-excerpt {
  font-family: var(--font-family-inter);
  font-size: 15px;
  color: #4b5563;
  line-height: 1.5;
}

.empty-state { text-align: center; padding: 48px; color: #6b7280; }

/* ==========================================================================
   FEATURED SECTION
   ========================================================================== */

.featured-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.featured-large {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.featured-column > .featured-medium:first-child { grid-column: 2; grid-row: 1; }
.featured-column > .featured-medium:last-child { grid-column: 2; grid-row: 2; }
.featured-column { display: contents; }

.featured-large.card,
.featured-medium.card {
  padding: 24px;
  box-shadow: none !important;
}

.featured-large.card:hover,
.featured-medium.card:hover {
  box-shadow: none !important;
}

@media (max-width: 768px) {
  .featured-section { grid-template-columns: 1fr; }
  
  .featured-large,
  .featured-column > .featured-medium:first-child,
  .featured-column > .featured-medium:last-child {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */

.section-header {
  display: flex;
  align-items: center;
  font-family: var(--font-family-outfit);
  font-weight: var(--weight-semibold);
  font-size: 13px;
  color: var(--text-hook-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 32px;
  margin-bottom: 16px;
}

.section-header .chip { margin-left: 10px; margin-top: 0; margin-bottom: 0; }

.section-header:first-of-type {
  margin-top: 0;
  background: none;
  border: none;
  padding: 0;
}

.section-header .verdict-label {
  margin-left: 8px;
  font-family: var(--font-family-inter);
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11.5px;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.section-header .verdict-label::before { content: " · "; opacity: 0.6; margin-right: 6px; }

.section-header .verdict-true { background-color: var(--chip-true-base); color: var(--chip-true-text); }
.section-header .verdict-mostly-true { background-color: var(--chip-mostly-true-base); color: var(--chip-mostly-true-text); }
.section-header .verdict-mixed { background-color: var(--chip-mixed-base); color: var(--chip-mixed-text); }
.section-header .verdict-mostly-false { background-color: var(--chip-mostly-false-base); color: var(--chip-mostly-false-text); }
.section-header .verdict-false { background-color: var(--chip-false-base); color: var(--chip-false-text); }
.section-header .verdict-unverifiable { background-color: var(--chip-unverifiable-base); color: var(--chip-unverifiable-text); }

.hook-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  color: var(--text-hook-label);
  text-transform: uppercase;
  font-family: var(--font-family-outfit);
}

.section-header .icon,
.section-header .emoji,
.hook-emoji {
  margin-right: 8px;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji" !important;
  font-style: normal;
  font-weight: normal;
  color: initial !important;
  -webkit-text-fill-color: initial !important;
  filter: none !important;
}

.section-content { margin-bottom: 24px; padding: 0; }
.section-nested { margin-left: 0; padding-left: 0; border-left: none; }
.section-content-bg { background-color: transparent; }

/* ==========================================================================
   EMOJI FIXES
   ========================================================================== */

.icon, 
.emoji,
.hook-emoji,
.expand-icon,
.section-header .icon,
.section-header .emoji,
.nav-bubble button::before,
[data-emoji]::before {
    font-family: "Noto Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji" !important;
    font-variant-emoji: emoji;
    font-style: normal !important;
    font-weight: normal !important;
    line-height: 1 !important;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@supports (-webkit-appearance: none) {
    .icon::before, .emoji::before, [data-emoji]::before { content: attr(data-emoji); }
}

.nav-bubble button { position: relative; }
.nav-bubble button::before { position: relative; z-index: 1; vertical-align: middle; }

.section-header .icon, .section-header .emoji {
    vertical-align: text-bottom;
    width: 1.2em;
    height: 1.2em;
    text-align: center;
}

.evidence-stat span, .claim-content .chip { vertical-align: baseline; }

@media screen and (-webkit-min-device-pixel-ratio:0) and (min-resolution:.001dpcm) {
    .icon, .emoji, [data-emoji]::before {
        font-family: "Segoe UI Emoji", "Noto Color Emoji" !important;
    }
}

@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .icon, .emoji, [data-emoji]::before {
            font-family: "Apple Color Emoji", "Noto Color Emoji" !important;
            -webkit-text-fill-color: initial !important;
        }
    }
}

/* ==========================================================================
   CLICK FEEDBACK
   ========================================================================== */

.feed-card.pressed,
.featured-large.pressed,
.featured-medium.pressed,
.nav-tab.pressed,
.expand-button.pressed {
  transform: scale(0.98);
  transition: transform 0.1s ease-out;
}

.feed-card,
.featured-large,
.featured-medium,
.nav-tab,
.expand-button {
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  will-change: transform, box-shadow;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.feed-card:hover,
.featured-large:hover,
.featured-medium:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feed-card:active,
.featured-large:active,
.featured-medium:active {
  transform: scale(0.98);
  transition: transform 0.05s ease-out;
}

/* ==========================================================================
   SKELETON
   ========================================================================== */

.skeleton-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  margin-bottom: 12px;
}

.skeleton-title {
  height: 20px;
  width: 70%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  margin-bottom: 16px;
}

.skeleton-text {
  height: 14px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

.skeleton-text:last-child { width: 80%; }

.skeleton-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  margin-bottom: 16px;
}

.skeleton-meta {
  height: 10px;
  width: 40%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  margin-bottom: 12px;
}

.animate-pulse .skeleton-line,
.animate-pulse .skeleton-title,
.animate-pulse .skeleton-text,
.animate-pulse .skeleton-image,
.animate-pulse .skeleton-meta {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.skeleton-featured-large,
.skeleton-featured-medium {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.skeleton-feed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.skeleton-featured-section { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-bottom: 40px; }

@media (max-width: 700px) {
  .skeleton-feed-grid, .skeleton-featured-section { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FOCUS STYLES
   ========================================================================== */

*:focus { outline: none; }

.feed-card:focus-visible,
.featured-large:focus-visible,
.featured-medium:focus-visible {
  outline: 2px solid var(--decode-accent, #7C3AED);
  outline-offset: 4px;
}

.nav-tab:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 24px;
}

button:focus-visible, .expand-button:focus-visible {
  outline: 2px solid var(--color-primary, #007CAF);
  outline-offset: 2px;
}

.tab:focus-visible {
  outline: 2px solid var(--color-primary, #007CAF);
  outline-offset: -2px;
}

a:focus-visible {
  outline: 2px solid var(--color-primary, #007CAF);
  outline-offset: 2px;
  text-decoration: underline;
}

.logo-section:focus-visible {
  outline: 2px solid var(--decode-accent, #7C3AED);
  outline-offset: 4px;
  border-radius: 8px;
}

.feed-card, .featured-large, .featured-medium, .logo-section {
  cursor: pointer;
  position: relative;
}

.page-container.decode .feed-card:focus-visible { outline-color: var(--decode-accent, #7C3AED); }
.page-container.figures .feed-card:focus-visible { outline-color: var(--figures-accent, #6B7280); }
.page-container.arguments .feed-card:focus-visible { outline-color: var(--arguments-accent, #DC2626); }

/* ==========================================================================
   LAZY LOADING
   ========================================================================== */

img.lazy-loading {
  opacity: 0.7;
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
}

img.lazy-loaded { opacity: 1; }
img.lazy-error { opacity: 0.5; filter: grayscale(100%); }
img[data-placeholder] { will-change: filter, transform; }

.lazy-image-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   PERFORMANCE
   ========================================================================== */

.feed-card, .featured-large, .featured-medium {
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}

.modal, .overlay, .evidence-modal {
  contain: strict;
  will-change: opacity, transform;
}

.feed-container, .detail-container { contain: layout; }

.feed-grid > *, .arguments-list > *, .decode-list > * {
  content-visibility: auto;
  contain-intrinsic-size: auto 200px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .feed-card:hover, .featured-large:hover, .featured-medium:hover, .nav-tab:hover, .back-link:hover {
    transform: none !important;
  }
  
  html { scroll-behavior: auto !important; }
  .parallax { transform: none !important; }
  video[autoplay] { display: none; }
}

.nav-tab { will-change: background-color, color; }
.nav-bubble { will-change: transform; }

img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.status-pill, .card-tag, .verdict-chip {
  contain: layout style paint;
  will-change: background-color;
}

.scroll-container, .feed-container {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-container, .feed-container { scroll-behavior: auto; }
}

button, a, .clickable {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

.feed-card::before, .featured-large::before, .featured-medium::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: transparent;
  transition: background-color 0.2s ease;
  pointer-events: none;
}

.header-hidden { will-change: transform; }
.modal-backdrop { will-change: opacity; contain: strict; }

@media (max-width: 768px) {
  .feed-card {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

/* ==========================================================================
   MOBILE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
  header.header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 8px;
  }
  header.header .content-container {
    position: static;
    left: auto;
    transform: none;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-top: 8px;
  }
  header.header .logo-section { align-self: flex-start; }
  
  .page-container:not(.feed-container) {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 700px) {
  .feed-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    align-items: flex-start;
  }
  .feed-card .card-image {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
  }
  .feed-card .card-header, .feed-card .card-title, .feed-card .card-excerpt { margin: 0; }
  .feed-card .card-meta { margin-bottom: 4px; }
}



