:root {
  color-scheme: light;
  --ink: #242833;
  --muted: #687180;
  --line: #e5e7eb;
  --accent: #1769c2;
  --accent-soft: #eaf2fc;
  --bg: #f5f6f8;
  --danger: #b43131;
  font-family: system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: #10549e;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 500;
}
button:hover,
.button:hover {
  background: #10549e;
  border-color: #10549e;
  color: white;
}
button.quiet {
  color: var(--ink);
  background: white;
  border-color: var(--line);
}
button.quiet:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #cbdcf2;
}
button.danger {
  background: var(--danger);
  border-color: var(--danger);
}
button:disabled {
  color: var(--muted);
  background: #f0f1f3;
  border-color: var(--line);
  cursor: default;
}
input,
select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #b8c0cc;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  min-height: 40px;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
label {
  display: block;
  font-weight: 500;
  margin-bottom: 12px;
}
label input,
label select {
  display: block;
  margin-top: 6px;
}
h1 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 12px;
  font-weight: 550;
}
p {
  margin: 8px 0;
}
form {
  margin: 0;
}
main {
  width: min(100% - 36px,780px);
  margin: 24px auto 48px;
}
.narrow {
  max-width: 400px;
  margin-top: 48px;
}
.header {
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 max(18px,calc((100% - 780px)/2));
}
.brand {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.03em;
  color: var(--ink);
}
.header nav {
  display: flex;
  gap: 4px;
  flex: 1;
  align-items: center;
}
.header nav a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
}
.header nav a:hover,
.header nav a[aria-current] {
  color: var(--accent);
  background: var(--accent-soft);
}
.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}
.icon-button:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.page-heading h1,
.page-heading h2 {
  margin: 0;
}
.panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  scroll-margin-top: 20px;
}
.form-width {
  max-width: 620px;
}
.login {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.login button {
  width: 100%;
  margin-top: 6px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
.error-text,
.danger-text {
  color: var(--danger);
}
.notice {
  border: 1px solid #d1e2f8;
  padding: 10px 14px;
  background: var(--accent-soft);
  margin-bottom: 18px;
  border-radius: 6px;
}
.notice.error {
  background: #fbebeb;
  border-color: #efd1d1;
  color: #842626;
}
.source-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
}
.source-list li {
  min-height: 68px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.source-list li:last-child {
  border-bottom: 0;
}
.source-list li:hover {
  background: #fafbfd;
}
.source-list li:first-child {
  border-radius: 8px 8px 0 0;
}
.source-list li:last-child {
  border-radius: 0 0 8px 8px;
}
.source-list li:only-child {
  border-radius: 8px;
}
.source-list h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
}
.source-list h2 a {
  color: var(--ink);
}
.source-list h2 a:hover {
  color: var(--accent);
}
.source-list p {
  margin: 3px 0 0;
}
.source-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.source-list .source-heading {
  flex: 1;
}
.source-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.source-avatar {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}
.row-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.row-actions {
  flex-shrink: 0;
  gap: 4px;
  flex-wrap: nowrap;
}
.row-actions .copy {
  min-width: 74px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  padding: 6px 8px;
  white-space: nowrap;
}
.row-actions .copy:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.source-menu {
  position: relative;
}
.source-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: var(--muted);
  list-style: none;
  cursor: pointer;
}
.source-menu summary::-webkit-details-marker {
  display: none;
}
.source-menu svg {
  fill: currentColor;
}
.source-menu summary:hover,
.source-menu[open] summary {
  color: var(--accent);
  background: var(--accent-soft);
}
.menu-items {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 4px);
  min-width: 164px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 6px 20px #24283314;
}
.menu-items a,
.menu-items button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}
.menu-items a:hover,
.menu-items button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.menu-items button:disabled {
  color: #8a929e;
  background: transparent;
}
.menu-items .menu-danger {
  color: var(--danger);
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 4px 4px;
}
.menu-items .menu-danger:hover {
  color: var(--danger);
  background: #fbebeb;
}
.feed-copy {
  display: flex;
  gap: 10px;
  align-items: center;
}
.feed-copy input {
  font-size: 13px;
  font-family: ui-monospace,monospace;
  min-width: 0;
}
.feed-copy button,
.feed-copy a {
  flex-shrink: 0;
  white-space: nowrap;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.checkbox input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
}
.back {
  display: inline-block;
  margin-bottom: 12px;
}
.article-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.article-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.article-list li > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.article-list a {
  color: var(--ink);
}
.article-list a:hover {
  color: var(--accent);
}
.article-list time {
  white-space: nowrap;
}
.badge {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0f1f3;
  color: var(--muted);
}
.qr {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  background: white;
}
.empty {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed #c9ced7;
  border-radius: 8px;
}
.skip,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  clip: auto;
  background: white;
  padding: 10px;
  z-index: 30;
}
section + section {
  margin-top: 16px;
}
@media (max-width:640px) {
  .header {
    gap: 12px;
    height: 56px;
    padding: 0 14px;
  }
  .header nav a {
    min-height: 40px;
    display: flex;
    align-items: center;
  }
  .brand {
    font-size: 16px;
  }
  main {
    margin-top: 18px;
    width: calc(100% - 28px);
  }
  h1 {
    font-size: 21px;
  }
  button,
  .button,
  input,
  select {
    min-height: 40px;
  }
  input,
  select,
  .feed-copy input {
    font-size: 16px;
  }
  .panel {
    padding: 16px;
  }
  .source-list li {
    min-height: 76px;
    padding: 10px;
    gap: 8px;
  }
  .row-actions .copy {
    font-size: 13px;
    padding: 6px;
  }
  .source-menu summary {
    width: 40px;
    height: 40px;
  }
  .icon-button {
    width: 40px;
    height: 40px;
  }
  .menu-items a,
  .menu-items button {
    min-height: 40px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .feed-copy {
    flex-wrap: wrap;
  }
  .feed-copy input {
    flex-basis: 100%;
  }
  .article-list li {
    flex-direction: column;
    gap: 4px;
  }
}

dialog {
  width: min(420px, calc(100% - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: white;
}
dialog::backdrop {
  background: rgb(20 30 45 / 30%);
}
dialog h2 {
  margin: 0 0 10px;
}
dialog .actions {
  justify-content: flex-end;
}
html {
  scrollbar-gutter: stable;
}
body:has(dialog[open]) {
  overflow: hidden;
}
