/* Layout, type, colours, light/dark and the breakpoints come from Pico CSS v2.0.6
   (public/css/pico.min.css, MIT, loaded before this file; Ivo 2026-11-13).  The site's own
   names below are mapped onto Pico's variables, so both themes follow Pico. */
:root {
  --bg: var(--pico-background-color);
  --fg: var(--pico-color);
  --muted: var(--pico-muted-color);
  --line: var(--pico-muted-border-color);
  --accent: var(--pico-primary);
  --warn-bg: #fff4e0;
  --banner-bg: #f2f6fa;
  --hover: #eef3f8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --warn-bg: #3a2f1c;
    --banner-bg: #1f2a35;
    --hover: #24303c;
  }
}

a { text-decoration: none; }

a:hover { text-decoration: underline; }

header.top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-block: 10px; border-bottom: 1px solid var(--line); }

/* Pico sizes every input and button for a form page; the site's small inline controls
   (report buttons, suggest boxes, owner buttons) must stay small and inline */
form.report, form.owner { margin-bottom: 0; }
form.report button, form.owner button { width: auto; margin: 0; padding: 0 6px; line-height: 1.5; font-size: 12px; }
form.owner button { color: var(--fg); background: none; border: 1px solid var(--line); border-radius: 4px; }
form.suggest input[type=text] { width: auto; height: auto; margin: 0; line-height: 1.5; }
.search input[type=search] { margin-bottom: 0; }
nav.wcontrols, nav.pager { justify-content: flex-start; }

header .brand { font-weight: 700; font-size: 18px; color: var(--fg); }

header .login { margin-left: auto; color: var(--muted); font-size: 14px; }

footer { margin-top: 3rem; color: var(--muted); font-size: 13px; }

h1 { margin: 0.6em 0 0.2em; }

h2 { margin-top: 2.5rem; font-size: 20px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }

.muted { color: var(--muted); font-weight: normal; font-size: 0.9em; }

.search { position: relative; }

.search input { font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); width: 100%; }

.search.small { flex: 1; max-width: 420px; }

.search.big { display: flex; gap: 8px; }

.search.big input { font-size: 20px; padding: 12px 14px; }

.search.big button { width: auto; margin: 0; font-size: 18px; padding: 0 18px; }

.hero { margin: 12vh auto 0; max-width: 640px; }

.hero .hint { color: var(--muted); font-size: 14px; }

.ta-list { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 0; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }

.ta-list li { padding: 6px 10px; cursor: pointer; }

.ta-list li.active, .ta-list li:hover { background: var(--hover); }

.ta-list .aff { color: var(--muted); font-size: 13px; margin-left: 6px; }

.ta-list .num { float: right; color: var(--muted); font-size: 13px; }

.ta-list li.more { color: var(--muted); font-size: 13px; cursor: default; }

.results li { margin: 6px 0; }

.results .aff { color: var(--muted); margin-left: 6px; }

.results .num { color: var(--muted); font-size: 13px; margin-left: 6px; }

.banner { background: var(--banner-bg); padding: 10px 14px; border-radius: 6px; font-size: 14px; }

.warn { background: var(--warn-bg); padding: 8px 12px; border-radius: 6px; font-size: 14px; }

.lead { font-size: 18px; margin: 0; }

.lead span + span::before { content: " · "; color: var(--muted); }

.ids { color: var(--muted); font-size: 14px; }

table { border-collapse: collapse; }

table.nums, table.career, table.ids { width: auto; }

table.nums th, table.nums td, table.career td, table.ids th, table.ids td { background: none; }

.table-wrap { overflow-x: auto; }

table.nums th, table.nums td { padding: 4px 14px 4px 0; text-align: right; border-bottom: 1px solid var(--line); }

table.nums th:first-child, table.nums td:first-child { text-align: left; }

table.career td { padding: 3px 14px 3px 0; vertical-align: top; }

table.career td.yr { white-space: nowrap; color: var(--muted); }

ol.works { padding-left: 2.2em; }

ol.works li { margin: 0 0 10px; }

ol.works .t { display: block; font-weight: 600; }

ol.works .a, ol.works .v { display: block; font-size: 14px; }

ol.works .v { color: var(--muted); font-style: italic; }

ol.works .c { font-size: 13px; color: var(--muted); }

ol.works .doi { font-size: 13px; margin-left: 6px; }
ol.works .doi-dead { font-size: 13px; margin-left: 6px; color: var(--muted); cursor: help; text-decoration: line-through; }
ol.works .doi-start { font-size: 13px; margin-left: 6px; color: var(--muted); cursor: help; }

.pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

ul.coauthors { columns: 3 220px; padding-left: 1.2em; }

details { margin-top: 2.5rem; }

summary { cursor: pointer; font-weight: 600; }

@media (max-width: 600px) {
  .ta-list .num { display: none; }
  header .login .muted { display: none; }
  header .login { font-size: 12px; }
  table.nums { font-size: 13px; }
}

ol.works .maybe-bad { display: block; font-size: 13px; background: var(--warn-bg); padding: 2px 6px; border-radius: 4px; margin-top: 2px; }

form.report { display: inline; margin-left: 6px; }

form.report button, .report.done { font: inherit; font-size: 12px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; cursor: pointer; }

form.report button:hover { color: var(--fg); border-color: var(--muted); }

.report.done { cursor: default; margin-left: 6px; }

nav.wcontrols { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 14px; margin: 0 0 12px; }

.wcontrols .btn { display: inline-block; font-size: 13px; padding: 1px 8px; margin-left: 4px; border: 1px solid var(--line); border-radius: 4px; color: var(--fg); }

.wcontrols .btn:hover { text-decoration: none; border-color: var(--muted); }

.wcontrols .btn.on { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.wcontrols .toggle.on { background: var(--hover); color: var(--fg); border-color: var(--accent); }

ol.works .dup { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

ol.works .dup + form.report, ol.works .dup + .report.done { margin-left: 0; }

ul.coauthors li { break-inside: avoid; margin-bottom: 4px; }

ul.coauthors .co-q { display: block; }

ul.coauthors .co-q form.report { margin-left: 0; margin-right: 4px; }

form.suggest input { font: inherit; font-size: 12px; padding: 0 6px; border: 1px dashed var(--line); border-radius: 4px; background: var(--bg); color: var(--fg); }

form.suggest input.sg-year { width: 9em; }

form.suggest input.sg-venue { width: 16em; }

ol.works .inferred { font-style: normal; }
ol.works .corrected { border-bottom: 1px dotted currentColor; cursor: help; }
ol.works .verdict { display: block; font-size: 13px; margin-top: 2px; }

table.ids { font-size: 14px; color: var(--muted); margin: 6px 0; }

table.ids th { text-align: left; font-weight: normal; padding: 0 12px 0 0; vertical-align: top; white-space: nowrap; }

table.ids td { padding: 0; }

.report.done.yes { background: #d9f2d9; border-color: #8cc98c; color: #1d4d1d; }

.report.done.no { background: #f8d7d7; border-color: #d99a9a; color: #5c1d1d; }
p.asof { text-align: right; color: var(--muted); font-size: 13px; margin: 0 0 4px; }
/* coauthor status marks and the researcher's own controls */
.mark { font-weight: bold; margin-right: 3px; }
.mark.yes { color: #1a7f37; }
.mark.no { color: #c62828; }
form.owner { display: inline; }
form.owner button.on { background: #ddd; font-weight: bold; }
form.add-co { display: block; position: relative; max-width: 420px; margin: 8px 0 16px; }
form.add-co input[type=search] { width: 100%; }
p.owner-note { background: #fff6d6; padding: 4px 8px; }
p.owner-switch { font-size: 13px; }
ol.works .pubas { font-size: 13px; margin-left: 6px; }
/* Pico draws <article> as a card; on phones the card's padding costs too much width */
@media (max-width: 575px) {
  article.profile { padding: 0; box-shadow: none; background: none; }
}
form.report button { text-align: left; }
ol.works .merged { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; cursor: help; }

/* popups: doi, bibtex, more (templates/_pop.html, js/pop.js) */
details.pop { display: inline-block; position: relative; margin: 0 0 0 6px; }
details.pop > summary { display: inline; list-style: none; font-weight: normal; font-size: 13px; color: var(--accent); cursor: pointer; }
details.pop > summary::-webkit-details-marker { display: none; }
details.pop > summary::after { display: none; }
details.pop > summary.more { color: var(--muted); text-decoration: underline dotted; }
details.pop .pop-body { position: absolute; z-index: 20; left: 0; top: 1.6em; width: max-content; max-width: min(36rem, 88vw);
  padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.15);
  font-size: 13px; font-weight: normal; }
details.pop .pop-body p { margin: 0 0 6px; }
details.pop .pop-body p:last-child { margin-bottom: 0; }
details.pop .pop-body pre { margin: 0 0 6px; padding: 6px; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
details.pop .pop-body code { font-size: 13px; padding: 1px 4px; }
details.pop .pop-body a { margin-left: 8px; }
button.copy, .account form button { width: auto; margin: 0 0 0 4px; padding: 0 8px; line-height: 1.6; font-size: 12px; }

/* the researcher's website, under the affiliation */
p.homepage { margin: -0.5rem 0 0.75rem; font-size: 15px; }

/* the account page */
.account form { display: inline-block; margin: 0 8px 8px 0; }
.account form.add-site input, .account form.request input { width: 22rem; max-width: 70vw; display: inline-block; margin: 0; padding: 2px 6px; height: auto; font-size: 14px; }
.account ul.sites form.inline { margin: 0 0 0 8px; }
.account pre.snippet { font-size: 12px; white-space: pre-wrap; margin-bottom: 4px; }
.account p.flash { color: var(--accent); font-weight: 600; }
.account button.danger { border-color: #b33; background: #b33; color: #fff; }
/* Pico styles <details> as an accordion; inside a popup its colours and spacing must not apply */
details.pop > summary, details.pop[open] > summary:not([role]):not(:focus), details.pop > summary:not([role]) { color: var(--accent); margin-bottom: 0; line-height: inherit; }
details.pop > summary.more, details.pop[open] > summary.more:not([role]):not(:focus), details.pop > summary.more:not([role]) { color: var(--muted); }

/* the corrections popup of a record (templates/_forms.html) */
details.pop > summary.corr, details.pop[open] > summary.corr:not([role]):not(:focus), details.pop > summary.corr:not([role]) { color: var(--muted); font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }
details.corr .pop-body { min-width: min(26rem, 88vw); }
details.corr .pop-body form, details.corr .pop-body .report.done { display: block; margin: 0 0 6px; }
details.corr .pop-body form.fix label, details.corr .pop-body form.combine label { display: inline; font-size: 13px; }
details.corr .pop-body form input[type=text] { display: inline-block; width: 14rem; max-width: 50vw; margin: 0 4px; padding: 0 4px; height: auto; font-size: 13px; }
details.corr .pop-body form.combine input[type=text] { width: 4rem; }
details.corr .pop-body form button { width: auto; margin: 0; padding: 0 6px; font-size: 12px; line-height: 1.5; }
details.corr .pop-body .pair { display: block; }
ol.works .confirm { display: block; font-size: 13px; margin-top: 4px; padding: 4px 8px; border-left: 3px solid var(--accent); }
dialog.confirm-combine { max-width: min(34rem, 92vw); font-size: 14px; }
dialog.confirm-combine button { width: auto; display: inline-block; margin: 0 6px 0 0; padding: 2px 10px; font-size: 13px; }

/* a record that may be bad (its reasons are under "more"): a very pale red background */
ol.works li.untrusted { background: rgba(220, 38, 38, 0.07); border-radius: 4px; padding: 2px 6px; margin-left: -6px; }

/* the researcher's own web page, editable on their page and on /account */
form.homepage-edit { margin: 0 0 0.75rem; font-size: 14px; }
form.homepage-edit input[type=text] { display: inline-block; width: 22rem; max-width: 60vw; margin: 0 4px; padding: 2px 6px; height: auto; font-size: 14px; }
form.homepage-edit button { width: auto; display: inline-block; margin: 0 6px 0 0; padding: 0 8px; font-size: 12px; line-height: 1.6; }
form.homepage-edit .flash { color: var(--accent); }

/* "Is this your own computer?" after login, and on /account */
form.trust button { display: inline-block; width: auto; margin: 0 8px 8px 0; }
form.trust button.on { outline: 3px solid var(--accent); }
