:root {
  --headline-page-max: 1280px;
  --headline-grid-gap: 18px;
  --headline-rule: rgba(15, 25, 35, 0.18);
  --headline-muted-rule: rgba(15, 25, 35, 0.1);
  --headline-panel-bg: rgba(255, 255, 255, 0.62);
}

.headline-desk,
.headline-desk__inner,
.headline-desk__top,
.headline-desk__title,
.headline-desk__controls,
.headline-layout,
.headline-columns,
.lead-package,
.lead-package__grid,
.latest-panel,
.sector-rail,
.headline-layout .feed {
  min-width: 0;
  max-width: 100%;
}

.headline-desk {
  position: relative;
  z-index: 70;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.headline-desk__inner {
  width: min(100%, var(--headline-page-max));
  margin: 0 auto;
  padding: 18px 24px 14px;
}

.headline-desk__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 22px;
  align-items: end;
  border-bottom: 1px solid var(--headline-rule);
  padding-bottom: 14px;
}

.headline-desk__eyebrow,
.headline-desk__status-label,
.latest-panel-kicker,
.sector-rail__kicker,
.lead-package__kicker,
.feed-cat-label,
.feed-cat-event,
.feed-meta,
.feed-chip,
.load-more-btn,
.latest-panel-count,
.sector-card__latest-meta {
  font-family: var(--font-mono);
  font-size: var(--type-meta);
  letter-spacing: var(--tracking-label);
  line-height: var(--leading-meta);
}

.headline-desk__eyebrow,
.latest-panel-kicker,
.sector-rail__kicker,
.lead-package__kicker {
  display: inline-block;
  color: var(--color-amber);
  text-transform: uppercase;
}

.headline-desk__headline {
  margin: 5px 0 0;
  font-family: var(--font-serif);
  font-size: var(--type-page-title);
  font-weight: 600;
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-none);
}

.headline-desk__status {
  display: grid;
  gap: 5px;
  justify-items: end;
  text-align: right;
  color: var(--color-subtext);
}

.headline-desk__status-label {
  color: var(--color-primary);
  text-transform: uppercase;
}

#status-line {
  max-width: none;
  width: auto;
  font-family: var(--font-mono);
  font-size: var(--type-meta);
  letter-spacing: var(--tracking-meta);
  line-height: var(--leading-meta);
  color: var(--color-subtext);
}

.headline-desk__controls {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding-top: 12px;
}

.headline-desk__controls > *,
.headline-desk .filter-wrap,
.desk-search,
.headline-columns > *,
.lead-package__grid > * {
  min-width: 0;
}

.desk-search,
.headline-desk .filter-wrap {
  background: var(--color-surface);
  border: 1px solid var(--headline-rule);
}

.desk-search {
  display: flex;
  align-items: center;
  min-height: 46px;
}

.desk-search .nav-search-inner {
  width: 100%;
}

.desk-search .headline-search {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-primary);
  padding: 0 58px 0 42px;
  font-size: var(--type-ui);
}

.desk-search .headline-search::placeholder {
  color: rgba(94, 107, 118, 0.72);
}

.desk-search .headline-search:focus {
  background: transparent;
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--color-amber);
}

.desk-search .nav-search-icon {
  left: 17px;
  right: auto;
  color: var(--color-subtext);
  stroke: currentColor;
}

.desk-search .search-kbd {
  right: 13px;
  color: var(--color-subtext);
}

.headline-desk .filter-wrap {
  border-bottom: 1px solid var(--headline-rule);
}

@media (min-width: 641px) {
  .headline-desk .filter-bar {
    min-height: 46px;
    padding: 0 12px;
    gap: 12px;
  }

  .headline-desk .filter-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 6px;
    border-bottom-color: transparent;
    border-bottom-style: solid;
  }

  .headline-desk .filter-pill::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 7px;
    height: 2px;
    background: transparent;
    pointer-events: none;
    transition: background-color 180ms ease;
  }

  .headline-desk .filter-pill.is-selected,
  .headline-desk .filter-pill.is-partial {
    border-bottom-color: transparent;
  }

  .headline-desk .filter-pill.is-selected::after {
    background: currentColor;
  }

  .headline-desk .filter-pill.is-partial::after {
    background: repeating-linear-gradient(
      90deg,
      currentColor 0 5px,
      transparent 5px 9px
    );
  }

  .headline-desk .filter-layer.open {
    padding: 12px 12px 14px;
    background: var(--color-surface);
  }
}

.headline-desk .country-chip-bar {
  background: transparent;
  border-bottom: 0;
  padding: 10px 0 0;
}

.headline-layout {
  width: min(100%, var(--headline-page-max));
  margin: 0 auto;
  padding: 22px 24px 38px;
}

.lead-package {
  margin-bottom: 20px;
}

.lead-package[hidden] {
  display: none;
}

.lead-package__head,
.latest-panel-head,
.sector-rail__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--headline-rule);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.lead-package__head h2,
.latest-panel-head h2,
.sector-rail__head h2 {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--type-panel-title);
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-none);
}

.lead-package__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  border: 1px solid var(--headline-rule);
  background: var(--color-surface);
}

.lead-package__primary {
  min-width: 0;
  border-right: 1px solid var(--headline-rule);
}

.lead-package__side {
  display: grid;
  min-width: 0;
}

.lead-package__side .feed-item + .feed-item {
  border-top: 1px solid var(--headline-rule);
}

.headline-columns {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.latest-panel {
  grid-column: 2;
  grid-row: 1;
}

.sector-rail,
.latest-panel {
  min-width: 0;
}

.sector-rail {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: calc(var(--nav-height) + 18px);
}

.sector-rail__body {
  display: grid;
  gap: 8px;
}

.sector-card {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 118px;
  appearance: none;
  border: 1px solid var(--headline-muted-rule);
  border-left: 3px solid var(--sector-accent, var(--color-border));
  border-radius: 0;
  background: rgba(255, 255, 255, 0.46);
  color: var(--color-primary);
  text-align: left;
  padding: 12px 13px;
  cursor: pointer;
}

.sector-card:hover {
  border-color: var(--headline-rule);
  background: var(--color-surface);
}

.sector-card:focus-visible {
  outline: 2px solid rgba(15, 25, 35, 0.28);
  outline-offset: 2px;
}

.sector-card:disabled {
  cursor: default;
  opacity: 0.5;
}

.sector-card__top {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.sector-card__label {
  font-family: var(--font-sans);
  font-size: var(--type-ui);
  font-weight: 600;
  line-height: var(--leading-meta);
}

.sector-card__latest {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--type-small-title);
  font-weight: 600;
  line-height: 1.28;
}

.sector-card__latest-meta {
  color: var(--color-subtext);
}

.latest-panel-head {
  margin-bottom: 0;
}

.latest-panel-count {
  margin: 0;
  color: var(--color-subtext);
  text-align: right;
}

.headline-layout .feed {
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--color-surface);
  border-left: 1px solid var(--headline-rule);
  border-right: 1px solid var(--headline-rule);
}

.feed-item {
  padding: 18px 20px;
  border-bottom: 1px solid var(--headline-rule);
  background: var(--color-surface);
}

.feed-item--lead,
.feed-item--support {
  border-bottom: 0;
}

.feed-item--lead {
  min-height: 100%;
  padding: 24px;
}

.feed-item--lead.has-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.58fr);
  gap: 22px;
  align-items: stretch;
}

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

.feed-visual {
  position: relative;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--headline-muted-rule);
}

.feed-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}

.feed-visual figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 6px;
  background: rgba(15, 25, 35, 0.72);
  color: rgba(255, 255, 255, 0.84);
  font-family: var(--font-mono);
  font-size: var(--type-meta);
  line-height: var(--leading-meta);
}

.feed-visual figcaption a {
  color: inherit;
  text-decoration-color: rgba(232, 160, 32, 0.9);
  text-underline-offset: 2px;
}

.feed-item--support {
  padding: 20px;
}

.feed-cat {
  margin-bottom: 10px;
}

.feed-cat-dot {
  width: 8px;
  height: 8px;
}

.feed-cat-label,
.feed-cat-event {
  color: var(--color-subtext);
}

.feed-new-badge {
  margin-left: 6px;
}

.feed-headline {
  margin: 0 0 9px;
  font-size: var(--type-card-title);
  line-height: 1.32;
}

.feed-item--lead .feed-headline {
  font-size: var(--type-section-title);
  line-height: var(--leading-title);
  max-width: 820px;
}

.feed-item--support .feed-headline {
  font-size: var(--type-panel-title);
  line-height: 1.22;
}

.feed-item--support .feed-summary,
.feed-item--support .feed-chips {
  display: none;
}

.feed-summary {
  max-width: 760px;
  margin: 0 0 12px;
  color: var(--color-primary-soft);
  font-size: var(--type-body-small);
  line-height: var(--leading-body);
  -webkit-line-clamp: 3;
}

.feed-item--lead .feed-summary {
  font-size: var(--type-body);
  -webkit-line-clamp: 4;
}

.feed-item--support .feed-summary {
  -webkit-line-clamp: 2;
}

.feed-meta {
  color: var(--color-subtext);
}

.headline-layout .feed-time-exact,
.lead-package .feed-time-exact {
  display: none;
}

.feed-chips {
  margin-top: 12px;
}

.feed-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 0;
  background: rgba(15, 25, 35, 0.035);
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.feed-chip-module {
  color: var(--color-primary);
  background: rgba(232, 160, 32, 0.1);
}

.feed-chip,
.feed-chip-module {
  border-radius: 999px;
  padding: 6px 11px;
}

a.feed-chip:hover {
  color: var(--color-primary);
  border-color: rgba(232, 160, 32, 0.5);
  background: rgba(232, 160, 32, 0.16);
}

a.feed-chip:focus-visible {
  outline: 2px solid rgba(15, 25, 35, 0.28);
  outline-offset: 2px;
}

.feed-loading,
.feed-error,
.feed-empty {
  padding: 34px 20px;
  border: 1px solid var(--headline-rule);
  background: var(--color-surface);
  line-height: var(--leading-body);
}

.load-more-wrap {
  max-width: none;
  margin: 0;
  padding: 14px 0 0;
  text-align: left;
}

.load-more-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--headline-rule);
  background: var(--color-bg);
  color: var(--color-primary);
}

.load-more-btn:not(.exhausted):hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
}

.load-more-btn.exhausted {
  opacity: 0.58;
}

.country-popover {
  border-radius: 0;
}

.country-option-check,
.country-active-chip,
.country-search-input {
  border-radius: 0;
}

.footer {
  width: min(100%, var(--headline-page-max));
  margin: 18px auto 0;
}

@media (max-width: 1080px) {
  .lead-package__grid,
  .headline-columns {
    grid-template-columns: 1fr;
  }

  .lead-package__primary {
    border-right: 0;
    border-bottom: 1px solid var(--headline-rule);
  }

  .sector-rail {
    position: static;
  }

  .latest-panel,
  .sector-rail {
    grid-column: 1;
    grid-row: auto;
  }

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

@media (max-width: 700px) {
  .headline-desk__top,
  .headline-desk__controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .headline-desk__status {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 820px) {
  .feed-item--lead.has-visual {
    display: block;
  }

  .feed-visual {
    display: none;
  }

  .headline-columns {
    display: flex;
    flex-direction: column;
  }

  .latest-panel {
    order: 1;
  }

  .sector-rail {
    order: 2;
  }

  .latest-panel .feed > .feed-item:nth-child(-n + 3) {
    display: none;
  }

  .sector-rail__body {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 1px 1px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .sector-rail__body::-webkit-scrollbar {
    display: none;
  }

  .sector-card {
    flex: 0 0 min(300px, 78vw);
    min-height: 104px;
    scroll-snap-align: start;
  }

  .desk-search .search-kbd {
    display: none;
  }

  .desk-search .headline-search {
    padding-right: 14px;
  }
}

@media (max-width: 640px) {
  .headline-desk__inner,
  .headline-layout {
    width: 100%;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .headline-desk__inner {
    padding-top: 14px;
    padding-bottom: 12px;
  }

  .headline-desk__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 6px;
    padding-bottom: 12px;
  }

  .headline-desk__eyebrow,
  .lead-package__kicker,
  .latest-panel-kicker,
  .sector-rail__kicker,
  .feed-cat-label,
  .feed-cat-event {
    font-size: 12px;
  }

  .headline-desk__status {
    width: 100%;
    max-width: none;
    gap: 0;
    justify-items: start;
    text-align: left;
  }

  .headline-desk__status-label {
    display: none;
  }

  #status-line {
    width: 100%;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .headline-desk__headline {
    margin-top: 3px;
    font-size: 30px;
    line-height: 1.1;
  }

  .headline-desk__controls {
    gap: 8px;
    padding-top: 10px;
  }

  .desk-search.nav-search {
    display: flex;
    width: 100%;
    min-height: 46px;
  }

  .desk-search .headline-search {
    height: 46px;
    padding-right: 12px;
    font-size: 16px;
  }

  .headline-desk .filter-wrap {
    width: 100%;
    border: 1px solid var(--headline-rule);
  }

  .headline-desk .filter-bar,
  .headline-desk .filter-chip-row,
  .country-chip-list {
    max-width: 100%;
  }

  .country-search-input {
    min-height: 44px;
    font-size: 16px;
  }

  .country-option {
    min-height: 44px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .country-chip-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .country-chip-list::-webkit-scrollbar {
    display: none;
  }

  .country-active-chip {
    flex: 0 0 auto;
    min-height: 44px;
    padding-block: 0;
  }

  .country-active-chip-dismiss {
    width: 44px;
    min-height: 44px;
    margin-right: -8px;
  }

  .country-chip-clear {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .headline-layout {
    padding-top: 18px;
    padding-bottom: calc(36px + env(safe-area-inset-bottom));
  }

  .headline-columns {
    width: 100%;
    gap: 28px;
  }

  .lead-package__head,
  .latest-panel-head,
  .sector-rail__head {
    min-width: 0;
    margin-bottom: 0;
    padding-bottom: 9px;
  }

  .lead-package__head,
  .sector-rail__head {
    align-items: end;
    flex-direction: row;
  }

  .latest-panel-head {
    align-items: end;
    flex-direction: row;
  }

  .lead-package__head h2,
  .latest-panel-head h2,
  .sector-rail__head h2 {
    font-size: 20px;
    line-height: 1.2;
  }

  .lead-package__grid {
    display: block;
    border: 0;
    border-top: 1px solid var(--headline-rule);
    background: transparent;
  }

  .lead-package__primary {
    border-right: 0;
    border-bottom: 1px solid var(--headline-rule);
  }

  .lead-package__side {
    display: none;
  }

  .lead-package {
    width: 100%;
    margin-bottom: 24px;
  }

  .headline-layout .feed {
    border-right: 0;
    border-left: 0;
    background: transparent;
  }

  .feed-item,
  .feed-item--lead,
  .feed-item--support {
    min-width: 0;
    padding: 15px 0 14px;
    background: transparent;
  }

  .feed-item--lead {
    padding-top: 14px;
    padding-bottom: 16px;
  }

  .feed-item--lead .feed-headline {
    max-width: none;
    font-size: 22.5px;
    line-height: 1.25;
  }

  .feed-item--latest .feed-headline,
  .feed-item--support .feed-headline {
    font-size: 18.5px;
    line-height: 1.32;
  }

  .feed-summary,
  .feed-chips {
    display: none;
  }

  .feed-cat {
    flex-wrap: wrap;
    gap: 5px 6px;
    margin-bottom: 7px;
  }

  .feed-meta,
  .sector-card__latest,
  .sector-card__latest-meta {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .feed-meta,
  .sector-card__latest-meta,
  .latest-panel-count {
    font-size: 12px;
    line-height: 1.45;
  }

  .latest-panel .feed > .feed-item:nth-child(n + 2) {
    display: block;
  }

  .latest-panel .feed > .feed-item:first-child,
  .latest-panel .feed > .feed-item.hidden {
    display: none;
  }

  .latest-panel-count {
    max-width: 46%;
    text-align: right;
  }

  .load-more-wrap {
    padding: 16px 0 0;
  }

  .load-more-btn {
    min-height: 44px;
    padding-inline: 16px;
  }

  .sector-rail,
  .sector-rail__body {
    width: 100%;
  }

  .sector-rail__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .sector-card {
    width: 100%;
    min-width: 0;
    min-height: 0;
    gap: 6px;
    padding: 14px 0 14px 13px;
    border: 0;
    border-left: 3px solid var(--sector-accent, var(--color-border));
    border-bottom: 1px solid var(--headline-muted-rule);
    background: transparent;
    scroll-snap-align: none;
  }

  .sector-card__latest {
    font-size: 17px;
    line-height: 1.3;
  }

  .to-top-btn {
    display: none !important;
  }

  .new-toast {
    top: calc(var(--nav-height) + 10px);
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    justify-content: center;
  }

  body > .footer {
    padding-bottom: max(18px, calc(10px + env(safe-area-inset-bottom)));
  }
}

@media (hover: none), (pointer: coarse) {
  .feed-headline a:hover {
    color: inherit;
  }

  .sector-card:hover {
    border-color: var(--headline-muted-rule);
    background: transparent;
  }

  .load-more-btn:not(.exhausted):hover {
    border-color: var(--headline-rule);
    background: var(--color-bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .feed-item {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .new-toast,
  .to-top-btn,
  .feed-headline a,
  .feed-chip {
    transition: none;
  }
}
