:root { color-scheme: dark; --solved: #3DD68C; --partial: #F5B544; --open: #FF7A7A; --claim: #B79CFF; --other: #8A95A8; }
html { background: #0A1424; }
body { margin: 0; min-height: 100vh; color: #F2F4F8; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased;
  background: radial-gradient(60% 40% at 50% 0%, rgba(58,98,160,0.35), transparent 75%), #0A1424; }
a { color: #9DB5FF; } a:hover { color: #C3D2FF; }
.display { font-family: Montserrat, -apple-system, "Segoe UI", sans-serif; font-weight: 400; letter-spacing: -0.01em; margin: 0; }
.wrap { max-width: 1200px; box-sizing: border-box; margin: 0 auto; padding: 0 24px; }
.muted { color: #97A3B6; }

header { position: sticky; top: 0; z-index: 10; padding: 12px 16px 0; }
.bar { max-width: 1200px; box-sizing: border-box; margin: 0 auto; height: 60px; padding: 0 10px 0 14px; display: flex; align-items: center; gap: 16px; border-radius: 999px;
  background: rgba(13,21,37,0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #F2F4F8; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; flex-shrink: 0; }
.brand:hover { color: #F2F4F8; }
.brand img { width: 36px; height: 36px; display: block; }
.brand small { font-size: 15px; font-weight: 500; color: #1BABB8; }
.bar nav { margin-left: auto; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.bar nav a { padding: 8px 12px; border-radius: 999px; font-size: 14px; color: #C9D1DE; text-decoration: none; white-space: nowrap; }
.bar nav a:hover, .bar nav a[aria-current] { color: #F2F4F8; background: rgba(255,255,255,0.08); }
.bar nav a.cta { background: #F2F4F8; color: #0B0D12; font-weight: 500; margin-left: 6px; }

.hero { padding: 80px 24px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.eyebrow { font-size: 14px; font-weight: 600; color: #9DB5FF; }
.hero h1 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.06; text-wrap: balance; }
.hero p { margin: 0; max-width: 720px; font-size: 18px; line-height: 1.6; color: #97A3B6; }

.card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 22px; }
h2.section { margin: 64px 0 8px; font-size: clamp(24px, 3vw, 32px); }
p.lead { margin: 0 0 24px; max-width: 760px; font-size: 16px; line-height: 1.7; color: #C9D1DE; }

/* status badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid currentColor; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-solved { color: var(--solved); } .s-partial { color: var(--partial); } .s-open { color: var(--open); } .s-claim { color: var(--claim); } .s-other, .s-review { color: var(--other); }

/* counts bar */
.tally { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; color: #C9D1DE; }
.tally b { font-size: 20px; font-weight: 600; margin-right: 4px; }
.meter { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.06); }
.meter span { display: block; height: 100%; }
.meter .solved { background: var(--solved); } .meter .partial { background: var(--partial); } .meter .open { background: var(--open); } .meter .claim { background: var(--claim); } .meter .other, .meter .review { background: var(--other); }

/* overview areas */
.areas { display: grid; gap: 16px; margin-top: 48px; }
.area { display: grid; grid-template-columns: 120px 1fr; gap: 8px 28px; padding: 28px; text-decoration: none; color: inherit; transition: border-color .25s, transform .25s; }
.area:hover { border-color: rgba(27,171,184,0.6); transform: translateY(-2px); color: inherit; }
.area .lvl { display: flex; flex-direction: column; gap: 4px; }
.area .lvl b { font-family: Montserrat, sans-serif; font-weight: 500; font-size: 44px; line-height: 1; color: #1BABB8; }
.area .lvl span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #8A95A8; }
.area h3 { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.area p { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: #97A3B6; }
.area .go { margin-top: 14px; font-size: 14px; font-weight: 600; color: #9DB5FF; }

/* filters */
.filters { position: sticky; top: 76px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 24px 0 16px; padding: 10px; border-radius: 18px; background: rgba(10,20,36,0.92); border: 1px solid rgba(255,255,255,0.08); backdrop-filter: blur(8px); }
.filters button { font: inherit; font-size: 13.5px; padding: 7px 12px; border-radius: 999px; cursor: pointer; color: #C9D1DE; background: transparent; border: 1px solid rgba(255,255,255,0.14); }
.filters button[aria-pressed="true"] { color: #0B0D12; background: #F2F4F8; border-color: #F2F4F8; }
.filters input, .filters select { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 999px; color: #F2F4F8; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14); min-width: 0; }
.filters input { flex: 1 1 200px; }
.filters .count { margin-left: auto; font-size: 13px; color: #8A95A8; }
[hidden] { display: none !important; }

/* lists */
.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 70px 1fr auto; gap: 6px 18px; align-items: start; padding: 18px 22px; }
.item .num { font-family: Montserrat, sans-serif; font-size: 22px; color: #F2F4F8; text-decoration: none; }
.item h3 { margin: 0 0 4px; font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.item p { margin: 0; font-size: 14px; line-height: 1.6; color: #97A3B6; }
.item .meta { margin-top: 6px; font-size: 12.5px; color: #738096; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.tile { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid; background: rgba(255,255,255,0.03); }
.tile.s-solved { background: rgba(61,214,140,0.10); } .tile.s-partial { background: rgba(245,181,68,0.10); } .tile.s-open { background: rgba(255,122,122,0.08); }
.tile:hover { filter: brightness(1.3); }
.tile.s-other { opacity: 0.55; }
.mono { font-family: ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }

.lead { margin: 12px 0 0; max-width: 680px; font-size: 16px; line-height: 1.6; color: #97A3B6; }
.loop { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 24px 0 32px; padding: 0; list-style: none; }
.loop li { position: relative; padding: 20px; }
.loop b { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(27,171,184,0.16); color: #5FE3EC; font-size: 15px; }
.loop h3 { margin: 14px 0 6px; font-size: 17px; color: #F2F4F8; }
.loop p { margin: 0; font-size: 14px; line-height: 1.55; color: #97A3B6; }
.loop li:last-child b { background: rgba(27,171,184,0.32); }
.loop li:last-child b::before { content: "↻"; font-size: 18px; }
.loop li:last-child b { font-size: 0; }

.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 20px; }
.legend div { padding: 16px 18px; font-size: 14px; line-height: 1.55; color: #97A3B6; }
.legend .badge { margin-bottom: 8px; }

.sources { margin-top: 56px; padding: 24px; font-size: 14px; line-height: 1.7; color: #97A3B6; }
.sources h3 { margin: 0 0 8px; font-size: 15px; color: #F2F4F8; }

/* Qvanta program blocks (Erdős page) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin-top: 24px; }
.stats .card { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; border-radius: 18px; }
.stats b { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; } .stats span { font-size: 14px; color: #97A3B6; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px 48px; padding: 32px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.row .label { display: block; font-size: 14px; font-weight: 600; color: #738096; margin-bottom: 8px; }
.row h3 { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 600; }
.row p { margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: #C9D1DE; } .row p:last-child { margin-bottom: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.problem { padding: 28px; display: flex; flex-direction: column; gap: 12px; border-radius: 24px; }
.problem .top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.problem .top a { font-size: 21px; font-weight: 600; text-decoration: none; color: #F2F4F8; }
.problem p { margin: 0; font-size: 15px; line-height: 1.65; } .problem p.note { color: #97A3B6; }
.problem cite { font-style: normal; font-size: 13px; color: #738096; }

.contact { margin: 96px auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 56px 24px; border-radius: 30px; }
.contact h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; }
.contact p { margin: 0; max-width: 580px; font-size: 16px; line-height: 1.6; color: #97A3B6; }
.btn { margin-top: 8px; display: inline-flex; align-items: center; height: 48px; padding: 0 26px; border-radius: 999px; background: #F2F4F8; color: #0B0D12; font-size: 16px; font-weight: 500; text-decoration: none; }
.btn:hover { background: #FFFFFF; color: #0B0D12; }

footer { border-top: 1px solid rgba(255,255,255,0.08); padding: 28px 24px 40px; text-align: center; font-size: 13px; color: #738096; }
footer a { color: #97A3B6; text-decoration: none; margin: 0 8px; }

@media (max-width: 760px) {
  .bar { gap: 8px; padding-right: 8px; }
  .brand span, .brand small { display: none; }
  .bar nav { mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .bar nav a { padding: 8px 10px; }
  .hero { padding-top: 52px; }
  .area { grid-template-columns: 1fr; padding: 22px; }
  .area .lvl { flex-direction: row; align-items: baseline; gap: 10px; }
  .area .lvl b { font-size: 32px; }
  .item { grid-template-columns: 1fr; padding: 16px 18px; }
  .item .num { font-size: 18px; }
  .filters { top: 72px; }
  .filters .count { margin-left: 0; width: 100%; }
}
