/* Class calendar: the app's landing page (calendar.js) and the public page (classes.html). */
:root {
  --k0: #0f7c8c; --k1: #b4532a; --k2: #5b4bb0; --k3: #1e8a5a; --k4: #a0377a; --k5: #4f6a73;
  --k6: #1d5fae; --k7: #8a5300; --k8: #4d6b1a; --k9: #a1213f;   /* event-type colors */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --k0: #5fc4cf; --k1: #f0a07a; --k2: #a99cf0; --k3: #6fd296; --k4: #ec8fc9; --k5: #93a9b2; --k6: #8ab8f5; --k7: #f0b44c; --k8: #b4d97a; --k9: #f49ab0; }
}
:root[data-theme="dark"] { --k0: #5fc4cf; --k1: #f0a07a; --k2: #a99cf0; --k3: #6fd296; --k4: #ec8fc9; --k5: #93a9b2; --k6: #8ab8f5; --k7: #f0b44c; --k8: #b4d97a; --k9: #f49ab0; }
.k0 { --k: var(--k0); } .k1 { --k: var(--k1); } .k2 { --k: var(--k2); } .k3 { --k: var(--k3); } .k4 { --k: var(--k4); } .k5 { --k: var(--k5); }
.k6 { --k: var(--k6); } .k7 { --k: var(--k7); } .k8 { --k: var(--k8); } .k9 { --k: var(--k9); }

.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--k, var(--muted)); margin-right: 6px; vertical-align: 0; flex-shrink: 0; }
.cal-dot.draft { background: transparent; border: 1.5px dashed var(--muted); }
.cal-h { font-size: 13px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-top: 6px; }
.roster .cal-status { font-family: var(--font-body); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 0 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); margin-left: 4px; }
.roster .cal-status.on { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.roster .nm { display: flex; align-items: center; }

.cal-nav { display: flex; gap: 6px; }
.cal-nav .btn { min-width: 40px; min-height: 36px; }
.cal { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow span { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 8px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 96px; padding: 4px 4px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day[data-cact] { cursor: pointer; }
.cal-day[data-cact]:hover { background: var(--accent-soft); }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .cal-num { opacity: .45; }
.cal-day.past:not(.out) .cal-num { color: var(--muted); }
.cal-num { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; padding: 1px 5px; align-self: flex-start; border-radius: 99px; }
.cal-day.today .cal-num { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cal-ev {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font: 600 12px/1.25 var(--font-body);
  padding: 3px 6px; border-radius: 4px; color: #fff; background: var(--k, var(--accent));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-ev small { font-weight: 400; opacity: .85; font-family: var(--font-mono); font-size: 10px; }
.cal-ev.draft { background: transparent; color: var(--k, var(--ink)); border: 1.5px dashed var(--k, var(--muted)); padding: 1.5px 4.5px; }
.cal-ev:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cal-ev:not(.draft) { color: #062027; } }
:root[data-theme="dark"] .cal-ev:not(.draft) { color: #062027; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; }

@media (max-width: 640px) {
  .cal-dow span { padding: 4px 2px; text-align: center; font-size: 10px; letter-spacing: 0; }
  .cal-day { min-height: 64px; padding: 2px; }
  .cal-num { font-size: 11px; padding: 0 3px; }
  .cal-ev { font-size: 0; padding: 0; height: 8px; border-radius: 3px; }
  .cal-ev small { display: none; }
  .cal-ev.draft { padding: 0; }
}

.cal-pub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); margin-bottom: 6px; }
.cal-pub.on { border: 1.5px solid var(--ok-mark); background: var(--ok-bg); }
.cal-date { display: flex; gap: 6px; align-items: center; }
.cal-date input { flex: 1; min-width: 0; }
.cal-acts { white-space: nowrap; }
.cal-acts .btn + .btn { margin-left: 4px; }
.row-actions select { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-width: 100%; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.cal-steps { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; max-width: 70ch; }
.panel a { color: var(--accent); }

/* ---------- public page ---------- */
.pub { max-width: 1040px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 20px; }
.pub-hero h1 { font-size: clamp(28px, 5vw, 40px); }
.pub-hero p { color: var(--muted); max-width: 62ch; margin: 6px 0 0; }
.pub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pub-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--k, var(--accent)); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 16px; }
.pub-card:target { outline: 2px solid var(--k, var(--accent)); outline-offset: 2px; }
.pub-card h3 { font-size: 21px; }
.pub-card .when { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.pub-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; font-size: 14px; }
.pub-card dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; align-self: center; }
.pub-card dd { margin: 0; }
.pub-card p { margin: 0; white-space: pre-line; font-size: 14px; }
.pub-card .seats { align-self: flex-start; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 1px 9px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); }
.pub-card .seats.low { background: var(--ip-bg); color: var(--ip); }
.pub-card .seats.full { background: var(--bad-bg); color: var(--bad); }
.pub-card .cert-req { margin: 0; font-size: 14px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2, rgba(0,0,0,.04)); }
.pub-card .cert-check { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--muted, inherit); }
.pub-card .cert-check a { color: inherit; }
.pub-card .cert-check.ok { color: var(--ok); font-weight: 600; }
.pub-card .cert-check.no { color: var(--bad); }
.pub-card .btn { align-self: flex-start; margin-top: auto; text-decoration: none; }
.pub-month { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pub-month h2 { font-size: 24px; }
.pub .cal-ev { text-decoration: none; }
.pub-foot { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.pub-foot a { color: var(--accent); }
.pub .msg { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 32px 18px; text-align: center; color: var(--muted); }

/* Calendar page: one wide panel; New class and Publish sit in its toolbar, upcoming classes below the month. */
.shell.single { grid-template-columns: minmax(0, 1fr); }
.cal-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-tools .btn, .cal-nav .btn { min-height: 36px; }
.cal-upcoming { margin-top: 8px; }
.cal-upcoming ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.cal-upcoming li button { border: 1px solid var(--line); background: var(--surface-2); height: 100%; }
.cal-upcoming li button:hover { border-color: var(--accent); }
.cal-upcoming > .btn { align-self: flex-start; }

/* ---------- Available classes (available-classes.html) ---------- */
.course-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.course-group h2 { font-size: 24px; }
.course-group p { margin: 0; color: var(--muted); font-size: 14px; }
a.course-card { color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.course-card:hover, a.course-card:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.course-card .facts { display: flex; flex-wrap: wrap; gap: 6px; }
.course-card .facts span { font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 1px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink); }
.course-card .facts .soon { background: var(--ok-bg); color: var(--ok); }
.course-card .more { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 14px; }
.pub .back { color: var(--accent); font-weight: 600; text-decoration: none; }
.pub > p { margin: 0; }
.course-detail h2 { font-size: 22px; margin-bottom: 10px; }
.course-facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.course-facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding-top: 3px; }
.course-facts dd { margin: 0; }
.course-facts ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.course-detail .src { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.course-dates { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.course-dates span { font-family: var(--font-mono); font-size: 13px; }
.course-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.course-actions .btn { text-decoration: none; }
@media (max-width: 560px) { .course-facts { grid-template-columns: 1fr; gap: 2px; } .course-facts dd { margin-bottom: 8px; } }

/* ---------- Request a class (request.html) and class requests on the instructor's Calendar ---------- */
.req-form { display: flex; flex-direction: column; gap: 10px; }
.req-form .field select, .req-form .field textarea { width: 100%; }
.req-info { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.req-info p { margin: 0; }
.req-info a { color: var(--accent); }
.req-info ul { margin: 6px 0 0; padding-left: 18px; }
.req-info summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.req-cal .cal-day { min-height: 64px; }
.req-cal .cal-day[data-day] { cursor: pointer; }
.req-cal .cal-day[data-day]:hover, .req-cal .cal-day[data-day]:focus-visible { background: var(--accent-soft); outline: none; }
.req-cal .cal-day[data-day]:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.req-cal .cal-day[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.req-cal .cal-day[aria-disabled="true"]:not(.out) { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, transparent 6px 12px); }
.req-cal .cal-day[aria-disabled="true"] .cal-num { color: var(--muted); }
.req-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-tag.pick { background: var(--accent); color: var(--accent-ink); }
.req-tag.taken { background: var(--bad-bg); color: var(--bad); }
.req-tag.request { background: var(--ip-bg); color: var(--ip); border: 1px dashed currentColor; }
.req-count { margin: 0; font-weight: 600; }
.req-count .ok { color: var(--ok); }
.req-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.req-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.req-list li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.req-list .when { font-family: var(--font-mono); font-size: 13px; }
.req-list .hint { margin: 0; }
.req-list .req-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.req-list .req-acts input { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; flex: 1 1 200px; }
.req-status { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 1px 8px; border-radius: 99px; }
.req-status.wait { background: var(--ip-bg); color: var(--ip); }
.req-status.ok { background: var(--ok-bg); color: var(--ok); }
.req-status.no { background: var(--surface-2); color: var(--muted); }
@media (max-width: 560px) { .req-cal .cal-day { min-height: 52px; padding: 2px; } .req-tag { font-size: 9px; padding: 0 3px; } }
.cal-reqs { margin: 4px 0 16px; }
.cal-reqs .req-list li > div:first-child { flex: 1 1 300px; }
.cal-reqs .req-acts { flex: 0 1 380px; }
.cal-reqs .req-acts input { width: 100%; flex-basis: 100%; }
.cal-reqs .req-acts { justify-content: flex-start; } .cal-reqs .req-acts .btn { flex: 0 0 auto; }

/* ---------- Nitrox calculator (nitrox.html) ---------- */
.nx-settings { display: flex; flex-wrap: wrap; gap: 14px; padding: 14px 18px; }
.nx-settings .field { min-width: 160px; }
.nx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.nx-card { display: flex; flex-direction: column; gap: 10px; }
.nx-card h2 { font-size: 22px; }
.nx-card .hint { margin: 0; }
.nx-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.nx-result { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); border-left: 4px solid var(--accent); }
.nx-result .nx-main { font-family: var(--font-display); font-size: 30px; line-height: 1.1; color: var(--ink); }
.nx-result .nx-sub { font-size: 14px; color: var(--ink); }
.nx-result.warn { background: var(--ip-bg); border-left-color: var(--ip); }
.nx-result.bad { background: var(--bad-bg); border-left-color: var(--bad); }
.nx-note { font-size: 14px; color: var(--muted); max-width: 75ch; margin: 0; }

/* Calculator / Learning switch, and the Learning view's step-by-step work. */
.nx-mode { display: inline-flex; align-self: flex-start; border: 1px solid var(--accent); border-radius: 99px; padding: 3px; background: var(--surface); gap: 2px; }
.nx-mode button { border: 0; background: transparent; padding: 7px 18px; border-radius: 99px; font-weight: 600; color: var(--accent); cursor: pointer; min-height: 36px; }
.nx-mode button.on { background: var(--accent); color: var(--accent-ink); }
.nx-mode button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nl-key h2 { font-size: 20px; margin: 0 0 6px; }
.nl-key ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.nl-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-work { display: flex; flex-direction: column; gap: 10px; }
.nl-goal { margin: 0; font-weight: 600; }
.nl-formula { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line); }
.nl-formula code, .nl-math code { font-family: var(--font-mono); font-size: 15px; }
.nl-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nl-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.nl-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; background: var(--surface-2); border: 2px solid var(--line); color: var(--muted); }
.nl-step.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.nl-step.current .nl-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nl-step.done .nl-num { background: var(--ok-bg); border-color: var(--ok-mark); color: var(--ok); }
.nl-step.locked { opacity: .6; }
.nl-step h3 { font-size: 16px; margin: 3px 0 2px; font-family: var(--font-body); }
.nl-name { color: var(--muted); font-weight: 400; }
.nl-why { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.nl-sym { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.nl-math { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.nl-ans { width: 7.5em; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-family: var(--font-mono); }
.nl-ans:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.nl-unit { font-size: 14px; color: var(--muted); }
.nl-fb { margin: 6px 0 0; font-size: 14px; }
.nl-fb:empty { display: none; }
.nl-fb.ok { color: var(--ok); font-weight: 600; }
.nl-fb.bad { color: var(--bad); }
.nl-fb.shown { color: var(--ip); }
.nl-work .nx-result { margin-top: 0; }

/* Read-only calendar for anyone who isn't an Instructor or Admin. */
.cal-upcoming li .cal-ro { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; height: 100%; }
span.cal-ev { cursor: default; }
span.cal-ev:hover { filter: none; }

/* Settings → Calendar event types. */
.cal-types { margin: 8px 0 24px; }
.cal-types td input:not([type=checkbox]), .cal-types td select { width: 100%; min-width: 120px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cal-types td:nth-child(2) input { min-width: 220px; }
.cal-type-color { display: flex; align-items: center; gap: 4px; }
.cal-types .chk { white-space: nowrap; }
.cal-types td.meta { white-space: nowrap; }

/* Dive Team 6 (dive-team-6.html): the DT6 logo on a black panel, gold on black like the logo. */
.dt6-panel { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px; border-radius: 14px; background: #04080b; color: #e9dcc0; border: 1px solid #3a2f17; }
.dt6-logo { width: 100%; height: auto; display: block; border-radius: 8px; }
.dt6-text { display: flex; flex-direction: column; gap: 12px; }
.dt6-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #c9a24a; }
.dt6-panel h1 { font-family: var(--font-display); font-size: clamp(36px, 6vw, 56px); line-height: 1; color: #d9ae4f; margin: 0; letter-spacing: .02em; }
.dt6-lead { font-size: 19px; margin: 0; }
.dt6-motto { margin: 0; display: flex; flex-direction: column; gap: 2px; border-left: 3px solid #c9a24a; padding-left: 12px; }
.dt6-motto i { font-family: var(--font-display); font-style: normal; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; color: #d9ae4f; }
.dt6-motto span { font-size: 14px; color: #b9ad94; }
.dt6-soon { padding: 12px 14px; border-radius: 10px; background: rgba(217, 174, 79, .1); border: 1px dashed #8a6d2a; }
.dt6-links { display: flex; flex-wrap: wrap; gap: 8px; }
.dt6-links .btn { text-decoration: none; }
.dt6-links .btn.primary { background: #c9a24a; border-color: #c9a24a; color: #04080b; }
.dt6-links .btn:not(.primary) { background: transparent; color: #e9dcc0; border-color: #8a6d2a; }
@media (max-width: 760px) { .dt6-panel { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 18px; } .dt6-logo { max-width: 360px; margin: 0 auto; } }

/* Members-only gate (members-only.js) on the Tools pages */
.members-gate { display: grid; }
.members-gate[hidden], main[hidden] { display: none !important; }
.gate-card { max-width: 620px; margin: 24px auto; padding: 28px; text-align: center; }
.gate-card h1 { font-size: clamp(26px, 4.5vw, 36px); margin: 6px 0 10px; }
.gate-card p { color: var(--muted); }
.gate-card .row-actions { justify-content: center; margin-top: 16px; }

/* Diving Physics – Made Simple (diving-physics.js) */
#physics { display: grid; gap: 18px; }
.pm-big { display: grid; gap: 8px; }
.pm-big p { margin: 0; max-width: 72ch; font-size: 17px; }
.pm-toc-list { margin: 0; padding-left: 22px; columns: 2 260px; column-gap: 28px; }
.pm-toc-list li { margin: 2px 0; }
.pm-score { font-weight: 600; color: var(--accent); }
.pm-score:empty { display: none; }
.pm-part { scroll-margin-top: 16px; }
.pm-part p, .pm-part ul { max-width: 72ch; }
.pm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.pm-head h2 { margin: 0; font-size: clamp(20px, 3.4vw, 26px); }
.pm-num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--thermo); color: #fff; font-family: var(--font-mono); font-weight: 600; }
.pm-rule { background: var(--accent-soft); border-left: 4px solid var(--shallows); padding: 8px 12px; border-radius: 6px; }
.pm-why { border-top: 1px dashed var(--line); padding-top: 10px; }
.pm-quiz { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.pm-q { margin: 0 0 8px; }
.pm-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-opts .btn.pm-right { background: var(--ok-bg); border-color: var(--ok-mark); color: var(--ok); }
.pm-opts .btn.pm-wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.pm-fb { margin: 8px 0 0; font-weight: 600; min-height: 1.4em; }
.pm-fb.ok { color: var(--ok); } .pm-fb.bad { color: var(--bad); }
.pm-sim { margin: 14px 0; padding: 14px; border-radius: 12px; background: linear-gradient(180deg, #d8f1f4 0%, #2c6c7c 100%); color: #06222d; }
.pm-sim-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pm-sim-ctl input[type=range] { flex: 1 1 220px; accent-color: #0b4a5a; }
.pm-units { display: inline-flex; border: 1px solid #0b4a5a; border-radius: 999px; overflow: hidden; }
.pm-units button { border: 0; background: transparent; padding: 4px 12px; cursor: pointer; color: inherit; font: inherit; }
.pm-units button.on { background: #0b4a5a; color: #fff; }
.pm-sim-view { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 10px; }
.pm-sim-view svg { width: 140px; height: 140px; }
.pm-ghost { fill: none; stroke: rgba(255, 255, 255, .7); stroke-dasharray: 4 5; stroke-width: 2; }
.pm-ball { fill: rgba(255, 255, 255, .85); stroke: #0b4a5a; stroke-width: 2; transition: r .15s ease; }
.pm-sim-view dl { margin: 0; display: grid; grid-template-columns: auto auto; gap: 4px 14px; }
.pm-sim-view dt { font-weight: 600; } .pm-sim-view dd { margin: 0; font-family: var(--font-mono); }
.pm-sim .hint { color: #fff; margin: 10px 0 0; }

/* Law colours, as on the printed handout: Boyle blue, Dalton teal, Henry amber */
.pm-boyle { --law: var(--pr); --law-bg: var(--pr-bg); }
.pm-dalton { --law: var(--accent); --law-bg: var(--accent-soft); }
.pm-henry { --law: var(--ip); --law-bg: var(--ip-bg); }
.pm-law { border-top: 6px solid var(--law); }
.pm-law .pm-num { background: var(--law); color: var(--surface); }
.pm-law h2 { color: var(--law); }
.pm-law .pm-rule { background: var(--law-bg); border-left-color: var(--law); }
.pm-toc-list li[class] a, .pm-connect li[class] b { color: var(--law); }
.pm-ata-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0; }
.pm-ata-list li { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.pm-fig { margin: 16px 0; }
.pm-fig svg { display: block; width: 100%; max-width: 640px; height: auto; color: var(--ink); }
.pm-fig figcaption { color: var(--muted); font-size: 15px; max-width: 72ch; margin-top: 6px; }
.pm-svg-big { font-family: var(--font-display); font-weight: 700; font-size: 26px; fill: var(--ink); }
.pm-svg-txt { font-family: var(--font-body); font-size: 19px; fill: var(--muted); }
.pm-svg-b { font-weight: 700; fill: var(--ink); }
.pm-breath { fill: var(--surface-2); stroke: var(--accent); stroke-width: 2.5; }
.pm-o2, .pm-key-o2 { fill: #d7263d; background: #d7263d; }
.pm-n2, .pm-key-n2 { fill: #5b7f8c; background: #5b7f8c; }
.pm-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin: 0 4px 0 8px; }
.pm-key:first-child { margin-left: 0; }
.pm-bottle { fill: var(--surface-2); stroke: var(--ink); stroke-width: 2.5; }
.pm-soda { fill: #8a4b1c; opacity: .85; }
.pm-cap { fill: #d7263d; }
.pm-dissolved { fill: #f3d2a6; }
.pm-fizz { fill: #ffffff; stroke: #8a4b1c; stroke-width: 1.2; }
.pm-connect ol { margin: 6px 0 0; padding-left: 22px; max-width: 72ch; }
.pm-connect li { margin: 6px 0; }
.pm-land { margin: 16px 0 0; padding: 14px 18px; border-left: 5px solid var(--shallows); background: var(--accent-soft); border-radius: 8px; font-family: var(--font-display); font-size: clamp(18px, 3vw, 22px); font-weight: 600; line-height: 1.4; }
.pm-which .pm-quiz { margin-top: 10px; }
.pm-more-h { margin: 10px 0 -6px; font-size: clamp(22px, 3.6vw, 28px); }

/* Coaching and tours cards at the top of Available classes */
.special-card { border-top: 5px solid var(--shallows); }
.course-card .facts .price { background: var(--accent-soft); color: var(--accent); }
.special-card .course-actions { margin-top: auto; padding-top: 6px; }

/* Staff Settings: Coaching and tours listings editor (offerings.js) */
.of-list { display: grid; gap: 12px; margin: 10px 0; }
.of-card { border: 1px solid var(--line); border-left: 5px solid var(--shallows); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.of-card.off { opacity: .7; border-left-color: var(--line); }
.of-card textarea { min-height: 70px; }
.of-card .row-actions { align-items: center; }
.of-card .row-actions .chk { margin-right: auto; }

/* Map pins (map-pins.js): a little diver-down flag */
.dive-pin { background: none; border: 0; }
.dive-pin svg { width: 26px; height: 30px; display: block; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .45)); }
.dive-pin .pin-n { position: absolute; left: 16px; top: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #0b2a3a; color: #fff;
  font: 700 11px/18px var(--font-body); text-align: center; box-shadow: 0 0 0 2px #fff; }
.leaflet-container { font: 14px/1.4 var(--font-body); background: #aad3df; }
.leaflet-popup-content b { font-family: var(--font-display); font-size: 16px; }

/* Dive map page (dive-map.js) */
.dm-hero a { font-weight: 600; color: var(--accent); }
.dm-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.dm-stats div { flex: 1 1 120px; display: grid; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--shallows); }
.dm-stats b { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--accent); }
.dm-stats span { color: var(--muted); font-size: 14px; }
.dm-panel { padding: 8px; }
.dm-map { height: min(68vh, 560px); min-height: 320px; border-radius: 10px; }
.dm-state { margin: 10px 8px 4px; }
.dm-pop { color: #4f6a73; }
.dm-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.dm-list button, .ms-site, .ms-hit { width: 100%; text-align: left; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.dm-list button:hover, .dm-list button:focus-visible, .ms-site:hover, .ms-site:focus-visible, .ms-hit:hover, .ms-hit:focus-visible { border-color: var(--accent); }
.dm-list span, .ms-site span, .ms-hit span { color: var(--muted); font-size: 14px; }
.dm-list em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--accent); }

/* Places I've dived in the Student portal (dive-sites.js) */
.my-sites[hidden] { display: none !important; }
.acct.my-sites { padding-top: 0; margin-top: -38px; }
.ms-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 10px; }
.ms-map { height: 420px; border-radius: 10px; border: 1px solid var(--line); }
.ms-form { display: grid; gap: 10px; }
.ms-form .field { margin: 0; }
.ms-form textarea { min-height: 64px; }
.ms-search { display: flex; gap: 8px; }
.ms-search input { flex: 1; min-width: 0; }
.ms-results { display: grid; gap: 6px; }
.ms-results:empty { display: none; }
.ms-results .hint { margin: 0; }
.ms-note { margin: 0; font-weight: 600; min-height: 1.3em; }
.ms-note.ok { color: var(--ok); } .ms-note.bad { color: var(--bad); }
.ms-h { margin: 20px 0 8px; }
.ms-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ms-list li { display: flex; gap: 8px; align-items: center; }
.ms-list li > .ms-site { flex: 1; }
.ms-notes { font-style: italic; }
@media (max-width: 760px) { .ms-cols { grid-template-columns: minmax(0, 1fr); } .ms-map { height: 300px; } }
