@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/static/fonts/BricolageGrotesque-wght.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(/static/fonts/Nunito-wght-normal.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/static/fonts/Newsreader-wght.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: italic; font-weight: 200 1000; font-display: swap; src: url(/static/fonts/Nunito-wght-italic.woff2) format('woff2'); }
:root {
  --navy: #0B1D3A; --navy-2: #12295A; --blue: #2563EB; --blue-deep: #1D4ED8; --sky: #7DD3FC; --sky-soft: #E0F2FE;
  --amber: #F59E0B; --amber-deep: #D97706; --coral: #FB7185;
  --bg: #EEF4FB; --card: #FFFFFF; --fg: #14213D; --muted: #5B6B85; --line: #D9E4F5;
  --accent: var(--blue); --accent-fg: #FFFFFF; --danger: #DC2626; --ok: #059669;
  --shadow: 0 1px 2px rgba(11,29,58,.06), 0 8px 24px -12px rgba(37,99,235,.25);
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --title: 'Newsreader', Georgia, 'Times New Roman', serif; --title-weight: 500;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0A1426; --card: #132040; --fg: #E6EEFB; --muted: #94A7C8; --line: #23365F; --accent: #60A5FA; --accent-fg: #0B1D3A; --danger: #F87171; --ok: #34D399; --sky-soft: #173257; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.6); }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 16px/1.55 var(--body); background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--title); font-weight: var(--title-weight); letter-spacing: -0.005em; line-height: 1.15; font-optical-sizing: auto; }
h1 { font-size: 37px; margin: 0 0 18px; }
h1 .badge, h2 .badge { vertical-align: middle; margin-left: 8px; }
h2 { font-size: 25px; margin: 26px 0 12px; }
/* header: night sky with a drift of clouds */
.top { position: relative; display: flex; align-items: center; gap: 22px; padding: 12px 22px; color: #fff;
  background: linear-gradient(100deg, var(--navy) 0%, #143a8f 55%, var(--blue) 100%); box-shadow: 0 2px 12px rgba(11,29,58,.25); }
.top::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 65%); mask-image: linear-gradient(90deg, transparent 30%, #000 65%);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 70'><g fill='white'><circle cx='52' cy='30' r='13'/><circle cx='39' cy='37' r='9'/><circle cx='67' cy='35' r='11'/><rect x='30' y='36' width='48' height='12' rx='6'/><circle cx='170' cy='48' r='8'/><circle cx='162' cy='52' r='5.5'/><circle cx='179' cy='51' r='6.5'/><rect x='156' y='52' width='30' height='7' rx='3.5'/></g></svg>") 0 0/240px 70px repeat; }
.top > a.small { background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; font-weight: 700; opacity: 1; }
.top > a.small:hover { background: rgba(255,255,255,.24); text-decoration: none; }
.top > * { position: relative; }
.top .brand { font-family: var(--display); font-weight: 800; font-size: 21px; color: #fff; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.top .brand:hover { text-decoration: none; }
.brand .mark { color: var(--sky); flex: 0 0 auto; }
.top nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { color: #E6EEFB; font-weight: 700; font-size: 14px; padding: 6px 11px; border-radius: 999px; transition: background .15s; white-space: nowrap; flex: 0 0 auto; }
.top nav a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.top nav a.on { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 -2px 0 var(--amber); }
/* account menu */
.top .menu { position: relative; flex: 0 0 auto; }
.top .menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 13px; font-weight: 700; max-width: 240px; }
.top .menu summary::-webkit-details-marker { display: none; }
.top .menu summary:hover { background: rgba(255,255,255,.24); }
.top .menu .avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sky); color: var(--navy); font-family: var(--display); font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.top .menu .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .menu .dd { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px -16px rgba(11,29,58,.5); padding: 6px; z-index: 20; }
.top .menu .dd .who { padding: 8px 12px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .menu .dd a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--fg); font-weight: 600; font-size: 14px; }
.top .menu .dd a:hover { background: var(--sky-soft); text-decoration: none; }
.top .menu .dd a:last-child { color: var(--danger); }
.top > a.small { color: #fff; opacity: .8; }
.wrap { max-width: 920px; margin: 0 auto; padding: 28px 20px 70px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--card); font-weight: 600; border-left-width: 4px; }
.flash.error { border-color: var(--danger); color: var(--danger); }
.flash.ok { border-color: var(--ok); color: var(--ok); }
form.inline { display: inline; }
input[type=text], input[type=email], input[type=password], input[type=url] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; transition: border-color .15s, box-shadow .15s; }
input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
label { display: block; margin: 12px 0 5px; font-weight: 700; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
button, .btn { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; transition: transform .1s, box-shadow .15s, background .15s; }
button:hover, .btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
button.primary, .btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
button.primary:hover, .btn.primary:hover { background: var(--blue-deep); }
button.hot, .btn.hot { background: var(--amber); color: var(--navy); border-color: var(--amber); }
button.hot:hover, .btn.hot:hover { background: var(--amber-deep); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 600; }
button.link:hover { text-decoration: underline; transform: none; box-shadow: none; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.row { display: flex; gap: 12px; align-items: center; }
.row > * { flex: 1; }
.row > .fixed { flex: 0 0 auto; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { position: relative; padding: 13px 0 13px 16px; border-bottom: 1px solid var(--line); }
.list li::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--feed, var(--line)); }
.list li:last-child { border-bottom: 0; }
.list li .body { min-width: 0; }
.list li .body::after { content: ""; display: block; clear: both; }
/* The cover image: a prominent lead floated left under the byline, with the
   description wrapping around it. About 2x the old side thumbnail. */
.list .lead { float: left; width: 232px; margin: 8px 16px 6px 0; border-radius: 12px; overflow: hidden; background: var(--line); }
.list .lead img { display: block; width: 100%; height: 150px; object-fit: cover; }
.list li.read .lead { opacity: .6; }
.list .actions { clear: both; }
@media (max-width: 560px) { .list .lead { float: none; width: 100%; margin: 8px 0; } .list .lead img { height: 190px; } }
.list .title { font-family: var(--title); font-size: 21.5px; font-weight: var(--title-weight); letter-spacing: 0; line-height: 1.25; }
.list .title a { color: var(--fg); }
.list .title a:hover { color: var(--blue); }
.list .meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.list .meta .feed { color: var(--feed, var(--muted)); font-weight: 700; }
/* the writer (or channel) behind an article, when the feed says who */
.author { display: inline-flex; align-items: center; gap: 5px; background: var(--sky-soft); color: var(--blue-deep); border-radius: 999px; padding: 1px 10px 1px 7px; font-weight: 700; font-size: 12.5px; vertical-align: middle; white-space: nowrap; }
.author svg { width: 12px; height: 12px; flex: 0 0 auto; }
.author.video { background: #FEF3C7; color: #92400E; }
.ext { text-decoration: underline; text-decoration-color: rgba(37,99,235,.4); text-underline-offset: 2px; word-break: break-all; }
.ext::after { content: " ↗"; font-size: .8em; opacity: .7; }
.ext.mention { text-decoration: none; font-weight: 700; }
.ext.mention::after { content: none; }
.leave { border: 0; border-radius: 16px; padding: 0; max-width: min(92vw, 440px); background: var(--card); color: var(--fg); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.leave::backdrop { background: rgba(11,29,58,.55); backdrop-filter: blur(2px); }
.leave form { padding: 22px 24px; }
.leave h3 { margin: 0 0 8px; font-size: 22px; }
.leave p { margin: 0 0 10px; color: var(--muted); }
.leave .url { font-size: 12px; color: var(--blue); word-break: break-all; background: var(--sky-soft); border-radius: 8px; padding: 8px 10px; }
.leave .btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.progress { display: inline-flex; align-items: center; gap: 4px; color: var(--amber-deep); font-weight: 700; font-size: 12.5px; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .progress { color: var(--amber); } }
/* tag chips */
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--tag, var(--blue)); border: 1.5px solid var(--tag, var(--blue)); border-radius: 999px; padding: 0 9px; line-height: 20px; margin: 2px 4px 2px 0; }
.tag:hover { background: var(--tag, var(--blue)); color: #fff; text-decoration: none; }
/* front page: unread by tag */
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.topic { position: relative; display: block; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--tag, var(--blue)); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); color: var(--fg); transition: transform .1s; }
.topic:hover { text-decoration: none; transform: translateY(-2px); }
.topic .name { font-family: var(--title); font-size: 21px; font-weight: 500; line-height: 1.2; padding-right: 44px; }
.topic .count { position: absolute; top: 12px; right: 12px; }
.topic .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.topic.all { border-left-color: var(--navy); }
.topic.none { border-left-color: var(--line); }
.topic .go { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--blue); }
@media (prefers-color-scheme: dark) { .author { color: var(--sky); } .author.video { background: #3B2A0A; color: #FCD34D; } }
.list .summary { margin-top: 5px; color: var(--fg); opacity: .8; }
.list .summary.pre { white-space: pre-line; }
.list li.read .title a { font-weight: 600; color: var(--muted); }
.list li.read::before { opacity: .35; }
/* 1px top padding + 21px line box: Nunito's digits otherwise sit ~0.75px
   high in a 22px pill (measured at 4x). */
.badge { display: inline-block; min-width: 24px; padding: 1px 8px 0; border-radius: 999px; background: var(--amber); color: var(--navy); font-size: 13px; font-weight: 800; text-align: center; line-height: 21px; font-family: var(--body); letter-spacing: 0; }
.badge.zero { background: var(--line); color: var(--muted); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
code { background: var(--sky-soft); color: var(--blue-deep); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
@media (prefers-color-scheme: dark) { code { color: var(--sky); } }
/* empty states */
.empty-state { text-align: center; padding: 36px 20px; }
.empty-state .mark { color: var(--sky); opacity: .9; }
.empty-state h2 { margin: 12px 0 6px; }
.empty-state p { color: var(--muted); margin: 0 0 14px; }
/* landing page */
.hero { padding: 34px 0 10px; }
.hero h1 { font-size: 56px; line-height: 1.04; margin: 0 0 14px; max-width: 15ch; letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: var(--blue); background: linear-gradient(transparent 62%, rgba(245,158,11,.55) 62%); padding: 0 .1em; white-space: nowrap; }
.hero p { font-size: 19px; color: var(--muted); max-width: 52ch; margin: 0 0 22px; }
.hero .actions .btn { font-size: 16px; padding: 11px 22px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 26px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.feature .n { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 13px; color: var(--navy); background: var(--sky); border-radius: 999px; padding: 2px 10px; margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 22px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .top .menu .email { display: none; } .top .menu summary { padding: 3px; } }
@media (max-width: 640px) { .hero h1 { font-size: 38px; } .top { gap: 10px; padding: 9px 12px; } .top nav a { padding: 6px 9px; font-size: 13px; } .top .brand { font-size: 18px; gap: 7px; } }
@media (max-width: 400px) { .top .brand .word { display: none; } }
/* a badge is never squeezed by a flex row: its digits must stay inside the pill */
.badge { flex: 0 0 auto; }
