/* modern-web-guidance styles for News App */

/* Design Tokens & CSS Variables */
:root {
  /* Font Family */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Harmonious Palette (Light Mode Default) */
  --color-brand-light: hsl(250, 85%, 56%);
  --color-brand-dark: hsl(250, 95%, 66%);
  --color-brand: var(--color-brand-light);

  --color-accent-light: hsl(180, 90%, 40%);
  --color-accent-dark: hsl(180, 100%, 45%);
  --color-accent: var(--color-accent-light);

  --bg-app-light: hsl(220, 25%, 97%);
  --bg-app-dark: hsl(222, 24%, 10%);
  --bg-app: var(--bg-app-light);

  --bg-card-light: hsl(0, 0%, 100%);
  --bg-card-dark: hsl(222, 22%, 15%);
  --bg-card: var(--bg-card-light);

  --border-color-light: hsla(220, 20%, 10%, 0.08);
  --border-color-dark: hsla(0, 0%, 100%, 0.08);
  --border-color: var(--border-color-light);

  --text-primary-light: hsl(220, 30%, 12%);
  --text-primary-dark: hsl(210, 20%, 98%);
  --text-primary: var(--text-primary-light);

  --text-secondary-light: hsl(220, 15%, 45%);
  --text-secondary-dark: hsl(215, 15%, 70%);
  --text-secondary: var(--text-secondary-light);

  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -4px rgba(0, 0, 0, 0.12);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Glassmorphism values */
  --glass-bg-light: hsla(0, 0%, 100%, 0.7);
  --glass-bg-dark: hsla(222, 22%, 15%, 0.7);
  --glass-bg: var(--glass-bg-light);
  --glass-border-light: hsla(0, 0%, 100%, 0.4);
  --glass-border-dark: hsla(222, 22%, 25%, 0.3);
  --glass-border: var(--glass-border-light);

  /* Scrollbar configuration */
  --scrollbar-thumb: hsl(220, 15%, 80%);
  --scrollbar-track: transparent;

  color-scheme: light dark;
  accent-color: var(--color-brand);
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --color-brand: var(--color-brand-dark);
    --color-accent: var(--color-accent-dark);
    --bg-app: var(--bg-app-dark);
    --bg-card: var(--bg-card-dark);
    --border-color: var(--border-color-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --glass-bg: var(--glass-bg-dark);
    --glass-border: var(--glass-border-dark);
    --scrollbar-thumb: hsl(222, 15%, 30%);
  }
}

/* Explicit Custom Class-based Theme overrides (pinned themes) */
:root[data-theme="light"] {
  --color-brand: var(--color-brand-light);
  --color-accent: var(--color-accent-light);
  --bg-app: var(--bg-app-light);
  --bg-card: var(--bg-card-light);
  --border-color: var(--border-color-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --glass-bg: var(--glass-bg-light);
  --glass-border: var(--glass-border-light);
  --scrollbar-thumb: hsl(220, 15%, 80%);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --color-brand: var(--color-brand-dark);
  --color-accent: var(--color-accent-dark);
  --bg-app: var(--bg-app-dark);
  --bg-card: var(--bg-card-dark);
  --border-color: var(--border-color-dark);
  --text-primary: var(--text-primary-dark);
  --text-secondary: var(--text-secondary-dark);
  --glass-bg: var(--glass-bg-dark);
  --glass-border: var(--glass-border-dark);
  --scrollbar-thumb: hsl(222, 15%, 30%);
  color-scheme: dark;
}

/* Basic Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbars styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover {
  opacity: 0.8;
}

/* Layout Utilities */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Custom Buttons with vibrant gradients & micro-animations */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  color: #fff;
  box-shadow: 0 4px 12px hsla(250, 85%, 60%, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px hsla(250, 85%, 60%, 0.4);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  background-color: var(--bg-app);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}
.btn-outline:active {
  transform: translateY(0);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  transform: scale(1.05);
  background-color: var(--border-color);
}

/* Glassmorphic elements */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

/* Top Nav Bar */
header {
  position: sticky;
  top: 0;
  z-index: 1100;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  height: 72px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px hsla(250, 85%, 60%, 0.3);
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.guest-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-nav-actions {
  display: none;
  align-items: center;
  gap: 10px;
}

.nav-login-btn {
  padding: 7px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.nav-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 7px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.nav-manage-feeds-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Main Hero Landing Page */
#landing-view {
  padding: 40px 0 100px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  text-align: center;
  max-width: 800px;
  margin: 60px auto 80px auto;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: hsla(250, 85%, 60%, 0.1);
  color: var(--color-brand);
  border: 1px solid hsla(250, 85%, 60%, 0.2);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary), var(--color-brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  margin-top: 40px;
}

.feature-card {
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-brand);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--color-brand), var(--color-accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: hsla(250, 85%, 60%, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Auth Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.modal-header h2 {
  font-size: 28px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-container svg {
  position: absolute;
  left: 16px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px hsla(250, 85%, 60%, 0.15);
}

.form-submit {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-top: 10px;
}

.auth-toggle-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 20px;
}

.auth-toggle-text a {
  font-weight: 600;
  color: var(--color-brand);
}

/* Help Modal Customizations */
.help-modal-card {
  max-width: 580px !important;
  padding: 32px !important;
}

.help-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.help-tab-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.help-tab-btn:hover {
  color: var(--text-primary);
  background-color: var(--border-color);
}

.help-tab-btn.active {
  color: var(--color-brand);
  background-color: hsla(250, 85%, 60%, 0.1);
}

.help-tab-content-container {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Tab scrollbar styling */
.help-tab-content-container::-webkit-scrollbar {
  width: 6px;
}
.help-tab-content-container::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
.help-tab-content-container::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
}

.help-tab-panel {
  display: none;
}

.help-tab-panel.active {
  display: block;
  animation: fadeInHelp 0.25s ease forwards;
}

@keyframes fadeInHelp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.help-tab-intro {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Feature Tab Styles */
.help-feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help-feature-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background-color: hsla(220, 20%, 10%, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

:root[data-theme="dark"] .help-feature-item {
  background-color: hsla(0, 0%, 100%, 0.02);
}

.help-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: hsla(250, 85%, 60%, 0.1);
  color: var(--color-brand);
  flex-shrink: 0;
}

.help-feature-details h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.help-feature-details p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Shortcuts Tab Styles */
.help-shortcut-grid {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.help-shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: hsla(220, 20%, 10%, 0.01);
}

:root[data-theme="dark"] .help-shortcut-row {
  background-color: hsla(0, 0%, 100%, 0.01);
}

.help-shortcut-row:last-child {
  border-bottom: none;
}

.help-shortcut-desc {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.help-shortcut-keys {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shortcut-or {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

kbd {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-bottom: 2.5px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

/* Gestures Tab Styles */
.help-gesture-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help-gesture-item {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 16px;
  background-color: hsla(220, 20%, 10%, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

:root[data-theme="dark"] .help-gesture-item {
  background-color: hsla(0, 0%, 100%, 0.02);
}

.help-gesture-graphic {
  width: 60px;
  height: 60px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.help-gesture-details h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.help-gesture-details p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Reader Wrapper & Mode Badge */
.reader-layout-wrapper {
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.badge-mode {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: hsla(250, 85%, 60%, 0.12);
  color: var(--color-brand);
  border: 1px solid hsla(250, 85%, 60%, 0.25);
  display: inline-flex;
  align-items: center;
}

/* Empty State for signed-in users with no feeds */
.reader-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 20px;
  overflow-y: auto;
}

.empty-state-card {
  max-width: 520px;
  width: 100%;
  padding: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: hsla(250, 85%, 60%, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.empty-state-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  font-family: var(--font-heading);
}

.empty-state-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.btn-quick-feed {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.btn-quick-feed:hover {
  background: var(--color-brand);
  color: white;
  border-color: var(--color-brand);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
}

/* ==========================================================================
   STORY READER STAGE & INTEL DATA SHEET LAYOUT
   ========================================================================== */

/* Main Reader Layout (Wide Screen: Stage on Left, Headlines on Right) */
.reader-layout {
  display: flex;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* Focused Story Reader Stage */
.story-reader-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background-color: var(--bg-app);
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

/* Reader Top Navigation Bar */
.reader-nav-bar {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 20;
  flex-shrink: 0;
}

.reader-nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-nav:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  background-color: hsla(250, 85%, 60%, 0.08);
  transform: translateY(-1px);
}

.reader-story-counter {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 5px 12px;
  background-color: var(--bg-app);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  min-width: 95px;
  text-align: center;
  user-select: none;
}

.reader-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-toggle-headlines {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
}

/* Reader Scroll Area */
.reader-scroll-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 32px 80px 32px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  scroll-behavior: smooth;
  min-height: 0;
}

/* Active Story Presentation Card */
.story-article-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.story-hero-wrapper {
  position: relative;
  width: 100%;
  height: 380px;
  background: #0f172a;
  overflow: hidden;
}

.story-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-article-card:hover .story-hero-img {
  transform: scale(1.03);
}

.story-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.2) 40%, rgba(15, 23, 42, 0.35) 100%);
  pointer-events: none;
}

.story-hero-badges {
  position: absolute;
  bottom: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 5;
}

.badge-source {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-location {
  background: rgba(16, 185, 129, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-credit {
  background: rgba(79, 70, 229, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.story-content-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.story-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.story-date {
  font-weight: 500;
}

.story-headline {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0;
}

.story-lead {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

.story-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.btn-read-full {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.story-external-searches {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.search-btn:hover {
  transform: translateY(-2px);
  color: white !important;
}

.search-btn.search-wiki:hover {
  background-color: #333333;
  border-color: #333333;
}

.search-btn.search-social:hover {
  background-color: #1da1f2;
  border-color: #1da1f2;
}

.search-btn.search-yt:hover {
  background-color: #ff0000;
  border-color: #ff0000;
}

.scroll-down-prompt {
  margin-top: 22px;
  padding: 14px 20px;
  background: hsla(250, 85%, 60%, 0.08);
  border: 1px dashed var(--color-brand);
  border-radius: var(--radius-md);
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.scroll-down-prompt:hover {
  background: hsla(250, 85%, 60%, 0.14);
  transform: translateY(2px);
}

.scroll-down-prompt svg {
  animation: bounceDown 1.8s infinite;
}

@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(4px); }
  60% { transform: translateY(2px); }
}

/* ==========================================================================
   STORY INTEL & CONTEXT DATA SHEET
   ========================================================================== */

.story-datasheet-section {
  max-width: 960px;
  width: 100%;
  margin: 16px auto 0 auto;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.datasheet-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.datasheet-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
  flex-shrink: 0;
}

.datasheet-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 2px 0;
}

.datasheet-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.datasheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.datasheet-card {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.datasheet-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand);
}

.datasheet-card.full-width {
  grid-column: 1 / -1;
}

.datasheet-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-brand);
}

.dossier-pill-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dossier-pill {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  flex: 1;
  min-width: 140px;
}

.pill-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.pill-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.datasheet-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0;
}

.figures-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.figure-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: hsla(250, 85%, 60%, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
}

.fast-facts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fast-facts-list li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
  position: relative;
  padding-left: 20px;
}

.fast-facts-list li::before {
  content: "2";
  position: absolute;
  left: 4px;
  color: var(--color-brand);
  font-size: 18px;
  line-height: 1;
}

.wiki-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wiki-extract-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
}

.btn-wiki {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: all 0.2s ease;
}

.btn-wiki:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  transform: translateY(-1px);
}

/* ==========================================================================
   HEADLINES SIDEBAR & FEED CARDS
   ========================================================================== */

.news-sidebar {
  width: 400px;
  border-left: 1px solid var(--border-color);
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.last-updated-badge {
  font-size: 11px;
  color: var(--text-secondary);
}

.news-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.news-card {
  flex-shrink: 0;
  width: 100%;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
  overflow: hidden;
  box-sizing: border-box;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand);
}

.news-card.active,
.news-card.highlighted {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 2px var(--color-brand), var(--shadow-md);
  background-color: hsla(250, 85%, 60%, 0.04);
}

.card-image-container {
  width: 100%;
  height: 135px;
  min-height: 135px;
  max-height: 135px;
  flex-shrink: 0;
  overflow: hidden;
  background-color: var(--bg-app);
  position: relative;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

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

.card-source-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  color: #f8fafc;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.card-content {
  padding: 12px 14px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.card-source {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-brand);
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta .location-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--color-accent);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 10.5px;
}

.news-card h3 {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 2px 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.news-card p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Slide Transition Animations for Gesture Swiping */
.slide-in-right {
  animation: slideInRight 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slide-in-left {
  animation: slideInLeft 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideInRight {
  from { opacity: 0.3; transform: translateX(25px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0.3; transform: translateX(-25px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   CUSTOM CURATED RSS FEEDS
   ========================================================================== */

.custom-feeds-layout {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.feeds-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-card);
  z-index: 1600;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.feeds-sidebar.open {
  transform: translateX(0);
}

.sidebar-flyout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  background-color: var(--bg-card);
}

.feed-form-panel {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.feed-form-panel h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.feed-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-form input,
.feed-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-app);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.feed-form input:focus,
.feed-form textarea:focus {
  outline: none;
  border-color: var(--color-brand);
}

.feeds-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.feeds-list-container h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.feeds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  transition: all 0.2s ease;
  cursor: pointer;
}

.feed-item-row:hover {
  border-color: var(--color-brand);
  background-color: var(--bg-app);
}

.feed-item-row.active {
  border-color: var(--color-brand);
  background-color: hsla(250, 85%, 60%, 0.05);
}

.feed-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.feed-item-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item-url {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-delete-feed {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-delete-feed:hover {
  color: hsl(0, 80%, 60%);
  background-color: hsla(0, 80%, 60%, 0.1);
}

.custom-feed-content-area {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Skeleton Loading Shimmer for Cards */
.shimmer-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.shimmer-card {
  height: 120px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shimmer-line {
  height: 12px;
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.shimmer-line.title {
  width: 80%;
  height: 16px;
}
.shimmer-line.desc-1 { width: 100%; }
.shimmer-line.desc-2 { width: 90%; }
.shimmer-line.desc-3 { width: 60%; }

/* Alert Notification toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-color: hsl(140, 80%, 45%);
}

.toast-error {
  border-color: hsl(0, 80%, 45%);
}

/* PWA Network Status Badge */
.status-badge {
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
}

.status-badge.offline .status-dot {
  background-color: #ef4444;
}

/* Profile Dropdown */
.profile-dropdown-container {
  position: relative;
}

.profile-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.profile-dropdown-btn:hover {
  border-color: var(--color-brand);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 1000;
}

.dropdown-menu.active {
  display: flex;
  flex-direction: column;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background-color: hsla(250, 85%, 60%, 0.08);
  color: var(--color-brand);
}

.dropdown-item.danger:hover {
  background-color: hsla(0, 85%, 60%, 0.1);
  color: hsl(0, 85%, 60%);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 4px 0;
}

/* Auto-Play Button */
.btn-play-pause {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.btn-play-pause:hover {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background-color: hsla(250, 85%, 60%, 0.08);
  transform: translateY(-1px);
}

.btn-play-pause.playing {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background-color: hsla(250, 85%, 60%, 0.12);
  box-shadow: 0 0 0 2px hsla(250, 85%, 60%, 0.2);
}

/* Fly-out Sidebar backdrop */
.feeds-sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feeds-sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* Utilities */
.mobile-only {
  display: none;
}
@media (max-width: 960px) {
  .mobile-only {
    display: inline-flex;
  }
}

/* ==========================================================================
   LANDING PAGE MOCKUP & TESTIMONIALS
   ========================================================================== */

.landing-preview-section {
  width: 100%;
  margin-top: 40px;
}

.reader-preview-mockup {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  background: var(--bg-card);
  margin-bottom: 40px;
}

.mockup-story-stage {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mockup-story-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mockup-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: hsla(250, 85%, 60%, 0.12);
  color: var(--color-brand);
}

.mockup-story-counter {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mockup-headline {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
}

.mockup-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.mockup-datasheet-peek {
  margin-top: 16px;
  padding: 20px;
  border-radius: 12px;
  background: var(--bg-app);
  border: 1px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mockup-datasheet-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-brand);
  text-transform: uppercase;
}

.mockup-datasheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.mockup-data-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mockup-data-item strong {
  font-size: 12px;
  color: var(--text-primary);
}

.mockup-data-item span {
  font-size: 12px;
  color: var(--text-secondary);
}

.testimonials-section {
  width: 100%;
  margin-top: 40px;
  margin-bottom: 60px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.testimonial-card {
  padding: 24px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.testimonial-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  font-style: italic;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-reader-section {
  width: 100%;
  margin: 40px 0;
}

.landing-news-stage-section {
  width: 100%;
  height: 750px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.landing-news-stage-section #content-global {
  height: 100%;
  width: 100%;
}

#dashboard-news-container {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

/* ==========================================================================
   RESPONSIVE LAYOUT ADJUSTMENTS
   ========================================================================= */

@media (max-width: 960px) {
  .datasheet-grid {
    grid-template-columns: 1fr;
  }

  .btn-toggle-headlines {
    display: inline-flex !important;
  }

  .news-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 340px;
    z-index: 1500;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
  }

  .news-sidebar.drawer-open {
    transform: translateX(0);
  }

  .reader-scroll-container {
    padding: 16px 14px 56px 14px;
    gap: 36px;
  }

  .story-hero-wrapper {
    height: 260px;
  }

  .story-content-body {
    padding: 20px 16px;
  }

  .story-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .story-external-searches {
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  #reader-mode-badge {
    display: none !important;
  }

  #user-email-display {
    display: none !important;
  }

  .profile-dropdown-btn {
    padding: 4px 8px 4px 4px;
  }
}

@media (max-width: 600px) {
  header {
    height: 56px;
  }

  .reader-layout-wrapper {
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
  }

  .container,
  .nav-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .logo {
    font-size: 19px;
    gap: 8px;
  }

  .logo-icon {
    width: 30px;
    height: 30px;
  }

  .logo-icon svg {
    width: 17px;
    height: 17px;
  }

  .logo-area {
    gap: 6px;
  }

  .nav-actions {
    gap: 6px;
  }

  .guest-nav-actions,
  .user-nav-actions {
    gap: 6px;
  }

  .btn-icon {
    width: 34px;
    height: 34px;
  }

  .nav-login-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }

  .nav-code-btn {
    display: none !important;
  }

  .nav-manage-feeds-btn span {
    display: none !important;
  }

  .nav-manage-feeds-btn {
    padding: 6px 9px !important;
  }

  .profile-dropdown-btn {
    padding: 3px 6px 3px 3px;
    gap: 4px;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .status-badge {
    padding: 5px;
  }

  .status-dot {
    width: 7px;
    height: 7px;
  }

  .reader-nav-bar {
    padding: 8px 12px;
    gap: 8px;
  }

  .reader-nav-controls {
    gap: 6px;
  }

  .btn-nav span {
    display: none;
  }

  .btn-nav {
    padding: 6px 9px;
  }

  .reader-story-counter {
    min-width: 65px;
    font-size: 11px;
    padding: 3px 6px;
  }

  .btn-play-pause .btn-label {
    display: none;
  }

  .btn-toggle-headlines span {
    display: none;
  }

  .landing-news-stage-section {
    height: 620px;
  }

  .scroll-down-prompt {
    font-size: 12px;
    padding: 10px 14px;
  }
}

@media (max-width: 420px) {
  .nav-manage-feeds-btn {
    display: none !important;
  }

  .nav-actions {
    gap: 4px;
  }

  .btn-icon {
    width: 32px;
    height: 32px;
  }

  .logo {
    font-size: 18px;
    gap: 6px;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
  }

  .reader-scroll-container {
    padding: 12px 10px 48px 10px;
    gap: 28px;
  }
}
