:root {
  font-size: 118.75%;
  color-scheme: dark;
  --background: #0d1117;
  --surface: #151b23;
  --surface-raised: #1b232e;
  --surface-hover: #202a36;
  --text: #edf2f7;
  --secondary: #b0bdcc;
  --muted: #96a4b7;
  --border: #2b3543;
  --accent: #9fe4c6;
  --accent-hover: #bdf3dc;
  --accent-ink: #102c22;
  --accent-soft: #1b342d;
  --danger: #ffaba8;
  --danger-soft: #3b2025;
  --update-accent: #acc8f4;
  --update-hover: #c6dcfa;
  --update-ink: #14243b;
  --field: #10161e;
  --shadow: 0 16px 48px rgb(0 0 0 / .35);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
:root[data-font-size="small"] { font-size: 106.25%; }
:root[data-font-size="large"] { font-size: 131.25%; }
:root[data-theme="light"] {
  color-scheme: light;
  --background: #f4f6f8;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-hover: #edf2f5;
  --text: #17252f;
  --secondary: #425465;
  --muted: #596a7b;
  --border: #d9e1e8;
  --accent: #176548;
  --accent-hover: #0f4f37;
  --accent-ink: #ffffff;
  --accent-soft: #e5f2ea;
  --danger: #a32330;
  --danger-soft: #fce8ea;
  --update-accent: #315b86;
  --update-hover: #24496f;
  --update-ink: #ffffff;
  --field: #f8fafb;
  --shadow: 0 16px 48px rgb(21 39 57 / .12);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; background: var(--background); }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: var(--accent-hover); }
button, input, select, summary, a { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, select, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.skip-link { position: fixed; top: -6rem; left: 1rem; z-index: 100; padding: .7rem 1rem; background: var(--surface); border: 1px solid var(--accent); border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.site-header { border-bottom: 1px solid var(--border); }
.main-nav { max-width: 1060px; margin: auto; display: flex; gap: 1.6rem; align-items: center; padding: 1rem 2rem; }
.brand-lockup { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; margin-right: auto; }
.brand { color: var(--text); font-size: 1.8rem; font-weight: 850; letter-spacing: -.08em; line-height: 1; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-dot { color: var(--accent); }
.brand-tagline { color: var(--muted); font-size: .6rem; line-height: 1; font-weight: 400; letter-spacing: .02em; white-space: nowrap; }
main { max-width: 1000px; margin: 3.5rem auto; padding: 0 2rem; min-height: 70vh; }
main:has(> .feed-toolbar) { margin-top: 1rem; margin-bottom: 0; }
main:focus { outline: none; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 750; line-height: 1.12; margin: 0 0 1.4rem; letter-spacing: -.055em; }
h2 { font-size: 1.22rem; font-weight: 650; line-height: 1.4; margin: 0 0 .6rem; letter-spacing: -.02em; }
p { margin: .6rem 0; }
main > p { color: var(--secondary); }
.heading, .actions, .pagination { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.heading { justify-content: space-between; margin-bottom: 1.5rem; }
.heading h1 { margin-bottom: 0; }
.menu { position: relative; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.menu-toggle, .filter-toggle { display: inline-flex; gap: .55rem; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: .6rem; padding: .55rem .85rem; background: var(--surface); color: var(--secondary); font-size: .85rem; font-weight: 550; user-select: none; }
.menu-toggle:hover, .filter-toggle:hover, details[open] > summary { background: var(--surface-hover); color: var(--text); }
.menu-panel { position: absolute; top: calc(100% + .65rem); right: 0; z-index: 20; width: 240px; padding: .6rem; border: 1px solid var(--border); border-radius: .85rem; background: var(--surface-raised); box-shadow: var(--shadow); }
.menu-caption { margin: .35rem .65rem .5rem; color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.menu-link { display: block; padding: .65rem .7rem; border-radius: .45rem; color: var(--text); font-size: .9rem; text-decoration: none; }
.menu-link:hover { color: var(--text); background: var(--surface-hover); }
.menu-link-danger { color: var(--danger); }
.menu-link-danger:hover { color: var(--danger); background: var(--danger-soft); }
.menu-divider { height: 1px; background: var(--border); margin: .5rem .15rem; }
.appearance-toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; margin: 0; padding: .65rem .7rem; border: 0; border-radius: .45rem; background: transparent; color: var(--text); font-size: .9rem; font-weight: 400; }
.appearance-toggle:hover { background: var(--surface-hover); color: var(--text); }
.theme-value { padding: .1rem .5rem; color: var(--accent); background: var(--accent-soft); border-radius: .35rem; font-size: .75rem; }
.font-size-control { margin: .65rem .7rem .35rem; color: var(--secondary); }
.feed-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 1rem; margin-bottom: 1.4rem; padding-bottom: 1.15rem; border-bottom: 1px solid var(--border); }
.active-filters { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.feed-label { display: inline-flex; align-items: center; gap: .55rem; color: var(--secondary); font-size: .85rem; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.filter-chip { display: inline-flex; align-items: center; gap: .65rem; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--accent-soft); color: var(--accent); font-size: .78rem; text-decoration: none; }
.filter-chip span { font-size: 1rem; line-height: 1; }
.filter-count { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; border-radius: .3rem; background: var(--accent); color: var(--accent-ink); font-size: .7rem; }
.filter-panel { position: relative; }
.filter-toggle { display: flex; }
.controls { position: absolute; z-index: 10; top: calc(100% + .75rem); right: 0; width: min(720px, calc(100vw - 2.2rem)); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 1.1rem; margin: 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: .8rem; background: var(--surface); }
.control-field { min-width: 0; }
.controls label { margin: 0 0 .35rem; font-size: .78rem; color: var(--muted); }
.controls select { width: 100%; max-width: 100%; }
.control-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-bottom: .05rem; }
.control-actions input[type=submit] { margin: 0; }
.control-actions a { font-size: .82rem; color: var(--secondary); }
.card { padding: 1.5rem; margin: 1rem 0; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface); overflow-wrap: anywhere; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 1rem; }
.category-grid > .card { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 1rem; }
.category-grid .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-top: auto; padding-top: .5rem; }
.category-grid .actions button { margin: 0; }
.story { padding: 1.6rem 1.75rem; transition: border-color 120ms ease; }
.story:hover { border-color: var(--muted); }
.story h2 { margin: .55rem 0; font-size: 1.25rem; line-height: 1.4; letter-spacing: -.025em; }
.story h2 a { color: var(--text); text-decoration: none; }
.story h2 a:hover { color: var(--accent); }
.story-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .6rem; margin-top: 0; overflow-wrap: normal; }
.story-source { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--secondary); }
.meta { color: var(--muted); font-size: .77rem; }
.story-description { color: var(--secondary); font-size: .9rem; line-height: 1.7; }
.story-author { margin-bottom: 0; }
.story-with-image { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); padding: 0; overflow: hidden; }
.story-with-image .story-copy { padding: 1.5rem; }
.story-media { position: relative; min-height: 240px; background: var(--surface-raised); }
.story-copy { min-width: 0; }
.story-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.url { color: var(--secondary); overflow-wrap: anywhere; font-size: .9rem; }
label { display: block; font-size: .9rem; font-weight: 550; margin-top: 1rem; }
input, select, button, .button { font: inherit; border: 1px solid var(--border); border-radius: .5rem; padding: .65rem .85rem; }
input[type=text], input[type=search], input[type=url], input[type=number], input[type=email], input[type=password], select { display: block; width: 100%; max-width: 600px; min-width: 0; background-color: var(--field); color: var(--text); font-size: .9rem; }
.source-search, .category-search { margin-bottom: 1.5rem; }
.source-search a, .category-search a { margin-left: .75rem; font-size: .85rem; }
input::placeholder { color: var(--muted); opacity: .85; }
select:not([multiple]) { appearance: none; -webkit-appearance: none; padding-right: 2.65rem; background-image: url("/assets/select-chevron-39014cc1.svg"); background-repeat: no-repeat; background-position: right .85rem center; background-size: 1rem; }
option { background: var(--surface); color: var(--text); }
input[type=submit], button, .button { display: inline-block; margin: .8rem 0; background: var(--accent); color: var(--accent-ink); font-size: .85rem; font-weight: 600; cursor: pointer; text-decoration: none; border-color: transparent; }
input[type=submit]:hover, button:hover, .button:hover { background: var(--accent-hover); color: var(--accent-ink); }
.nav-refresh { display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: .6rem; background: transparent; color: var(--secondary); border-color: var(--border); }
.nav-refresh:hover { background: var(--surface-hover); color: var(--text); }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); flex-shrink: 0; }
fieldset { border: 1px solid var(--border); border-radius: .75rem; margin: 1.5rem 0; padding: 1.25rem; }
legend { padding: 0 .5rem; color: var(--secondary); font-size: .85rem; font-weight: 550; }
.check { display: flex; align-items: center; gap: .6rem; color: var(--secondary); font-weight: 400; }
.actions { margin-top: 1rem; }
.actions a { font-size: .85rem; }
.actions form { display: inline; }
.actions button { background: var(--surface-raised); color: var(--secondary); border-color: var(--border); font-size: .8rem; }
.actions button:hover { background: var(--surface-hover); color: var(--text); }
.category-tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.category-tag { padding: .2rem .65rem; border-radius: .4rem; background: var(--accent-soft); color: var(--accent); font-size: .75rem; text-decoration: none; }
.flash { padding: .85rem 1rem; border: 1px solid var(--accent); border-radius: .6rem; background: var(--accent-soft); color: var(--text); font-size: .9rem; }
.empty { padding: 3.5rem 1.5rem; text-align: center; border: 1px dashed var(--border); border-radius: 1rem; margin: 2rem 0; }
.empty p { color: var(--secondary); max-width: 34rem; margin: .65rem auto 1rem; }
.feed-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .25rem .5rem; margin: 2rem 0 0; }
.pagination { justify-content: center; gap: .65rem; margin: 0 0 0 auto; color: var(--muted); font-size: .7rem; white-space: nowrap; }
.pagination a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: .5rem; color: var(--text); text-decoration: none; font-size: 0; }
.pagination a::before { font-size: 1rem; }
.pagination-previous::before { content: "←"; }
.pagination-next::before { content: "→"; }
.pagination a:hover { background: var(--surface-hover); }
.site-footer { display: flex; align-items: center; justify-content: center; gap: .8rem; padding: 1.5rem 1rem 2.5rem; color: var(--muted); font-size: .75rem; }
main:has(> .feed-toolbar) ~ .site-footer { padding-block: 1.5rem; }
.footer-brand { color: var(--secondary); font-weight: 750; font-size: 1rem; letter-spacing: -.06em; }
@media (max-width: 650px) {
  .main-nav { padding: 1rem 1.25rem; gap: 1rem; }
  main { padding: 0 1.1rem; margin-top: 2.25rem; }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1rem; gap: 1rem; }
  .story, .card { padding: 1.15rem; }
  .story-with-image { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .story-with-image .story-copy { padding: 1.15rem; }
  .story-media { min-height: 0; aspect-ratio: 16 / 9; }
  .story h2 { font-size: 1.08rem; }
  .story-description { font-size: .85rem; }
  .story-meta { font-size: .72rem; }
  .site-footer { flex-wrap: wrap; }
}
@media (max-width: 400px) { .controls { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media (forced-colors: active) { select:not([multiple]) { appearance: auto; -webkit-appearance: auto; background-image: none; padding-right: .8rem; } }

.back-to-top { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 20; display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; margin: 0; padding: .65rem; border-radius: 50%; box-shadow: 0 .25rem 1rem rgb(0 0 0 / .25); }
.back-to-top[hidden] { display: none; }
.new-articles { position: fixed; left: max(1rem, env(safe-area-inset-left)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 20; display: inline-flex; align-items: center; gap: 0; min-height: 2.75rem; max-width: calc(100vw - max(1rem, env(safe-area-inset-left)) - max(1rem, env(safe-area-inset-right)) - 3.5rem); padding: .55rem .775rem; border: 1px solid var(--update-accent); border-radius: 2rem; background: var(--update-accent); color: var(--update-ink); font-size: .8rem; font-weight: 650; text-decoration: none; box-shadow: 0 .25rem 1rem rgb(0 0 0 / .25); }
.new-articles:hover { background: var(--update-hover); color: var(--update-ink); }
.new-articles[hidden] { display: none; }
.new-articles [data-article-updates-target="label"] { min-width: 0; max-width: 0; margin-left: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .35s ease, margin-left .35s ease, opacity .25s ease; }
.new-articles.is-expanded [data-article-updates-target="label"] { max-width: 16rem; margin-left: .5rem; opacity: 1; }
.new-articles svg { display: block; flex: 0 0 1.1rem; width: 1.1rem; height: 1.1rem; aspect-ratio: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.story-source-icon {
  display: block;
  flex: 0 0 1.4rem;
  width: 1.4rem;
  height: 1.4rem;
  aspect-ratio: 1;
  padding: .15rem;
  border: 1px solid var(--border);
  border-radius: .2rem;
  background: var(--surface-raised);
  object-fit: contain;
  object-position: center;
}

.story { position: relative; touch-action: pan-y pinch-zoom; transition: transform .15s ease; }
.story.is-swiping { transform: translateX(var(--swipe-offset, 0px)); transition: none; user-select: none; }
.story.is-swipe-ready { outline: 2px solid var(--accent); outline-offset: -2px; }
.story.is-swiping::after { content: attr(data-swipe-label); position: absolute; inset-block-start: .65rem; inset-inline-end: .65rem; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); color: var(--secondary); font-size: .75rem; pointer-events: none; }
.story.is-swipe-ready::after { color: var(--accent); border-color: var(--accent); }
.story-archive { position: absolute; inset-block-end: .65rem; inset-inline-end: .65rem; }
.story-archive button { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border-radius: 50%; background: var(--surface-raised); color: var(--secondary); border-color: var(--border); }
.story-archive button:hover { background: var(--surface-hover); color: var(--text); }
.story-archive button[data-state=archived] { color: var(--accent); }
.story-archive button[data-state=error] { color: var(--danger); }
.story-archive button:disabled { cursor: wait; opacity: .7; }
.archive-page { margin: 0; }
.archive-page button { min-height: 44px; margin: 0; padding: .35rem .5rem; font-size: .7rem; line-height: 1.2; background: var(--surface-raised); color: var(--secondary); border-color: var(--border); }
.archive-page button:hover { background: var(--surface-hover); color: var(--text); }
.archive-page button:disabled { cursor: wait; opacity: .7; }
