:root {
  color-scheme: dark;
  --bg: #050806;
  --panel: rgba(6, 18, 12, .84);
  --panel-2: rgba(4, 12, 8, .88);
  --line: rgba(114, 255, 156, .22);
  --line-strong: rgba(114, 255, 156, .42);
  --ink: #ddffe5;
  --muted: #82ba92;
  --dim: #4c7757;
  --hot: #76ff9f;
  --cyan: #68f8ff;
  --amber: #ffd76c;
  --danger: #ff6b88;
  --shadow: 0 0 32px rgba(0,0,0,.4), 0 0 26px rgba(114,255,156,.11), inset 0 0 26px rgba(114,255,156,.05);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--mono);
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 14%, rgba(114,255,156,.12), transparent 30rem),
    radial-gradient(circle at 10% 88%, rgba(104,248,255,.08), transparent 26rem),
    linear-gradient(180deg, #07100a 0%, #040706 100%);
  text-shadow: 0 0 10px rgba(114,255,156,.15);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at center, transparent 0 60%, rgba(0,0,0,.52) 100%);
  mix-blend-mode: screen;
  opacity: .55;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(114,255,156,.05), transparent);
  width: 18%;
  filter: blur(4px);
  animation: sweep 9s linear infinite;
}
@keyframes sweep { from { transform: translateX(-130vw); } to { transform: translateX(130vw); } }

.wrap {
  position: relative;
  z-index: 1;
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 44px);
}

.shell {
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(8,20,13,.9), rgba(2,6,4,.9));
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 30px);
  position: relative;
  overflow: hidden;
}

.shell::before,
.shell::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--dim) 0 6px, transparent 6px 10px);
}
.shell::before { top: 9px; }
.shell::after { bottom: 9px; }

.kicker {
  color: var(--amber);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin: 0; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--hot); }

.header {
  display: grid;
  gap: 12px;
  padding: 10px 8px 18px;
}

.title {
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.02;
  color: var(--hot);
  text-shadow: 0 0 22px rgba(114,255,156,.22);
}

.subtitle {
  max-width: 88ch;
  color: var(--muted);
  line-height: 1.55;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cyan);
  font-size: 12px;
}

.badge, .chip, .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.28);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 11px;
  line-height: 1;
}

.badge strong, .chip strong, .tag strong { color: var(--hot); font-weight: 700; }

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

.panel {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: inset 0 0 24px rgba(114,255,156,.04);
  padding: 16px;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.panel-title {
  font-size: clamp(20px, 2.8vw, 34px);
  color: var(--hot);
}

.panel-desc {
  color: var(--muted);
  margin-top: 4px;
  max-width: 90ch;
  line-height: 1.5;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 14px;
}

.search {
  flex: 1 1 320px;
  min-width: 240px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(0,0,0,.35);
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
  outline: none;
}
.search:focus { border-color: var(--hot); box-shadow: 0 0 0 2px rgba(114,255,156,.14); }

.small {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.4;
}

.source-list,
.related-list,
.card-list {
  display: grid;
  gap: 12px;
}

.source-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.source-card,
.link-card,
.item-card {
  border: 1px solid var(--line);
  background: rgba(0,0,0,.22);
  border-radius: 14px;
  padding: 14px;
}

.source-card { min-height: 110px; }
.link-card { display: grid; gap: 6px; }
.item-card { display: grid; gap: 8px; }

.source-card__top,
.item-card__top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.source-card__name,
.item-card__title {
  color: var(--hot);
  font-size: 16px;
  line-height: 1.3;
}

.source-card__meta,
.item-card__meta {
  color: var(--dim);
  font-size: 12px;
}

.source-card__url,
.item-card__url {
  color: var(--cyan);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.item-card__summary {
  color: var(--ink);
  line-height: 1.5;
  opacity: .92;
}

.item-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.section {
  display: grid;
  gap: 12px;
}

.section + .section { margin-top: 18px; }
.section-title {
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--cyan);
}
.section-kicker {
  color: var(--muted);
  line-height: 1.5;
}

.related-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.link-card__title { color: var(--hot); line-height: 1.35; }
.link-card__meta { color: var(--dim); font-size: 12px; }
.link-card__excerpt { color: var(--ink); line-height: 1.45; opacity: .9; }

.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 14px;
  color: var(--muted);
  background: rgba(0,0,0,.16);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
  align-items: center;
  color: var(--dim);
  font-size: 12px;
  padding: 14px 2px 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 780px) {
  .wrap { padding: 12px; }
  .panel { padding: 13px; }
  .toolbar { align-items: stretch; }
  .search { flex-basis: 100%; }
}
