/* MGPHO site styles.
   One stylesheet, no build step. Type: Barlow Condensed for headings and credential
   numbers, Barlow for text. Status colours follow the medical gas colour code
   (oxygen green, medical air yellow, nitrogen black, carbon dioxide grey ...). */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/assets/fonts/barlow/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("/assets/fonts/barlow/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/assets/fonts/barlow/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("/assets/fonts/barlow-condensed/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/assets/fonts/barlow-condensed/barlow-condensed-latin-600-normal.woff2") format("woff2"); }

:root {
  --ink: #1c2430;
  --steel: #5b606b;
  --blue: #1a6db3;
  --blue-deep: #11497c;
  --sky: #4fa3e8;
  --paper: #f2f4f7;
  --surface: #ffffff;
  --line: #d3d9e1;
  --line-soft: #e6eaef;

  --gas-oxygen: #1f8f4e;
  --gas-air: #f0c419;
  --gas-nitrous: #1f5fa8;
  --gas-nitrogen: #16191d;
  --gas-co2: #8c9199;
  --gas-wagd: #7b3f99;
  --alarm: #b3261e;

  --text: "Barlow", "Segoe UI", system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Barlow", sans-serif;
  --wrap: 74rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0 0 0.5em; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; max-width: 38em; color: #323b49; }
.prose { max-width: 42em; }
.muted { color: var(--steel); }
.small { font-size: 0.9rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* The colour band across the top: the gas colour code, in order. */
.gas-strip { display: flex; height: 7px; }
.gas-strip span { flex: 1; }
.gas-strip span:nth-child(1) { background: var(--gas-oxygen); }
.gas-strip span:nth-child(2) { background: var(--gas-air); }
.gas-strip span:nth-child(3) { background: var(--gas-nitrous); }
.gas-strip span:nth-child(4) { background: var(--gas-nitrogen); }
.gas-strip span:nth-child(5) { background: var(--gas-co2); }
.gas-strip span:nth-child(6) { background: #fff; border-bottom: 1px solid var(--line); }
.gas-strip span:nth-child(7) { background: var(--gas-wagd); }

.preview-bar { margin: 0; padding: 0.3rem 1.25rem; background: var(--ink); color: #dfe5ee; font-size: 0.85rem; text-align: center; }
.viewas-bar { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; justify-content: center; padding: 0.55rem 1.25rem; background: #fff1b8; border-bottom: 2px solid #d9b100; color: #2e2600; }
.viewas-bar p { margin: 0; }
.viewas-bar form { margin: 0; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 2rem; flex-wrap: wrap; padding-top: 0.55rem; padding-bottom: 0.7rem; }
.site-header .utility { padding-top: 0.45rem; padding-bottom: 0; font-size: 0.93rem; }
.utility nav, .utility .account { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1.2rem; }
.utility a { color: var(--steel); text-decoration: none; }
.utility a:hover, .utility a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.utility .signin, .utility .account a { color: var(--blue); font-weight: 500; }
.utility form { margin: 0; }
.utility button { background: none; border: 1px solid var(--line); color: var(--steel); font: inherit; font-size: 0.88rem; padding: 0.05rem 0.55rem; border-radius: 3px; cursor: pointer; }
.utility button:hover { border-color: var(--steel); color: var(--ink); }
.brand { display: block; line-height: 0; }
.brand img { height: 74px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1.5rem; font-family: var(--display); font-weight: 500; font-size: 1.22rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 0.3rem 0; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--blue); }

/* Second-level navigation inside a section */
.subnav { background: #e8ecf1; border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; flex-wrap: wrap; gap: 0.1rem 1.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; font-size: 0.98rem; }
.subnav a { color: var(--ink); text-decoration: none; padding: 0.1rem 0; border-bottom: 2px solid transparent; }
.subnav a:hover { border-bottom-color: var(--steel); }
.subnav a[aria-current="page"] { border-bottom-color: var(--blue); font-weight: 600; }

.admin-bar { background: var(--blue-deep); color: #fff; }
.admin-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1.5rem; padding-top: 0.45rem; padding-bottom: 0.45rem; font-size: 0.98rem; }
.admin-bar a { color: #fff; text-decoration: none; padding: 0.15rem 0; border-bottom: 2px solid transparent; }
.admin-bar a:hover, .admin-bar a[aria-current="page"] { border-bottom-color: var(--gas-air); }
.count { display: inline-block; min-width: 1.5em; padding: 0 0.4em; margin-left: 0.25em; background: var(--gas-air); color: var(--ink); border-radius: 0.8em; font-size: 0.82em; font-weight: 600; text-align: center; }

main { padding: 2.2rem 0 4rem; }
.flash { margin: 0 0 1.5rem; padding: 0.7rem 1rem; border-left: 6px solid var(--gas-oxygen); background: #fff; }
.flash-error { border-left-color: var(--alarm); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 1.6rem 0 2.2rem; font-size: 0.95rem; color: var(--steel); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.site-footer p { margin: 0; }
.site-footer a + a { margin-left: 1.2rem; }
.section-tight { margin-top: 0.8rem; }

/* Buttons and form controls */
.btn { display: inline-block; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 3px; padding: 0.5rem 1.1rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn-quiet { background: #fff; color: var(--blue); border-color: var(--line); }
.btn-quiet:hover { background: var(--paper); color: var(--blue-deep); border-color: var(--steel); }
.field input.input-code { max-width: 11rem; font-size: 1.4rem; letter-spacing: 0.3em; }
.btn-small { padding: 0.2rem 0.65rem; font-size: 0.92rem; }
label { display: block; font-weight: 500; font-size: 0.95rem; margin-bottom: 0.2rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="search"], input[type="number"],
input[type="tel"], input[type="url"], input[type="time"], input[type="datetime-local"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #aeb7c2; border-radius: 3px; padding: 0.45rem 0.6rem;
}
textarea { min-height: 4.5rem; }
.field { margin-bottom: 0.9rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1.2rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; }
.inline-form .field { margin: 0; flex: 1 1 10rem; }
td .inline-form { flex-wrap: nowrap; align-items: center; max-width: 20rem; }
td .inline-form input { flex: 1; min-width: 0; padding: 0.25rem 0.5rem; }
.inline-remove { display: inline-block; margin: 0 0 0 0.8rem; }
.check { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; }
.check input { width: auto; }
.pay-box .check { align-items: flex-start; margin: 0 0 0.75rem; max-width: 42rem; }
.pay-box .check input { margin-top: 0.3rem; }
.hint { font-size: 0.88rem; color: var(--steel); margin: 0.2rem 0 0; }

/* Standing: a colour block plus the word, never colour alone. */
.standing { display: inline-flex; align-items: center; gap: 0.45em; white-space: nowrap; }
.standing::before { content: ""; width: 0.8em; height: 0.8em; border: 1px solid rgba(0, 0, 0, 0.35); background: #fff; flex: none; }
.standing-active::before { background: var(--gas-oxygen); }
.standing-eligible::before { background: var(--gas-air); }
.standing-lapsed::before { background: var(--gas-nitrogen); }
.standing-retired::before, .standing-withdrawn::before { background: var(--gas-co2); }
.standing-applicant::before { background: var(--gas-nitrous); }
.standing-unknown::before { background: var(--alarm); }

/* Credential numbers, set like a pipe label: colour band, then the marking. */
.tag { display: inline-flex; align-items: stretch; border: 1px solid var(--ink); background: #fff; font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1; letter-spacing: 0.03em; white-space: nowrap; vertical-align: middle; }
.tag::before { content: ""; width: 0.55em; background: var(--gas-co2); border-right: 1px solid var(--ink); }
.tag span { padding: 0.22em 0.5em 0.2em; }
.tag-active::before { background: var(--gas-oxygen); }
.tag-eligible::before { background: var(--gas-air); }
.tag-lapsed::before { background: var(--gas-nitrogen); }
.tag-applicant::before { background: var(--gas-nitrous); }
.tag-unknown::before { background: var(--alarm); }
.tag-large { font-size: 1.9rem; }

/* Home */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); margin-top: -2.2rem; padding: 3.2rem 0 3.4rem; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2.5rem 4rem; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.3rem); margin-bottom: 0.35em; }
.lookup { border: 2px solid var(--ink); background: var(--paper); padding: 1.4rem 1.5rem 1.5rem; }
.lookup h2 { font-size: 1.6rem; margin-bottom: 0.3em; }
.lookup p { font-size: 0.98rem; }
.lookup form { display: flex; gap: 0.5rem; }
.lookup input { flex: 1; min-width: 0; font-size: 1.1rem; padding: 0.6rem 0.7rem; border-color: var(--ink); }
.section { padding: 3rem 0 0; }
.program-list { list-style: none; margin: 1.2rem 0 0; padding: 0; border-top: 2px solid var(--ink); }
.program-list li { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 0.6rem 2rem; align-items: baseline; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.program-mark { font-family: var(--display); font-weight: 600; font-size: 2.3rem; line-height: 1; }
.program-list h3 { margin-bottom: 0.25em; }
.program-list p { margin: 0; max-width: 40em; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem 3.5rem; }
.planned { border-left: 6px solid var(--gas-nitrous); background: var(--surface); padding: 0.9rem 1.1rem; margin: 1.5rem 0; max-width: 42em; }
.planned h2, .planned h3 { font-size: 1.2rem; margin-bottom: 0.3em; }
.planned ul { margin: 0; padding-left: 1.2rem; }

/* Verify results */
.verify-form { display: flex; gap: 0.5rem; max-width: 34rem; margin: 1.2rem 0 0.4rem; }
.verify-form input { flex: 1; font-size: 1.1rem; padding: 0.6rem 0.7rem; border-color: var(--ink); }
.results { list-style: none; margin: 1.6rem 0 0; padding: 0; max-width: 50rem; }
.result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.3rem 1.4rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 10px solid var(--gas-co2); padding: 1rem 1.2rem; margin-bottom: 0.7rem; }
.result-active { border-left-color: var(--gas-oxygen); }
.result-name { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; }
.result p { margin: 0; }
.result-state { font-weight: 600; }

/* Admin */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 0.8rem 2rem; margin-bottom: 1.4rem; }
.page-head h1 { margin: 0; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.page-head p { margin: 0.2rem 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 1.1rem 1.3rem 1.2rem; margin-bottom: 1.4rem; }
.panel > h2 { font-size: 1.35rem; }
.panel > :last-child { margin-bottom: 0; }
.columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { font-weight: 600; font-size: 0.9rem; color: var(--steel); border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfc; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 500; }
td.r, th.r { text-align: right; }
.matrix td, .matrix th { text-align: right; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix .zero { color: #a6adb8; }
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.filters a { text-decoration: none; color: var(--ink); padding-bottom: 0.1rem; border-bottom: 3px solid transparent; }
.filters a[aria-current="true"] { border-bottom-color: var(--blue); font-weight: 600; }
.filters .n { color: var(--steel); font-variant-numeric: tabular-nums; }
.searchbar { display: flex; gap: 0.5rem; max-width: 30rem; margin-bottom: 1rem; }
.flagdot { color: var(--alarm); font-weight: 600; white-space: nowrap; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.25rem 1.2rem; margin: 0; }
.facts dt { color: var(--steel); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.plate { border: 1px solid var(--line); border-left: 10px solid var(--gas-co2); background: var(--surface); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.plate-active { border-left-color: var(--gas-oxygen); }
.plate-eligible { border-left-color: var(--gas-air); }
.plate-lapsed { border-left-color: var(--gas-nitrogen); }
.plate-applicant { border-left-color: var(--gas-nitrous); }
.plate-unknown { border-left-color: var(--alarm); }
.plate-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.2rem; margin-bottom: 0.7rem; }
.plate-head h3 { margin: 0; }
details { margin-top: 0.8rem; }
.columns > div > details { margin: 0 0 1.4rem; }
summary { cursor: pointer; color: var(--blue); font-weight: 500; width: fit-content; }
details[open] > summary { margin-bottom: 0.7rem; }
details .inline-form, details form { background: var(--paper); padding: 0.9rem 1rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 0.2rem 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line-soft); }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--steel); font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.timeline .what { font-weight: 600; }
.timeline p { margin: 0; }
.flag { border-left: 6px solid var(--alarm); padding: 0.1rem 0 0.1rem 0.9rem; margin-bottom: 1rem; }
.flag-done { border-left-color: var(--gas-co2); }
.flag h3 { font-family: var(--text); font-size: 1rem; font-weight: 600; margin-bottom: 0.2em; }
.flag p { margin: 0 0 0.4em; }
.flag form { display: flex; gap: 0.4rem; margin-top: 0.4rem; }
.flag form input { flex: 1; min-width: 0; padding: 0.25rem 0.5rem; font-size: 0.95rem; }
.review-group { margin-bottom: 2rem; }
.review-group > h2 { display: flex; align-items: baseline; gap: 0.6rem; }
.review-item { display: grid; grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr) minmax(14rem, 20rem); gap: 0.4rem 1.4rem; padding: 0.8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-top: 0; align-items: start; }
.review-group .review-item:first-of-type { border-top: 1px solid var(--line); }
.review-item p { margin: 0; }
.review-item form { display: flex; gap: 0.4rem; }
.review-item form input { flex: 1; min-width: 0; padding: 0.25rem 0.5rem; font-size: 0.95rem; }
.narrow { max-width: 26rem; margin: 2rem auto; }
.pager, .pagination { display: flex; gap: 1rem; align-items: center; margin-top: 1.2rem; }

/* ---- Shared building blocks for every section (see docs/building-a-section.md) ---- */

/* Small line above a heading */
.eyebrow { font-family: var(--display); font-weight: 600; font-size: 0.98rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); margin: 0 0 0.3rem; }
.breadcrumbs { font-size: 0.93rem; color: var(--steel); margin: 0 0 0.8rem; }
.breadcrumbs a { color: var(--steel); }

/* A grid of boxes */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; list-style: none; margin: 0 0 1.4rem; padding: 0; }
.card { display: flex; flex-direction: column; gap: 0.3rem; background: var(--surface); border: 1px solid var(--line); padding: 1rem 1.2rem 1.1rem; }
.card h2, .card h3 { margin: 0; font-size: 1.3rem; }
.card h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { color: var(--blue); text-decoration: underline; }
.card p { margin: 0; }
.card-foot { margin-top: auto; padding-top: 0.6rem; }

/* A list of rows: title and detail on the left, facts on the right */
.rows { list-style: none; margin: 0 0 1.4rem; padding: 0; background: var(--surface); border: 1px solid var(--line); }
.rows > li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.2rem 1.5rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line-soft); }
.rows > li:last-child { border-bottom: 0; }
.row-main { flex: 1 1 18rem; min-width: 0; }
.row-main p { margin: 0; }
.row-title { font-weight: 600; }
.row-meta { color: var(--steel); font-size: 0.92rem; }
/* Rows inside a panel: no box of their own */
.panel-rows { border: 0; margin: 0; }
.panel-rows > li { padding-left: 0; padding-right: 0; }

/* Labels */
.badge { display: inline-block; padding: 0.05rem 0.45rem; border: 1px solid var(--steel); border-radius: 2px; color: var(--steel); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; vertical-align: 0.1em; }
.badge-members { border-color: var(--gas-nitrous); color: var(--gas-nitrous); }
.badge-board { border-color: var(--gas-wagd); color: var(--gas-wagd); }
.badge-admin { border-color: var(--alarm); color: var(--alarm); }
.badge-ok { border-color: var(--gas-oxygen); color: #17693a; }
.badge-warn { border-color: #b89300; background: var(--gas-air); color: var(--ink); }

/* Notes on a page */
.notice { border-left: 6px solid var(--gas-nitrous); background: var(--surface); padding: 0.8rem 1.1rem; margin: 0 0 1.4rem; max-width: 48em; }
.notice > :last-child { margin-bottom: 0; }
.notice-warn { border-left-color: var(--gas-air); }
.notice-alarm { border-left-color: var(--alarm); }
.empty { padding: 1.5rem 1.2rem; background: var(--surface); border: 1px dashed #aeb7c2; color: var(--steel); margin: 0 0 1.4rem; }
.empty > :last-child { margin-bottom: 0; }

/* Headline numbers */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1rem; list-style: none; margin: 0 0 1.4rem; padding: 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--ink); padding: 0.8rem 1rem 0.9rem; }
.stat-number { display: block; font-family: var(--display); font-weight: 600; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--steel); font-size: 0.95rem; }

/* Forms */
.form { max-width: 44rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.2rem; }
.req { color: var(--alarm); }
/* A message next to a field that needs fixing */
.field-error { margin: 0.25rem 0 0; padding-left: 0.6rem; border-left: 4px solid var(--alarm); color: var(--alarm); font-size: 0.92rem; font-weight: 500; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--alarm); }
.choices { border: 0; padding: 0; margin: 0 0 0.9rem; min-width: 0; }
.choices legend { padding: 0; margin-bottom: 0.3rem; font-weight: 500; font-size: 0.95rem; }
.choices label { display: flex; gap: 0.5rem; align-items: baseline; font-weight: 400; font-size: 1rem; margin-bottom: 0.3rem; }
.choices input { width: auto; flex: none; }
input[type="file"] { font: inherit; max-width: 100%; }
textarea.editor { min-height: 24rem; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.95rem; line-height: 1.5; }
.btn-danger { background: #fff; color: var(--alarm); border-color: var(--alarm); }
.btn-danger:hover { background: var(--alarm); border-color: var(--alarm); color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
/* A trap for form-filling robots: people never see it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Text written in the page editor (Markdown) */
.content { max-width: 46em; }
.content > :first-child { margin-top: 0; }
.content h2 { margin-top: 1.6em; }
.content h3 { margin-top: 1.3em; }
.content ul, .content ol { padding-left: 1.3rem; margin: 0 0 1em; }
.content li { margin-bottom: 0.25em; }
.content blockquote { margin: 0 0 1em; padding: 0.2rem 0 0.2rem 1rem; border-left: 4px solid var(--line); color: #323b49; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.content code { background: #e8ecf1; padding: 0.05em 0.3em; border-radius: 2px; font-size: 0.92em; }
.content pre { background: #e8ecf1; padding: 0.8rem 1rem; overflow-x: auto; }
.content pre code { background: none; padding: 0; }
.content table { background: var(--surface); border: 1px solid var(--line); margin: 0 0 1em; }
.content a { overflow-wrap: anywhere; }

/* Member pictures */
.picture-preview { max-width: 11rem; max-height: 11rem; border: 1px solid var(--line); background: #fff; }

/* Site search */
.search-form { display: flex; gap: 0.5rem; max-width: 36rem; margin: 0 0 1.6rem; }
.search-form input { flex: 1; min-width: 0; font-size: 1.1rem; padding: 0.55rem 0.7rem; }

/* Home page */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 2rem 3rem; }
.home-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.home-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.home-list a { font-weight: 600; text-decoration: none; }
.home-list a:hover { text-decoration: underline; }
.home-list p { margin: 0.1rem 0 0; }
.feature { background: var(--surface); border: 1px solid var(--line); border-left: 10px solid var(--gas-oxygen); padding: 1.3rem 1.5rem 1.4rem; }
.feature h2 { margin-bottom: 0.2em; }
.feature h2 a { color: var(--ink); text-decoration: none; }
.feature h2 a:hover { color: var(--blue); text-decoration: underline; }
.hero .actions { margin: 1.2rem 0 0; }
.feature p:last-child { margin-bottom: 0; }

@media (max-width: 54rem) {
  .hero .wrap, .columns { grid-template-columns: minmax(0, 1fr); }
  .program-list li { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .review-item { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .brand img { height: 50px; }
}
@media print {
  .gas-strip, .preview-bar, .site-nav, .utility, .subnav, .admin-bar, .site-footer, details, .actions, .searchbar { display: none; }
  body { background: #fff; }
}

/* Settings, Email: a message's text, opened from its subject */
.mail-body { white-space: pre-wrap; margin: 0.4rem 0 0; font-family: inherit; }


/* ---- apply.css ---- */
/* Credential applications (/apply) and their review screens. */

/* One option on /apply: the facts, then the button or where the person stands. */
.apply-option { padding-bottom: 1.3rem; }
/* The same label column in every option, so the three blocks line up. */
.apply-facts { max-width: 58rem; grid-template-columns: 10.5rem minmax(0, 1fr); }
.apply-next { margin: 1.1rem 0 0; }
.apply-you { border-left: 6px solid var(--gas-nitrous); padding: 0.1rem 0 0.1rem 1rem; max-width: 48em; }
.apply-you > :last-child { margin-bottom: 0; }
.apply-later h2 { font-size: 1.2rem; margin-bottom: 0.3em; }

/* Review screens */
.apply-fees { margin-top: 2rem; }

/* The form */
.apply-label { display: block; font-weight: 500; font-size: 0.95rem; margin-bottom: 0.2rem; }
.apply-fixed { margin: 0; padding: 0.45rem 0; font-weight: 600; }
.apply-part { margin-top: 1.4rem; font-size: 1.35rem; }
.apply-attest { align-items: flex-start; }
.apply-attest input { margin-top: 0.35em; flex: none; }

/* The applicant's page */
.apply-reference { font-family: var(--display); font-size: 1.15em; letter-spacing: 0.06em; color: var(--ink); }
.apply-steps { margin: 0; padding-left: 1.3rem; max-width: 44em; }
.apply-steps li { margin-bottom: 0.5em; }
.apply-steps li:last-child { margin-bottom: 0; }
/* Text typed over several lines keeps its line breaks. */
.apply-pre { white-space: pre-line; }

/* A list of rows inside a panel does not need a second box around it. */
.rows.apply-rows { border: 0; margin-bottom: 0.6rem; }
.rows.apply-rows > li { padding-left: 0; padding-right: 0; }
.rows.apply-rows > li:first-child { padding-top: 0; }

@media (max-width: 40rem) {
  /* Label above value: these facts are sentences, too long for a narrow second column. */
  .apply-stack { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .apply-stack dt { font-size: 0.9rem; margin-top: 0.6rem; }
  .apply-stack dt:first-child { margin-top: 0; }
}

/* Employment board: long links and addresses wrap instead of pushing the page sideways. */
.job-link { overflow-wrap: anywhere; }


/* ---- asse.css ---- */
/* ASSE cards sent in by members (office view) */
.card-picture { display: block; max-width: 100%; height: auto; border: 1px solid #ccd3db; }


/* ---- badges.css ---- */
/* Credential badges. The artwork is 400 by 480; sizes here keep that shape. */
.cred-badge { display: block; width: 9rem; height: auto; }
.cred-badge-large { width: 100%; max-width: 17rem; }
.cred-badge-small { width: 3.4rem; }

/* The page a badge links to: the badge beside who holds it. */
.badge-page { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: start; margin-bottom: 2.5rem; }
.badge-page-plain { grid-template-columns: minmax(0, 1fr); }
.badge-page h1 { margin-bottom: 0.2em; }
.badge-page .result { margin: 1.2rem 0; max-width: 40rem; }
.address { display: inline-block; background: #e8ecf1; padding: 0.15em 0.5em; border-radius: 2px; font-size: 0.92em; overflow-wrap: anywhere; }

/* My MGPHO: one row per badge. */
.badge-shelf { list-style: none; margin: 0; padding: 0; }
.badge-shelf li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem 1.6rem; align-items: start; padding: 0.4rem 0 1.2rem; }
.badge-shelf li + li { border-top: 1px solid var(--line-soft); padding-top: 1.2rem; }
.badge-shelf h3 { margin: 0 0 0.3em; }
.badge-shelf p { margin: 0 0 0.6em; }

/* The credentials page: each credential beside its badge. */
.credential-intro { display: grid; grid-template-columns: 10rem minmax(0, 42em); gap: 1rem 2.2rem; align-items: start; }
.credential-intro .cred-badge { width: 10rem; }
.credential-intro h2 { margin-top: 0; }
.badge-row { display: flex; flex-wrap: wrap; gap: 1.5rem 2.2rem; list-style: none; margin: 1.2rem 0 0; padding: 0; }
.badge-row li { display: grid; grid-template-columns: 7rem minmax(0, 15rem); gap: 1rem; align-items: center; }
.badge-row .cred-badge { width: 7rem; }
.badge-row p { margin: 0; }

/* The home page list of credentials. */
.program-list .cred-badge { width: 6.5rem; }
.program-list li.has-badge { align-items: center; }

/* A small badge beside a credential line, and a credential number that is a link. */
.credential-line .cred-badge-small { flex: none; }
a.tag { color: var(--ink); text-decoration: none; }
a.tag:hover, a.tag:focus-visible { border-color: var(--blue); color: var(--blue-deep); }

@media (max-width: 54rem) {
  .badge-page, .credential-intro { grid-template-columns: minmax(0, 1fr); }
  .cred-badge-large { max-width: 13rem; }
  .credential-intro .cred-badge { width: 8rem; }
  .badge-shelf li { grid-template-columns: minmax(0, 1fr); }
  .badge-shelf .cred-badge { width: 8rem; }
}

/* Settings: each credential's badge beside its name and number letter. */
.numbering { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0.4rem 1.2rem; align-items: start; padding: 0.9rem 0; border-top: 1px solid var(--line-soft); }
.numbering > div:only-child { grid-column: 1 / -1; }
.numbering p { margin: 0.4rem 0 0; }
.badge-downloads { display: flex; flex-wrap: wrap; gap: 0.5rem; }


/* ---- cards.css ---- */
/* Digital cards ("MGPHO Credentials"): the screens a member opens on their phone, and the
   public verification page. Laid out for a phone first. */
.cards-app { background: var(--paper); margin: 0; min-height: 100vh; min-height: 100dvh; }
.cards-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #0d2244; color: #fff; padding: calc(0.6rem + env(safe-area-inset-top)) 1rem 0.6rem; }
.cards-brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.02em; }
.cards-brand img { width: 2rem; height: 2rem; border-radius: 0.4rem; }
.cards-out { color: #cfe3f7; font-size: 0.9rem; }
.cards-main { max-width: 34rem; margin: 0 auto; padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom)); }
.cards-name { font-size: 1.5rem; margin: 0.2rem 0 0.8rem; }
.cards-panel { background: var(--surface); border: 1px solid var(--line); padding: 1rem 1.1rem; margin: 1rem 0; }
.cards-panel h1 { font-size: 1.6rem; margin-top: 0; }
.cards-panel h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.cards-panel > :last-child { margin-bottom: 0; }
.cards-panel ol { padding-left: 1.2rem; margin: 0; }
.cards-panel li { margin-bottom: 0.4rem; }
.cards-live, .deck-hint { color: var(--steel); font-size: 0.9rem; margin: 0.6rem 0; }
.deck-hint { text-align: center; }

/* The deck: one card per screen width, swiped sideways. */
.card-deck { display: flex; gap: 0.8rem; list-style: none; margin: 0 -1rem; padding: 0 1rem 0.4rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 1rem; -webkit-overflow-scrolling: touch; }
.card-slide { flex: 0 0 88%; scroll-snap-align: center; display: flex; }
.card-deck-one .card-slide { flex-basis: 100%; }
.mcard { display: flex; flex-direction: column; width: 100%; background: var(--surface); border: 1px solid var(--line); border-top: 8px solid var(--gas-oxygen); }
.mcard-soon { border-top-color: var(--gas-air); }
.mcard-ended { border-top-color: var(--gas-co2); }
.mcard-art, .mcard-face { position: relative; padding: 1.2rem 1rem 0.4rem; text-align: center; }
.mcard-art img { width: 62%; max-width: 15rem; height: auto; }
.mcard-face { margin: 1rem 1rem 0; padding: 1.4rem 1rem 1.2rem; background: #fff; border: 2px solid #0d2244; border-radius: 0.8rem; }
.mcard-face img { width: 60%; max-width: 13rem; height: auto; }
.mcard-kind { font-family: var(--display); font-weight: 600; font-size: 1.9rem; letter-spacing: 0.14em; text-transform: uppercase; color: #0d2244; margin: 0.6rem 0 0; line-height: 1; }
.mcard-number { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: #1a4e8a; margin: 0.3rem 0 0; }
/* A card that is no longer current: greyed, with its status across it. */
.mcard-ended .mcard-art img, .mcard-ended .mcard-face img { filter: grayscale(1); opacity: 0.45; }
.mcard-ended .mcard-kind, .mcard-ended .mcard-number { color: var(--steel); }
.mcard-banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); margin: 0; padding: 0.25rem 1rem; background: #fff; border: 3px solid var(--alarm); color: var(--alarm); font-family: var(--display); font-weight: 600; font-size: 1.5rem; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.mcard-facts { padding: 0.6rem 1.1rem 0; }
.mcard-facts p { margin: 0 0 0.35rem; }
.mcard-holder { font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.15; overflow-wrap: anywhere; }
.mcard-long { color: var(--steel); }
.mcard-status { display: inline-block; font-weight: 600; padding: 0.1rem 0.6rem; border: 1px solid var(--ink); border-left: 0.7rem solid var(--gas-oxygen); background: #fff; }
.mcard-status-soon { border-left-color: var(--gas-air); }
.mcard-status-ended { border-left-color: var(--gas-co2); }
.mcard-detail { margin-left: 0.5rem; white-space: nowrap; }
.mcard-note { font-size: 0.93rem; color: var(--steel); }
.mcard-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.8rem 1.1rem 1.1rem; margin-top: auto; }
.mcard-actions .btn { flex: 1 1 auto; text-align: center; }

/* Hidden once the screen is running from the home screen. */
@media (display-mode: standalone) { .install-help { display: none; } }
.open-here { max-width: 11rem; margin: 0.6rem 0; }
.open-here svg, .qr-code svg { display: block; width: 100%; height: auto; }

/* The QR screen: white, nothing else competing with the code. */
.cards-qr { background: #fff; }
.qr-screen { text-align: center; padding-top: 0.5rem; }
.qr-screen h1 { font-size: 1.5rem; margin: 0 0 0.2rem; }
.qr-ask { margin: 0 0 0.6rem; }
.qr-code { width: min(100%, 78vh, 26rem); margin: 0 auto; }
.qr-what { color: var(--steel); font-size: 0.93rem; max-width: 26rem; margin: 0.6rem auto 1rem; }

/* The public verification page. */
.verify-cards { max-width: 44rem; }
.verify-mark { display: block; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 3px solid var(--gas-co2); }
.verify-mark-yes { border-color: var(--gas-oxygen); background: var(--gas-oxygen); }
.verify-stamp { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin: 1.2rem 0 0.2rem; }
.cards-verify { background: var(--paper); }
.cards-verify h1 { margin: 0.6rem 0 0.2rem; }
.cards-verify .result { grid-template-columns: auto minmax(0, 1fr); }
.verify-foot { margin-top: 2rem; }
@media (max-width: 22rem) {
  .cards-verify .result { grid-template-columns: minmax(0, 1fr); }
}


/* ---- directory.css ---- */
/* Directories, the Board dashboard and the member administration screens. */

/* A list of people: picture (or initials), name and a few lines. */
.people { list-style: none; margin: 0 0 1.4rem; padding: 0; background: var(--surface); border: 1px solid var(--line); }
.people > li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; padding: 0.65rem 1rem; border-bottom: 1px solid var(--line-soft); }
.people > li:last-child { border-bottom: 0; }
.person-main { flex: 1 1 12rem; min-width: 0; }
.person-main p { margin: 0; overflow-wrap: anywhere; }
.person-name { font-weight: 600; }
.person-role { font-weight: 500; }
.person-side { color: var(--steel); font-size: 0.92rem; }
.avatar { flex: none; width: 2.9rem; height: 2.9rem; object-fit: cover; border: 1px solid var(--line); background: var(--paper); }
span.avatar { display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.03em; color: var(--steel); }

/* The same list as a grid of boxes, for the board and other short rosters. */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; background: none; border: 0; }
.people-grid > li { flex-wrap: nowrap; align-items: flex-start; gap: 0.9rem; background: var(--surface); border: 1px solid var(--line); padding: 1rem 1.1rem; }
.people-grid > li:last-child { border-bottom: 1px solid var(--line); }
.people-grid .avatar { width: 4.5rem; height: 4.5rem; }
.people-grid span.avatar { font-size: 1.7rem; }
.people-grid .person-name { font-family: var(--display); font-size: 1.3rem; line-height: 1.15; }
/* Inside a panel: no box of its own. */
.people-plain { border: 0; margin-bottom: 0; }
.people-plain > li { padding: 0.3rem 0; border: 0; flex-wrap: nowrap; align-items: flex-start; }

.directory-count { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--steel); }
.list-filter { margin-bottom: 1.2rem; }
.list-filter .field-narrow { flex: 0 1 9rem; }
.list-filter .btn { white-space: nowrap; }

/* Corporate members, one box per company */
.companies { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 1rem; margin-bottom: 1.4rem; align-items: start; }
.companies .panel { margin: 0; }
.company-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.6rem; }
.company-head h2 { margin: 0; font-size: 1.35rem; overflow-wrap: anywhere; }
.company-logo { flex: none; max-width: 7rem; max-height: 3.2rem; object-fit: contain; }
.company-people, .name-list, .role-list { list-style: none; margin: 0; padding: 0; }
.company-people li, .name-list li, .role-list li { padding: 0.3rem 0; border-top: 1px solid var(--line-soft); }
.company-people li:first-child, .name-list li:first-child, .role-list li:first-child { border-top: 0; }
.company-detail { display: block; }
.committee-members { margin: 0.9rem 0 0.2rem; font-size: 1.05rem; }

/* One person's page */
.profile-head { align-items: center; }
.profile-id { display: flex; align-items: center; gap: 1.2rem; min-width: 0; }
.profile-id p { margin: 0.2rem 0 0; }
.avatar-large { width: 6.5rem; height: 6.5rem; }
span.avatar-large { font-size: 2.4rem; }
.bio { white-space: pre-line; max-width: 42em; }
.credential-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; }

@media (max-width: 34rem) {
  .profile-id { align-items: flex-start; }
  .avatar-large { width: 4.5rem; height: 4.5rem; }
}

/* Committees side by side */
.committees, .group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1rem; margin-bottom: 1.4rem; align-items: start; }
.committees .panel, .group-grid .panel { margin: 0; }
.group-count { font-family: var(--text); font-weight: 400; font-size: 1rem; font-variant-numeric: tabular-nums; }

/* Board dashboard */
a.stat-label { color: var(--blue); }
.breakdowns { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin-bottom: 1.4rem; align-items: start; }
.breakdowns .panel { margin: 0; }
.breakdowns h3 { font-size: 1.2rem; }
.count-table th, .count-table td { padding: 0.35rem 0; }
.count-table tbody th { font-weight: 400; }
.count-table tbody tr:last-child th, .count-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.count-table tfoot th, .count-table tfoot td { font-weight: 600; border-bottom: 0; }

/* Editing a roster in a table (admin) */
/* The hidden labels inside the cells are positioned against their own cell, so they scroll
   with the table instead of widening the page on a phone. */
.roster-edit td { vertical-align: middle; position: relative; }
.roster-edit input[type="text"] { min-width: 9rem; }
.roster-edit input[type="date"] { min-width: 9.5rem; }
.roster-edit .input-order { width: 4.5rem; }
.roster-edit .check { justify-content: flex-start; margin: 0; }
.timeline-narrow li { grid-template-columns: minmax(0, 1fr); gap: 0; }
.name-cell { white-space: nowrap; }
.name-cell .small { white-space: normal; }
.below-table { margin: 1rem 0 1.6rem; }


/* ---- documents.css ---- */
/* Document library, Knowledge page and their admin screens. */

/* The library's front page: one box per category with its newest documents. */
.doc-shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: 1.4rem; align-items: start; }
.doc-shelf { margin-bottom: 0; }
.doc-shelf > h2 { margin-bottom: 0.25em; }
.doc-shelf > h2 a { color: var(--ink); text-decoration: none; }
.doc-shelf > h2 a:hover { color: var(--blue); text-decoration: underline; }
.doc-latest { list-style: none; margin: 0.7rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.doc-latest li { display: flex; justify-content: space-between; align-items: baseline; gap: 0.2rem 1.2rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line-soft); }
.doc-latest a { min-width: 0; overflow-wrap: anywhere; }
.doc-latest .row-meta { white-space: nowrap; }
.doc-shelf-foot { margin: 0.7rem 0 0; font-weight: 500; }

/* A category page: year or conference headings, with a line of links to jump between them. */
.doc-jump { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0 0 1.4rem; padding: 0.6rem 1rem; background: var(--surface); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.doc-group > h2 { margin-bottom: 0.4em; }
.doc-group > h3 { margin-top: 1.2rem; }
.doc-count { font-family: var(--text); font-size: 0.9rem; font-weight: 400; color: var(--steel); margin-left: 0.3rem; }
.rows .row-main .badge { margin-left: 0.4rem; }
.rows .row-main .row-title { overflow-wrap: anywhere; }

/* Admin screens */
.doc-filter { margin-bottom: 1.2rem; }
.doc-filter .btn { flex: none; }
/* Long file names may break anywhere, so the cell that holds them needs a floor to its width. */
.doc-title-cell { min-width: 15rem; }
.doc-source { display: block; font-weight: 400; font-size: 0.88rem; color: var(--steel); overflow-wrap: anywhere; }
.doc-filename { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88rem; overflow-wrap: anywhere; }
.doc-current { margin: 0 0 0.4rem; }
.doc-examples { margin: 0 0 1rem; }
.doc-examples dt { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85rem; color: var(--steel); overflow-wrap: anywhere; }
.doc-examples dd { margin: 0 0 0.7rem; }
.doc-fix td { vertical-align: middle; }
.doc-fix td:first-child { min-width: 13rem; max-width: 20rem; }
.doc-fix input[type="text"] { min-width: 16rem; }
.doc-fix input[type="date"] { min-width: 9.5rem; }


/* ---- events.css ---- */
/* Conferences, meetings and classes (src/modules/events). */

/* An event in a list: a date block, then the title and summary. */
.event-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.event-item { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0 1.4rem; background: var(--surface); border: 1px solid var(--line); margin-bottom: 1rem; }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; padding: 1rem 0.5rem; background: var(--ink); color: #fff; font-family: var(--display); line-height: 1; text-align: center; }
.event-date-month { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.event-date-days { font-size: 2.1rem; font-weight: 600; }
.event-date-year { font-size: 1rem; font-weight: 500; color: #c9d1dc; }
.event-main { padding: 1rem 1.2rem 1.1rem 0; }
.event-main h2 { font-size: 1.7rem; margin: 0 0 0.2rem; }
.event-main h2 a { color: var(--ink); text-decoration: none; }
.event-main h2 a:hover { color: var(--blue); text-decoration: underline; }
.event-main p { margin: 0 0 0.4rem; }
.event-main p:last-child { margin-bottom: 0; }
.event-flags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* One event's page */
.event-section { margin-top: 2.2rem; }
.event-body h2 { font-size: 1.45rem; }
.facts-stacked { grid-template-columns: minmax(0, 1fr); gap: 0; }
.facts-stacked dt { font-size: 0.9rem; margin-top: 0.7rem; }
.facts-stacked dt:first-child { margin-top: 0; }

.schedule-day { margin: 1.3rem 0 0; padding: 0.4rem 1rem; background: var(--ink); color: #fff; font-size: 1.2rem; }
.schedule { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-top: 0; }
.schedule li { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 0 1rem; padding: 0.55rem 1rem; border-bottom: 1px solid var(--line-soft); }
.schedule li:last-child { border-bottom: 0; }
.schedule p { margin: 0; }
.schedule-time { color: var(--steel); font-variant-numeric: tabular-nums; white-space: nowrap; }
.schedule-title { font-weight: 600; }

/* Tickets: on the event page (prices) and on the registration form (with a quantity box). */
.ticket-list { list-style: none; margin: 0 0 1rem; padding: 0; background: var(--surface); border: 1px solid var(--line); }
.ticket { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 9.5rem; gap: 0.2rem 1.2rem; align-items: start; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line-soft); }
.ticket:last-child { border-bottom: 0; }
.ticket-main p { margin: 0.15rem 0 0; }
.ticket-name { display: inline; font-weight: 600; font-size: 1.05rem; margin: 0 0.4rem 0 0; }
.ticket-price { font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.2; text-align: right; font-variant-numeric: tabular-nums; }
.ticket-price .small { display: block; font-family: var(--text); font-weight: 400; }
.ticket-left, .ticket-qty { text-align: right; }
.ticket-qty input { width: 5rem; text-align: right; }
.ticket-off .ticket-name, .ticket-off .ticket-price { color: var(--steel); }
.ticket-why { color: var(--ink); }
.panel .ticket-list { margin-bottom: 0; }

/* The registration form */
fieldset.person { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 0.9rem 0 0; min-width: 0; }
fieldset.person legend { padding: 0 0.6rem 0 0; font-weight: 600; }
fieldset.person .fields { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.order-lines { list-style: none; margin: 0; padding: 0; }
.order-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); }
.order-lines li > div { min-width: 0; }
.order-name { display: block; font-weight: 500; }
.order-lines .order-total { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 600; font-size: 1.1rem; }
.reference, .reference-link { font-family: var(--display); letter-spacing: 0.08em; }
.reference-link { font-weight: 600; font-size: 1.1rem; }

/* A list of rows inside a panel does not need its own frame. */

/* Admin */
.field-wide { grid-column: span 2; }
textarea.editor-short { min-height: 9rem; }
.registrations-actions { margin-bottom: 1.4rem; }
.timeline-wide li { grid-template-columns: 10.5rem minmax(0, 1fr); }
.section-gap { margin-top: 2rem; }
.edit-table td { padding: 0.3rem 0.4rem; vertical-align: middle; }
.edit-table input[type="text"], .edit-table input[type="email"], .edit-table input[type="date"], .edit-table input[type="number"] { padding: 0.3rem 0.45rem; }
.edit-table .input-date { min-width: 9.5rem; }
.edit-table .input-time { min-width: 10rem; }
.edit-table .input-title { min-width: 13rem; }
.edit-table .input-note { width: 8rem; }
.edit-table .input-number { width: 4.8rem; }
.edit-table-divider th { background: #fafbfc; font-weight: 600; }
.ticket-admin-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; margin-bottom: 0.6rem; }
.ticket-admin-head h2 { margin: 0; font-size: 1.35rem; }
.ticket-admin-off h2 { color: var(--steel); }
.facts-inline { display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; }
.facts-inline dd { margin-right: 1.2rem; font-weight: 600; }

@media (max-width: 40rem) {
  .event-item { grid-template-columns: minmax(0, 1fr); }
  .event-date { flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 0.5rem; padding: 0.45rem 1rem; }
  .event-date-days { font-size: 1.5rem; }
  .event-main { padding: 0.9rem 1rem 1rem; }
  .schedule li { grid-template-columns: minmax(0, 1fr); }
  .ticket { grid-template-columns: minmax(0, 1fr) auto; }
  .ticket-main { grid-column: 1 / -1; }
  .ticket-price { text-align: left; }
  .field-wide { grid-column: auto; }
  .timeline-wide li { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .schedule-day { background: none; color: var(--ink); border-bottom: 2px solid var(--ink); padding-left: 0; }
}


/* ---- exams.css ---- */
/* Exams: the candidate's exam screens, the staff screens and the paper copy. */

/* ---- Shared pieces ---- */
.exam-result { display: inline-block; padding: 0.15rem 0.7rem; border: 1px solid var(--ink); font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.03em; white-space: nowrap; background: #fff; border-left-width: 0.6em; }
.exam-result-pass { border-left-color: var(--gas-oxygen); }
.exam-result-fail { border-left-color: var(--gas-co2); }
.exam-code-show { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 600; letter-spacing: 0.12em; }
.exam-code-big { font-family: var(--display); font-weight: 600; font-size: 2.6rem; letter-spacing: 0.14em; line-height: 1.1; margin: 0 0 0.5rem; font-variant-numeric: tabular-nums; }
.exam-time-big { font-family: var(--display); font-weight: 600; font-size: 2.6rem; line-height: 1.1; margin: 0 0 0.5rem; font-variant-numeric: tabular-nums; }
.exam-time-big .small { font-family: var(--text); font-weight: 400; }
.exam-body { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 46em; }
.exam-written { background: var(--paper); border-left: 4px solid var(--line); padding: 0.7rem 1rem; margin: 0 0 1rem; }
.exam-letter { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.7em; height: 1.7em; border: 1px solid var(--steel); border-radius: 50%; font-weight: 600; font-size: 0.9rem; background: #fff; }
.exam-danger { margin-top: 1rem; }
.exam-danger summary { color: var(--alarm); cursor: pointer; }
.exam-danger form { margin-top: 0.6rem; }
.exam-tight { margin: 0; }
.exam-below { margin-top: 1.4rem; }
.exam-narrow { flex: 0 0 6.5rem !important; }

/* ---- The exam itself: its own plain shell ---- */
.exam-app { background: var(--paper); }
.exam-bar { position: sticky; top: 0; z-index: 5; background: var(--ink); color: #fff; }
.exam-bar-in { max-width: 74rem; margin: 0 auto; padding: 0.55rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.exam-name { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.02em; }
.exam-org { color: var(--gas-air); margin-right: 0.4em; }
.exam-clock { margin: 0; display: flex; align-items: baseline; gap: 0.6rem; padding: 0.15rem 0.7rem; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 3px; }
.exam-clock-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: #c9d2de; }
.exam-clock-value { font-family: var(--display); font-weight: 600; font-size: 1.5rem; font-variant-numeric: tabular-nums; min-width: 4.6em; text-align: right; }
.exam-clock.is-low { background: var(--gas-air); border-color: var(--gas-air); color: var(--ink); }
.exam-clock.is-low .exam-clock-label { color: var(--ink); }
.exam-clock.is-last { background: var(--alarm); border-color: var(--alarm); color: #fff; }
.exam-clock.is-last .exam-clock-label { color: #fff; }
.exam-main { max-width: 74rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.exam-card { max-width: 46rem; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); padding: 1.6rem 1.8rem; }
.exam-card h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.exam-card h2 { margin-top: 1.4rem; }
.exam-instructions { margin: 1.2rem 0 0; padding: 0.8rem 1.1rem; border-left: 6px solid var(--gas-nitrous); background: var(--paper); }
.exam-instructions > :last-child { margin-bottom: 0; }
.exam-start { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.exam-code { max-width: 12rem; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: 0.2em; text-transform: uppercase; }

.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 1.4rem; align-items: start; }
.exam-question { background: var(--surface); border: 1px solid var(--line); padding: 1.4rem 1.6rem 1.6rem; }
.exam-number { font-size: 1.7rem; margin-bottom: 0.7rem; }
.exam-question .exam-body { font-size: 1.15rem; line-height: 1.5; margin-bottom: 1.2rem; }
.exam-choices { border: 0; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.exam-choice { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; font-weight: 400; }
.exam-choice:hover { border-color: var(--steel); }
.exam-choice input { width: auto; margin: 0.35rem 0 0; flex: none; }
.exam-choice:has(input:checked) { border-color: var(--blue); background: #eef5fc; box-shadow: inset 4px 0 0 var(--blue); }
.exam-choice:has(input:checked) .exam-letter { background: var(--blue); border-color: var(--blue); color: #fff; }
.exam-choice-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.exam-answer { width: 100%; font: inherit; line-height: 1.5; min-height: 16rem; }
.exam-flag { margin: 0.4rem 0 1rem; }
.exam-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.exam-saved { color: #17693a; font-size: 0.92rem; min-height: 1.2em; }
.exam-saved.is-bad { color: var(--alarm); font-weight: 600; }
.exam-help { margin-top: 1.4rem; padding-top: 0.9rem; border-top: 1px solid var(--line-soft); }
.exam-help summary { cursor: pointer; color: var(--blue); }

.exam-map { background: var(--surface); border: 1px solid var(--line); padding: 1rem; position: sticky; top: 4rem; max-height: calc(100vh - 5rem); overflow-y: auto; }
.exam-map-title { margin: 0 0 0.4rem; font-weight: 600; font-size: 0.95rem; }
.exam-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.2rem, 1fr)); gap: 0.3rem; margin: 0 0 1rem; }
.exam-map-wide { grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); max-width: 40rem; }
.exam-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; height: 2rem; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font: inherit; font-size: 0.88rem; font-variant-numeric: tabular-nums; text-decoration: none; cursor: pointer; position: relative; }
.exam-dot:hover { border-color: var(--steel); color: var(--ink); }
.exam-dot.is-answered { background: #dfeaf6; border-color: #9dbbdb; }
.exam-dot.is-flagged::after { content: ""; position: absolute; top: -3px; right: -3px; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--gas-air); border: 1px solid #b89300; }
.exam-dot[aria-current="true"] { outline: 3px solid var(--blue); outline-offset: 1px; font-weight: 600; }
.exam-key { color: var(--steel); display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin: 0 0 0.9rem; }
.exam-key .exam-dot { min-width: 1.1rem; width: 1.1rem; height: 1.1rem; cursor: default; }
.exam-review-link { width: 100%; }

@media (max-width: 56rem) {
  .exam-layout { grid-template-columns: minmax(0, 1fr); }
  .exam-map { position: static; max-height: none; }
  .exam-question { padding: 1.1rem 1rem 1.3rem; }
  .exam-card { padding: 1.2rem 1rem; }
  .exam-clock-label { display: none; }
  .exam-name { font-size: 1.05rem; }
}

/* ---- Staff screens ---- */
.exam-part { margin: 0 0 2.4rem; }
.exam-part-head { margin-bottom: 0.6rem; }
.exam-retired th, .exam-retired td { color: var(--steel); }
.exam-settings { margin-top: 1.4rem; }
.exam-form-pattern { max-width: 16rem; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.15em; text-transform: uppercase; }
.exam-sheets { margin-bottom: 0.6rem; }
.exam-seat { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 1rem; margin-top: 0.4rem; font-size: 0.95rem; }
.exam-grant { padding: 0.7rem 0; border-top: 1px solid var(--line-soft); }
.exam-grant .row-title { margin: 0 0 0.4rem; }
.exam-roles { margin: 0; }
.exam-roles dt { font-weight: 600; }
.exam-roles dd { margin: 0 0 0.7rem; }
.exam-source { width: 100%; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92rem; line-height: 1.45; }
.exam-format { margin-top: 1.6rem; }
.exam-format pre { background: var(--paper); border: 1px solid var(--line); padding: 0.8rem 1rem; overflow-x: auto; font-size: 0.9rem; line-height: 1.45; }
.exam-import-check { margin-bottom: 1.4rem; max-height: 26rem; overflow-y: auto; }
.exam-edit-choices { border: 1px solid var(--line); padding: 0.8rem 1rem 1rem; margin: 0 0 1.2rem; }
.exam-edit-choices legend { font-weight: 600; padding: 0 0.4rem; }
.exam-edit-choice { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.exam-edit-choice textarea { flex: 1 1 auto; min-height: 2.4rem; }
.exam-edit-right { display: flex; align-items: center; }
.exam-edit-right input { width: auto; }
.exam-review-item .exam-body { margin-bottom: 0.8rem; }
.exam-key-list { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.3rem; }
.exam-key-list li { padding: 0.35rem 0.6rem; border: 1px solid var(--line-soft); }
.exam-key-list li.is-right { border-color: var(--gas-oxygen); }
.exam-key-list li.is-chosen { background: var(--paper); }

.exam-rubric summary { cursor: pointer; font-weight: 600; }
.exam-anchors { margin: 0.7rem 0; padding-left: 1.6rem; }
.exam-grade h3 { margin-top: 1rem; font-size: 1.1rem; }
.exam-points { margin: 0 0 0.8rem; }
.exam-points summary { cursor: pointer; font-weight: 600; }
.exam-points .exam-body { margin-top: 0.4rem; color: #323b49; }
.exam-fail-when { border-left: 4px solid var(--alarm); padding-left: 0.8rem; }
.exam-scores { border: 0; margin: 0 0 0.8rem; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.exam-scores legend { font-weight: 600; padding: 0; margin-bottom: 0.3rem; }
.exam-score { display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.exam-score input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.exam-score span { display: inline-flex; align-items: center; justify-content: center; width: 2.8rem; height: 2.6rem; border: 1px solid var(--steel); border-radius: 3px; font-family: var(--display); font-weight: 600; font-size: 1.4rem; background: #fff; }
.exam-score input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.exam-score input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.exam-scores:disabled .exam-score { cursor: default; opacity: 0.75; }
.exam-autofail { margin-left: 1rem; color: var(--alarm); }
.exam-grade-actions { position: sticky; bottom: 0; background: var(--paper); padding: 0.8rem 0; border-top: 1px solid var(--line); }

/* ---- The paper copy ---- */
.exam-paper { background: #fff; max-width: 50rem; margin: 0 auto; padding: 1.5rem; }
.exam-paper-bar { display: flex; justify-content: space-between; gap: 1rem; background: var(--paper); padding: 0.5rem 0.8rem; font-size: 0.9rem; color: var(--steel); }
.exam-paper-head h1 { font-size: 2rem; margin-bottom: 0.2em; }
.exam-paper-name { margin-top: 1.2rem; }
.exam-paper-name span { display: inline-block; width: 16rem; border-bottom: 1px solid var(--ink); margin: 0 1.5rem 0 0.4rem; }
.exam-paper-instructions { border: 1px solid var(--line); padding: 0.7rem 1rem; margin: 1rem 0; }
.exam-paper-questions > li { margin: 0 0 1.3rem; break-inside: avoid; }
.exam-paper-choices { margin: 0.4rem 0 0; }
.exam-paper-lines { height: 15rem; margin-top: 0.6rem; background: repeating-linear-gradient(to bottom, transparent 0, transparent 1.85rem, #9aa3ae 1.85rem, #9aa3ae 1.9rem); }
.exam-paper-key { columns: 4; column-gap: 2rem; }
.exam-paper-key li { break-inside: avoid; margin-bottom: 0.2rem; }
@media print {
  .exam-paper-bar { display: none; }
  .exam-paper { padding: 0; max-width: none; }
}

/* Equipment review: the examiner's scoresheet and the sheet editor. */
.eqreview-group .review-prompts { margin: 0.6rem 0 1rem; padding-left: 1.4rem; }
.eqreview-group .review-prompts li { margin-bottom: 0.45rem; }
.eqreview-group .review-key { margin: 0.1rem 0 0 1.7rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; white-space: pre-wrap; }
textarea.mono { width: 100%; }
.eqreview-group .review-note { margin: 0.1rem 0 0 1.7rem; font-size: 0.9rem; }
.eqreview-group .review-note > summary { cursor: pointer; color: var(--muted, #5a6670); font-size: 0.85rem; list-style: none; }
.eqreview-group .review-note > summary::before { content: '+ '; }
.eqreview-group .review-note[open] > summary::before { content: ''; }
.eqreview-group .review-note > input { display: block; width: min(100%, 40rem); margin-top: 0.2rem; }


/* ---- forums.css ---- */
/* Forums */

/* Lists of forums: a sub-forum is set in from its parent. */
.forum-rows .forum-sub, .forum-admin .forum-sub { padding-left: 2.6rem; }
.forum-rows .row-title { font-size: 1.08rem; }
.forum-rows .forum-sub .row-title { font-size: 1rem; }
.forum-list-heading { font-size: 1.35rem; }
.forum-rows .badge, .topic-rows .badge { margin-left: 0.25rem; }

/* A discussion: one block per message. */
.posts { background: var(--surface); border: 1px solid var(--line); }
.post { padding: 1rem 1.3rem 0.9rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.post:last-child { border-bottom: 0; }
.post:target { border-left: 6px solid var(--blue); padding-left: calc(1.3rem - 6px); }
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.9rem; margin-bottom: 0.6rem; }
.post-author { font-weight: 600; }
.post .content > :last-child, .post .content blockquote > :last-child { margin-bottom: 0; }
.post-hidden { background: #fafbfc; }
.post-removed { margin: 0 0 0.4rem; font-style: italic; color: var(--steel); }
.post-hidden .content { margin-top: 0.6rem; padding-left: 0.9rem; border-left: 4px solid var(--line); }

/* The row of things a person can do with a message. */
.post-tools { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1.2rem; margin-top: 0.8rem; font-size: 0.92rem; }
.post-tools form { margin: 0; }
.post-tools details { margin: 0; }
.post-tools details[open] { flex: 1 1 100%; }
.post-tools summary { font-weight: 400; }
.post-tools details form { margin-top: 0.2rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 0.15em; }
.linkish:hover { color: var(--blue-deep); }

.forum-disclaimer { margin: 1.4rem 0; }
.forum-disclaimer .content { background: var(--surface); border: 1px solid var(--line); padding: 0.8rem 1rem; }
.forum-disclaimer .content > :last-child { margin-bottom: 0; }

.mod-tools { border-left: 6px solid var(--gas-wagd); }

/* "Discussions I follow" on My MGPHO */
.forum-follows { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.forum-follows li { padding: 0.45rem 0; border-bottom: 1px solid var(--line-soft); }
.forum-follows .row-meta { display: block; }
.forum-follows li:last-child { border-bottom: 0; }
.forum-follows a { font-weight: 600; }

/* Admin */
.forum-admin { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 1px solid var(--line-soft); }
.forum-admin > li { padding: 0.8rem 0; border-bottom: 1px solid var(--line-soft); }
.forum-admin p { margin: 0 0 0.2rem; }
.forum-admin-name { font-size: 1.08rem; }
.forum-admin-check { align-self: end; }
.report > form { margin-top: 0.9rem; }
.reported { border-left: 4px solid var(--line); padding: 0.1rem 0 0.1rem 1rem; }
.reported p { margin: 0 0 0.4rem; }
.reported .content > :last-child { margin-bottom: 0; }

@media (max-width: 40rem) {
  .forum-rows .forum-sub, .forum-admin .forum-sub { padding-left: 1.8rem; }
  .post { padding-left: 1rem; padding-right: 1rem; }
  .post:target { padding-left: calc(1rem - 6px); }
}


/* ---- join.css ---- */
/* Join MGPHO, the contact form and the administrators' inbox. */

/* The two membership levels at the top of the Join page */
.join-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; list-style: none; margin: 0 0 1.4rem; padding: 0; max-width: 44rem; }
.join-levels li { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--ink); padding: 0.8rem 1.1rem 0.9rem; }
.join-levels h2 { font-size: 1.35rem; margin: 0 0 0.1em; }
.join-levels p { margin: 0; color: var(--steel); }
.join-price { font-family: var(--display); font-weight: 600; font-size: 2.2rem; line-height: 1; color: var(--ink); }

/* Parts of the long application form */
.join-section { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
h3.join-section { margin-bottom: 0.7rem; }
fieldset.join-section { border-top: 0; margin-top: 1rem; padding-top: 0; }
.join-section-note { margin: -0.4rem 0 0.8rem; }

/* Text a person typed, shown with its line breaks */
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-preview { overflow-wrap: anywhere; }

/* Application review */
.join-pictures { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.join-pictures figure { margin: 0; max-width: 14rem; }
/* A fieldset's legend set like a panel heading */
.choices .join-legend { font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.08; margin-bottom: 0.5em; }
.join-choice { border-top: 1px solid var(--line-soft); padding: 0.8rem 0 0.4rem; }
.join-choice-detail { margin: 0 0 0.6rem 1.6rem; font-size: 0.97rem; }
.join-list-title { margin-bottom: 0.3rem; font-weight: 500; }
.join-date { margin-top: 1rem; }
.join-date input { max-width: 16rem; }


/* ---- memberadmin.css ---- */
/* Members list: a tick box per person and the actions for the ticked ones. */
.tick-cell { width: 2rem; }
.tick-cell input { width: auto; }
.bulk-actions { margin: 0.7rem 0 1.4rem; }


/* ---- pages.css ---- */
/* Editable pages and news (src/modules/pages). */

/* A page or post as visitors read it */
.article-edit { float: right; margin: 0.6rem 0 0.5rem 1.5rem; font-size: 0.93rem; }
.article-meta { color: var(--steel); margin: -0.4rem 0 1.2rem; }
.article .lede { margin-bottom: 1.4rem; }

/* The editor */
.preview { border-top: 5px solid var(--gas-air); }
.preview-title { font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.08; margin: 0 0 0.5em; }
.format-help ul { margin: 0 0 0.6rem; padding-left: 1.2rem; }
.format-help li { margin-bottom: 0.25rem; }
.format-help code { background: #e8ecf1; padding: 0.05em 0.3em; border-radius: 2px; font-size: 0.92em; white-space: nowrap; }
.history { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.history li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line-soft); }
.history li:last-child { border-bottom: 0; }
.section-gap { margin-top: 1.4rem; }

@media (max-width: 40rem) {
  /* Beside a long title the edit link squeezes it; put the link on its own line. */
  .article-edit { float: none; margin: 0 0 0.5rem; }
}


/* ---- payments.css ---- */
/* Card payments: the "Pay by card" box on a registration or application page. */
.pay-box { margin: 1rem 0 1.4rem; padding: 0.9rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--gas-oxygen); max-width: 48em; }
.pay-box .hint { margin: 0.6rem 0 0; }


/* ---- records.css ---- */
/* Record history (/admin/records, /board/records). */
.stat-good { border-top-color: var(--gas-oxygen); }
.stat-warn { border-top-color: var(--gas-air); }

.record-timeline { list-style: none; margin: 0 0 2rem; padding: 0; counter-reset: era; }
.record-timeline > li {
  position: relative; counter-increment: era;
  background: var(--surface); border: 1px solid var(--line);
  margin: 0 0 1rem 2.6rem; padding: 1rem 1.3rem 1.1rem;
}
.record-timeline > li::before {
  content: counter(era); position: absolute; left: -2.6rem; top: 0.9rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--blue-deep); color: #fff; font-family: var(--display); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.record-timeline > li:not(:last-child)::after {
  content: ""; position: absolute; left: -1.7rem; top: 2.9rem; bottom: -1.1rem; width: 2px; background: var(--line);
}
.record-timeline h2 { font-size: 1.45rem; margin: 0 0 0.5rem; }
.record-timeline .era { margin: 0; color: var(--steel); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.record-timeline .plain-list { margin: 0.4rem 0 0.6rem; padding-left: 1.2rem; }
.record-timeline .plain-list li { margin: 0.25rem 0; }
.record-timeline table.compact { max-width: 46rem; }
table.compact th, table.compact td { padding-top: 0.35rem; padding-bottom: 0.35rem; }
table.compact .num { text-align: right; }

.year-bars { display: flex; align-items: flex-end; gap: 0.35rem; margin: 1rem 0 0; padding: 0; flex-wrap: wrap; }
.year-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 2.4rem; height: 9.5rem; }
.year-bar .bar { display: block; width: 100%; background: var(--blue); }
.year-bar .year-n { font-size: 0.8rem; color: var(--steel); font-variant-numeric: tabular-nums; }
.year-bar .year-y { font-size: 0.8rem; font-weight: 600; }
.year-bars figcaption { flex-basis: 100%; color: var(--steel); font-size: 0.85rem; margin-top: 0.4rem; }
.bar-1 { height: 0.35rem; } .bar-2 { height: 0.70rem; } .bar-3 { height: 1.05rem; } .bar-4 { height: 1.40rem; } .bar-5 { height: 1.75rem; }
.bar-6 { height: 2.10rem; } .bar-7 { height: 2.45rem; } .bar-8 { height: 2.80rem; } .bar-9 { height: 3.15rem; } .bar-10 { height: 3.50rem; }
.bar-11 { height: 3.85rem; } .bar-12 { height: 4.20rem; } .bar-13 { height: 4.55rem; } .bar-14 { height: 4.90rem; } .bar-15 { height: 5.25rem; }
.bar-16 { height: 5.60rem; } .bar-17 { height: 5.95rem; } .bar-18 { height: 6.30rem; } .bar-19 { height: 6.65rem; } .bar-20 { height: 7.00rem; }

.record-load { margin-top: 2rem; }
.record-load pre { overflow-x: auto; background: var(--paper); padding: 0.6rem 0.8rem; font-size: 0.85rem; }

@media (max-width: 40rem) {
  .record-timeline > li { margin-left: 2.2rem; }
  .record-timeline > li::before { left: -2.2rem; }
  .record-timeline > li:not(:last-child)::after { left: -1.3rem; }
}
