
:root {
  --bg: #fbfaf7; --surface: #ffffff; --text: #1d1d1b; --muted: #6b6a66; --line: #e6e3dc;
  --accent: #1f5f8b; --accent-text: #ffffff; --note: #fff6dc; --error: #a02c2c; --code: #f1efe9;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413; --surface: #1d1d1b; --text: #ecebe6; --muted: #a09e97; --line: #33322f;
    --accent: #6fb3e0; --accent-text: #0e1a22; --note: #33301f; --error: #ef8f8f; --code: #2a2926;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.top {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
nav a { color: var(--muted); text-decoration: none; }
nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.badge { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 9px; background: var(--accent); color: var(--accent-text); font-size: 12px; text-align: center; }
main { max-width: 720px; margin: 0 auto; padding: 8px 16px 64px; }
h1 { font-size: 28px; line-height: 1.2; margin: 20px 0 6px; }
h2 { font-size: 20px; margin: 28px 0 10px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.top.card, .card.top { border-left: 4px solid var(--accent); }
.card ul, .digest ul { padding-left: 20px; margin: 8px 0; }
.card h3 + ul { margin-top: 4px; }
.card li { margin: 4px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.src { font-weight: 600; color: var(--text); margin-right: 6px; }
.tag { font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.label { margin: 12px 0 2px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
blockquote { margin: 10px 0; padding: 2px 12px; border-left: 3px solid var(--line); color: var(--muted); }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--code); padding: 2px 6px; border-radius: 5px; font-size: .92em; word-break: break-all; }
.code { font-size: 1.1em; letter-spacing: .08em; }
.address code { font-size: 1.05em; }
.note { background: var(--note); border-radius: 8px; padding: 10px 12px; }
.note.error { color: var(--error); }
.button, button {
  display: inline-block; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-text); text-decoration: none;
}
button.quiet { background: transparent; color: var(--accent); border-color: var(--line); font-weight: 500; padding: 6px 10px; }
button.danger { color: var(--error); }
input, select { font: inherit; font-size: 16px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); max-width: 100%; }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 8px 4px 0; }
form.inline input[name="name"] { font-weight: 600; min-width: 0; flex: 1 1 200px; }
.source-card form.inline:first-child { display: flex; margin-right: 0; }
.settings label { display: grid; gap: 4px; margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.settings input, .settings select { color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.row > div:first-child { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions form { display: flex; gap: 6px; }
.center { text-align: center; padding-top: 40px; }
.narrow { max-width: 460px; margin: 0 auto; }
.stack { display: grid; gap: 10px; text-align: left; }
.stack label { font-weight: 600; }
.warn { color: var(--error); }
button.quiet.on { border-color: var(--accent); }
.onboarding { border-left: 4px solid var(--accent); }
.original iframe { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
details { margin: 20px 0; }
summary { cursor: pointer; color: var(--muted); }
.source { margin-top: 8px; }
.digest-title { margin-bottom: 2px; }
