:root {
  --navy: #0a2540; --blue: #1b5eab; --blue-d: #144a8a; --sky: #e8f0fa; --ink: #1d2733; --muted: #5b6773;
  --line: #d9e0e8; --bg: #f5f7fa; --card: #fff; --green: #1f7a4d; --green-bg: #e3f4ea; --red: #a3262a; --red-bg: #fbe9ea;
  --amber: #f2a33a; --radius: 10px; --shadow: 0 1px 2px rgba(10,37,64,.06), 0 4px 14px rgba(10,37,64,.07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Calibri, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--blue); } a:hover { color: var(--blue-d); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; color: var(--navy); margin: 0 0 .6em; }
h2 { font-size: 1.6rem; } h3 { font-size: 1.2rem; }
.wrap { width: 80%; max-width: 2200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 1100px) { .wrap { width: 100%; } }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.logos { display: flex; align-items: center; gap: 12px; } .logos img { height: 40px; width: auto; display: block; }
.brand { font-weight: 700; color: var(--navy); text-decoration: none; line-height: 1.2; font-size: .95rem; max-width: 220px; }
nav.main { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.main a { text-decoration: none; color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
nav.main a:hover { background: var(--sky); } nav.main a[aria-current="page"] { background: var(--navy); color: #fff; }

/* hero */
.hero { background: radial-gradient(900px 380px at 85% -10%, rgba(66,133,214,.45), transparent 70%),
        repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 26px),
        linear-gradient(120deg, #07182b 0%, #0a2540 50%, #123f73 100%); color: #fff; padding: 56px 0 64px; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 18em; margin-bottom: .4em; }
.hero p.lead { font-size: 1.15rem; max-width: 40em; color: #dbe7f5; margin: 0 0 1.4em; }
.hero.small { padding: 34px 0 38px; } .hero.small h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: .25em; }
.hero.small p.lead { margin: 0; font-size: 1.05rem; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; padding: 12px 22px; border-radius: 8px; background: var(--amber); color: #1b1b1b; border: 2px solid var(--amber); cursor: pointer; font-size: 1rem; }
.btn:hover { background: #ffb44f; color: #000; } .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn.ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn.sm { padding: 8px 14px; font-size: .9rem; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.stat { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: 12px 18px; min-width: 190px; text-decoration: none; color: #fff; display: block; }
.stat:hover { background: rgba(255,255,255,.18); color: #fff; } .stat b { display: block; font-size: 1.7rem; line-height: 1.1; } .stat span { font-size: .9rem; color: #cfe0f3; }

/* in-page nav */
.jump { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 64px; z-index: 40; }
.jump .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: thin; }
.jump a { white-space: nowrap; text-decoration: none; color: var(--navy); font-size: .9rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.jump a:hover { background: var(--sky); }

main { padding: 34px 0 20px; }
section.block { margin-bottom: 38px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card h3 { margin-top: 0; }
.notice { background: #fff6e5; border: 1px solid #f3d49a; border-radius: var(--radius); padding: 14px 18px; }
.alert { color: var(--red); font-weight: 600; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { position: relative; padding-left: 48px; } .steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; }
.prereg { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: center; } .prereg img { border-radius: var(--radius); display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; }
.checks { list-style: none; padding: 0; margin: 0; } .checks li { position: relative; padding: 0 0 12px 30px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.rank-table { width: 100%; border-collapse: collapse; } .rank-table th, .rank-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rank-table th { background: var(--sky); color: var(--navy); font-size: .9rem; }

/* events */
.month { font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; margin: 18px 0 8px; }
.ev { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.ev.pdi { border-left: 5px solid var(--blue); }
.ev .when { flex: 0 0 74px; text-align: center; background: var(--sky); border-radius: 8px; padding: 6px 4px; color: var(--navy); line-height: 1.15; }
.ev .when b { display: block; font-size: 1.5rem; } .ev .when span { font-size: .75rem; text-transform: uppercase; font-weight: 700; }
.ev h4 { margin: 0 0 2px; font-size: 1.05rem; color: var(--navy); } .ev p { margin: 0; color: var(--muted); font-size: .95rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; background: var(--blue); color: #fff; border-radius: 4px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }

/* results */
.toolbar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.searchrow { display: flex; gap: 10px; margin-bottom: 14px; }
.searchrow input[type=search] { flex: 1; font-size: 1.05rem; padding: 12px 14px; border: 2px solid var(--line); border-radius: 8px; min-width: 0; }
.searchrow input[type=search]:focus { border-color: var(--blue); outline: none; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.filters label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: block; }
.filters select { width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; background: #fff; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; align-items: center; }
.chip { background: var(--sky); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .88rem; text-decoration: none; color: var(--navy); }
.chip b { font-weight: 700; } .chip i { font-style: normal; margin-left: 6px; background: #fff; border-radius: 50%; display: inline-block; width: 20px; height: 20px; text-align: center; line-height: 20px; color: var(--muted); }
.clear { font-size: .9rem; }
.meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .95rem; margin: 18px 2px 8px; }
.tablebox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table.results { width: 100%; border-collapse: collapse; }
table.results th { background: var(--navy); color: #fff; text-align: left; font-size: .85rem; padding: 0; white-space: nowrap; }
table.results th a { display: block; color: #fff; text-decoration: none; padding: 12px 14px; }
table.results th a:hover { background: var(--blue-d); }
table.results th[aria-sort="ascending"] a::after { content: " ▲"; font-size: .7em; } table.results th[aria-sort="descending"] a::after { content: " ▼"; font-size: .7em; }
table.results th.plain { padding: 12px 14px; }
table.results td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.results tr:nth-child(even) td { background: #fafbfd; } table.results tr:hover td { background: var(--sky); }
table.results .nm { font-weight: 600; color: var(--navy); } table.results td.dt { white-space: nowrap; }
.pre { }
mark { background: #ffe9a6; padding: 0 1px; border-radius: 2px; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; cursor: help; }
.badge.ok { background: var(--green-bg); color: var(--green); } .badge.old { background: var(--red-bg); color: var(--red); }
tr.expired td.nm, tr.expired td.dt { color: var(--red); }
.legend { font-size: .9rem; color: var(--muted); margin: 16px 2px; } .legend .badge { margin: 0 4px; cursor: default; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); } .empty h3 { color: var(--navy); }
.pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 22px 0; }
.pager a, .pager span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: var(--navy); font-weight: 600; min-width: 42px; text-align: center; }
.pager a:hover { background: var(--sky); } .pager .here { background: var(--navy); color: #fff; border-color: var(--navy); } .pager .off { color: #aab; }
.note { font-size: .85rem; color: var(--muted); padding: 10px 14px; }

footer { background: var(--navy); color: #cfdcec; margin-top: 40px; padding: 38px 0 22px; font-size: .95rem; }
footer a { color: #fff; } footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
footer h4 { color: #fff; margin: 0 0 6px; } footer .fine { border-top: 1px solid rgba(255,255,255,.18); margin-top: 24px; padding-top: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .85rem; }

@media (max-width: 860px) {
  .pfx { display: none; }
  .grid2, .grid3, .prereg { grid-template-columns: 1fr; }
  nav.main { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; } nav.main a { white-space: nowrap; padding: 8px 10px; font-size: .9rem; } .brand { display: none; }
  .topbar .wrap { padding-top: 8px; padding-bottom: 8px; }
  .jump { top: 0; position: static; }
  /* results table becomes cards */
  table.results thead { display: none; }
  table.results, table.results tbody, table.results tr, table.results td { display: block; width: 100%; }
  table.results tr { padding: 12px 14px; border-top: 1px solid var(--line); }
  table.results td { border: 0; padding: 2px 0; background: transparent !important; }
  table.results td::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
  table.results td.nm { font-size: 1.1rem; } table.results td.nm::before { content: ""; }
  .sortbar { display: flex !important; }
}
.sortbar { display: none; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .85rem; align-items: center; }
.sortbar a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--navy); }
@media (max-width: 480px) { .searchrow { flex-direction: column; } .ev { flex-direction: column; } .ev .when { flex-basis: auto; display: flex; gap: 8px; justify-content: center; } }
@media print { .topbar, .jump, .toolbar, .pager, .hero .btns, footer .fine { display: none; } body { background: #fff; } .hero { background: none; color: #000; padding: 0; } .hero h1, .hero p.lead { color: #000; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* editable text (home page sections, footer) */
.richtext > :first-child { margin-top: 0; } .richtext > :last-child { margin-bottom: 0; }
.richtext ul { list-style: none; padding: 0; margin: 0 0 1em; } .richtext ul li { position: relative; padding: 0 0 12px 30px; }
.richtext ul li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.richtext ol { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 14px; }
.richtext ol li { position: relative; padding-left: 48px; }
.richtext ol li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; }
.richtext .alert, .alert { color: var(--red); font-weight: 600; } .richtext .muted { color: var(--muted); font-size: .9rem; }
.richtext .notice { background: #fff6e5; border: 1px solid #f3d49a; border-radius: var(--radius); padding: 14px 18px; margin-top: 1em; }
.richtext h3 { margin-top: 1.2em; } .richtext h4 { margin: 1em 0 .3em; color: var(--navy); }
.richtext .rank-table { margin: 1em 0; }
footer p { margin: 0; } footer .cols h4 { margin: 0 0 6px; }

/* wider layout on the results pages so long names and institutions fit */
@media (min-width: 861px) { table.results td.nm { min-width: 210px; } table.results td[data-label="Institution"] { min-width: 260px; } }
.toolbar select { max-width: 100%; }

/* shortcut buttons: light tint of the banner gradient, dark text */
.jump { background: #fff; border-bottom: 1px solid #c3d4ea; }
.jump a { background: linear-gradient(120deg, #e6eef9 0%, #c8dbf1 100%); color: var(--navy); border: 1px solid #a9c2e2; box-shadow: 0 1px 2px rgba(10,37,64,.12); }
.jump a:hover { background: linear-gradient(120deg, #d5e3f5 0%, #a9c6ea 100%); border-color: #7fa5d6; color: #07182b; }
.jump a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* the original site photo (rig and pipes), faded into the banner */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: url("images/header.jpg") right center / cover no-repeat; opacity: .38; mix-blend-mode: luminosity;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 75%); mask-image: linear-gradient(90deg, transparent 20%, #000 75%); pointer-events: none; }
.hero > * { position: relative; }
.btn.ghost { background: rgba(255,255,255,.16); border-color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.3); }
a.star { color: var(--blue); font-weight: 700; text-decoration: none; padding: 0 2px; }
a.star:hover { text-decoration: underline; }
