/* v27: neutral facility selector, structured education paths, and explicit re-arrest state. */
body.nb-modern .top-actions .nb-facility-note {
  position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:42px;
  padding:8px 14px;border:1px solid #c7a243;border-radius:2px;background:#f5df7c;color:#463a18;
  box-shadow:0 3px 7px #101b2430;transform:rotate(-1deg);font-size:13px;font-weight:750;line-height:1.2;cursor:pointer;
}
body.nb-modern .top-actions .nb-facility-note::before {content:"";position:absolute;top:-4px;left:35%;width:30%;height:8px;background:#fff8c5aa;box-shadow:0 1px 1px #806f321f}
body.nb-modern .top-actions .nb-facility-note:hover {background:#ffe98b;transform:rotate(0deg) translateY(-1px)}
.facility-dialog {width:min(610px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:0;border:0;border-radius:4px;background:transparent;color:#27333b;overflow:visible}
.facility-dialog::backdrop {background:#0c1c29aa;backdrop-filter:blur(2px)}
.facility-note-sheet {position:relative;padding:34px 30px 28px;background:#f8e58b;box-shadow:0 22px 55px #06111b80;transform:rotate(-.5deg)}
.facility-note-sheet::after {content:"";position:absolute;right:0;bottom:0;border:22px solid transparent;border-right-color:#d4bb56;border-bottom-color:#d4bb56}
.facility-dialog-close {position:absolute;right:12px;top:9px;width:38px;height:38px;border:0;background:transparent;font-size:28px;line-height:1;cursor:pointer}
.facility-note-sheet h2 {font:400 clamp(28px,6vw,40px)/1.08 Georgia,serif;margin:5px 40px 12px 0;color:#2a321f}
.facility-note-sheet>p:not(.eyebrow) {max-width:55ch;color:#554f32}
.facility-choices {display:grid;gap:9px;margin:22px 0 14px}
.facility-choices a,.facility-choices>span {display:flex;flex-direction:column;gap:3px;padding:13px 14px;border:1px solid #bfa84f;border-radius:4px;background:#fffdf1;color:#263947;text-decoration:none;font-weight:750}
.facility-choices>span{border-style:dashed;background:#f6f3e8;color:#5e625c}
.facility-choices a:hover,.facility-choices a[aria-current="page"] {border-color:#5b744d;background:#f2f7e7}
.facility-choices small {font-weight:500;color:#69736c}
.facility-add {width:100%;min-height:48px;padding:11px 14px;border:1px solid #877222;border-radius:4px;background:#263d48;color:#fff;font-weight:750;cursor:pointer}

.education-home .section-heading {margin-bottom:16px}
.education-track-tabs {display:flex;gap:6px;overflow-x:auto;padding:3px 0 13px;margin-bottom:16px;border-bottom:1px solid #cbd3d6;scrollbar-width:thin}
.education-track-tabs button {flex:none;min-height:38px;padding:7px 10px;border:1px solid #c9d2d6;border-radius:100px;background:#fff;color:#415460;font-size:12.5px;font-weight:650;cursor:pointer}
.education-track-tabs button[aria-pressed="true"] {background:#2c6fb5;border-color:#2c6fb5;color:#fff}
.education-track-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.education-track-grid>button {display:grid;grid-template-columns:44px 1fr;gap:3px 12px;min-height:142px;padding:14px;text-align:left;border:1px solid #d3dcdf;border-top:4px solid #2c6fb5;border-radius:5px;background:#fff;box-shadow:0 2px 7px #17212b0c;cursor:pointer}
.education-track-grid>button>span {grid-row:1/4;width:40px;height:40px;display:grid;place-items:center;border-radius:4px;background:#e9f1f8;color:#2c6fb5;font:700 12px/1 IBM Plex Mono,monospace}
.education-track-grid strong {font-size:16px;line-height:1.25}
.education-track-grid small {color:#667883;line-height:1.4}
.education-track-grid b {align-self:end;color:#2c6fb5;font-size:12px}
.education-track-grid>button:first-child {grid-column:1/-1;min-height:118px;border-top-color:#d8232a;background:linear-gradient(100deg,#fff 0%,#fff 72%,#fcebec 100%)}
.education-track-grid>button:first-child>span {background:#fbe5e6;color:#b51f27}
.equipment-bedside-links {display:grid;grid-template-columns:minmax(0,1.1fr) minmax(240px,.9fr);gap:16px;margin:14px 0 20px;padding:16px;border-left:5px solid #2c6fb5;background:#eef5fa;box-shadow:0 1px 5px #17212b12}
.equipment-bedside-links div {display:flex;flex-direction:column;gap:3px}.equipment-bedside-links div>span {font:700 11px/1.2 IBM Plex Mono,monospace;letter-spacing:.08em;color:#2c6fb5}.equipment-bedside-links strong {font-size:17px}.equipment-bedside-links small {color:#5b6e78}
.equipment-bedside-links nav {display:flex;flex-direction:column;gap:5px}.equipment-bedside-links button {padding:8px 10px;border:1px solid #c7d8e3;border-radius:4px;background:#fff;color:#285d84;text-align:left;font-weight:650;cursor:pointer}
.education-track>header {display:flex;align-items:flex-start;gap:14px;padding:17px;border-left:5px solid #2c6fb5;background:#edf4f9}
.education-track>header>span {flex:none;width:46px;height:46px;display:grid;place-items:center;border-radius:4px;background:#2c6fb5;color:#fff;font:700 12px/1 IBM Plex Mono,monospace}
.education-track h2,.education-track h3 {margin:0}.education-track header p {margin:5px 0 0;color:#536974}
.education-track-body {display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:20px 4px}
.education-track-body h3 {font-size:15px;margin-bottom:9px}.education-track-body ul {margin:0;padding-left:19px}.education-track-body li {margin:0 0 6px}
.education-available {display:flex;flex-direction:column;gap:6px}.education-available button {display:flex;justify-content:space-between;gap:8px;padding:9px 10px;border:1px solid #d5dcdf;border-radius:4px;background:#fff;text-align:left;color:#2d5f86;cursor:pointer}
.im-landmark-lesson {margin:8px 0 18px;padding:19px;border:1px solid #cbd5d9;border-radius:5px;background:#fff}
.im-landmark-lesson>header h2 {font:400 27px/1.1 Georgia,serif}.im-landmark-lesson>header>p:last-child {color:#596d77}
.im-landmark-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:17px 0}
.im-landmark-grid section {padding:13px;border:1px solid #dce2e4;border-radius:5px;background:#fafcfc}.im-landmark-grid h3 {margin:10px 0 4px;font-size:15px}.im-landmark-grid p {margin:0;color:#5b6c75;font-size:13px;line-height:1.45}
.landmark-icon {position:relative;height:105px;border-radius:5px;background:#e8eef1;overflow:hidden}
.landmark-icon::before {content:"";position:absolute;background:#aebdc4}.landmark-icon i,.landmark-icon b {position:absolute;display:block}
.landmark-icon b {width:15px;height:15px;border:3px solid #d8232a;border-radius:50%;background:#fff7}
.landmark-icon.arm::before {left:46%;top:10px;width:30px;height:86px;border-radius:16px 16px 12px 12px;transform:rotate(7deg)}.landmark-icon.arm i {left:45%;top:15px;width:38px;height:5px;background:#657d88;transform:rotate(7deg)}.landmark-icon.arm b {left:53%;top:42px}
.landmark-icon.thigh::before {left:39%;top:8px;width:48px;height:94px;border-radius:22px 22px 16px 16px}.landmark-icon.thigh i {left:34%;top:35%;width:61px;height:32%;border-top:2px dashed #657d88;border-bottom:2px dashed #657d88}.landmark-icon.thigh b {left:55%;top:52px}
.landmark-icon.hip::before {left:31%;top:16px;width:74px;height:74px;border-radius:42% 48% 50% 45%;transform:rotate(-12deg)}.landmark-icon.hip i {left:45%;top:31px;width:41px;height:41px;border-left:3px solid #657d88;border-bottom:3px solid #657d88;transform:rotate(-45deg)}.landmark-icon.hip b {left:52%;top:51px}
.im-safety {padding:14px;border-left:4px solid #b8912f;background:#fbf5df}.im-safety ul {margin:8px 0 0;padding-left:19px}.im-safety li {margin-bottom:5px}
.im-landmark-lesson .lesson-source {font-size:12px;color:#65757d;line-height:1.5}

.ev-page .ev-rosc-bar .ev-rearrest {background:#d8232a;color:#fff;border-color:#f0787e;box-shadow:0 0 0 3px #d8232a2c}
.ev-page .ev-rosc-bar .ev-rearrest small {display:block;color:#ffe4e5;font-size:11px;margin-top:2px}
.ev-page .ev-rosc-actions {display:flex;align-items:stretch;gap:7px;flex-wrap:wrap}.ev-page .ev-rosc-actions>button {min-height:44px;padding:7px 11px;border:1px solid #c6d3d8;border-radius:4px;background:#fff;color:#334b59;font-weight:700;cursor:pointer}
.ev-main-button.ev-rearrest-main {border-color:#ff9fa4!important;box-shadow:inset 0 0 0 2px #d8232a,0 0 0 3px #d8232a2c!important}

@media(max-width:700px){
  body.nb-modern .top-actions {grid-template-columns:repeat(4,minmax(0,1fr))}
  body.nb-modern .top-actions .nb-facility-note {display:flex;min-width:0;min-height:36px;margin:0;padding:6px 4px;border-radius:4px;font-size:11.5px;transform:rotate(-1deg)}
  .facility-note-sheet {padding:28px 18px 22px}.education-track-grid,.education-track-body,.im-landmark-grid,.equipment-bedside-links {grid-template-columns:1fr}
  .education-track-grid>button:first-child {grid-column:auto}
  .im-landmark-grid section {display:grid;grid-template-columns:92px 1fr;gap:0 12px}.landmark-icon {grid-row:1/3;height:92px}.im-landmark-grid h3 {align-self:end}
}

@media print {.nb-facility-note,.facility-dialog,.education-track-tabs {display:none!important}}

/* Respond to the paper width, not only the browser width. */
@container paper (max-width:600px) {
  .equipment-bedside-links,.education-track-grid,.education-track-body,.im-landmark-grid {grid-template-columns:minmax(0,1fr)}
  .education-track-grid>button:first-child {grid-column:auto}
}
