:root {
  --sidebar-width: 320px;
  --bg: #071118;
  --bg-soft: rgba(12, 28, 37, 0.88);
  --bg-panel: rgba(255, 255, 255, 0.05);
  --bg-panel-strong: rgba(255, 255, 255, 0.08);
  --text: #eff6f0;
  --muted: #a6b6ba;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #f4b860;
  --accent-strong: #ff8c42;
  --blue: #8fd9ff;
  --green: #9deccf;
  --yellow: #ffd499;
  --danger: #ff968f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(244, 184, 96, 0.18), transparent 25%),
    radial-gradient(circle at top right, rgba(106, 192, 255, 0.18), transparent 20%),
    linear-gradient(145deg, #071118 0%, #0c1d28 52%, #11131d 100%);
}

.page-shell {
  width: min(1480px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 20px 0 42px;
}

.hero {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.5fr 1fr;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow);
}

.hero.compact {
  grid-template-columns: 1fr;
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: 1rem;
}

.hero-text {
  max-width: 68ch;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-panel-inline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.stat-card.accent {
  background: linear-gradient(135deg, rgba(244, 184, 96, 0.2), rgba(255, 140, 66, 0.14));
}

.news-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.news-stat-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.news-stat-card strong {
  margin-top: 6px;
  font-size: 1.08rem;
}

.stat-label,
.filter-label,
.small-copy,
.input-block span,
.status-label {
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workspace-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  transition: grid-template-columns 180ms ease;
}

.workspace-layout.is-sidebar-collapsed {
  grid-template-columns: 52px minmax(0, 1fr);
}

.workspace-sidebar,
.workspace-main {
  display: grid;
  gap: 16px;
}

.workspace-sidebar {
  grid-template-columns: 52px minmax(0, 1fr);
  align-content: start;
  min-width: 0;
}

.sidebar-content {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.workspace-sidebar.is-collapsed {
  grid-template-columns: 52px;
}

.workspace-sidebar.is-collapsed .sidebar-content {
  display: none;
}

.sidebar-rail {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 12px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  position: sticky;
  top: 18px;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.sidebar-toggle-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}

.sidebar-toggle-glyph {
  font-size: 1.1rem;
  line-height: 1;
}

.workspace-sidebar.is-collapsed .sidebar-toggle-glyph {
  transform: rotate(180deg);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-soft);
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.mobile-sidebar-header {
  display: none;
}

.mobile-sidebar-title {
  display: grid;
  gap: 4px;
}

.mobile-sidebar-title strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  line-height: 1.05;
}

.mobile-sidebar-close {
  white-space: nowrap;
}

.title-stack {
  display: grid;
  gap: 6px;
}

.news-panel-header {
  align-items: start;
}

.news-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.focus-toggle-button {
  white-space: nowrap;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.input-span-2 {
  grid-column: span 2;
}

.input-block {
  display: grid;
  gap: 8px;
}

input,
select,
button,
a {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 12px 14px;
}

select option {
  color: #10161f;
}

input:focus,
select:focus,
button:focus {
  outline: 2px solid rgba(244, 184, 96, 0.45);
  outline-offset: 2px;
}

.toggle-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.84rem;
  color: var(--text);
  touch-action: manipulation;
}

.toggle-pill input {
  width: auto;
  margin: 0;
}

.refresh-button,
.secondary-button,
.ghost-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
}

.refresh-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1f1200;
  font-weight: 600;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

.ghost-button,
.ghost-link {
  background: rgba(143, 217, 255, 0.08);
  color: var(--blue);
  border-color: rgba(143, 217, 255, 0.16);
}

.inline-form,
.settings-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: 110px 1fr auto;
}

.list-block {
  display: grid;
  gap: 8px;
}

.compact-list {
  max-height: 220px;
  overflow-y: auto;
}

.list-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-panel);
}

.list-item-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.small-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 6px 8px;
  font-size: 0.78rem;
  cursor: pointer;
}

.mini-button.danger {
  color: var(--danger);
}

.status-stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.status-stack div {
  display: grid;
  gap: 3px;
}

.main-toolbar {
  display: grid;
  gap: 12px;
}

.chip-group {
  display: grid;
  gap: 8px;
}

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

.chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 7px 10px;
  cursor: pointer;
}

.chip.active {
  border-color: rgba(244, 184, 96, 0.6);
  background: rgba(244, 184, 96, 0.16);
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(15, 36, 46, 0.7), rgba(10, 18, 28, 0.9));
}

.news-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  table-layout: auto;
}

.col-status {
  width: 64px;
}

.col-headline {
  width: 100%;
}

.col-time {
  width: 112px;
}

.col-symbols,
.col-topics {
  width: 108px;
}

.col-priority,
.col-cluster {
  width: 72px;
}

.col-action {
  width: 108px;
}

.news-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 24, 0.96);
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.news-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.news-table tbody tr.row-unread {
  background: rgba(244, 184, 96, 0.04);
}

.news-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.news-table tbody tr.row-pending {
  opacity: 0.72;
}

.news-table tbody tr.selected {
  background: rgba(143, 217, 255, 0.09);
}

.news-table td {
  padding: 10px 10px;
  vertical-align: top;
}

.cell-state,
.cell-priority,
.cell-cluster,
.cell-time,
.cell-symbols,
.cell-topics,
.cell-link {
  white-space: nowrap;
}

.cell-link {
  text-align: right;
}

.cell-headline {
  width: 100%;
  min-width: 540px;
}

.state-stack,
.time-stack {
  display: grid;
  gap: 4px;
}

.state-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.state-dot.unread {
  background: var(--accent);
}

.state-star {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.45);
}

.state-star.is-starred {
  color: var(--accent);
}

.time-date {
  font-size: 0.78rem;
  font-weight: 600;
}

.time-subline {
  font-size: 0.8rem;
  color: var(--muted);
}

.priority-pill,
.cluster-pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.priority-pill {
  min-width: 32px;
  background: linear-gradient(135deg, rgba(244, 184, 96, 0.2), rgba(255, 140, 66, 0.12));
  color: var(--yellow);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cluster-pill {
  min-width: 34px;
  background: linear-gradient(135deg, rgba(143, 217, 255, 0.18), rgba(95, 166, 214, 0.12));
  color: var(--blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.tag.symbol {
  background: rgba(108, 221, 182, 0.16);
  color: var(--green);
}

.tag.topic {
  background: linear-gradient(135deg, rgba(244, 184, 96, 0.22), rgba(255, 140, 66, 0.12));
  color: var(--yellow);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tag.alert {
  background: rgba(255, 150, 143, 0.14);
  color: var(--danger);
}

.tag.empty {
  color: var(--muted);
  cursor: default;
}

.tag.passive {
  cursor: default;
}

.headline-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.source-pill {
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.headline-text {
  display: -webkit-box;
  overflow: hidden;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.headline-summary,
.cluster-preview {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.cluster-preview {
  color: rgba(143, 217, 255, 0.86);
}

.headline-summary.is-empty {
  color: rgba(166, 182, 186, 0.55);
}

.news-link,
.table-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(143, 217, 255, 0.2);
  background: rgba(143, 217, 255, 0.08);
  color: var(--blue);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background-color 120ms ease,
    box-shadow 120ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.table-action-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(143, 217, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(8, 18, 28, 0.2);
}

.mini-button:disabled,
.table-action-button:disabled {
  opacity: 0.65;
  cursor: progress;
}

.action-stack {
  display: grid;
  gap: 7px;
  min-width: 88px;
  justify-self: end;
}

.table-action-button.mark-read {
  background: linear-gradient(135deg, rgba(157, 236, 207, 0.14), rgba(108, 221, 182, 0.08));
  color: var(--green);
  border-color: rgba(157, 236, 207, 0.2);
}

.table-action-button.action-open {
  background: linear-gradient(135deg, rgba(143, 217, 255, 0.16), rgba(95, 166, 214, 0.08));
}

.action-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
}

.action-status-badge.is-complete {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.action-status-badge.is-pending {
  background: rgba(255, 255, 255, 0.06);
  color: var(--blue);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.heatmap-list {
  display: grid;
  gap: 8px;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 110px 1fr 34px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.empty-state {
  padding: 24px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: var(--muted);
  margin-bottom: 16px;
}

.hidden {
  display: none;
}

body.is-news-focus .hero,
body.is-news-focus .workspace-sidebar,
body.is-news-focus .main-toolbar,
body.is-news-focus .panel-grid {
  display: none;
}

body.is-news-focus .page-shell {
  width: min(1720px, calc(100vw - 20px));
  padding-top: 14px;
}

body.is-news-focus .workspace-layout,
body.is-news-focus .workspace-layout.is-sidebar-collapsed {
  grid-template-columns: 1fr;
  margin-top: 0;
}

body.is-news-focus .workspace-main {
  gap: 0;
}

body.is-news-focus .panel {
  border-radius: 28px;
}

body.is-news-focus .table-shell {
  min-height: calc(100vh - 110px);
}

@media (max-width: 1200px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar,
  .workspace-sidebar.is-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar-rail {
    position: static;
    grid-auto-flow: column;
    justify-content: start;
  }

  .sidebar-rail-label {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .workspace-sidebar.is-collapsed .sidebar-content {
    display: grid;
  }

  .hero-panel-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100vw - 12px, 1480px);
    padding-top: max(68px, calc(16px + env(safe-area-inset-top)));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 16px;
    border-radius: 24px;
  }

  .hero-text {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .panel {
    padding: 14px;
    border-radius: 20px;
  }

  .panel-title-row,
  .news-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .title-stack {
    gap: 4px;
  }

  .news-panel-actions {
    width: 100%;
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel-inline,
  .panel-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .input-span-2 {
    grid-column: span 2;
  }

  .workspace-sidebar {
    position: fixed;
    inset: 0;
    display: block;
    pointer-events: none;
    z-index: 50;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(3, 10, 14, 0.68);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    z-index: 45;
  }

  body.is-mobile-sidebar-open {
    overflow: hidden;
  }

  body.is-mobile-sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace-sidebar.is-collapsed .sidebar-content {
    display: none;
  }

  .sidebar-rail {
    position: fixed;
    top: max(10px, calc(10px + env(safe-area-inset-top)));
    left: 8px;
    z-index: 60;
    grid-auto-flow: column;
    justify-content: start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    pointer-events: auto;
    backdrop-filter: blur(14px);
  }

  .sidebar-rail-label {
    writing-mode: horizontal-tb;
    transform: none;
    letter-spacing: 0.12em;
  }

  .sidebar-content {
    position: fixed;
    top: max(66px, calc(58px + env(safe-area-inset-top)));
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    overflow-y: auto;
    padding: 0 4px calc(18px + env(safe-area-inset-bottom)) 4px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(9, 21, 29, 0.98), rgba(7, 17, 24, 0.98));
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
    pointer-events: auto;
    z-index: 55;
    gap: 12px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
  }

  .mobile-sidebar-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
      linear-gradient(180deg, rgba(12, 28, 37, 0.98), rgba(7, 17, 24, 0.98));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
  }

  .mobile-sidebar-close {
    min-height: 44px;
    padding-inline: 16px;
  }

  .sidebar-content .panel {
    box-shadow: none;
  }

  .toggle-row,
  .button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .toggle-pill {
    min-height: 50px;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 0.88rem;
  }

  .toggle-pill input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
  }

  input,
  select {
    min-height: 48px;
    font-size: 16px;
  }

  .refresh-button,
  .secondary-button,
  .ghost-button,
  .ghost-link {
    min-height: 46px;
  }

  .workspace-main {
    gap: 12px;
  }

  .main-toolbar {
    gap: 10px;
  }

  .chip-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .chip-row::-webkit-scrollbar {
    display: none;
  }

  .chip {
    white-space: nowrap;
  }

  .table-shell {
    overflow: visible;
    border-radius: 18px;
  }

  .news-table {
    min-width: 0;
    width: 100%;
  }

  .news-table colgroup,
  .news-table thead {
    display: none;
  }

  .news-table tbody {
    display: grid;
    gap: 12px;
    padding: 10px;
  }

  .news-table tbody tr,
  .news-table tbody tr.row-unread,
  .news-table tbody tr.selected {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas:
      "state headline"
      "time time"
      "symbols symbols"
      "topics topics"
      "priority cluster"
      "actions actions";
    gap: 10px 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
      linear-gradient(180deg, rgba(15, 36, 46, 0.82), rgba(10, 18, 28, 0.94));
  }

  .news-table tbody tr:hover {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
      linear-gradient(180deg, rgba(18, 41, 52, 0.88), rgba(10, 18, 28, 0.96));
  }

  .news-table td {
    padding: 0;
    min-width: 0;
    white-space: normal;
  }

  .cell-state {
    grid-area: state;
    align-self: start;
  }

  .cell-headline {
    grid-area: headline;
    min-width: 0;
  }

  .cell-time {
    grid-area: time;
  }

  .cell-symbols {
    grid-area: symbols;
  }

  .cell-topics {
    grid-area: topics;
  }

  .cell-priority {
    grid-area: priority;
  }

  .cell-cluster {
    grid-area: cluster;
  }

  .cell-link {
    grid-area: actions;
    text-align: left;
  }

  .cell-time::before,
  .cell-symbols::before,
  .cell-topics::before,
  .cell-priority::before,
  .cell-cluster::before,
  .cell-link::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .state-stack {
    justify-items: start;
  }

  .headline-text {
    font-size: 1rem;
    -webkit-line-clamp: 5;
  }

  .headline-summary,
  .cluster-preview {
    font-size: 0.84rem;
    -webkit-line-clamp: 5;
  }

  .source-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(244, 184, 96, 0.14);
  }

  .tag-wrap {
    gap: 7px;
  }

  .action-stack {
    min-width: 0;
    justify-self: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .action-status-badge {
    min-height: 36px;
  }

  .heatmap-row {
    grid-template-columns: 90px 1fr 30px;
  }
}

@media (max-width: 640px) {
  body.is-news-focus .page-shell {
    padding-top: 12px;
  }

  .hero-text {
    display: none;
  }

  .stat-card {
    padding: 14px;
  }

  .news-stat-card {
    padding: 13px;
  }

  .news-stat-card strong {
    font-size: 1rem;
  }

  .news-panel-actions,
  .small-actions {
    grid-template-columns: 1fr;
  }

  .news-table tbody {
    padding: 8px;
  }

  .news-table tbody tr,
  .news-table tbody tr.row-unread,
  .news-table tbody tr.selected {
    grid-template-columns: 1fr;
    grid-template-areas:
      "state"
      "headline"
      "time"
      "symbols"
      "topics"
      "priority"
      "cluster"
      "actions";
    gap: 10px;
  }

  .action-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 399px) {
  .control-grid,
  .inline-form,
  .toggle-row,
  .button-row {
    grid-template-columns: 1fr;
  }

  .input-span-2 {
    grid-column: span 1;
  }
}
