:root {
  /* Colors from the Epsilon Press journals site: navy headings and bands, blue links, logo orange */
  --page: #ffffff;
  --paper: #f4f6fa;       /* panels, inputs, detail rows */
  --sheet: #ffffff;
  --ink: #1f2b3c;         /* text */
  --head: #163d79;        /* headings */
  --muted: #5c6a7e;
  --rule: #dde3ec;
  --teal: #436ca8;        /* links and buttons */
  --teal-soft: #e8eef7;
  --ochre: #a84a00;       /* logo orange, darkened for text contrast */
  --bar: #7fa3d1;
  --focus: #f28c28;
  --navy-a: #0b2147;
  --navy-b: #163d79;
  --orange: #cf5600;
  --orange-2: #f28c28;
  --orange-label: #f6a35b;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0d1522; --paper: #142033; --sheet: #142033; --ink: #e6ecf5; --head: #cfe0f7; --muted: #9aa8bc; --rule: #26354d;
    --teal: #8cb4e6; --teal-soft: #1a2f4d; --ochre: #f29a2e; --bar: #3d75a6;
  }
}
:root[data-theme="dark"] {
  --page: #0d1522; --paper: #142033; --sheet: #142033; --ink: #e6ecf5; --head: #cfe0f7; --muted: #9aa8bc; --rule: #26354d;
  --teal: #8cb4e6; --teal-soft: #1a2f4d; --ochre: #f29a2e; --bar: #3d75a6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.5 var(--sans); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
a { color: var(--teal); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

/* Masthead */
.masthead { padding: 44px 0 26px; border-bottom: 1px solid var(--rule); }
.masthead h1 { font: 700 clamp(34px, 5vw, 52px)/1.05 var(--serif); letter-spacing: -0.015em; margin: 0 0 10px; }
.lede { font: 400 19px/1.45 var(--serif); margin: 0 0 14px; max-width: 46ch; }
.stats { color: var(--muted); margin: 0; font-size: 14px; }
.demo-banner { background: #f6a54a; color: #2a1500; font-weight: 500; padding: 9px 0; font-size: 14px; }

/* Filters */
.filters { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; margin: 24px 0 18px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row + .row { margin-top: 12px; }
.filters label { display: flex; flex-direction: column; gap: 4px; min-width: 170px; flex: 1 1 170px; }
.filters label.grow { flex: 3 1 260px; }
.filters .inst-filter { display: flex; flex-direction: column; gap: 6px; min-width: 170px; flex: 3 1 260px; }
.filters .inst-filter > span { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: -2px; }
.filters label.narrow { flex: 0 1 110px; min-width: 100px; }
.filters label > span { font-size: 13px; color: var(--muted); font-weight: 500; }
.primary label > span { color: var(--ink); }
input, select, button { font: inherit; color: inherit; }
input[type="search"], input[type="number"], select {
  height: 40px; padding: 0 10px; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; width: 100%;
}
.primary input, .primary select { height: 46px; font-size: 16px; background-color: var(--sheet); border-color: #aebbd0; }
select { appearance: none; padding-right: 30px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.tools { align-items: center; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; flex: 0 1 auto !important; min-width: 0 !important; font-size: 14px; color: var(--muted); }
.check input { width: 16px; height: 16px; accent-color: var(--teal); }
.spacer { flex: 1; }
button { height: 38px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--teal); background: var(--teal); color: var(--sheet); font-weight: 500; cursor: pointer; }
button.ghost { background: transparent; color: var(--teal); }
button:disabled { opacity: .5; cursor: default; }

.summary { color: var(--muted); margin: 0 0 8px; min-height: 1.5em; }

/* Results */
.results { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.results th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.results td { padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
/* the whole row opens the author page (script in layout.php). No stretched-link overlay: browsers that do not let a
   table row hold positioned content (older Safari) spread it over the page, so buttons such as Download CSV opened an author. */
.results tbody tr.person { cursor: pointer; }
.results tbody tr.person:hover { background: color-mix(in srgb, var(--teal-soft) 45%, transparent); }
.results tbody tr.person[aria-expanded="true"] { background: var(--teal-soft); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.c-rank { width: 72px; }
.rank { font: 600 26px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--muted); }
.rank.top { color: var(--ochre); }
.who .name { font: 600 17px/1.25 var(--serif); color: var(--ink); text-decoration: none; }
.who .inst { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.flagged-tag { font-size: 12px; color: var(--ochre); margin-left: 6px; }
.country { white-space: nowrap; }
.flag { margin-right: 6px; }
.chip { display: inline-block; background: var(--teal-soft); color: var(--teal); padding: 2px 9px; border-radius: 99px; font-size: 13px; white-space: nowrap; }
.cites { display: grid; justify-items: end; gap: 4px; min-width: 120px; }
.cites strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.cites .bar { height: 4px; background: var(--bar); border-radius: 2px; justify-self: end; }
.missing { color: var(--muted); }
.empty td { text-align: center; color: var(--muted); padding: 40px 16px; }

/* Detail row */
.detail td { background: var(--paper); padding: 0; }
.detail-body { padding: 18px 20px 22px; }
.detail-head { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: baseline; margin-bottom: 12px; }
.detail-head .links a { margin-right: 14px; }
.facts { color: var(--muted); font-size: 14px; margin: 0 0 12px; max-width: 80ch; }
.fieldbars { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.works { width: 100%; border-collapse: collapse; font-size: 14px; }
.works th { font-weight: 500; color: var(--muted); font-size: 12.5px; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.works td { padding: 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.works td.title a { color: var(--ink); text-decoration: none; }
.works td.title a:hover { text-decoration: underline; }
.works .venue { color: var(--muted); font-size: 13px; }
.detail .more { margin-top: 12px; }
.hint { font-size: 12px; color: var(--muted); }
.works .via { font-size: 12px; color: var(--ochre); margin-top: 2px; }
.metrics { border-collapse: collapse; font-size: 14px; margin: 0 0 14px; min-width: min(100%, 520px); background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; }
.metrics th, .metrics td { padding: 6px 12px; border-bottom: 1px solid var(--rule); text-align: left; }
.metrics thead th { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.metrics td.num, .metrics th.num { text-align: right; font-variant-numeric: tabular-nums; }
.metrics tbody th { font-weight: 500; }
.metrics th, .metrics td { background: var(--sheet); }
.metrics tr.current > * { background: var(--teal-soft); }
.metrics tbody tr:last-child > * { border-bottom: 0; }
.works th.num { text-align: right; }
.works .sortlink { color: inherit; text-decoration: none; white-space: nowrap; }
.works .sortlink:hover { color: var(--teal); text-decoration: underline; }
.works .sortlink.on { color: var(--head); font-weight: 600; }
.works .sort-ind { display: inline-block; min-width: 1em; font-size: 10px; margin-left: 2px; }
.works td.sorted { font-weight: 600; }
.results tr.person[aria-expanded="true"] .chip { background: var(--sheet); }
button { white-space: nowrap; }

/* Pager */
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 18px 0 8px; }
.pager button { min-width: 40px; padding: 0 12px; background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.pager .current { background: var(--teal); color: var(--sheet); border-color: var(--teal); }
.pager .gap { color: var(--muted); padding: 0 4px; }

.method { margin: 40px 0 60px; padding-top: 22px; border-top: 1px solid var(--rule); max-width: 74ch; }
.method h2 { font: 600 20px/1.3 var(--serif); margin: 0 0 8px; }
.method p { color: var(--muted); margin: 0 0 10px; }

.loading tbody { opacity: .45; transition: opacity .15s; }

/* Small screens: rows become stacked entries */
@media (max-width: 760px) {
  .masthead { padding: 28px 0 18px; }
  .lede { font-size: 17px; }
  .filters { padding: 12px; }
  .filters label, .filters label.grow, .filters .inst-filter { flex: 1 1 100%; }
  .secondary label:not(.grow) { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .tools button { flex: 1; }
  .results thead { display: none; }
  .results, .results tbody { display: block; }
  .results tr.person { display: grid; grid-template-columns: 52px 1fr auto; grid-template-areas: "rank who cites" "rank meta meta"; padding: 12px 12px; border-bottom: 1px solid var(--rule); gap: 2px 10px; }
  .results tr.person td { border: 0; padding: 0; }
  .results td.c-rank { grid-area: rank; }
  .results td.who { grid-area: who; }
  .results td.c-cites { grid-area: cites; }
  .results tr.person .meta-line { grid-area: meta; }
  .results td.c-country, .results td.c-field, .results td.c-papers, .results td.c-h, .results td.c-alt { display: none; }
  .meta-line { display: block !important; color: var(--muted); font-size: 13px; }
  .rank { font-size: 22px; }
  .cites { min-width: 0; }
  .detail { display: block; }
  .detail td { display: block; }
  .works th:nth-child(2), .works td:nth-child(2) { display: none; }
}
@media (min-width: 761px) { .meta-line { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.checks { display: flex; flex-direction: column; gap: 6px; }

/* Top X% */
.c-rank .pct { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.thresholds { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0 0 12px; }
.th-label { flex: 1 1 100%; font-size: 13px; color: var(--muted); }
.thresholds .th { text-decoration: none;  height: auto; display: grid; gap: 1px; text-align: left; padding: 7px 12px; background: var(--sheet);
  color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; font-weight: 400; }
.thresholds .th strong { font-size: 13px; color: var(--teal); }
.thresholds .th span { font-size: 13px; font-variant-numeric: tabular-nums; }
.thresholds .th .th-n { color: var(--muted); font-size: 12px; }
.thresholds .th.on { border-color: var(--teal); background: var(--teal-soft); box-shadow: inset 0 0 0 1px var(--teal); }
@media (max-width: 760px) { .thresholds .th { text-decoration: none;  flex: 1 1 calc(33% - 8px); } }

/* ---- Server-rendered pages: links styled as buttons, forms, notices ---- */
a.button, .button { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px;
  border-radius: 6px; border: 1px solid var(--teal); background: var(--teal); color: var(--sheet); font-weight: 500;
  text-decoration: none; white-space: nowrap; }
a.button.ghost, button.ghost { background: transparent; color: var(--teal); }
.pager a.button { min-width: 40px; background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.pager a.button.current { background: var(--teal); color: var(--sheet); border-color: var(--teal); }
button.small, .button.small { height: 30px; padding: 0 10px; font-size: 13px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.page-title { font: 700 clamp(28px, 4vw, 40px)/1.1 var(--serif); margin: 26px 0 8px; letter-spacing: -0.01em; }
.narrow-page { max-width: 640px; padding-bottom: 40px; }
.crumbs { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash { padding: 10px 0; font-weight: 500; }
.flash-ok { background: var(--teal-soft); color: var(--ink); }
.flash-bad { background: #f9dcd6; color: #5a1505; }
.notice { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); margin: 14px 0; }
.notice p { margin: 4px 0; }
.notice-ok { border-color: #8fc7a2; background: #e6f4ea; color: #12381f; }
.notice-bad { border-color: #e2a194; background: #fbe9e5; color: #5a1505; }
.notice-warn { border-color: #f0c27a; background: #fff3dd; color: #4a2c00; }
@media (prefers-color-scheme: dark) {
  .notice-ok { background: #16301f; color: #cdebd6; border-color: #2c6a43; }
  .notice-bad { background: #3a1a14; color: #f3d0c8; border-color: #7a3527; }
  .notice-warn { background: #3a2a10; color: #f4dfb5; border-color: #7c5a1c; }
  .flash-bad { background: #3a1a14; color: #f3d0c8; }
}
.stack-form { display: grid; gap: 14px; margin: 18px 0; }
.stack-form label, .grid-form label, .inline-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.stack-form label > span, .grid-form label > span, .inline-form label > span { color: var(--muted); font-size: 13px; font-weight: 500; }
.stack-form input, .grid-form input, .grid-form select, .grid-form textarea, .inline-form input, .inline-form select {
  font: inherit; padding: 9px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink); width: 100%; }
.grid-form textarea { resize: vertical; }
.stack-form .check, .grid-form .check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.stack-form .check input, .grid-form .check input { width: auto; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 12px; }
.grid-form .span2 { grid-column: 1 / -1; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .grow { flex: 1 1 240px; }
@media (max-width: 640px) { .grid-form { grid-template-columns: 1fr; } }

/* Profiles */
.profile { padding-bottom: 40px; }
.profile-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: flex-end;
  border-bottom: 1px solid var(--rule); padding-bottom: 18px; margin-bottom: 18px; }
.profile-sub { margin: 4px 0; color: var(--muted); }
.profile-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; font-size: 14px; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-facts div { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 14px; min-width: 110px; }
.profile-facts strong { display: block; font: 600 22px/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.profile-facts span { font-size: 12.5px; color: var(--muted); }
.eid { font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ink); }
.chip-sub { background: transparent; border: 1px solid var(--bar); }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; margin: 0 0 16px; }
.panel h2 { font: 600 20px/1.3 var(--serif); margin: 0 0 10px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.ranks { width: 100%; border-collapse: collapse; }
.ranks th, .ranks td { padding: 9px 10px; border-bottom: 1px solid var(--rule); text-align: left; }
.ranks thead th { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.ranks td.num, .ranks th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ranks tbody th { font-weight: 500; }
.ranks tr.small-group { color: var(--muted); }
.ranks tr.small-group a { color: var(--muted); }
.ranks td strong { color: var(--ochre); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 16px; font-size: 14px; }
.entries { list-style: none; padding: 0; margin: 0 0 8px; }
.entries li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.entries li > div { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.danger summary { cursor: pointer; color: #a3341c; margin-top: 16px; }
.danger-btn { background: #a3341c; border-color: #a3341c; }
.certificate-box p { max-width: 70ch; }
.fieldbars { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }

/* Certificate (screen + print) */
.cert-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0; }
.certificate { background: linear-gradient(135deg, #eaf4fd 0%, #ffffff 42%, #ffffff 58%, #e6f1fb 100%);
  color: #14213a; border: 1px solid #c9d3e3; padding: 14px; margin: 0 auto 30px; max-width: 1050px;
  box-shadow: 0 1px 0 #e4e8ef, 0 12px 32px -18px rgba(7, 52, 117, .35);
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cert-inner { position: relative; isolation: isolate; border: 3px double #163d79; outline: 1px solid #7fa3d1; outline-offset: -9px;
  padding: 34px 46px 26px; text-align: center;
  background: url("brand/certificate-background.svg") center / 100% 100% no-repeat; }
.cert-inner::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("brand/epsilon-logo-256.png") center 46% / 330px auto no-repeat; opacity: .045; filter: grayscale(1); }
.cert-photo { position: absolute; top: 30px; right: 40px; width: 112px; height: 112px; object-fit: cover; border-radius: 10px;
  border: 3px solid #fff; box-shadow: 0 0 0 1px #7fa3d1, 0 4px 14px -6px rgba(7, 52, 117, .45); background: #fff; }
.photo-invite { border-color: #9cc6ea; background: #eef6fd; }
/* "Is this you?" banner above a certificate */
.account-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 0 auto 18px; max-width: 1050px;
  padding: 18px 22px; border-radius: 12px; border-left: 6px solid #f28c28; color: #fff;
  background: linear-gradient(120deg, #0b2147 0%, #163d79 100%); box-shadow: 0 10px 26px -14px rgba(7, 52, 117, .7); }
.account-invite .invite-text { flex: 1 1 420px; }
.account-invite p { margin: 0; line-height: 1.5; color: #e6eefb; }
.account-invite .invite-title { font: 700 21px/1.2 var(--serif); color: #fff; margin-bottom: 4px; }
.account-invite .invite-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.account-invite .invite-cta { display: inline-block; padding: 11px 20px; border-radius: 8px; background: #f28c28; color: #1b1300;
  font-weight: 700; text-decoration: none; white-space: nowrap; }
.account-invite .invite-cta:hover, .account-invite .invite-cta:focus-visible { background: #ffa646; outline: 2px solid #fff; outline-offset: 2px; }
.account-invite .invite-signin { color: #cfe3fb; font-size: 13.5px; }
.profile-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--rule); }
.photo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.photo-row > div { flex: 1 1 320px; }
.photo-row form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cert-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 10px; }
.cert-head img { width: 72px; height: 72px; }
.cert-head > div { text-align: left; }
.cert-org { margin: 0; font-size: 14px; letter-spacing: .04em; color: #163d79; font-weight: 600; }
.cert-title { margin: 2px 0 0; font: 700 34px/1.1 var(--serif); color: #163d79; }
.cert-lead { margin: 16px 0 4px; font: 400 17px/1.4 var(--serif); color: #2a3550; }
.cert-name { margin: 4px 0; font: 700 40px/1.15 var(--serif); color: #0b1c3a; }
.cert-who { margin: 2px 0 6px; color: #3c4863; font-size: 15px; }
.cert-who strong { color: #14213a; font-weight: 600; }
.cert-ranks { margin: 10px auto 6px; border-collapse: collapse; text-align: left; font-size: 16px; }
.cert-ranks td { padding: 6px 12px; border-bottom: 1px solid #dfe5ef; }
.cert-top { font: 700 18px/1 var(--serif); color: #b35300; white-space: nowrap; text-align: right; }
.cert-field { margin: 8px 0 0; color: #3c4863; }
.cert-field strong { color: #163d79; }
.cert-foot { margin-top: 22px; padding-top: 12px; border-top: 1px solid #dfe5ef; font-size: 12.5px; color: #3c4863; }
.cert-foot p { margin: 3px 0; }
.cert-note { max-width: 80ch; margin: 8px auto 0 !important; font-size: 11.5px; color: #5b667d; }
.cert-foot { display: grid; grid-template-columns: 1fr 250px; gap: 0 18px; align-items: center; text-align: left; }
.cert-foot-text { grid-column: 1; grid-row: 1; }
.cert-foot .cert-note { grid-column: 1; grid-row: 2; margin: 8px 0 0 !important; }
.cert-qr { grid-column: 2; grid-row: 1 / span 2; margin: 0; text-align: center; }
.cert-qr { align-self: start; margin: 0 175px 0 0 !important; }  /* up and well left, clear of the corner pattern */
.cert-qr svg { display: block; margin: 0 0 0 auto; width: 70px; height: 70px; }
.cert-sources, .data-sources { line-height: 1.6; }
.cert-sources .src, .data-sources .src { white-space: nowrap; }
.src-roles { color: #5b667d; }
.cert-id a { color: #163d79; text-decoration: none; }
.data-sources { color: var(--muted); margin: 10px 0 4px; }
.src-icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; border-radius: 3px; object-fit: contain; }
th .src-icon { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 640px) {
  .cert-foot { grid-template-columns: 1fr; text-align: center; }
  .cert-photo { position: static; display: block; margin: 0 auto 12px; width: 96px; height: 96px; }
  .cert-foot-text, .cert-foot .cert-note, .cert-qr { grid-column: 1; grid-row: auto; }
  .cert-qr { margin: 12px auto 0 !important; }
  .cert-qr svg { margin: 0 auto; }
}
body.cert-page .brandbar, body.cert-page .sitefooter { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .no-print, .brandbar, .sitefooter, .demo-banner, .flash { display: none !important; }
  .certificate { box-shadow: none; border: 0; margin: 0; max-width: none; padding: 0; }
  .certificate { break-inside: avoid; page-break-inside: avoid; }
  .cert-inner { min-height: 180mm; display: flex; flex-direction: column; justify-content: center; }
  .cert-name { font-size: 46px; }
  .cert-ranks { font-size: 17px; }
}

/* Wide tables scroll inside their panel on small screens instead of widening the page */
.panel { overflow-x: auto; }
@media (max-width: 640px) {
  .panel { padding: 14px 12px; }
  .works td, .works th, .ranks td, .ranks th, .metrics td, .metrics th { padding-left: 6px; padding-right: 6px; }
  .profile-facts div { min-width: 0; flex: 1 1 40%; }
  .panel-head .inline-form { width: 100%; }
}

/* Results table: scroll sideways inside its box on mid-size screens instead of widening the page */
.table-wrap { overflow-x: auto; }
@media (min-width: 761px) and (max-width: 980px) {
  .results td, .results th { padding-left: 10px; padding-right: 10px; }
  .cites { min-width: 90px; }
}
.cert-publisher { font-size: 14px; color: #163d79 !important; margin-bottom: 6px !important; letter-spacing: .01em; }
.downloads { margin: 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }

/* Institutions */
.inst-head { align-items: center; }
.inst-logo { max-width: 120px; max-height: 96px; object-fit: contain; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 8px; }
.inst-logo-sm { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; margin-right: 8px; background: #fff; border-radius: 4px; }
.inst-manage-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; }
.inst-results td.eid { white-space: nowrap; font-size: 13px; color: var(--muted); }
.inst-help h2 { margin-top: 6px; }
.dupe-list { list-style: none; padding: 0; margin: 10px 0; }
.dupe-list li { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--rule); }
.dupe-list li > div { flex: 1 1 260px; }
.dupe-list .hint { display: block; }
.inst-dupes { border-left: 5px solid #f28c28; }
.confirm-new { margin-top: 12px; }
.field-static { display: block; }
.field-static > span:first-child { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.plain-list { list-style: none; padding: 0; columns: 2 260px; }
.plain-list li { margin: 4px 0; break-inside: avoid; }
form.inline { display: inline; }
.crumbs { margin: 10px 0 -6px; font-size: 14px; color: var(--muted); }
.inst-address { font-size: 13px; color: var(--muted); }
.inst-actions { margin: 18px 0; font-size: 14px; }
.hp { position: absolute; left: -9999px; }
.review h3 { font-size: 15px; margin: 12px 0 0; }
.review .details { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--rule); color: var(--ink); }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.review-actions .small-input { width: 170px !important; flex: 0 0 170px; }
nav.tabs a[aria-current="page"] { font-weight: 700; text-decoration: underline; }

/* About & method: a methods note. Serif document text, sans interface, one sticky contents column. */
.mp { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 0 56px; align-items: start; padding-top: 34px; padding-bottom: 56px; }
.mp-toc { position: sticky; top: 20px; font-size: 14px; }
.mp > * { min-width: 0; }
.mp-toc-title, .mp-toc summary { font-weight: 600; color: var(--ink); margin: 0 0 10px; }
.mp-toc-narrow { display: none; }
.mp-toc summary { cursor: pointer; margin: 0; }
.mp-toc ol { margin: 0; padding: 0 0 0 0; list-style: none; counter-reset: toc; border-left: 2px solid var(--rule); }
.mp-toc li { counter-increment: toc; }
.mp-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.mp-toc a::before { content: counter(toc) "  "; color: var(--teal); font-variant-numeric: tabular-nums; white-space: pre; }
.mp-toc a:hover, .mp-toc a:focus-visible { color: var(--ink); border-left-color: var(--teal); }

.mp-doc { max-width: 68ch; font: 400 17px/1.7 var(--serif); color: var(--ink); }
.mp-doc p { margin: 0 0 14px; }
.mp-doc a { color: var(--teal); }
.mp-head h1 { font: 700 44px/1.08 var(--serif); letter-spacing: -0.01em; margin: 0 0 16px; color: var(--head); }
.mp-summary { font-size: 20px; line-height: 1.55; color: var(--ink); margin-bottom: 20px !important; }
.mp-meta { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 0 0 28px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font: 14px/1.4 var(--sans); }
.mp-meta dt { color: var(--muted); font-size: 12.5px; }
.mp-meta dd { margin: 2px 0 0; color: var(--ink); font-weight: 500; }

.mp-glance { width: 100%; border-collapse: collapse; margin: 0 0 34px; font: 15px/1.4 var(--sans); background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.mp-glance caption { text-align: left; font: 600 14px/1.4 var(--sans); color: var(--muted); padding: 0 0 8px; }
.mp-glance th, .mp-glance td { padding: 9px 14px; border-top: 1px solid var(--rule); text-align: left; }
.mp-glance tr:first-child th, .mp-glance tr:first-child td { border-top: 0; }
.mp-glance th { font-weight: 400; color: var(--muted); width: 55%; }
.mp-glance td { font-variant-numeric: tabular-nums; font-weight: 600; }

.mp-doc section { margin: 0 0 38px; scroll-margin-top: 18px; }
.mp-doc h2 { display: flex; align-items: baseline; gap: 14px; font: 700 25px/1.25 var(--serif); margin: 0 0 12px; color: var(--head); }
.mp-n { font: 600 15px/1 var(--sans); color: var(--teal); min-width: 22px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.mp-doc ul { margin: 0 0 14px; padding-left: 22px; }
.mp-doc li { margin: 7px 0; }

/* the commitments: the one place the publisher's orange appears */
.mp-commit { list-style: none; padding: 4px 0 4px 20px !important; border-left: 3px solid var(--ochre); }
.mp-commit li { margin: 10px 0; }

.mp-table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font: 15px/1.45 var(--sans); }
.mp-table th, .mp-table td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.mp-table thead th { font-weight: 600; color: var(--muted); font-size: 13.5px; border-bottom: 2px solid var(--ink); }
.mp-table tbody th { font-weight: 500; white-space: nowrap; padding-right: 22px; }
.mp-ids code { font: 500 14.5px/1.4 var(--sans); letter-spacing: .02em; color: var(--teal); white-space: nowrap; }

/* definitions typeset like a methods paper */
.mp-defs { margin: 8px 0 18px; border-top: 1px solid var(--rule); }
.mp-defs > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.mp-defs dt { font: 600 15px/1.6 var(--sans); color: var(--ink); }
.mp-defs dd { margin: 0; }
.mp-f { display: block; font: 400 19px/1.5 var(--serif); color: var(--teal); }
.mp-gloss { display: block; font-size: 15.5px; color: var(--muted); margin-top: 2px; }
.mp-doc var { font-style: italic; }
.mp-doc sub { font-size: .7em; }

.mp-contact > div { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 4px 20px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.mp-contact dt { font: 600 15px/1.6 var(--sans); }
.mp-contact dd { margin: 0; }

.mp-cite { margin-top: 44px; padding: 16px 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; }
.mp-cite h2 { font: 600 14px/1.4 var(--sans); color: var(--muted); margin: 0 0 6px; }
.mp-cite p { margin: 0; font-size: 15.5px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .mp { grid-template-columns: 1fr; padding-top: 22px; }
  .mp-toc-wide { display: none; }
  .mp-toc-narrow { display: block; position: static; margin-bottom: 22px; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; }
  .mp-toc-narrow[open] summary { margin-bottom: 10px; }
  .mp-table tbody th { white-space: normal; }
  .mp-ids code { white-space: normal; overflow-wrap: anywhere; }
  .mp-head h1 { font-size: 34px; }
  .mp-summary { font-size: 18px; }
  .mp-defs > div, .mp-contact > div { grid-template-columns: 1fr; }
}
@media print { .mp { display: block; } .mp-toc { display: none; } }
.contact-page h2 { font: 700 21px/1.3 var(--serif); margin: 26px 0 8px; }
.contact-page .mp-contact > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 20px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.contact-page .mp-contact dt { font-weight: 600; }
.contact-page .mp-contact dd { margin: 0; }
@media (max-width: 640px) { .contact-page .mp-contact > div { grid-template-columns: 1fr; } }

/* ================================================================ Brand bar, masthead and footer
   Layout as before; colors from the journals site (navy gradient bands with a thin orange rule). */
.masthead h1, .page-title, h1, h2, h3 { color: var(--head); }

.brandbar { position: relative; color: #fff;
  background: radial-gradient(120% 220% at 100% 0%, rgba(67, 108, 168, .5) 0%, rgba(67, 108, 168, 0) 55%),
              linear-gradient(120deg, var(--navy-a) 0%, var(--navy-b) 100%); }
.brandbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-2) 60%, rgba(242, 140, 40, 0)); }
.brandbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; row-gap: 4px;
  min-height: 52px; padding-top: 6px; padding-bottom: 9px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .01em; }
.brand img { background: #fff; border-radius: 8px; padding: 3px; }
.brand-name { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-name small { font-size: 11.5px; font-weight: 400; color: var(--orange-label); letter-spacing: .02em; }
.sitenav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: 14px; }
.nav-group { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sitenav a { color: #d5e1f2; text-decoration: none; }
.sitenav a:hover { color: #fff; text-decoration: underline; }
.byline { margin: -4px 0 12px; color: var(--muted); font-size: 14px; }
.byline a { font-weight: 500; }

.sitefooter { position: relative; margin-top: 20px; color: #c9d6ea;
  background: radial-gradient(90% 160% at 100% 0%, rgba(67, 108, 168, .35) 0%, rgba(67, 108, 168, 0) 60%),
              linear-gradient(120deg, var(--navy-a) 0%, #12336a 100%); }
.sitefooter::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-2) 60%, rgba(242, 140, 40, 0)); }
.sitefooter a { color: #e8eff9; }
.sitefooter a:hover { color: #fff; }
.sitefooter strong { color: #fff; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px 40px; padding-top: 28px; padding-bottom: 26px; align-items: start; }
.footer-text { max-width: 78ch; }
.footer-text p { margin: 0 0 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.footer-small { font-size: 12.5px; color: #93a7c6; }
.footer-email { color: #fff; font-weight: 600; }
.footer-journals { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-left: 4px solid var(--orange-2);
  border-radius: 10px; padding: 14px 16px; }
.footer-journals-logo img { display: block; margin-bottom: 6px; background: #fff; border-radius: 8px; padding: 3px; }
.footer-journals p { margin: 0 0 8px; font-size: 13.5px; color: #c9d6ea; }
.footer-journals-title { font: 700 17px/1.25 var(--serif) !important; color: #fff !important; }
.footer-journals-links { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 4px 0 0 !important; }
.sitefooter a.footer-journals-cta { display: inline-block; padding: 7px 14px; border-radius: 7px; background: var(--orange-2); color: #1b1300;
  font-weight: 700; text-decoration: none; }
.sitefooter a.footer-journals-cta:hover, .sitefooter a.footer-journals-cta:focus-visible { background: #ffa646; color: #1b1300; }

.nav-toggle { display: none; }
@media (max-width: 860px) {
  .sitenav { width: 100%; justify-content: flex-start; gap: 4px 14px; padding-bottom: 4px; font-size: 13.5px; }
  .nav-group { display: contents; }   /* one wrapping row of links (used when JavaScript is off) */
}
/* Small screens: a Menu button with the links in a drop-down panel */
@media (max-width: 760px) {
  .brandbar-inner { flex-wrap: nowrap; }
  .sitenav.js-menu { position: static; width: auto; padding-bottom: 0; }
  .sitenav.js-menu .nav-toggle { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .35); border-radius: 7px; background: rgba(255, 255, 255, .08); color: #fff;
    font: 600 14px/1 var(--sans); cursor: pointer; }
  .sitenav.js-menu .nav-toggle:hover, .sitenav.js-menu .nav-toggle:focus-visible { background: rgba(255, 255, 255, .18); }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 16px; height: 2px; background: currentColor;
    border-radius: 1px; position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -5px; } .nav-toggle-bars::after { top: 5px; }
  .sitenav.open .nav-toggle-bars { background: transparent; }
  .sitenav.open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  .sitenav.open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
  .sitenav.js-menu .nav-group { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 50;
    flex-direction: column; gap: 0; padding: 6px 0 10px; background: var(--navy-a);
    border-bottom: 3px solid var(--orange); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
  .sitenav.js-menu.open .nav-group { display: flex; }
  .sitenav.js-menu .nav-group a { display: block; padding: 11px 16px; font-size: 15.5px; color: #e8eff9; }
  .sitenav.js-menu .nav-group a + a { border-top: 1px solid rgba(255, 255, 255, .09); }
  .sitenav.js-menu .nav-group a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
}
@media (max-width: 760px) {
  .brand span { font-size: 15px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Share a certificate (LinkedIn, Facebook, X, email, link, image) */
.share-panel { max-width: 1050px; margin: 0 auto 36px; padding: 18px 22px; background: var(--sheet); border: 1px solid var(--rule);
  border-radius: 12px; }
.share-panel h2 { margin: 0 0 4px; font: 700 20px/1.3 var(--serif); }
.share-panel p { margin: 0 0 12px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.share-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 6px; font: 600 14px/1 var(--sans);
  text-decoration: none; cursor: pointer; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.share-btn:hover { border-color: var(--teal); }
a.share-linkedin, a.share-linkedin-profile { background: #0a66c2; border-color: #0a66c2; color: #fff; }
a.share-linkedin-profile { background: #fff; color: #0a66c2; }
a.share-facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
a.share-x { background: #0f1419; border-color: #0f1419; color: #fff; }
a.share-linkedin:hover, a.share-facebook:hover, a.share-x:hover { filter: brightness(1.12); color: #fff; }
button.share-btn { height: 38px; }
@media (max-width: 760px) { .share-btn { flex: 1 1 calc(50% - 8px); justify-content: center; } }

/* Pop-up notes (e.g. before a CSV download) */
.note-dialog { max-width: min(520px, calc(100vw - 32px)); border: 1px solid var(--rule); border-radius: 10px; padding: 22px 24px;
               background: var(--sheet); color: var(--ink); box-shadow: 0 18px 48px rgba(11, 33, 71, .25); }
.note-dialog::backdrop { background: rgba(11, 33, 71, .45); }
.note-dialog h2 { margin: 0 0 10px; color: var(--head); font: 600 20px/1.3 var(--serif); }
.note-dialog p { margin: 0 0 12px; }
.note-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }

.fn-mark { text-decoration: none; margin-left: 1px; }

/* institution ranking: the column it is ranked by */
.inst-ranking th.on, .inst-ranking td.on { font-weight: 700; color: var(--head); }
.inst-measures { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.inst-measures a.on { border-color: var(--teal); background: var(--teal-soft); color: var(--head); font-weight: 600; }
fieldset.relation { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
fieldset.relation legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; padding: 0; }
fieldset.relation .check { font-size: 15px; color: var(--ink); }
