/* Medical English UK site styles: colours and components copied from the app (style.css). MEUK blue in light mode, MEUK teal in dark mode */
/* Colours and components copied from the app (style.css): MEUK blue in light mode, MEUK teal in dark mode */
:root {
	--bg: #f4f6f8; --panel: #ffffff; --ink: #1c2530; --muted: #5b6675; --border: #d8dee5;
	--accent: #0f71f0; --accent-ink: #ffffff;
	--shadow: 0 2px 10px rgba(20, 30, 40, 0.08);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #12171c; --panel: #1a2127; --ink: #e8edf1; --muted: #9aa7b2; --border: #2c3641;
		--accent: #3fc2ae; --accent-ink: #08201c;
		--shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
	}
}
:root[data-theme="dark"] {
	--bg: #12171c; --panel: #1a2127; --ink: #e8edf1; --muted: #9aa7b2; --border: #2c3641;
	--accent: #3fc2ae; --accent-ink: #08201c;
	--shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; }
a { color: var(--accent); }
header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 2rem; background: var(--panel); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.logo { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.logo img { width: 44px; height: 44px; border-radius: 8px; }
.logo strong { display: block; font-size: 1.15rem; }
.logo span { display: block; font-size: 0.85rem; color: var(--muted); }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; }
nav a { text-decoration: none; font-size: 0.95rem; }
nav a:hover { text-decoration: underline; }
#themeToggle { padding: 0.3rem 0.9rem; border-radius: 999px; background: transparent; border: 1.5px solid var(--accent); color: var(--accent); font: inherit; font-size: 0.85rem; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
#themeToggle:hover { background: var(--accent); color: var(--accent-ink); }
main { max-width: 1060px; margin: 0 auto; padding: 2rem; }
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero h1 { margin: 0 0 0.5rem; font-size: 2.1rem; }
.hero p { margin: 0 auto; max-width: 640px; color: var(--muted); font-size: 1.1rem; }
h2 { margin: 2.5rem 0 1rem; font-size: 1.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.5rem; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem 1.5rem 1.5rem; box-shadow: var(--shadow); }
.card h3 { margin: 0.9rem 0 0.2rem; font-size: 1.15rem; }
.card .tag { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.9rem; }
.card p { margin: 0 0 1rem; }
.card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cover { display: block; width: 100%; max-width: 220px; aspect-ratio: 3 / 4; object-fit: contain; margin: 0 auto; border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); background: var(--bg); }
.app-art { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 220px; aspect-ratio: 3 / 4; margin: 0 auto; border-radius: 6px; border: 1.5px dashed var(--accent); color: var(--accent); font-weight: 600; text-align: center; padding: 1rem; background: var(--bg); }
.button-link { display: inline-block; padding: 0.5rem 1rem; background: transparent; border: 1.5px solid var(--accent); border-radius: 9px; color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 600; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.button-link:hover { background: var(--accent); color: var(--accent-ink); }
.note { margin-top: 2.5rem; padding: 1rem 1.5rem; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); font-size: 0.9rem; }
footer { text-align: center; padding: 2rem; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--border); margin-top: 2rem; }
@media (max-width: 600px) {
	header { padding: 0.8rem 1rem; }
	main { padding: 1rem; }
	.hero h1 { font-size: 1.6rem; }
}
nav a.nav-current { color: var(--muted); }
.page-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.page-card h3 { margin: 0 0 0.5rem; }
.page-card p { margin: 0 0 0.8rem; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.shot-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; border-radius: 8px; border: 1.5px dashed var(--accent); color: var(--accent); font-weight: 600; text-align: center; padding: 1rem; background: var(--bg); }
.shot figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.9rem; }
.shot { margin: 0; }
.form-box label { display: block; margin: 0 0 0.25rem; font-weight: 600; }
.form-box input[type="text"], .form-box input[type="email"], .form-box textarea { width: 100%; padding: 0.5rem; margin-bottom: 1rem; background: var(--bg); color: var(--ink); border: 1.5px solid var(--border); border-radius: 8px; font: inherit; }
.form-box input:focus, .form-box textarea:focus { outline: none; border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.form-actions button { font: inherit; }
.contact-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.contact-methods .page-card { margin-bottom: 0; }

/* Fixed-height page (Contact): no page scroll, footer always visible. The main area only scrolls on a very small screen. */
body.fit { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.fit header, body.fit footer { flex-shrink: 0; }
body.fit main { flex: 1; min-height: 0; width: 100%; overflow-y: auto; display: flex; flex-direction: column; padding-top: 1rem; padding-bottom: 1rem; }
body.fit .hero { padding: 0.5rem 0; }
body.fit footer { margin-top: 0; padding: 0.8rem; }
body.fit .form-box { flex: 1; display: flex; flex-direction: column; min-height: 360px; margin-bottom: 0; }
body.fit .form-box textarea { flex: 1; min-height: 80px; resize: none; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#formStatus { align-self: center; font-size: 0.95rem; }
#formStatus.ok { color: var(--accent); }
#formStatus.bad { color: #d93025; }

/* About page: the two biography cards side by side, stacked on a phone */
.bios { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.bios .page-card { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 0; }

/* Product names in MEUK blue (teal in dark mode) */
.meuk { color: var(--accent); font-weight: 700; }

.page-card ul { margin: 0; padding-left: 1.2rem; }
.page-card li { margin-bottom: 0.4rem; }

.bios .portrait { display: block; width: 100%; max-width: 220px; aspect-ratio: 1 / 1; object-fit: cover; align-self: center; border-radius: 12px; box-shadow: var(--shadow); }
.bios { margin-bottom: 1.5rem; }

/* Names on the biography cards: centred, in MEUK blue (teal in dark mode) */
.bios h3 { align-self: stretch; text-align: center; color: var(--accent); margin-top: 0.9rem; }

/* Footer, as on the app: the company name is a link in MEUK blue (teal in dark mode) */
footer { font-size: 0.85rem; background: var(--panel); }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* The menu stays at the top and the footer at the foot of the window while the page scrolls between them.
   The Contact page (body.fit) already fits the window, so its footer stays in the normal layout. */
header { position: sticky; top: 0; z-index: 20; }
body:not(.fit) { padding-bottom: 3.5rem; }
body:not(.fit) footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin-top: 0; padding: 0.6rem 2rem; }

/* Headings and sub-headings in MEUK blue (teal in dark mode) */
h1, h2, h3 { color: var(--accent); }

/* Photo that fades to the illustration on roll-over, or on a tap or keyboard focus */
.portrait-swap { position: relative; align-self: center; width: 100%; max-width: 220px; }
.portrait-swap .portrait { max-width: none; }
.bios .portrait-swap .over { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity .8s ease-in-out; }
.portrait-swap:hover .over, .portrait-swap:focus .over { opacity: 1; }

/* Bold words in bulleted lists in MEUK blue (teal in dark mode) */
.page-card li strong { color: var(--accent); }

/* Contact form field names in MEUK blue (teal in dark mode) */
.form-box label { color: var(--accent); }

/* Only the content between the menu and the footer scrolls, so the scrollbar sits beside the content and
   never runs past the menu or footer. The side padding keeps the content centred at its usual width. */
body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
header, footer { flex-shrink: 0; }
body:not(.fit) { padding-bottom: 0; }
body:not(.fit) footer { position: static; }
main { flex: 1; min-height: 0; overflow-y: auto; width: 100%; max-width: none; margin: 0; padding-left: max(2rem, calc((100% - 996px) / 2)); padding-right: max(2rem, calc((100% - 996px) / 2)); }
main:focus { outline: none; }
@media (max-width: 600px) { main { padding-left: 1rem; padding-right: 1rem; } }
@media print { body { height: auto; display: block; overflow: visible; } main { overflow: visible; } }

/* As on the app: both button labels share one cell, so the button is the same width in either mode. The label
   shown is the mode a click switches to. The style sheet picks it, so it is right as soon as the page is drawn. */
#themeToggle { display: inline-grid; white-space: nowrap; }
#themeToggle > span { grid-area: 1 / 1; text-align: center; }
#themeToggle > span[data-label="light"] { visibility: hidden; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) #themeToggle > span[data-label="dark"] { visibility: hidden; }
	:root:not([data-theme="light"]) #themeToggle > span[data-label="light"] { visibility: visible; }
}
:root[data-theme="dark"] #themeToggle > span[data-label="dark"] { visibility: hidden; }
:root[data-theme="dark"] #themeToggle > span[data-label="light"] { visibility: visible; }

/* Page titles sit close under the menu, with a short gap before the first sub-heading, the same on every page */
main { padding-top: 1rem; }
.hero { padding-top: 0.5rem; }
.hero + h2 { margin-top: 0.75rem; }
