@font-face {
  font-family: "Raleway";
  src: url("https://cdn.moca-dev.com/ui/Raleway/Raleway-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("https://cdn.moca-dev.com/ui/Raleway/Raleway-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --bg-primary: #080808;
  --bg-secondary: #111111;
  --bg-card: rgba(16, 16, 16, 0.55);
  --bg-card-hover: rgba(22, 22, 22, 0.7);
  --bg-nav: rgba(13, 13, 13, 0.72);
  --bg-dropdown: #0f0f0f;
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.62);
  --text-tertiary: rgba(255, 255, 255, 0.38);
  --accent: #a4aec7;
  --accent-soft: rgba(164, 174, 199, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-normal: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.26);
  --option-hover: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.55);
  --radius-pill: 40px;
  --radius-card: 20px;
  --radius-sm: 12px;
  --safe: max(24px, env(safe-area-inset-left));
  --page-width: 1400px;
  --standard: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f7f9fc;
    --bg-secondary: #eef2f7;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: rgba(255, 255, 255, 0.96);
    --bg-nav: rgba(255, 255, 255, 0.78);
    --bg-dropdown: #ffffff;
    --text-primary: rgba(15, 23, 42, 0.95);
    --text-secondary: rgba(15, 23, 42, 0.64);
    --text-tertiary: rgba(15, 23, 42, 0.42);
    --accent: #3b5771;
    --accent-soft: rgba(59, 87, 113, 0.1);
    --border-subtle: rgba(15, 23, 42, 0.08);
    --border-normal: rgba(15, 23, 42, 0.14);
    --border-strong: rgba(15, 23, 42, 0.28);
    --option-hover: rgba(15, 23, 42, 0.06);
    --shadow-sm: 0 2px 8px rgba(27, 39, 57, 0.08);
    --shadow-md: 0 8px 24px rgba(27, 39, 57, 0.11);
    --shadow-lg: 0 18px 50px rgba(27, 39, 57, 0.16);
  }
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
}

body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font: inherit;
}

button, a, .cosmos-select-option, .cosmos-select-trigger {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button, a {
  outline: none;
}

img {
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

p, h1, h2, h3, blockquote, time, .article-body {
  user-select: text;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 5000;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: #000;
  transform: translate(-50%, -80px);
  transition: transform 0.2s var(--standard);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.site-header {
  position: sticky;
  top: max(16px, env(safe-area-inset-top));
  z-index: 1000;
  width: min(calc(100% - 48px), var(--page-width));
  min-height: 58px;
  margin: max(16px, env(safe-area-inset-top)) auto 0;
  padding: 7px 9px 7px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg-nav);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  overflow: visible;
}

.site-header::before,
.glass-card::before,
.empty-state::before,
.empty-feature-card::before,
.article-body::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

@media (prefers-color-scheme: light) {
  .site-header::before,
  .glass-card::before,
  .empty-state::before,
  .empty-feature-card::before,
  .article-body::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  }
}

.nav-brand-slot {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 46px;
}

.brand-link {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  transition: opacity 0.24s var(--standard), transform 0.24s var(--spring);
}

.brand-link:focus-visible,
.profile-link:focus-visible,
.icon-button:focus-visible,
.article-back-link:focus-visible,
.news-card-link:focus-visible,
.top-news-card:focus-visible,
.site-footer a:focus-visible {
  box-shadow: 0 0 0 1px var(--border-strong) inset;
}

.brand-long {
  width: clamp(136px, 15vw, 182px);
  max-height: 29px;
  object-fit: contain;
  object-position: left center;
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.profile-link {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid var(--border-normal);
  border-radius: 50%;
  background: var(--bg-card);
  transition: border-color 0.2s var(--standard), transform 0.2s var(--standard);
}

.profile-link:hover {
  border-color: var(--border-strong);
}

.profile-link:active {
  transform: scale(0.95);
}

.profile-link img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
}

.search-shell {
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-normal);
  border-radius: 20px;
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s var(--standard), border-color 0.25s var(--standard), width 0.3s var(--spring);
}

.search-shell:hover,
.search-shell:focus-within {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.search-shell > img {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  opacity: 0.5;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

@media (prefers-color-scheme: light) {
  .search-shell > img,
  .icon-button img,
  .modal-close img,
  .cosmos-select-trigger img,
  .option-check,
  .back-arrow,
  .empty-state > img {
    filter: brightness(0);
  }
}

.search-shell input {
  width: 100%;
  height: 100%;
  padding: 0 42px 0 42px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  appearance: none;
}

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

.search-shell input::-webkit-search-cancel-button {
  display: none;
}

.desktop-search {
  width: clamp(220px, 25vw, 360px);
}

.desktop-search:focus-within {
  width: clamp(260px, 31vw, 430px);
}

.search-shell kbd {
  position: absolute;
  right: 10px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text-tertiary);
  font: 600 12px/1 "Raleway", sans-serif;
  user-select: none;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-normal);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  color: var(--text-primary);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s var(--standard), border-color 0.2s var(--standard), transform 0.2s var(--standard), opacity 0.2s ease;
}

.icon-button:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.icon-button:active {
  transform: scale(0.95);
}

.icon-button:disabled {
  opacity: 0.34;
  cursor: default;
  pointer-events: none;
}

.icon-button img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.mobile-search-button {
  display: none;
}

.page-shell,
.article-shell {
  width: min(calc(100% - 48px), var(--page-width));
  margin: 0 auto;
}

.page-shell {
  padding-top: clamp(58px, 7vw, 96px);
}

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

.intro {
  max-width: 920px;
  padding: clamp(88px, 12vw, 168px) 0 clamp(72px, 9vw, 124px);
}

.eyebrow,
.section-kicker {
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
}

.intro h1 {
  margin-top: 14px;
  max-width: 880px;
  font-size: clamp(2.7rem, 7vw, 6.6rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.intro > p:last-child {
  max-width: 700px;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.news-section {
  margin-bottom: clamp(88px, 10vw, 144px);
}

.section-toolbar {
  min-height: 42px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading-row h2 {
  margin-top: 4px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.slider-controls,
.slider-toolbar,
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-news-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(88%, 940px);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  cursor: grab;
}

.top-news-track::-webkit-scrollbar {
  display: none;
}

.top-news-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.top-news-track.is-empty {
  display: block;
  cursor: default;
}

.top-news-card {
  position: relative;
  min-height: clamp(340px, 49vw, 620px);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-secondary);
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s var(--standard), transform 0.25s var(--standard);
}

.top-news-card:hover {
  border-color: var(--border-normal);
}

.top-news-card:active {
  transform: scale(0.99);
}

.top-news-card .cover-image,
.news-card .cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--standard);
}

.top-news-card:hover .cover-image,
.news-card:hover .cover-image {
  transform: scale(1.018);
}

.top-news-card::after,
.news-card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 68%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.66) 36%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.top-news-copy {
  position: absolute;
  right: clamp(20px, 5vw, 56px);
  bottom: clamp(22px, 5vw, 54px);
  left: clamp(20px, 5vw, 56px);
  z-index: 1;
  max-width: 840px;
  color: #fff;
}

.top-news-copy h3 {
  font-size: clamp(1.8rem, 4.8vw, 4.6rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(16, 16, 16, 0.44);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 650;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
}

.empty-feature-card {
  position: relative;
  min-height: clamp(280px, 37vw, 470px);
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.empty-feature-card::after {
  content: "";
  position: absolute;
  width: min(38vw, 520px);
  aspect-ratio: 1;
  top: -54%;
  right: -7%;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  opacity: 0.72;
}

.empty-feature-card p {
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  font-weight: 620;
  letter-spacing: -0.03em;
}

.slider-dots {
  min-height: 10px;
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  cursor: pointer;
  transition: width 0.22s var(--spring), background 0.22s ease;
}

.slider-dot[aria-current="true"] {
  width: 24px;
  background: var(--accent);
}

.filter-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cosmos-select {
  position: relative;
  display: inline-block;
}

.cosmos-select-trigger {
  min-width: 170px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid var(--border-normal);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  color: var(--text-secondary);
  cursor: pointer;
  appearance: none;
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cosmos-select-trigger:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.cosmos-select-trigger:active {
  transform: scale(0.98);
}

.cosmos-select-trigger:focus {
  outline: none;
}

.cosmos-select-trigger img {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.cosmos-select-trigger-icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.cosmos-select-trigger-label {
  flex: 1;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cosmos-select-trigger-chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.cosmos-select.is-open .cosmos-select-trigger-chevron {
  transform: rotate(180deg);
}

.cosmos-select-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 6px;
  display: none;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background: var(--bg-dropdown);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top left;
  backdrop-filter: blur(22px) saturate(1.55);
  -webkit-backdrop-filter: blur(22px) saturate(1.55);
  transition: opacity 0.22s var(--standard), transform 0.22s var(--standard);
}

.cosmos-select.is-open .cosmos-select-menu {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  animation: cosmos-menu-in 0.28s var(--standard);
}

@keyframes cosmos-menu-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cosmos-select-list {
  max-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  scrollbar-width: none;
}

.cosmos-select-list::-webkit-scrollbar {
  display: none;
}

.cosmos-select-option {
  width: 100%;
  min-height: 40px;
  padding: 0 14px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cosmos-select-option:hover {
  background: var(--option-hover);
  color: var(--text-primary);
}

.cosmos-select-option[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--text-primary);
}

.option-check {
  width: 14px;
  height: 14px;
  margin-left: auto;
  opacity: 0;
  filter: brightness(0) invert(1);
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.cosmos-select-option[aria-current="true"] .option-check {
  opacity: 0.9;
}

.result-summary {
  min-height: 26px;
  margin: -10px 0 20px;
  color: var(--text-tertiary);
  font-size: 0.82rem;
}

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

.news-card-link {
  min-width: 0;
  display: block;
  border-radius: var(--radius-card);
}

.news-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  transition: border-color 0.25s var(--standard), transform 0.25s var(--standard);
}

.news-card:hover {
  border-color: var(--border-normal);
}

.news-card:active {
  transform: scale(0.98);
}

.news-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
}

.news-card-cover .category-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 1;
}

.news-card-copy {
  padding: 22px;
}

.news-card-copy h3 {
  font-size: clamp(1.12rem, 1.6vw, 1.35rem);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.news-card-copy p {
  margin-top: 10px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 0.76rem;
}

.empty-state {
  position: relative;
  min-height: 300px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  text-align: center;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

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

.empty-state > img {
  width: 28px;
  height: 28px;
  margin-bottom: 18px;
  opacity: 0.58;
  filter: brightness(0) invert(1);
}

.empty-state h3 {
  font-size: 1.18rem;
  font-weight: 650;
}

.empty-state p {
  max-width: 420px;
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.site-footer {
  width: min(calc(100% - 48px), var(--page-width));
  margin: 0 auto;
  padding: 28px 0 max(36px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-subtle);
}

.site-footer a {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-pill);
  color: var(--text-tertiary);
  font-size: 0.78rem;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--text-secondary);
}

.site-footer img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  opacity: 0.72;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

@media (prefers-color-scheme: light) {
  .site-footer img {
    filter: brightness(0);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(0.1px);
  -webkit-backdrop-filter: blur(0.1px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-overlay.is-open {
  animation: modal-fade 0.22s ease;
}

.modal-content {
  position: relative;
  width: min(100%, 480px);
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--border-normal);
  border-radius: 24px;
  background: rgba(12, 12, 12, 0.97);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  animation: modal-in 0.25s var(--spring);
}

@media (prefers-color-scheme: light) {
  .modal-content {
    background: rgba(255, 255, 255, 0.97);
  }
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.modal-close:hover {
  background: var(--option-hover);
}

.modal-close:active {
  transform: scale(0.92);
}

.modal-close img {
  width: 18px;
  height: 18px;
  opacity: 0.55;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.modal-search {
  width: 100%;
}

.article-shell {
  max-width: 1240px;
  padding: clamp(52px, 7vw, 96px) 0 clamp(88px, 10vw, 140px);
}

.article-brand-slot {
  width: clamp(180px, 23vw, 300px);
  overflow: hidden;
}

.article-brand-link {
  position: absolute;
  left: 0;
  transform-origin: left center;
}

.article-back-link {
  position: absolute;
  left: 0;
  min-height: 42px;
  padding: 5px 14px 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--bg-card) 76%, transparent);
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateX(34px) scale(0.72);
  transform-origin: left center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.24s var(--standard), transform 0.28s var(--spring), border-color 0.2s ease;
}

.article-back-link:hover {
  border-color: var(--border-strong);
}

.article-header.is-reading .article-brand-link {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-34px) scale(0.72);
}

.article-header.is-reading .article-back-link {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.back-arrow {
  width: 18px;
  height: 18px;
  opacity: 0.68;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.brand-small-color {
  width: 25px;
  height: 25px;
  object-fit: contain;
  pointer-events: none;
}

.article-hero {
  display: flex;
  flex-direction: column;
}

.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-secondary);
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-cover-placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 15%, var(--accent-soft), transparent 42%),
    linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  color: var(--text-tertiary);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-heading {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 86px) 0 clamp(48px, 6vw, 76px);
  text-align: center;
}

.article-heading .category-badge {
  border-color: var(--border-normal);
  background: var(--accent-soft);
  color: var(--text-primary);
}

.article-heading h1 {
  margin-top: 18px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.article-deck {
  max-width: 720px;
  margin: 22px auto 0;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  text-wrap: balance;
}

.article-meta {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 9px;
  color: var(--text-tertiary);
  font-size: 0.82rem;
}

.article-body {
  position: relative;
  max-width: 790px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 56px);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.article-body > * + * {
  margin-top: 24px;
}

.article-body h2 {
  margin-top: 48px;
  color: var(--text-primary);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.article-body .article-lead {
  color: var(--text-primary);
  font-size: clamp(1.12rem, 2vw, 1.3rem);
  line-height: 1.7;
}

.article-body blockquote {
  padding: 18px 0 18px 24px;
  border-left: 2px solid var(--accent);
  color: var(--text-primary);
  font-size: clamp(1.1rem, 2vw, 1.34rem);
  font-style: italic;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desktop-search {
    width: 210px;
  }

  .desktop-search:focus-within {
    width: 250px;
  }
}

@media (max-width: 768px) {
  .site-header,
  .page-shell,
  .article-shell,
  .site-footer {
    width: calc(100% - 48px);
  }

  .site-header {
    min-height: 56px;
    padding: 6px 8px 6px 13px;
    border-radius: 999px;
  }

  .brand-long {
    width: clamp(122px, 34vw, 158px);
    max-height: 27px;
  }

  .desktop-search {
    display: none;
  }

  .mobile-search-button {
    display: inline-flex;
  }

  .filter-row {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-row > div,
  .filter-row .cosmos-select,
  .filter-row .cosmos-select-trigger {
    min-width: 0;
    flex: 1;
  }

  .top-news-track {
    grid-auto-columns: 92%;
  }

  .top-news-card {
    min-height: 390px;
  }

  .article-brand-slot {
    width: clamp(150px, 44vw, 230px);
  }

  .article-back-link span {
    display: none;
  }

  .article-back-link {
    padding-right: 8px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .page-shell,
  .article-shell,
  .site-footer {
    width: calc(100% - 48px);
  }

  .brand-long {
    width: 112px;
  }

  .nav-actions {
    gap: 6px;
  }

  .profile-link,
  .icon-button {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .slider-controls,
  .slider-toolbar {
    gap: 6px;
  }

  .top-news-track {
    grid-auto-columns: 100%;
  }

  .top-news-card {
    min-height: 430px;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-row .cosmos-select,
  .filter-row .cosmos-select-trigger {
    width: 100%;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .site-footer a {
    align-items: flex-start;
  }

  .site-footer span {
    padding-top: 2px;
  }

  .modal-content {
    padding: 24px;
  }

  .article-brand-slot {
    width: 126px;
  }

  .article-header.is-reading .article-brand-slot {
    width: 84px;
  }

  .article-brand-slot {
    transition: width 0.28s var(--spring);
  }

  .article-heading {
    text-align: left;
  }

  .article-deck {
    margin-left: 0;
  }

  .article-meta {
    justify-content: flex-start;
  }

  .article-body {
    padding: 28px 24px;
  }
}

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
