/* Elbereth data catalog. Plain, readable, works at phone width. No external fonts. */
:root {
  --bg: #ffffff;
  --fg: #1b1f24;
  --muted: #5b6470;
  --line: #d9dee4;
  --panel: #f5f7f9;
  --accent: #0b5cad;
  --accent-fg: #ffffff;
  --warn-bg: #fff4e0;
  --warn-line: #e0a040;
  --err-bg: #fdecec;
  --err-line: #d05050;
  --ok-bg: #e9f6ec;
  --ok-line: #3c9a55;
  --chip: #eef2f6;
  --focus: #ffbf47;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b; --fg: #e6e9ed; --muted: #9aa4af; --line: #2d333b; --panel: #1b1f24;
    --accent: #5aa2f0; --accent-fg: #0b1320; --warn-bg: #3a2c12; --warn-line: #b8832e;
    --err-bg: #3a1a1a; --err-line: #c05555; --ok-bg: #16301e; --ok-line: #3c9a55; --chip: #252b33;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 4px 8px; z-index: 1000; }
header.site { border-bottom: 1px solid var(--line); background: var(--panel); }
header.site nav { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
header.site .brand { font-weight: 700; color: var(--fg); text-decoration: none; margin-right: auto; }
header.site .who { color: var(--muted); font-size: 0.9em; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
footer.site { max-width: 1100px; margin: 32px auto 0; padding: 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.9em; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0.4em 0; overflow-wrap: anywhere; }
h2 { font-size: 1.2rem; margin: 1.4em 0 0.5em; }
h3 { font-size: 1.05rem; margin: 1.2em 0 0.4em; }
.muted, .crumbs, .seller { color: var(--muted); }
.prose, .licence-text { white-space: pre-line; overflow-wrap: anywhere; }
.licence-text { background: var(--panel); border: 1px solid var(--line); padding: 12px; max-height: 28em; overflow: auto; }
code.hash, .key-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; font-size: 0.9em; }
dl { margin: 0; display: grid; grid-template-columns: minmax(8em, max-content) 1fr; gap: 2px 14px; }
dt { font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }
dd dl { grid-template-columns: minmax(6em, max-content) 1fr; }
ul.chips { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; }
ul.chips li { background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; font-size: 0.85em; }
table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
form.stack { display: grid; gap: 12px; max-width: 720px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
label { display: grid; gap: 4px; font-weight: 600; font-size: 0.95em; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
label .hint, .hint { font-weight: 400; color: var(--muted); font-size: 0.88em; }
input, select, textarea {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; width: 100%; min-height: 40px;
}
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; margin-top: 4px; }
textarea { min-height: 6em; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
button, .button {
  font: inherit; display: inline-block; background: var(--accent); color: var(--accent-fg);
  border: 1px solid var(--accent); border-radius: 6px; padding: 8px 16px; cursor: pointer;
  text-decoration: none; min-height: 40px;
}
button.secondary { background: transparent; color: var(--accent); }
button.danger { background: transparent; color: var(--err-line); border-color: var(--err-line); }
button[disabled] { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.notice { border-left: 4px solid var(--line); background: var(--panel); padding: 10px 12px; margin: 12px 0; }
.notice.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.notice.error { border-color: var(--err-line); background: var(--err-bg); }
.notice.ok { border-color: var(--ok-line); background: var(--ok-bg); }
.notice:empty { display: none; }
.layout-search { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .layout-search { grid-template-columns: 340px 1fr; } }
.map { height: 320px; border: 1px solid var(--line); border-radius: 8px; }
.map.small { height: 240px; }
.map.drawing { cursor: crosshair; }
ol.results { list-style: none; padding: 0; margin: 0; }
li.result { border-bottom: 1px solid var(--line); padding: 12px 0; }
li.result h2 { margin: 0 0 4px; font-size: 1.1rem; overflow-wrap: anywhere; }
.pager { display: flex; gap: 12px; margin: 12px 0; }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.key-box { display: block; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
section { margin-bottom: 8px; }

/* Legal pages (src/legal.py) and the Buyer Acceptance in the accept form. */
.legal { max-width: 52em; }
.legal blockquote { margin: 0 0 1em; padding: 8px 12px; border-left: 4px solid var(--warn-line); background: var(--warn-bg); }
.legal-meta { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0 0 1em; }
.legal-meta dt { font-weight: 600; }
.legal-meta dd { margin: 0; overflow-wrap: anywhere; }
p.legal-meta { display: block; }
mark.owner-fill { background: var(--warn-bg); color: var(--fg); outline: 1px dashed var(--warn-line); padding: 0 2px; }
.acceptance-box { background: var(--panel); border: 1px solid var(--line); padding: 12px; max-height: 24em; overflow: auto; }
.acceptance-box h1 { font-size: 1.2em; }
.acceptance-box .licence-text { border: 0; padding: 0; max-height: none; }
.fee { color: var(--muted); margin-top: -0.4em; }
/* Workspace (workspace.js) */
.card { border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; background: var(--bg); }
article.card { margin-bottom: 16px; }
article.card.focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.run { padding: 6px 0; border-top: 1px solid var(--line); }
div.stack { display: grid; gap: 12px; }
