:root {
  --bg: #0c0d0f;
  --panel: #111214;
  --panel2: #15171a;
  --text: #e5e5e5;
  --dim: #9aa3b2;
  --muted: #6b7280;
  --border: #2a2a2a;
  --line: #1e1e1e;
  --accent: #c7d2fe;
  --accent2: #e0e7ff;
  --shadow: rgba(0, 0, 0, 0.35);
  --good: #34d399;
  --bad: #fb7185;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

html,
body {
  min-height: 100%;
}

html {
  scrollbar-gutter: stable both-edges;
  overflow-y: scroll;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.45;
  overflow-x: hidden;
  padding-bottom: 4.1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent2);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 18px 54px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 0.5rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  transform: translateY(-140%);
  transition: transform 0.15s ease;
  z-index: 20000;
}
.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 3.2rem;
}

.view-tabs {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#viewTabs.view-tabs {
  margin-top: 8px;
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.view-tab {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--dim);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.view-tab:hover {
  border-color: rgba(199, 210, 254, 0.35);
  color: var(--text);
}
.view-tab[data-active="1"] {
  border-color: rgba(199, 210, 254, 0.45);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(199, 210, 254, 0.18) inset;
}
.view-tab:focus-visible {
  outline: 2px solid rgba(199, 210, 254, 0.5);
  outline-offset: 2px;
}

#viewTabs .view-tab {
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  margin: 0;
  padding: 8px 11px;
  font-size: 12.5px;
  background: transparent;
}

#viewTabs .view-tab:last-child {
  border-right: 0;
}

#viewTabs .view-tab:hover {
  background: rgba(255, 255, 255, 0.05);
}

#viewTabs .view-tab[data-active="1"] {
  background: rgba(199, 210, 254, 0.14);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(199, 210, 254, 0.2);
}

#viewTabs .view-tab-link {
  border-left: 1px solid var(--border);
  padding: 8px 11px;
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  color: var(--accent2);
  display: inline-flex;
  align-items: center;
}

#viewTabs .view-tab-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

#viewTabs .request-source-inline {
  color: #9ae6b4;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  background: linear-gradient(180deg, rgba(12, 13, 15, 0.96), rgba(12, 13, 15, 0.9));
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid var(--line);
}

.topbar-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ecosystem-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ecosystem-nav a,
.ecosystem-nav .active {
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.35rem 0.45rem;
  border-radius: 0.45rem;
}

.ecosystem-nav a {
  color: var(--dim);
}

.ecosystem-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.ecosystem-nav .active {
  color: #9ae6b4;
  background: rgba(72, 187, 120, 0.16);
  border: 1px solid rgba(72, 187, 120, 0.35);
}

.brand {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}
.brand:hover {
  color: var(--accent2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--dim);
  font-size: 12px;
  white-space: nowrap;
}

.fineprint {
  margin: 18px auto 0;
  max-width: 1100px;
  border-top: 1px solid var(--line);
  padding: 14px 18px 0;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  position: relative;
}

.footer-about-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.about-panel {
  margin: 10px auto 0;
  max-width: 720px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.45rem 0.6rem;
}
.about-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}
.about-panel summary::-webkit-details-marker {
  display: none;
}
.about-panel p {
  margin: 0.5rem 0 0;
  color: var(--dim);
  font-size: 0.76rem;
  line-height: 1.45;
}

.footer-controls {
  position: absolute;
  right: 18px;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1;
  background: var(--panel);
  color: var(--dim);
}
.status-ok {
  border-color: rgba(72, 187, 120, 0.45);
  color: #9ae6b4;
}

.theme-picker {
  position: relative;
}
.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  min-width: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.theme-toggle:focus-visible {
  outline: 2px solid rgba(199, 210, 254, 0.8);
  outline-offset: 2px;
}
.palette-icon {
  position: relative;
  width: 18px;
  height: 18px;
}
.palette-icon span {
  display: block;
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.palette-icon span:nth-child(1) {
  left: 0;
  top: 2px;
  background: #7db5ff;
}
.palette-icon span:nth-child(2) {
  right: 0;
  top: 0;
  background: #d28cff;
}
.palette-icon span:nth-child(3) {
  left: 1px;
  bottom: 0;
  background: #ff8aa3;
}
.palette-icon span:nth-child(4) {
  right: 1px;
  bottom: 2px;
  background: #89d9b8;
}
.theme-popover {
  position: absolute;
  bottom: calc(100% + 0.45rem);
  right: 0;
  top: auto;
  display: none;
  gap: 0.45rem;
  flex-wrap: wrap;
  width: 190px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--panel);
  z-index: 30;
}
.theme-popover.open {
  display: flex;
}
.theme-swatch {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}
.theme-swatch.active {
  border-color: var(--accent);
}
.sw-dark {
  background: #0c0d0f;
}
.sw-navy {
  background: #081423;
}
.sw-plum {
  background: #1a1022;
}
.sw-dawn {
  background: #f6efe8;
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 5.4rem;
  }
  .topbar-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }
  .ecosystem-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.1rem;
    flex-wrap: nowrap;
  }
  .ecosystem-nav a,
  .ecosystem-nav .active {
    white-space: nowrap;
  }
  .footer-controls {
    position: static;
    margin: 10px auto 0;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .theme-popover {
    right: 0;
    left: auto;
    width: min(220px, 92vw);
  }
}

.scroll-top-btn {
  display: none;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.scroll-top-btn.show {
  display: grid;
}

.btn {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--text);
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
.btn:hover {
  border-color: rgba(199, 210, 254, 0.35);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible {
  outline: 2px solid rgba(199, 210, 254, 0.5);
  outline-offset: 2px;
}

#moreWrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-read-more {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  border-color: rgba(199, 210, 254, 0.55);
  background: linear-gradient(180deg, rgba(199, 210, 254, 0.24), rgba(199, 210, 254, 0.12));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
}

.btn-read-more:hover {
  border-color: rgba(199, 210, 254, 0.8);
}

main {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

#list {
  display: grid;
  gap: 12px;
}

.card {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  padding: 12px;
  align-items: stretch;
}

.vote {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 3px;
  border-right: 1px solid var(--line);
  padding-right: 8px;
  padding-top: 2px;
  align-self: start;
}

.vote button {
  width: 20px !important;
  height: 20px !important;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px !important;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  padding: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.vote button:hover {
  border-color: rgba(199, 210, 254, 0.35);
  color: var(--text);
}
.vote button:active {
  transform: translateY(1px);
}
.vote button:focus-visible {
  outline: 2px solid rgba(199, 210, 254, 0.5);
  outline-offset: 2px;
}
.vote button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.vote button[data-active="1"][data-dir="up"] {
  border-color: rgba(52, 211, 153, 0.45);
  color: var(--good);
}
.vote button[data-active="1"][data-dir="down"] {
  border-color: rgba(251, 113, 133, 0.45);
  color: var(--bad);
}

.vote .score {
  font-family: var(--mono);
  font-size: 11px !important;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  opacity: 0.92;
  width: 20px !important;
  height: 20px !important;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  place-items: center;
  flex: 0 0 20px !important;
}

.body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 860px) {
  .body {
    grid-template-columns: 180px 1fr;
    align-items: start;
  }
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: baseline;
  color: var(--dim);
  font-size: 12px;
  margin-top: 2px;
}

.k {
  font-family: var(--mono);
  font-size: 12px;
  opacity: 0.9;
}

.media-type-badge {
  gap: 5px;
}

.media-type-badge svg {
  opacity: 0.9;
}

.title {
  margin: 0 0 2px;
  font-size: 18px;
  letter-spacing: 0.2px;
  line-height: 1.26;
}

.blurb {
  margin: 2px 0 0;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.45;
}

.thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--panel2);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.02);
}

.footer-freshness-wrap {
  margin-top: 6px;
}

#freshness {
  color: var(--dim);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent2) 38%, var(--border));
  background: color-mix(in srgb, var(--accent2) 10%, transparent);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.catbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  background: linear-gradient(180deg, rgba(12, 13, 15, 0.9), rgba(12, 13, 15, 0.98));
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
}

.catbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cat-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.cat-chip[data-active="1"] {
  border-color: rgba(199, 210, 254, 0.45);
  color: var(--text);
  background: rgba(199, 210, 254, 0.14);
}

.back-to-top {
  position: fixed;
  right: 12px;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  z-index: 9100;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  display: none;
  place-items: center;
  cursor: pointer;
}

.back-to-top.show {
  display: grid;
}


/* BEGIN NEWS FOCUS FEATURED OVERRIDE */
.featured-story-mount{display:grid;gap:12px}
.featured-story-card{border:1px solid var(--border);border-radius:16px;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.03));padding:12px;display:grid;gap:12px}
@media (min-width:860px){.featured-story-card{grid-template-columns:minmax(0,360px) minmax(0,1fr);align-items:start}}
.featured-story-media-wrap{width:100%;aspect-ratio:16/9;border-radius:14px;border:1px solid var(--border);overflow:hidden;background:var(--panel2)}
.featured-story-media{width:100%;height:100%;object-fit:cover;display:block}
.featured-story-copy{display:grid;gap:8px}
.featured-story-kicker{font-family:var(--mono);font-size:12px;color:var(--accent2);text-transform:uppercase;letter-spacing:.06em}
.featured-story-title{margin:0;font-size:26px;line-height:1.2}
.featured-story-blurb{margin:2px 0 0;color:var(--dim);font-size:16px;line-height:1.5}
.featured-story-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.featured-story-read-original,.featured-story-clear{border:1px solid var(--border);border-radius:999px;padding:7px 12px;font-size:13px;line-height:1;background:rgba(255,255,255,.04);color:var(--text)}
.featured-story-read-original:hover,.featured-story-clear:hover{border-color:rgba(199,210,254,.5);background:rgba(199,210,254,.1)}
.featured-story-clear{cursor:pointer}
.title-focus-link{color:inherit;text-decoration:none}
.title-focus-link:hover .title,.title-focus-link:focus-visible .title{color:var(--accent2)}
.source-link{display:inline-flex;align-items:center;font-size:12px;color:var(--accent2);margin-top:6px}
/* END NEWS FOCUS FEATURED OVERRIDE */

/* BEGIN NEWS GOALS V1 */
.view-tab[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(199, 210, 254, 0.24);
}

.category-tag {
  border: 1px solid color-mix(in srgb, var(--accent2) 34%, var(--border));
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  background: color-mix(in srgb, var(--accent2) 12%, transparent);
  text-transform: capitalize;
}

#list .card.tier-2 {
  border-color: color-mix(in srgb, var(--accent2) 36%, var(--border));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

#list .card.tier-2 .title {
  font-size: 1.08rem;
  line-height: 1.3;
}

#list .card.tier-2 .thumb {
  min-height: 160px;
}

@media (max-width: 640px) {
  #list .card.tier-2 .title {
    font-size: 1rem;
  }
}
/* END NEWS GOALS V1 */
