:root {
  --ink: #e8eef6;
  --muted: #9aa8b8;
  --bg: #0b1220;
  --panel: #121a2b;
  --line: #243149;
  --accent: #3ecfad;
  --accent-2: #7eb6ff;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --font-sans: "DM Sans", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #7dffd4; }

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(800px 360px at 8% -8%, rgba(62, 207, 173, 0.16), transparent 55%),
    radial-gradient(700px 320px at 92% 4%, rgba(126, 182, 255, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(18, 26, 43, 0.9), transparent 28%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 47px,
      rgba(232, 238, 246, 0.03) 48px
    );
  z-index: -1;
}

.hero { padding: 4.2rem 1.25rem 2.2rem; }
.hero-inner { max-width: 1100px; margin: 0 auto; }
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(18, 26, 43, 0.9);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}
.lang-btn.active {
  background: rgba(62, 207, 173, 0.16);
  color: var(--accent);
}
.lang-btn:hover { color: var(--ink); }
.brand {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.lede {
  max-width: 46rem;
  margin: 1.05rem 0 1.5rem;
  color: var(--muted);
  font-size: 1.02rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.68rem 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 650;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: var(--accent);
  color: #06241d;
}
.btn.ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(18, 26, 43, 0.7);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}
.stats div {
  background: rgba(18, 26, 43, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}
.stats dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}
.stats dd {
  margin: 0.28rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.layout {
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.25rem;
}
.filters {
  position: sticky;
  top: 1rem;
  align-self: start;
  background: rgba(18, 26, 43, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.85rem;
}
.filters label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.filters input,
.filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  color: var(--ink);
  background: #0d1524;
}
.filters .check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
}
.filter-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.content {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1.2fr);
  gap: 1rem;
  min-height: 70vh;
}
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  max-height: 78vh;
  overflow: auto;
  padding-right: 0.25rem;
}
.card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(18, 26, 43, 0.92);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.2s ease;
}
.card:hover,
.card.active {
  border-color: rgba(62, 207, 173, 0.55);
  box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-1px); }
.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(11, 18, 32, 0.7);
}
.tag.accent {
  border-color: rgba(62, 207, 173, 0.4);
  color: var(--accent);
  background: rgba(62, 207, 173, 0.08);
}
.tag.warn {
  border-color: rgba(126, 182, 255, 0.4);
  color: var(--accent-2);
  background: rgba(126, 182, 255, 0.08);
}
.card h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.4;
  font-weight: 700;
}
.card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail {
  background: rgba(18, 26, 43, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  max-height: 78vh;
  overflow: auto;
}
.detail.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.detail h2 {
  margin: 0 0 0.6rem;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.detail .byline {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.detail h3 {
  margin: 1.15rem 0 0.4rem;
  font-size: 0.92rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: none;
}
.detail ul { margin: 0; padding-left: 1.1rem; }
.detail li { margin: 0.25rem 0; }
.detail .lead { margin: 0; font-size: 1.02rem; }
.detail .source-list {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.detail .source-list li { margin: 0.2rem 0; }

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer p:first-child {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .content { grid-template-columns: 1fr; }
  .card-list, .detail { max-height: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover { transform: none; }
}
