/* Palette is provisional; see STYLE.md. */
:root { --paper: #ffffff; --ink: #203c52; --blue: #17608d; --red: #d93443; --line: #d9d9d3; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
.landing { --cart-width: min(340px, 85vw, 56dvh); --edge: clamp(10px, 2dvh, 24px); height: 100svh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "intro" "cart" "outro"; justify-items: center; padding: max(var(--edge), env(safe-area-inset-bottom)) 24px; }
.landing-intro { grid-area: intro; align-self: end; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.landing-outro { grid-area: outro; align-self: stretch; display: flex; flex-direction: column; align-items: center; min-height: 0; width: 100%; }
.cart-instruction { margin: 0 0 clamp(8px, 1.8dvh, 18px); line-height: 1.4; color: #64717a; font-size: 12px; letter-spacing: .09em; }
.cart-navigation { grid-area: cart; align-self: center; width: var(--cart-width); padding: 0 14px; flex-shrink: 0; }
.resuscitation-cart { position: relative; width: 100%; }
.cart-top { height: 16px; background: #e6e8e6; border: 1px solid #c9cfce; border-top: 5px solid var(--red); border-radius: 10px 10px 2px 2px; margin: 0 -5px; }
.cart-body { position: relative; display: flex; background: #cbd0ce; border: 1px solid #c3c8c8; border-top: 0; border-radius: 0 0 5px 5px; }
.cart-side { width: 48px; flex-shrink: 0; background: var(--red); position: relative; border-right: 5px solid #b72937; }
.side-grip { position: absolute; top: 20px; left: 10px; right: 10px; height: 6px; background: #ad2433; border-radius: 3px; }
.cart-drawers { width: 100%; padding: 4px 4px 3px 0; display: grid; gap: 3px; }
.cart-drawer { display: flex; align-items: center; justify-content: center; text-decoration: none; position: relative; width: 100%; min-height: clamp(44px, 6dvh, 50px); padding: 7px 24px; border: 1px solid #cbd0cd; border-radius: 2px 2px 5px 5px; background: #f1f1ec; color: var(--ink); cursor: pointer; text-align: center; transition: transform 180ms ease, background 180ms ease, color 180ms ease; box-shadow: 0 2px 0 #b7bfbd; }
.drawer-handle { position: absolute; width: 58px; height: 4px; background: #4f7187; border-radius: 0 0 4px 4px; left: 50%; bottom: 7px; transform: translateX(-50%); }
.drawer-number { position: absolute; left: 11px; top: 11px; font-size: 9px; color: #72818a; }
.drawer-label { font-size: 14px; line-height: 18px; letter-spacing: .04em; }
.cart-drawer:is(:hover, :focus-visible, :active) { background: var(--blue); color: white; transform: translateX(7px); border-color: var(--blue); }
.cart-drawer:is(:hover, :focus-visible, :active) .drawer-number { color: #d8e8f2; }
.cart-drawer:is(:hover, :focus-visible, :active) .drawer-handle { background: #d8e8f2; }
.cart-drawer:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; z-index: 1; }
.cart-push-handle { position: absolute; right: -15px; top: 16px; width: 15px; height: 37px; border: 5px solid var(--blue); border-left: 0; border-radius: 0 6px 6px 0; }
.cart-base { height: 10px; background: #bcc5c5; border-radius: 0 0 6px 6px; margin: 0 -4px; }
.cart-wheels { display: flex; justify-content: space-between; padding: 0 25px; }
.cart-wheels span { width: 26px; height: 26px; background: #ecece5; border: 5px solid #3d4850; border-radius: 50%; box-shadow: 0 -5px 0 -1px #879295; }
.brand { margin: 0 0 clamp(6px, 1.5dvh, 14px); flex-shrink: 0; }
.brand h1 { margin: 0; }
.brand img { display: block; width: min(240px, 68vw, 32dvh); height: auto; aspect-ratio: 2.65; object-fit: cover; mix-blend-mode: multiply; }
.drawer-detail { text-align: center; width: calc(var(--cart-width) - 28px); max-width: 100%; padding-top: clamp(10px, 2dvh, 20px); }
.drawer-detail h2 { font-size: clamp(13px, 2dvh, 16px); line-height: 1.5; font-weight: 500; margin: 0; text-wrap: pretty; }
.drawer-detail p { font-size: 13px; color: #64717a; line-height: 1.6; margin: 0; }
.drawer-detail a { color: var(--blue); text-underline-offset: 4px; }
.drawer-detail a[hidden] { display: none; }
.landing-footer { margin-top: auto; padding-top: clamp(10px, 2dvh, 20px); line-height: 1.4; font-size: 10px; color: #697680; letter-spacing: .07em; text-align: center; }
@media (max-width: 480px) { .landing { padding-inline: 16px; } }
/* Equal side columns keep the trolley at the viewport centre in landscape too. */
@media (max-height: 540px) and (min-aspect-ratio: 6/5) {
    .landing { --cart-width: min(300px, 48vw); grid-template-columns: minmax(0, 1fr) var(--cart-width) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "intro cart outro"; column-gap: 16px; }
    .landing-intro, .landing-outro { align-self: center; height: auto; width: 100%; }
    .brand { width: 100%; margin-bottom: 12px; }
    .brand img { width: min(180px, 100%); margin-inline: auto; }
    .cart-instruction { margin: 0; font-size: 11px; letter-spacing: .03em; text-align: center; }
    .cart-navigation { width: 100%; }
    .cart-top { height: 14px; }
    .cart-base { height: 8px; }
    .cart-wheels span { width: 22px; height: 22px; }
    .drawer-detail { padding: 0; }
    .drawer-detail h2 { font-size: 13px; }
    .landing-footer { margin-top: 12px; padding: 0; font-size: 9px; }
}
@media (max-height: 360px) and (min-aspect-ratio: 6/5) {
    .landing { padding-block: 4px; }
    .cart-drawers { gap: 2px; padding-block: 3px 2px; }
    .cart-top { height: 10px; }
    .cart-base { height: 5px; }
    .cart-wheels span { width: 16px; height: 16px; border-width: 3px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.coming-soon { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.coming-soon h1 { margin: 0; font-size: 22px; font-weight: 400; }
.coming-soon p { margin: 0; line-height: 1.6; }
.coming-soon nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; }
.coming-soon a { color: var(--blue); padding: 10px 0; text-underline-offset: 4px; }

.content-page { max-width: 800px; margin: 0 auto; padding: 36px 24px; line-height: 1.65; overflow-wrap: anywhere; }
.content-page a { color: var(--blue); text-underline-offset: 3px; }
.content-page nav { font-size: 13px; }
.content-page article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.content-page h1, .content-page h2 { line-height: 1.25; }

.content-page--research { width: calc(66.6667vw + 48px); max-width: 100%; }
.publication-table-wrapper { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.publication-table { width: 100%; min-width: 800px; table-layout: fixed; border-collapse: collapse; font-size: 14px; overflow-wrap: break-word; }
.publication-table caption { text-align: left; margin-bottom: 16px; }
.publication-table th, .publication-table td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.publication-table__date { width: 110px; }
.publication-table__title { width: 28%; }
.publication-table__journal { width: 22%; }
.publication-table__links { width: 90px; }
.publication-table td:first-child { white-space: nowrap; }
.publication-table-wrapper:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.publication-table th { white-space: nowrap; overflow-wrap: normal; }

@media (max-width: 900px) { .content-page--research { width: 100%; } }

/* Drawer transitions on the cart (only run after a drawer click; the resting homepage is unchanged). */
.landing-intro, .landing-outro, .cart-navigation { transition: opacity 280ms ease, transform 280ms ease; }
.landing.is-leaving .cart-navigation { opacity: 0; transform: translateY(10px) scale(.94); }
.landing.is-leaving .landing-intro, .landing.is-leaving .landing-outro { opacity: 0; }
html[data-motion="return"] .cart-navigation { animation: cart-return 460ms cubic-bezier(.34, 1.4, .64, 1) both; }
html[data-motion="return"] .landing-intro, html[data-motion="return"] .landing-outro { animation: fade-in 360ms ease both; }
@keyframes cart-return { from { opacity: 0; transform: translateY(14px) scale(.94); } }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html[data-motion] * { animation: none !important; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
