/* Imperial Prostate team site. All site styles.
   Ported from the agreed design prototype (v74) with the agreed options built in:
   layout 4 (no top bar at 1000px and wider), soft list highlight, footer with owner and report link,
   Section switch Home, card grids with topic pills, study page with tabs.
   Light theme only. */

:root {
  color-scheme: light;
  /* page */
  --bg: #e9eff4; --panel: #ffffff; --soft: #dde6ee; --ink: #0a2b40; --muted: #536a7b; --faint: #7d909e; --line: #c9d5de;
  /* brand */
  --blue: #006eaf; --blue-soft: #dcecf7; --red: #c23600; --sky: #52b0e8;
  --navy: #013250; --navy-2: #0b4468; --on-navy: #ffffff; --on-accent: #ffffff;
  --warn: #7a4a00; --warn-soft: #fff3d1; --ok: #1f6b45; --ok-soft: #e3f3ea;
  /* The device's bottom bar (iPhone, iPad). One value for the footer and the list, so they stay level
     (brief "footer level with the Admin row on every screen", David, 11 Nov 2026). 0 on a laptop. */
  --sab: env(safe-area-inset-bottom, 0px);
  --test-line: #d99a00; /* the test copy's top line (David chose it, 11 Nov 2026) */
  --shadow: rgba(1, 50, 80, .28);
  --scrim: rgba(1, 50, 80, .55);
  /* left list (navy) */
  --list-bg: #013250; --list-ink: #ffffff; --list-muted: #a9cfe6; --list-hover: #0b4468;
  --list-soft: rgba(255, 255, 255, .08); --list-field: rgba(255, 255, 255, .07); --list-edge: rgba(255, 255, 255, .16);
  --head-lead: #c9dceb; /* the first line of the page head on navy, below 1000px (David, 11 Nov 2026) */
  /* the four headings */
  --sec-1: #006eaf; --sec-1-soft: #dcecf7; /* Clinical tools */
  --sec-2: #0b7f80; --sec-2-soft: #d8efee; /* Clinical resources */
  --sec-3: #a85a0c; --sec-3-soft: #f6e9d8; /* Trials & registries */
  --sec-4: #4d5f73; --sec-4-soft: #e4e9ee; /* Academic work */
  /* Secure Areas (gold) and the restricted area (slate grey): the Designer's pictures, brief "People page and Secure Areas", 12 Nov 2026.
     bar and mark are for the navy list; the rest are for the page. */
  --gold-bar: #e3bd6a; --gold-bg: #fff3d1; --gold-ink: #7a4a00; --gold-line: #c9a24a;
  --slate-bar: #c3cdd6; --slate-bg: #e3e9ee; --slate-ink: #475b6e;
  /* shape and type */
  --r: 6px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}

/* base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); overflow-x: clip; }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font); font-weight: 500; text-wrap: balance; margin: 0; line-height: 1.25; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
p { margin: 0; } /* text uses the full width of its column (David, 17 Nov 2026; was 68ch) */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.side :focus-visible { outline-color: var(--sky); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* frame: left list and reading column */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
/* With the "Logged" bar shown, the frame is shorter by the bar's height, so the page still fits the screen (no scroll, footer in view). */
.app { min-height: calc(100vh - var(--logall, 0px)); min-height: calc(100dvh - var(--logall, 0px)); }
.right { min-width: 0; display: flex; flex-direction: column; }
/* A wide window (David, 13 Nov 2026, Design choices entry 27, changed the same day): the content (1,100 px at most) sits in
   the middle of the space beside the list as soon as there is spare room, from about 1,350 px (250 px list + 1,100 px).
   Below that nothing changes; from 1,650 px it is the same as before. 100% is the width of .right (the window minus the list). */
.right .wrap { margin-left: max(0px, (100% - 1100px) / 2); max-width: 1100px; padding-left: 30px; }
.shell { padding-block: 26px 56px; flex: 1; width: 100%; }
main { min-width: 0; display: grid; gap: 22px; }
main > * { min-width: 0; }

/* left list */
.side { background: var(--list-bg); color: var(--list-ink); border-right: 1px solid transparent; padding: 16px 14px 28px; padding-left: max(14px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; align-content: start; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--list-ink); }
/* The logo and, in the phone Menu, "Close" on one line (entry 23). */
.sidetop { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand img { display: block; height: 36px; width: auto; }
.navbox { position: relative; }
/* The left list never scrolls sideways; its upright scroll bar is thin and pale on the navy, with no white track (David, 16 Nov 2026).
   Firefox and Chrome read scrollbar-width and scrollbar-color; Safari reads the ::-webkit-scrollbar rules. */
.navbox { overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .28) transparent; }
.navbox::-webkit-scrollbar { width: 6px; height: 0; background: transparent; }
.navbox::-webkit-scrollbar-track { background: transparent; }
.navbox::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .28); border-radius: 3px; }
.sidenav { display: grid; gap: 2px; font-size: .93rem; }
.sidenav .grp { margin-top: 14px; padding: 0 8px 4px; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--list-muted); font-weight: 500; }
.sidenav a { font-weight: 400; padding: 6px 8px; border-radius: var(--r); text-decoration: none; color: var(--list-ink); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sidenav a:hover { background: var(--list-hover); }
.sidenav a, .sidenav .grp { position: relative; z-index: 1; }
/* current line: a faint band with the thin light-blue line (Soft highlight) */
/* The selected line: a straight pale 3 px line at its left edge, square left corners, round right corners
   (brief "straight pale line for the selected list line", David, 12 Nov 2026). 3 px line + 5 px padding = the 8 px
   of the other lines, so the text does not move. The marker (.navmark) has the same look and slides over it. */
.sidenav a[aria-current="page"] { color: var(--list-ink); font-weight: 500; background: var(--list-soft); border-left: 3px solid var(--list-muted); padding-left: 5px; border-radius: 0 var(--r) var(--r) 0; }
.side.has-mark .sidenav a[aria-current="page"] { background: transparent; border-left-color: transparent; }
/* Home stays in view at the top of the list (18 Nov 2026). The bar has the list colour, so the lines that scroll under it are
   hidden; it sits above the sliding band. When Home is the current page, it keeps its own band (the sliding one is under the bar). */
.sidenav .homebar { position: sticky; top: 0; z-index: 2; display: grid; background: var(--list-bg); padding-bottom: 6px; margin-bottom: -6px; } /* 6 px of list colour under Home, inside the gap above the next heading */
.side.has-mark .sidenav .homebar a[aria-current="page"] { background: var(--list-soft); border-left-color: var(--list-muted); }
/* the band that slides to the current line */
.navmark { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--list-soft); box-shadow: inset 3px 0 0 var(--list-muted); pointer-events: none; z-index: 0; }
/* .btn sets display, so these two need the longer selector */
.backdrop, .toplogo, .btn.closebtn, .btn.menubtn { display: none; }

/* slim navy bar (below 1000px only; navy since 11 Nov 2026, brief "navy top bar on phones").
   The colours are the left list's colours. The navy also fills the area behind the iPhone status bar
   (padding-top), so no light strip shows above the bar. Where that area is 0, the bar is as before.
   Calmer bar (brief "calmer phone top bar", David, 11 Nov 2026): the Menu on the left with no box, the logo on
   the right, nothing else; search and the account are in the Menu list. Equal 12px gaps: 12 + 32 (logo) + 12 + 1
   (soft line) = 57px. The logo sets the height; the Menu's 40px touch area overlaps the gaps (margin -4px). */
.top { background: var(--list-bg); color: var(--list-ink); border-bottom: 1px solid var(--list-edge); position: sticky; top: 0; padding-top: env(safe-area-inset-top, 0px); z-index: 20; }
.top.is-stuck { box-shadow: 0 8px 16px -12px var(--shadow); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: nowrap; padding-block: 12px; }
.top :focus-visible { outline-color: var(--sky); }
.toplogo img { display: block; height: 32px; width: auto; }
/* The Menu button: a three-line icon and the word, white, no outline and no fill in any state.
   Pointer over it or Menu open: the word is underlined. Pressed: light blue. Keyboard focus: light blue, thick underline. */
.btn.menubtn { gap: 6px; margin-block: -4px; padding: 0 8px 0 0; border: 0; border-radius: 4px; background: transparent; color: var(--list-ink); font-weight: 600; font-size: 1rem; }
.btn.menubtn svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.btn.menubtn span { text-underline-offset: 4px; }
.btn.menubtn:hover:not(:disabled) span, .btn.menubtn[aria-expanded="true"] span { text-decoration: underline; }
.btn.menubtn:active { color: var(--sky); }
.btn.menubtn:focus-visible { outline: none; color: var(--sky); }
.btn.menubtn:focus-visible span { text-decoration: underline; text-decoration-thickness: 2px; }

/* account button and menu */
.acct { --acct-ink: var(--ink); --acct-hover: var(--soft); position: relative; display: inline-flex; align-items: center; }
.acctbtn { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; min-width: 40px; padding: 2px; background: transparent; border: 0; color: var(--acct-ink); font: 500 .95rem var(--font); cursor: pointer; border-radius: var(--r); white-space: nowrap; }
.acctbadge { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--acct-ink); color: var(--acct-ink); display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 600; letter-spacing: .03em; flex: none; }
.acctbtn:hover .acctbadge { background: var(--acct-hover); }
.acctname, .acctchev { display: none; }
.acctchev { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acctmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 260px; max-width: calc(100vw - 32px); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 6px; display: grid; gap: 2px; }
.acctmenu { padding: 12px 14px 8px; }
.acctmenu .an { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acctmenu .ae { color: var(--muted); font-size: .88rem; user-select: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acctmenu hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0 2px; width: 100%; }
.acctmenu hr.apart { margin: 6px 0; }
/* Calm rows (David, 13 Nov 2026): dark text, a soft tint under the pointer, a clear keyboard outline, one thin line icon each. */
.acctmenu a.mi { display: flex; align-items: center; gap: 10px; min-height: 40px; color: var(--ink); text-decoration: none; padding: 0 8px; margin: 0 -8px; border-radius: var(--r); }
.acctmenu a.mi[hidden] { display: none; }
.acctmenu a.mi:hover { background: var(--soft); }
.acctmenu a.mi:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.acctmenu a.mi svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }

/* The search line and the account row of the list: the same at every width (on a phone they are in the Menu list;
   brief "calmer phone top bar", David, 11 Nov 2026). The account menu opens upwards from the foot of the list. */
.sidecmd { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 8px 0 11px; border: 1px solid var(--list-edge); border-radius: var(--r); background: var(--list-field); color: var(--list-muted); font: inherit; font-size: .92rem; cursor: pointer; text-align: left; }
.sidecmd:hover { background: var(--list-hover); color: var(--list-ink); }
.sidecmd svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sidecmd .sclab { flex: 1 1 auto; }
/* Ask ProfBot button: shown in place of the Search line for a person with the tick of the line "document-search" (site.js, render). */
.askbtn { display: flex; align-items: center; gap: 8px; width: 100%; height: 42px; padding: 0 10px 0 11px; border: 0; border-radius: var(--r); background: #0A5A8C; color: #fff; font: inherit; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer; text-align: left; }
.askbtn[hidden], .sidecmd[hidden] { display: none; }
.askbtn:hover { background: #0B669E; color: #fff; } /* a deeper blue than the site blue, white text 7.4:1 (David, 25 Nov 2026) */
.askbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.askbtn svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.askbtn .sclab { flex: 1 1 auto; }
/* A thin solid line under the AI button, in the menu's divider colour; the list gap gives 12 px above and below it (David, option D, 25 Nov 2026). */
.askline { margin: 0; height: 0; border: 0; border-top: 1px solid var(--list-edge); }
.askbtn[hidden] + .askline { display: none; }
/* 42 px on laptop and iPad, 44 px in the phone Menu for a finger (David, 25 Nov 2026). */
@media (max-width: 999px) { .askbtn { height: 44px; } }
.sideacct { display: block; border-top: 1px solid var(--list-edge); padding-top: 10px; }
.sideacct .acct { --acct-ink: var(--list-ink); --acct-hover: var(--list-hover); display: flex; width: 100%; }
.sideacct .acctbtn { width: 100%; justify-content: flex-start; padding: 4px 6px; }
.sideacct .acctbtn:hover { background: var(--list-hover); }
.acctname { display: inline; }
.sideacct .acctname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.sideacct .acctchev { display: block; color: var(--list-muted); }
.sideacct .acctmenu { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; width: auto; max-width: none; }

/* 1000px and wider: no top bar; the list holds logo, search, navigation and account */
@media (min-width: 1000px) {
  .top { display: none; }
  .side { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 12px; overflow: hidden; padding-bottom: calc(12px + var(--sab)); height: 100vh; height: 100dvh; }
  .side > * { flex: none; }
  .navbox { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .sidenav { gap: 1px; }
  .sidenav a { padding-block: 5px; }
  .sidenav .grp { margin-top: 10px; }
}

/* below 1000px: the list is a panel that slides over the page */
@media (max-width: 999px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .right .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); }
  .btn.menubtn { display: inline-flex; min-height: 40px; }
  .toplogo { display: inline-flex; align-items: center; min-height: 40px; margin-block: -4px; }
  /* The open Menu: logo, search line, the links (they scroll), and the account row at the foot, always in view. */
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; width: min(300px, 86vw); display: flex; flex-direction: column; overflow: hidden; padding-right: max(14px, env(safe-area-inset-right, 0px)); padding-bottom: max(12px, var(--sab)); transform: translateX(-100%); visibility: hidden; }
  .side > * { flex: none; }
  .navbox { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .app.menu-open .side { transform: none; visibility: visible; }
  .btn.closebtn { display: inline-flex; background: transparent; color: var(--list-ink); border-color: var(--list-muted); min-height: 40px; }
  .btn.closebtn:hover:not(:disabled) { border-color: var(--list-ink); }
  .app.menu-open .backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: var(--navy); opacity: .55; }
  .btn, .tab { min-height: 40px; }
  .sidenav a { min-height: 40px; align-items: center; }
  details.unit > summary { min-height: 40px; align-items: center; }
}
@media (max-width: 999px) and (prefers-reduced-motion: no-preference) {
  .side { transition: transform .2s ease, visibility 0s linear .2s; }
  .app.menu-open .side { transition: transform .2s ease, visibility 0s; }
}

/* page head and common parts */
.crumb { font-size: .85rem; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumbsep { margin: 0 7px; color: var(--muted); }
.kind { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--blue); }
.head { display: grid; gap: 8px; }
.lead { color: var(--muted); font-size: 1.02rem; }
.sec { display: grid; gap: 10px; }
.sec > h2 { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.stack { display: grid; gap: 22px; min-width: 0; }
.facts { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); font-size: .88rem; }
.facts > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--muted); overflow-wrap: anywhere; } .facts dd { margin: 0; overflow-wrap: anywhere; }
.rail { display: grid; gap: 14px; align-content: start; }
.rail h3 { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* "Visit by visit" below 1000px: one white box for each arm, in place of the chart. Stacked; side by side from 600px. */
.armboxes { display: grid; gap: 12px; }
.armbox { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 12px 14px; }
.armbox h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.armbox ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: .88rem; }
@media (min-width: 600px) { .armboxes { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
/* "On this page" (1000px and wider): the Overview's section names under Key facts. Only this block stays in view, just under the
   sticky tab row (the rail stretches to the height of the row so it can); --toph and --tabh are set by site.js. */
.onpage { display: none; }
@media (min-width: 1000px) {
  .cols { --stickh: calc(var(--toph, 0px) + var(--tabh, 0px)); }
  .cols > .rail { align-self: stretch; }
  .stack > .sec { scroll-margin-top: calc(var(--stickh) + 12px); }
  .onpage { display: grid; gap: 8px; align-content: start; position: sticky; top: calc(var(--stickh) + 16px); max-height: calc(100vh - var(--stickh) - 32px); max-height: calc(100dvh - var(--stickh) - 32px); overflow-y: auto; }
  .onpage ul { list-style: none; margin: 0; padding: 0; display: grid; }
  .onpage button { font: inherit; font-size: .9rem; display: block; width: 100%; min-height: 40px; padding: 6px 10px 6px 12px; border: 0; border-left: 2px solid var(--line); background: none; color: var(--muted); text-align: left; cursor: pointer; }
  .onpage button:hover { color: var(--ink); }
  .onpage button[aria-current="true"] { border-left-color: var(--ink); color: var(--ink); font-weight: 600; }
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { font: 500 .9rem var(--font); padding: 8px 13px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.btn:hover:not(:disabled) { border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.btn:disabled { color: var(--muted); cursor: default; background: transparent; } /* solid edge: no dashed lines (David, 13 Nov 2026) */
.tag { display: inline-block; font-size: .74rem; padding: 1px 8px; border-radius: var(--r); background: var(--soft); color: var(--muted); white-space: nowrap; }
.tag.later { border: 1px solid var(--line); background: transparent; } /* solid edge: no dashed lines (David, 13 Nov 2026) */
.steps { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; }
.steps .subs { margin: 6px 0 0; padding-left: 1.4em; display: grid; gap: 6px; } /* sub-items of a list item (23 Nov 2026) */
.legend { color: var(--muted); font-size: .85rem; }
/* a box for material that is not on the site yet */
.notyet { color: var(--muted); } /* entry 33 case 3: muted text only, no box (also the loading and error lines) */
/* entry 33: the small note (case 1, no box) and the slim box around it (case 2) */
.minote { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.minote-i { width: 24px; height: 24px; flex: none; border-radius: 6px; background: #e3ecf3; display: flex; align-items: center; justify-content: center; }
.minote-i svg { width: 15px; height: 15px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.minotebox { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; }
/* Home for a person with no pages yet (entry 26): its own card, thin solid line, centred */
.emptycard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 38px 24px 30px; text-align: center; max-width: 460px; width: 100%; box-sizing: border-box; margin: 0 auto; } /* narrow and centred (David chose A, 13 Nov 2026) */
/* "Not yet available" (entry 28): the same card under a page head, 28 px under it (6 px + the page's 22 px gap) */
.emptycard.na { margin-top: 6px; padding: 36px 24px 40px; }
.natile { width: 56px; height: 56px; margin: 0 auto; border-radius: 12px; background: #e3ecf3; display: flex; align-items: center; justify-content: center; }
.natile svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.emptycard h2 { margin: 14px 0 6px; font-size: 1.06rem; font-weight: 600; color: var(--ink); }
/* Entry 31: on a laptop a line page with no content shows only the card. The head is hidden from view only (it stays in the
   page for the tab title, the feedback link and screen readers). Below 1,000 px the navy band shows, with the card under it. */
@media (min-width: 1000px) {
  #main > .head.plainhead { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Entry 34 (David, 13 Nov 2026): the big card on a page with no title (the six plain pages and the empty Home page). It grows
   with the window and sits in the middle of the free area between the top (or a notice, or the navy band) and the footer,
   a little above the middle: the empty ::after under it lifts the card's centre by about 10% of the window height. When the
   window is short, ::after shrinks first and the card stays at the top: nothing is cut, the page scrolls. Layout only (auto
   margins), so the page-in animation of each part works as before. The card in a Secure or restricted page is not .big: it
   keeps its place under the title and the bar. Its size is the rule below (entry 35). */
.shell:has(> #main > .emptycard.big) { display: flex; flex-direction: column; }
#main:has(> .emptycard.big) { flex: 1 0 auto; display: flex; flex-direction: column; gap: 22px; }
#main:has(> .emptycard.big)::after { content: ''; flex: 0 1 max(0px, calc(20vh - 52px)); } /* 52 px: the 22 px gap plus the page's padding, 56 px under and 26 px above */
#main > .emptycard.big { margin: auto; }
@media (max-width: 599px) {
  /* phone: full width minus the gutter, at the top (22 px under the navy band on a plain page) */
  #main > .emptycard.big { margin: 0; }
  #main:has(> .emptycard.big)::after { display: none; }
  /* the empty Home page has no navy band: 22 px under the top bar too, not the page's usual 26 px (entries 34 and 35) */
  #main > .emptycard.big:first-child { margin-top: -4px; }
}
.emptycard .emptylock { width: 34px; height: 34px; fill: none; stroke: var(--gold-bar); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.emptycard h1 { margin: 10px 0 6px; font-size: 1.06rem; font-weight: 600; color: var(--ink); }
.emptycard p { margin: 0 auto; max-width: 380px; color: var(--muted); line-height: 1.5; }
.emptyhelp { margin: 22px auto 0; max-width: 380px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .85rem; }
.emptyhelp span { color: var(--ink); }
.emptyhelp a { color: var(--blue); overflow-wrap: anywhere; }
/* Entry 35 (David, 13 Nov 2026): ONE size for every empty card: the six plain pages, the empty Home page and the card on every
   Secure and restricted page. Under 600 px: as before (full width minus the gutter). 600 to 999 px: 520 px. From 1,000 px:
   560 px at every window width, tile 72 px (clock 36), heading 22 px, line 15 px; the Home padlock 42 px; the help lines keep
   their size. */
@media (min-width: 600px) {
  .emptycard, .emptycard.na { width: min(520px, 100%); max-width: none; padding: 44px 32px 48px; }
  .emptycard .natile { width: 64px; height: 64px; } .emptycard .natile svg { width: 32px; height: 32px; }
  .emptycard .emptylock { width: 38px; height: 38px; }
  .emptycard h1, .emptycard h2 { margin: 16px 0 8px; font-size: 20px; }
  .emptycard > p { font-size: 15px; max-width: 420px; }
}
@media (min-width: 1000px) {
  .emptycard, .emptycard.na { width: min(560px, 100%); padding: 52px 40px 56px; }
  .emptycard .natile { width: 72px; height: 72px; } .emptycard .natile svg { width: 36px; height: 36px; }
  .emptycard .emptylock { width: 42px; height: 42px; }
  .emptycard h1, .emptycard h2 { font-size: 22px; }
}
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r); font-size: .9rem; z-index: 20; max-width: calc(100% - 32px); }

/* Home: Section switch */
.hicon { width: 44px; height: 44px; fill: none; stroke: var(--hc, var(--blue)); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s1 { --hc: var(--sec-1); --hs: var(--sec-1-soft); } .s2 { --hc: var(--sec-2); --hs: var(--sec-2-soft); }
.s3 { --hc: var(--sec-3); --hs: var(--sec-3-soft); } .s4 { --hc: var(--sec-4); --hs: var(--sec-4-soft); }
.hswitch { display: grid; gap: 14px; }
.hswtabs { display: grid; grid-template-columns: repeat(var(--tabs, 4), minmax(0, 1fr)); gap: 10px; }
.hswtab { font: inherit; display: grid; justify-items: center; gap: 8px; padding: 16px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font-weight: 600; text-align: center; }
.hswtab .hicon { width: 34px; height: 34px; } .hswtab:hover { border-color: var(--hc); }
.hswtab[aria-selected="true"], .hswtab[aria-expanded="true"] { background: var(--hc); border-color: var(--hc); color: var(--on-accent); } .hswtab[aria-selected="true"] .hicon, .hswtab[aria-expanded="true"] .hicon { stroke: var(--on-accent); }
/* A phone: the small arrow in the top right corner of a tile; down when closed, up when open (brief "Home tiles start
   closed on a phone", option C). Only drawn on a phone; hidden at 600px and over in case of a width change. */
.hswtab { position: relative; }
.hswarrow { position: absolute; top: 8px; right: 8px; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 600px) { .hswarrow { display: none; } }
.hswpanel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; background: var(--hs); border-radius: 12px; padding: 14px; }
.hswcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-decoration: none; color: var(--ink); min-height: 86px; }
.hswcard .hicon { width: 34px; height: 34px; } .hswcard .htxt { display: grid; gap: 2px; } .hswcard b { font-weight: 600; } .hswcard .htxt > span:not(.tag) { color: var(--muted); font-size: .86rem; }
.hswcard .chev { color: var(--hc); font-size: 1.5rem; line-height: 1; } a.hswcard:hover { border-color: var(--hc); }
@media (min-width: 1000px) { .hswpanel.n4 { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Home: New to the team? */
.hbsec > h2 { font-size: 1.05rem; }
.hsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hsteps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.hstepn { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 600; display: grid; place-items: center; }
.hsteps .htxt { display: grid; gap: 2px; } .hsteps b { font-weight: 600; } .hsteps .htxt span { color: var(--muted); font-size: .86rem; }
@media (max-width: 999px) { .hswpanel { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Home: the welcome video card (brief "welcome video from Prof Ahmed on Home"). A slim row; on a phone the picture is on top. */
.hvid { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 12px 12px; }
.hvidpic { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--navy); cursor: pointer; }
.hvidpic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hvidpic svg { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; transform: translate(-50%, -50%); }
.hvidpic circle { fill: var(--navy); fill-opacity: .88; } .hvidpic path { fill: var(--on-navy); }
.hvid .htxt { display: grid; gap: 2px; }
.hvidrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.hvidplay { font: inherit; font-weight: 600; color: var(--blue); background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: left; }
@media (hover: hover) { .hvidplay:hover { text-decoration: underline; } }
.hvidcap { display: none; color: var(--muted); font-size: .86rem; }
@media (max-width: 599px) {
  .hswtabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hswtab { padding: 12px 8px; font-size: .92rem; }
  .emptycard { max-width: none; } /* phone: full width minus the gutter */
  /* an odd last tile (or a single tile) takes the whole row */
  .hswtabs.t1 .hswtab, .hswtabs.t3 .hswtab:last-child { grid-column: 1 / -1; } .hswpanel { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .hsteps { grid-template-columns: minmax(0, 1fr); }
  .hvid { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  .hvidpic svg { width: 52px; height: 52px; }
  .hvidcap { display: inline; }
}

/* card grids: Clinical trials and Registries */
.libcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.libcards a { position: relative; display: grid; gap: 6px; justify-items: center; align-content: start; height: 100%; text-align: center; padding: 34px 10px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); overflow: hidden; }
/* Clinical Trials and Registries cards: the outline stays the normal grey line under the pointer; only the lift and the shadow
   (below, with motion allowed) show it (David, 16 Nov 2026: "we actually want no colour"). */
.libcards .ctab { position: absolute; top: 0; left: 0; background: var(--blue); color: var(--on-accent); font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 0 0 6px 0; }
.libcards .na { color: var(--muted); }
.libcards .clogo { width: 100%; height: 96px; object-fit: contain; background: #fff; border-radius: var(--r); }
.libcards .reg .clogo { padding: 18px 12%; }
.libcards .na .clogo { filter: grayscale(1); opacity: .55; }
.libcards .cq { min-height: 2.8em; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.libcards .tag { white-space: normal; max-width: 100%; }
/* Clinical Trials cards, option A (David, 15 Nov 2026): closer to the original library. Registries keep the rules above. */
.libcards.trials a { padding: 20px 6px 18px; gap: 4px; border-radius: 12px; }
.libcards.trials .ctab { border-radius: 0 0 10px 0; line-height: 1.5; }
.libcards.trials .clogo { height: 110px; margin: 10px 0 8px; border-radius: 0; }
.libcards .reg { padding: 20px 10px 18px; border-radius: 12px; } /* registry cards: no tab, the padding and corners of the trial cards (16 Nov 2026) */
.libcards .reg .clogo { margin-top: 14px; } /* keeps the logo where it was without the tab */
.libcards.trials .tag, .libcards .reg .tag { font-size: 12px; line-height: 1.4; padding: 2px 9px; border-radius: 6px; color: var(--muted); } /* background: a tint of the tab, set in site.js */
/* TRANSFORM logo (23 Nov 2026, David via the Designer): the file is cropped to the logo (434x151, was 500x347 with white space).
   Card: 160px wide from 560px (about 160x55), 135px below 560px (about 135x46) (David, 23 Nov 2026: 185 and a full box were a bit
   large). The trial page head keeps the size it had with the old file: the same 112px row, the logo 49px high, centred as before. */
.libcards.trials .clogo[src$="/app/logos/transform.webp"] { padding-inline: max(0px, calc((100% - 135px) / 2)); }
@media (min-width: 560px) { .libcards.trials .clogo[src$="/app/logos/transform.webp"] { padding-inline: max(0px, calc((100% - 160px) / 2)); } }
.studylogo[src$="/app/logos/transform.webp"] { height: calc(64px * 151 / 347); margin-block: calc(64px * 98 / 347); }
@media (min-width: 1000px) { .studylogo[src$="/app/logos/transform.webp"] { height: calc(112px * 151 / 347); margin-block: calc(112px * 98 / 347); } }

/* study page */
.topline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 24px; }
.topline > div:first-child { display: grid; gap: 8px; min-width: 0; flex: 1 1 320px; }
.verline { color: var(--muted); font-size: .9rem; }

/* Below 1,000 px (David, 17 Nov 2026, option B; back to the navy head of 11 Nov 2026 in a simpler form): the page head is on
   navy and joined to the navy bar, as on live. The head is the first part of every page: .head, or .topline on the study page.
   Style rules only. The navy reaches both screen edges (a full-width shadow, clipped to the head's own height), and the head
   moves up over the page's top padding so it meets the bar. Simpler than live: no label above the title, the path from Home in place
   of the breadcrumb, no short blue line under the title, no trial logo. From 1,000 px nothing changes. */
@media (max-width: 999px) {
  .top { border-bottom-color: var(--list-edge); }
  #main > .head:first-child, #main > .topline:first-child {
    background: var(--list-bg); color: var(--list-ink);
    margin-top: -26px; padding-block: 7px 20px;   /* -26px: the top padding of .shell. 7px: about 12px from the bar's soft line to the first letters */
    box-shadow: 0 0 0 100vmax var(--list-bg); clip-path: inset(0 -100vmax);
  }
  #main > :is(.head, .topline):first-child h1 { color: var(--list-ink); }
  #main > :is(.head, .topline):first-child .kind { display: none; }
  #main > :is(.head, .topline):first-child .crumb { display: none; }
  #main > :is(.head, .topline):first-child .lead { color: var(--head-lead); }
  #main > :is(.head, .topline):first-child .verline { color: var(--list-muted); }
  #main > .head:first-child :focus-visible, #main > .topline:first-child :focus-visible { outline-color: var(--sky); }
  /* Edit mode (live copy, Admin): the marker is light blue on navy; under the pointer, the hover navy, white text. */
  .editing #main > .head:first-child [data-t], .editing #main > .topline:first-child [data-t] { outline-color: var(--sky); }
  .editing #main > .head:first-child [data-t]:hover, .editing #main > .head:first-child [data-t]:focus-visible,
  .editing #main > .topline:first-child [data-t]:hover, .editing #main > .topline:first-child [data-t]:focus-visible { outline: 2px solid var(--sky); background: var(--list-hover); }
  /* The open menu is navy over a navy head: a faint white edge keeps it clear as a panel. */
  .app.menu-open .side { border-right-color: var(--list-edge); }
  /* When a page opens, the navy stays still (no light strip under the bar); only its text fades in. */
  #main.page-in > .head:first-child, #main.page-in > .topline:first-child { animation: none; }
}
@media (max-width: 999px) and (prefers-reduced-motion: no-preference) {
  #main.page-in > .head:first-child > *, #main.page-in > .topline:first-child > * { animation: riseIn .26s ease both; }
}
/* Page titles (David, 15 Nov 2026, "title 4"; head colours 17 Nov 2026): the title semibold (600), every width. From 1,000 px
   dark ink #0A2B40 with a short logo-blue line under it; below 1,000 px white on the navy head, no line. On a study page the
   protocol line is smaller. Below 1,000 px only: the path from Home in place of the breadcrumb, light blue on the navy. */
#main > :is(.head, .topline):first-child h1 { font-weight: 600; }
@media (min-width: 1000px) {
  #main > :is(.head, .topline):first-child h1 { color: var(--ink); }
  #main > :is(.head, .topline):first-child h1::after { content: ""; display: block; width: 44px; height: 3px; border-radius: 2px; background: #006eaf; margin-top: 12px; }
}
#main > .topline:first-child .verline { font-size: .82rem; }
.pathline { display: none; }
@media (max-width: 999px) {
  /* The path above the title (David, 17 Nov 2026): sky blue; links are underlined and at least 40 px to tap; a long path wraps. */
  .pathline { display: flex; flex-wrap: wrap; align-items: center; margin-block: -8px; font-size: .9rem; color: var(--sky); }
  .pathline > span, .pathline > a { display: inline-flex; align-items: center; min-height: 40px; }
  .pathline > a { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }
  .pathsep { opacity: .7; margin-inline: 6px; }
}
/* Ask ProfBot below 1,000 px (25 Nov 2026, David): no banner on the start screen (the title stays for screen readers); on a question the
   banner has no path, "Bot" in light blue, the start-page line in light grey and the history icon on the right of the title row. */
#main > .head.pbhead .lead { display: none; }
@media (max-width: 999px) {
  #main:not(.pbans) > .head.pbhead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: 0; padding: 0; box-shadow: none; }
  #main.pbans > .head.pbhead { position: relative; padding-right: 44px; padding-top: 18px; } /* about the same space above the title as below the line (the Designer) */
  #main.pbans > .head.pbhead .pathline { display: none; }
  #main.pbans > .head.pbhead .pbbot { color: #7cc4f0; }
  #main.pbans > .head.pbhead .lead { display: block; margin-top: 4px; font-size: .85rem; color: #b8cbd9; }
  #main.pbans > .head.pbhead .srchrec { position: absolute; top: 13px; right: -6px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #cfe0ec; cursor: pointer; }
  #main.pbans > .head.pbhead .srchrec:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
  #main.pbans > .head.pbhead .srchrec[aria-expanded="true"] { background: var(--list-hover); }
  @media (hover: hover) { #main.pbans > .head.pbhead .srchrec:hover { background: var(--list-hover); } }
}
/* end of the light page head */
.tabrow { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); position: relative; }
.tabrow.stick { position: sticky; top: var(--toph, 0px); z-index: 12; background: var(--bg); padding-top: 6px; }
.tab { font: inherit; font-weight: 600; padding: 8px 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue); } /* site blue under the chosen tab (David, 16 Nov 2026; was sky) */
.tabrow.has-ink .tab[aria-selected="true"] { border-bottom-color: transparent; }
/* the line under the chosen tab, which slides between tabs */
.tabink { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--blue); border-radius: 3px 3px 0 0; pointer-events: none; }
/* Buttons (1,199px and under; David, 16 Nov 2026, option "A: Buttons"): the six tabs are six buttons, three across and two down.
   The open one is logo blue with white text; the others are white with a thin line. No fade, no sliding line, no bottom border,
   and the buttons are NOT sticky: two rows would cover about 170px of an 812px screen. From 1,200px the tab row is as above
   (sticky, one row, line): the six tab names (the longest "Study documents") need about 690px in one row. */
@media (max-width: 1199px) {
  .tabrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: visible; border-bottom: 0; }
  .tabrow.stick { position: static; padding-top: 0; background: none; }
  .tabrow .tab { min-height: 44px; padding: 6px 8px; font-size: .86rem; font-weight: 500; line-height: 1.25; white-space: normal; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); transition: none; }
  .tabrow .tab[aria-selected="true"], .tabrow.has-ink .tab[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
  .tabrow .tabink { display: none; }
}
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: var(--r); padding: 18px 20px 20px; display: grid; gap: 14px; align-content: start; }
.tlwrap { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 8px; }
.tlwrap svg { display: block; max-width: none; }
.tl text { font-family: var(--font); font-size: 12px; }
.tl .t-ink { fill: var(--ink); } .tl .t-mut { fill: var(--muted); } .tl .grp { font-weight: 600; font-size: 13px; }
.tl .grid { stroke: var(--line); stroke-width: 1; } .tl .axis { stroke: var(--muted); stroke-width: 1; }
.tl .mk { fill: var(--blue); stroke: none; } .tl .ring { fill: var(--panel); stroke: var(--blue); stroke-width: 2; }
.tl .long { paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
/* closed boxes (protocol chapters) */
details.unit { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
details.unit > summary { padding: 12px 16px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-weight: 600; list-style: none; }
details.unit > summary::-webkit-details-marker { display: none; }
details.unit > summary small { font-weight: 400; color: var(--muted); }
details.unit > summary > span:first-of-type { flex: 1; }
/* the arrow that turns when a box opens */
details.unit > summary::before { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 2px 2px; align-self: center; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
details.unit[open] > summary::before { transform: rotate(45deg); margin-bottom: 4px; }
.boxin { border-top: 1px solid var(--line); padding: 12px 16px 16px; display: grid; gap: 12px; }
.sub { display: grid; gap: 8px; }
.unitrow { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); font-weight: 600; }
.unitrow small { font-weight: 400; }
.linkbtn { background: none; border: 0; font: inherit; font-size: .9rem; color: var(--blue); cursor: pointer; padding: 4px 0; justify-self: start; text-decoration: underline; text-underline-offset: 3px; }
.orig { margin: 6px 0 0; padding: 10px 14px; border-left: 3px solid var(--line); background: var(--soft); border-radius: 0 var(--r) var(--r) 0; display: grid; gap: 6px; }
.orig cite { font-style: normal; color: var(--muted); font-size: .85rem; }
/* IRAS answers */
.qa { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.qa:first-of-type { border-top: 0; padding-top: 0; }
.qa .qn { font-size: .8rem; color: var(--muted); font-family: var(--mono); }
.qa .notyet { margin-top: 4px; }

/* Database Library page in a frame (step 6): as tall as the page inside it, so no scroll of its own */
.toolframe { display: block; width: 100%; height: 600px; min-height: 300px; border: 0; background: transparent; }
.libframe { display: block; width: 100%; height: 480px; border: 0; background: transparent; }

/* Search or ask panel */
.cmd { position: fixed; inset: 0; z-index: 80; }
.cmdback { position: absolute; inset: 0; background: var(--navy); opacity: .6; }
.cmdpanel { position: relative; width: calc(100% - 32px); max-width: 640px; margin: 12vh auto 0; max-height: 76vh; overflow: auto; overscroll-behavior: contain; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 48px -24px var(--shadow); padding: 12px; }
.cmdpanel input { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1.1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); }
.cmdlist { display: grid; margin-top: 8px; }
.cmdlist a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.cmdlist a:hover, .cmdlist a:focus-visible { background: var(--soft); }
.cmdlist small { color: var(--muted); }
.cmdhint { margin: 6px 12px 2px; font-size: .8rem; color: var(--muted); }
/* 1000px and wider: over the page column (site.js sets --cmd-l and --cmd-w), top at 20% of the window. */
@media (min-width: 1000px) {
  .cmdpanel { position: absolute; left: var(--cmd-l, 50%); width: var(--cmd-w, 640px); margin: 0; top: 20vh; max-height: calc(80vh - 24px); }
}

/* thin progress line on a page change, and Back to top */
.navprog { position: fixed; left: 0; top: env(safe-area-inset-top, 0px); width: 100%; height: 3px; background: var(--sky); transform-origin: left center; transform: scaleX(0); opacity: 0; z-index: 60; pointer-events: none; }
.totop { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: var(--on-navy); display: grid; place-items: center; cursor: pointer; z-index: 15; box-shadow: 0 8px 18px -8px var(--shadow); }
.totop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.totop:hover { background: var(--blue); }

/* Test copy only (SITE_ENVIRONMENT=test): a thin amber line at the top of the screen. Fixed, so it moves
   nothing; clicks go through it. Below the iPhone status bar. */
.testline { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: 3px; background: var(--test-line); z-index: 1000; pointer-events: none; }
/* In the Home Screen app the test copy has no amber line (the icon's band and the name "IP TEST" mark it), so that the
   test copy app looks exactly like live at the top: iOS takes the clock strip's colour from the top of the page. */
@media (display-mode: standalone) { .testline { display: none; } }
/* In the Home Screen app the page's base colour is the navy, so that a moment before the page has drawn shows navy, not
   the light page colour (Simulator, 14 Nov 2026: a pale moment between the navy start picture and Home). */
@media (display-mode: standalone) { html { background: var(--navy); } }

/* footer: mark, copyright, report link, comments line */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; background: var(--bg); }
/* On a laptop the footer lines up with the account row ("Admin") at the foot of the left list (David, 11 Nov 2026).
   The round "back to top" button hides while the footer is on screen (site.js), so it never covers the footer. */
.foot .wrap { padding-block: 12px calc(14px + var(--sab)); }
/* 700px and wider (David, 11 Nov 2026, third change): the logo and icons are 46px tall, 5px more than the
   two text lines, so the padding is 5px less (10 + 11 in place of 12 + 14). The footer keeps its height. */
@media (min-width: 700px) { .foot .wrap { padding-block: 10px calc(11px + var(--sab)); } }
/* 1000px and wider, beside the left list (brief "footer level with the Admin row on every screen", David, 11 Nov 2026):
   the footer is exactly as tall as the account block at the foot of the list, on every device and text size.
   - Both add the device's bottom bar (--sab) below their content, so both lines move up by the same amount.
   - The footer's content is 46px (logo and icons) and stays 46px when the browser text is larger: the two text
     lines then use the padding around them (centred) instead of making the footer taller.
   - 1px border + 10 + 46 + 10 = 67px, the same as the account block (1 + 10 + 44 + 12). Was 68 (1px higher). */
@media (min-width: 1000px) {
  .foot .wrap { padding-block: 10px calc(10px + var(--sab)); }
  .sf-grid { height: 46px; align-content: center; }
}
.sf-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 3px; align-items: center; }
.sf-slot { grid-column: 1; grid-row: 1 / span 2; align-self: center; justify-self: start; display: inline-grid; gap: 4px; }
/* The logo with a row of three icons under it, as wide as the logo (David, 11 Nov 2026).
   700px and wider: 26px logo + 4px gap + 16px icons = 46px. Phones (below 700px): the logo alone, 32px (fourth change). */
.sf-logo { height: 26px; width: auto; display: block; }
.sf-icons { display: flex; height: 16px; }
.sf-icons a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 3px; }
.sf-icons a:first-child { justify-content: flex-start; }
.sf-icons a:last-child { justify-content: flex-end; }
.sf-icons a:hover { color: var(--blue); }
.sf-icons svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sf-icons svg.sf-fill { fill: currentColor; stroke: none; }
.sf-l1 { grid-column: 2; grid-row: 1; justify-self: end; align-self: end; display: inline-flex; align-items: center; white-space: nowrap; }
.sf-l2 { grid-column: 2; grid-row: 2; justify-self: end; align-self: start; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); text-decoration: none; white-space: nowrap; }
/* Line 2 is one link (David, 11 Nov 2026): grey like line 1 and the same size; only the name is underlined, so the
   link shows without a hover; the whole line turns blue on hover and on focus. The envelope is decoration. */
.sf-name { text-decoration: underline; text-underline-offset: 3px; }
.sf-l2:hover, .sf-l2:focus-visible { color: var(--blue); }
.sf-l2 svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* narrower screens */
@media (max-width: 999px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .libcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Phones: the mark sits beside the text, as on a laptop (David, 11 Nov 2026), with a smaller gap.
   Only phones narrower than 375px, where it does not fit, put the mark on its own row. */
/* Phones (below 700px; David, 11 Nov 2026, second change): the logo alone, no icons. display:none also takes
   the icon links out of the keyboard order and away from screen readers. The logo box then holds only the logo,
   so it sits in the vertical middle of the two text lines.
   Fourth change (David, 11 Nov 2026): the logo is 32px tall (was 22px), beside the text and on its own row.
   32px is less than the two text lines (about 42px), so the footer keeps its height where the logo is beside the text. */
@media (max-width: 699px) {
  .sf-grid { column-gap: 12px; }
  .sf-logo { height: 32px; }
  .sf-icons { display: none; }
}
/* The own row. 374px for the normal text size; 23.375em (374px at the usual 16px) for a person who has set a larger
   text size in the browser: their text is wider, so the logo moves to its own row sooner and never touches the text.
   (Safari's text size control on iPhone zooms the page, so the 374px rule already covers it.) */
@media (max-width: 374px), (max-width: 23.375em) {
  .sf-grid { grid-template-columns: minmax(0, 1fr); }
  .sf-slot { grid-column: 1; grid-row: 1; margin-bottom: 4px; }
  .sf-l1 { grid-column: 1; grid-row: 2; }
  .sf-l2 { grid-column: 1; grid-row: 3; }
}
@media (max-width: 680px) {
  .panels { grid-template-columns: minmax(0, 1fr); }
  .libcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 1.45rem; }
}
/* phone: the cards stay in two columns */
@media (max-width: 559px) {
  .libcards a { padding: 30px 8px 12px; }
  .libcards .clogo { height: 64px; }
  .libcards .reg .clogo { padding: 10px 8%; }
  .libcards .cq { font-size: .8rem; min-height: 0; }
  .libcards.trials { gap: 10px; }
  .libcards.trials a, .libcards .reg { padding: 14px 10px; }
  .libcards .reg .clogo { margin-top: 16px; }
  .libcards.trials .clogo { height: 96px; margin-top: 14px; }
}

/* motion: decoration only; the site works the same with reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .sidenav a, .tab, .btn, .hswtab, .hswcard, .libcards a, .acctbtn, details.unit > summary { transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
  .libcards a:hover, a.hswcard:hover, .hswtab:not([aria-selected="true"]):not([aria-expanded="true"]):hover { transform: translateY(-2px); box-shadow: 0 10px 18px -12px var(--shadow); }
  .chev { transition: transform .16s ease; } a.hswcard:hover .chev { transform: translateX(3px); }
  .hswpanel > *, [role="tabpanel"] > * { animation: riseIn .24s ease both; }
  .hswpanel > *:nth-child(2) { animation-delay: .04s; } .hswpanel > *:nth-child(3) { animation-delay: .08s; } .hswpanel > *:nth-child(4) { animation-delay: .12s; }
  .acctmenu, .cmdpanel, .viddlg[open] { animation: riseIn .16s ease both; }
  /* list marker and tab ink slide */
  .navmark { transition: transform .26s cubic-bezier(.2, .7, .2, 1), width .26s ease, height .26s ease; } .navmark.no-anim { transition: none; }
  .tabink { transition: transform .24s cubic-bezier(.2, .7, .2, 1), width .24s ease; } .tabink.no-anim { transition: none; }
  /* page fade-in, cards in sequence */
  #main.page-in > *:not(.libcards) { animation: riseIn .26s ease both; }
  #main.page-in > *:has(.srch) { animation: fadeIn .26s ease both; } /* opacity only: a transform would make the fixed question box fixed to the page instead of the screen */
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  #main.page-in > *:nth-child(2) { animation-delay: .04s; } #main.page-in > *:nth-child(3) { animation-delay: .08s; } #main.page-in > *:nth-child(n+4) { animation-delay: .12s; }
  #main.page-in .libcards li { animation: riseIn .3s ease both; animation-delay: calc(var(--i, 0) * 22ms + .06s); }
  .navprog.run { animation: navProg .55s ease-out both; }
  .totop { animation: riseIn .2s ease both; transition: background-color .16s ease, transform .16s ease; } .totop:hover { transform: translateY(-2px); }
  /* press shrink */
  .btn:active, .hswtab:active, .libcards a:active, .tab:active, .hswcard:active { transform: scale(.985); }
  /* closed-box arrow turns */
  details.unit > summary::before { transition: transform .16s ease, margin .16s ease; }
  details.unit[open] > *:not(summary) { animation: riseIn .2s ease both; }
  .toast { animation: toastIn .18s ease both; }
  @keyframes riseIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes navProg { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(.85); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
  @keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
}

/* ---------- text editor (Admin only) ---------- */
.txp { display: grid; gap: 10px; }
.editing #main [data-t] { outline: 1px dashed var(--blue); outline-offset: 2px; border-radius: 2px; cursor: text; }
.editing #main [data-t]:hover, .editing #main [data-t]:focus-visible { outline: 2px solid var(--blue); background: var(--blue-soft); }
.editbar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 12px; background: var(--navy); color: var(--on-navy); padding: 8px 8px 8px 16px; border-radius: var(--r); box-shadow: 0 8px 24px -8px var(--shadow); width: max-content; max-width: calc(100% - 32px); font-size: .9rem; }
.editing .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.txdlg { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; width: min(560px, calc(100% - 32px)); background: var(--panel); color: var(--ink); box-shadow: 0 16px 40px -16px var(--shadow); }
.txdlg::backdrop { background: var(--scrim); }
/* The welcome video panel: in the centre, like "Search or ask"; the same on every screen. */
.viddlg { width: min(960px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: 0 24px 48px -24px var(--shadow); overflow: hidden; }
.viddlg::backdrop { background: var(--scrim); }
.vidbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; font-weight: 600; }
.viddlg video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 32px - 62px); max-height: calc(100dvh - 32px - 62px); background: var(--navy); }
.txdlg form { display: grid; gap: 12px; }
.txdlg h2 { font-size: 1.2rem; }
.txlbl { font-weight: 600; font-size: .9rem; display: flex; justify-content: space-between; gap: 12px; }
.txlbl small { font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: .78rem; }
/* 16px: no page zoom on an iPhone when a person taps the box (brief "no page zoom on an iPhone in the form boxes"). */
.txdlg textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; resize: vertical; }
.txmeta { color: var(--muted); font-size: .88rem; }
/* Account settings box (David, 13 Nov 2026) */
.txdlg.acctdlg { width: min(440px, calc(100% - 32px)); } /* entry 29: at most 440px on a tablet, near full width on a phone */
.txdlg .pf { display: grid; gap: 4px; }
.txdlg .pv { font-size: 1rem; overflow-wrap: anywhere; }
.txdlg .sub { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 12px; }
.txdlg .sub h3 { font-size: 1rem; margin: 0; }
.txdlg input { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.txerr { color: var(--red); font-size: .9rem; }
.txbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.txbtns .push { margin-left: auto; }

/* ---------- People page (Admin only; public/app/people.js) ---------- */
.tag.warn { background: var(--warn-soft); color: var(--warn); white-space: normal; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.pbody { display: grid; gap: 22px; min-width: 0; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.plist > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line); }
.plist > li:first-child { border-top: 0; }
.pmain { display: grid; gap: 3px; min-width: 0; }
.pmain b { font-weight: 600; overflow-wrap: anywhere; }
.pmain .pmeta { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.pmain .pnote { white-space: pre-line; overflow-wrap: anywhere; }
.ptags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pbtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pform { display: grid; gap: 12px; max-width: 480px; }
.pfield { display: grid; gap: 4px; }
.pfield label, .pchecks legend { font-weight: 600; font-size: .9rem; }
.pfield input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink); font: inherit; font-size: 16px; }
.pchecks { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.pchecks label { display: flex; gap: 8px; align-items: center; min-height: 32px; }
.pdraft { width: 100%; min-height: 220px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); font: .88rem/1.5 var(--mono); resize: vertical; }
/* The request of the link in email 1: marked in the list, or "decided by" when it is decided already. */
.plist > li.pfocus { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.pdone { border-left: 3px solid var(--blue); background: var(--blue-soft); padding: 8px 12px; border-radius: 0 var(--r) var(--r) 0; font-size: .9rem; margin: 0 0 8px; }
.pwarn { border-left: 3px solid var(--warn); background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: 0 var(--r) var(--r) 0; font-size: .9rem; }
.txdlg .btn.primary { text-decoration: none; }
/* The shared password box (entry 25, 13 Nov 2026; built by /auth/pwrule.js). The same rules are in auth.css and site.css.
   An eye button at the right end of the box; under a box where the person chooses a password, the live rule list:
   a small circle that fills blue with a white tick when the rule is met. Thin solid lines, 16px text in the box. */
.pwbox { position: relative; }
.pwbox input { padding-right: 46px; }
.pweye { position: absolute; top: 0; right: 0; width: 44px; height: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 0 var(--r) var(--r) 0; padding: 0; }
.pweye:hover { color: var(--ink); }
.pweye:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.pweye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pweye .pweye-off { display: none; }
.pweye.is-shown .pweye-on { display: none; }
.pweye.is-shown .pweye-off { display: block; }
.pwrules { list-style: none; margin: 4px 0 0; padding: 0; font-size: .8rem; line-height: 1.4; color: var(--muted); display: grid; gap: 4px; }
.pwrules li { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.pwrules i { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid #9fb0bd; position: relative; }
.pwrules li.ok { color: var(--ink); }
.pwrules li.ok i { background: var(--blue); border-color: var(--blue); }
.pwrules li.ok i::after { content: ""; position: absolute; left: 3.5px; top: 1px; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.pwsr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.plog li { grid-template-columns: 150px minmax(0, 1fr); }
.plog .pwhen { color: var(--muted); font-size: .86rem; }
@media (max-width: 640px) {
  .plist > li, .plog li { grid-template-columns: minmax(0, 1fr); }
  .pbtns { justify-content: flex-start; }
}

/* Secure Areas and the restricted area (brief "People page and Secure Areas", David, 12 Nov 2026). */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sidenav a span:first-child { min-width: 0; overflow-wrap: anywhere; }
.sidenav .grp { overflow-wrap: anywhere; } /* a long heading wraps; the list never gets wider */
.sidenav .mk { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* No coloured bar on Secure or restricted lines (brief "four look changes", David, 12 Nov 2026): the padlock (gold) and the shield (grey) are the only marks. */
.sidenav a.secl .mk { color: var(--gold-bar); }
.sidenav a.resl .mk { color: var(--slate-bar); }
/* the restricted section: a thin pale solid line like the other lines of the site, and more space above it */
.rzone { margin-top: 22px; border-top: 1px solid var(--list-edge); padding-top: 4px; display: grid; gap: 1px; }
.areabar { display: flex; gap: 8px; align-items: center; font-size: .9rem; padding: 8px 12px; border-radius: var(--r); border-left: 3px solid; }
.areabar .mk { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.areabar.secure { background: var(--gold-bg); color: var(--gold-ink); border-left-color: var(--gold-line); }
.areabar.restricted { background: var(--slate-bg); color: var(--slate-ink); border-left-color: var(--slate-ink); }
/* The "Logged" bar: a full bar across the top of the screen (picture A), sticky. Pale grey with plain text; the test copy's line is a 3 px amber
   line, so the two do not look alike. Made by site.js: before the page frame at 1000px and wider, under the navy top bar below that. */
.loggedbar { position: sticky; top: var(--topbar, 0px); z-index: 19; background: var(--slate-bg); border-bottom: 1px solid var(--line); color: var(--sec-4); font-size: .78rem; line-height: 1.4; padding: 5px max(16px, env(safe-area-inset-left, 0px)) 5px max(16px, env(safe-area-inset-right, 0px)); text-align: center; overflow-wrap: anywhere; }
@media (min-width: 1000px) {
  .loggedbar { padding-top: calc(5px + env(safe-area-inset-top, 0px)); }
  .testline ~ .loggedbar { padding-top: calc(8px + env(safe-area-inset-top, 0px)); } /* the amber line sits above the text, not over it */
  .side { top: var(--logh, 0px); height: calc(100vh - var(--logh, 0px)); height: calc(100dvh - var(--logh, 0px)); }
}
.areadlg { width: min(420px, calc(100% - 32px)); max-width: none; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
.areadlg::backdrop { background: var(--scrim); }
.areadbox { display: grid; gap: 12px; padding: 20px; justify-items: start; }
/* the pop-up, layout D (brief "four look changes"): nothing bold; a larger title, one lead line, a short list */
.areadbox h2 { font-size: 1.25rem; font-weight: 400; }
.areadtx { display: grid; gap: 8px; } .areadtx p { margin: 0; color: var(--ink); }
.areadtx ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink); }
.areadbox .btn { font-weight: 400; }
/* the 30-day notice at the top of Home */
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; background: var(--gold-bg); color: #5c3a00; border-left: 3px solid var(--gold-line); border-radius: var(--r); padding: 8px 12px; font-size: .92rem; }
.notice .tx { flex: 1 1 220px; }
.notice .btn { padding: 5px 12px; }
@media print { .loggedbar { position: static; border-color: #999; } }
.areabody { display: grid; gap: 14px; min-width: 0; }

/* The finish of the study page's Overview (David's choices, 16 Nov 2026). Every rule is scoped to the Overview (.cols, which only
   the study page draws) or to the study page's head (.topline); other pages and the other tabs are not touched. */
/* The Overview's content boxes (panels, section boxes, tables, Key facts, the visit chart, the arm boxes) are soft blue-grey.
   White boxes again: set --obox-bg: var(--panel); --obox-line: var(--line). Clickable cards and other pages keep white. */
.cols { --obox-bg: #F6F9FB; --obox-line: #DBE3EA; }
.cols .stack { gap: 36px; }
.cols .sec { gap: 12px; }
.cols .sec > h2 { font-weight: 600; }
.cols .sec > h3 { font-size: .95rem; font-weight: 600; margin: 10px 0 -4px; }
.cols .sec > .notyet { color: var(--muted); }
/* the boxes: a plain box with a thin line all round, a heading with a thin grey line under it */
.cols .panels { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.cols .panel { background: var(--obox-bg); border: 1px solid var(--obox-line); }
.cols .panel > h3 { font-size: 1rem; font-weight: 600; line-height: 1.3; padding-bottom: 10px; border-bottom: 1px solid var(--obox-line); }
.cols .panel > h3.hasmk { display: flex; align-items: center; gap: 10px; }
.cols .pmk { flex: none; }
.cols .pmk.sq { width: 10px; height: 10px; border-radius: 2px; }
.cols .pmk.grey { background: var(--faint); } .cols .pmk.blue { background: var(--blue); }
.cols .pmk.ic { width: 18px; height: 18px; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cols .pmk.ok { stroke: var(--ok); } .cols .pmk.no { stroke: var(--red); }
/* a section with boxes: the boxes stack full width; a list in a box flows in two columns when there is room */
.cols .gboxes { display: grid; gap: 16px; }
.cols .gboxes .steps { display: block; columns: 2 16rem; column-gap: 32px; max-width: none; }
.cols .gboxes .steps li { break-inside: avoid; margin-bottom: 8px; }
/* tables in the sections */
.cols .facts { background: var(--obox-bg); border-color: var(--obox-line); }
.cols .facts > div { border-top-color: var(--obox-line); }
.cols .facts > div:first-child { border-top: 0; }
/* a table inside a box: the box is the outline; the rows keep their separators */
.cols .panel .facts { border: 0; border-radius: 0; background: none; }
.cols .tlwrap { background: var(--obox-bg); border-color: var(--obox-line); }
.cols .tl .ring { fill: var(--obox-bg); }
.cols .tl .long { stroke: var(--obox-bg); }
.cols .armbox { background: var(--obox-bg); border-color: var(--obox-line); }
.cols .sec .facts > div { grid-template-columns: 160px minmax(0, 1fr); padding: 9px 14px; }
@media (max-width: 1199px) { .cols .sec .facts > div { grid-template-columns: 130px minmax(0, 1fr); } }
/* the trial's logo in the head */
.topline.withlogo { flex-wrap: nowrap; align-items: center; overflow-x: clip; }
.topline.withlogo > div:first-child { flex: 1 1 0; }
.studylogo { display: none; flex: none; height: 64px; width: auto; object-fit: contain; transform: translateX(calc(var(--logo-gap, 0) * 100%)); }
/* The logo is hidden below 1,000 px, where the head is navy (David, 17 Nov 2026). */
@media (min-width: 1000px) { .studylogo { display: block; } }
/* The logo is 112 px high from 1000px (David, 16 Nov 2026; was 92). */
@media (min-width: 1000px) { .studylogo { height: 112px; } }
/* the tab row, stuck at the top (1,200px and wider; below that it is buttons and not sticky): a thin line under it */
@media (min-width: 1200px) { .tabrow.is-stuck { border-bottom: 1px solid var(--line); } }
/* a pale tint under the pointer, only on what acts */
@media (hover: hover) {
  .tabrow .tab[aria-selected="false"]:hover, .onpage button:hover { background: rgba(0, 110, 175, .08); }
}

/* The Protocol tab of the study page (David, 16 Nov 2026; test copy). Every rule is scoped to .protob (the tab's own wrapper) or to the
   table dialog (.ptdlg), so no other page or tab is touched. Chapters and sections are <details>/<summary> (keyboard and screen reader
   ready). No dashed lines. Below 600px: two-line titles, no section counts, the page under the heading, tables in a full-screen dialog. */
.protob { padding-top: 6px; min-width: 0; }
.protob details.crow > summary, .protob details.srow > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.protob summary::-webkit-details-marker { display: none; }
.protob details.crow > summary { min-height: 52px; padding: 0 16px; gap: 12px; }
.protob details.crow > summary::after, .protob details.srow > summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -3px 4px 0 6px; }
.protob details[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.protob .sbody0 { padding: 14px 16px 16px 56px; }
.protob details.srow { border-top: 1px solid var(--line); }
.protob details.srow:first-child { border-top: 0; }
.protob details.srow > summary { min-height: 44px; padding: 0 16px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 22px; align-items: center; }
.protob details.srow > summary::after { width: 7px; height: 7px; margin: -3px 0 0 auto; grid-column: 4; }
.protob details.srow[open] > summary::after { margin-top: 3px; }
.protob .sn { color: var(--muted); font-variant-numeric: tabular-nums; }
.protob .sn.sn0 { color: var(--faint); } /* an unnumbered section shows its chapter's number, lighter */
.protob .st { font-weight: 500; line-height: 1.35; padding: 8px 0; overflow-wrap: anywhere; }
.protob .sp { font-size: .82rem; color: var(--muted); white-space: nowrap; padding-left: 16px; }
.protob .sbody { padding: 2px 16px 18px 60px; display: grid; gap: 12px; min-width: 0; }
.protob .sbody p { overflow-wrap: anywhere; white-space: pre-line; margin: 0; }
.protob .pul { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; overflow-wrap: anywhere; }
.protob .sbody h4 { margin: 0; overflow-wrap: anywhere; line-height: 1.35; }
.protob .sbody h4.hcap { margin-top: 10px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; color: var(--blue); }
.protob .sbody h4.hsub { margin-top: 6px; margin-bottom: -4px; font-size: 1rem; font-weight: 600; color: var(--ink); }
.protob .pfig { margin: 0; max-width: 100%; }
.protob .pfig img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.protob .pfig figcaption { margin-top: 6px; font-size: .82rem; color: var(--muted); display: grid; gap: 1px; }
.protob .pfig figcaption .pcap { color: var(--ink); }
/* A Word figure keeps its own size (up to the text width) and is centred; on a phone it fills the width. */
.protob .pfig.pword img { width: auto; max-width: 100%; margin: 0 auto; }
.protob .pfig.pword figcaption { text-align: center; }
@media (max-width: 599px) { .protob .pfig.pword img { width: 100%; } }
.protob .ptwrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.ptab { border-collapse: collapse; font-size: .88rem; width: 100%; }
.ptab caption { text-align: left; padding: 8px 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
.ptab th, .ptab td { text-align: left; vertical-align: top; padding: 8px 12px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ptab th:first-child, .ptab td:first-child { border-left: 0; }
.ptab thead th { background: var(--soft); font-weight: 600; border-top: 0; }
/* The head: one panel, the first page as a small sheet, the version line first, a muted note, the button (David, 16 Nov 2026). */
.protob .phead { display: flex; align-items: center; gap: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; margin: 0 0 18px; min-width: 0; }
.protob .pnone { margin: 0; max-width: none; color: var(--muted); line-height: 1.5; }
.protob .phead + .pnone, .protob .pfilerow + .pnone { margin-top: -4px; }
.protob .pfilerow { margin: 0 0 18px; min-width: 0; }
.protob .psheet { flex: none; width: 66px; height: 93px; display: grid; place-items: center; }
.protob .psheet img { display: block; max-width: 66px; max-height: 93px; width: auto; height: auto; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 2px 6px -2px var(--shadow); box-sizing: border-box; }
.protob .psheet.empty { background: var(--bg); border: 1px solid var(--line); border-radius: 2px; box-sizing: border-box; }
.protob .ptext { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
.protob .pm { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; max-width: none; color: var(--ink); font-size: 1rem; font-weight: 600; line-height: 1.35; }
.protob .pv { min-width: 0; overflow-wrap: anywhere; }
.protob .pbadge { flex: none; height: 18px; padding: 0 6px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: .7rem; letter-spacing: .02em; display: inline-grid; place-items: center; }
.protob .pn { color: var(--muted); font-size: .88rem; line-height: 1.4; margin: 0; max-width: none; }
.protob .phead .btn { flex: none; min-height: 40px; justify-content: center; }
/* The type sheet (source-file block, 18 Nov 2026): the file type in grey bold on white, in place of a first-page picture. */
.protob .psheet.typ { background: #fff; border: 1px solid var(--line); border-radius: 2px; box-sizing: border-box; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.protob .psheet.typ { font-size: .95rem; box-shadow: 0 2px 6px -2px var(--shadow); }
/* The source files block: 40px under the database frame; the heading as the Database group headings inside the frame (library-panels.css). */
.protob.srcfiles { margin-top: 30px; padding-top: 0; } /* the .sec gap adds 10px */
.protob.srcfiles > .srchead { display: block; margin: 0 0 12px; padding: 0 0 10px; font-size: 1.2rem; font-weight: 600; line-height: 1.3; color: var(--ink); border-bottom: 1px solid #c9d5de; overflow-wrap: anywhere; }
.protob.srcfiles > .phead:last-child, .protob.srcfiles > .pfilerow:last-child { margin-bottom: 0; }
/* Source file rows, layout B with icon C1 (David, 20 Nov 2026): the band is the file badge's blue for every type. */
.protob .srcrow { gap: 16px; margin-bottom: 12px; }
.protob .srcico { flex: none; display: block; width: 56px; height: 72px; }
.protob .srcico .pp { fill: #fff; stroke: var(--line); stroke-width: 1.5; }
.protob .srcico .fold { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.protob .srcico .band { fill: var(--muted); } /* slate grey: the site's muted text grey (David, 20 Nov 2026, option B): blue is for what can be clicked */
.protob .srcico .bt { fill: #fff; font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.protob .srct { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; margin: 0; max-width: none; color: var(--ink); font-size: 1rem; font-weight: 600; line-height: 1.35; }
.protob .srcdate { flex: none; white-space: nowrap; color: var(--muted); font-size: .85rem; font-weight: 400; }
.protob .srcshort { display: none; } /* the phone-only short note (noteShort): shown below 600px only */
.protob .srctype, .protob .srcdl { display: none; } /* phone option G only (below 600px) */
.protob .srcdate.nodate { display: none; } /* no date: from 600px nothing after the title */
/* From 600px the date follows the title, after a grey dot (David, 20 Nov 2026, laptop option C). Below 600px unchanged for now. */
@media (min-width: 600px) {
  .protob .srct { justify-content: flex-start; column-gap: 0; }
  .protob .srcdate::before { content: "\00b7"; margin: 0 8px; color: var(--muted); }
}
/* The contents spine: one panel, one thin upright line through round chapter marks (first drawn mark to the last). */
.protob .rows { --m: 32px; --px: 24px; --h: 68px; --gap: 16px; --spine: #b5d1e6; display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 0; overflow: hidden; min-width: 0; }
.protob .rows details.crow { position: relative; min-width: 0; }
.protob .rows details.crow::before { content: ""; position: absolute; z-index: 0; left: calc(var(--px) + var(--m) / 2 - 1px); width: 2px; top: 0; bottom: 0; background: var(--spine); }
.protob .rows details.crow:first-child::before { top: calc(var(--h) / 2); }
.protob .rows details.crow:last-child::before { bottom: auto; height: calc(var(--h) / 2); }
.protob .rows details.crow:only-child::before { display: none; }
.protob .rows details.crow > summary { display: grid; grid-template-columns: var(--m) minmax(0, 1fr) auto 14px; grid-template-rows: auto auto; column-gap: var(--gap); row-gap: 0; align-items: center; align-content: center; height: var(--h); min-height: 0; padding: 0 22px 0 var(--px); }
.protob .rows .badge { grid-column: 1; grid-row: 1 / 3; position: relative; z-index: 1; width: var(--m); height: var(--m); border-radius: 50%; background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); font-weight: 600; font-size: .9rem; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.protob .rows details.crow[open] > summary .badge { background: var(--blue); color: var(--on-accent); }
/* An open chapter: nothing in its row moves (the grey line of sections stays); the row takes a very pale blue (David, 16 Nov 2026, "C"). */
.protob .rows details.crow[open] > summary { background-color: #F3F8FC; }
.protob .rows .cn { grid-column: 2; grid-row: 1; padding: 0; font-weight: 600; font-size: 1.1rem; line-height: 1.3; overflow-wrap: anywhere; align-self: end; min-width: 0; }
.protob .rows .cl { grid-column: 2; grid-row: 2; align-self: start; margin-top: 2px; font-size: .88rem; line-height: 1.35; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.protob .rows .cl.cut { text-overflow: clip; } /* once the script has cut the line at a whole title, nothing is cut by the box */
.protob .rows .cc { grid-column: 3; grid-row: 1 / 3; font-size: .82rem; color: var(--muted); white-space: nowrap; padding-right: 4px; }
.protob .rows details.crow > summary::after { grid-column: 4; grid-row: 1 / 3; margin: -3px 0 0; justify-self: end; }
/* the thin line between chapters starts at the text, not at the upright line */
.protob .rows details.crow + details.crow > summary { background-image: linear-gradient(var(--line), var(--line)); background-size: calc(100% - var(--px) - var(--m) - var(--gap) - 22px) 1px; background-position: calc(var(--px) + var(--m) + var(--gap)) 0; background-repeat: no-repeat; }
.protob .rows details.crow + details.crow[open] > summary, .protob .rows details.crow[open] + details.crow > summary { background-image: none; }
.protob .rows details.crow > .cbody { padding: 0 22px 14px calc(var(--px) + var(--m) + var(--gap)); }
.protob .rows .sbody0 { padding: 6px 0 4px; }
.protob .rows details.srow { border-top: 1px solid var(--line); }
.protob .rows details.srow:last-child { border-bottom: 1px solid var(--line); }
.protob .rows details.srow > summary { padding: 0 6px 0 0; grid-template-columns: 54px minmax(0, 1fr) auto 22px; }
.protob .rows .sbody { padding: 2px 6px 20px 54px; }
@media (pointer: coarse) { .protob details.srow > summary { min-height: 48px; } .protob .phead .btn { min-height: 44px; } }
@media (prefers-reduced-motion: no-preference) { .protob details > summary::after { transition: transform .16s ease, margin .16s ease; } }
@media (hover: hover) { .protob details > summary:hover { background: rgba(0, 110, 175, .06); } }
/* the table dialog (a phone) */
html.ptlock, html.ptlock body { overflow: hidden; }
.ptdlg { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--panel); color: var(--ink); }
.ptdlg[open] { display: flex; flex-direction: column; }
.ptdlg .ptbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 6px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); padding-top: max(6px, env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--line); }
.ptdlg .ptt { min-width: 0; display: grid; }
.ptdlg .ptn { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.ptdlg .ptw { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.ptdlg .ptbar .btn { flex: none; min-height: 44px; padding: 0 18px; justify-content: center; }
.ptdlg .ptview { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.ptdlg .ptview img { display: block; width: auto; max-width: none; height: auto; }
.ptdlg .ptview .ptab { width: max-content; min-width: 100%; }
@media (max-width: 599px) {
  .protob { padding-top: 2px; }
  .protob details.srow > summary { min-height: 48px; padding: 6px 16px; grid-template-columns: 34px minmax(0, 1fr) 22px; grid-template-rows: auto auto; align-items: center; }
  .protob .sn { grid-column: 1; grid-row: 1 / 3; align-self: center; }
  .protob .st { grid-column: 2; grid-row: 1; padding: 2px 0 0; align-self: end; }
  .protob .sp { grid-column: 2; grid-row: 2; padding: 0 0 2px; align-self: start; line-height: 1.3; }
  .protob details.srow > summary::after { grid-column: 3; grid-row: 1 / 3; justify-self: end; margin: -2px 0 0; }
  .protob details.srow[open] > summary::after { margin-top: 3px; }
  .protob .phead { flex-direction: column; align-items: stretch; gap: 14px; padding: 14px 16px; }
  .protob .psheet { align-self: flex-start; }
  .protob .phead .btn { width: 100%; min-height: 44px; }
  .protob.srcfiles > .srchead { font-size: 1.06rem; }
  .protob .srcrow { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
  .protob .srcrow .ptext { flex: 1 1 0; }
  .protob .srcrow .srct { display: block; } /* below 600px the date is always its own grey line under the title (David, 20 Nov 2026, phone option C) */
  .protob .srcrow .srcdate { display: block; margin: 2px 0 4px; }
  .protob .srcrow .srclong { display: none; } /* noteShort replaces note below 600px */
  .protob .srcrow .srcshort { display: block; }
  /* Phone option G (David, 20 Nov 2026): no icon, the type in the date line, a square download icon button; the whole panel downloads. */
  .protob .srcrow { position: relative; flex-wrap: nowrap; align-items: center; gap: 14px; }
  .protob .srcrow .srcico, .protob .srcrow > .btn { display: none; }
  .protob .srcrow .srcdate.nodate { display: block; }
  .protob .srcrow .srctype { display: inline; font-weight: 600; color: var(--muted); }
  .protob .srcrow .srcdate:not(.nodate) .srctype::before { content: "\00b7"; margin: 0 6px; font-weight: 400; }
  .protob .srcrow .srcdl { display: grid; place-items: center; flex: none; width: 48px; height: 48px; padding: 0; border: 1px solid #d4dde6; border-radius: 10px; background: #fff; color: var(--blue); cursor: pointer; }
  .protob .srcrow .srcdl svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .protob .srcrow .srcdl::after { content: ""; position: absolute; inset: 0; } /* the whole panel is the same download */
  .protob .srcrow .srcdl:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
  .protob .rows { --m: 28px; --px: 14px; --h: 60px; --gap: 12px; }
  .protob .rows .cc { display: none; }
  .protob .rows .cn { font-size: 1.02rem; }
  .protob .rows details.crow > summary { padding: 0 14px 0 var(--px); grid-template-columns: var(--m) minmax(0, 1fr) 14px; }
  .protob .rows details.crow > summary::after { grid-column: 3; }
  .protob .rows details.crow > .cbody { padding-right: 14px; }
  .protob .rows details.srow > summary { padding: 6px 0; grid-template-columns: 34px minmax(0, 1fr) 22px; grid-template-rows: auto auto; }
  .protob .rows .sbody { padding: 4px 0 18px; }
  .protob .rows .sbody0 { padding: 6px 0 4px; }
  .protob .sbody { padding: 4px 16px 18px; font-size: 16px; line-height: 1.55; }
  .protob .sbody p, .protob .pul { max-width: none; font-size: 16px; }
  .protob .sbody0 { padding: 12px 16px 16px; }
  .protob .tnote { font-size: .82rem; line-height: 1.4; color: var(--muted); }
  .protob .btn.wide { width: 100%; min-height: 44px; justify-content: center; }
  .protob .ptphone { display: grid; gap: 8px; }
}

/* ---------- Pieces for add-on tools (17 Nov 2026) ----------
   For the Study database designer's browse and compare screens (drawings accepted by David, 17 Nov 2026).
   Only the site's own colours, lines and type. Documented in docs/TOOLS-CONTRACT.md and the starter's CONTRACT.md. */

/* A form field: a small grey label above a text box, a choice list or a text area. 16px text in the box (no zoom on iPad). */
.field { display: grid; gap: 4px; min-width: 0; }
.field > .flabel { color: var(--muted); font-size: .85rem; }
.field :is(input, select, textarea) { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink); font: inherit; font-size: 16px; }
.field textarea { min-height: 96px; line-height: 1.5; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23536a7b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
.field :is(input, select, textarea)::placeholder { color: var(--faint); }
.field :is(input, select, textarea):hover { border-color: var(--faint); }
.field :is(input, select, textarea):focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field :is(input, select, textarea):disabled { background: var(--bg); color: var(--muted); cursor: default; }

/* A button that stays chosen ("Compare" on a form): aria-pressed="true". The tool writes the tick in the text. */
.btn[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }

/* Question rows: a form's questions one under the other, a thin solid line between them (compare view, form preview).
   li.qrow: .qtext the question, .qans the answers, .qmeta a small grey line (type, required, rule). li.qhead: a heading inside the form.
   A nested question: li.qrow.qnest (indented). Inside a soft box the line takes the box's own line colour. */
.qrows { list-style: none; margin: 0; padding: 0; display: grid; }
.qrows > li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; min-width: 0; }
.cols .qrows > li { border-top-color: var(--obox-line); }
.qrows > li:first-child { border-top: 0; padding-top: 2px; }
.qrows .qtext { font-size: 1.02rem; line-height: 1.4; overflow-wrap: anywhere; }
.qrows .qans { overflow-wrap: anywhere; }
.qrows .qmeta { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.qrows > li.qhead { padding-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.qrows > li.qnest { padding-left: 22px; }
.qrows > li.qnest2 { padding-left: 44px; }
.qrows .tag { justify-self: start; }

/* The file row (16 Nov 2026, David): one reusable part for every list of documents on the site. Not scoped to a page; it uses --panel and
   --line only, so it stays white inside the Overview's soft boxes (--obox-*). The whole row is the button. Nothing is cut: names and the
   grey line wrap. Solid edges only. Controls are at least 40px high (the row is about 84px). */
/* Document search: the answer drawn from its Markdown (24 Nov 2026). Thin solid lines only. */
.srchans > p { margin: 0 0 8px; }
.srchans ul, .srchans ol { margin: 0 0 8px; padding-left: 1.3em; display: grid; gap: 4px; }
.srchtab { overflow-x: auto; max-width: 100%; margin: 0 0 10px; border: 1px solid var(--line, #d9dee5); border-radius: 8px; }
/* 24 Nov 2026: words stayed whole ("Timing", "Biopsy"): the card's overflow-wrap: anywhere was inherited by the cells, so a table squeezed to the
   width of a narrow card broke words into single letters. Cells wrap at spaces only; a table wider than the answer scrolls inside its own box. */
.srchtab table { border-collapse: collapse; width: 100%; font-size: 0.92em; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.srchtab th, .srchtab td { min-width: 5em; overflow-wrap: normal; word-break: normal; text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line, #d9dee5); }
.srchtab tr:last-child td { border-bottom: 0; }
.srchtab th { font-weight: 600; background: var(--soft, #f4f6f9); }

/* "Ask ProfBot" (25 Nov 2026, David's approved mock-up). All under .srch. Thin solid lines only. */
.srch .wm { font-weight: 700; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.srch .wm .lt { font-weight: 500; color: #3f566a; }
.srch .wm .b { color: #006EAF; }
.srch .hero { min-height: min(60vh, 520px); display: grid; align-content: center; justify-items: center; gap: 14px; padding: 8px 0 40px; text-align: center; }
.srch .hero[hidden] { display: none; }
.srch .hero .pb { height: 112px; width: auto; display: block; }
@media (max-width: 599px) { .srch .hero .pb { height: 96px; } }
.srch .hero .mark { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.5rem); line-height: 1.1; }
/* the ProfBot bar above a question, from 1,000 px only (25 Nov 2026, option 4); the history icon sits centred on its right */
.srch .pbtop { display: none; }
@media (min-width: 1000px) {
  .srch .pbtop:not([hidden]) { display: grid; gap: 2px; padding: 0 44px 12px 0; border-bottom: 1px solid var(--line); }
  .srch .pbtop .mark { font-size: 1.35rem; line-height: 1.2; }
  .srch .pbtop .sub { margin: 0; font-size: .85rem; line-height: 1.4; color: var(--muted); }
  .srch:has(.pbtop:not([hidden])) .srchrec { top: 8px; } /* centred on the two text lines (about 47px tall) of the bar */
  .srch:has(.pbtop:not([hidden])) .srchrec ~ .srchmain .qtitle { padding-right: 0; }
}
.srch .hero .sub { margin: -4px 0 4px; color: var(--muted); max-width: 34rem; }
.srch #srchslot { width: 100%; max-width: 720px; }
.srch .hb { position: relative; width: 100%; max-width: 720px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px 12px 10px 16px; display: grid; gap: 8px; box-shadow: 0 2px 10px rgba(1, 50, 80, .08); box-sizing: border-box; }
.srch .hb .tl { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.srch .hb .tl .cap { margin-top: 3px; flex: none; }
.srch .hb textarea { font: 400 1.05rem/1.5 var(--font); color: var(--ink); width: 100%; box-sizing: border-box; border: 0; padding: 2px 0; min-height: 54px; background: transparent; outline: 0; resize: none; }
.srch .hb textarea::placeholder { color: var(--muted); }
.srch .hb.busy textarea { color: var(--muted); }
.srch .hb .bar { display: flex; align-items: center; gap: 10px; }
.srch .hb .go { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 0; background: #c9d5de; color: #fff; cursor: pointer; flex: none; }
.srch .hb .go:disabled { cursor: default; }
.srch .hb .go.on { background: #006EAF; }
.srch .hb .go.stop { background: var(--ink); }
.srch .hb .go:focus-visible, .srch .hex button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.srch .hb:focus-within { border-color: var(--blue); }
.srch .hex { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 720px; }
.srch .hex button { font: 500 .88rem var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; cursor: pointer; }
@media (max-width: 599px) { .srch .hex { display: none; } } /* option E (27 Nov 2026, David via the ProfBot designer): no example pills below 600 px; the box text carries one example (profbot.js startPlaceholder) */
@media (hover: hover) { .srch .hex button:hover { background: var(--blue-soft); } }
.srch .hnote { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.srch .qtitle { margin: 2px 0; font-size: 1.55rem; font-weight: 600; line-height: 1.3; max-width: 760px; color: var(--ink); overflow-wrap: anywhere; }
.srch .qmeta { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
.srch .stopped { color: var(--muted); font-weight: 400; }
#srchout { display: grid; gap: 14px; min-width: 0; }
/* Running (layout B): one status line and a few grey placeholder lines. */
.srch .mwait { max-width: 760px; margin: 4px 0 6px; }
.srch .mline { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; color: var(--ink); }
.srch .mdot { width: 8px; height: 8px; border-radius: 50%; background: #006EAF; flex: none; align-self: center; }
.srch .mstep { color: var(--muted); }
.srch .mstep.wrapped { flex-basis: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .srch .mshim { background: linear-gradient(100deg, var(--ink) 0 40%, #8fa7b8 50%, var(--ink) 60% 100%) 100% 0 / 250% 100% no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent; animation: pbshim 2.2s linear infinite; }
  @keyframes pbshim { to { background-position: 0 0; } }
}
.srch .msk { max-width: 760px; display: grid; gap: 12px; margin-top: 10px; }
.srch .msk i, .srch .srchbar { display: block; height: 12px; border-radius: 6px; background: #e3e9ef; }
.srch .srchbar { width: 140px; height: 22px; border-radius: 999px; }
/* Sources row: a bold small label and pill chips. */
.srch .srchsrc { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; max-width: 760px; }
.srch .srchsrc b { font-size: .85rem; font-weight: 700; color: var(--ink); }
.srch .srchsrc .srcs { display: flex; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.srch .srchsrcc { position: relative; display: inline-block; max-width: 100%; font-size: .8rem; line-height: 1.3; padding: 4px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); overflow-wrap: anywhere; }
/* one pill per document; each page is its own link (25 Nov 2026, option A) */
.srch .srchsrcc a, .srch .srcmore { color: #0A5A8C; text-decoration: underline; text-underline-offset: 2px; }
.srch .srcmore { font: inherit; background: none; border: 0; padding: 0 0 0 2px; cursor: pointer; }
.srch .srchsrcc a:focus-visible, .srch .srcmore:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
.srch .srcrest { position: absolute; top: calc(100% + 4px); right: 0; z-index: 6; display: grid; gap: 2px; min-width: 160px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(1, 50, 80, .14); }
.srch .srcrest a { display: flex; align-items: center; min-height: 36px; box-sizing: border-box; padding: 6px 10px; border-radius: 6px; } /* full-width rows, easy to tap (the Designer, 25 Nov 2026) */
.srch .srcrest a:focus-visible { background: var(--blue-soft); }
@media (hover: hover) { .srch .srchsrcc a:hover, .srch .srcmore:hover { color: #013250; } .srch .srcrest a:hover { background: var(--blue-soft); } }
/* The question box is fixed to the bottom of the screen (JS sets --dock-left, --dock-width, --dock-h from the answer column). */
.srch .dock { position: fixed; bottom: 0; left: var(--dock-left, 0px); width: var(--dock-width, 100%); box-sizing: border-box; z-index: 5; padding: 28px 0 calc(16px + var(--sab)); background: linear-gradient(to bottom, transparent, var(--bg) 40%); }
.srch:has(.dock:not([hidden])) .srchmain { padding-bottom: 24px; min-height: 100vh; min-height: 100dvh; align-content: start; } /* at least one screen tall: the footer starts below the screen, never between a short answer and the box */
body:has(.srch .dock:not([hidden])) .foot { padding-bottom: var(--dock-h, 130px); } /* the footer stays reachable above the fixed box */
.srch .dock[hidden] { display: none; }
.srch .dock .hb { max-width: none; box-shadow: 0 4px 18px rgba(1, 50, 80, .14); }
.srch .dock .hb textarea { min-height: 28px; }
/* The white sheet (25 Nov 2026, David's layout 4), from 1,000 px only: the question, Sources, notes, both responses, the vote and the follow-up box sit on one white card.
   No box pinned at the bottom there (the same form moves to the end of the sheet); Stop is a small pill beside the status line. Below 1,000 px nothing changes. Thin solid lines only. */
.srch .qlabel, .srch .mstop, .srch .mresp { display: none; }
@media (min-width: 1000px) {
  .srch .srchsheet.on { box-sizing: border-box; background: #fff; border: 1px solid #dbe4ec; border-radius: 18px; padding: 28px 32px; box-shadow: 0 2px 12px rgba(1, 50, 80, .06); min-width: 0; }
  .srch .qlabel { display: block; margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .srch .qtitle::first-letter { text-transform: uppercase; } /* display only: the text sent and stored is as typed */
  .srch .dock { display: none; }
  .srch:has(.dock:not([hidden])) .srchmain { min-height: 0; padding-bottom: 24px; }
  body:has(.srch .dock:not([hidden])) .foot { padding-bottom: 0; }
  .srch .srchfu { margin-top: 22px; position: relative; }
  .srch .srchfu[hidden], .srch .srchfu:has(.hb.busy) { display: none; }
  .srch .srchfu .hb { display: flex; align-items: center; gap: 10px; max-width: none; padding: 7px 8px 7px 14px; background: #f8fafc; border: 1px solid #c9d6e2; border-radius: 14px; box-shadow: none; }
  .srch .srchfu .hb:focus-within { border-color: var(--blue); }
  .srch .srchfu .hb .tl { flex: 1; align-items: center; }
  .srch .srchfu .hb .tl .cap { margin-top: 0; }
  .srch .srchfu .hb textarea { min-height: 28px; font-size: 1rem; }
  .srch .srchfu .hb .bar { display: contents; }
  .srch .srchfu .hb .go { margin-left: 0; width: 34px; height: 34px; }
  .srch .srchfu .hb .go svg { width: 18px; height: 18px; }
  .srch .mstop { display: inline-flex; align-items: center; align-self: center; height: 26px; margin-left: 4px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 600 .8rem var(--font); cursor: pointer; }
  .srch .mstop:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
  .srch .mresp { display: grid; gap: 22px; max-width: 760px; margin-top: 14px; }
  .srch .mresp section { display: grid; gap: 4px; }
  .srch .mresp h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .srch .mresp .msk { margin-top: 6px; }
  .srch .mwait ~ .msk { display: none; }
}
@media (min-width: 1000px) and (hover: hover) { .srch .mstop:hover { background: var(--blue-soft); } }
/* New question (a small pill like the example buttons) and the Owner's Record: one quiet icon and a panel from the right. Thin solid lines only. */
.srch .srchrec:focus-visible, .srchpclose:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) { .srch .srchrec:hover, .srchpclose:hover { background: var(--blue-soft); color: var(--ink); } }
.srch .srchrec { position: absolute; top: 0; right: calc((100% - min(100%, 760px)) / 2); z-index: 4; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.srch .srchrec.on, .srch .srchrec[aria-expanded="true"] { background: var(--blue-soft); color: var(--ink); border-color: var(--line); }
.srch .srchrec ~ .srchmain .qtitle { padding-right: 40px; } /* the Owner's history icon sits at the top right of the column */
.srchpanel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(480px, 100vw); box-sizing: border-box; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(1, 50, 80, .14); transform: translateX(100%); visibility: hidden; transition: transform .2s ease, visibility 0s .2s; }
.srchpanel.open { transform: none; visibility: visible; transition: transform .2s ease, visibility 0s; }
.srchpanel[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .srchpanel, .srchpanel.open { transition: none; } }
@media (max-width: 599px) { .srchpanel { width: 100vw; border-left: 0; } }
.srchphead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.srchphead h2 { margin: 0; font-size: 1.1rem; }
.srchpclose { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.srchpbody { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px calc(16px + var(--sab, 0px)); display: grid; align-content: start; gap: 10px; }
.areabar.pbbar { display: none; }
@media (min-width: 1000px) {
  #main > .head.pbhead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.fileswrap { container: files / inline-size; min-width: 0; }
.files { display: grid; gap: 10px; min-width: 0; }
.files.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; align-items: start; }
.frow { font: inherit; text-align: left; display: flex; align-items: center; gap: 14px; min-height: 84px; width: 100%; padding: 10px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); min-width: 0; box-sizing: border-box; margin: 0; }
button.frow { cursor: pointer; }
a.frow { cursor: pointer; text-decoration: none; color: var(--ink); } /* a file with a source: a link to the file store, the same look as the button */
.fsheet { flex: none; width: 44px; height: 62px; display: grid; place-items: center; }
.fsheet img { display: block; max-width: 44px; max-height: 62px; width: auto; height: auto; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 1px 3px -1px var(--shadow); box-sizing: border-box; }
.fsheet.typ { background: #fff; border: 1px solid var(--line); border-radius: 2px; box-sizing: border-box; color: var(--muted); font-weight: 700; font-size: .72rem; letter-spacing: .02em; } /* the file type as text (source-file block, 18 Nov 2026) */
.fsheet.empty { background: var(--bg); border: 1px solid var(--line); border-radius: 2px; box-sizing: border-box; }
.ftext { flex: 1; min-width: 0; display: grid; gap: 4px; }
.fname { font-weight: 600; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.fmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.fbadge { flex: none; height: 18px; padding: 0 6px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: .7rem; letter-spacing: .02em; display: inline-grid; place-items: center; }
.ffacts { color: var(--muted); font-size: .82rem; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.fact { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 500; font-size: .95rem; }
.fact svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.frow.off .fname { color: var(--muted); font-weight: 500; }
.frow.off .fact { color: var(--muted); font-weight: 400; font-size: .88rem; }
.fgroup { display: grid; gap: 10px; min-width: 0; }
.fgroup + .fgroup { margin-top: 14px; }
.fgroup > h3 { font-size: 1rem; font-weight: 600; }
@media (hover: hover) { button.frow:hover { background: rgba(0, 110, 175, .06); } }
@media (hover: hover) { a.frow:hover { background: rgba(0, 110, 175, .06); } }
button.frow:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
a.frow:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* Two columns where the list asks for them: only the arrow at the right. The list falls back to one column when its own box is
   narrower than about 612px (each unit would be under 300px); the word "Open" comes back there. A phone (under 600px): always one
   column, only the arrow. */
.files.two .fopen { display: none; }
@container files (max-width: 611px) {
  .files.two { grid-template-columns: minmax(0, 1fr); }
  .files.two .fopen { display: inline; }
}
@media (max-width: 599px) {
  .files.two { grid-template-columns: minmax(0, 1fr); }
  .files .fopen, .files.two .fopen, .pfilerow .fopen { display: none; }
  .frow { min-height: 84px; padding: 10px 12px; gap: 12px; }
}

/* The paper row (16 Nov 2026, David): the file row without a page picture, for a list of papers. Not scoped to a page. A white row
   (--panel), thin solid line, the site corners; the whole row is the link. Title and grey line wrap; nothing is cut. A paper that is
   only "In press" is the same row, not a link, with no hover tint. */
.paperswrap { min-width: 0; }
.papers { display: grid; gap: 10px; min-width: 0; }
.prow { min-height: 0; text-decoration: none; color: var(--ink); }
.prow .fname { white-space: normal; line-height: 1.35; overflow-wrap: anywhere; }
.prow.nolink .fact { color: var(--muted); font-weight: 400; font-size: .88rem; }
@media (hover: hover) { a.prow:hover { background: rgba(0, 110, 175, .06); } }
a.prow:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 599px) {
  .papers .fopen { display: none; }
}

/* Study tabs as a line (from 1200px): stand out more (David, 16 Nov 2026, "A"). Every name in ink, the chosen tab shown by its line
   alone; 17px text; a darker row line; the line under the chosen tab 4px, site blue. The button form below 1200px is unchanged. */
@media (min-width: 1200px) {
  .tabrow { border-bottom-color: #b9c7d4; }
  .tabrow.is-stuck { border-bottom-color: #b9c7d4; }
  .tab { color: var(--ink); font-size: 1rem; padding: 10px 14px; } /* 16px: under the section headings (19px), level with the box headings (17px), above the text (15px) */
  .tabink { height: 4px; }
}

/* The study's own text above the Database frame (databaseIntro): paragraphs at a reading width, a little space between them. */
.dbintro { display: grid; gap: 12px; }
.dbintro > * { margin: 0; }
.dbintro > .show-phone > *, .dbintro > .show-wide > * { margin: 0; }
.show-phone { display: none; } /* a block with show "phone": below 600px only; show "wide": from 600px only (20 Nov 2026) */
@media (max-width: 599px) { .show-phone { display: block; } .show-wide { display: none; } }
.dbintro > h3 { font-size: 1rem; font-weight: 600; margin-top: 6px; }

/* ---------- Document search (restricted line "document-search", 24 Nov 2026) ----------
   One box, an Ask button, then three cards side by side from 1000px (stacked below). Thin solid lines only. */
.srch { display: grid; gap: 18px; min-width: 0; position: relative; }
.srchmain { display: grid; gap: 14px; min-width: 0; width: 100%; max-width: 760px; margin-inline: auto; } /* layout B (25 Nov 2026): one centred column at every width */
.srchline { margin: 0; font-weight: 500; }
/* 24 Nov 2026 (David): the two answers always stand one above the other, never side by side, each no wider than 820px. */
.srchq { display: grid; gap: 14px; min-width: 0; }
.srchcards { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.srchcard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; padding: 22px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.srchcard:first-child { border-top: 0; padding-top: 6px; }
.srchcard h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.srchcard h3 .cap { flex: none; }
.srchcard h3 .srchname { font-weight: 400; color: var(--muted); }
.srchans { margin: 0; min-width: 0; }
.srchans.none { color: var(--muted); }
.srchnote { margin: 4px 0 0; padding: 12px 14px; color: var(--ink); background: #EAF3FA; border: 1px solid #C9DDEC; border-radius: 8px; } /* the end note for a question about one patient: the answer's own size, in a pale blue panel (David, 25 Nov 2026, option 3) */
.srchnote.srchstart { margin: 0 0 16px; background: #FFF4E0; border-color: #EBCB8B; } /* the start note (a symptom or an acute event): once above the responses, in a pale amber panel (David, 25 Nov 2026) */
.srchquote { margin: 0; padding: 4px 0 4px 12px; border-left: 3px solid #006EAF; }
.srchquote p { margin: 0 0 6px; }
.srchquote footer { font-size: .85rem; color: var(--muted); }
.srchquote footer a { color: var(--blue); }
/* the folded quotes of a response (25 Nov 2026, option 2) */
.srchqbtn { justify-self: start; display: inline-flex; align-items: center; gap: 4px; font: 500 .8rem var(--font); line-height: 1.3; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.srchqbtn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) { .srchqbtn:hover { background: var(--blue-soft); } }
.srchquotes { display: grid; gap: 10px; min-width: 0; }
.srchfoot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.srchcost { color: var(--muted); font-size: .9rem; }
.srchflag { display: inline-flex; gap: 6px; align-items: center; padding: 4px 6px; background: none; border: 0; box-shadow: none; color: var(--muted); font-weight: 400; font-size: .9rem; cursor: pointer; }
.srchflag svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.srchflag:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) { .srchflag:hover { background: var(--blue-soft); color: var(--ink); } }
.srchflag[aria-pressed="true"] { color: var(--navy); font-weight: 600; background: var(--blue-soft); border-radius: 8px; }
.srchflag[aria-pressed="true"] svg { fill: currentColor; fill-opacity: .25; }
.srchpick .btn[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: var(--navy); font-weight: 600; }
.srchflagbox { display: grid; gap: 8px; justify-items: start; }
.srchflagbox[hidden] { display: none; }
.srchflagbox label { font-weight: 500; }
.srchflagbox textarea { width: 100%; box-sizing: border-box; font: 400 1rem var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; resize: vertical; min-height: 64px; }
.srchflagbox textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.srchpick { display: grid; gap: 10px; max-width: 760px; margin-top: 8px; box-sizing: border-box; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.srchpick h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.srchpick .srchbtns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* the lighter vote row (25 Nov 2026, David's option 5): three soft pills, then a thin divider and "Both are bad" as plain words */
.srchpick .srchbtns .btn { border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-weight: 500; font-size: .88rem; padding: 6px 13px; min-height: 36px; box-sizing: border-box; }
.srchpick .srchbtns .btn[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: var(--navy); font-weight: 600; } /* selected: as before */
.srchpick .srchbtns .btn.srchbad { display: inline-flex; align-items: center; gap: 12px; margin-left: 4px; padding: 0; border: 0; background: none; color: var(--muted); border-radius: 0; }
.srchpick .srchbtns .btn.srchbad::before { content: ""; flex: none; width: 1px; height: 22px; background: var(--line); } /* the divider travels with the words when the row wraps */
.srchpick .srchbtns .btn.srchbad[aria-pressed="true"] { background: none; border: 0; color: var(--ink); font-weight: 600; }
@media (hover: hover) { .srchpick .srchbtns .btn.srchbad:hover { background: none; color: var(--ink); } }
.srchpick p { margin: 0; color: var(--muted); font-size: .9rem; }
.srchpick .srchsaved { color: var(--ink); font-weight: 500; }
.srchrecord { display: grid; gap: 10px; }
.srchrow { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; margin-bottom: 8px; overflow-wrap: anywhere; }
.srchrow summary { cursor: pointer; }
.srchrow summary span { display: block; color: var(--muted); font-size: .85rem; }
.srchrow ul { margin: 4px 0 8px; padding-left: 18px; }
.srchmeta { margin: 8px 0 0; color: var(--muted); font-size: .85rem; }
.srchlq { color: var(--muted); font-size: .85rem; }

/* The passage panel (26 Nov 2026, David's option 1). From 1,000 px a panel of 420 px slides in from the right over the page, with a light scrim;
   below that a bottom sheet about 85% of the screen tall with a grab handle. Thin solid lines only. */
.ppscrim { position: fixed; inset: 0; z-index: 70; background: rgba(1, 50, 80, .28); opacity: 0; transition: opacity .22s ease; }
.ppscrim.open { opacity: 1; }
.ppscrim[hidden], .ppanel[hidden] { display: none; }
.ppanel { position: fixed; z-index: 71; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; box-sizing: border-box; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); box-shadow: -8px 0 30px rgba(1, 50, 80, .18); transform: translateX(104%); transition: transform .24s ease; color: var(--ink); }
.ppanel.open { transform: none; }
.ppgrab { display: none; flex: none; width: 44px; height: 5px; margin: 9px auto 0; border-radius: 3px; background: #c5d0db; }
.pphead { flex: none; display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.pphead > div { flex: 1; min-width: 0; }
.ppdoc { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pphead h2 { margin: 4px 0 2px; font-size: 1.15rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.pppage { margin: 0; font-size: .85rem; color: var(--muted); }
.ppclose { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer; }
.ppclose:focus-visible, .ppanel a:focus-visible, .ppq:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) { .ppclose:hover { background: var(--soft); } }
.ppbody { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 22px; }
.ppnote { margin: 0 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ppbody p { margin: 0 0 14px; font-size: .95rem; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.ppbody .ppnote { white-space: normal; font-size: 11.5px; line-height: 1.4; margin-bottom: 10px; }
.ppbody .ppgap { color: var(--faint); margin: -4px 0 14px; }
.ppmark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 1px 0; box-shadow: 0 0 0 2px #fff1b8; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ppfoot { flex: none; padding: 12px 20px calc(16px + var(--sab)); border-top: 1px solid var(--line); font-size: .92rem; font-weight: 600; }
.ppfoot a { color: #0a5a8c; text-decoration: underline; text-underline-offset: 2px; }
.ppfoot a[hidden] { display: none; }
.ppq { cursor: pointer; }
@media (hover: hover) { .ppq:hover { background: var(--blue-soft); } }
@media (max-width: 999px) {
  .ppanel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; height: 85vh; height: 85dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(1, 50, 80, .18); transform: translateY(104%); }
  .ppanel.open { transform: none; }
  .ppgrab { display: block; }
  .pphead { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .ppscrim, .ppanel { transition: none; } }
