/* An opened resuscitation-cart drawer, seen from above: red walls and dividers,
   recessed bays, contents in clear bags with printed labels. Flat and blocky. */
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/caslon-400.6564df5cd887.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/caslon-400-italic.dab39c7e25a9.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/caslon-700.882609d7e89f.woff2") format("woff2"); }

:root {
    --serif: "Libre Caslon Text", "Big Caslon", Georgia, serif;
    --wall: #d93443;      /* drawer walls and dividers: the cart's red */
    --wall-dark: #b72937;
    --floor: #c32e3c;     /* the floor of each bay */
    --label: #ffffff;     /* printed labels */
    --label-ink: #24282b;
    --steel: #c6cdd0;
    --frame: #9ba4a9;     /* the drawer's outer shell */
    --frame-dark: #7b858b;
    --radius: 8px;
    /* Bays sit below the dividers: shadow under the top and left walls, faint light on the far edges. */
    --recess: inset 0 10px 12px -8px rgba(70, 0, 10, .45), inset 8px 0 10px -8px rgba(70, 0, 10, .3), inset -1px -2px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(0, 0, 0, .12);
    --block: 0 3px 0 rgba(0, 0, 0, .16);
    --block-raised: 0 7px 0 rgba(0, 0, 0, .18);
}
.drawer-body { overflow-x: hidden; font-family: var(--serif); color: var(--label-ink); }

.drawer-scene { min-height: 100dvh; padding: 0 clamp(8px, 3vw, 40px) clamp(12px, 3vh, 32px); }
/* The drawer fills the viewport so it reads as one pulled-out drawer, not a card. */
.drawer { display: flex; flex-direction: column; width: min(1180px, 100%); min-height: calc(100dvh - clamp(12px, 3vh, 32px)); margin: 0 auto; background: var(--frame); padding: 14px 14px 0; border-radius: 0 0 10px 10px; }
/* On larger screens the drawer is exactly one screen tall and each bay scrolls on its own. */
@media (min-width: 760px) and (min-height: 560px) {
    .drawer { height: calc(100dvh - clamp(12px, 3vh, 32px)); }
    .drawer-tray, .drawer-tray > .bays, .bay-column { min-height: 0; }
    .drawer-tray > .bays { grid-auto-rows: minmax(0, 1fr); }
}

/* Bays: recessed compartments separated by the red dividers. */
.drawer-tray { display: flex; flex: 1; flex-direction: column; padding: 12px; background: var(--wall); border-radius: var(--radius); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06), inset 0 2px 0 rgba(255, 255, 255, .14); }
.drawer-tray > .bays { flex: 1; grid-auto-rows: minmax(200px, auto); }
.bay-column { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-width: 0; }
.bays { display: grid; gap: 12px; }
.bays--knowledge { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.bays--research { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .bays--research { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.bays--about { grid-template-columns: minmax(0, 1fr); }
.bays--article { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .bays--article { grid-template-columns: 270px minmax(0, 1fr); align-items: stretch; } }

.bay { position: relative; min-width: 0; min-height: 200px; max-height: 78dvh; overflow-y: auto; overscroll-behavior: contain; padding: 0 clamp(12px, 2vw, 20px) 20px; background: var(--floor); border-radius: var(--radius); box-shadow: var(--recess); scrollbar-color: rgba(255, 255, 255, .45) transparent; }
@media (min-width: 760px) and (min-height: 560px) { .bay { max-height: none; min-height: 0; } }
.bay:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
/* Divider names are printed straight onto the drawer floor and stay put while the bay scrolls. */
.bay-label { position: sticky; top: 0; z-index: 1; display: block; margin: 0 calc(-1 * clamp(12px, 2vw, 20px)) 4px; padding: 18px clamp(12px, 2vw, 20px) 12px; font: 700 12px/1.4 var(--serif); letter-spacing: .18em; text-transform: uppercase; color: #fbefe6; background: linear-gradient(rgba(70, 0, 10, .34), rgba(70, 0, 10, 0) 12px), linear-gradient(90deg, rgba(70, 0, 10, .22), rgba(70, 0, 10, 0) 10px) var(--floor); }
.bay-label--link { text-decoration: none; }
.bay-label--link:hover { text-decoration: underline; text-underline-offset: 4px; }
.bay-sublabel { margin: 18px 0 10px; font: italic 400 16px/1.3 var(--serif); color: #fbefe6; }
.bay-sublabel:first-of-type { margin-top: 4px; }
.bay-empty { margin: 4px 0 0; font-style: italic; font-size: 15px; color: rgba(255, 255, 255, .82); }

/* A clear zip bag holding a printed label. */
.bag-stack { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.bag { position: relative; display: block; padding: 18px 10px 10px; border-radius: 6px; color: inherit; text-decoration: none; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .45); box-shadow: var(--block); transition: transform 160ms ease, box-shadow 160ms ease; }
.bag::before { content: ""; position: absolute; top: 6px; left: 6px; right: 6px; height: 3px; background: rgba(255, 255, 255, .5); }
.bag__label { display: block; padding: 14px 16px; background: var(--label); color: var(--label-ink); border-radius: 4px; }
a.bag:hover, a.bag:focus-visible { transform: translateY(-3px); box-shadow: var(--block-raised); }
.bag__title { display: block; font-size: 21px; line-height: 1.25; }
.bag__summary { display: block; margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: #50565a; }
.bag__draft { display: inline-block; margin-top: 10px; padding: 2px 7px; border-radius: 3px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; background: #f3d9a4; }
.bag__label p { margin: 0 0 10px; font-size: 16px; line-height: 1.6; }
.bag__label p:last-child { margin-bottom: 0; }
.label-list { margin: 0; padding-left: 1.1em; font-size: 16px; line-height: 1.6; }
.label-list li + li { margin-top: 8px; }
.label-note { font-style: italic; color: #5d6266; }
.bag__label a, .leaflet a, .noscript-list a { color: #17608d; text-underline-offset: 3px; }

/* About: one red airway bay, a white bubble of text in the middle and
   the airway kit scattered around it. */
.bay--airway { display: grid; place-items: center; overflow: hidden; padding: 40px 16px; }
.kit-pile { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.kit-item { position: absolute; left: var(--l); top: var(--t); width: var(--w); transform: rotate(var(--turn, 0deg)); filter: drop-shadow(0 3px 0 rgba(70, 0, 10, .3)); }
.kit { display: block; width: 100%; height: auto; }
.about-bubble { position: relative; z-index: 1; width: min(50%, 620px); padding: clamp(28px, 4vw, 48px); font-size: 18px; line-height: 1.7; background: #fff; border-radius: 22px; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.about-bubble .leaflet__lead { margin: 0; }
.about-bubble .label-note { margin: 1.4em 0 0; }
.leaflet--about .label-note { margin-top: 2em; }
.leaflet--about { max-width: 70ch; font-size: 17px; line-height: 1.7; }
.leaflet--about h3 { margin: 1.8em 0 .4em; font-size: 22px; font-weight: 400; }
.leaflet--about ul { padding-left: 1.2em; }
.leaflet--about li + li { margin-top: .4em; }
.leaflet__lead { margin: 0; font-size: 19px; line-height: 1.6; }

/* Research: vials lying in rows, label facing up. */
.vial-tray { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.vial { --cap: #2f6690; display: flex; align-items: center; width: 100%; padding: 0; color: inherit; font: inherit; text-align: left; background: none; border: 0; cursor: pointer; transition: transform 160ms ease; }
.vial--red { --cap: #a8323e; }
.vial--amber { --cap: #c98a1b; }
.vial--teal { --cap: #2b7a78; }
.vial--violet { --cap: #6a5a9e; }
.vial--green { --cap: #4f7d43; }
.vial__body { flex: 1; min-width: 0; padding: 7px; background: #e6eef0; border-radius: 12px 3px 3px 12px; box-shadow: var(--block); }
.vial__label { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 8px 14px; background: var(--label); border-radius: 4px 2px 2px 4px; border-left: 6px solid var(--cap); }
.vial__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15.5px; line-height: 1.3; }
.vial__meta { margin-top: 4px; font-size: 13px; color: #5d6266; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vial__neck { flex: none; width: 12px; height: 44px; background: #d3dcdf; box-shadow: var(--block); }
.vial__cap { flex: none; width: 30px; height: 58px; background: var(--steel); border-radius: 4px; box-shadow: inset -9px 0 0 var(--cap), var(--block); }
.vial:hover, .vial:focus-visible, .vial.is-lifted { transform: translateY(-3px); }
.vial:hover .vial__body, .vial:focus-visible .vial__body { box-shadow: var(--block-raised); }
.vial:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.noscript-list { margin: 16px 0 0; padding: 16px 16px 16px 36px; background: var(--label); border-radius: 6px; }

/* Vial preview: a printed drug label. */
.preview { width: min(580px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; color: var(--label-ink); background: transparent; border: 0; overflow: visible; font-family: var(--serif); }
.preview::backdrop { background: rgba(32, 40, 46, .55); }
.preview[open] .preview__card { animation: lift-in 220ms ease-out both; }
.preview__card { --cap: #2f6690; position: relative; max-height: calc(100dvh - 24px); overflow: auto; padding: 30px clamp(20px, 4vw, 36px) 28px; background: var(--label); border-top: 10px solid var(--cap); border-radius: 6px; box-shadow: 0 10px 0 rgba(0, 0, 0, .2); }
.preview__close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; font: 28px/1 var(--serif); color: var(--label-ink); background: none; border: 0; cursor: pointer; }
.preview__close:hover, .preview__close:focus-visible { background: #f1f3f4; }
.preview__meta { margin: 0 44px 8px 0; font-size: 14px; color: #5d6266; }
.preview__title { margin: 0 0 12px; font-size: 25px; font-weight: 400; line-height: 1.25; }
.preview__authors { margin: 0 0 18px; font-size: 15px; }
.preview__abstract { margin: 22px 0 0; font-size: 15px; line-height: 1.65; color: #3d4347; }
.preview__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.preview__doi { font-size: 13px; color: #5d6266; overflow-wrap: anywhere; }
@keyframes lift-in { from { opacity: 0; transform: translateY(14px); } }

.button { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; font: 15px var(--serif); letter-spacing: .02em; color: var(--label-ink); background: #fff; border: 1px solid #c8cdd0; border-radius: 4px; text-decoration: none; box-shadow: var(--block); }
.button--primary { color: #fff !important; background: #203c52; border-color: #203c52; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid var(--wall); outline-offset: 3px; }

/* Knowledge topic: a folded leaflet in a large bay, contents in a narrow one. */

.leaflet { padding: clamp(24px, 5vw, 60px); background: var(--label); border-radius: 6px; box-shadow: var(--block); }
.leaflet--small { padding: 18px 18px 20px; font-size: 15px; }
.leaflet__kicker { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #a32a35; }
.leaflet__title { margin: 0; font-size: clamp(32px, 4.4vw, 46px); font-weight: 400; line-height: 1.1; }
.leaflet__summary { margin: 14px 0 0; max-width: 60ch; font-size: 19px; font-style: italic; line-height: 1.5; color: #4b5155; }
.leaflet__header { padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid #e2dbcb; }
.leaflet__draft { margin: 0 0 20px; padding: 8px 12px; font-size: 14px; background: #f3d9a4; border-radius: 4px; }
.leaflet__footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid #e2dbcb; font-size: 14px; color: #5d6266; }
.leaflet__footer p { margin: 2px 0; }
.toc { margin: 0; padding: 0; list-style: none; line-height: 1.45; }
.toc li + li { margin-top: 9px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.prose { max-width: 70ch; font-size: 17px; line-height: 1.72; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.2em 0 .6em; font-size: 27px; font-weight: 400; line-height: 1.25; scroll-margin-top: 16px; }
.prose h3 { margin: 1.7em 0 .4em; font-size: 20px; font-weight: 400; font-style: italic; scroll-margin-top: 16px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose table { display: block; width: 100%; overflow-x: auto; margin: 1.4em 0; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.prose th, .prose td { min-width: 150px; padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #e2dbcb; }
.prose th { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; background: #f1f3f4; }
.prose blockquote { margin: 1.6em 0; padding: 14px 20px; background: #fbefef; border-left: 5px solid var(--wall); border-radius: 0 6px 6px 0; }
.prose blockquote p { margin: .3em 0; }
.prose hr { margin: 2em 0; border: 0; border-top: 1px solid #e2dbcb; }
.prose em:only-child { color: #5d6266; }

/* The drawer front, nearest the reader: click it to push the drawer shut. */
.drawer-front { display: flex; flex: none; align-items: center; justify-content: center; height: 72px; margin: 14px -14px 0; background: var(--frame-dark); border-top: 6px solid #6a737a; border-radius: 0 0 10px 10px; cursor: pointer; }
.drawer-front__handle { width: 190px; height: 14px; background: var(--steel); border-radius: 3px; box-shadow: 0 4px 0 #59626a; transition: transform 160ms ease, background 160ms ease; }
.drawer-front:hover .drawer-front__handle, .drawer-front:focus-visible .drawer-front__handle { background: #e3e8ea; transform: translateY(-2px); }
.drawer-front:focus-visible { outline: 3px solid var(--label-ink); outline-offset: -6px; }

/* Opening: the drawer slides down from the top; its bays settle in after. */
html[data-motion="open"] .drawer { animation: drawer-in 620ms cubic-bezier(.2, .75, .25, 1) both; }
html[data-motion="open"] .bay > * { animation: fade-in 260ms ease-out 420ms both; }
.drawer.is-closing { animation: drawer-out 440ms cubic-bezier(.45, 0, .75, .35) forwards; }
@keyframes drawer-in { from { transform: translateY(-105vh); } }
@keyframes drawer-out { to { transform: translateY(-105vh); } }

/* Phones and narrow portrait screens: the drawer slides out from the left,
   its front (with a vertical handle) running down the right-hand edge. */
@media (max-width: 759px), (orientation: portrait) and (max-width: 900px) {
    /* The drawer is wider than the screen by the width of its front, so as it slides in the
       handle sweeps across and out past the right edge, leaving the bays the whole width.
       Swipe the drawer back to the left (or press Back) to close it. */
    .drawer-scene { padding: 0; overflow-x: clip; }
    .drawer { --front: 46px; flex-direction: row; width: calc(100% + var(--front)); min-height: 100dvh; padding: 10px 0 10px 10px; border-radius: 0 12px 12px 0; transition: transform 220ms ease; }
    /* Keyboard users tabbing to the front see it slide back into view. */
    .drawer:has(.drawer-front:focus-visible) { transform: translateX(calc(-1 * var(--front))); }
    .drawer-tray { padding: 10px; min-width: 0; }
    .bays { gap: 10px; }
    .drawer-front { width: var(--front); height: auto; margin: -10px 0 -10px 10px; border-top: 0; border-left: 5px solid #6a737a; border-radius: 0 12px 12px 0; align-items: flex-start; }
    .drawer-front__handle { position: sticky; top: calc(50dvh - 80px); width: 13px; height: 160px; margin-top: calc(50dvh - 80px); box-shadow: 4px 0 0 #59626a; }
    .drawer-front:hover .drawer-front__handle, .drawer-front:focus-visible .drawer-front__handle { transform: translateX(2px); }
    /* The whole drawer fits the screen; each bay scrolls on its own. */
    .drawer { height: 100dvh; min-height: 0; }
    .drawer-tray, .drawer-tray > .bays, .bay-column { min-height: 0; }
    .drawer-tray > .bays { flex: 1; grid-auto-rows: minmax(0, 1fr); }
    .bay { min-height: 0; max-height: none; }
    .bays--research { grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr); }
    .bay-column { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
    .bays--article { grid-template-rows: minmax(0, .3fr) minmax(0, 1fr); }
    .bay-label { padding-top: 12px; padding-bottom: 8px; }
    .preview__title { font-size: 21px; }
    .leaflet__summary { font-size: 16.5px; }
    .prose { font-size: 16px; }
    .bay--airway { padding: 10px; }
    .kit-item { display: var(--phone, block); left: var(--pl); top: var(--pt); width: var(--pw); }
    /* Vials: compact so each paper fits the narrower bay. */
    .vial-tray { gap: 10px; }
    .vial__body { padding: 5px; }
    .vial__label { min-height: 48px; padding: 6px 10px; border-left-width: 5px; }
    .vial__title { font-size: 13.5px; line-height: 1.25; }
    .vial__meta { margin-top: 2px; font-size: 11.5px; }
    .vial__neck { width: 9px; height: 32px; }
    .vial__cap { width: 22px; height: 42px; box-shadow: inset -7px 0 0 var(--cap), var(--block); }
    .bay-sublabel { margin: 12px 0 8px; font-size: 14px; }
    .about-bubble { width: 100%; padding: 22px; font-size: 15.5px; line-height: 1.6; }
    html[data-motion="open"] .drawer { animation-name: drawer-in-left; }
    .drawer.is-closing { animation-name: drawer-out-left; }
}
@keyframes drawer-in-left { from { transform: translateX(-100%); } }
@keyframes drawer-out-left { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* On wide screens the airway kit fills its bay top to bottom. */
@media (min-width: 860px) and (min-height: 560px) {
    .bay--kit { display: flex; flex-direction: column; }
}

/* Knowledge drawer: a note-and-search strip above the bays, and topics as
   saline bottles lying on their side, capped in their category's colour. */
.tray-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.tray-note { flex: 1 1 320px; display: flex; align-items: center; min-height: 44px; padding: 8px 16px; font-size: 15px; color: #33393d; text-decoration: none; background: #dfe3e5; border-radius: 6px; box-shadow: var(--block); }
.tray-note:hover, .tray-note:focus-visible { background: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tray-search { flex: 0 1 300px; display: flex; }
.tray-search input { width: 100%; min-height: 44px; padding: 8px 14px 8px 38px; font: 16px var(--serif); color: var(--label-ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237b858b' stroke-width='2'%3E%3Ccircle cx='6.5' cy='6.5' r='5'/%3E%3Cpath d='m10.5 10.5 4 4'/%3E%3C/svg%3E") no-repeat 14px center; border: 0; border-radius: 6px; box-shadow: var(--block); }
.tray-search input:focus-visible { outline: 3px solid #203c52; outline-offset: 2px; }

.bottle-rack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
/* A 500 ml saline bottle on its side: base (with hanger) on the left, frosted
   body, tapered shoulder, ribbed neck and a flat coloured cap on the right. */
/* One flat, opaque plastic for body and shoulder, and one shadow under the whole bottle, so the two join without a seam. */
.bottle { --cap: var(--steel); --plastic: #eae6ea; --line: 16.5px; position: relative; display: flex; align-items: stretch; padding-left: 10px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .16)); }
/* Eight lines of print set the bottle's height; its length is pegged to that height, so it keeps
   a saline bottle's proportions and sits centred in a wide bay instead of stretching across it. */
.bays--knowledge .bottle { box-sizing: border-box; justify-self: center; width: 100%; max-width: calc((8 * var(--line) + 38px) * 2.4); }
/* Double-tapping a bottle lines up its colour, so no double-tap zoom or text selection here. */
.bays--knowledge .bottle { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.bottle::before { content: ""; position: absolute; left: 0; top: 50%; width: 16px; height: 26px; margin-top: -13px; border: 4px solid var(--plastic); border-right: 0; border-radius: 13px 0 0 13px; }
.bottle__body { position: relative; flex: 1; min-width: 0; padding: 11px 14px 11px 12px; background: var(--plastic); border-radius: 14px 0 0 14px; }
/* The short code is printed up the bottle's shoulder, read sideways like a real bag of saline. */
.bottle__code { position: absolute; z-index: 1; left: 4px; top: 50%; width: 17px; transform: translateY(-50%); writing-mode: vertical-rl; text-align: center; font: 700 8.5px/17px var(--serif); letter-spacing: .14em; color: #6f7c83; white-space: nowrap; pointer-events: none; }
.bottle__label { --band: 9px; position: relative; display: flex; flex-direction: column; justify-content: center; /* titles sit in the middle of the label, still left-aligned */ height: calc(8 * var(--line) + 16px); overflow: hidden; padding: 8px 14px 8px calc(var(--band) + 12px); background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px rgba(150, 165, 172, .25); }
/* The coloured band down the label's edge, as on a real bag of saline. */
.bottle__label::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--band); background: var(--cap); }
.bottle__topics { margin: 0; padding: 0; list-style: none; }
.bottle__topics li { font-size: 12.5px; line-height: var(--line); }
.bottle__topics a { display: inline-block; max-width: 100%; vertical-align: top; padding: 0 0 3px; margin-bottom: -3px; /* room below the clipped line so the underline isn't cut off */ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--label-ink); text-decoration: underline; text-decoration-color: rgba(36, 40, 43, .4); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.bottle__topics a:hover, .bottle__topics a:focus-visible { color: #17608d; text-decoration-color: currentColor; }
.bottle__topics li:has(.bottle__draft) { display: flex; align-items: center; gap: 8px; }
.bottle__draft { flex: none; padding: 1px 6px; border-radius: 3px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; background: #f3d9a4; }
/* Shoulder, ribbed neck and cap, scaled to the bottle's height. */
.bottle__top { position: relative; flex: none; width: 77px; }
.bottle__top::before { content: ""; position: absolute; inset: 0 auto 0 -1px; width: 57px; background: var(--plastic); clip-path: polygon(0 0, 100% 32%, 100% 68%, 0 100%); }
.bottle__neck { position: absolute; left: 55px; top: 34%; bottom: 34%; width: 12px; background: repeating-linear-gradient(90deg, #dfe6e9 0 3px, #f6f9fa 3px 5px); border-radius: 0 2px 2px 0; }
.bottle__cap { padding: 0; border: 0; cursor: pointer; position: absolute; left: 66px; top: 31%; bottom: 31%; width: 9px; background: var(--cap); border-radius: 2px 4px 4px 2px; box-shadow: inset -3px 0 0 rgba(0, 0, 0, .16), inset 0 0 0 1px rgba(0, 0, 0, .08); }
.bottle[hidden] { display: none; }
.bottle__cap:hover, .bottle__cap:focus-visible { filter: brightness(1.12); }
.bottle__cap:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.bottle.is-lined-up .bottle__body { box-shadow: 0 0 0 3px var(--cap); }
/* Knowledge About page: each short code beside its cap colour. */
.prose .code-list { margin: 1em 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 8px 20px; }
.prose .code-list li { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.prose .code-list li::before { content: ""; flex: none; width: 12px; height: 12px; align-self: center; background: var(--cap); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.code-list__code { flex: none; min-width: 6.2em; font: 700 11px/1.4 var(--serif); letter-spacing: .1em; }
.leaflet__title + .prose > .leaflet__lead { margin-top: 18px; }

/* Bottles on phones: smaller print so a full bottle keeps a saline-bottle shape. */
@media (max-width: 759px), (orientation: portrait) and (max-width: 900px) {
    .bottle { --line: 15.5px; }
    .bottle__label { --band: 7px; height: calc(8 * var(--line) + 10px); padding: 5px 10px 5px calc(var(--band) + 9px); }
    .bottle__topics li { font-size: 12px; }
    .bottle__body { padding: 9px 10px 9px 9px; }
    .bottle__code { font-size: 7.5px; }
    .bottle-rack { gap: 10px; }
    .tray-bar { gap: 8px; margin-bottom: 10px; }
    .tray-note { flex-basis: 100%; min-height: 0; padding: 6px 12px; font-size: 12.5px; line-height: 1.3; }
    .tray-search { flex-basis: 100%; }
    .tray-search input { min-height: 38px; }
}

/* Tools drawer: Conferences above, Forecast below, each half the drawer. */
.bays--tools { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.drawer-tray > .bays--tools { grid-auto-rows: auto; }
.conference-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.4; background: var(--label); color: var(--label-ink); }
.conference-table th, .conference-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #e3e6e8; }
.conference-table thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #50565a; background: #eceff0; white-space: nowrap; }
.conference-table tbody tr:last-child > * { border-bottom: 0; }
/* The table scrolls inside its own box, so the column headers stay frozen at the top
   (and, on phones, the conference names stay frozen on the left). */
.bay--conferences { display: flex; flex-direction: column; }
.table-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; border-radius: 6px; box-shadow: var(--block); }
.conference-table thead th { position: sticky; top: 0; z-index: 2; }
.conference__name { font-weight: 400; font-size: 16px; white-space: nowrap; }
.conference__date { white-space: nowrap; }
.conference-table a { color: #17608d; text-underline-offset: 3px; }
.conference__estimate, .conference__muted { font-style: italic; color: #50565a; }
.conference__countdown { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 3px; font-size: 12px; letter-spacing: .06em; background: #fbe3e5; color: #8f1f2a; white-space: nowrap; }
/* Narrow screens: the same table in smaller type. Swipe sideways inside the bay;
   the conference name stays pinned on the left. */
@media (max-width: 760px) {
    .conference-table { font-size: 12px; }
    .conference-table th, .conference-table td { padding: 6px 8px; white-space: nowrap; }
    .conference-table thead th { font-size: 9.5px; letter-spacing: .08em; }
    .conference__countdown { margin-top: 0; padding: 0 5px; font-size: 10.5px; }
    .conference__name { font-size: 12.5px; }
    .conference-table .conference__name, .conference-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--label); box-shadow: 1px 0 0 #e3e6e8; }
    .conference-table thead th:first-child { z-index: 3; background: #eceff0; }
}
/* Forecast: one white bubble filling the bay below its label, the question dead centre. */
.bay--forecast { display: flex; flex-direction: column; }
.forecast-bubble { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 140px; padding: 24px; background: var(--label); color: var(--label-ink); border-radius: 6px; box-shadow: var(--block); text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.forecast-bubble:hover { transform: translateY(-2px); box-shadow: var(--block-raised); }
.forecast-bubble:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.forecast-question { margin: 0; text-align: center; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; }
/* Opening the forecast: a white sheet grows from the bubble to fill the window (see forecast.js). */
.forecast-expander { position: fixed; left: 0; top: 0; z-index: 60; width: 100vw; height: 100vh; transform-origin: 0 0; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 24px 60px -30px rgba(0, 0, 0, .5); pointer-events: none; }
.forecast-expander__question { position: fixed; z-index: 61; transform-origin: 50% 0; color: var(--label-ink); pointer-events: none; }
/* Closing the forecast: white until forecast.js shrinks it back into the bubble, so the drawer never flashes. */
html[data-motion="forecast-return"] body::after { content: ""; position: fixed; inset: 0; z-index: 59; background: #fff; }

/* Phones: a small red back arrow in the tray's bottom-right corner closes the drawer,
   since the drawer front (its handle) sits off-screen there. Hidden on larger screens. */
.drawer-back { display: none; }
@media (max-width: 759px), (orientation: portrait) and (max-width: 900px) {
    .drawer-tray { position: relative; }
    .drawer-back { position: absolute; right: 12px; bottom: 12px; z-index: 5; display: grid; place-items: center; width: 44px; height: 44px; color: var(--wall); text-decoration: none; }
    .drawer-back::before { content: ""; position: absolute; inset: 7px; background: #fff; border-radius: 50%; box-shadow: var(--block); }
    .drawer-back svg { position: relative; }
    .drawer-back:active::before { transform: translateY(1px); box-shadow: none; }
    .drawer-back:focus-visible { outline: 3px solid #fff; outline-offset: -2px; border-radius: 50%; }
}
