:root{
  --bg:#0b0b0c;
  --panel:#111113;
  --text:#f4f4f5;
  --muted:#a1a1aa;
  --border:rgba(255,255,255,.10);
  --shadow: 0 18px 50px rgba(0,0,0,.45);

  --radius: 16px;
  --radius2: 12px;
  --max: 1120px;
  --focus: 2px solid rgba(244,244,245,.85);
}

:root.light{
  --bg:#ffffff;
  --panel:#f7f7f8;
  --text:#111113;
  --muted:#52525b;
  --border:rgba(0,0,0,.10);
  --shadow: 0 18px 50px rgba(0,0,0,.12);
  --focus: 2px solid rgba(17,17,19,.75);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
  letter-spacing: -0.01em;
}

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
  color: var(--text);
  min-width: 240px;
}
.logo{
  width: 36px; height: 36px;
  display:grid; place-items:center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
}
.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-name{ font-weight: 850; }
.brand-sub{ font-size:12px; color: var(--muted); margin-top: 3px; }

.actions{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

.search{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  min-width: min(360px, 72vw);
}
.search .icon{ color: var(--muted); }
.search input{
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  width: 100%;
  font-size: 14px;
}
.search input::placeholder{ color: color-mix(in srgb, var(--muted) 80%, transparent); }

.select{
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 700;
}

.iconBtn{
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
}

.hero{
  padding: 26px 0 10px;
}
.hero h1{
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
}
.muted{ color: var(--muted); }
.meta-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top: 10px; }
.pill{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  padding: 18px 0 12px;
}
.section-head h2{ margin:0; font-size: 18px; }
.view-actions{ display:flex; gap: 10px; }

.btn{
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: var(--text);
  color: var(--bg);
  padding: 10px 12px;
  font-weight: 900;
  cursor:pointer;
}
.btn.ghost{
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  color: var(--text);
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 26px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .brand{ min-width: unset; }
}

.card{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover{
  transform: translateY(-2px);
}

.thumb{
  aspect-ratio: 16/10;
  width: 100%;
  object-fit: cover;
  display:block;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

.card-body{ padding: 12px; }
.card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}
.card h3{
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.kicker{
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.desc{
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
}
.link{
  font-weight: 900;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  padding: 9px 10px;
  border-radius: 12px;
  display:inline-flex;
  align-items:center;
  gap: 8px;
}
.link:hover{ opacity: .92; }

.copy{
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 9px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 900;
}

.link:focus, .btn:focus, .iconBtn:focus, .select:focus, .search input:focus, .copy:focus{
  outline: var(--focus);
  outline-offset: 2px;
}

.footer{
  border-top: 1px solid var(--border);
  padding: 18px 0 30px;
}
.footer-row{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  flex-wrap:wrap;
}
.fineprint{ margin: 10px 0 0; font-size: 12px; }