/* Utilities used by newer templates that are not in the prebuilt tailwind.css.
 *
 * tailwind.css in this project is a COMPILED artefact, checked in during the
 * September release. A Tailwind class that was not in the markup at build time
 * is simply absent from it and does nothing at all — silently. Rather than
 * reintroduce a build step (pnpm/tailwind CLI) just to add a handful of
 * utilities, the ones actually needed are written out here by hand.
 *
 * If the Tailwind build is ever run again, these become harmless duplicates.
 * Everything here matches Tailwind's own definitions for the same class name,
 * so nothing diverges.
 */

/* layout ------------------------------------------------------------------ */
.min-w-\[14rem\] { min-width: 14rem; }
.whitespace-nowrap { white-space: nowrap; }
.resize-y { resize: vertical; }
.pr-3 { padding-right: 0.75rem; }
.ml-1 { margin-left: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.opacity-40 { opacity: 0.4; }

.divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color: #f1f5f9; }

@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1023.98px) {
  .max-lg\:w-full { width: 100%; }
  .max-lg\:justify-start { justify-content: flex-start; }
}

/* colour ------------------------------------------------------------------ */
.bg-\[\#0FA569\]\/5 { background-color: rgba(15, 165, 105, 0.05); }
.border-\[\#0FA569\]\/25 { border-color: rgba(15, 165, 105, 0.25); }
.border-\[\#2D69A5\]\/25 { border-color: rgba(45, 105, 165, 0.25); }
.border-\[\#2D69A5\]\/40 { border-color: rgba(45, 105, 165, 0.40); }
.bg-amber-50\/60 { background-color: rgba(255, 251, 235, 0.6); }
.bg-red-50\/60 { background-color: rgba(254, 242, 242, 0.6); }
.bg-white\/70 { background-color: rgba(255, 255, 255, 0.7); }
.bg-amber-600 { background-color: #d97706; }
.text-amber-900 { color: #78350f; }

/* interaction -------------------------------------------------------------- */
.hover\:bg-amber-700:hover { background-color: #b45309; }
.focus\:ring-amber-400:focus { --tw-ring-color: #fbbf24; box-shadow: 0 0 0 2px #fbbf24; }
.enabled\:hover\:bg-amber-50:enabled:hover { background-color: #fffbeb; }
.enabled\:hover\:border-red-400:enabled:hover { border-color: #f87171; }
.enabled\:hover\:text-red-500:enabled:hover { color: #ef4444; }

/* the principal's summary strip -------------------------------------------- */
.pp-summary > div { transition: transform .18s cubic-bezier(.23,1,.32,1); }
@media (hover: hover) and (pointer: fine) {
  .pp-summary > div:hover { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .pp-summary > div { transition: none; }
  .pp-summary > div:hover { transform: none; }
}

/* dark mode ---------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dark\:bg-amber-950\/20 { background-color: rgba(69, 26, 3, 0.2); }
  :root:not([data-theme="light"]) .dark\:bg-red-950\/20 { background-color: rgba(69, 10, 10, 0.2); }
  :root:not([data-theme="light"]) .dark\:bg-emerald-900\/10 { background-color: rgba(6, 78, 59, 0.1); }
  :root:not([data-theme="light"]) .dark\:bg-red-900\/10 { background-color: rgba(127, 29, 29, 0.1); }
  :root:not([data-theme="light"]) .bg-white\/70 { background-color: rgba(15, 23, 42, 0.55); }
  :root:not([data-theme="light"]) .text-amber-900 { color: #fcd34d; }
  :root:not([data-theme="light"]) .divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color: #1e293b; }
}
:root[data-theme="dark"] .dark\:bg-amber-950\/20 { background-color: rgba(69, 26, 3, 0.2); }
:root[data-theme="dark"] .dark\:bg-red-950\/20 { background-color: rgba(69, 10, 10, 0.2); }
:root[data-theme="dark"] .dark\:bg-emerald-900\/10 { background-color: rgba(6, 78, 59, 0.1); }
:root[data-theme="dark"] .dark\:bg-red-900\/10 { background-color: rgba(127, 29, 29, 0.1); }


/* ===========================================================================
 * Admin forms (.pp-form)
 * ---------------------------------------------------------------------------
 * One look for every form an administrator fills in — setting up a school,
 * editing one, creating an account. Written as plain CSS for the same reason
 * as the utilities above: tailwind.css here is a prebuilt artefact and new
 * classes would not exist in it.
 * ======================================================================== */
  /* ── tokens ─────────────────────────────────────────────────────── */
  .pp-form { --ease-out: cubic-bezier(.23,1,.32,1); }

  /* ── cards ──────────────────────────────────────────────────────── */
  .pp-form .pp-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 1.25rem;
    padding: 1.6rem 1.5rem 1.75rem;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    opacity: 0; transform: translateY(8px);
    animation: pp-rise 340ms var(--ease-out) forwards;
    animation-delay: calc(var(--i) * 60ms);
  }
  @keyframes pp-rise { to { opacity: 1; transform: none; } }

  .pp-form .pp-card-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.4rem; }
  .pp-form .pp-card-head h2 { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
  .pp-form .pp-card-head p { margin: .2rem 0 0; font-size: .8rem; color: #64748b; line-height: 1.5; }
  .pp-form .pp-step {
    flex: none; width: 1.75rem; height: 1.75rem; border-radius: 999px;
    background: #1A2E6E; color: #fff; font-weight: 800; font-size: .8rem;
    display: grid; place-items: center;
  }

  /* ── fields ─────────────────────────────────────────────────────── */
  .pp-form .pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
  .pp-form .pp-span-2 { grid-column: 1 / -1; }
  .pp-form .pp-field label {
    display: block; font-size: .78rem; font-weight: 700; color: #475569;
    margin-bottom: .35rem; letter-spacing: .01em;
  }
  .pp-form .pp-optional { font-weight: 500; color: #94a3b8; text-transform: none; }
  .pp-form .pp-hint { margin: .4rem 0 0; font-size: .73rem; color: #94a3b8; line-height: 1.5; }
  .pp-form .pp-error { margin: .35rem 0 0; font-size: .73rem; font-weight: 600; color: #ef4444; }

  .pp-form input[type="text"], .pp-form input[type="email"],
  .pp-form input[type="url"], .pp-form input[type="password"],
  .pp-form input[type="number"], .pp-form input[type="search"],
  .pp-form input[type="date"], .pp-form input[type="tel"],
  .pp-form textarea, .pp-form select {
    width: 100%; padding: .6rem .75rem; font-size: .9rem;
    border: 1px solid #cbd5e1; border-radius: .7rem; background: #fff; color: #0f172a;
    transition: border-color 160ms ease, box-shadow 160ms ease;
  }
  .pp-form input:focus, .pp-form select:focus, .pp-form textarea:focus {
    outline: none; border-color: #2D69A5; box-shadow: 0 0 0 3px rgba(45,105,165,.14);
  }
  .pp-form select { appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .6rem center; background-size: 1.05rem;
    padding-right: 2.1rem; }

  /* ── checkbox ───────────────────────────────────────────────────── */
  .pp-form .pp-check {
    display: flex; gap: .7rem; align-items: flex-start; padding: .85rem .95rem;
    border: 1px solid #e2e8f0; border-radius: .9rem; cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease;
  }
  .pp-form .pp-check:has(input:checked) { border-color: rgba(15,165,105,.45); background: rgba(15,165,105,.05); }
  .pp-form .pp-check input { margin-top: .15rem; width: 1rem; height: 1rem; accent-color: #0FA569; flex: none; }
  .pp-form .pp-check strong { display: block; font-size: .85rem; font-weight: 700; color: #334155; }
  .pp-form .pp-check em { display: block; margin-top: .15rem; font-size: .75rem; font-style: normal; color: #94a3b8; line-height: 1.5; }

  /* ── actions ────────────────────────────────────────────────────── */
  .pp-form .pp-submit {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #1A2E6E; color: #fff; font-weight: 700; font-size: .9rem;
    padding: .7rem 1.25rem; border: none; border-radius: .85rem; cursor: pointer;
    transition: transform 160ms var(--ease-out), box-shadow 200ms ease, background-color 160ms ease;
  }
  .pp-form .pp-submit:active { transform: scale(.97); }
  .pp-form .pp-cancel {
    font-size: .85rem; font-weight: 600; color: #64748b; text-decoration: none;
    padding: .7rem .9rem; border-radius: .85rem; transition: color 160ms ease, background-color 160ms ease;
  }
  @media (hover: hover) and (pointer: fine) {
    .pp-form .pp-submit:hover { background: #24398a; box-shadow: 0 6px 20px rgba(26,46,110,.22); }
    .pp-form .pp-cancel:hover { color: #0f172a; background: #f1f5f9; }
  }

  .pp-form .pp-alert {
    display: flex; gap: .6rem; align-items: flex-start; padding: .85rem 1rem;
    border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c;
    border-radius: .9rem; font-size: .85rem; font-weight: 600;
  }
  .pp-form .pp-alert p { margin: 0; }

  /* ── small screens ──────────────────────────────────────────────── */
  @media (max-width: 640px) {
    .pp-form .pp-grid { grid-template-columns: 1fr; }
    .pp-form .pp-span-2 { grid-column: auto; }
  }

  /* ── motion ─────────────────────────────────────────────────────── */
  @media (prefers-reduced-motion: reduce) {
    .pp-form .pp-card { animation: none; opacity: 1; transform: none; }
    .pp-form .pp-submit, .pp-form .pp-cancel,
    .pp-form input, .pp-form select, .pp-form .pp-check { transition: none; }
    .pp-form .pp-submit:active { transform: none; }
  }

  /* ── dark ───────────────────────────────────────────────────────── */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pp-form .pp-card { background: #0f172a; border-color: #1e293b; }
    :root:not([data-theme="light"]) .pp-form .pp-card-head h2 { color: #f1f5f9; }
    :root:not([data-theme="light"]) .pp-form .pp-slider-unit { color: #94a3b8; }
    :root:not([data-theme="light"]) .pp-form .pp-card-head p,
    :root:not([data-theme="light"]) .pp-form .pp-hint { color: #94a3b8; }
    :root:not([data-theme="light"]) .pp-form .pp-field label { color: #cbd5e1; }
    :root:not([data-theme="light"]) .pp-form input,
    :root:not([data-theme="light"]) .pp-form select { background: #1e293b; border-color: #334155; color: #e2e8f0; }
    :root:not([data-theme="light"]) .pp-form .pp-check { border-color: #1e293b; }
    :root:not([data-theme="light"]) .pp-form .pp-check strong { color: #e2e8f0; }
    :root:not([data-theme="light"]) .pp-form .pp-alert { background: rgba(127,29,29,.2); border-color: rgba(220,38,38,.4); color: #fca5a5; }
  }

/* ===========================================================================
 * Review-policy sliders
 * ---------------------------------------------------------------------------
 * A range input styled by hand, because the native control gives no sense of
 * scale: the track is filled up to the thumb via --pp-fill, which the page
 * sets on input. Written as plain CSS for the same reason as everything else
 * in this file — tailwind.css here is a prebuilt artefact.
 *
 * The thumb needs its rules duplicated for WebKit and Firefox: a selector
 * list containing an unknown pseudo-element is dropped wholesale by both, so
 * ::-webkit-slider-thumb and ::-moz-range-thumb cannot share a block.
 * ======================================================================== */
.pp-form .pp-slider-row { display: flex; align-items: center; gap: .9rem; }
.pp-form .pp-slider-value {
  font-size: 1.6rem; font-weight: 800; line-height: 1; color: #1A2E6E;
  min-width: 2.2ch; text-align: right; font-variant-numeric: tabular-nums;
}
.pp-form .pp-slider-unit { font-size: .85rem; font-weight: 600; color: #64748b; }

.pp-form input[type="range"].pp-slider {
  --pp-fill: 0%;
  flex: 1; appearance: none; width: 100%; height: 1.5rem;
  background: transparent; padding: 0; border: none; cursor: pointer;
}
.pp-form input[type="range"].pp-slider:focus { outline: none; }

/* track ------------------------------------------------------------------- */
.pp-form input[type="range"].pp-slider::-webkit-slider-runnable-track {
  height: .4rem; border-radius: 999px;
  background: linear-gradient(to right, #2D69A5 var(--pp-fill), #e2e8f0 var(--pp-fill));
}
.pp-form input[type="range"].pp-slider::-moz-range-track {
  height: .4rem; border-radius: 999px; background: #e2e8f0;
}
.pp-form input[type="range"].pp-slider::-moz-range-progress {
  height: .4rem; border-radius: 999px; background: #2D69A5;
}

/* thumb ------------------------------------------------------------------- */
.pp-form input[type="range"].pp-slider::-webkit-slider-thumb {
  appearance: none; width: 1.15rem; height: 1.15rem; margin-top: -.375rem;
  border-radius: 999px; background: #fff; border: 2px solid #2D69A5;
  box-shadow: 0 1px 3px rgba(15,23,42,.18);
  transition: transform 140ms cubic-bezier(.23,1,.32,1), box-shadow 160ms ease;
}
.pp-form input[type="range"].pp-slider::-moz-range-thumb {
  width: 1.15rem; height: 1.15rem; border-radius: 999px;
  background: #fff; border: 2px solid #2D69A5;
  box-shadow: 0 1px 3px rgba(15,23,42,.18);
  transition: transform 140ms cubic-bezier(.23,1,.32,1), box-shadow 160ms ease;
}
.pp-form input[type="range"].pp-slider:active::-webkit-slider-thumb { transform: scale(1.12); }
.pp-form input[type="range"].pp-slider:active::-moz-range-thumb { transform: scale(1.12); }
.pp-form input[type="range"].pp-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(45,105,165,.22);
}
.pp-form input[type="range"].pp-slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(45,105,165,.22);
}

/* a quiet informational panel, distinct from .pp-alert which means trouble - */
.pp-form .pp-notice {
  display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .9rem;
  border: 1px solid #bfdbfe; background: #eff6ff; color: #1e40af;
  border-radius: .9rem; font-size: .8rem; line-height: 1.5;
}
.pp-form .pp-notice p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .pp-form input[type="range"].pp-slider::-webkit-slider-thumb { transition: none; }
  .pp-form input[type="range"].pp-slider::-moz-range-thumb { transition: none; }
  .pp-form input[type="range"].pp-slider:active::-webkit-slider-thumb { transform: none; }
  .pp-form input[type="range"].pp-slider:active::-moz-range-thumb { transform: none; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pp-form .pp-slider-value { color: #93c5fd; }
  :root:not([data-theme="light"]) .pp-form input[type="range"].pp-slider::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #60a5fa var(--pp-fill), #334155 var(--pp-fill));
  }
  :root:not([data-theme="light"]) .pp-form input[type="range"].pp-slider::-moz-range-track { background: #334155; }
  :root:not([data-theme="light"]) .pp-form input[type="range"].pp-slider::-moz-range-progress { background: #60a5fa; }
  :root:not([data-theme="light"]) .pp-form input[type="range"].pp-slider::-webkit-slider-thumb {
    background: #0f172a; border-color: #60a5fa;
  }
  :root:not([data-theme="light"]) .pp-form input[type="range"].pp-slider::-moz-range-thumb {
    background: #0f172a; border-color: #60a5fa;
  }
  :root:not([data-theme="light"]) .pp-form .pp-notice {
    background: rgba(30,58,138,.18); border-color: rgba(96,165,250,.4); color: #bfdbfe;
  }
}
:root[data-theme="dark"] .pp-form .pp-slider-value { color: #93c5fd; }
:root[data-theme="dark"] .pp-form input[type="range"].pp-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #60a5fa var(--pp-fill), #334155 var(--pp-fill));
}
:root[data-theme="dark"] .pp-form .pp-notice {
  background: rgba(30,58,138,.18); border-color: rgba(96,165,250,.4); color: #bfdbfe;
}

/* Explicit dark theme (not just the OS preference) needs the same .pp-form
 * overrides; the original block only handled prefers-color-scheme. */
:root[data-theme="dark"] .pp-form .pp-card { background: #0f172a; border-color: #1e293b; }
:root[data-theme="dark"] .pp-form .pp-card-head h2 { color: #f1f5f9; }
:root[data-theme="dark"] .pp-form .pp-card-head p,
:root[data-theme="dark"] .pp-form .pp-hint,
:root[data-theme="dark"] .pp-form .pp-slider-unit { color: #94a3b8; }
:root[data-theme="dark"] .pp-form .pp-field label { color: #cbd5e1; }
:root[data-theme="dark"] .pp-form input,
:root[data-theme="dark"] .pp-form select { background: #1e293b; border-color: #334155; color: #e2e8f0; }
:root[data-theme="dark"] .pp-form .pp-check { border-color: #1e293b; }
:root[data-theme="dark"] .pp-form .pp-check strong { color: #e2e8f0; }
:root[data-theme="dark"] .pp-form .pp-alert { background: rgba(127,29,29,.2); border-color: rgba(220,38,38,.4); color: #fca5a5; }
:root[data-theme="dark"] .pp-form input[type="range"].pp-slider::-moz-range-track { background: #334155; }
:root[data-theme="dark"] .pp-form input[type="range"].pp-slider::-moz-range-progress { background: #60a5fa; }
:root[data-theme="dark"] .pp-form input[type="range"].pp-slider::-webkit-slider-thumb { background: #0f172a; border-color: #60a5fa; }
:root[data-theme="dark"] .pp-form input[type="range"].pp-slider::-moz-range-thumb { background: #0f172a; border-color: #60a5fa; }

/* Search inputs carry a WebKit decoration and their own appearance that
 * survive the rules above; neutralise both so they match every other field. */
.pp-form input[type="search"] { appearance: none; -webkit-appearance: none; }
.pp-form input[type="search"]::-webkit-search-decoration,
.pp-form input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ===========================================================================
 * Show/hide password
 * ---------------------------------------------------------------------------
 * Added to every password field on the page by the script in base.html, so a
 * teacher typing a system-issued password can check it before submitting.
 * This matters more here than in most products: Pratolee passwords are
 * issued by a principal rather than chosen, and a teacher who cannot see
 * what they typed has no way to tell a typo from a wrong password.
 *
 * Deliberately not scoped to .pp-form — the sign-in page is not a pp-form.
 * ======================================================================== */
.pp-reveal { position: relative; display: block; }
.pp-reveal > input { width: 100%; padding-right: 2.9rem; }

.pp-reveal-btn {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  width: 2rem; height: 2rem; padding: 0;
  background: none; border: none; border-radius: .5rem; cursor: pointer;
  color: #94a3b8; line-height: 1;
  transition: color 160ms ease, background-color 160ms ease;
}
.pp-reveal-btn > svg { display: block; }
/* The slash only appears once the password is showing. */
.pp-reveal-btn .pp-reveal-slash { opacity: 0; transition: opacity 120ms ease; }
.pp-reveal-btn.is-revealed .pp-reveal-slash { opacity: 1; }
/* Belt and braces: nothing inside this button may escape it, whatever
 * fails to load. */
.pp-reveal-btn { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .pp-reveal-btn .pp-reveal-slash { transition: none; }
}
.pp-reveal-btn:focus-visible { outline: 2px solid #2D69A5; outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .pp-reveal-btn:hover { color: #2D69A5; background: rgba(45,105,165,.08); }
}
@media (prefers-reduced-motion: reduce) { .pp-reveal-btn { transition: none; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pp-reveal-btn { color: #64748b; }
  :root:not([data-theme="light"]) .pp-reveal-btn:hover { color: #93c5fd; background: rgba(147,197,253,.1); }
}
:root[data-theme="dark"] .pp-reveal-btn { color: #64748b; }

/* ===========================================================================
 * "Back to my workspace" floating button
 * ---------------------------------------------------------------------------
 * Bottom-right, above everything, on every page except the one it points at.
 * It widens to show its label on hover and focus; on a touch screen it stays
 * collapsed to a circle, because there is no hover there and a permanently
 * wide button would sit on top of page content.
 * ======================================================================== */
.pp-home-fab {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60;
  display: inline-flex; align-items: center; gap: 0;
  height: 3rem; padding: 0 .9rem;
  border-radius: 999px; border: none;
  background: #1A2E6E; color: #fff; text-decoration: none;
  box-shadow: 0 6px 20px rgba(26,46,110,.28);
  transition: gap 200ms cubic-bezier(.23,1,.32,1),
              padding 200ms cubic-bezier(.23,1,.32,1),
              background-color 160ms ease, transform 160ms cubic-bezier(.23,1,.32,1);
}
.pp-home-fab .material-symbols-outlined { font-size: 22px; line-height: 1; }
.pp-home-fab-label {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-size: .85rem; font-weight: 700;
  transition: max-width 220ms cubic-bezier(.23,1,.32,1);
}
.pp-home-fab:active { transform: scale(.96); }

@media (hover: hover) and (pointer: fine) {
  .pp-home-fab:hover { background: #24398a; gap: .5rem; }
  .pp-home-fab:hover .pp-home-fab-label { max-width: 10rem; }
}
.pp-home-fab:focus-visible { outline: 3px solid #0FA569; outline-offset: 2px; gap: .5rem; }
.pp-home-fab:focus-visible .pp-home-fab-label { max-width: 10rem; }

/* Keep clear of the iOS home indicator and Android gesture bar. */
@supports (padding: max(0px)) {
  .pp-home-fab { bottom: max(1.1rem, env(safe-area-inset-bottom)); }
}

@media print { .pp-home-fab { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .pp-home-fab, .pp-home-fab-label { transition: none; }
  .pp-home-fab:active { transform: none; }
}

/* ===========================================================================
 * Certification timeline
 * ---------------------------------------------------------------------------
 * A vertical trail of what has happened to one certification, ending on the
 * present state. The connecting line is drawn on the item rather than the
 * list so the last item can stop it cleanly, and the dot sits on the line
 * instead of beside it.
 * ======================================================================== */
.pp-timeline { list-style: none; margin: 0; padding: 0; }

.pp-timeline-item {
  position: relative; display: flex; gap: .85rem;
  padding: 0 0 1.05rem 0;
}
/* The line, stopped before the final item so the trail ends rather than
   trailing off into nothing. */
.pp-timeline-item:not(:last-child)::before {
  content: ""; position: absolute; left: .32rem; top: 1rem; bottom: 0;
  width: 2px; background: #e2e8f0;
}
.pp-timeline-item:last-child { padding-bottom: 0; }

.pp-timeline-dot {
  flex: none; width: .75rem; height: .75rem; margin-top: .3rem;
  border-radius: 999px; background: #cbd5e1;
  box-shadow: 0 0 0 3px #fff;
  position: relative; z-index: 1;
}
.pp-timeline-good .pp-timeline-dot { background: #0FA569; }
.pp-timeline-warn .pp-timeline-dot { background: #d97706; }
.pp-timeline-wait .pp-timeline-dot { background: #2D69A5; }

.pp-timeline-body { min-width: 0; }
.pp-timeline-label { margin: 0; font-size: .85rem; font-weight: 700; color: #334155; }
.pp-timeline-who { font-weight: 500; color: #94a3b8; }
.pp-timeline-when { margin: .1rem 0 0; font-size: .72rem; color: #94a3b8; }
.pp-timeline-note {
  margin: .35rem 0 0; padding: .45rem .65rem;
  font-size: .78rem; color: #475569; line-height: 1.5;
  background: #f8fafc; border-radius: .55rem; white-space: pre-wrap;
}

/* The present state, called out so nobody has to infer it from the trail. */
.pp-timeline-now .pp-timeline-label { color: #0f172a; }
.pp-timeline-now .pp-timeline-dot {
  width: .9rem; height: .9rem; margin-top: .22rem; margin-left: -.075rem;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(45,105,165,.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pp-timeline-item:not(:last-child)::before { background: #1e293b; }
  :root:not([data-theme="light"]) .pp-timeline-dot { box-shadow: 0 0 0 3px #0f172a; }
  :root:not([data-theme="light"]) .pp-timeline-label { color: #cbd5e1; }
  :root:not([data-theme="light"]) .pp-timeline-now .pp-timeline-label { color: #f1f5f9; }
  :root:not([data-theme="light"]) .pp-timeline-note { background: #1e293b; color: #cbd5e1; }
  :root:not([data-theme="light"]) .pp-timeline-now .pp-timeline-dot {
    box-shadow: 0 0 0 3px #0f172a, 0 0 0 5px rgba(96,165,250,.3);
  }
}
:root[data-theme="dark"] .pp-timeline-item:not(:last-child)::before { background: #1e293b; }
:root[data-theme="dark"] .pp-timeline-dot { box-shadow: 0 0 0 3px #0f172a; }
:root[data-theme="dark"] .pp-timeline-label { color: #cbd5e1; }
:root[data-theme="dark"] .pp-timeline-note { background: #1e293b; color: #cbd5e1; }

/* ===========================================================================
 * Review-policy on/off switches
 * ---------------------------------------------------------------------------
 * A real checkbox, visually hidden but still focusable and still posted, with
 * a drawn track beside it. Plain CSS because tailwind.css is prebuilt.
 * .pp-window[data-off] dims the slider of a stage that is switched off; the
 * slider stays enabled so its number is kept for when the stage comes back.
 * ======================================================================== */
.pp-form .pp-switch {
  display: inline-flex; align-items: center; gap: .65rem;
  margin: .25rem 0 1rem; cursor: pointer; user-select: none;
}
.pp-form .pp-switch-input {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pp-form .pp-switch-track {
  position: relative; flex: none; width: 2.6rem; height: 1.5rem;
  border-radius: 999px; background: #cbd5e1;
  transition: background-color 160ms ease;
}
.pp-form .pp-switch-thumb {
  position: absolute; top: .2rem; left: .2rem; width: 1.1rem; height: 1.1rem;
  border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.25);
  transition: transform 160ms cubic-bezier(.23,1,.32,1);
}
.pp-form .pp-switch-input:checked + .pp-switch-track { background: #2D69A5; }
.pp-form .pp-switch-input:checked + .pp-switch-track .pp-switch-thumb { transform: translateX(1.1rem); }
.pp-form .pp-switch-input:focus-visible + .pp-switch-track { box-shadow: 0 0 0 4px rgba(45,105,165,.22); }
.pp-form .pp-switch-label { font-size: .9rem; font-weight: 600; color: #334155; }
.pp-form .pp-switch-label strong { color: #1A2E6E; }

.pp-form .pp-window { transition: opacity 160ms ease; }
.pp-form .pp-window[data-off] { opacity: .4; }

@media (prefers-reduced-motion: reduce) {
  .pp-form .pp-switch-track, .pp-form .pp-switch-thumb, .pp-form .pp-window { transition: none; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pp-form .pp-switch-input:not(:checked) + .pp-switch-track { background: #334155; }
  :root:not([data-theme="light"]) .pp-form .pp-switch-label { color: #cbd5e1; }
  :root:not([data-theme="light"]) .pp-form .pp-switch-label strong { color: #e2e8f0; }
}
:root[data-theme="dark"] .pp-form .pp-switch-input:not(:checked) + .pp-switch-track { background: #334155; }
:root[data-theme="dark"] .pp-form .pp-switch-label { color: #cbd5e1; }
:root[data-theme="dark"] .pp-form .pp-switch-label strong { color: #e2e8f0; }
