
:root {
  --bg: #0d0f13;
  --bg-elev: #151922;
  --bg-card: #1a1f2b;
  --ink: #e7ebf2;
  --muted: #a5afbf;
  --accent: #8ab4f8;
  --accent-2: #f7c873;
  --border: #2a3142;
  --chip: #1c2230;
  --header-bg: rgba(10, 12, 17, 0.92);
  --shadow: 0 16px 40px rgba(3, 7, 14, 0.4);
  --shadow-soft: 0 8px 24px rgba(4, 8, 16, 0.25);
}
body[data-theme="light"] {
  --bg: #f6f3ee;
  --bg-elev: #ffffff;
  --bg-card: #fbfaf7;
  --ink: #1b1d1f;
  --muted: #5b636f;
  --accent: #0f6b5f;
  --accent-2: #b45309;
  --border: #d9d2c6;
  --chip: #efe9df;
  --header-bg: rgba(250, 247, 240, 0.92);
  --shadow: 0 16px 36px rgba(40, 32, 20, 0.14);
  --shadow-soft: 0 10px 22px rgba(40, 32, 20, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Instrument Sans', sans-serif;
  color: var(--ink);
  color-scheme: dark;
  background:
    radial-gradient(circle at 15% -10%, rgba(80, 126, 177, 0.35), transparent 55%),
    radial-gradient(circle at 90% 0%, rgba(143, 110, 74, 0.35), transparent 50%),
    linear-gradient(180deg, #0b0d12 0%, #0f131b 100%);
}
body[data-theme="light"] {
  color-scheme: light;
  background:
    radial-gradient(circle at 10% -15%, rgba(170, 220, 210, 0.45), transparent 55%),
    radial-gradient(circle at 90% 0%, rgba(248, 207, 170, 0.4), transparent 55%),
    linear-gradient(180deg, #f6f3ee 0%, #f1ece4 100%);
}
body.story-open { overflow: hidden; }
a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--accent, #8ab4f8);
  outline-offset: 2px;
  border-radius: 2px;
}
header {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 2.2rem) clamp(1.2rem, 3.4vw, 4rem) 0.8rem;
  display: grid;
  gap: 0.9rem;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.2fr) auto;
  gap: 1rem;
  align-items: center;
  grid-template-areas: "brand search actions";
}
.brand { grid-area: brand; }
.search-form { grid-area: search; }
.topbar-actions { grid-area: actions; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: end;
}
.search-form {
  display: flex;
  align-items: center;
  width: 100%;
}
.category-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem;
  position: sticky;
  top: 0;
  z-index: 45;
  padding: 0.35rem 0;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
}
.category-tabs {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  scroll-snap-type: x mandatory;
}
.category-tabs::-webkit-scrollbar {
  height: 6px;
}
.category-tabs::-webkit-scrollbar-thumb {
  background: rgba(138, 180, 248, 0.4);
  border-radius: 999px;
}
.category-tab {
  scroll-snap-align: start;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
}
.category-tab.active {
  color: var(--ink);
  border-color: var(--border);
  background: var(--bg-card);
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
}
.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}
.searchbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 320px;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  box-shadow: var(--shadow);
}
.searchbar svg {
  width: 18px;
  height: 18px;
  fill: var(--muted);
}
.searchbar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
}
.search-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.search-controls label {
  font-size: 0.85rem;
  color: var(--muted);
}
.search-controls select {
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 0.85rem;
}
.icon-button {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.theme-toggle {
  min-width: 40px;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}
.theme-toggle .theme-icon {
  width: 18px;
  height: 18px;
}
.theme-toggle .theme-icon.light { display: none; }
body[data-theme="light"] .theme-toggle .theme-icon.light { display: block; }
body[data-theme="light"] .theme-toggle .theme-icon.dark { display: none; }
.refresh-status {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(18, 22, 32, 0.8);
  color: var(--muted);
  font-size: 0.8rem;
}
body[data-theme="light"] .refresh-status {
  background: rgba(255, 255, 255, 0.8);
}
.refresh-status strong {
  color: var(--ink);
  font-weight: 600;
}
.refresh-status.is-stale {
  border-color: rgba(247, 200, 115, 0.55);
  background: rgba(73, 46, 10, 0.4);
}
.refresh-status button {
  border: none;
  background: transparent;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 0;
}
.refresh-pill {
  display: none;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(247, 200, 115, 0.18);
  color: var(--accent-2);
  font-weight: 600;
}
.refresh-status.is-stale .refresh-pill,
.refresh-pill[data-visible="1"] {
  display: inline-flex;
}
.assistant-panel {
  border: 1px solid rgba(90, 209, 195, 0.25);
  background: rgba(16, 24, 34, 0.6);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  margin: 1rem 0 1.4rem;
  box-shadow: var(--shadow);
}
body[data-theme="light"] .assistant-panel {
  border-color: rgba(15, 107, 95, 0.2);
  background: rgba(255, 255, 255, 0.85);
}
.assistant-panel strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.assistant-panel .muted {
  font-size: 0.9rem;
}
.hero-block {
  margin: 1.2rem 0 1.8rem;
}
.hero-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, 1fr);
}
.hero-card {
  grid-column: span 7;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.hero-card:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 180, 248, 0.4);
  box-shadow: 0 16px 34px rgba(4, 8, 16, 0.35);
}
.hero-media {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(34, 44, 68, 0.6), rgba(14, 18, 28, 0.9)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 6px, transparent 6px, transparent 12px);
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.5rem;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(34, 44, 68, 0.6), rgba(14, 18, 28, 0.9)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 6px, transparent 6px, transparent 12px);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}
.hero-content {
  padding: 1.2rem 1.4rem 1.4rem;
  display: grid;
  gap: 0.6rem;
}
.hero-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
}
.hero-title a { text-decoration: none; }
.hero-title a:hover { color: var(--accent-2); }
.hero-summary {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}
.hero-meta {
  display: flex;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.top-stories {
  grid-column: span 5;
  display: grid;
  gap: 0.8rem;
}
.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.4rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.story-card:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 180, 248, 0.35);
}
.story-source {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
}
.story-title {
  font-size: 1rem;
  font-weight: 600;
}
.story-title a { text-decoration: none; }
.story-title a:hover { color: var(--accent-2); }
.story-meta {
  color: var(--muted);
  font-size: 0.8rem;
}
@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-card,
  .top-stories {
    grid-column: auto;
  }
}
.trending {
  margin: 1.2rem 0 1.6rem;
  display: grid;
  gap: 1rem;
}
.trend-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.trend-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  background: linear-gradient(160deg, #111826 0%, #0f141d 100%);
  display: grid;
  gap: 0.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}
.trend-card:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 180, 248, 0.35);
}
.trend-media {
  height: 160px;
  background:
    linear-gradient(135deg, rgba(34, 44, 68, 0.6), rgba(14, 18, 28, 0.9)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 6px, transparent 6px, transparent 12px);
}
.trend-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.trend-media.no-image {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background:
    linear-gradient(135deg, rgba(34, 44, 68, 0.6), rgba(14, 18, 28, 0.9)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 6px, transparent 6px, transparent 12px);
}
.trend-body {
  padding: 1rem 1.1rem 1.2rem;
  display: grid;
  gap: 0.6rem;
}
.trend-head {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.trend-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(138, 180, 248, 0.15);
  border: 1px solid rgba(138, 180, 248, 0.4);
  font-size: 1rem;
}
.trend-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
}
.trend-card h3 a {
  text-decoration: none;
}
.trend-meta {
  color: var(--muted);
  font-size: 0.8rem;
}
.trend-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trend-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.trend-source {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(138, 180, 248, 0.08);
  color: var(--ink);
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.trend-list {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
}
.trend-list a {
  color: var(--muted);
  text-decoration: none;
}
.trend-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}
.trend-actions a,
.trend-actions button {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--ink);
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}
.trend-actions .primary {
  background: var(--accent);
  color: #0b0d12;
  border-color: transparent;
}
.trend-actions .secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--muted);
}
.trend-actions .ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.story-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 90;
}
.story-modal.is-open {
  display: flex;
}
.story-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, 0.75);
}
.story-modal-panel {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  background: var(--bg-elev);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  -webkit-overflow-scrolling: touch;
}
.story-modal-media {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  background: #0c111a;
  display: none;
}
.story-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story-modal-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}
.story-modal-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.story-modal-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}
.story-modal-sources {
  display: grid;
  gap: 0.6rem;
}
.story-modal-source {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0.7rem;
  background: var(--bg-card);
  display: grid;
  gap: 0.3rem;
}
.story-modal-source a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.story-modal-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.story-modal-actions a,
.story-modal-actions button {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--ink);
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
}
.story-modal-actions .primary {
  background: var(--accent);
  color: #0b0d12;
  border-color: transparent;
}
.story-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.meta {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--chip);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}
.controls label {
  color: var(--muted);
  font-size: 0.85rem;
}
.controls select {
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
}
.controls button {
  background: var(--accent);
  color: #0b0d12;
  border: none;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-weight: 600;
  cursor: pointer;
}
.controls button:hover { background: #a6c8ff; }
.filter-trigger {
  border: none;
  background: var(--accent);
  color: #0b0d12;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.filter-trigger:hover {
  background: #a6c8ff;
}
.filter-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.4rem;
  z-index: 26;
}
.filter-float.hidden { display: none; }
.user-block {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user-email {
  font-size: 0.85rem;
  color: var(--muted);
}
.user-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.user-link:hover { color: var(--accent-2); }
@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr auto;
    align-items: start;
    grid-template-areas:
      "brand actions"
      "search search";
  }
  .topbar-actions {
    align-items: center;
    justify-self: start;
    flex-wrap: wrap;
  }
}
@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
@media (max-width: 900px) {
  .refresh-status {
    width: 100%;
    justify-content: space-between;
  }
}
.status-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
  align-items: center;
}
.status-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.status-summary strong {
  color: var(--ink);
  font-weight: 700;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  display: inline-block;
}
.status-bar .chip {
  font-size: 0.78rem;
}
.menu {
  position: relative;
  display: inline-flex;
}
.menu summary {
  list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 200px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  display: grid;
  gap: 0.35rem;
  box-shadow: var(--shadow);
  z-index: 20;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.menu[open] .menu-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.menu-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
}
.menu-item:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.quick-filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}
.soc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
body[data-theme="light"] .soc-filters {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
.soc-filter-label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.soc-filter-chip {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: 0.2s ease;
}
.soc-filter-chip:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}
.soc-filter-chip.active {
  background: rgba(82, 255, 204, 0.15);
  border-color: rgba(82, 255, 204, 0.45);
  color: #a3ffe0;
}
.soc-filter-reset[aria-hidden="true"] {
  display: none;
}
.soc-advanced {
  margin: 0 0 1rem;
  padding: 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 20, 30, 0.6);
}
body[data-theme="light"] .soc-advanced {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.85);
}
.soc-advanced .field-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.soc-advanced .field-row {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.soc-advanced select,
.soc-advanced input[type="text"] {
  width: 100%;
  padding: 0.35rem 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 0.85rem;
}
.soc-advanced .chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.soc-advanced .chip-grid label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  font-size: 0.75rem;
}
.soc-advanced .chip-grid input {
  margin: 0;
}
.soc-advanced .reset-inline {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
}
.quick-filter-chip {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--ink);
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  text-decoration: none;
}
.quick-filter-chip.active {
  background: var(--accent);
  color: #0b0d12;
  border-color: transparent;
}
.quick-filter-chip.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.soc-toggle {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}
.view-toggle {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.segmented {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}
.toggle-pill {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--ink);
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
}
.segmented .toggle-pill {
  border-color: transparent;
  background: transparent;
}
.toggle-pill.is-active {
  background: var(--accent);
  color: #0b0d12;
  border-color: transparent;
}
.segmented .toggle-pill.is-active {
  background: var(--accent);
  box-shadow: var(--shadow-soft);
}
body.view-compact .hero-block,
body.view-compact .trending,
body.view-compact .coverage {
  display: none;
}
body.view-compact .columns section {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.4rem 0;
}
body.view-compact .section-title {
  margin-bottom: 0.4rem;
}
body.view-compact .entry {
  background: #0f141d;
}
@media (max-width: 900px) {
  .status-bar { display: none; }
  .category-bar { grid-template-columns: 1fr; }
  .category-bar .chip-link { display: none; }
}
main {
  max-width: none;
  width: 100%;
  margin: 0 auto 3rem;
  padding: 1.5rem clamp(1.2rem, 3.4vw, 4rem) 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
.content-wrap {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 1.4rem;
  animation: fadeInUp 0.4s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.skeleton-grid {
  display: none;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.skeleton-card {
  height: 140px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(110deg, rgba(24, 30, 42, 0.9) 8%, rgba(42, 52, 72, 0.9) 18%, rgba(24, 30, 42, 0.9) 33%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
body.is-loading .skeleton-grid { display: grid; }
body.is-loading .content-wrap { display: none; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.columns {
  display: grid;
  gap: 1.5rem;
}
.columns { grid-template-columns: minmax(0, 1fr); }
.soc-view {
  display: grid;
  gap: 1.2rem;
}
.soc-section {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 22, 36, 0.75);
  padding: 0.8rem 1rem 1rem;
}
.soc-section summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
}
.soc-section summary::-webkit-details-marker {
  display: none;
}
.soc-section-count {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.soc-section-grid {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
}
.soc-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.4rem 0;
}
.soc-case {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 16, 24, 0.65);
  padding: 0.7rem 0.9rem;
}
.soc-case-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
  list-style: none;
}
.soc-case-summary::-webkit-details-marker {
  display: none;
}
.soc-case-title {
  font-weight: 700;
  font-size: 1rem;
}
.soc-case-meta {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.2rem;
}
.soc-case-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.7rem;
}
.soc-case-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.85rem;
}
.soc-case-item a {
  text-decoration: none;
}
.soc-case-timeline {
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.soc-case-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.soc-case-timeline-list {
  display: grid;
  gap: 0.5rem;
}
.soc-case-timeline-item {
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  background: rgba(18, 22, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.soc-case-timeline-meta,
.soc-case-timeline-tags {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
section {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  width: 100%;
}
h2.section-title {
  font-size: inherit;
  font-weight: inherit;
  padding: 0;
}
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 0.8rem;
}
.section-title span {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
}
.section-title small {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.entry {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.9rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 0.9rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.entry.filtered-out {
  display: none;
}
.entry:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 180, 248, 0.4);
  box-shadow: 0 12px 28px rgba(3, 7, 14, 0.3);
}
.entry.read {
  opacity: 0.6;
  filter: grayscale(0.2);
}
.entry.has-thumb,
.entry.has-fallback {
  grid-template-columns: auto 1fr auto;
  align-items: start;
}
.entry:last-child { margin-bottom: 0; }
.entry-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.entry-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.entry-thumb {
  width: 88px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 44, 68, 0.6), rgba(14, 18, 28, 0.9)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 6px, transparent 6px, transparent 12px);
  display: grid;
  place-items: center;
}
.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.entry-thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.4rem;
  color: var(--muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background:
    linear-gradient(130deg, rgba(30, 42, 64, 0.7), rgba(10, 14, 22, 0.95)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04) 6px, transparent 6px, transparent 12px);
}
.entry-thumb-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #0b0d12;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.entry-thumb-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}
.entry-source {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
}
.entry-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0.1rem 0 0;
  line-height: 1.25;
}
.entry-title a {
  text-decoration: none;
  position: relative;
}
.entry-title a:hover { color: var(--accent-2); }
.entry-title a::after {
  content: attr(data-preview);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, 70vw);
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 3;
  white-space: normal;
}
.entry-title a:hover::after,
.entry-title a:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 900px) {
  .entry-title a::after { display: none; }
}
.entry-summary {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0.3rem 0 0;
}
.entry-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.45rem;
}
.entry-badge {
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}
.entry-badge.critical {
  background: rgba(255, 99, 99, 0.18);
  border-color: rgba(255, 99, 99, 0.5);
  color: #ffb6b6;
}
.entry-badge.high {
  background: rgba(255, 177, 76, 0.16);
  border-color: rgba(255, 177, 76, 0.5);
  color: #ffd2a1;
}
.entry-badge.medium {
  background: rgba(255, 230, 135, 0.14);
  border-color: rgba(255, 230, 135, 0.45);
  color: #ffe9a8;
}
.entry-badge.low {
  background: rgba(120, 200, 255, 0.14);
  border-color: rgba(120, 200, 255, 0.45);
  color: #b3ddff;
}
.entry-badge.meta {
  text-transform: none;
  letter-spacing: 0;
}
.popular-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.popular-card {
  border-radius: 16px;
  padding: 0.8rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: grid;
  gap: 0.4rem;
}
.popular-card a {
  text-decoration: none;
  font-weight: 700;
}
.popular-meta {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.entry-meta {
  display: flex;
  justify-content: flex-start;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.4rem;
}
.entry-meta span + span::before {
  content: "·";
  margin: 0 0.4rem;
}
.entry-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}
.entry-share {
  position: relative;
  margin-top: 0.4rem;
}
.share-menu {
  position: relative;
  display: inline-flex;
}
.share-menu summary {
  list-style: none;
}
.share-menu summary::-webkit-details-marker { display: none; }
.share-button {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.share-button svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.share-button:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}
.share-button.copied {
  border-color: var(--accent);
  color: var(--accent);
}
.share-button[data-share-native][hidden] { display: none; }
.share-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 180px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  display: grid;
  gap: 0.35rem;
  box-shadow: var(--shadow);
  z-index: 20;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.share-menu[open] .share-menu-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.share-menu-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
}
.share-menu-item:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.share-menu-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.entry-action {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--ink);
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.entry-action.primary {
  background: var(--accent);
  color: #0b0d12;
  border-color: transparent;
}
.entry-action.saved {
  background: #1e2c3f;
  color: var(--accent);
}
.entry-duplicates {
  margin: -0.4rem 0 0.9rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px dashed rgba(138, 180, 248, 0.35);
  background: rgba(20, 26, 36, 0.6);
}
.entry-duplicates summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
}
.entry-duplicates summary::-webkit-details-marker {
  display: none;
}
.entry-duplicate-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.entry-duplicate {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.85rem;
}
.entry-duplicate a {
  color: var(--ink);
  text-decoration: none;
}
.coverage {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.2rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow);
}
.coverage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.coverage-grid {
  display: grid;
  gap: 0.8rem;
}
.coverage-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
}
.coverage-card summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9rem 1rem;
}
.coverage-card summary::-webkit-details-marker { display: none; }
.coverage-summary {
  display: grid;
  gap: 0.5rem;
}
.coverage-title {
  font-weight: 700;
}
.coverage-title a { text-decoration: none; }
.coverage-title a:hover { color: var(--accent-2); }
.coverage-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.coverage-badge {
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  background: var(--chip);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}
.coverage-details {
  padding: 0 1rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.coverage-details ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}
.coverage-meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}
.toggle {
  justify-self: start;
  background: transparent;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-top: 0.4rem;
}
.notice {
  background: #222a3a;
  border: 1px solid #2f3a50;
  color: var(--muted);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.quick-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.chip-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.chip-link.active {
  background: var(--accent);
  color: #0b0d12;
  border-color: transparent;
}
.chip-link:hover { color: var(--accent-2); }
.security-stats {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}
.security-toolbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.security-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 0.6rem;
}
.security-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
}
.security-label { color: var(--muted); font-size: 0.85rem; }
.security-value { font-size: 1.2rem; font-weight: 700; }
.security-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.security-list div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}
.security-chip-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 0.6rem;
}
.security-chip {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
}
.security-chip:hover { border-color: var(--accent-2); }
.security-chip-title { font-weight: 700; }
.security-chip-meta { color: var(--muted); font-size: 0.85rem; }
.security-chip-desc { color: var(--muted); font-size: 0.9rem; }
.errors {
  background: #2b1f1a;
  border: 1px solid #4b2e24;
  color: #f7c1a5;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.errors li { margin-left: 1rem; }
.retry-button {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--ink);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 60;
}
.drawer {
  position: fixed;
  top: var(--drawer-top-offset, 0px);
  right: 0;
  height: calc(100% - var(--drawer-top-offset, 0px));
  width: min(92vw, 360px);
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 40px rgba(3, 7, 14, 0.4);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 70;
  display: flex;
  flex-direction: column;
}
@media (min-width: 1100px) {
  .drawer { width: 420px; }
}
.drawer.is-open { transform: translateX(0); }
body.drawer-open { overflow: hidden; }
body.drawer-open .drawer-overlay {
  opacity: 1;
  pointer-events: auto;
}
body.drawer-pinned .drawer-overlay {
  opacity: 0;
  pointer-events: none;
}
body.drawer-pinned .drawer {
  transform: translateX(0);
}
@media (min-width: 1100px) {
  body.drawer-pinned main {
    padding-right: calc(440px + clamp(1.2rem, 3.4vw, 4rem));
  }
  body.drawer-pinned .header-inner {
    padding-right: calc(440px + clamp(1.2rem, 3.4vw, 4rem));
  }
}
@media (min-width: 1100px) {
  body.drawer-pinned .filter-float {
    right: calc(440px + 1.5rem);
  }
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.3rem 0.8rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.drawer-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
  margin: 0;
}
.drawer-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pin-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.pin-toggle input { accent-color: var(--accent); }
@media (min-width: 1100px) {
  .pin-toggle { display: inline-flex; }
}
.drawer-close {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-weight: 600;
  cursor: pointer;
}
.drawer-content {
  padding: 1rem 1.2rem 1.6rem;
  display: grid;
  gap: 1.2rem;
  overflow-y: auto;
}
.drawer-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.drawer-meta .chip {
  font-size: 0.8rem;
}
.scroll-top {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #1c2230;
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(4, 8, 16, 0.45);
  cursor: pointer;
  z-index: 25;
}
.scroll-top.hidden { display: none; }
.resume-scroll {
  position: fixed;
  right: 1.5rem;
  bottom: 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0d12;
  border: none;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(4, 8, 16, 0.45);
  cursor: pointer;
  z-index: 25;
}
.resume-scroll.hidden { display: none; }
.load-more {
  display: grid;
  gap: 0.4rem;
  justify-items: center;
  margin: 1rem 0 0;
}
.load-more-button {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--ink);
  padding: 0.5rem 1.2rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.load-more-button:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}
.load-more-meta {
  color: var(--muted);
  font-size: 0.85rem;
}
.load-more-button[data-loading] {
  opacity: 0.6;
  pointer-events: none;
}
.mark-all-read-bar {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 1rem;
}
.mark-all-read-button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.3rem 1rem;
  cursor: pointer;
}
.mark-all-read-button:hover {
  color: var(--ink);
  border-color: var(--accent);
}
.aside-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
}
.source-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.source-actions button {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--ink);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.source-actions button.primary {
  background: var(--accent);
  color: #0b0d12;
  border-color: transparent;
}
.source-group {
  margin-bottom: 1.2rem;
}
.source-group:last-child { margin-bottom: 0; }
.source-group-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.source-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.source-status {
  display: grid;
  gap: 0.4rem;
}
.source-status-item {
  display: grid;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(9, 12, 18, 0.6);
}
.source-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.source-status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.status-badge.ok {
  background: rgba(63, 193, 133, 0.15);
  color: #8af0c2;
  border-color: rgba(63, 193, 133, 0.4);
}
.status-badge.err {
  background: rgba(239, 84, 72, 0.15);
  color: #f5a29c;
  border-color: rgba(239, 84, 72, 0.4);
}
.status-error {
  color: #f2b0a0;
  font-size: 0.75rem;
  word-break: break-word;
}
.cve-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 194, 93, 0.18);
  color: #ffd48a;
  font-weight: 600;
  font-size: 0.75em;
}
.source-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
}
.source-item:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.source-item input {
  accent-color: var(--accent);
}
.source-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0f131b;
}
.source-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.source-name {
  font-size: 0.9rem;
  color: var(--ink);
}
.filter {
  display: grid;
  gap: 1rem;
}
.time-range-custom {
  display: grid;
  gap: 0.4rem;
  margin-top: -0.4rem;
}
.time-range-custom.hidden {
  display: none;
}
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1.2rem;
}
.drawer-links {
  display: grid;
  gap: 0.5rem;
}
.drawer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.drawer-link .muted {
  font-weight: 400;
}
.profile-card .aside-title {
  margin-bottom: 0.6rem;
}
.profile-form {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.profile-form label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.profile-form label input[type="checkbox"] {
  margin-right: 0.4rem;
}
.public-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
}
.profile-form input,
.profile-form select {
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f141d;
  color: var(--ink);
}
.profile-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.profile-actions button,
.profile-actions a {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--ink);
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}
.profile-actions .primary {
  background: var(--accent);
  color: #0b0d12;
  border-color: transparent;
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: var(--shadow);
}
.profile-guide {
  color: var(--muted);
  font-size: 0.85rem;
  margin: -0.2rem 0 0.2rem;
}
.profile-actions .danger {
  background: #2a1f23;
  color: #f2b0a0;
  border-color: #4b2e2e;
}
.profile-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.8rem;
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  background: var(--accent);
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 0.4rem 0;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}
