:root { --wand: #ffd60a; --bg: #0d1220; --panel: #121a2b; --line: #263046; --text: #dfe6f5; --muted: #8d99b5; --accent: #ff2d55; --link: #8fb4ff; --warn: #f2b84b; --ok: #5fd39a; color-scheme: dark; }
@media (prefers-color-scheme: light) { :root { --wand: #c98f00; --bg: #f5f7fb; --panel: #fff; --line: #d9dfeb; --text: #1b2333; --muted: #5f6b82; --accent: #d4183f; --link: #2756c5; --warn: #9a6400; --ok: #1d7a4c; color-scheme: light; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 system-ui, sans-serif; }
header { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
header input { flex: 1; min-width: 160px; max-width: 420px; padding: 3px 8px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; font: inherit; }
header #save, #who { margin-left: auto; }
header #save + #who { margin-left: 0; }
#who { font-size: 12px; white-space: nowrap; }
.eval { font-size: 11px; padding: 2px 8px; border: 1px solid var(--warn); border-radius: 10px; color: var(--warn); text-decoration: none; white-space: nowrap; }
button.link { padding: 0; border: 0; background: none; color: var(--link); cursor: pointer; font: inherit; text-decoration: underline; }
[hidden] { display: none !important; }
#status { color: var(--muted); }
.tabs { display: flex; gap: 2px; }
.tabs a { padding: 4px 10px; border-radius: 4px; color: var(--muted); text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current=page] { background: var(--bg); color: var(--text); font-weight: 600; }
.page { max-width: 1100px; margin: 0 auto; padding: 8px 16px 48px; }
.page.narrow { max-width: 820px; }
h2 { font-size: 15px; color: var(--text); margin: 18px 0 6px; }
main.narrow > section { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
main.narrow > section > h2 { font-size: 16px; margin-top: 0; margin-bottom: 10px; color: var(--text); }
h1 { font-size: 18px; margin: 10px 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
a { color: var(--link); }
code { font-size: 12px; }


/* Report list: the whole card opens the report in a new tab; its buttons sit above that link. */
.reports { display: flex; flex-direction: column; gap: 6px; }
.pages { display: flex; justify-content: center; gap: 8px; margin: 16px 0; }
.report { position: relative; display: grid; grid-template-columns: 112px 1fr auto; gap: 10px; align-items: start; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.report:hover, .report:focus-within { border-color: var(--link); }
.report .thumb { width: 112px; height: 70px; object-fit: cover; object-position: top left; border-radius: 4px; border: 1px solid var(--line); background: var(--bg); }
.report .thumb.none { display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.report .body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.report .title { color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report .title::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.report .title:focus-visible { outline: none; }
.report .title:focus-visible::after { outline: 2px solid var(--link); outline-offset: -1px; }
.report .sub { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.report .actions { position: relative; z-index: 1; }

.actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.act { display: inline-flex; align-items: center; padding: 3px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); cursor: pointer; font: inherit; font-size: 12px; text-decoration: none; }
.act:hover:not(:disabled) { border-color: var(--link); }
.act:disabled { opacity: .5; cursor: default; }
.act.primary { background: var(--link); border-color: var(--link); color: var(--bg); font-weight: 600; }
.act.done { color: var(--ok); }
.act.failed { color: var(--warn); border-color: var(--warn); }
.act.danger { color: var(--accent); }
.act.danger:hover { border-color: var(--accent); }

/* Report page */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0; }
.kv > span { color: var(--muted); }
.kv > b { font-weight: 500; overflow-wrap: anywhere; }
.shot { display: block; max-width: 100%; margin: 8px 0; }
.shot img { max-width: 100%; border: 1px solid var(--line); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
td { padding: 2px 8px 2px 0; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
td.num { text-align: right; color: var(--muted); white-space: nowrap; }
td.kind { white-space: nowrap; font-weight: 600; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 8px; max-height: 420px; overflow: auto; font-size: 12px; margin: 4px 0; }
details { margin: 10px 0; }
details summary { cursor: pointer; color: var(--muted); }

/* Config page */
.notice { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.notice.warn { border-color: var(--warn); }
.steps { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; counter-reset: step; }
.step { padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; counter-increment: step; }
.step.off { opacity: .6; }
.step .head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.step .head b { min-width: 120px; }
.step .head b::before { content: counter(step) ". "; color: var(--muted); font-weight: 400; }
.step > p { margin: 4px 0 8px; }
.modes { display: inline-grid; grid-template-columns: repeat(3, auto); background: var(--bg); margin-right: auto; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.modes button { padding: 3px 10px; border: 0; border-right: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; }
.modes button:first-child { grid-column: 1; }
.modes button:last-child { grid-column: 3; border-right: 0; }
.modes button.on { background: var(--link); color: var(--bg); font-weight: 600; }
.tools { display: flex; gap: 2px; }
.icon { width: 26px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); cursor: pointer; }
.icon:disabled { opacity: .35; cursor: default; }
.icon.danger { color: var(--accent); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; }
.fields label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 12px; }
.fields input, .fields select, .fields textarea { padding: 5px 7px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; font: 12px ui-monospace, monospace; }
.fields input:invalid, .fields textarea:invalid { border-color: var(--accent); }
.fields small { font-size: 11px; }
#cors-section .fields label { grid-column: span 2; }
#notices-section .fields label { grid-column: 1 / -1; }
#notices { font: 13px system-ui, sans-serif; }
.req { color: var(--accent); font-style: normal; }
.add { display: flex; gap: 6px; }
.add select { padding: 3px 6px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; font: inherit; }

.toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; max-width: calc(100vw - 32px); padding: 8px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 24px #0006; }
.toast.err { border-color: var(--accent); }
.err { color: var(--accent); }
.warn { color: var(--warn); }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.notice.agent.ok { border-color: var(--ok); }
.notice.agent.err { border-color: var(--accent); }
.notice.agent .message { margin: 6px 0; white-space: pre-wrap; color: var(--text); }

@media (max-width: 640px) {
  .report { grid-template-columns: 72px 1fr; }
  .report .thumb { width: 72px; height: 54px; }
  .report time { position: absolute; top: 8px; right: 8px; }
  .report .title { padding-right: 40px; }
}
.audit { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.92em; }
.audit b { font-weight: 600; }
.people { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.person { display: grid; grid-template-columns: minmax(80px, 160px) 1fr auto; align-items: center; gap: 12px; padding: 2px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent); }
.person:last-child { border-bottom: 0; }
#people { max-width: 540px; }
.person .act { margin-left: 4px; }
#new-key code { overflow-wrap: anywhere; user-select: all; }
.suggestions { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.suggestion p { margin: 4px 0; }
.suggestion.attention { border-color: var(--warn); }
.suggestion .warning { color: var(--warn); }
.docs h3 { margin: 16px 0 4px; font-size: 13px; }
.docs section h1 { font-size: 20px; margin: 0 0 8px; }
.docs section h2 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 22px 0 6px; }
.docs section h3 { font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); }
.docs table { margin: 8px 0; width: auto; }
.docs td, .docs th { padding: 4px 10px 4px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.docs td:first-child, .docs td:nth-child(2):not(:last-child) { white-space: nowrap; }
/* The same first column in every table, so tables one after another line up. */
.docs td:first-child, .docs th:first-child { min-width: 9rem; }
.docs [id] { scroll-margin-top: 56px; }
.docs #pages > section { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.docs #pages > section:first-child { margin-top: 12px; padding-top: 0; border-top: 0; }
/* Contents on the left, kept in view; the page on the right. */
.page.docs { display: grid; grid-template-columns: 200px minmax(0, 820px); gap: 32px; justify-content: center; }
.toc { position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 72px); overflow-y: auto; padding: 14px 0; font-size: 13px; }
.toc a { display: block; padding: 3px 8px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.toc a.page-link { margin-top: 10px; color: var(--text); font-weight: 600; }
.toc a.page-link:first-child { margin-top: 0; }
.toc a.sub { padding-left: 18px; font-size: 12px; }
.toc a.here { border-left-color: var(--link); color: var(--link); }
.page.settings { display: grid; grid-template-columns: 200px minmax(0, 820px); gap: 32px; justify-content: center; max-width: none; }
.settings [id] { scroll-margin-top: 56px; }
@media (max-width: 760px) {
  .page.settings { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .page.docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; max-height: none; border-bottom: 1px solid var(--line); }
  .toc a.sub { display: none; }
}
.tier-tabs { align-items: center; margin: 14px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tier-tabs .muted { margin-right: 8px; }
.tier-tabs a[aria-current=page] { background: var(--panel); border: 1px solid var(--line); }
.code { position: relative; margin: 8px 0; }
.code pre { margin: 0; padding: 10px 70px 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; font: 12px/1.5 ui-monospace, monospace; }
.code .copy { position: absolute; top: 6px; right: 6px; }
kbd { padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; font: 11px ui-monospace, monospace; }
header .feedback { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
header #who ~ .feedback, header #save ~ .feedback { margin-left: 12px; }
label.check { display: flex; gap: 8px; align-items: baseline; }
/* A label or line with a tooltip says so: a dotted underline on its words. */
label[title] > span, label[data-tip] > span, p.muted[title], p.muted[data-tip] { text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px; cursor: help; }
label.check + .fields, .fields.spaced, label.check.spaced { margin-top: 10px; }
.docs blockquote { margin: 10px 0; padding: 8px 12px; border: 1px solid var(--warn); border-left-width: 4px; border-radius: 4px; background: var(--panel); }
.docs blockquote p { margin: 0; }
.activity { margin: 8px 0; }
.activity th { padding: 4px 8px 4px 0; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); }
.activity td { padding: 4px 12px 4px 0; }
.activity td:not(.summary) { white-space: nowrap; overflow-wrap: normal; }
.activity td.summary { color: var(--muted); }
.activity td.num { text-align: left; }
.activity .gone { color: var(--muted); text-decoration: line-through; cursor: help; }
.icon.on { border-color: var(--link); }
.icon.set { color: var(--link); }
.fields.advanced { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); grid-template-columns: 1fr; }
.fields.stacked { grid-template-columns: minmax(220px, 260px); }
.fields.advanced textarea { font: 12px/1.5 system-ui, sans-serif; }

/* Icons, drawn (feedget.dev's set, site/src/style.css) instead of emoji, which many systems' fonts lack. */
.ico { display: inline-block; flex: none; width: 1em; height: 1em; vertical-align: -.15em; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ico-wand { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M2.6 19.2 13 8.8a1 1 0 0 1 1.4 0l.8.8a1 1 0 0 1 0 1.4L4.8 21.4a1 1 0 0 1-1.4 0l-.8-.8a1 1 0 0 1 0-1.4z'/%3E%3Cpath d='M17.5 1.5 18.7 5.3 22.5 6.5 18.7 7.7 17.5 11.5 16.3 7.7 12.5 6.5 16.3 5.3z'/%3E%3Ccircle cx='11' cy='4' r='1.2'/%3E%3C/svg%3E"); }
.ico-mic { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Crect x='8.5' y='2.5' width='7' height='12' rx='3.5'/%3E%3Cpath d='M5 10.5a1 1 0 0 1 2 0 5 5 0 0 0 10 0 1 1 0 0 1 2 0 7 7 0 0 1-6 6.9V20h2.5a1 1 0 0 1 0 2h-7a1 1 0 0 1 0-2H11v-2.6a7 7 0 0 1-6-6.9z'/%3E%3C/svg%3E"); }
.ico-wand { color: var(--wand); }
header strong .ico { color: inherit; }
