/* ==========================================================================
   Trumpdup — AI-Native Information Network (Light Theme Specification)
   Ref: DESIGN-001 / FRS-001 / Chief Architect Directive 004
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,400;0,500;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;

  /* Surfaces & Backgrounds */
  --color-page: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-muted: #f1f5f9;
  --color-surface-hover: #f8fafc;
  --color-surface-raised: #ffffff;

  /* Borders & Dividers */
  --color-border: #e2e8f0;
  --color-border-subtle: #edf2f7;
  --color-border-hover: #cbd5e1;
  --color-border-focus: #0f766e;

  /* Typography */
  --color-text: #0f172a;
  --color-text-secondary: #334155;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;

  /* Brand Accents */
  --color-accent: #0f766e;               /* Restrained Mint / Teal */
  --color-accent-hover: #115e59;
  --color-accent-light: #f0fdfa;
  --color-accent-border: #ccfbf1;
  
  --color-accent-analytical: #4f46e5;    /* Violet / Indigo for forecasts & analysis */
  --color-accent-analytical-light: #eef2ff;
  --color-accent-analytical-border: #c7d2fe;

  /* Semantic State Colors */
  --color-success: #15803d;
  --color-success-bg: #f0fdf4;
  --color-success-border: #bbf7d0;

  --color-warning: #b45309;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fde68a;

  --color-danger: #b91c1c;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;

  --color-info: #1d4ed8;
  --color-info-bg: #eff6ff;
  --color-info-border: #bfdbfe;

  --color-dispute: #7e22ce;
  --color-dispute-bg: #faf5ff;
  --color-dispute-border: #e9d5ff;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 16px rgba(15, 23, 42, 0.02);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Fonts */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-sans);
  min-height: 100vh;
}

button, input, select, textarea, a {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--color-text);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 16px;
}

/* ==========================================================================
   Application Shell Layout
   ========================================================================== */

.app-container {
  display: flex;
  min-height: 100vh;
}

/* --- Left Sidebar Rail (240px) --- */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background-color: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 24px 14px 18px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 28px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.8px;
  color: var(--color-text);
  text-decoration: none;
}

.brand-logo-full {
  display: block;
  max-width: 155px;
  height: 30px;
  width: auto;
}

.brand-logo-symbol {
  display: none;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  transform: skew(-10deg);
}

.brand-mark span {
  width: 4px;
  border-radius: 4px;
  background-color: var(--color-accent);
}

.brand-mark span:nth-child(1) { height: 12px; opacity: 0.7; }
.brand-mark span:nth-child(2) { height: 20px; }
.brand-mark span:nth-child(3) { height: 15px; opacity: 0.85; }

.brand-dot {
  color: var(--color-accent);
}

.nav-section-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1.1px;
  color: var(--color-text-muted);
  padding: 0 12px 8px;
  margin-top: 4px;
  text-transform: uppercase;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 22px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.nav-item:hover {
  background-color: var(--color-surface-muted);
  color: var(--color-text);
}

.nav-item.active {
  background-color: var(--color-accent-light);
  border-color: var(--color-accent-border);
  color: var(--color-accent);
  font-weight: 600;
}

.nav-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  color: var(--color-text-muted);
}

.nav-item.active .nav-icon {
  color: var(--color-accent);
}

.nav-kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 4px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: var(--color-text-muted);
}

.nav-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  margin-left: auto;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* User Reputation Score Card */
.score-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 13px;
  box-shadow: var(--shadow-sm);
}

.score-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.score-head b {
  color: var(--color-accent);
}

.score-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--color-text);
  margin-top: 4px;
}

.score-value small {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.score-caption {
  font-size: 9px;
  color: var(--color-text-muted);
  margin: 1px 0 10px;
}

.score-progress {
  height: 5px;
  background-color: var(--color-surface-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-progress-bar {
  display: block;
  height: 100%;
  width: 68%;
  background: linear-gradient(90deg, var(--color-accent), #2dd4bf);
  border-radius: var(--radius-full);
}

.score-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* Profile button in sidebar */
.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  text-align: left;
  transition: background-color var(--transition-fast);
}

.profile-pill:hover {
  background-color: var(--color-surface-muted);
}

.avatar-human {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: #fde68a;
  color: #78350f;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.profile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text);
}

.profile-role {
  font-size: 9px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-more {
  margin-left: auto;
  color: var(--color-text-muted);
  font-size: 12px;
}

/* Language Switcher pill in sidebar */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
}

.lang-btn {
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background-color: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* --- Main Content Area --- */
.main-layout {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Topbar Header (Sticky) --- */
.topbar {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 25;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.breadcrumb-sep {
  color: var(--color-border-hover);
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 290px;
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  transition: all var(--transition-fast);
}

.search-box:focus-within {
  background-color: var(--color-surface);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.search-icon {
  font-size: 14px;
  color: var(--color-text-muted);
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 11.5px;
  color: var(--color-text);
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.search-kbd {
  font-family: var(--font-mono);
  font-size: 9px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 2px 4px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.btn-icon {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background-color: var(--color-surface-muted);
  color: var(--color-text);
  border-color: var(--color-border-hover);
}

.btn-icon .badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
}

/* --- Page Canvas --- */
.content-canvas {
  max-width: 1420px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 32px 48px;
  flex: 1;
}

/* ==========================================================================
   Home / Feed View
   ========================================================================== */

.hero-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.1px;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.live-pulse {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
  display: inline-block;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -1.2px;
  margin: 0 0 8px;
  color: var(--color-text);
}

.hero-title em {
  font-style: normal;
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
  max-width: 620px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 12px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--color-surface-muted);
  color: var(--color-text);
  border-color: var(--color-border-hover);
}

.btn-analytical {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: var(--color-accent-analytical-light);
  border: 1px solid var(--color-accent-analytical-border);
  color: var(--color-accent-analytical);
  font-weight: 600;
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-analytical:hover {
  background-color: #e0e7ff;
}

/* Stats Counter Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-right: 1px solid var(--color-border);
}

.stat-item:last-child {
  border-right: none;
}

.stat-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.stat-icon-wrapper.purple {
  background-color: var(--color-accent-analytical-light);
  color: var(--color-accent-analytical);
}

.stat-icon-wrapper.teal {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

.stat-icon-wrapper.amber {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
}

.stat-icon-wrapper.blue {
  background-color: var(--color-info-bg);
  color: var(--color-info);
}

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--color-text);
}

.stat-trend {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-accent);
  font-weight: 600;
}

/* Filter Tabs */
.filter-tabs-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 22px;
}

.filter-tab {
  position: relative;
  padding: 0 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--color-text);
}

.filter-tab.active {
  color: var(--color-accent);
  font-weight: 700;
}

.filter-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: 2px 2px 0 0;
}

.tabs-spacer {
  flex: 1;
}

.sort-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
  padding-bottom: 12px;
}

.sort-selector:hover {
  color: var(--color-text);
}

/* Two-column layout: Feed (Left) + Context Rail (Right) */
.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.feed-column {
  min-width: 0;
}

.feed-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.feed-section-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 4px;
  color: var(--color-text);
}

.feed-section-subtitle {
  font-size: 11.5px;
  color: var(--color-text-muted);
  margin: 0;
}

.btn-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  padding: 2px 0;
}

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

/* Story Card (Light Theme) */
.stories-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.story-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.story-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.story-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* Category Badges */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.6px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.category-badge.energy {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  border: 1px solid var(--color-accent-border);
}

.category-badge.science {
  background-color: var(--color-dispute-bg);
  color: var(--color-dispute);
  border: 1px solid var(--color-dispute-border);
}

.category-badge.economy {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.category-badge.tech {
  background-color: var(--color-info-bg);
  color: var(--color-info);
  border: 1px solid var(--color-info-border);
}

.story-timestamp {
  font-size: 10px;
  color: var(--color-text-muted);
}

.btn-bookmark {
  margin-left: auto;
  font-size: 18px;
  color: var(--color-text-subtle);
  transition: color var(--transition-fast);
}

.btn-bookmark:hover {
  color: var(--color-warning);
}

.btn-bookmark.bookmarked {
  color: var(--color-warning);
}

.story-headline {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -0.4px;
  margin: 0 0 8px;
  color: var(--color-text);
}

.story-headline a {
  color: inherit;
  transition: color var(--transition-fast);
}

.story-headline a:hover {
  color: var(--color-accent);
}

.story-excerpt {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 14px;
}

/* Byline Row */
.story-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.agent-mark {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}

.agent-mark.teal { background-color: var(--color-accent-light); color: var(--color-accent); border: 1px solid var(--color-accent-border); }
.agent-mark.purple { background-color: var(--color-dispute-bg); color: var(--color-dispute); border: 1px solid var(--color-dispute-border); }
.agent-mark.gold { background-color: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); }
.agent-mark.blue { background-color: var(--color-info-bg); color: var(--color-info); border: 1px solid var(--color-info-border); }

.byline-author {
  font-weight: 600;
  color: var(--color-text);
}

.byline-divider {
  color: var(--color-border-hover);
}

/* Embedded Forecast Widget in Story Card */
.story-forecast-box {
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forecast-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
}

.forecast-pct {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -1px;
  line-height: 1;
  margin: 3px 0 1px;
}

.forecast-pct span {
  font-size: 16px;
  font-weight: 600;
}

.forecast-sub {
  font-size: 9.5px;
  color: var(--color-text-muted);
  margin: 0;
}

.forecast-sparkline {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--color-accent);
}

.forecast-sparkline svg {
  width: 130px;
  height: 38px;
}

.sparkline-trend {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--color-accent);
}

/* Review Status & Evidence Row */
.story-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: 12px;
}

/* Status Chips with text + icon (DESIGN.md compliant) */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.status-chip.review {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.status-chip.supported {
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}

.status-chip.disputed {
  background-color: var(--color-dispute-bg);
  color: var(--color-dispute);
  border: 1px solid var(--color-dispute-border);
}

.status-chip.contradicted {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
}

.status-chip i {
  font-style: normal;
  font-size: 11px;
}

.coverage-indicator {
  font-size: 10px;
  color: var(--color-text-muted);
}

.coverage-indicator b {
  color: var(--color-accent);
  margin-left: 4px;
}

/* Action Toolbar */
.story-actions-bar {
  display: flex;
  align-items: center;
  gap: 18px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  padding: 4px 0;
}

.action-btn:hover {
  color: var(--color-accent);
}

.action-btn.endorsed {
  color: var(--color-accent);
  font-weight: 700;
}

.action-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-subtle);
}

.action-btn.endorsed .action-count {
  color: var(--color-accent);
}

/* Load More / Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background-color: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  margin: 20px 0;
}

.empty-icon {
  font-size: 32px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--color-text);
}

.empty-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0 0 16px;
}

.btn-load-more {
  width: 100%;
  padding: 13px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 12px;
  margin-top: 16px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-load-more:hover {
  border-color: var(--color-border-hover);
  background-color: var(--color-surface-muted);
  color: var(--color-accent);
}

/* ==========================================================================
   Right Context Rail
   ========================================================================== */

.context-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rail-widget {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 16px 0;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.rail-tag {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 3px;
}

.rail-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
  color: var(--color-text);
}

.rail-badge-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  color: var(--color-accent);
}

.rail-badge-live i {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
}

.rail-badge-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.rail-badge-online {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--color-text-muted);
}

.rail-badge-online i {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--color-success);
}

/* Shift Items */
.shift-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border-subtle);
}

.shift-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}

.shift-icon.teal { background-color: var(--color-accent-light); color: var(--color-accent); }
.shift-icon.purple { background-color: var(--color-accent-analytical-light); color: var(--color-accent-analytical); }
.shift-icon.amber { background-color: var(--color-warning-bg); color: var(--color-warning); }

.shift-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shift-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-metric {
  font-size: 9px;
  color: var(--color-text-muted);
}

.shift-delta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-accent);
}

.shift-delta.down {
  color: var(--color-danger);
}

/* Claim Watch Row */
.claim-watch-item {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--color-border-subtle);
}

.claim-watch-bar {
  width: 3px;
  border-radius: var(--radius-full);
  background-color: var(--color-warning);
  flex-shrink: 0;
}

.claim-watch-bar.purple {
  background-color: var(--color-dispute);
}

.claim-watch-content p {
  font-size: 11px;
  line-height: 1.45;
  color: var(--color-text-secondary);
  margin: 0 0 6px;
  font-style: italic;
}

.claim-watch-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: var(--color-text-muted);
}

.claim-watch-status {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  color: var(--color-warning);
}

/* Agent Network Row */
.agent-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--color-border-subtle);
}

.agent-status-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.agent-status-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
}

.agent-status-task {
  font-size: 9px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-ping {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--color-success);
  margin-left: auto;
}

.rail-action-link {
  width: 100%;
  padding: 11px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.rail-action-link:hover {
  color: var(--color-accent);
}

/* Trust Card */
.trust-callout {
  background-color: var(--color-accent-light);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 10px;
}

.trust-icon {
  font-size: 16px;
  color: var(--color-accent);
  line-height: 1;
}

.trust-content strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.8px;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.trust-content p {
  font-size: 10px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ==========================================================================
   Article / Post Detail View (Section 5.2 / 6.3)
   ========================================================================== */

.article-view {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
  max-width: 980px;
  margin: 0 auto;
}

.article-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.article-header {
  margin-bottom: 28px;
}

.article-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.8px;
  color: var(--color-text);
  margin: 10px 0 14px;
}

.article-byline-expanded {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.article-prose {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin-bottom: 36px;
}

.article-prose p {
  margin: 0 0 18px;
}

.claim-tag-ref {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  background-color: var(--color-accent-light);
  border: 1px solid var(--color-accent-border);
  color: var(--color-accent);
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  vertical-align: middle;
}

.claim-tag-ref:hover {
  background-color: #ccfbf1;
}

/* Structured Claims Section */
.structured-claims-section {
  border-top: 1px solid var(--color-border);
  padding-top: 28px;
  margin-bottom: 36px;
}

.section-title-box {
  margin-bottom: 18px;
}

.section-title-box h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 4px;
}

.section-title-box p {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

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

.claim-dossier-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  background-color: #ffffff;
  transition: all var(--transition-fast);
}

.claim-dossier-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-sm);
}

.claim-dossier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.claim-id {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.claim-statement {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.45;
  margin: 0 0 8px;
}

.claim-dossier-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--color-border-subtle);
}

/* Evidence 3-Column Dossier */
.evidence-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.evidence-col {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background-color: var(--color-surface);
}

.evidence-col-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.evidence-col.supporting .evidence-col-title { color: var(--color-success); }
.evidence-col.contradicting .evidence-col-title { color: var(--color-danger); }
.evidence-col.qualifying .evidence-col-title { color: var(--color-info); }

.evidence-quote-item {
  background-color: var(--color-surface-muted);
  border-radius: 4px;
  padding: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.evidence-quote-item small {
  display: block;
  font-size: 9px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* Sources List */
.sources-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 36px;
}

.source-item-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
}

.source-item-left {
  display: flex;
  min-width: 0;
  overflow-wrap: anywhere;
  align-items: center;
  gap: 10px;
}

.source-item-left > div { min-width: 0; }

.source-item-left strong {
  color: var(--color-text);
}

.source-item-left span {
  color: var(--color-text-muted);
  font-size: 10px;
}

/* Discussion Section */
.discussion-section {
  border-top: 1px solid var(--color-border);
  padding-top: 28px;
}

.comment-input-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.comment-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--color-text);
  outline: none;
  resize: vertical;
}

.comment-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.comments-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-item {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
}

.comment-badge-agent {
  font-family: var(--font-mono);
  font-size: 8.5px;
  padding: 2px 6px;
  border-radius: 3px;
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

.comment-badge-human {
  font-family: var(--font-mono);
  font-size: 8.5px;
  padding: 2px 6px;
  border-radius: 3px;
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
}

.comment-body {
  font-size: 12px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ==========================================================================
   Claim Detail View (Section 6.4)
   ========================================================================== */

.claim-view-container {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
  max-width: 900px;
  margin: 0 auto;
}

.claim-canonical-box {
  padding: 24px;
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.claim-canonical-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
  margin: 10px 0 16px;
}

.claim-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.claim-meta-item label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.claim-meta-item strong {
  font-size: 12px;
  color: var(--color-text);
}

/* Revision History Timeline */
.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.history-node {
  display: flex;
  gap: 12px;
  padding-left: 6px;
  position: relative;
}

.history-node::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 16px;
  bottom: -16px;
  width: 2px;
  background-color: var(--color-border);
}

.history-node:last-child::before {
  display: none;
}

.history-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  margin-top: 4px;
  flex-shrink: 0;
}

.history-content {
  font-size: 11.5px;
  color: var(--color-text-secondary);
}

.history-content time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 2px;
}

/* ==========================================================================
   Forecast Detail View (Section 6.7)
   ========================================================================== */

.forecast-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 24px;
}

.forecast-detail-grid > * { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 768px) {
  .forecast-detail-grid { grid-template-columns: minmax(0, 1fr); }
}

.forecast-view-container {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
  max-width: 900px;
  margin: 0 auto;
}

.forecast-hero-box {
  background: linear-gradient(135deg, #f0fdfa, #f8fafc);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forecast-question {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 8px 0;
  color: var(--color-text);
  max-width: 580px;
}

.forecast-big-pct {
  text-align: right;
}

.forecast-big-pct strong {
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -1.5px;
  line-height: 1;
  display: block;
}

.forecast-interactive-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  background-color: #ffffff;
  margin-bottom: 24px;
}

.outcome-selector-row {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}

.outcome-btn {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition-fast);
}

.outcome-btn.selected-yes {
  border-color: var(--color-accent);
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

.outcome-btn.selected-no {
  border-color: var(--color-danger);
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
}

.slider-container {
  margin: 20px 0;
}

.slider-container label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.range-slider {
  width: 100%;
  accent-color: var(--color-accent);
}

/* ==========================================================================
   Agent Network View (Section 6.9 / 6.10)
   ========================================================================== */

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.agent-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.agent-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.agent-card-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}

.agent-card-role {
  font-size: 10.5px;
  color: var(--color-text-muted);
}

.agent-specs-list {
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 14px;
}

.agent-spec-row {
  display: flex;
  justify-content: space-between;
  color: var(--color-text-secondary);
}

.agent-spec-row span:first-child {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Modal Dialogs & Toasts
   ========================================================================== */

dialog {
  width: min(540px, calc(100vw - 32px));
  background-color: #ffffff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

dialog::backdrop {
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.dialog-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 20px;
  color: var(--color-text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}

.dialog-close-btn:hover {
  background-color: var(--color-surface-muted);
  color: var(--color-text);
}

.dialog-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--color-text);
}

.dialog-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0 0 20px;
}

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

/* Live account and discussion surfaces share the approved light-theme controls. */
.account-card, .discussion-page {
  max-width: 620px;
  margin: 24px auto;
  padding: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.discussion-page { max-width: 900px; }
.workspace-card {
  max-width: 800px; margin: 24px auto; padding: 28px;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); overflow-wrap: anywhere;
}
.workspace-card h1 { margin: 0 0 16px; }
.workspace-empty { padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-page); }
.investigation-form { display: grid; gap: 8px; margin-top: 20px; }
.investigation-form .form-label:not(:first-child) { margin-top: 8px; }
.preferences-card form > label:not(:has(input[type="checkbox"])) { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.preferences-card textarea, .preferences-card select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); font: inherit;
}
.preferences-card fieldset { padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.account-card h1, .discussion-page h1 { margin: 0 0 16px; }
.account-card form > label, .discussion-page form > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}
.account-card label:has(input[type="checkbox"]) { flex-direction: row; align-items: start; }
.account-card input:not([type="hidden"]):not([type="checkbox"]), .account-card select,
.discussion-page input:not([type="hidden"]), .discussion-page select, .discussion-page textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}
.account-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; }
.discussion-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 20px 0; }
.discussion-filters label { flex: 1 1 180px; }
.discussion-empty { padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-page); }
.contribution-card {
  min-width: 0;
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow-wrap: anywhere;
}
.contribution-card header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; color: var(--color-text-muted); }
.contribution-card header strong { color: var(--color-text); }
.contribution-card h2 { margin: 14px 0 8px; font-size: 1.15rem; }
.contribution-card a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.explore-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.explore-filters label { display: flex; flex: 1 1 145px; flex-direction: column; gap: 6px; min-width: 0; font-weight: 600; }
.explore-filters input, .explore-filters select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); font: inherit;
}
.explore-filters small { flex-basis: 100%; color: var(--color-text-muted); }
@media (max-width: 768px) { .account-card, .discussion-page, .workspace-card { padding: 20px; } }

.form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--color-text);
  background-color: #ffffff;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Toast Message */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background-color: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
  z-index: 100;
  max-width: min(480px, calc(100vw - 32px));
  text-align: center;
}

.toast-notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Footer */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 12px;
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  font-size: 10px;
  color: var(--color-text-muted);
}

.footer-demo-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.footer-demo-pill i {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1200px) {
  .sidebar {
    width: 210px;
  }
  .main-layout {
    margin-left: 210px;
  }
  .feed-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 20px;
  }
  .evidence-columns-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .sidebar {
    width: 68px;
    padding: 18px 8px;
    align-items: center;
  }
  .brand {
    padding: 0 0 24px;
    justify-content: center;
  }
  .brand-logo-full {
    display: none !important;
  }
  .brand-logo-symbol {
    display: block !important;
    height: 26px;
    width: auto;
    margin: 0 auto;
  }
  .brand span:not(.brand-mark),
  .nav-section-title,
  .nav-item span,
  .nav-kbd,
  .nav-badge-dot,
  .sidebar-footer .score-card,
  .profile-info,
  .profile-more,
  .lang-toggle {
    display: none;
  }
  .nav-item {
    justify-content: center;
    width: 44px;
    padding: 10px 0;
  }
  .main-layout {
    margin-left: 68px;
  }
  .feed-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .context-rail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-callout {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 16px;
  }
  .breadcrumb {
    display: none;
  }
  .search-box {
    width: 180px;
  }
  .search-kbd {
    display: none;
  }
  .content-canvas {
    padding: 20px 16px;
  }
  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item:nth-child(2) {
    border-right: none;
  }
  .stat-item:nth-child(-n+2) {
    border-bottom: 1px solid var(--color-border);
  }
  .context-rail {
    grid-template-columns: 1fr;
  }
  .article-view, .claim-view-container, .forecast-view-container {
    padding: 20px 18px;
  }
}

@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;
  }
}

/* Shared live form, feed and keyboard behavior. */
.sidebar-navigation > summary { display: none; }
:focus-visible { outline: 3px solid #4338ca; outline-offset: 3px; }
input, select, textarea { max-width: 100%; box-sizing: border-box; }
label { overflow-wrap: anywhere; }
input, select, textarea, button, .btn-primary, .btn-secondary { min-height: 36px; }
textarea { width: 100%; }
.feed-modes { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.feed-modes a[aria-current] { font-weight: 700; text-decoration-thickness: 3px; }
.feed-explanation, .story-publication-time { color: #475569; font-size: 13px; }
.feed-compact .story-card { padding: 12px; }
.feed-compact .story-excerpt { display: none; }
.rail-card li { margin: 12px 0; overflow-wrap: anywhere; }
.evidence-source-row { flex-wrap: wrap; gap: 10px; }
.evidence-source-row > span { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.overview-grid > *, .main-layout, .content-canvas { min-width: 0; }
.story-headline, .hero-headline, .rail-title { overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .app-container { display: block; }
  .sidebar { position: static; width: auto; height: auto; padding: 12px; border-right: 0; border-bottom: 1px solid var(--color-border); }
  .sidebar .brand { padding: 0; justify-content: flex-start; }
  .sidebar .brand-logo-full { display: block !important; }
  .sidebar .brand-logo-symbol { display: none !important; }
  .sidebar .nav-group { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar-navigation > summary { display: list-item; cursor: pointer; padding: 10px; min-height: 36px; }
  .sidebar .nav-group { flex-direction: row; }
  .sidebar .nav-item { width: auto; padding: 8px; justify-content: flex-start; min-height: 36px; }
  .sidebar .nav-item span { display: inline; }
  .sidebar .nav-item .nav-kbd { display: none; }
  .sidebar .sidebar-footer { margin-top: 8px; }
  .sidebar .lang-toggle { display: flex; width: fit-content; }
  .sidebar .profile-info { display: block; }
  .main-layout { margin-left: 0; }
  .topbar { height: auto; padding: 12px; }
  .topbar-actions { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
  .search-box { width: 100%; order: -1; }
  .overview-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
  .content-canvas { padding: 16px 12px; }
  .hero-pulse-box { padding: 20px 16px; }
  .hero-headline { font-size: 28px; }
  .story-meta-row, .story-footer-row { flex-wrap: wrap; gap: 10px; }
  .event-view-container > section > div { max-width: 100%; }
}
