:root {
  color-scheme: dark;
  --paper: #1b1e1c;
  --paper-deep: #222622;
  --ink: #e7e8e3;
  --headline: #d0d4cf;
  --headline-font-size: clamp(19px, 1.65vw, 24px);
  --compact-headline-font-size: clamp(15px, 1.15vw, 17px);
  --muted: #a4a9a4;
  --line: #404640;
  --red: #ff5a4e;
  --red-dark: #ff8178;
  --white: #252925;
  --control-bg: #252925;
  --panel-bg: rgba(231, 232, 227, 0.04);
  --soft-ink: rgba(231, 232, 227, 0.075);
  --warning-text: #f0bc69;
  --inverse-muted: rgba(27, 30, 28, 0.62);
  --skeleton-low: rgba(231, 232, 227, 0.06);
  --skeleton-high: rgba(231, 232, 227, 0.13);
  --new-story-highlight: rgba(255, 90, 78, 0.09);
  --ad-bg: #242822;
  --ad-border: #69705f;
  --ad-label-bg: #e8b24c;
  --ad-label-ink: #1b1e1c;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --paper: #f4f1e9;
  --paper-deep: #e9e4d8;
  --ink: #11110f;
  --headline: #1a1a18;
  --muted: #66645e;
  --line: #d4cfc2;
  --red: #e53b2f;
  --red-dark: #b9261d;
  --white: #fffdf7;
  --control-bg: rgba(255, 253, 247, 0.62);
  --panel-bg: rgba(255, 253, 247, 0.36);
  --soft-ink: rgba(17, 17, 15, 0.055);
  --warning-text: #76551f;
  --inverse-muted: rgba(255, 255, 255, 0.66);
  --skeleton-low: rgba(17, 17, 15, 0.06);
  --skeleton-high: rgba(17, 17, 15, 0.11);
  --new-story-highlight: rgba(229, 59, 47, 0.07);
  --ad-bg: #eee9dc;
  --ad-border: #9c9279;
  --ad-label-bg: #8b5f00;
  --ad-label-ink: #fffdf7;
}

html[data-headline-size="large"] {
  --headline-font-size: clamp(21px, 2vw, 29px);
  --compact-headline-font-size: clamp(17px, 1.4vw, 20px);
}

html[data-headline-size="small"] {
  --headline-font-size: clamp(17px, 1.35vw, 20px);
  --compact-headline-font-size: clamp(13px, 1vw, 15px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 87% 7%, rgba(229, 59, 47, 0.06), transparent 24rem),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 180ms ease, color 180ms ease;
}

button,
input,
select {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(229, 59, 47, 0.55);
  outline-offset: 3px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1460px, calc(100% - 64px));
  margin: 0 auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 33px;
  height: 24px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.brand-mark span {
  display: block;
  width: 7px;
  background: var(--red);
  border-radius: 1px;
}

.brand-mark span:nth-child(1) {
  height: 11px;
}

.brand-mark span:nth-child(2) {
  height: 24px;
}

.brand-mark span:nth-child(3) {
  height: 17px;
}

.brand-name {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.main-nav a {
  padding: 7px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

.main-nav a:hover,
.main-nav a.active {
  border-color: var(--red);
  color: var(--ink);
}

.live-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.live-label i {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(229, 59, 47, 0.12);
  animation: blink 1.8s ease-in-out infinite;
}

.intro {
  min-height: 490px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: center;
  gap: 7vw;
  padding: 72px 0 78px;
  border-bottom: 1px solid var(--ink);
}

.eyebrow,
.section-kicker {
  margin: 0 0 17px;
  color: var(--red-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 850px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(58px, 7.2vw, 112px);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.intro-description {
  max-width: 560px;
  margin: 35px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.pulse-panel {
  min-height: 320px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.pulse-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 32px 32px;
}

.pulse-visual {
  width: 150px;
  height: 150px;
  margin: -8px auto 15px;
  position: relative;
}

.pulse-center,
.pulse-ring {
  position: absolute;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.pulse-center {
  width: 12px;
  height: 12px;
  background: var(--red);
  box-shadow: 0 0 24px rgba(229, 59, 47, 0.9);
}

.pulse-ring {
  border: 1px solid rgba(229, 59, 47, 0.7);
  animation: ripple 3s ease-out infinite;
}

.ring-one {
  animation-delay: 0s;
}

.ring-two {
  animation-delay: 1.5s;
}

.pulse-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.pulse-stats div {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.pulse-stats strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
}

.pulse-stats span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feed-section {
  padding: 68px 0 90px;
}

.feed-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 33px;
}

.feed-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.updated-label {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b7b2a6;
}

.status-dot.online {
  background: #2d9655;
}

.status-dot.warning {
  background: #e49b2e;
}

.category-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 0;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.category-chip {
  min-height: 35px;
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 780;
  transition: 160ms ease;
}

.category-chip::before {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--category-color, var(--ink));
  content: "";
}

.category-chip:hover {
  border-color: #9d998e;
  color: var(--ink);
}

.category-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.category-chip:first-child::before {
  background: var(--red);
}

.category-chip.category-domestic::before { background: #1f6f5c; }
.category-chip.category-international::before { background: #315b9b; }
.category-chip.category-economy::before { background: #8a5a14; }
.category-chip.category-sports::before { background: #167a3f; }
.category-chip.category-culture::before { background: #9a3f72; }
.category-chip.category-technology::before { background: #5550a5; }
.category-chip.category-health::before { background: #a64b3c; }
.category-chip.category-motoring::before { background: #59636d; }
.category-chip.category-other::before { background: #6f6b63; }

.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 19px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--ink);
}

.source-picker {
  min-width: min(520px, 100%);
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  align-items: center;
  gap: 5px 12px;
  flex: 1;
}

.source-picker label {
  color: var(--red-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.source-picker select {
  min-width: 0;
  height: 38px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--control-bg);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.source-picker select:focus {
  border-color: var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: -1px;
}

.source-picker span {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sort-picker select {
  height: 38px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--line);
  background: var(--control-bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
}

.search-box {
  width: 205px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--control-bg);
}

.search-box:focus-within {
  border-color: var(--ink);
}

.search-box svg,
.refresh-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-box input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.search-box input::placeholder {
  color: var(--muted);
}

.refresh-button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: 160ms ease;
}

.refresh-button:hover {
  background: var(--ink);
  color: var(--white);
}

.refresh-button.loading svg {
  animation: spin 800ms linear infinite;
}

.feed-message {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 3px solid #e49b2e;
  background: rgba(228, 155, 46, 0.1);
  color: var(--warning-text);
  font-size: 13px;
  line-height: 1.5;
}

.news-list {
  min-height: 340px;
}

.news-row {
  display: grid;
  grid-template-columns: 96px 86px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  padding: 28px 8px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  position: relative;
  transition:
    background-color 170ms ease,
    padding 170ms ease;
}

.news-row-enter {
  animation: enter 350ms both;
}

.news-row-new::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--red) 0 3px, transparent 3px) left / 100% 100% no-repeat,
    linear-gradient(90deg, var(--new-story-highlight) 0%, transparent 72%);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  animation: new-story-highlight 2300ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.news-row:hover {
  padding-left: 16px;
  padding-right: 16px;
  background: var(--white);
}

.news-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding-top: 3px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-time-value {
  white-space: nowrap;
}

.news-date {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .02em;
  opacity: .78;
  white-space: nowrap;
}

.source-label {
  width: fit-content;
  max-width: 100%;
  margin-top: 1px;
  padding: 5px 7px;
  border-left: 3px solid var(--source-color, var(--ink));
  background: var(--soft-ink);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.source-tone-0 { border-left-color: #1f6f5c; }
.source-tone-1 { border-left-color: #315b9b; }
.source-tone-2 { border-left-color: #8a5a14; }
.source-tone-3 { border-left-color: #8d3f6c; }
.source-tone-4 { border-left-color: #5550a5; }
.source-tone-5 { border-left-color: #a64b3c; }
.source-tone-6 { border-left-color: #59636d; }
.source-tone-7 { border-left-color: #167a3f; }

.news-taxonomy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.article-category {
  max-width: 100%;
  padding-left: 7px;
  border-left: 3px solid var(--category-color, var(--muted));
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.25;
}

.article-category.category-domestic { border-left-color: #1f6f5c; }
.article-category.category-international { border-left-color: #315b9b; }
.article-category.category-economy { border-left-color: #8a5a14; }
.article-category.category-sports { border-left-color: #167a3f; }
.article-category.category-culture { border-left-color: #9a3f72; }
.article-category.category-technology { border-left-color: #5550a5; }
.article-category.category-health { border-left-color: #a64b3c; }
.article-category.category-motoring { border-left-color: #59636d; }
.article-category.category-other { border-left-color: #6f6b63; }

.news-content h3 {
  max-width: 980px;
  margin: 0;
  font-family: var(--serif);
  font-size: var(--headline-font-size);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--headline);
}

.news-description {
  max-width: 850px;
  margin: 9px 0 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: 160ms ease;
}

.news-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-row:hover .news-arrow {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
  transform: translate(2px, -2px);
}

.headline-link {
  text-decoration: none;
}

.headline-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.story-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coverage-label {
  max-width: 100%;
  color: var(--red-dark);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
}

.coverage-toggle {
  min-height: 28px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-underline-offset: 3px;
}

.coverage-toggle::after {
  content: "+";
  display: inline-block;
  margin-left: 4px;
  font-size: 12px;
  line-height: 0;
}

.coverage-toggle[aria-expanded="true"]::after {
  content: "−";
}

.coverage-toggle:hover {
  color: var(--red);
}

.coverage-panel {
  grid-column: 3 / -1;
  min-width: 0;
  margin-top: -7px;
  padding: 14px 16px 8px;
  border-left: 3px solid var(--red);
  background: var(--panel-bg);
}

.coverage-panel-title {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.coverage-source-list {
  display: grid;
}

.coverage-source-link {
  display: grid;
  grid-template-columns: minmax(90px, 130px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 10px 7px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.coverage-source-link:first-child {
  border-top: 0;
}

.coverage-source-link:hover {
  background: var(--soft-ink);
  color: var(--red-dark);
}

.coverage-source-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coverage-source-title {
  overflow: hidden;
  color: var(--headline);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coverage-source-arrow {
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 800;
}

.load-more {
  width: 100%;
  margin-top: 28px;
  padding: 17px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: 160ms ease;
}

.load-more:hover {
  background: var(--ink);
  color: var(--white);
}

.load-more:disabled {
  cursor: wait;
  opacity: .6;
}

.infinite-scroll-sentinel {
  height: 1px;
  position: relative;
  pointer-events: none;
}

html.infinite-scroll-enabled:not(.infinite-scroll-paused) .load-more {
  display: none;
}

html.infinite-scroll-enabled .infinite-scroll-sentinel.loading {
  height: 58px;
}

html.infinite-scroll-enabled .infinite-scroll-sentinel.loading::after {
  position: absolute;
  inset: 18px 0 auto;
  color: var(--muted);
  content: var(--loading-more-label, "Ladataan lisää uutisia…");
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-align: center;
  text-transform: uppercase;
}

.empty-state {
  padding: 90px 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.empty-state strong {
  display: block;
  margin-bottom: 9px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}

.empty-state span {
  color: var(--muted);
  font-size: 13px;
}

/* Source health dashboard */
.dashboard-intro {
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 60px 0 54px;
  border-bottom: 1px solid var(--ink);
}

.dashboard-intro h1 {
  max-width: 800px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(50px, 7vw, 92px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.dashboard-intro p:not(.eyebrow) {
  max-width: 500px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.source-summary {
  min-width: 260px;
  padding: 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}

.source-summary strong {
  display: block;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
}

.source-summary span {
  color: var(--inverse-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sources-section {
  padding: 53px 0 82px;
}

.source-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}

.source-toolbar-heading {
  min-width: 0;
  flex: 1;
}

.source-toolbar h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
}

.source-toolbar input {
  width: min(320px, 100%);
  flex: 0 0 auto;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: var(--white);
}

.source-status-filters {
  max-width: 100%;
  margin-top: 14px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.source-filter-chip {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
}

.source-filter-chip:hover,
.source-filter-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.source-result-count {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-card {
  min-height: 156px;
  min-width: 0;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.source-card:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.source-card-header,
.source-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
}

.source-card-header {
  align-items: flex-start;
}

.source-card h3 {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.source-card p {
  min-height: 34px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.source-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  flex: 0 1 auto;
  overflow-wrap: anywhere;
}

.source-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b7b2a6;
  content: "";
}

.source-status.online::before { background: #2d9655; }
.source-status.warning::before { background: #e49b2e; }
.source-status.error::before { background: #c3453c; }
.source-status.neutral::before { background: #8a867d; }

.source-card-footer {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.source-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.source-actions button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.source-actions button:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }

.skeleton-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  padding: 29px 8px;
  border-bottom: 1px solid var(--line);
}

.skeleton-row > span,
.skeleton-row i,
.skeleton-row b,
.skeleton-row em {
  display: block;
  background: linear-gradient(
    90deg,
    var(--skeleton-low) 25%,
    var(--skeleton-high) 50%,
    var(--skeleton-low) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-row > span {
  width: 55px;
  height: 12px;
}

.skeleton-row div {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 22px;
}

.skeleton-row i {
  width: 50px;
  height: 20px;
}

.skeleton-row b {
  width: min(680px, 86%);
  height: 24px;
}

.skeleton-row em {
  width: min(490px, 66%);
  height: 12px;
  grid-column: 2;
}

footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

footer p {
  margin: 0;
}

footer a,
.information-back {
  color: var(--headline);
  font-weight: 750;
  text-underline-offset: 3px;
}

footer a:hover,
.information-back:hover {
  color: var(--red);
}

.information-header {
  justify-content: space-between;
}

.information-back {
  font-size: 12px;
}

.information-layout {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) 0;
}

.information-layout h1 {
  max-width: 760px;
  margin: 12px 0 28px;
  color: var(--headline);
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.information-lead {
  max-width: 740px;
  margin: 0 0 58px;
  color: var(--headline);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}

.information-layout section {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.information-layout h2 {
  margin: 0 0 14px;
  color: var(--headline);
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
}

.information-layout section p {
  max-width: 720px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.information-layout section p:last-child {
  margin-bottom: 0;
}

.sr-only {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes blink {
  50% {
    opacity: 0.45;
  }
}

@keyframes ripple {
  0% {
    width: 16px;
    height: 16px;
    opacity: 0.9;
  }
  100% {
    width: 150px;
    height: 150px;
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes new-story-highlight {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 0.9;
  }
  32% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 1040px) {
  .page-shell {
    width: min(100% - 40px, 1460px);
  }

  .intro {
    grid-template-columns: 1fr 330px;
    gap: 40px;
  }

  .toolbar {
    display: block;
  }

  .toolbar-actions {
    margin-top: 16px;
  }

  .source-picker {
    width: 100%;
  }

  .search-box {
    flex: 1;
    width: auto;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 28px, 1460px);
  }

  .site-header {
    min-height: 75px;
  }

  .header-date {
    display: none;
  }

  .header-meta {
    gap: 0;
    font-size: 10px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    margin: -6px 0 10px;
    gap: 15px;
  }

  .site-header {
    min-height: 104px;
    flex-wrap: wrap;
  }

  .intro {
    min-height: auto;
    display: block;
    padding: 55px 0;
  }

  .intro h1 {
    font-size: clamp(52px, 15vw, 78px);
    line-height: 0.9;
  }

  .intro-description {
    margin-top: 25px;
    font-size: 15px;
  }

  .pulse-panel {
    min-height: 210px;
    margin-top: 42px;
  }

  .pulse-visual {
    width: 90px;
    height: 90px;
    margin: -15px auto 5px;
  }

  .pulse-stats strong {
    font-size: 29px;
  }

  .feed-section {
    padding: 51px 0 70px;
  }

  .feed-heading {
    display: block;
  }

  .updated-label {
    margin-top: 15px;
  }

  .source-picker {
    display: block;
    min-width: 0;
  }

  .source-picker label,
  .source-picker span {
    display: block;
  }

  .source-picker select {
    width: 100%;
    margin: 7px 0 6px;
  }

  .toolbar-actions {
    min-width: 0;
    flex-wrap: wrap;
  }

  .search-box {
    min-width: 0;
    flex: 1 1 100%;
  }

  .refresh-button span {
    display: none;
  }

  .refresh-button {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .sort-picker {
    min-width: 0;
    flex: 1 1 0;
  }

  .sort-picker select {
    width: 100%;
  }

  .news-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 22px 3px;
  }

  .news-row:hover {
    padding-left: 7px;
    padding-right: 7px;
  }

  .news-taxonomy {
    grid-column: 2;
    grid-row: 1;
    margin: 0 0 8px;
  }

  .news-time {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .news-content {
    grid-column: 2;
    grid-row: 2;
  }

  .news-content h3 {
    font-size: var(--headline-font-size);
  }

  .news-description {
    display: none;
  }

  .story-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
    flex-direction: column-reverse;
  }

  .coverage-panel {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 3px;
  }

  .news-arrow {
    width: 27px;
    height: 27px;
  }

  .news-arrow::before {
    width: 44px;
    height: 44px;
    position: absolute;
    top: 50%;
    left: 50%;
    content: "";
    transform: translate(-50%, -50%);
  }

  footer {
    padding: 28px 0;
    display: block;
  }

  footer p + p {
    margin-top: 9px;
  }

  .dashboard-intro {
    display: block;
    min-height: 0;
    padding: 45px 0;
  }

  .source-summary {
    min-width: 0;
    margin-top: 30px;
  }

  .source-toolbar {
    display: block;
  }

  .source-toolbar input {
    width: 100%;
    margin-top: 14px;
  }

  .source-status-filters {
    margin-right: -14px;
    padding-right: 14px;
  }

  .source-grid { grid-template-columns: 1fr; }
  .source-card:nth-child(odd) { border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .news-row-new::after {
    right: auto;
    width: 3px;
    background: var(--red);
    opacity: 0.45;
    animation: none !important;
  }
}

/* Compact timeline with a collapsible filter sidebar */
.site-header {
  min-height: 72px;
}

.timeline-header {
  display: grid;
  grid-template-columns: max-content minmax(220px, 420px) max-content;
  justify-content: space-between;
  column-gap: clamp(12px, 2vw, 28px);
}

.timeline-header .main-nav {
  margin-left: 0;
}

.header-search {
  min-width: 0;
  width: 100%;
  height: 40px;
  margin: 0;
  justify-self: center;
  background: var(--white);
}

.header-search input {
  min-width: 0;
}

.sidebar-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.sidebar-toggle:hover,
.sidebar-toggle[aria-expanded="true"] {
  background: var(--ink);
  color: var(--white);
}

.theme-toggle,
.headline-size-toggle,
.view-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.theme-toggle:hover,
.headline-size-toggle:hover,
.view-toggle:hover,
.view-toggle[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.theme-toggle span,
.headline-size-toggle span,
.view-toggle span {
  min-width: 0;
  padding: 0;
  display: inline-block;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.theme-toggle-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  position: relative;
  border: 1.5px solid currentColor !important;
  border-radius: 50% !important;
}

html[data-theme="dark"] .theme-toggle-icon {
  background: currentColor;
  box-shadow:
    0 -5px 0 -4px currentColor,
    0 5px 0 -4px currentColor,
    5px 0 0 -4px currentColor,
    -5px 0 0 -4px currentColor;
}

html[data-theme="light"] .theme-toggle-icon::after {
  width: 10px;
  height: 10px;
  position: absolute;
  top: -3px;
  right: -3px;
  border-radius: 50%;
  background: var(--white);
  content: "";
}

.theme-toggle:hover .theme-toggle-icon::after {
  background: var(--ink);
}

.headline-size-icon {
  min-width: 20px !important;
  display: inline-flex !important;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  line-height: 1;
  letter-spacing: -.08em;
}

.headline-size-icon strong {
  font-size: 15px;
  font-weight: 900;
}

.headline-size-icon small {
  font-size: 9px;
  font-weight: 850;
}

.view-toggle-icon {
  width: 16px;
  height: 14px;
  display: grid !important;
  align-content: center;
  gap: 3px;
  transition: gap 160ms ease;
}

.view-toggle-icon i {
  width: 16px;
  height: 1px;
  display: block;
  background: currentColor;
}

.view-toggle[aria-pressed="true"] .view-toggle-icon {
  gap: 1px;
}

.sidebar-toggle span {
  min-width: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.sidebar-toggle-icon {
  width: 15px;
  display: grid !important;
  gap: 3px;
}

.sidebar-toggle-icon i {
  width: 15px;
  height: 1px;
  display: block;
  background: currentColor;
}

.timeline-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: 0 minmax(0, 1fr);
  column-gap: 0;
  position: relative;
  transition: grid-template-columns 180ms ease, column-gap 180ms ease;
}

.timeline-layout.sidebar-open {
  grid-template-columns: 292px minmax(0, 1fr);
  column-gap: 32px;
}

.timeline-main {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
  padding: 0 0 82px;
}

.timeline-main > .news-list {
  min-height: 340px;
}

.category-sidebar {
  min-width: 0;
  width: 100%;
  max-height: 100vh;
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: 0;
  padding: 25px 24px 55px 0;
  overflow-x: hidden;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  border-right: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-18px);
  transition: opacity 160ms ease, transform 180ms ease, visibility 180ms ease;
}

.category-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.timeline-layout.sidebar-open .category-sidebar {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.timeline-layout:not(.sidebar-open) .category-sidebar {
  height: 0;
  padding-right: 0;
  overflow: hidden;
  border-right: 0;
  pointer-events: none;
}

.sidebar-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sidebar-heading .section-kicker {
  margin-bottom: 7px;
}

.sidebar-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.02;
}

.sort-tabs {
  width: 100%;
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.sort-tab {
  min-width: 0;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sort-tab + .sort-tab {
  border-left: 0;
}

.sort-tab:hover {
  color: var(--ink);
}

.sort-tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.sort-tabs + .sidebar-status {
  margin-top: 16px;
}

.sidebar-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.sidebar-close:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.sidebar-status {
  margin-top: 22px;
  padding: 15px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.sidebar-status .updated-label {
  margin: 0;
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.45;
}

.sidebar-status .status-dot {
  margin-top: 4px;
  flex: 0 0 auto;
}

.sidebar-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.sidebar-section > h3 {
  margin: 0 0 12px;
  color: var(--red-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.category-sidebar .category-filters {
  display: grid;
  align-items: stretch;
  gap: 6px;
  padding: 0;
  overflow: visible;
  border: 0;
}

.category-sidebar .category-chip {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 0;
  text-align: left;
}

.sidebar-controls {
  display: grid;
  gap: 15px;
}

.sidebar-controls > h3 {
  margin-bottom: -3px;
}

.sidebar-field {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.category-sidebar .search-box {
  height: auto;
}

.category-sidebar .source-picker {
  min-width: 0;
  width: 100%;
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  flex: none;
}

.category-sidebar .source-picker > span {
  grid-column: 1;
  margin: 0;
}

.sidebar-field > span,
.category-sidebar .source-picker > span {
  grid-column: auto;
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.search-input-wrap {
  width: 100%;
  height: 42px;
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: var(--white);
}

.search-input-wrap:focus-within {
  border-color: var(--ink);
}

.sidebar-field input,
.sidebar-field select,
.category-sidebar .source-picker select,
.category-sidebar .sort-picker select {
  min-width: 0;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}

.search-input-wrap input {
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  outline: 0;
}

.category-sidebar .refresh-button {
  width: 100%;
  height: 42px;
  justify-content: center;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 900px) {
  body.sidebar-modal-open {
    overflow: hidden;
  }

  .site-header {
    min-height: 72px;
  }

  .timeline-layout,
  .timeline-layout.sidebar-open {
    display: block;
  }

  .timeline-main {
    padding: 0 0 68px;
  }

  .category-sidebar,
  .timeline-layout:not(.sidebar-open) .category-sidebar {
    width: min(88vw, 350px);
    height: 100dvh;
    max-height: none;
    display: block;
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    padding: 24px 22px 56px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-right: 1px solid var(--ink);
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-105%);
    pointer-events: none;
  }

  .timeline-layout.sidebar-open .category-sidebar {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
  }

  .sidebar-backdrop {
    width: 100%;
    height: 100%;
    display: block;
    position: fixed;
    z-index: 40;
    inset: 0;
    border: 0;
    background: rgba(17, 17, 15, .45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 160ms ease, visibility 160ms ease;
  }

  .timeline-layout.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 72px;
    flex-wrap: nowrap;
  }

  .timeline-header {
    min-height: 0;
    padding: 12px 0;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
  }

  .timeline-header .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .timeline-header .main-nav {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .timeline-header .header-search {
    max-width: none;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .main-nav {
    width: auto;
    order: initial;
    margin: 0 0 0 auto;
    gap: 8px;
  }

  .sidebar-toggle {
    min-height: 36px;
  }

  .theme-toggle,
  .headline-size-toggle,
  .view-toggle {
    min-height: 36px;
  }

  .sidebar-toggle,
  .theme-toggle,
  .headline-size-toggle,
  .view-toggle,
  .sidebar-close {
    position: relative;
  }

  .sidebar-toggle::after,
  .theme-toggle::after,
  .headline-size-toggle::after,
  .view-toggle::after,
  .sidebar-close::after {
    width: 44px;
    height: 44px;
    position: absolute;
    top: 50%;
    left: 50%;
    content: "";
    transform: translate(-50%, -50%);
  }

  .header-meta {
    display: none;
  }

  .timeline-main .news-row:first-child {
    border-top: 0;
  }
}

@media (max-width: 520px) {
  .coverage-source-link {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }

  .coverage-source-title {
    grid-column: 1 / -1;
    grid-row: 2;
    white-space: normal;
  }

  .theme-toggle,
  .headline-size-toggle,
  .view-toggle,
  .sidebar-toggle {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .theme-toggle [data-theme-label],
  .headline-size-toggle [data-headline-size-label],
  .view-toggle [data-view-label],
  .sidebar-toggle > span:last-child {
    display: none;
  }

  .main-nav a {
    font-size: 10px;
  }
}

/* First-party direct advertising. Units are created only for eligible campaigns. */
.page-shell {
  position: relative;
}

.ad-unit {
  overflow: hidden;
  border: 1px solid var(--ad-border);
  border-radius: 10px;
  color: var(--ink);
  background: var(--ad-bg);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
}

.ad-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ad-disclosure {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--ad-label-ink);
  background: var(--ad-label-bg);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
}

.ad-advertiser {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-media-link,
.ad-headline-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ad-creative {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  background: rgba(0, 0, 0, .08);
}

.ad-copy {
  min-width: 0;
  padding: 12px;
}

.ad-headline {
  margin: 0;
  color: var(--headline);
  font-family: var(--serif);
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.16;
}

.ad-headline-link:hover .ad-headline,
.ad-headline-link:focus-visible .ad-headline {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ad-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ad-destination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
}

.ad-destination {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-cta {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 5px;
  color: #fff;
  background: var(--red-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.ad-cta:hover,
.ad-cta:focus-visible {
  filter: brightness(1.08);
}

.ad-top-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  margin: 18px auto 0;
  max-width: 1120px;
}

.ad-top-banner .ad-heading {
  grid-column: 1 / -1;
}

.ad-top-banner .ad-media-link {
  align-self: stretch;
  padding: 8px 0 10px 10px;
}

.ad-top-banner .ad-creative {
  height: 124px;
  max-height: 124px;
}

.ad-top-banner .ad-copy {
  align-self: center;
  padding: 12px 18px 16px;
}

.ad-side-rail {
  position: absolute;
  width: 300px;
  max-height: 600px;
}

.ad-side-rail .ad-heading {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.ad-side-rail .ad-creative {
  max-height: 300px;
}

.ad-side-rail .ad-headline {
  font-size: 18px;
}

.ad-side-rail .ad-destination-row {
  align-items: stretch;
  flex-direction: column;
}

.ad-side-rail .ad-cta {
  text-align: center;
}

.ad-sponsored-feed {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  margin: 13px 0;
  border-left: 4px solid var(--ad-label-bg);
}

.ad-sponsored-feed .ad-heading {
  grid-column: 1 / -1;
}

.ad-sponsored-feed .ad-media-link {
  align-self: stretch;
  padding: 8px 0 10px 10px;
}

.ad-sponsored-feed .ad-creative {
  height: 130px;
  max-height: 130px;
}

html[data-view="compact"] .ad-sponsored-feed {
  grid-template-columns: 110px minmax(0, 1fr);
  margin: 8px 0;
}

html[data-view="compact"] .ad-sponsored-feed .ad-creative {
  height: 100px;
}

html[data-view="compact"] .ad-sponsored-feed .ad-headline {
  font-size: var(--compact-headline-font-size);
}

@media (max-width: 1100px) {
  .ad-side-rail {
    display: none;
  }
}

@media (max-width: 760px) {
  .ad-top-banner,
  .ad-sponsored-feed,
  html[data-view="compact"] .ad-sponsored-feed {
    grid-template-columns: 1fr;
  }

  .ad-top-banner {
    margin-top: 10px;
  }

  .ad-top-banner .ad-heading,
  .ad-sponsored-feed .ad-heading {
    grid-column: 1;
  }

  .ad-top-banner .ad-media-link,
  .ad-sponsored-feed .ad-media-link {
    padding: 8px 10px 0;
  }

  .ad-top-banner .ad-creative,
  .ad-sponsored-feed .ad-creative,
  html[data-view="compact"] .ad-sponsored-feed .ad-creative {
    height: auto;
    max-height: 180px;
  }

  .ad-top-banner .ad-copy,
  .ad-sponsored-feed .ad-copy {
    padding: 10px 12px 12px;
  }

  .ad-headline {
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .ad-description {
    display: none;
  }

  .ad-destination-row {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .ad-cta {
    text-align: center;
  }
}

.ad-preview-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
}

.ad-preview-notice {
  margin: 0 0 16px;
  color: var(--warning-text);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ad-preview-shell .ad-side-rail {
  position: static;
}

.ad-admin-shell {
  width: min(1120px, 100%);
  margin: 40px auto 80px;
}

.ad-admin-intro,
.ad-admin-panel {
  margin-bottom: 24px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-bg);
}

.ad-admin-intro h1,
.ad-admin-panel h2,
.ad-admin-panel h3 {
  margin-top: 0;
}

.ad-admin-auth,
.ad-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ad-admin-auth {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 20px;
}

.ad-admin-form--compact {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
}

.ad-admin-form label,
.ad-admin-auth label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.ad-admin-form input,
.ad-admin-form select,
.ad-admin-form textarea,
.ad-admin-auth input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--control-bg);
}

.ad-admin-form textarea {
  resize: vertical;
}

.ad-admin-wide {
  grid-column: 1 / -1;
}

.ad-admin-panel-heading,
.ad-admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ad-admin-panel-heading h2,
.ad-admin-panel-heading h3 {
  margin-bottom: 0;
}

.ad-admin-message {
  min-height: 1.5em;
  color: var(--muted);
}

.ad-admin-message--error {
  color: var(--red);
}

.ad-admin-status {
  padding: 12px;
  border: 1px solid var(--warning-text);
  border-radius: 6px;
  color: var(--warning-text);
  font-weight: 800;
}

.ad-admin-status--enabled {
  border-color: #62ad77;
  color: #62ad77;
}

.ad-campaign-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.ad-campaign-admin-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.ad-campaign-meta,
.ad-campaign-eligibility,
.ad-campaign-metrics {
  color: var(--muted);
  font-size: 13px;
}

.ad-campaign-metrics {
  color: var(--ink);
  font-weight: 800;
}

.ad-admin-badge {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.ad-admin-badge--active {
  border-color: #62ad77;
  color: #62ad77;
}

.ad-admin-small-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--control-bg);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.ad-admin-small-button--danger {
  border-color: var(--red);
  color: var(--red);
}

.ad-preview-frame {
  width: 100%;
  min-height: 720px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

@media (max-width: 760px) {
  .ad-admin-auth,
  .ad-admin-form,
  .ad-admin-form--compact {
    grid-template-columns: 1fr;
  }

  .ad-admin-wide {
    grid-column: 1;
  }
}

.back-to-top {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  position: fixed;
  z-index: 30;
  right: max(14px, calc((100vw - 1460px) / 2));
  bottom: 20px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease, background-color 160ms ease;
}

.back-to-top.visible {
  opacity: .88;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--red);
  border-color: var(--red);
  opacity: 1;
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 520px) {
  .back-to-top {
    width: 36px;
    height: 36px;
    right: 12px;
    bottom: 12px;
  }
}

/* Alternate dense news list */
html[data-view="compact"] .news-row {
  grid-template-columns: 74px 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 6px;
}

html[data-view="compact"] .news-row:hover {
  padding-left: 10px;
  padding-right: 10px;
}

html[data-view="compact"] .news-time {
  gap: 1px;
  padding-top: 0;
  font-size: 10px;
}

html[data-view="compact"] .news-date {
  font-size: 8px;
}

html[data-view="compact"] .news-taxonomy {
  gap: 4px;
}

html[data-view="compact"] .source-label {
  padding: 3px 5px;
  font-size: 8px;
}

html[data-view="compact"] .article-category,
html[data-view="compact"] .coverage-label {
  font-size: 8px;
}

html[data-view="compact"] .news-content h3 {
  font-family: var(--sans);
  font-size: var(--compact-headline-font-size);
  font-weight: 720;
  letter-spacing: -0.012em;
  line-height: 1.28;
}

html[data-view="compact"] .news-description {
  display: none;
}

html[data-view="compact"] .news-arrow {
  width: 26px;
  height: 26px;
}

html[data-view="compact"] .news-arrow svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 980px) and (min-width: 521px) {
  .timeline-header .theme-toggle,
  .timeline-header .headline-size-toggle,
  .timeline-header .view-toggle,
  .timeline-header .sidebar-toggle {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .timeline-header .theme-toggle [data-theme-label],
  .timeline-header .headline-size-toggle [data-headline-size-label],
  .timeline-header .view-toggle [data-view-label],
  .timeline-header .sidebar-toggle > span:last-child {
    display: none;
  }
}

@media (max-width: 760px) {
  html[data-view="compact"] .news-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 3px;
  }

  html[data-view="compact"] .news-row:hover {
    padding-left: 6px;
    padding-right: 6px;
  }

  html[data-view="compact"] .news-taxonomy {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-bottom: 5px;
  }

  html[data-view="compact"] .news-content h3 {
    font-size: var(--compact-headline-font-size);
    line-height: 1.3;
  }

  html[data-view="compact"] .news-arrow {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 520px) {
  .timeline-header {
    column-gap: 8px;
  }

  .timeline-header .brand {
    gap: 8px;
  }

  .timeline-header .brand-mark {
    width: 28px;
  }

  .timeline-header .brand-name {
    font-size: 16px;
    letter-spacing: .13em;
  }

  .timeline-header .main-nav {
    gap: 4px;
  }

  .theme-toggle,
  .headline-size-toggle,
  .view-toggle,
  .sidebar-toggle {
    width: 32px;
    min-height: 34px;
  }
}
