:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1d1b;
  --muted: #6b6a65;
  --line: #e6e3dc;
  --accent: #e8590c;
  --accent-ink: #ffffff;
  --link: #b8440a;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --surface: #1f1f1c;
    --text: #ecebe6;
    --muted: #a3a29b;
    --line: #34332f;
    --accent: #ff7a33;
    --accent-ink: #161614;
    --link: #ff9a5c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 1.5rem 0 .5rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 .75rem; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.logo-mark { color: var(--accent); }

.search { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search button, .copy {
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer;
  color: var(--accent-ink); background: var(--accent); border: 0; border-radius: var(--radius);
}
.search.small { flex: 1; max-width: 460px; }
.search.big input { padding: 14px 16px; font-size: 1.1rem; }
.search.big button { padding: 14px 22px; }

.hero { padding: 2.5rem 0 1rem; }
.hero h1 { font-size: 2.2rem; margin-top: 0; }
.hero p { color: var(--muted); max-width: 40em; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.card-title { font-weight: 600; display: block; overflow-wrap: anywhere; }
.card-meta { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); margin-top: 2px; flex-wrap: wrap; }
.card p { margin: .4rem 0 0; font-size: .92rem; color: var(--muted); overflow-wrap: anywhere; }
.badge { font-size: .75rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); }
.badge.muted { color: var(--muted); }

.feed .lead { font-size: 1.1rem; color: var(--muted); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 1rem 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.copy { padding: 2px 10px; font-size: .8rem; margin-left: 6px; }
.subscribe a { margin-right: 12px; }

.items { list-style: none; padding: 0; margin: 0; }
.item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.item a { font-weight: 600; overflow-wrap: anywhere; }
.item time { display: block; font-size: .85rem; color: var(--muted); }
.item p { margin: .3rem 0 0; color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }

.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 2rem 0; }
.foot { margin-top: 3rem; padding: 1.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.foot .wrap { display: flex; gap: 16px; }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.6rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { margin-top: 6px; }
}

/* Account & reader */
.account { display: flex; gap: 14px; margin-left: auto; font-weight: 600; }
.actions { display: flex; align-items: center; gap: 12px; margin: 1rem 0 .25rem; flex-wrap: wrap; }
.follow, .button, .ghost, .danger {
  display: inline-block; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer;
  border-radius: var(--radius); border: 1px solid var(--accent); text-decoration: none;
}
.follow { color: var(--accent-ink); background: var(--accent); }
.follow.on, .ghost, .button.ghost { color: var(--text); background: transparent; border-color: var(--line); }
.danger { color: #fff; background: #c92a2a; border-color: #c92a2a; }
.button:hover, .ghost:hover { text-decoration: none; border-color: var(--accent); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; }
.report { margin-top: 2rem; font-size: .9rem; }
.notice { padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.error { padding: 10px 14px; border-radius: var(--radius); border: 1px solid #c92a2a; color: #c92a2a; }
button:disabled, input:disabled { opacity: .55; cursor: not-allowed; }

.tabs { display: flex; gap: 6px; margin-top: 1.25rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 8px 12px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

.reader { display: grid; grid-template-columns: 220px 1fr; gap: 24px; margin-top: 1rem; }
.side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); overflow-y: auto; }
.side-link { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--text); overflow-wrap: anywhere; }
.side-link b { color: var(--accent); font-size: .85rem; }
.side-link.on { background: var(--surface); border: 1px solid var(--line); }
.reader-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.reader-head h1 { margin: .5rem 0; }
.item-src { font-size: .8rem; color: var(--muted); margin-top: -6px; padding-bottom: 8px; }

.manage { list-style: none; padding: 0; }
.manage-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.manage-row form { margin: 0; }
.opml { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 1rem 0; }

@media (max-width: 720px) {
  .reader { grid-template-columns: 1fr; }
  .side { position: static; max-height: 220px; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
  .account { margin-left: 0; }
}
