:root {
  --home-bg: #070808;
  --home-surface: #101111;
  --home-surface-raised: #161717;
  --home-border: rgba(255, 255, 255, 0.12);
  --home-border-strong: rgba(255, 255, 255, 0.2);
  --home-text: #f3f1ed;
  --home-muted: #aaa9a6;
  --home-accent: #f0443e;
  --home-accent-dark: #c8332f;
  --home-serif: "Source Serif 4", Georgia, serif;
  --home-sans: Inter, ui-sans-serif, system-ui, sans-serif;
  --home-radius: 7px;
  --home-header-height: 82px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--home-bg);
  color-scheme: dark;
}

body.home-app {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--home-bg);
  color: var(--home-text);
  font-family: var(--home-sans);
  letter-spacing: 0;
}

body.home-app button,
body.home-app input {
  font-family: inherit;
  letter-spacing: 0;
}

body.home-app button,
body.home-app a {
  -webkit-tap-highlight-color: transparent;
}

body.home-app button:focus-visible,
body.home-app a:focus-visible,
body.home-app input:focus-visible,
body.home-app [tabindex]:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.home-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 4px;
  background: #ffffff;
  color: #080808;
  font-weight: 700;
}

.home-skip-link:focus {
  transform: translateY(0);
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto minmax(360px, 1fr);
  min-height: var(--home-header-height);
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(7, 8, 8, 0.96);
  backdrop-filter: blur(16px);
}

.home-header__primary {
  display: contents;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  color: var(--home-text);
  text-decoration: none;
}

.home-brand__mark {
  font-family: var(--home-serif);
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
}

.home-brand__name {
  color: #c5c3bf;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 3px;
}

.home-tabs {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 24px;
  min-width: 390px;
}

.home-tab {
  position: relative;
  display: inline-flex;
  min-width: 72px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #b8b7b4;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.home-tab::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  height: 2px;
  transform: scaleX(0);
  background: var(--home-accent);
  transform-origin: center;
  transition: transform 160ms ease;
}

.home-tab:hover,
.home-tab.is-active {
  color: #ffffff;
}

.home-tab.is-active::after {
  transform: scaleX(1);
}

.home-search {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(260px, 48%);
  height: 44px;
  margin-right: 96px;
  padding: 0 13px;
  border: 1px solid var(--home-border);
  border-radius: 5px;
  background: #151616;
  color: var(--home-muted);
}

.home-search svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.home-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--home-text);
  font-size: 13px;
}

.home-search input::placeholder {
  color: #878684;
}

.home-header__actions {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  display: flex;
  gap: 8px;
  margin-left: 12px;
  pointer-events: none;
}

.home-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 46px;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--home-border);
  border-radius: 5px;
  background: #151616;
  color: #dedcd8;
  text-decoration: none;
  pointer-events: auto;
}

.home-icon-button:hover {
  border-color: var(--home-border-strong);
  color: #ffffff;
}

.home-icon-button svg {
  width: 19px;
  height: 19px;
}

.home-search-shortcut {
  display: none;
}

.home-main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 12px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 395px;
  grid-template-rows: auto;
  gap: 8px;
}

.story-deck,
.story-queue,
.context-map,
.home-footer {
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius);
  background: var(--home-surface);
}

.story-deck {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.story-stage {
  position: relative;
  min-height: 600px;
  overflow: hidden;
}

.story-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #111212;
  touch-action: pan-y;
}

.story-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 8, 8, 0.96) 0%, rgba(7, 8, 8, 0.83) 31%, rgba(7, 8, 8, 0.16) 67%, rgba(7, 8, 8, 0.22) 100%),
    linear-gradient(0deg, rgba(7, 8, 8, 0.72) 0%, transparent 32%);
  pointer-events: none;
}

.story-media > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 220ms ease;
}

.story-media > img.is-loaded {
  opacity: 1;
}

.story-image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  color: #999a96;
  text-align: center;
}

.story-image-fallback[hidden] {
  display: none;
}

.story-image-fallback svg {
  width: 58px;
  height: 58px;
  margin: 0 auto;
}

.story-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(47%, 520px);
  min-height: 600px;
  padding: 54px 34px 54px 74px;
}

.story-category,
.queue-card__category,
.home-dialog__item-category {
  margin: 0;
  color: var(--home-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.story-title {
  margin: 20px 0 18px;
  color: var(--home-text);
  font-family: var(--home-serif);
  font-size: 43px;
  font-weight: 700;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 13px;
  color: #c3c1bd;
  font-size: 13px;
  line-height: 1.4;
}

.story-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.story-meta > span + span::before {
  content: "•";
  margin-right: 4px;
  color: #999a96;
}

.story-meta svg {
  width: 16px;
  height: 16px;
}

.story-summary-block {
  margin-top: 34px;
}

.story-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: #bbb9b5;
  font-size: 10px;
  font-weight: 700;
}

.story-summary-label svg {
  width: 14px;
  height: 14px;
}

.story-summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #cbc9c5;
  font-size: 14px;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.story-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 27px;
}

.story-read-link,
.story-save {
  min-height: 44px;
  border: 1px solid rgba(240, 68, 62, 0.68);
  border-radius: 5px;
  background: rgba(8, 8, 8, 0.35);
  color: #ff5751;
}

.story-read-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 164px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.story-read-link:hover,
.story-save:hover,
.story-save[aria-pressed="true"] {
  border-color: var(--home-accent);
  background: rgba(240, 68, 62, 0.13);
  color: #ffffff;
}

.story-read-link svg,
.story-save svg {
  width: 18px;
  height: 18px;
}

.story-save {
  display: inline-grid;
  width: 44px;
  padding: 0;
  place-items: center;
  cursor: pointer;
}

.story-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(6, 7, 7, 0.72);
  color: #ffffff;
  cursor: pointer;
  place-items: center;
}

.story-arrow:hover:not(:disabled) {
  border-color: #ffffff;
  background: rgba(6, 7, 7, 0.9);
}

.story-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.story-arrow svg {
  width: 24px;
  height: 24px;
}

.story-arrow--previous {
  left: 10px;
}

.story-arrow--next {
  right: 10px;
}

.story-progress {
  position: absolute;
  bottom: 3px;
  left: 50%;
  z-index: 4;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}

.story-progress button {
  width: 44px;
  height: 44px;
  padding: 20px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.story-progress button::before {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
}

.story-progress button.is-active::before {
  background: var(--home-accent);
}

.story-position {
  position: absolute;
  right: 24px;
  bottom: 27px;
  z-index: 4;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.story-state {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  padding: 24px;
  background: #101111;
  text-align: center;
  place-content: center;
}

.story-state[hidden] {
  display: none;
}

.story-state p {
  max-width: 420px;
  margin: 0 0 18px;
  color: var(--home-muted);
  line-height: 1.6;
}

.story-state button,
.region-filter {
  min-height: 44px;
  border: 1px solid var(--home-border);
  border-radius: 4px;
  background: #171818;
  color: var(--home-text);
  cursor: pointer;
}

.story-state button:hover,
.region-filter:hover,
.region-filter.is-active {
  border-color: rgba(240, 68, 62, 0.5);
  background: rgba(240, 68, 62, 0.12);
  color: #ff6a64;
}

.story-queue {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  height: auto;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
}

.story-queue__header {
  display: flex;
  min-height: 60px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--home-border);
}

.story-queue__header h2 {
  margin: 0;
  color: #d2d0cc;
  font-size: 12px;
  font-weight: 600;
}

.story-queue__header button {
  display: none;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--home-muted);
  cursor: pointer;
  font-size: 12px;
}

.story-queue__header svg {
  width: 16px;
  height: 16px;
}

.story-queue__list {
  min-height: 0;
  margin: 0;
  padding: 0 18px;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: #333 transparent;
}

.queue-card {
  position: relative;
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  min-height: 134px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--home-border);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.queue-card:last-child {
  border-bottom: 0;
}

.queue-card:hover .queue-card__title,
.queue-card.is-active .queue-card__title {
  color: #ffffff;
}

.queue-card.is-active {
  box-shadow: inset 3px 0 0 var(--home-accent);
}

.queue-card__media {
  position: relative;
  min-width: 0;
  height: 110px;
  overflow: hidden;
  border: 1px solid var(--home-border);
  border-radius: 5px;
  background: #151616;
}

.queue-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.queue-card__media.is-fallback {
  display: grid;
  color: #999a96;
  text-align: center;
  place-content: center;
}

.queue-card__media.is-fallback svg {
  width: 32px;
  height: 32px;
  margin: 0 auto 6px;
}

.queue-card__number {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  display: grid;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  background: rgba(5, 6, 6, 0.85);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  place-items: center;
}

.queue-card__copy {
  align-self: center;
  min-width: 0;
}

.queue-card__title {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: #d3d1cd;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.story-queue__footer {
  display: flex;
  min-height: 46px;
  margin-top: auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-top: 1px solid var(--home-border);
  background: #131414;
  color: var(--home-muted);
  cursor: pointer;
  font-size: 12px;
}

.story-queue__footer:hover {
  color: #ffffff;
}

.story-queue__footer svg {
  width: 16px;
  height: 16px;
}

.story-queue__empty {
  display: grid;
  min-height: 150px;
  color: #999a96;
  font-size: 12px;
  text-align: center;
  place-items: center;
}

#context-map-slot {
  margin-top: 8px;
}

.context-map {
  overflow: hidden;
}

.context-map__header {
  display: flex;
  min-height: 92px;
  padding: 18px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--home-border);
}

.context-map__header p,
.context-map__locations > p {
  margin: 0 0 6px;
  color: var(--home-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.context-map[data-mode="climate"] .context-map__header p,
.context-map[data-mode="climate"] .context-map__locations > p {
  color: #83be59;
}

.context-map__header h2 {
  margin: 0;
  font-family: var(--home-serif);
  font-size: 27px;
  line-height: 1.15;
}

.context-map__header span {
  display: block;
  margin-top: 5px;
  color: #8d8c89;
  font-size: 12px;
}

.context-map__actions {
  display: flex;
  gap: 8px;
}

.context-map__actions button,
.context-map__selection button {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--home-border-strong);
  border-radius: 5px;
  background: #151616;
  color: #dedcd8;
  cursor: pointer;
}

.context-map__actions svg,
.context-map__selection svg {
  width: 18px;
  height: 18px;
}

#context-map-close {
  display: none;
}

.context-map.is-expanded #context-map-expand {
  display: none;
}

.context-map.is-expanded #context-map-close {
  display: inline-flex;
}

.context-map__body {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  min-height: 390px;
}

.context-map__locations {
  padding: 22px 18px;
  border-right: 1px solid var(--home-border);
}

.context-map__locations h3 {
  margin: 0 0 16px;
  font-family: var(--home-serif);
  font-size: 23px;
}

.context-map__filters {
  display: grid;
  max-height: 330px;
  gap: 6px;
  overflow-y: auto;
}

.context-map__filter {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--home-border);
  border-radius: 4px;
  background: #141515;
  color: #aaa9a6;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}

.context-map__filter span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-map__filter span:last-child {
  color: #999a96;
  font-size: 10px;
}

.context-map__filter:hover,
.context-map__filter.is-active {
  border-color: rgba(240, 68, 62, 0.62);
  background: rgba(240, 68, 62, 0.1);
  color: #ffffff;
}

.context-map[data-mode="climate"] .context-map__filter:hover,
.context-map[data-mode="climate"] .context-map__filter.is-active {
  border-color: rgba(131, 190, 89, 0.7);
  background: rgba(131, 190, 89, 0.1);
}

.context-map__canvas {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 390px;
  overflow: hidden;
  background: #0c0d0d;
  place-items: center;
}

#context-map-svg {
  width: 100%;
  height: 390px;
}

#context-map-svg path {
  fill: #262828;
  stroke: #111212;
  stroke-width: 0.65px;
  transition: fill 120ms ease, opacity 120ms ease;
}

#context-map-svg path[data-level="1"] { fill: #4e302f; }
#context-map-svg path[data-level="2"] { fill: #753b39; }
#context-map-svg path[data-level="3"] { fill: #a64743; }
#context-map-svg path[data-level="4"] { fill: #d44b46; }

.context-map[data-mode="climate"] #context-map-svg path[data-level="1"] { fill: #34442d; }
.context-map[data-mode="climate"] #context-map-svg path[data-level="2"] { fill: #49643a; }
.context-map[data-mode="climate"] #context-map-svg path[data-level="3"] { fill: #648b46; }
.context-map[data-mode="climate"] #context-map-svg path[data-level="4"] { fill: #83be59; }

#context-map-svg path.has-stories {
  cursor: pointer;
}

#context-map-svg path.has-stories:hover,
#context-map-svg path.is-selected {
  fill: var(--home-accent);
}

#context-map-svg path.has-stories:focus {
  outline: none;
  stroke: #ffffff;
  stroke-width: 3px;
  paint-order: stroke fill;
}

.context-map[data-mode="climate"] #context-map-svg path.has-stories:hover,
.context-map[data-mode="climate"] #context-map-svg path.has-stories:focus,
.context-map[data-mode="climate"] #context-map-svg path.is-selected {
  fill: #9bd66f;
}

.context-map__status {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  color: #999a96;
  font-size: 12px;
}

.context-map__status[hidden],
.context-map__selection[hidden] {
  display: none;
}

.context-map__status button {
  min-width: 104px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--home-border-strong);
  border-radius: 4px;
  background: #171818;
  color: #ffffff;
  cursor: pointer;
}

.context-map__legend {
  position: absolute;
  right: 16px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999a96;
  font-size: 10px;
}

.context-map__legend i {
  display: block;
  width: 92px;
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, #d44b46, #4e302f);
}

.context-map[data-mode="climate"] .context-map__legend i {
  background: linear-gradient(90deg, #83be59, #34442d);
}

.context-map__selection {
  position: absolute;
  right: 16px;
  top: 16px;
  display: flex;
  width: min(330px, calc(100% - 32px));
  padding: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--home-border-strong);
  border-radius: 5px;
  background: rgba(16, 17, 17, 0.96);
}

.context-map__selection strong,
.context-map__selection span {
  display: block;
  overflow-wrap: anywhere;
}

.context-map__selection > div {
  min-width: 0;
  flex: 1 1 auto;
}

.context-map__selection strong {
  font-family: var(--home-serif);
  font-size: 18px;
}

.context-map__selection span {
  margin-top: 3px;
  color: #8d8c89;
  font-size: 10px;
}

.context-map__selection button {
  flex: 0 0 auto;
  color: var(--home-accent);
  font-size: 11px;
}

.context-map-dialog {
  width: min(1500px, calc(100vw - 32px));
  max-width: none;
  height: min(900px, calc(100vh - 32px));
  max-height: none;
  padding: 0;
  overflow: auto;
  border: 0;
  background: transparent;
  color: var(--home-text);
}

.context-map-dialog::backdrop {
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(5px);
}

.context-map.is-expanded {
  min-height: 100%;
  background: #101111;
}

.context-map.is-expanded .context-map__body {
  min-height: calc(100% - 92px);
}

.context-map.is-expanded .context-map__canvas,
.context-map.is-expanded #context-map-svg {
  min-height: 650px;
}

.home-footer {
  display: grid;
  grid-template-columns: 48px auto 1fr auto;
  min-height: 64px;
  margin-top: 8px;
  padding: 8px 14px;
  align-items: center;
  gap: 16px;
}

.home-footer__mark {
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(240, 68, 62, 0.34);
  border-radius: 5px;
  background: rgba(240, 68, 62, 0.1);
  color: var(--home-accent);
  place-items: center;
}

.home-footer__mark svg {
  width: 22px;
  height: 22px;
}

.home-footer strong {
  font-family: var(--home-serif);
  font-size: 17px;
}

.home-footer > span {
  color: #999a96;
  font-size: 12px;
}

.home-footer > a {
  display: inline-flex;
  min-height: 44px;
  padding: 0 14px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--home-border);
  border-radius: 4px;
  color: var(--home-muted);
  text-decoration: none;
  font-size: 12px;
}

.home-footer > a svg {
  width: 16px;
  height: 16px;
}

.home-bottom-nav {
  display: none;
}

.home-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(240, 68, 62, 0.58);
  border-radius: 5px;
  background: #9f2f2b;
  color: #ffffff;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
  font-size: 13px;
}

.home-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: min(760px, calc(100dvh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--home-border-strong);
  border-radius: 8px;
  background: #101111;
  color: var(--home-text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}

.home-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.home-dialog__header {
  display: flex;
  min-height: 78px;
  padding: 14px 18px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--home-border);
}

.home-dialog__header span {
  color: var(--home-accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.home-dialog__header h2 {
  margin: 4px 0 0;
  font-family: var(--home-serif);
  font-size: 24px;
}

.home-dialog__header button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--home-border);
  border-radius: 5px;
  background: #171818;
  color: #ffffff;
  cursor: pointer;
  place-items: center;
}

.home-dialog__list {
  max-height: calc(100dvh - 140px);
  margin: 0;
  padding: 8px 18px 18px;
  overflow-y: auto;
  list-style: none;
}

.home-dialog__item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 44px;
  gap: 12px;
  width: 100%;
  min-height: 88px;
  padding: 10px 0;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--home-border);
  background: transparent;
  color: inherit;
  text-align: left;
}

button.home-dialog__item {
  cursor: pointer;
}

.home-dialog__item img,
.home-dialog__item-fallback {
  width: 76px;
  height: 64px;
  border-radius: 4px;
  object-fit: cover;
  background: #191a1a;
}

.home-dialog__item-fallback {
  display: grid;
  color: #999a96;
  place-items: center;
}

.home-dialog__item-title {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-dialog__item-main {
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.home-dialog__item-main:hover .home-dialog__item-title {
  color: #ffffff;
}

.home-dialog__item-remove {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #898986;
  cursor: pointer;
  place-items: center;
}

.home-dialog__item-remove:hover {
  background: rgba(240, 68, 62, 0.12);
  color: var(--home-accent);
}

.home-dialog__empty {
  padding: 60px 24px;
  color: var(--home-muted);
  text-align: center;
  line-height: 1.6;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  min-height: 52px;
  margin-bottom: 8px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius);
  background: #111212;
  color: var(--home-muted);
  font-size: 12px;
}

.active-filters[hidden] {
  display: none;
}

.active-filters__context,
.active-filters button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.active-filters__context {
  flex: 1 1 240px;
}

.active-filters__context span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.active-filters__context svg,
.active-filters button svg {
  width: 16px;
  height: 16px;
}

.active-filters button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--home-accent);
  cursor: pointer;
}

.briefing-status {
  display: flex;
  min-height: 52px;
  margin-bottom: 8px;
  padding: 4px 12px 4px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #654d2d;
  border-radius: var(--home-radius);
  background: #19150f;
  color: #d9c6a5;
  font-size: 12px;
  line-height: 1.5;
}

.briefing-status[hidden] {
  display: none;
}

.briefing-status span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.briefing-status button {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 10px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #f0b85f;
  cursor: pointer;
}

.briefing-status button svg {
  width: 16px;
  height: 16px;
}

.more-stories {
  margin-top: 8px;
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius);
  background: var(--home-surface);
  overflow: hidden;
}

.more-stories__header {
  display: flex;
  min-height: 96px;
  padding: 18px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--home-border);
}

.more-stories__header p,
.more-story__category {
  margin: 0;
  color: var(--home-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.more-stories__header h2 {
  margin: 5px 0 0;
  font-family: var(--home-serif);
  font-size: 30px;
  line-height: 1.1;
}

.more-stories__header > span {
  color: #858582;
  font-size: 12px;
}

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

.more-story {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 44px;
  min-width: 0;
  min-height: 190px;
  padding: 20px;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--home-border);
}

.more-story:nth-child(odd) {
  border-right: 1px solid var(--home-border);
}

.more-story__media {
  display: grid;
  width: 190px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--home-border);
  border-radius: 5px;
  background: #171818;
  color: #999a96;
  place-items: center;
}

.more-story__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.more-story__media svg {
  width: 34px;
  height: 34px;
}

.more-story__copy {
  min-width: 0;
}

.more-story h3 {
  margin: 8px 0 9px;
  font-family: var(--home-serif);
  font-size: 21px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.more-story h3 a {
  color: var(--home-text);
  text-decoration: none;
}

.more-story h3 a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: var(--home-accent);
  text-underline-offset: 4px;
}

.more-story__summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #9d9c99;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.more-story__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  color: #999a96;
  font-size: 10px;
}

.more-story__meta span + span::before {
  content: "•";
  margin-right: 8px;
}

.more-story__action {
  display: grid;
  width: 44px;
  height: 44px;
  border: 1px solid var(--home-border);
  border-radius: 5px;
  color: var(--home-accent);
  text-decoration: none;
  place-items: center;
}

.more-story__action:hover {
  border-color: var(--home-accent);
  background: rgba(240, 68, 62, 0.1);
}

.more-story__action svg {
  width: 18px;
  height: 18px;
}

.more-stories__state {
  padding: 0 20px;
  color: #999a96;
  text-align: center;
  font-size: 12px;
}

.more-stories__state:not(:empty) {
  padding-top: 42px;
  padding-bottom: 42px;
}

.more-stories__load {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-top: 1px solid var(--home-border);
  background: #131414;
  color: #c4c2be;
  cursor: pointer;
}

.more-stories__load[hidden] {
  display: none;
}

.more-stories__load:hover {
  color: #ffffff;
}

.more-stories__load svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 1279px) {
  .home-header {
    grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
    padding: 0 20px;
  }

  .home-tabs {
    min-width: 340px;
    gap: 8px;
  }

  .home-search {
    display: none;
  }

  .home-search-shortcut {
    display: inline-flex;
  }

  .home-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .story-copy {
    width: min(52%, 500px);
  }

  .queue-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .more-stories__list {
    grid-template-columns: 1fr;
  }

  .more-story:nth-child(odd) {
    border-right: 0;
  }
}

@media (max-width: 1099px) {
  .home-header {
    grid-template-columns: 1fr auto;
    min-height: 126px;
    padding: 0 18px;
  }

  .home-brand {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .home-header__actions {
    grid-column: 2;
    grid-row: 1;
  }

  .home-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    height: 50px;
  }

  .home-tab {
    flex: 1 1 0;
  }

  .home-tab::after {
    right: 28%;
    bottom: 8px;
    left: 28%;
  }

  .home-main {
    padding: 0 0 14px;
  }

  .home-layout {
    display: block;
  }

  .story-deck,
  .story-queue,
  .context-map,
  .more-stories,
  .home-footer {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .story-stage {
    min-height: 0;
  }

  .story-media {
    position: relative;
    inset: auto;
    aspect-ratio: 16 / 10;
  }

  .story-media::after {
    background: linear-gradient(0deg, rgba(7, 8, 8, 0.62) 0%, transparent 34%);
  }

  .story-copy {
    width: 100%;
    min-height: 0;
    padding: 28px 28px 30px;
  }

  .story-title {
    max-width: 780px;
    margin: 14px 0 13px;
    font-size: 38px;
  }

  .story-summary-block {
    max-width: 720px;
    margin-top: 22px;
  }

  .story-summary {
    -webkit-line-clamp: 3;
  }

  .story-queue {
    height: auto;
    margin-top: 8px;
    padding-bottom: 14px;
  }

  .story-queue__header {
    min-height: 52px;
    border-bottom: 0;
  }

  .story-queue__header button {
    display: inline-flex;
  }

  .story-queue__list {
    display: flex;
    gap: 10px;
    padding: 0 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .queue-card {
    display: block;
    width: 190px;
    min-width: 190px;
    min-height: 228px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--home-border);
    border-radius: 6px;
    background: #121313;
    scroll-snap-align: start;
  }

  .queue-card.is-active {
    box-shadow: inset 0 -3px 0 var(--home-accent);
  }

  .queue-card__media {
    width: 100%;
    height: 122px;
    border: 0;
    border-bottom: 1px solid var(--home-border);
    border-radius: 0;
  }

  .queue-card__copy {
    padding: 11px;
  }

  .queue-card__title {
    margin-top: 6px;
    -webkit-line-clamp: 3;
  }

  .story-queue__footer {
    display: none;
  }

  .active-filters {
    margin: 0 0 8px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .more-stories {
    margin-top: 8px;
  }

  #context-map-slot {
    margin-top: 8px;
  }

  .context-map__body {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .home-footer {
    grid-template-columns: 42px auto 1fr;
    margin-top: 8px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .home-footer > a {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --home-header-height: 118px;
  }

  body.home-app {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .home-toast {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 12px;
    max-width: none;
  }

  .home-header {
    min-height: var(--home-header-height);
    padding: 0 16px;
  }

  .home-brand {
    gap: 12px;
  }

  .home-brand__mark {
    font-size: 34px;
  }

  .home-brand__name {
    font-size: 8px;
    letter-spacing: 2.3px;
  }

  .home-header__actions {
    gap: 7px;
  }

  .home-icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
  }

  .home-map-shortcut span {
    display: none;
  }

  .home-tabs {
    height: 48px;
  }

  .home-tab {
    min-width: 0;
    font-size: 14px;
  }

  .story-media {
    aspect-ratio: 16 / 9;
  }

  .story-copy {
    padding: 22px 16px 24px;
  }

  .story-title {
    margin: 10px 0 11px;
    font-size: 30px;
    line-height: 1.08;
  }

  .story-meta {
    gap: 6px 9px;
    font-size: 12px;
  }

  .story-meta > span + span::before {
    margin-right: 2px;
  }

  .story-summary-block {
    margin-top: 18px;
  }

  .story-summary-label {
    display: none;
  }

  .story-summary {
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 4;
  }

  .story-actions {
    margin-top: 18px;
  }

  .story-read-link {
    min-width: 168px;
  }

  .story-arrow {
    width: 44px;
    height: 44px;
  }

  .story-arrow--previous {
    left: 12px;
  }

  .story-arrow--next {
    right: 12px;
  }

  .story-progress {
    bottom: -7px;
    gap: 0;
  }

  .story-progress button {
    width: 44px;
  }

  .story-position {
    right: 14px;
    bottom: 15px;
  }

  .story-queue {
    margin-top: 0;
  }

  .story-queue__header {
    padding: 0 16px;
  }

  .story-queue__list {
    padding: 0 16px;
  }

  .queue-card {
    width: 166px;
    min-width: 166px;
    min-height: 218px;
  }

  .queue-card__media {
    height: 112px;
  }

  .context-map__header {
    min-height: 84px;
    padding: 15px 16px;
  }

  .context-map__header h2 {
    font-size: 24px;
  }

  .context-map__body {
    display: block;
    min-height: 0;
  }

  .context-map__locations {
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--home-border);
  }

  .context-map__locations h3 {
    margin-bottom: 12px;
    font-size: 20px;
  }

  .context-map__filters {
    display: flex;
    max-height: none;
    padding-bottom: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .context-map__filter {
    width: auto;
    min-width: 145px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .context-map__canvas,
  #context-map-svg {
    min-height: 300px;
    height: 300px;
  }

  .context-map__legend {
    right: 12px;
    bottom: 9px;
  }

  .context-map__selection {
    right: 10px;
    top: 10px;
    width: calc(100% - 20px);
  }

  .context-map__selection button {
    max-width: 128px;
  }

  .context-map-dialog {
    width: 100vw;
    height: 100dvh;
  }

  .context-map.is-expanded .context-map__header {
    position: sticky;
    top: 0;
    z-index: 8;
    background: #101111;
  }

  .context-map.is-expanded .context-map__canvas,
  .context-map.is-expanded #context-map-svg {
    min-height: 420px;
    height: 420px;
  }

  .more-stories__header {
    min-height: 82px;
    padding: 16px;
  }

  .more-stories__header h2 {
    font-size: 26px;
  }

  .more-stories__header > span {
    max-width: 145px;
    text-align: right;
  }

  .more-story {
    grid-template-columns: 116px minmax(0, 1fr) 44px;
    min-height: 142px;
    padding: 14px 16px;
    gap: 14px;
  }

  .more-story__media {
    width: 116px;
  }

  .more-story h3 {
    margin: 6px 0 8px;
    font-size: 17px;
  }

  .more-story__summary {
    display: none;
  }

  .more-story__meta {
    margin-top: 8px;
  }

  .home-footer {
    display: none;
  }

  .home-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding: 5px 6px env(safe-area-inset-bottom);
    border-top: 1px solid var(--home-border);
    background: rgba(7, 8, 8, 0.97);
    backdrop-filter: blur(18px);
  }

  .home-bottom-nav a,
  .home-bottom-nav button {
    display: flex;
    min-width: 0;
    min-height: 56px;
    padding: 4px 2px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: #969592;
    text-decoration: none;
    cursor: pointer;
    font-size: 10px;
  }

  .home-bottom-nav .is-active {
    color: var(--home-accent);
  }

  .home-bottom-nav svg {
    width: 21px;
    height: 21px;
  }

  .home-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 24px);
  }
}

@media (max-width: 359px) {
  .home-brand__name {
    display: none;
  }

  .story-title {
    font-size: 27px;
  }

  .story-summary {
    font-size: 13px;
  }

  .more-story {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 11px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .more-story__media {
    width: 92px;
  }

  .more-story__action {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
