:root {
  --bg: #f7f7fb; --card: #fff; --ink: #1c1c28; --muted: #6b6b80;
  --accent: #4f46e5; --ok: #16a34a; --warn: #d97706; --bad: #dc2626;
  --border: #e3e3ee; --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12121a; --card: #1d1d29; --ink: #ececf4; --muted: #9a9ab0; --border: #2e2e40; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 -apple-system, system-ui, sans-serif; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.topbar nav a { margin-left: 1rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.brand { font-weight: 700; }
.view { max-width: 720px; margin: 0 auto; padding: 1rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin: .8rem 0 .25rem; }
input, select, textarea { width: 100%; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }
textarea { min-height: 12rem; resize: vertical; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: .65rem 1.2rem; font: inherit; font-weight: 700; cursor: pointer; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
.muted { color: var(--muted); font-size: .9rem; }
.error { color: var(--bad); font-weight: 600; }
.pctbar { height: 10px; border-radius: 5px; background: var(--border); overflow: hidden; margin: .3rem 0; }
.pctbar > div { height: 100%; background: var(--accent); }
.tier { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.tier.tentative { background: #fef3c7; color: #92400e; }
.tier.moderate { background: #dbeafe; color: #1e40af; }
.tier.strong { background: #dcfce7; color: #166534; }
@media (prefers-color-scheme: dark) {
  .tier.tentative { background: #453410; color: #fde68a; }
  .tier.moderate { background: #1e2f4d; color: #bfdbfe; }
  .tier.strong { background: #113322; color: #bbf7d0; }
}
blockquote { border-left: 3px solid var(--accent); margin: .5rem 0; padding: .2rem .8rem; }
blockquote.unverified { border-color: var(--bad); }
.badge-unverified { color: var(--bad); font-size: .8rem; font-weight: 700; }
details { margin: .5rem 0; }
summary { cursor: pointer; font-weight: 600; }
.rowlink { display: block; padding: .8rem; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.rowlink:hover { background: var(--bg); }
.spinner { text-align: center; padding: 2rem; color: var(--muted); }
