:root { color-scheme: light dark; --fg: #111; --muted: #666; --bg: #fff; --rule: #ddd; }
@media (prefers-color-scheme: dark) { :root { --fg: #eee; --muted: #999; --bg: #111; --rule: #333; } }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; }
main { max-width: 42rem; margin: 0 auto; padding: 3rem 1rem; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
.lede { color: var(--muted); margin: 0 0 2rem; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 0 0 2rem; }
dt { color: var(--muted); }
dd { margin: 0; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; }
.note { border-top: 1px solid var(--rule); padding-top: 1rem; color: var(--muted); font-size: .9rem; }

/* ---- the operator area ---- */
.op main { max-width: 56rem; }
.op-nav { display: flex; gap: 1.25rem; align-items: center;
  padding: .75rem 1rem; border-bottom: 1px solid var(--rule); }
.op-nav a { color: var(--fg); text-decoration: none; font-weight: 600; }
.op-nav a:hover { text-decoration: underline; }
.op-nav form { margin-left: auto; }
.op-nav button { background: none; border: 0; color: var(--muted); cursor: pointer;
  font: inherit; padding: 0; }
.op-nav button:hover { color: var(--fg); text-decoration: underline; }

h2 { font-size: 1.05rem; margin: 2rem 0 .5rem; }
.count { color: var(--muted); font-weight: 400; font-size: .85rem; }

table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th { text-align: left; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--rule); padding: .4rem .5rem .4rem 0; }
td { padding: .45rem .5rem .45rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.model { font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--muted); }
.bad { color: #b3261e; }
@media (prefers-color-scheme: dark) { .bad { color: #f2b8b5; } }

form.stack { display: grid; gap: .6rem; max-width: 22rem; margin: 0 0 1.5rem; }
form.stack label { font-size: .85rem; color: var(--muted); }
input[type=password], input[type=file] { font: inherit; padding: .5rem;
  border: 1px solid var(--rule); border-radius: 4px; background: var(--bg); color: var(--fg); }
button[type=submit] { font: inherit; padding: .5rem 1rem; border: 1px solid var(--fg);
  border-radius: 4px; background: var(--fg); color: var(--bg); cursor: pointer; }

/* One line per uploaded file, so a refusal is read next to the name that
   caused it rather than in a summary at the end. */
.result { padding: .45rem .6rem; border-left: 3px solid var(--rule);
  margin: .3rem 0; font-size: .9rem; }
.result.good { border-left-color: #1e8e3e; }
.result.bad { border-left-color: #b3261e; }

.holding main { padding-top: 6rem; }
.footnote { margin-top: 3rem; font-size: .85rem; }
.footnote a { color: var(--muted); }

form.stack.wide { max-width: 34rem; }
textarea { font: inherit; padding: .5rem; border: 1px solid var(--rule); border-radius: 4px;
  background: var(--bg); color: var(--fg); resize: vertical; }
select { font: inherit; padding: .5rem; border: 1px solid var(--rule); border-radius: 4px;
  background: var(--bg); color: var(--fg); }
label.inline { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--fg); }
details { border: 1px solid var(--rule); border-radius: 4px; padding: .6rem .8rem; }
details summary { cursor: pointer; font-size: .9rem; color: var(--muted); }
details[open] summary { margin-bottom: .6rem; }
details > label { margin-top: .5rem; display: block; }
.small { font-size: .82rem; }

/* The library tree. Collapse is native <details>, so it works with the search
   script broken, disabled or still loading. */
#q { width: 100%; box-sizing: border-box; padding: .55rem .7rem; font: inherit;
     color: var(--fg); background: var(--bg); border: 1px solid var(--rule); border-radius: .3rem; }
#q:focus { outline: 2px solid var(--fg); outline-offset: -1px; }
#tally { margin: .5rem 0 1rem; min-height: 1.1em; }

#tree summary { cursor: pointer; padding: .3rem 0; }
#tree summary::marker { color: var(--muted); }
details.group > summary { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em;
                          border-bottom: 1px solid var(--rule); margin-bottom: .25rem; }
details.brand { margin: .35rem 0 .35rem .9rem; }
details.brand > summary { font-size: 1rem; font-weight: 600; }
details.cat { margin: .2rem 0 .2rem 1rem; }
details.cat > summary { font-size: .9rem; color: var(--muted); text-transform: capitalize; }
details.cat table { margin: .35rem 0 .9rem; }
td.sheets { white-space: nowrap; }
td.sheets a { color: var(--fg); }
td.sheets a.src { color: var(--muted); font-size: .8rem; text-decoration: none; }
td.sheets a.src:hover { text-decoration: underline; }
details.section { margin: .25rem 0 .25rem .9rem; }
details.section > summary { font-size: .95rem; font-weight: 600; color: var(--fg); }
details.section details.cat { margin-left: 1rem; }
textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .85rem;
           color: var(--fg); background: var(--bg); border: 1px solid var(--rule);
           border-radius: .25rem; padding: .4rem .5rem; }
