/* Bib-a-Viz — interface
   A quiet instrument: cool neutrals, hairlines instead of shadows, square geometry,
   monospaced figures and one accent used only to mark what is selected.
   Light and dark variants share every rule; only the tokens change. */

/* Source Serif 4 (Adobe, SIL Open Font License 1.1), bundled for titles: nothing is fetched from the network */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../vendor/fonts/SourceSerif4Variable-Roman.otf.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("../vendor/fonts/SourceSerif4Variable-Italic.otf.woff2") format("woff2"); }
:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f6f7f8;
  --panel-2: #eef0f2;
  --surface: #ffffff;
  --line: #dfe2e6;
  --line-strong: #c3c8cf;
  --ink: #0f1419;
  --ink-2: #4a5360;
  --ink-3: #8a929e;
  --accent: #007a8c;
  --accent-soft: rgba(0, 142, 162, .10);
  --invert: #0f1419;          /* primary buttons */
  --invert-ink: #ffffff;
  --warn: #9a5b00;
  --danger: #b3261e;
  --ok: #1f7a43;
  --overlay: rgba(15, 20, 25, .34);
  --shadow: 0 10px 34px rgba(15, 20, 25, .14), 0 1px 3px rgba(15, 20, 25, .08);
  --stripe: rgba(179, 38, 30, .09);
  /* illustrations */
  --art-axis: #aeb4bc;
  --art-soft: #d5d9de;
  --art-paper: #ffffff;
  --art-ink: #14181d;

  --r: 3px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Charter, "Iowan Old Style", Cambria, Georgia, serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --topbar-h: 46px;

  /* names kept for inline styles written against the first design */
  --teal: var(--accent); --teal-ink: var(--accent); --teal-soft: var(--accent-soft);
  --coral: var(--accent); --coral-ink: var(--ink-2); --ochre: var(--accent); --ochre-ink: var(--ink-2);
  --violet: var(--accent); --green: var(--accent); --blue: var(--accent);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101214;
  --panel: #15181b;
  --panel-2: #1d2125;
  --surface: #181b1f;
  --line: #2a2f35;
  --line-strong: #3b424b;
  --ink: #e9ebee;
  --ink-2: #a9b0b9;
  --ink-3: #6f7782;
  --accent: #3bb8ca;
  --accent-soft: rgba(59, 184, 202, .14);
  --invert: #e9ebee;
  --invert-ink: #101214;
  --warn: #e0a84a;
  --danger: #f0786c;
  --ok: #5cc48a;
  --overlay: rgba(0, 0, 0, .55);
  --shadow: 0 12px 38px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4);
  --stripe: rgba(240, 120, 108, .13);
  --art-axis: #59616b;
  --art-soft: #333a42;
  --art-paper: #22262b;
  --art-ink: #e9ebee;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: 13.5px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; }
#app { height: 100%; display: flex; flex-direction: column; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-family: var(--serif); font-size: 32px; font-weight: 640; letter-spacing: -.02em; line-height: 1.15; }
h2 { font-family: var(--serif); font-size: 24px; font-weight: 620; letter-spacing: -.012em; line-height: 1.25; }
h3 { font-size: 14.5px; font-weight: 650; letter-spacing: -.005em; }
h4 { font-size: 11.5px; font-weight: 620; color: var(--ink-3); }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
a:hover { text-decoration-color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .94em; }
.grow { flex: 1 1 auto; min-width: 0; min-height: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.center { display: flex; align-items: center; justify-content: center; }
.scroll { overflow: auto; }
.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-4 { height: 4px; } .sp-8 { height: 8px; } .sp-16 { height: 16px; } .sp-24 { height: 24px; } .sp-40 { height: 40px; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background-color: var(--ink-3); }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }

/* ---------- top bar ---------- */
.topbar { height: var(--topbar-h); flex: 0 0 var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--bg); border-bottom: 1px solid var(--line); -webkit-app-region: drag; }
.topbar > * { -webkit-app-region: no-drag; }
.topbar .drag { -webkit-app-region: drag; align-self: stretch; }
body.is-mac.is-desktop .topbar { padding-left: 84px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 720; font-size: 14.5px; letter-spacing: -.015em; cursor: pointer; color: var(--ink); text-decoration: none; }
.brand .v { color: var(--ink-3); font-weight: 520; }
.wordmark { white-space: nowrap; } .wordmark i { font-style: normal; font-weight: 520; color: var(--ink-3); }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; min-width: 0; }
.crumbs .sep { color: var(--line-strong); }
.crumbs b { color: var(--ink); font-weight: 600; }
.lang { display: inline-flex; gap: 2px; }
.lang button { border: 0; background: transparent; padding: 4px 6px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); cursor: pointer; border-bottom: 1.5px solid transparent; }
.lang button:hover { color: var(--ink); }
.lang button.on { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 540; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .1s, border-color .1s; }
.btn:hover { border-color: var(--ink); }
.btn:active { background: var(--panel-2); }
.btn.primary { background: var(--invert); border-color: var(--invert); color: var(--invert-ink); }
.btn.primary:hover { opacity: .86; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--panel-2); border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn.sm { height: 27px; padding: 0 9px; font-size: 12.5px; }
.btn.lg { height: 38px; padding: 0 18px; font-size: 13.5px; }
.btn.icon { width: 32px; padding: 0; }
.btn.sm.icon { width: 27px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn .ico { flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.input, .select { height: 32px; padding: 0 9px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); outline: none; min-width: 0; }
.select { padding-right: 24px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.500 3.500L8 1' fill='none' stroke='%238a929e' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.input.sm, .select.sm { height: 27px; font-size: 12.5px; }
textarea.input { height: auto; padding: 8px 9px; resize: vertical; line-height: 1.45; }
input[type="number"].input { font-family: var(--mono); font-size: 12px; }
input[type="range"] { accent-color: var(--ink); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); width: 14px; height: 14px; margin: 0; }
input[type="color"] { width: 26px; height: 22px; padding: 0; border: 1px solid var(--line-strong); border-radius: 2px; background: none; cursor: pointer; }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; color: var(--ink-2); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.seg button { border: 0; border-right: 1px solid var(--line-strong); background: var(--surface); padding: 3px 10px; font-size: 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--invert); color: var(--invert-ink); }
.field > .seg { align-self: flex-start; max-width: 100%; flex-wrap: wrap; }
/* the search of OpenAlex: a tab per kind of condition, and the search read as a sentence */
.qtabs { display: flex; flex-wrap: wrap; gap: 0 18px; border-bottom: 1px solid var(--line); }
.qtabs button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 0 9px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: 13px; color: var(--ink-3); cursor: pointer; }
.qtabs button:hover { color: var(--ink); }
.qtabs button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.qtabs button .num { font-size: 11px; color: var(--accent); }
.qline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; line-height: 1.5; min-height: 42px; }
.qline code { font-family: var(--mono); font-size: 12px; }
.qline .qop { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--accent); }
.qline .qpart.not b { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.cond-list { border-top: 1px solid var(--line); margin-top: 4px; }
.cond { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.rule-line { height: 1px; background: var(--line); }

.switch { position: relative; width: 30px; height: 16px; border-radius: 2px; background: var(--surface); border: 1px solid var(--line-strong); cursor: pointer; flex: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; background: var(--ink-3); transition: transform .12s, background .12s; }
.switch.on { border-color: var(--ink); }
.switch.on::after { transform: translateX(14px); background: var(--ink); }

/* labels: plain typographic tags, never coloured pills */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 540; color: var(--ink-2); white-space: nowrap; }
.badge.box { border: 1px solid var(--line-strong); border-radius: 2px; padding: 1px 6px; }
.badge.warn { color: var(--warn); } .badge.danger { color: var(--danger); } .badge.green { color: var(--ok); } .badge.teal { color: var(--accent); }
.dot { display: none; }
/* the beta tag: the one neon accent of the interface, from blue to pink. A click says what beta means */
.beta { display: inline-flex; align-items: center; flex: none; height: 19px; padding: 0 7px; font: 640 11.5px/1 var(--font); letter-spacing: .03em; border: 1.5px solid; border-image: linear-gradient(100deg, #009dff, #ff2e97) 1; background: linear-gradient(100deg, #0087ff, #ff2e97); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; vertical-align: middle; }
button.beta { cursor: pointer; transition: box-shadow .16s; }
button.beta:hover, button.beta:focus-visible { box-shadow: 0 0 10px rgba(0, 157, 255, .5), 0 0 16px rgba(255, 46, 151, .4); outline: none; }
[data-theme="dark"] .beta { border-image-source: linear-gradient(100deg, #38c6ff, #ff5db1); background-image: linear-gradient(100deg, #38c6ff, #ff5db1); }
/* names of databases and declarations: all in the weight of a name inside a text, told apart by one
   colour each, the one of their own mark. No typeface, spacing or sign of theirs is imitated beyond that */
.brand-name { white-space: nowrap; font-style: normal; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.b-wos { color: #5e33bf; }
.b-scopus { color: #cf6417; }
.b-coara { color: #1d2f9c; }
.b-dora { box-shadow: inset 0 -2px 0 #fcb711; }
[data-theme="dark"] .b-wos { color: #a98ff5; } [data-theme="dark"] .b-scopus { color: #f58a3c; } [data-theme="dark"] .b-coara { color: #93a6ff; }
.pipe { display: inline-block; width: 1px; height: .92em; margin: 0 .72em; vertical-align: -.1em; background: var(--line-strong); }
.brand-row { white-space: nowrap; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line-strong); border-radius: 2px; padding: 0 4px; }

/* ---------- cards & choice blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.card.pad { padding: 18px; }
/* resting blocks are translucent enough to notice and turn solid under the pointer */
.choice { position: relative; display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 14px 16px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; opacity: .6; transition: border-color .12s, background .12s, opacity .18s; }
.choice:hover, .choice:focus-visible { border-color: var(--ink); opacity: 1; }
.choice.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); opacity: 1; }
.choice.off { opacity: 1; }
.choice.center { text-align: center; align-items: stretch; padding: 16px 18px 20px; }
.choice.center h3 { font-size: 19.5px; letter-spacing: -.01em; }
.choice-kicker { font-size: 12px; color: var(--ink-3); margin-top: -2px; }
.choice.off { cursor: not-allowed; }
.choice.off > *:not(.choice-head):not(.why-wrap) { opacity: .34; filter: grayscale(1); }
.choice.off:hover { border-color: var(--line); }
.choice h3 { font-size: 16.5px; }
.choice p { color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.choice .art { height: 92px; background: var(--panel); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.choice .art svg { display: block; }
/* the illustration of a block comes alive while the pointer is over it */
@keyframes art-rise { from { transform: scaleY(1); } to { transform: scaleY(.62); } }
@keyframes art-reach { from { transform: scaleX(1); } to { transform: scaleX(.66); } }
@keyframes art-beat { from { transform: scale(1); } to { transform: scale(1.22); } }
@keyframes art-draw { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }
@keyframes art-blink { from { opacity: 1; } to { opacity: .35; } }
@keyframes art-sway { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@media (prefers-reduced-motion: no-preference) {
  .choice:not(.off):hover .art-svg circle { transform-box: fill-box; transform-origin: center; animation: art-beat .7s ease-in-out infinite alternate; }
  .choice:not(.off):hover .art-rise rect { transform-box: fill-box; transform-origin: 50% 100%; animation: art-rise .65s ease-in-out infinite alternate; }
  .choice:not(.off):hover .art-stack rect { transform-box: view-box; transform-origin: 0 64px; animation: art-rise .65s ease-in-out infinite alternate; }
  .choice:not(.off):hover .art-stack rect:nth-child(4n), .choice:not(.off):hover .art-stack rect:nth-child(4n + 1) { animation-delay: .22s; }
  .choice:not(.off):hover .art-reach rect:not(:first-child) { transform-box: fill-box; transform-origin: 0 50%; animation: art-reach .65s ease-in-out infinite alternate; }
  .choice:not(.off):hover .art-reach.art-svg rect:first-child { animation: none; }
  .choice:not(.off):hover .art-draw path:not([fill]):not([stroke-dasharray]) { stroke-dasharray: 320; animation: art-draw 1.1s ease-out both; }
  .choice:not(.off):hover .art-blink :is(rect, g, path[fill]) { animation: art-blink .6s ease-in-out infinite alternate; }
  .choice:not(.off):hover .art-sway path[fill] { animation: art-sway .8s ease-in-out infinite alternate; }
  .choice:hover .art-svg :is(rect, circle, path):nth-child(2) { animation-delay: 110ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(3) { animation-delay: 165ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(4) { animation-delay: 220ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(5) { animation-delay: 275ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(6) { animation-delay: 330ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(7) { animation-delay: 385ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(8) { animation-delay: 440ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(9) { animation-delay: 495ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(10) { animation-delay: 550ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(11) { animation-delay: 605ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(12) { animation-delay: 660ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(13) { animation-delay: 715ms; } .choice:hover .art-svg :is(rect, circle, path):nth-child(14) { animation-delay: 770ms; }
  .choice:hover .art-blink :is(rect, g):nth-child(3n) { animation-delay: .2s; } .choice:hover .art-blink :is(rect, g):nth-child(3n + 1) { animation-delay: .4s; }
  .choice:hover .art-sway path:nth-child(2n) { animation-delay: .25s; }
}
.choice .why { font-size: 12px; color: var(--ink-2); border-left: 2px solid var(--ink-3); padding-left: 8px; }
.choice.row-layout { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 16px; }
.choice.row-layout > .col { flex: 1 1 0; }
/* why an option cannot be used goes on a line of its own, under the text and never over it */
.choice.row-layout > .why-wrap { flex: 0 0 100%; padding-left: 128px; }
.choice.row-layout .art { flex: 0 0 112px; height: 74px; }
.choice.row-layout .choice-head { position: absolute; top: 10px; right: 14px; }
.choice-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); min-height: 14px; }
.choice-head .grow { flex: 1; }
/* data coverage: share of records that hold what an option needs */
.cov { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.cov i { display: block; width: 26px; height: 3px; background: var(--line); position: relative; }
.cov i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--cov, 0%); background: var(--ink-3); }
.cov.part { color: var(--warn); } .cov.part i::after { background: var(--warn); }
.cov.none { color: var(--danger); }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tint-teal, .tint-coral, .tint-ochre, .tint-violet, .tint-green, .tint-blue, .tint-paper { background: var(--panel); }

/* ---------- page shells ---------- */
.page { flex: 1 1 auto; min-height: 0; overflow: auto; background: var(--bg); }
.page-inner { max-width: 1060px; margin: 0 auto; padding: 40px 32px 60px; }
.page-inner.narrow { max-width: 840px; }
.page-inner.wide { max-width: 1240px; }
.home .page-inner { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: 28px; padding-bottom: 28px; }
.hero { padding: 0 0 34px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.hero h1 { font-size: 38px; }
.hero h1 { position: relative; display: inline-block; }
.hero h1 .beta { position: absolute; left: 100%; top: 50%; margin: -9px 0 0 14px; }
.hero .ask-big { font-family: var(--serif); font-size: 36px; font-weight: 520; letter-spacing: -.018em; line-height: 1.15; color: var(--ink); margin-top: 20px; }
.hero .mark { display: flex; }
.eyebrow { font-size: 12.5px; font-weight: 560; color: var(--ink-3); }
.foot { color: var(--ink-3); font-size: 12px; padding: 22px 0 0; margin-top: 30px; justify-content: center; text-align: center; }

/* ---------- status bar: what is loaded and how much memory it takes ---------- */
.statusbar { flex: 0 0 24px; height: 24px; display: flex; align-items: center; gap: 14px; padding: 0 10px 0 12px; border-top: 1px solid var(--line); background: var(--panel); color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.statusbar .it { display: inline-flex; align-items: center; gap: 5px; }
.statusbar .it b { font-weight: 560; color: var(--ink-2); font-family: var(--mono); font-size: 11px; }
.statusbar a, .statusbar button.lnk { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); text-decoration: none; border: 0; background: transparent; padding: 0 2px; height: 22px; cursor: pointer; font-size: 11.5px; }
.statusbar a:hover, .statusbar button.lnk:hover { color: var(--ink); }
.statusbar .mem i { display: block; width: 34px; height: 3px; background: var(--line-strong); position: relative; }
.statusbar .mem i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--mem, 0%); background: var(--ink-3); }
.statusbar .mem.high i::after { background: var(--warn); } .statusbar .mem.top i::after { background: var(--danger); }

/* ---------- workspace ---------- */
.work { flex: 1 1 auto; min-height: 0; display: flex; }
.side { flex: 0 0 204px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 12px 0; overflow: auto; }
.side h4 { padding: 10px 16px 8px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 16px; color: var(--ink-2); cursor: pointer; border: 0; border-left: 2px solid transparent; background: transparent; text-align: left; width: 100%; }
.nav:hover { color: var(--ink); background: var(--panel-2); }
.nav.on { color: var(--ink); font-weight: 600; border-left-color: var(--ink); background: var(--panel-2); }
.nav .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.nav .count.alert { color: var(--danger); font-weight: 600; }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.pane { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 24px 28px 36px; }
.pane-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pane-head p { color: var(--ink-2); margin-top: 4px; max-width: 720px; }

/* visualisation tabs, like the sheets of a workbook */
.tabs { flex: 0 0 auto; display: flex; align-items: stretch; padding: 0 6px; background: var(--panel); border-top: 1px solid var(--line); height: 34px; overflow-x: auto; }
.tab { display: flex; align-items: center; gap: 7px; padding: 0 12px; border: 0; border-top: 2px solid transparent; border-right: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: 12.5px; cursor: pointer; white-space: nowrap; max-width: 240px; margin-top: -1px; }
.tab:hover { color: var(--ink); background: var(--panel-2); }
.tab.on { color: var(--ink); font-weight: 600; border-top-color: var(--ink); background: var(--bg); }
.tab .x { opacity: 0; display: inline-flex; padding: 1px; }
.tab:hover .x, .tab.on .x { opacity: .5; }
.tab .x:hover { opacity: 1; }
.tab.add { border-right: 0; }
/* the tab of a dashboard stands out from those of the figures: outlined in the accent */
.tab.board-tab { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); margin: 4px 3px; border: 0; border-radius: 2px; }
.tab.board-tab.on { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.tab.board-tab .ico { color: var(--accent); }
.tab.board-add { border-left: 1px solid var(--line); }
/* a dashboard: the figures of the project on the left, the sheet on the right */
.board { flex: 1 1 auto; min-height: 0; display: flex; }
.board-side { flex: 0 0 236px; overflow: auto; padding: 16px 14px; border-right: 1px solid var(--line); background: var(--panel); }
.board-side h4 { font-size: 12.5px; font-weight: 620; margin-bottom: 4px; }
.board-pick { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 7px 9px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; cursor: grab; }
.board-pick:hover { border-color: var(--ink); } .board-pick .ico { color: var(--ink-3); flex: none; } .board-pick.used { color: var(--ink-2); }
.board-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.board-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.board-name { font-family: var(--serif); font-size: 18px; font-weight: 620; border-color: transparent; background: transparent; width: 280px; padding-left: 4px; }
.board-name:hover, .board-name:focus { border-color: var(--line-strong); background: var(--surface); }
.board-canvas { flex: 1 1 auto; min-height: 0; overflow: auto; background: var(--panel); }
.board-canvas.over { box-shadow: inset 0 0 0 2px var(--accent); }
.board-sheet { position: relative; min-height: 100%; background-image: linear-gradient(to right, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px); background-size: calc((100% - 10px) / 12) 100%; background-position: 5px 0; }
.board-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.board-item { position: absolute; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.board-item:hover, .board-item.live { border-color: var(--ink-3); } .board-item.live { z-index: 5; box-shadow: var(--shadow); opacity: .94; }
.board-head { flex: none; display: flex; align-items: center; gap: 7px; height: 24px; padding: 0 7px; font-size: 11.5px; color: var(--ink-3); cursor: move; border-bottom: 1px solid transparent; user-select: none; }
.board-item:hover .board-head { border-bottom-color: var(--line); background: var(--panel); color: var(--ink-2); }
.board-head a { display: inline-flex; color: var(--ink-3); opacity: 0; cursor: pointer; } .board-item:hover .board-head a { opacity: 1; } .board-head a:hover { color: var(--ink); }
.board-body { flex: 1 1 auto; min-height: 0; display: flex; }
.board-chart { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; }
.board-md { flex: 1 1 auto; overflow: auto; padding: 4px 16px 12px; cursor: text; }
.board-md h2 { font-size: 24px; margin: 6px 0 8px; } .board-md h3 { font-family: var(--serif); font-size: 18px; margin: 8px 0 6px; } .board-md h4 { font-size: 14px; margin: 8px 0 4px; }
.board-md p { margin: 0 0 8px; } .board-md blockquote { margin: 0 0 8px; padding-left: 12px; border-left: 2px solid var(--line-strong); color: var(--ink-2); } .board-md hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.board-md code { font-family: var(--mono); font-size: .92em; }
.board-md-edit { flex: 1 1 auto; border: 0; outline: 0; resize: none; padding: 10px 14px; background: var(--surface); color: var(--ink); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
.board-grip { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--line-strong) 50%, var(--line-strong) 58%, transparent 58%, transparent 72%, var(--line-strong) 72%, var(--line-strong) 80%, transparent 80%); opacity: 0; }
.board-item:hover .board-grip { opacity: 1; }
@media print {
  .print-board .topbar, .print-board .tabs, .print-board .statusbar, .print-board .board-side, .print-board .board-bar, .print-board .toasts { display: none !important; }
  .print-board body, .print-board #app, .print-board .board, .print-board .board-main, .print-board .board-canvas { display: block !important; height: auto !important; overflow: visible !important; background: #fff !important; }
  .print-board .board-sheet { background-image: none; } .print-board .board-item { border-color: transparent; break-inside: avoid; } .print-board .board-head, .print-board .board-grip { visibility: hidden; }
}

/* ---------- notices: a rule on the left, no coloured boxes ---------- */
/* Notices and problems: a plain box whose top-left corner carries the colour of the notice.
   No tinted background and no coloured side bar. Problems add a line at the bottom that
   says in words how much they limit the analysis. */
.note, .issue, .tips { position: relative; }
.note::before, .issue::before, .tips::before, .corner { content: ''; position: absolute; top: -1px; left: -1px; width: 0; height: 0; border-top: 12px solid var(--ink-3); border-right: 12px solid transparent; }
.note { display: flex; gap: 10px; padding: 11px 14px 11px 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px; line-height: 1.5; align-items: flex-start; }
.note.warn::before { border-top-color: var(--warn); }
.note.danger::before { border-top-color: var(--danger); }
.note.plain::before { display: none; } .note.plain { padding-left: 14px; }
.note .ico { flex: none; margin-top: 2px; color: var(--ink-3); }
.note b { font-weight: 640; color: var(--ink); }
.issue { padding: 13px 14px 0 18px; }
.issue.high::before, .corner.high { border-top-color: var(--danger); } .issue.mid::before, .corner.mid { border-top-color: var(--warn); }
.issue.low::before, .corner.low { border-top-color: var(--ink-3); } .issue.info::before, .corner.info { border-top-color: var(--line-strong); }
.issue-foot { display: flex; align-items: center; gap: 8px; margin: 11px -14px 0 -18px; padding: 7px 14px 7px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); }
.issue-foot b { font-weight: 620; color: var(--ink-2); }
.lim { display: inline-flex; gap: 2px; flex: none; } .lim i { width: 9px; height: 5px; background: var(--line-strong); }
.lim.high i { background: var(--danger); } .lim.mid i:nth-child(-n+2) { background: var(--warn); } .lim.low i:first-child { background: var(--ink-3); }
.sev-key { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); margin-top: 16px; }
.sev-key > div { position: relative; padding: 10px 12px 10px 18px; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; border-left: 1px solid var(--line); }
.sev-key > div:first-child { border-left: 0; } .sev-key b { display: block; color: var(--ink); font-weight: 620; font-size: 12px; margin-bottom: 2px; }
.sev-key .corner { top: 0; left: 0; }
@media (max-width: 1080px) { .sev-key { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: center; justify-content: center; z-index: 50; animation: fade .12s ease; padding: 24px; }
.modal { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; box-shadow: var(--shadow); width: min(720px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: pop .14s ease; }
.modal.wide { width: min(960px, 100%); }
.modal.slim { width: min(500px, 100%); }
.modal-head { padding: 20px 24px 14px; display: flex; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 22px; }
.modal-head p { color: var(--ink-2); margin-top: 4px; }
.modal-body { padding: 18px 24px 8px; overflow: auto; }
.modal-foot { padding: 14px 24px 18px; display: flex; gap: 10px; align-items: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.toasts { position: fixed; bottom: 48px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 80; align-items: center; pointer-events: none; }
.toast { background: var(--invert); color: var(--invert-ink); padding: 8px 14px; border-radius: var(--r); font-size: 12.5px; box-shadow: var(--shadow); animation: pop .14s ease; }
.toast.err { background: var(--danger); color: #fff; }

/* ---------- steps ---------- */
.steps { display: flex; align-items: center; gap: 0; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.steps .st { display: flex; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1.5px solid transparent; text-decoration: none; }
.steps .st.on { color: var(--ink); font-weight: 600; }
.steps .st.done { color: var(--ink-2); }
.steps .st.can { cursor: pointer; } .steps .st.can:hover { color: var(--ink); }
.steps .bar { width: 1px; height: 11px; background: var(--line-strong); margin: 0 11px; }

/* ---------- drop zone ---------- */
.drop { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 28px 20px; text-align: center; background: var(--panel); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--ink); border-style: solid; }
.drop h3 { margin-top: 10px; }
.drop p { color: var(--ink-2); font-size: 12.5px; margin-top: 4px; }
.drop.busy { cursor: default; border-style: solid; }
.drop .progress { height: 4px; max-width: 420px; margin: 14px auto 8px; }
.drop p.drop-where { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }

/* ---------- tables ---------- */
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12px; padding: 7px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
table.t td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: right; font-family: var(--mono); font-size: 12px; }
.meter { height: 4px; background: var(--panel-2); overflow: hidden; min-width: 60px; }
.meter > i { display: block; height: 100%; background: var(--ink-2); }
.meter.low > i { background: var(--danger); } .meter.mid > i { background: var(--warn); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: var(--r); background: var(--line); overflow: hidden; }
.tile { background: var(--surface); padding: 12px 14px; }
.tile .k { font-size: 12px; color: var(--ink-3); }
.tile .v { font-size: 22px; font-weight: 680; letter-spacing: -.02em; margin-top: 3px; white-space: nowrap; }
.tile .s { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

/* ---------- data sheet ---------- */
.sheet { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; }
.sheet-head { position: sticky; top: 0; z-index: 3; display: flex; background: var(--panel); border-bottom: 1px solid var(--line-strong); font-weight: 600; color: var(--ink-2); }
.sheet-row { position: absolute; left: 0; display: flex; border-bottom: 1px solid var(--line); }
.sheet-row:hover { background: var(--panel); }
.sheet-cell { flex: none; padding: 0 8px; height: 30px; line-height: 30px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-right: 1px solid var(--line); }
.sheet-head .sheet-cell { height: 30px; line-height: 30px; cursor: pointer; user-select: none; position: relative; font-size: 12px; }
.sheet-head .sheet-cell:hover { color: var(--ink); }
.sheet-cell.idx { width: 52px; text-align: right; color: var(--ink-3); background: var(--panel); position: sticky; left: 0; z-index: 2; font-family: var(--mono); font-size: 11px; }
.sheet-cell.num { text-align: right; font-family: var(--mono); font-size: 11.5px; }
.sheet-cell.empty { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--stripe) 5px 6px); }
.sheet-cell.edited { box-shadow: inset 2px 0 0 var(--warn); }
.sheet-cell.sel { outline: 1.5px solid var(--accent); outline-offset: -1.5px; background: var(--accent-soft); }
.sheet-cell input { width: 100%; height: 26px; border: 0; outline: 0; background: var(--surface); font: inherit; padding: 0; }
.sheet .resize { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 4; }
.dbpill.db-wos { color: #5e33bf; } .dbpill.db-scopus { color: #c85d10; } .dbpill.db-openalex { color: var(--ink); font-weight: 600; }
[data-theme="dark"] .dbpill.db-wos { color: #a98ff5; } [data-theme="dark"] .dbpill.db-scopus { color: #f58a3c; }
.dbpill { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .02em; border: 1px solid var(--line-strong); border-radius: 2px; padding: 0 4px; line-height: 15px; margin-right: 3px; vertical-align: middle; color: var(--ink-2); background: var(--surface); }

/* ---------- builder ---------- */
.builder { flex: 1 1 auto; min-height: 0; display: flex; }
.b-fields { flex: 0 0 264px; border-right: 1px solid var(--line); background: var(--panel); overflow: auto; padding: 14px 0; }
.b-fields h4, .b-fields .hint { padding: 0 14px; }
.b-center { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: var(--panel); }
.b-bar { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg); min-height: 44px; }
.b-stage { flex: 1 1 auto; min-height: 0; position: relative; padding: 14px; overflow: auto; display: flex; flex-direction: column; }
.b-canvas { flex: 1 1 auto; min-height: 380px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.b-opts { flex: 0 0 276px; border-left: 1px solid var(--line); background: var(--bg); overflow: auto; }
.b-opts.closed { flex-basis: 0; border-left: 0; overflow: hidden; }
.chip { display: flex; align-items: center; gap: 9px; padding: 5px 14px; font-size: 12.5px; cursor: grab; user-select: none; border-left: 2px solid transparent; }
.chip:hover { background: var(--panel-2); border-left-color: var(--ink-3); }
.chip:active { cursor: grabbing; }
.chip .ty { font-family: var(--mono); font-size: 10.5px; width: 16px; flex: none; color: var(--ink-3); }
.chip.mea .ty { color: var(--accent); }
.chip.off { color: var(--ink-3); cursor: not-allowed; }
.chip.off .ty { opacity: .5; }
.chip .cov { margin-left: auto; }
.chip .cov i { display: none; }
.shelf { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px 4px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); font-size: 12.5px; color: var(--ink-3); cursor: pointer; }
.shelf:hover { border-color: var(--ink); }
.shelf.fixed { cursor: default; padding-right: 4px; }
.shelf.fixed:hover { border-color: var(--line-strong); }
.shelf.fixed .seg { border: 0; }
.shelf.fixed .seg button { border-right: 0; }
.shelf.over { border-color: var(--accent); background: var(--accent-soft); }
.shelf.full { color: var(--ink); }
.shelf .lab { font-size: 11.5px; color: var(--ink-3); flex: none; }
.shelf .val { font-weight: 600; }
.shelf .clear { margin-left: auto; opacity: .5; display: inline-flex; }
.shelf .clear:hover { opacity: 1; }
.shelf.need { border-style: dashed; border-color: var(--danger); color: var(--danger); }
.shelf.hint { border-style: dashed; border-color: var(--accent); }
.acc { border-bottom: 1px solid var(--line); }
.acc > button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 11px 14px; border: 0; background: transparent; font-weight: 620; font-size: 12.5px; cursor: pointer; text-align: left; }
.acc > button:hover { background: var(--panel); }
.acc > div { padding: 2px 14px 16px; display: flex; flex-direction: column; gap: 11px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.opt > span { color: var(--ink-2); }
.opt .input, .opt .select { max-width: 150px; }
.swatches { display: inline-flex; overflow: hidden; height: 12px; width: 84px; flex: none; }
.swatches i { flex: 1; }
.tips { border: 1px solid var(--line); background: var(--surface); padding: 12px 14px 12px 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.tips h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--ink); }
.tips ul { margin: 6px 0 0; padding-left: 18px; } .tips li { margin: 3px 0; }
.tips li b { color: var(--warn); font-weight: 560; }
/* the question asked in the middle of an empty chart */
.ask { position: absolute; inset: 0; background: var(--surface); padding: 24px; overflow: auto; display: flex; align-items: flex-start; justify-content: center; }
.level { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.level:hover { border-color: var(--ink); }
.level.off { cursor: not-allowed; }
.level.off > *:not(.level-head) { opacity: .36; }
.level.off .level-head > *:not(.cov) { opacity: .4; }
.level.off:hover { border-color: var(--line); }
.level-head { display: flex; align-items: center; gap: 8px; }
.level-head b { font-weight: 620; font-size: 13px; }
.level span.d { font-size: 12px; color: var(--ink-2); line-height: 1.4; }

/* popover menu */
.menu { position: fixed; z-index: 90; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; box-shadow: var(--shadow); padding: 4px; min-width: 200px; max-height: 60vh; overflow: auto; animation: pop .1s ease; }
.menu h4 { padding: 8px 9px 4px; }
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; padding: 6px 9px; border-radius: 2px; text-align: left; cursor: pointer; font-size: 12.5px; }
.menu button > svg { flex: none; } /* a long hint must not squeeze the icon */
.menu button:hover { background: var(--panel-2); }
.menu button.on { font-weight: 640; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* chart tooltip */
.tip { position: fixed; z-index: 95; pointer-events: none; background: #14181d; color: #f1f3f5; border: 1px solid #333a42; padding: 7px 10px; border-radius: var(--r); font-size: 12px; line-height: 1.45; max-width: 320px; box-shadow: var(--shadow); }
.tip b { font-weight: 650; display: block; margin-bottom: 1px; }
.tip .r { display: flex; justify-content: space-between; gap: 16px; }
.tip .r span:first-child { color: #a9b0b9; }
.tip .r span:last-child { font-family: var(--mono); font-size: 11.5px; }

.progress { height: 3px; background: var(--panel-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ink); transition: width .2s; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.list { display: flex; flex-direction: column; }
.list > .item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.list > .item:last-child { border-bottom: 0; }
.list > .item.click { cursor: pointer; } .list > .item.click:hover { background: var(--panel); }
.empty-state { text-align: center; padding: 56px 20px; color: var(--ink-2); }
.empty-state h3 { color: var(--ink); margin: 12px 0 4px; font-size: 16px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.prose p { margin: 0 0 10px; color: var(--ink-2); } .prose b { color: var(--ink); }
.prose ul { margin: 0 0 10px; padding-left: 20px; color: var(--ink-2); } .prose li { margin: 4px 0; }
.credits { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 12.5px; }
.credits dt { font-weight: 620; color: var(--ink); } .credits dd { margin: 0; color: var(--ink-2); }

/* partner logo in About: no frame. Its lettering is black, so at night it is inverted (the hue turn keeps the red red) */
.ec3 { display: inline-flex; text-decoration: none; flex: none; }
.ec3 img { display: block; }
[data-theme="dark"] .ec3 img { filter: invert(1) hue-rotate(180deg); }
/* responsible-use statement: one row per recommendation */
.rules { border-top: 1px solid var(--line); }
.rule { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.rule-ref { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; } .rule-ref b { font-weight: 620; color: var(--ink); }
.rule-body { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); line-height: 1.5; } .rule-asks { color: var(--ink); font-weight: 560; }
/* suggested reference in About */
.cite { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 14px; border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.cite .grow { user-select: all; }

/* ---------- tour and "what is this?" help: speech bubbles that point at an option ---------- */
.tour-block { position: fixed; inset: 0; z-index: 99; }
.spot { position: fixed; z-index: 100; pointer-events: none; border: 1.5px solid var(--accent); border-radius: var(--r); box-shadow: 0 0 0 9999px var(--overlay); transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease; }
.spot.soft { box-shadow: none; transition: none; }
.bubble { position: fixed; z-index: 101; width: 310px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; box-shadow: var(--shadow); padding: 14px 16px 12px; font-size: 13px; line-height: 1.5; color: var(--ink-2); animation: pop .14s ease; }
.bubble h3 { color: var(--ink); margin-bottom: 4px; }
.bubble::before { content: ""; position: absolute; width: 10px; height: 10px; background: var(--surface); border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); }
.bubble.bottom::before { top: -6px; left: var(--ax); transform: translateX(-50%) rotate(45deg); }
.bubble.top::before { bottom: -6px; left: var(--ax); transform: translateX(-50%) rotate(225deg); }
.bubble.right::before { left: -6px; top: var(--ay); transform: translateY(-50%) rotate(-45deg); }
.bubble.left::before { right: -6px; top: var(--ay); transform: translateY(-50%) rotate(135deg); }
.bubble.inside::before, .bubble:not(.bottom):not(.top):not(.left):not(.right)::before { display: none; }
body.pointing, body.pointing * { cursor: help !important; }
.point-hint { position: fixed; top: calc(var(--topbar-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 101; background: var(--invert); color: var(--invert-ink); padding: 7px 14px; border-radius: var(--r); font-size: 12.5px; box-shadow: var(--shadow); pointer-events: none; }

/* ---------- step-by-step screens: one question at a time, centred ---------- */
.stage { max-width: 760px; margin: 0 auto; padding: 8vh 32px 64px; text-align: center; animation: rise .24s ease; }
.stage.wide { max-width: 1040px; }
.stage-q { font-size: 38px; font-weight: 600; }
.stage-text { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; max-width: 640px; margin: 12px auto 0; }
.stage-q + *:not(.stage-text), .stage-text + * { margin-top: 30px; }
.stage .left { text-align: left; }
.stage-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 30px; }
.trail { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 26px; }
.trail a { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); text-decoration: none; max-width: 100%; }
.trail a b { font-weight: 560; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.trail a svg { opacity: 0; } .trail a:hover svg { opacity: 1; } .trail a:hover b { color: var(--ink); }
.recap { max-width: 620px; margin-left: auto; margin-right: auto; text-align: left; border-top: 1px solid var(--line); }
.recap-row { display: flex; align-items: baseline; gap: 16px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.recap-row > span { flex: 0 0 150px; color: var(--ink-3); font-size: 12.5px; }
.ask-input { width: 100%; font-size: 16px; padding: 12px 14px !important; text-align: left; }
/* a page washed from a corner with the colour of what it advises */
.page.tinted { background: radial-gradient(110% 80% at 0% 0%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 58%), var(--bg); transition: background .4s; }
/* how far a guided analysis has got: one segment per question, with its name under it */
.gprog { flex: none; display: flex; align-items: center; gap: 18px; padding: 9px 20px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.gprog-n { display: flex; align-items: baseline; gap: 5px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.gprog-n b { font-size: 17px; font-weight: 600; color: var(--ink); }
.gprog-steps { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; list-style: none; margin: 0; padding: 0; }
.gprog-steps li { min-width: 0; }
.gprog-steps li i { display: block; height: 3px; background: var(--panel-2); }
.gprog-steps li.done i { background: var(--ink); } .gprog-steps li.on i { background: var(--accent); }
.gprog-steps li span { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gprog-steps li span .ico { display: inline-block; vertical-align: -1px; margin-right: 4px; }
.gprog-steps li.done span { color: var(--ink-2); } .gprog-steps li.on span { color: var(--ink); font-weight: 600; }
.gprog-steps li.can { cursor: pointer; } .gprog-steps li.can:hover span { color: var(--ink); }
@media (max-width: 900px) { .gprog-steps li span { display: none; } .gprog-steps li.on span { display: block; } }
/* the notice that opens a guided analysis: one line and three short points */
.notice-lead { font-family: var(--serif); font-size: 21px; line-height: 1.3; color: var(--ink); margin: 2px 0 16px; }
.notice-points { display: grid; gap: 0; border-top: 1px solid var(--line); }
.notice-points > div { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.notice-points b { font-weight: 620; color: var(--ink); } .notice-points span { color: var(--ink-2); }
/* the purpose of the analysis, in full */
.pcard { max-width: 860px; margin-left: auto; margin-right: auto; border-top: 1px solid var(--line-strong); }
.pcard-goal { display: flex; align-items: center; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.pcard-goal h2 { font-size: 30px; margin: 2px 0 4px; } .pcard-goal p { font-size: 14px; line-height: 1.5; }
.pcard-art { flex: none; background: var(--panel); padding: 10px 12px; display: flex; }
.pcard-block { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pcard-topic { font-family: var(--serif); font-size: 21px; line-height: 1.35; margin-top: 4px; }
.pcard-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.pcard-figs > div { display: flex; gap: 10px; align-items: flex-start; } .pcard-figs svg { flex: none; background: var(--panel); }
.pcard-figs b { display: block; font-size: 13px; font-weight: 620; } .pcard-figs span { display: block; line-height: 1.4; }
@media (max-width: 860px) { .pcard-figs { grid-template-columns: 1fr; } }
.purpose-btn .ico { color: var(--accent); }
/* what is needed, in three columns joined by lines as they are answered */
.need { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 64px; text-align: left; max-width: 980px; margin-left: auto; margin-right: auto; }
.need-links { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.need-links path { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.need-col { display: flex; flex-direction: column; gap: 6px; transition: opacity .2s; }
.need-col > h3 { font-size: 17px; } .need-col > p { margin: -3px 0 6px; }
.need-col.wait { opacity: .38; } .need-col.wait .choice { cursor: default; }
.need-col .choice.tick { padding: 8px 12px; gap: 10px; } .need-col .choice.tick h3 { font-size: 13.5px; font-family: var(--font); font-weight: 560; letter-spacing: 0; }
@media (max-width: 900px) { .need { grid-template-columns: 1fr; gap: 22px; } .need-links { display: none; } }
/* the advice on sources: the priority one large and bare, the rest in a box */
.rec { max-width: 980px; margin-left: auto; margin-right: auto; }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.rec-names { font-size: 46px; line-height: 1.1; margin: 4px 0 8px; letter-spacing: -.01em; }
.rec-others { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.rec + .need { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .rec-grid { grid-template-columns: 1fr; gap: 18px; } .rec-names { font-size: 34px; } }
.aside-link { display: inline-block; margin-top: 22px; font-size: 12.5px; color: var(--ink-3); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* type of data of each column of the sheet, as in the header of a field in Tableau */
.sheet-head .ty { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; margin: 0 6px 0 -3px; padding: 0 2px; vertical-align: -4px; border-radius: 2px; font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: -.02em; color: var(--ink-3); position: relative; }
.sheet-head .ty:hover { background: var(--panel-2); color: var(--ink); }
.sheet-head .ty.bad { color: var(--warn); }
.sheet-head .ty.bad::after { content: ""; position: absolute; top: 1px; right: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.sheet-head .sheet-cell.num .ty { margin-left: 0; }

/* ---------- builder: field lists by dimension and level, and the empty figure ---------- */
.b-fields .f-sub { font-size: 11px; color: var(--ink-3); }
.dims { display: flex; flex-direction: column; }
.dimrow { display: flex; align-items: center; gap: 9px; padding: 5px 14px; border: 0; border-left: 2px solid transparent; background: transparent; font-size: 12.5px; color: var(--ink-2); cursor: pointer; text-align: left; }
.dimrow:hover { background: var(--panel-2); color: var(--ink); }
.dimrow.on { border-left-color: var(--ink); background: var(--panel-2); color: var(--ink); font-weight: 600; }
.dimrow.off { color: var(--ink-3); cursor: not-allowed; opacity: .6; }
.dimrow.off:hover { background: transparent; color: var(--ink-3); }
.dimrow .num { color: var(--ink-3); font-weight: 400; }
.chip .ty { display: inline-flex; align-items: center; justify-content: center; }
.blank { position: absolute; inset: 1px; display: flex; flex-direction: column; align-items: center; padding: 22px 20px; background: var(--surface); overflow: auto; }
.blank > :first-child { margin-top: auto; } .blank > :last-child { margin-bottom: auto; }
.blank-top { display: flex; align-items: center; gap: 18px; max-width: 640px; }
.blank-art { opacity: .28; filter: grayscale(1) contrast(1.15); pointer-events: none; flex: none; }
.blank h2 { font-size: 20px; } .blank p { color: var(--ink-2); max-width: 500px; margin: 5px 0 0; font-size: 13px; line-height: 1.5; }

/* ---------- summary: key figures and facets ---------- */
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 1px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.fig { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 13px; background: var(--surface); border: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); text-align: left; color: var(--ink); }
.fig > svg:first-child { color: var(--ink-3); margin-top: 5px; flex: none; }
.fig .v { font-size: 23px; font-weight: 660; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; }
.fig .k { font-size: 12.5px; font-weight: 560; margin-top: 1px; }
.fig .s { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.fig.click { cursor: pointer; } .fig.click:hover { background: var(--panel); }
.fig.click > svg:last-child { align-self: center; color: var(--ink-3); flex: none; }
.fig.warn > svg:first-child { color: var(--warn); }
.facets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.facet { border: 1px solid var(--line); background: var(--surface); padding: 12px 14px 12px; min-width: 0; }
.facet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--ink-3); }
.facet-head h3 { color: var(--ink); }
.facet-rows { display: flex; flex-direction: column; gap: 1px; }
/* enrichment: four options with the same room, and the one chosen below */
.enrich-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.enrich-tools .choice { gap: 8px; padding: 14px 14px 10px; }
.enrich-tools .choice h3 { font-size: 14.5px; line-height: 1.25; } .enrich-tools .choice p { flex: 1; font-size: 12.5px; }
.enrich-tools .choice > .row .ico { color: var(--ink-3); flex: none; } .enrich-tools .choice.sel > .row .ico { color: var(--accent); }
.enrich-foot { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); }
.enrich-foot .done { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.enrich-body > .card { grid-column: auto; }
@media (max-width: 1180px) { .enrich-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sheet-search { position: relative; display: flex; align-items: center; }
.sheet-search > .ico:first-child { position: absolute; left: 10px; color: var(--ink-3); pointer-events: none; }
.sheet-search .input { padding-left: 30px; padding-right: 26px; width: 250px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.sheet-search .select { border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; max-width: 170px; }
.sheet-search-x { position: absolute; left: 228px; display: inline-flex; color: var(--ink-3); cursor: pointer; } .sheet-search-x:hover { color: var(--ink); }
.fig.own { position: relative; } .fig-x { position: absolute; top: 4px; right: 4px; opacity: 0; } .fig.own:hover .fig-x, .fig-x:focus-visible { opacity: 1; }
.facet.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; border-style: dashed; border-color: var(--line-strong); background: transparent; color: var(--ink-3); font-size: 13px; cursor: pointer; }
.facet.add:hover { border-style: solid; border-color: var(--ink); color: var(--ink); }
.seg.mini button { padding: 2px 6px; display: inline-flex; align-items: center; } .seg.mini button.no { opacity: .35; cursor: not-allowed; }
.ring { display: flex; align-items: center; gap: 16px; } .ring svg { flex: none; }
.ring-n { font-family: var(--mono); font-size: 15px; font-weight: 600; fill: var(--ink); dominant-baseline: middle; }
.ring-key { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ring-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 4px; border: 0; background: transparent; font-size: 12.5px; text-align: left; color: var(--ink); cursor: pointer; }
.ring-row:disabled { cursor: default; color: var(--ink-3); } .ring-row:not(:disabled):hover { background: var(--panel); }
.ring-row i { flex: none; width: 10px; height: 10px; } .ring-row b { flex: none; white-space: nowrap; font-weight: 500; font-size: 11.5px; color: var(--ink-2); }
.ycols { display: flex; align-items: flex-end; gap: 2px; height: 112px; border-bottom: 1px solid var(--line-strong); }
.ycols button { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; padding: 0; border: 0; background: transparent; cursor: pointer; }
.ycols button i { display: block; width: 100%; background: color-mix(in srgb, var(--accent) 62%, var(--surface)); } .ycols button:hover i { background: var(--accent); }
.issue-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin-bottom: 18px; } .issue-sum a { color: var(--ink-2); text-decoration: none; } .issue-sum a:hover { color: var(--ink); } .issue-sum b { color: var(--ink); font-weight: 620; margin-left: 2px; }
.facet-row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 6px; border: 0; background: transparent; font-size: 12.5px; text-align: left; cursor: pointer; color: var(--ink); }
.facet-row i { position: absolute; left: 0; top: 2px; bottom: 2px; background: var(--panel-2); z-index: 0; }
.facet-row > *:not(i) { position: relative; z-index: 1; }
.facet-row b { font-weight: 500; font-size: 11.5px; color: var(--ink-2); }
.facet-row:hover i { background: var(--accent-soft); } .facet-row:hover { color: var(--ink); }

/* cleaning: lists to tick, long ones scroll inside their box */
.picklist { max-height: 340px; overflow: auto; border: 1px solid var(--line); }
.picklist table.t td { padding: 6px 10px; }
.picklist table.t td.r { white-space: nowrap; width: 1%; }

/* ---------- welcome: the eyes open with a blink, the smile is drawn, the mark settles and the rest fades in ---------- */
.logo { display: block; flex: none; }
.logo-intro .lg-eye { transform-box: fill-box; transform-origin: center; animation: eye-open .92s cubic-bezier(.2, .8, .2, 1) both; }
.logo-intro .lg-eye.b { animation-delay: .07s; }
/* the gap is longer than the path: with a gap as long as the dash, the next dash began right at the end of the path and showed as a speck under the small eye before the smile was drawn */
.logo-intro .lg-draw { stroke-dasharray: 1.05 3; stroke-dashoffset: 1.05; animation: smile-draw .62s cubic-bezier(.45, 0, .25, 1) 1s forwards; }
.logo-intro .lg-tip { opacity: 0; animation: fade-in .18s ease forwards; }
.logo-intro .lg-tip.a { animation-delay: .96s; } .logo-intro .lg-tip.b { animation-delay: 1.56s; }
@keyframes eye-open { 0% { transform: scale(0); } 36%, 60% { transform: scale(1); } 71% { transform: scale(1.04, .07); } 84%, 100% { transform: scale(1); } }
@keyframes smile-draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes mark-settle { from { transform: translateY(var(--iy, 0px)) scale(1.9); } to { transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.home.intro .hero .mark { animation: mark-settle .78s cubic-bezier(.5, 0, .2, 1) 1.9s both; }
.home.intro .hero h1 { animation: rise-in .9s ease 2.5s both; }
.home.intro .hero .ask-big { animation: rise-in .9s ease 2.75s both; }
.home.intro .grid { animation: rise-in 1.2s ease 3.05s both; }
.home.intro .foot { animation: fade-in 1s ease 3.6s both; }
.foot.credits-line { margin-top: 0; padding-top: 10px; align-items: center; } .foot.credits-line a { color: inherit; } .foot.credits-line a:hover { color: var(--ink); }
.foot .bsf { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--ink-2); }
.foot .pipe { margin: 0 12px; }

/* ---------- how to export from each database: a path of numbered boxes ---------- */
.how { display: flex; flex-direction: column; gap: 14px; }
.how-db { border: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.how-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.how-steps { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.how-step { display: flex; align-items: baseline; gap: 9px; padding: 8px 12px 9px 10px; background: var(--panel); font-size: 12.5px; line-height: 1.45; max-width: 290px; }
.how-step > .num { color: var(--ink-3); font-size: 11px; }
.how-pair { display: flex; align-items: stretch; gap: 8px; }
.how-arrow { align-self: center; color: var(--ink-3); flex: none; }
/* the words of a button or an option, as they read on the other website */
.how-ui { display: inline-block; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 6px; border-radius: 2px; font-weight: 600; white-space: nowrap; }

/* ---------- terms of a search: one box per term, and the query ready to copy ---------- */
.term { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); padding: 2px 5px 2px 8px; border-radius: 2px; font-size: 12.5px; white-space: nowrap; }
.term.lead { font-weight: 600; }
.term a { display: inline-flex; color: var(--ink-3); } .term a:hover { color: var(--ink); }
.term-add { border: 1px dashed var(--line-strong); background: transparent; padding: 2px 8px; border-radius: 2px; font-size: 12.5px; height: 25px; min-width: 190px; outline: none; }
.term-add:focus { border-style: solid; border-color: var(--accent); }
.concept { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.concept > .num { color: var(--ink-3); font-size: 11px; width: 18px; flex: none; }
.queries { border-top: 1px solid var(--line); }
.query { display: grid; grid-template-columns: 200px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.query code { font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--ink); word-break: break-word; user-select: all; }

/* a block to tick: several of them can be chosen */
.choice.tick { flex-direction: row; align-items: center; gap: 12px; padding: 11px 14px; }
.choice.tick .ico { flex: none; color: var(--ink-3); } .choice.tick.sel .ico { color: var(--ink); }

/* what Bib-a-Viz proposes for an empty figure: offered under a rule, never placed on its own */
.suggest { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); max-width: 560px; text-align: center; }
.menu .badge.box { font-size: 10.5px; padding: 0 5px; margin-right: 4px; }

/* cleaning: the tools in groups, by what each does to the dataset */
.tool-group { margin-bottom: 26px; }
.tool-group-head { display: grid; grid-template-columns: 170px 1fr; gap: 4px 18px; align-items: baseline; margin-bottom: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tool-group-head h3 { font-family: var(--serif); font-size: 18px; font-weight: 620; }
.tool-group-head p { color: var(--ink-2); font-size: 13px; max-width: 760px; }
/* option panels of the builder: a row of choices never runs out of the panel */
.b-opts .acc > div > .seg { flex-wrap: wrap; max-width: 100%; }

/* About: one folded section per matter */
.sects { border-top: 1px solid var(--line); }
.acc.big > button { padding: 13px 4px; font-size: 14.5px; font-weight: 640; }
.acc.big > div { padding: 2px 4px 18px 28px; gap: 0; }
.acc.big .prose p:last-child { margin-bottom: 0; }

/* ---------- builder: zones beside the figure, and the list of fields in groups ---------- */
.b-plot { flex: 1 1 auto; min-height: 380px; display: flex; gap: 8px; }
.b-left { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
/* a zone along the vertical axis reads upwards, as the title of that axis would */
.shelf.upright { writing-mode: vertical-rl; transform: rotate(180deg); min-height: 0; min-width: 32px; max-height: 340px; padding: 10px 4px 8px; }
.shelf.upright .val, .shelf.upright .ellipsis { max-height: 190px; }
.shelf.upright .clear, .shelf.upright > svg { margin-left: 0 !important; margin-top: auto; }
.shelf.upright.fixed { padding: 10px 4px; }
.b-fields .f-what { font-size: 11.5px; line-height: 1.4; color: var(--ink-2); }
.b-fields .f-what.wait { color: var(--ink-3); }
.menu .menu-sub { padding: 6px 9px 2px 9px; font-size: 11.5px; color: var(--ink-3); }
.menu button.in { padding-left: 20px; }
.shelf.upright > svg { transform: rotate(180deg); }

/* ---------- builder: first the level, then each indicator to its space ---------- */
/* the list at the left: the level, the indicators by dimension, and what breaks the figure down */
.b-fields { padding: 12px 0 14px; }
.lsteps-intro { padding: 0 14px 10px; font-size: 11.5px; line-height: 1.4; color: var(--ink-3); }
.lstep { border-top: 1px solid var(--line); } .lstep:last-child { border-bottom: 1px solid var(--line); }
.lstep-head { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 12px 9px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.lstep-head:hover { background: var(--panel-2); }
.lstep-head.locked { cursor: not-allowed; opacity: .42; } .lstep-head.locked:hover { background: transparent; }
.lname { display: block; font-size: 12.5px; font-weight: 620; }
.lval { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 1px; }
.lstep.active { box-shadow: inset 2px 0 0 var(--accent); }
.lstep-body { padding: 0 0 10px; }
.b-fields .f-what { padding: 0 14px 8px 14px; }
.b-fields .f-sub { padding: 7px 14px 2px 14px; }
.b-fields .f-zone { padding: 9px 14px 3px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.chip.on { background: var(--panel-2); font-weight: 600; }
.chip .sug { font-size: 10.5px; padding: 0 5px; margin-left: auto; } .chip .sug + .cov { margin-left: 0; }
.lgiven { padding: 1px 14px 4px; font-size: 12.5px; } .lgiven b { display: block; font-weight: 600; } .lgiven span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.dimrow > svg:last-child { color: var(--ink-3); flex: none; }
.dimrow .used { width: 6px; height: 6px; background: var(--accent); flex: none; }
.dim-items { padding: 2px 0 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dim-items .chip { padding-left: 37px; } .b-fields .dim-items .f-sub { padding-left: 37px; }
/* the levels, as one stack of slabs: the largest gathers most, the smallest is the finest */
.b-figure { position: relative; flex: 1 1 auto; display: flex; min-width: 0; min-height: 380px; }
.lstack-box { width: 100%; display: flex; flex-direction: column; align-items: center; }
/* the tabs that change the question the stack answers: who, where it is published, about what */
.ptabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.ptab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 560; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.ptab:hover { border-color: var(--ink); color: var(--ink); }
.ptab > svg { flex: none; } .ptab .num { font-size: 11px; font-weight: 400; opacity: .65; }
.ptab.on { background: var(--invert); border-color: var(--invert); color: var(--invert-ink); } .ptab.none { color: var(--ink-3); }
.ptab-what { max-width: 560px; margin-top: 10px; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); text-align: center; }
/* the slabs, seen in perspective, each tied by a line to its name */
.lstack { display: block; max-width: 100%; height: auto; margin-top: 16px; overflow: visible; }
.lv { cursor: pointer; } .lv-hit { fill: transparent; stroke: none; }
.lv-slab { transition: transform .22s cubic-bezier(.3, .7, .2, 1); }
.lv path { stroke: var(--ink-3); stroke-width: 1; stroke-linejoin: round; transition: fill .15s, stroke .15s; }
.lv .top { fill: color-mix(in srgb, var(--ink) var(--tone, 8%), var(--surface)); }
.lv .side { fill: color-mix(in srgb, var(--ink) calc(var(--tone, 8%) + 12%), var(--surface)); } .lv .side.b { fill: color-mix(in srgb, var(--ink) calc(var(--tone, 8%) + 24%), var(--surface)); }
.lv .lead { fill: none; stroke: var(--ink-3); }
.lv-name { font-size: 13.5px; font-weight: 620; fill: var(--ink); transition: fill .15s; } .lv-sub { font-size: 11px; fill: var(--ink-3); }
.lv:not(.off):hover .lv-slab { transform: translateY(-5px); }
.lv:not(.off):hover path { stroke: var(--accent); } .lv:not(.off):hover .top { fill: var(--accent); } .lv:not(.off):hover .lv-name { fill: var(--accent); }
.lv:not(.off):hover .side { fill: color-mix(in srgb, var(--accent) 62%, var(--bg)); } .lv:not(.off):hover .side.b { fill: color-mix(in srgb, var(--accent) 78%, #000); }
.lv.on path { stroke: var(--invert); } .lv.on .top { fill: var(--invert); } .lv.on .lead { stroke: var(--ink-3); }
.lv.on .side { fill: color-mix(in srgb, var(--invert) 55%, var(--bg)); } .lv.on .side.b { fill: color-mix(in srgb, var(--invert) 78%, var(--bg)); }
/* each level in its own colour, with its icon lying on the slab */
.lv { --lvc: oklch(.62 .13 var(--lvh, 0)); --lvd: oklch(.5 .12 var(--lvh, 0)); --lve: oklch(.42 .11 var(--lvh, 0)); }
[data-theme="dark"] .lv { --lvc: oklch(.66 .13 var(--lvh, 0)); --lvd: oklch(.5 .12 var(--lvh, 0)); --lve: oklch(.4 .1 var(--lvh, 0)); }
.lv.hued .top { fill: color-mix(in oklch, var(--lvc) 78%, var(--surface)); } .lv.hued .side { fill: var(--lvd); } .lv.hued .side.b { fill: var(--lve); }
.lv.hued path { stroke: color-mix(in oklch, var(--lve) 70%, var(--ink)); }
.lv .lv-ico { fill: none; stroke: var(--surface); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.lv .lv-ico.filled { fill: var(--surface); stroke: none; }
.lv:not(.hued) .lv-ico { stroke: var(--ink-2); } .lv.on:not(.hued) .lv-ico { stroke: var(--invert-ink); }
.lv-dot { fill: var(--ink-3); stroke: none; } .lv.hued .lv-dot { fill: var(--lvc); }
.lv.hued:not(.off):hover .top { fill: var(--lvc); } .lv.hued:not(.off):hover .side { fill: var(--lvd); } .lv.hued:not(.off):hover .side.b { fill: var(--lve); }
.lv.hued:not(.off):hover path:not(.lv-ico) { stroke: var(--ink); } .lv.hued:not(.off):hover .lv-name { fill: var(--ink); }
.lv.hued.on .top { fill: var(--lvc); } .lv.hued.on .side { fill: var(--lvd); } .lv.hued.on .side.b { fill: var(--lve); } .lv.hued.on path:not(.lv-ico) { stroke: var(--ink); stroke-width: 1.8; }
.lv.off .lv-ico { stroke: var(--line-strong); } .lv.off .lv-dot { fill: var(--line-strong); }
.lv.off { cursor: not-allowed; } .lv.off path { stroke: var(--line-strong); stroke-dasharray: 3 3; } .lv.off .top { fill: var(--surface); } .lv.off .side, .lv.off .side.b { fill: var(--panel); } .lv.off .lv-name { fill: var(--ink-3); font-weight: 400; }
/* the spaces of a figure that is being built, each where the chart draws what it holds */
.b-top { margin-bottom: 10px; gap: 8px; align-items: stretch; } .b-bottom { margin-top: 10px; justify-content: center; gap: 8px; }
.shelf.space { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-width: 170px; min-height: 56px; padding: 8px 14px; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--ink-3); }
.shelf.space .lab { font-size: 13.5px; font-weight: 640; color: var(--ink-2); } .shelf.space .waits { font-size: 11.5px; line-height: 1.3; }
.shelf.space > svg { display: none; }
.shelf.space.need { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); } .shelf.space.need .lab { color: var(--accent); }
.shelf.space:hover { border-style: solid; border-color: var(--ink); }
.shelf.space.upright { flex: 1 1 auto; min-width: 66px; min-height: 250px; max-height: none; padding: 14px 8px; align-items: center; }
.shelf.space.upright .waits { max-height: 220px; }
.b-bottom .shelf.space { flex: 1 1 0; min-width: 240px; align-items: center; }
.b-left + .b-figure { min-width: 0; } .b-plot:has(.b-left) + .b-bottom:has(.space) { padding-left: 74px; }
/* in a table the rows and the columns are set side by side, above it */
.b-top .shelf.cols { flex: 1 1 320px; }
.shelf.space.cols { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; flex: 1 1 auto; }
.colchip.add { white-space: nowrap; }
.shelf.hint { border-style: dashed; border-color: var(--accent); background: var(--accent-soft); }
.shelf.deny { opacity: .32; }
.blank.waiting { justify-content: center; text-align: center; }
.blank.waiting .blank-art { margin: auto auto 6px; opacity: .2; }
/* what the chart sets by itself on an axis: said plainly, with a lock, and never as a box to fill */
.b-given { display: inline-flex; align-items: center; gap: 7px; padding: 6px 4px; font-size: 12px; color: var(--ink-3); cursor: default; }
.b-given b { font-weight: 600; color: var(--ink-2); } .b-given .ico { flex: none; }
.b-given.upright { writing-mode: vertical-rl; transform: rotate(180deg); padding: 4px 6px; }
/* under a drawn figure: swapping its axes and the variables it can still take */
.b-under { margin-top: 8px; gap: 8px; align-items: center; }
.btn.dashed { border-style: dashed; color: var(--ink-2); } .btn.dashed:hover { border-style: solid; color: var(--ink); }
/* the titles the figure writes on its axes are the control of what they show */
.b-figure.drawn [data-slot] { cursor: pointer; }
.b-figure.drawn [data-slot]:hover { fill: var(--accent); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.b-figure.drawn g.legend[style*="grab"]:active { cursor: grabbing; }
/* a level, as its icon in its own colour */
.lvmark { display: inline-flex; flex: none; --lvc: oklch(.58 .14 var(--lvh)); color: var(--lvc); }
[data-theme="dark"] .lvmark { --lvc: oklch(.76 .13 var(--lvh)); }
.lvmark.plain { color: var(--ink-3); }
.shelf .lvmark { margin-right: -2px; }
.blank.waiting p { margin-left: auto; margin-right: auto; }
/* the columns of a table, one piece each */
.shelf.cols { flex-wrap: wrap; cursor: default; gap: 6px; padding-top: 5px; padding-bottom: 5px; } .shelf.cols:hover { border-color: var(--line-strong); }
.colchip { display: inline-flex; align-items: center; gap: 5px; max-width: 190px; padding: 2px 7px; border: 1px solid var(--line-strong); background: var(--panel); font-size: 12px; font-weight: 560; color: var(--ink); cursor: pointer; }
.colchip:hover { border-color: var(--ink); } .colchip.over { border-color: var(--accent); background: var(--accent-soft); }
.colchip > svg { flex: none; color: var(--ink-3); }
.colchip.add { border-style: dashed; background: transparent; font-weight: 400; color: var(--ink-3); }
.btn.dim { opacity: .45; }
/* where a field can be dropped on a finished figure */
.drop-layer { position: absolute; inset: 1px; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; background: color-mix(in srgb, var(--surface) 90%, transparent); font-weight: 560; text-align: center; }
.drop-zones { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.drop-box { min-width: 150px; padding: 16px 18px; border: 1.5px dashed var(--accent); background: var(--surface); }
.drop-box b { display: block; font-size: 13.5px; } .drop-box span { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.drop-box.over { border-style: solid; background: var(--accent-soft); }
/* what is behind a link of a network */
.link-panel { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 4; max-width: 820px; max-height: 46%; margin: 0 auto; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: pop .14s ease; }
.lp-head { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.lp-ends { font-size: 13.5px; } .lp-ends b { font-weight: 640; }
.lp-list { overflow: auto; padding: 0 14px 6px; }
.lp-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); } .lp-row:last-child { border-bottom: 0; }
.lp-title { font-size: 12.5px; font-weight: 560; line-height: 1.35; } .lp-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.lp-tag { flex: none; width: 46px; font-size: 11px; color: var(--ink-3); } .lp-doi { flex: none; color: var(--ink-3); display: inline-flex; } .lp-doi:hover { color: var(--ink); }

/* ---------- learning: the row of the start screen, the manual and the walk through the example ---------- */
.learn { justify-content: center; align-items: center; gap: 8px 26px; margin-top: 26px; font-size: 13px; color: var(--ink-2); }
.learn a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); cursor: pointer; padding: 2px 0; border-bottom: 1px solid transparent; }
.learn a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.home.intro .learn { animation: fade-in 1s ease 3.4s both; }

.manual { flex: 1 1 auto; min-height: 0; display: flex; }
.man-nav { flex: 0 0 252px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 10px 0 12px; overflow: auto; }
.man-nav h4 { padding: 14px 16px 8px; }
.man-nav .man-back { align-self: flex-start; margin: 0 8px; color: var(--ink-2); }
.man-nav .nav { line-height: 1.3; }
.man-links { display: flex; flex-direction: column; gap: 7px; padding: 14px 16px 2px; font-size: 12px; }
.man-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); text-decoration: none; cursor: pointer; }
.man-links a:hover { color: var(--ink); }
.man-page { flex: 1 1 auto; min-width: 0; overflow: auto; background: var(--bg); padding: 0 40px; }
.man-body, .man-foot { max-width: 760px; margin: 0 auto; }
.man-body { padding: 44px 0 10px; min-height: 60vh; font-size: 15px; line-height: 1.68; color: var(--ink); }
.man-body h1 { font-size: 34px; margin: 0 0 16px; }
.man-body h1 + p { font-size: 17px; line-height: 1.6; color: var(--ink-2); margin-bottom: 24px; }
.man-body h2 { font-size: 22px; margin: 40px 0 10px; }
.man-body h3 { font-size: 15.5px; margin: 26px 0 6px; }
.man-body p { margin: 0 0 14px; }
.man-body ul, .man-body ol { margin: 0 0 16px; padding-left: 24px; }
.man-body li { margin: 0 0 6px; }
.man-body b { font-weight: 640; }
.man-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.man-body code { font-family: var(--mono); font-size: .88em; background: var(--panel); border: 1px solid var(--line); padding: 1px 5px; border-radius: 2px; }
.man-body pre { margin: 0 0 16px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); overflow: auto; font-size: 12.5px; line-height: 1.55; }
.man-body pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.man-body blockquote { position: relative; margin: 0 0 18px; padding: 12px 16px 12px 20px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.man-body blockquote::before { content: ''; position: absolute; top: -1px; left: -1px; width: 0; height: 0; border-top: 12px solid var(--ink-3); border-right: 12px solid transparent; }
.man-body blockquote p:last-child { margin-bottom: 0; }
.man-body hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.md-table { overflow-x: auto; margin: 0 0 18px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: 13.5px; line-height: 1.5; }
.md-table th { text-align: left; font-weight: 620; color: var(--ink-2); border-bottom: 1px solid var(--line-strong); padding: 7px 14px 7px 0; vertical-align: bottom; }
.md-table td { border-bottom: 1px solid var(--line); padding: 8px 14px 8px 0; vertical-align: top; }
.man-fig { margin: 22px 0 26px; }
.man-fig img, .man-fig video { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--panel); }
.man-fig figcaption { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
:root[data-theme="dark"] .man-fig img, :root[data-theme="dark"] .man-fig video { filter: brightness(.86); }
.man-example { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 20px; padding: 14px 16px 14px 20px; border: 1px solid var(--line); background: var(--surface); line-height: 1.5; }
.man-example::before { content: ''; position: absolute; top: -1px; left: -1px; width: 0; height: 0; border-top: 12px solid var(--accent); border-right: 12px solid transparent; }
.man-example .btn { flex: none; }
.man-videos { list-style: none; padding-left: 0 !important; }
.man-videos a { display: inline-flex; align-items: center; gap: 7px; }
.man-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 34px; padding: 22px 0 64px; border-top: 1px solid var(--line); }
.man-step { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; border: 0; background: none; color: var(--ink); font-size: 14.5px; text-align: left; cursor: pointer; }
.man-step.next { text-align: right; align-items: flex-end; }
.man-step:hover b { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .man-nav { flex-basis: 204px; } .man-page { padding: 0 22px; } }

.walk { position: fixed; right: 16px; bottom: 74px; z-index: 45; width: 344px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); padding: 8px 14px 12px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.walk::before { content: ''; position: absolute; top: -1px; left: -1px; width: 0; height: 0; border-top: 12px solid var(--accent); border-right: 12px solid transparent; }
.walk-head { display: flex; align-items: center; gap: 4px; }
.walk-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 620; color: var(--ink-3); }
.walk-bar { height: 2px; background: var(--line); margin: 6px 0 10px; } .walk-bar i { display: block; height: 100%; background: var(--accent); transition: width .2s ease; }
.walk h3 { color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.walk-min { display: inline-flex; align-items: center; gap: 7px; width: auto; height: 30px; padding: 0 12px; color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.walk-min:hover { color: var(--ink); } .walk-min .num { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.board-md blockquote p:last-child { margin-bottom: 0; }
