/*
 * Barra Academy - frontend styles.
 *
 * Ported from the reference app with two structural changes, both forced by
 * living inside a WordPress theme rather than owning the whole document:
 *   1. Every class is ba- prefixed and every rule is scoped under .ba-app, so
 *      neither our styles nor the theme's leak into each other.
 *   2. The reference styled `body` (background, font, noise overlay) and used
 *      100vh. A shortcode cannot own `body`, so those move onto .ba-app.
 */

.ba-app {
	--ba-brand-navy: #003D71;
	--ba-brand-blue: #0081AF;
	--ba-brand-blue-deep: #005E80;
	--ba-ink: #003D71;
	--ba-dark-text: #212529;
	--ba-ink-soft: #4A5B6E;
	--ba-accent: #0081AF;
	--ba-accent-dim: #005E80;
	--ba-cream: #F5EFE1;
	--ba-cream-deep: #ECE3D0;
	--ba-paper: #FBF8F0;
	--ba-paper-warm: #FFFFFF;
	--ba-gold: #B8965A;
	--ba-gold-deep: #8A6F3E;
	--ba-moss: #2D4A3E;
	--ba-rule: #D9CFB6;
	--ba-error: #C9543A;

	position: relative;
	display: grid;
	place-items: center;
	max-width: 472px;
	margin-inline: auto;
	/* Padding, not background: it keeps the phone's drop shadow from touching
	   whatever sits next to it on the page. */
	padding: 16px;
	background: transparent;
	color: var(--ba-dark-text);
	font-family: 'Open Sans', system-ui, sans-serif;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}

/* No paper-grain overlay.
 *
 * The reference app put one on body::before at z-index 1, with the phone at
 * z-index 2 - so it only ever textured the background band AROUND the phone,
 * never the phone itself. With .ba-app transparent there is no band to
 * texture, and leaving it in would paint a grainy rectangle over the page. */

.ba-app *,
.ba-app *::before,
.ba-app *::after { box-sizing: border-box; }

.ba-phone {
	position: relative;
	width: 100%;
	max-width: 440px;
	min-height: 780px;
	display: flex;
	flex-direction: column;
	background: var(--ba-paper);
	border-radius: 28px;
	box-shadow: 0 1px 2px rgba(0,61,113,.05), 0 8px 24px rgba(0,61,113,.09), 0 30px 60px rgba(0,61,113,.11);
	overflow: hidden;
}

@media (max-width: 480px) {
	/* The reference app ran full-screen and squared off its corners on mobile.
	   Here it sits inside a page, so the rounded card is kept at every width -
	   the padding is what gives the corners room to read. */
	.ba-app { padding: 12px; max-width: none; }
	.ba-phone { border-radius: 22px; }
}

.ba-view {
	display: none;
	flex-direction: column;
	background: var(--ba-paper);
}
/* flex: 1 0 auto - fill the phone when the content is shorter than it, but
   never shrink below the content. That is what lets a view grow the card
   instead of scrolling inside it. */
.ba-view.ba-active {
	display: flex;
	flex: 1 0 auto;
}

/* The learning view is the one view still pinned to the phone's height, on
   purpose: .ba-stage needs a definite height for the absolutely-positioned
   cards inside it, and a fixed stage stops the card resizing every time the
   participant pages between a short card and a long one. */
#ba-view-learning {
	position: absolute;
	inset: 0;
}

/* Reset the handful of element styles the theme is most likely to set.
 *
 * Wrapped in :where() deliberately. A plain `.ba-app input` selector has
 * specificity 0,1,1 and therefore BEATS component rules like `.ba-input`
 * (0,1,0) - which silently zeroed the padding on every input and button in
 * the plugin. :where() contributes zero specificity, so this reset can never
 * out-rank a component rule again.
 *
 * Form controls get their margin reset but NOT their padding: padding is how
 * an input or button gets its height. */
:where(.ba-app) :where(h1, h2, h3, h4, p, ul, li, blockquote, figure) {
	margin: 0;
	padding: 0;
}
:where(.ba-app) :where(input, button, label, textarea, select) {
	margin: 0;
}
:where(.ba-app) :where(ul) { list-style: none; }
:where(.ba-app) :where(img) { max-width: 100%; height: auto; }

/* Theme-proofing.
 *
 * The reset above is :where() - zero specificity - so it loses to a theme
 * rule like `.entry-content h2 { text-transform: uppercase }` (0,1,1), which
 * also out-ranks our own component rules (0,1,0). Those two properties are
 * the ones a theme most often forces, and the result is a course in SHOUTING
 * CAPS or in the theme's display font.
 *
 * So these few declarations are scoped to the id, which out-ranks any class
 * selector a theme can realistically use. Deliberately narrow: it declares
 * only values that every heading rule in this stylesheet already sets, so it
 * can never silently restyle a component.
 *
 * Unlike the reference prototype, form controls are not blanket-reset to
 * `text-transform: none`: .ba-input-code and .ba-label are uppercase on
 * purpose, and flattening them would wreck the access-code field and every
 * form label. They are pinned to their intended values just below. */
#ba-app :where(h1, h2, h3, h4) {
	text-transform: none;
	font-family: 'Roboto', sans-serif;
	font-style: normal;
}
#ba-app :where(h1, h2, h3, h4) em { font-style: italic; }
#ba-app :where(p, li) { text-transform: none; font-family: inherit; }

/* Form controls are guarded at their INTENDED value rather than flattened:
 * the access-code field and the field labels are uppercase by design, and
 * the code field is deliberately monospace. Each exception has to carry the
 * id too, or the guard above it - (1,0,0) - would out-rank the component
 * rule and quietly undo it. */
#ba-app :where(input, label, button) { text-transform: none; }
#ba-app :where(input, button, textarea, select, label) { font-family: inherit; }

/* The exceptions. Each one carries the id, because the two guards above are
 * (1,0,0) and would otherwise out-rank the component rule and silently
 * restyle it - which is exactly how the brand wordmark lost its Roboto the
 * first time this block was written. Keep this list in step with any
 * component on these elements that sets its own font or casing. */
#ba-app input.ba-input-code,
#ba-app label.ba-label,
#ba-app button.ba-home-btn,
#ba-app button.ba-signout { text-transform: uppercase; }

#ba-app button.ba-brand,
#ba-app button.ba-mini-opt { font-family: 'Roboto', sans-serif; }
#ba-app button.ba-btn,
#ba-app input.ba-input { font-family: 'Open Sans', sans-serif; }

/* Last, on purpose. The code field carries both .ba-input and
 * .ba-input-code, so these two pins tie on specificity and source order is
 * what decides - this one has to come after .ba-input to keep its
 * monospace. */
#ba-app input.ba-input-code { font-family: 'Roboto', Menlo, Consolas, monospace; }

/* ---------------------------------------------------------------- topbar */
.ba-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 12px;
	border-bottom: 1px solid var(--ba-cream-deep);
	background: var(--ba-paper);
	flex-shrink: 0;
}
.ba-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 14px;
	color: var(--ba-ink);
	cursor: pointer;
	background: none;
	border: none;
}
.ba-brand-mark {
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: var(--ba-ink);
	display: grid;
	place-items: center;
	flex-shrink: 0;
}
.ba-brand-mark::after {
	content: "IB";
	color: var(--ba-paper);
	font-family: 'Roboto', sans-serif;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .04em;
}
.ba-topbar-meta {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ba-ink-soft);
	font-weight: 600;
}
.ba-topbar-link {
	text-decoration: none;
}
.ba-topbar-link:hover,
.ba-topbar-link:focus-visible {
	color: var(--ba-accent);
	text-decoration: underline;
}
.ba-home-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	color: var(--ba-accent);
	font-family: inherit;
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-weight: 700;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
	transition: background .2s;
}
.ba-home-btn:hover { background: var(--ba-cream); }

/* ------------------------------------------------------------- dashboard */
.ba-dashboard { padding: 30px 24px 32px; flex: 1 0 auto; }
.ba-dash-logo { max-width: 150px; margin-bottom: 28px; display: block; }
.ba-dash-eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--ba-accent);
	margin-bottom: 10px;
}
.ba-dash-headline {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 34px;
	line-height: 1.1;
	letter-spacing: -.01em;
	color: var(--ba-ink);
	margin-bottom: 14px;
}
.ba-dash-headline em { font-style: italic; color: var(--ba-accent); font-weight: 400; }
.ba-dash-intro {
	font-size: 15px;
	line-height: 1.55;
	color: var(--ba-dark-text);
	margin-bottom: 26px;
}
.ba-dash-greet {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	/* Deliberately NOT flex-wrap: wrap. With wrapping the button drops onto
	   its own line as soon as the name and venue get long; instead the text
	   (min-width: 0) wraps within its own column and the button stays pinned
	   to the right. */
	font-size: 13px;
	line-height: 1.5;
	color: var(--ba-ink-soft);
	margin-bottom: 22px;
	padding: 10px 14px;
	background: var(--ba-cream);
	border-radius: 8px;
	border-left: 2px solid var(--ba-accent);
}
.ba-dash-greet strong { color: var(--ba-ink); font-weight: 600; }
.ba-greet-text { flex: 1 1 auto; min-width: 0; }

.ba-signout {
	flex-shrink: 0;
	white-space: nowrap;
	background: transparent;
	border: 1px solid var(--ba-cream-deep);
	border-radius: 999px;
	padding: 7px 12px;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ba-ink-soft);
	cursor: pointer;
	transition: all .2s;
}
.ba-signout:hover {
	border-color: var(--ba-error);
	color: var(--ba-error);
	background: var(--ba-paper);
}
.ba-signout:focus-visible {
	outline: 2px solid var(--ba-accent);
	outline-offset: 2px;
}
.ba-signout.ba-busy { opacity: .5; pointer-events: none; }

.ba-module-list { display: flex; flex-direction: column; gap: 12px; }
.ba-module-item {
	background: var(--ba-paper-warm);
	border: 1px solid var(--ba-cream-deep);
	border-radius: 14px;
	padding: 20px 22px 34px;
	cursor: pointer;
	transition: all .25s;
	text-align: left;
	width: 100%;
	font-family: inherit;
	position: relative;
	overflow: hidden;
}
.ba-module-item::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 4px;
	background: var(--ba-accent);
}
.ba-module-item.ba-done::before { background: var(--ba-gold); }
.ba-module-item:hover {
	border-color: var(--ba-ink);
	transform: translateX(3px);
	box-shadow: 0 6px 18px rgba(0,61,113,.08);
}
.ba-module-item.ba-locked {
	opacity: .55;
	cursor: not-allowed;
	background: var(--ba-cream);
}
.ba-module-item.ba-locked::before { background: var(--ba-ink-soft); }
.ba-module-item.ba-locked:hover {
	transform: none;
	border-color: var(--ba-cream-deep);
	box-shadow: none;
}
.ba-module-item.ba-locked:hover .ba-mod-arrow { transform: none; color: var(--ba-ink-soft); }
.ba-mod-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.ba-mod-tag {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ba-accent);
}
.ba-mod-status {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ba-ink-soft);
	display: flex;
	align-items: center;
	gap: 6px;
}
.ba-mod-status .ba-tick {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--ba-gold);
	color: var(--ba-paper);
	display: inline-grid;
	place-items: center;
	font-size: 9px;
	font-weight: 700;
}
.ba-mod-status .ba-lock {
	width: 12px;
	height: 12px;
	background: var(--ba-ink-soft);
	color: var(--ba-paper);
	border-radius: 2px;
	font-size: 8px;
	font-weight: 700;
	display: inline-grid;
	place-items: center;
}
.ba-module-item h3 {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 19px;
	line-height: 1.25;
	color: var(--ba-ink);
	margin-bottom: 6px;
}
.ba-module-item p {
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--ba-dark-text);
	margin-bottom: 12px;
}
.ba-mod-meta { display: flex; gap: 14px; font-size: 12px; font-weight: 600; color: var(--ba-ink-soft); }
.ba-mod-meta span { color: var(--ba-ink); }
.ba-mod-arrow {
	position: absolute;
	bottom: 16px;
	right: 20px;
	font-family: 'Roboto', sans-serif;
	font-size: 22px;
	color: var(--ba-ink-soft);
	transition: transform .25s, color .25s;
}
.ba-module-item:hover .ba-mod-arrow { color: var(--ba-accent); transform: translateX(4px); }
.ba-dash-footer-note {
	margin-top: 24px;
	padding: 14px 16px;
	background: var(--ba-cream);
	border-radius: 10px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--ba-dark-text);
	text-align: center;
}
.ba-dash-footer-note strong { color: var(--ba-ink); font-weight: 600; }

/* -------------------------------------------------------------- learning */
.ba-progress { display: flex; gap: 5px; padding: 12px 22px; background: var(--ba-paper); flex-shrink: 0; }
.ba-dot { flex: 1; height: 3px; background: var(--ba-cream-deep); border-radius: 2px; transition: background .5s; }
.ba-dot.ba-done { background: var(--ba-accent); }
.ba-dot.ba-current { background: var(--ba-ink); }

.ba-stage { flex: 1; position: relative; overflow: hidden; background: var(--ba-paper); }
.ba-card {
	position: absolute;
	inset: 0;
	padding: 26px 24px 28px;
	display: none;
	flex-direction: column;
	background: var(--ba-paper);
	overflow-y: auto;
}
.ba-card.ba-visible { display: flex; animation: ba-card-in .4s ease; }

/* The card is a flex column taller than the phone, so by default its children
   get flex-shrink: 1 and are squashed to fit - which collapsed the map and
   chef images down to a few pixels. Pin every child at its natural size and
   let the card's own overflow-y do the scrolling. */
.ba-card > * { flex-shrink: 0; }
@keyframes ba-card-in {
	from { opacity: 0; transform: translateX(20px); }
	to   { opacity: 1; transform: translateX(0); }
}

.ba-eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--ba-accent);
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.ba-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--ba-cream-deep); }
.ba-card h1 {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 32px;
	line-height: 1.1;
	letter-spacing: -.01em;
	color: var(--ba-ink);
	margin-bottom: 16px;
}
.ba-card h1 em { font-style: italic; color: var(--ba-accent); font-weight: 400; }
.ba-card h2 {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 24px;
	line-height: 1.15;
	letter-spacing: -.01em;
	color: var(--ba-ink);
	margin-bottom: 14px;
}
.ba-card h2 em { font-style: italic; color: var(--ba-accent); font-weight: 400; }
.ba-card p { font-size: 15px; line-height: 1.6; color: var(--ba-dark-text); margin-bottom: 12px; }
.ba-card p strong { color: var(--ba-ink); font-weight: 600; }
.ba-card p em { font-style: italic; color: var(--ba-accent); }

.ba-big-number {
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: 76px;
	line-height: .9;
	color: var(--ba-accent);
	letter-spacing: -.03em;
	margin-bottom: 8px;
}
.ba-big-number sup { font-size: 20px; font-weight: 400; color: var(--ba-ink-soft); margin-left: 6px; vertical-align: super; }

.ba-quote {
	border-left: 3px solid var(--ba-accent);
	padding: 10px 0 10px 16px;
	margin: 14px 0 16px;
	font-style: italic;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ba-ink);
}
.ba-bullets { margin: 6px 0 14px; }
.ba-bullets li {
	padding: 7px 0 7px 22px;
	position: relative;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--ba-dark-text);
}
.ba-bullets li::before { content: "\2014"; position: absolute; left: 0; color: var(--ba-accent); font-weight: 700; }
.ba-bullets li strong { color: var(--ba-ink); font-weight: 600; }

.ba-subbrand-logo { max-width: 180px; margin-bottom: 14px; display: block; }
.ba-place-image { margin: 14px -24px; overflow: hidden; position: relative; background: var(--ba-cream); }
.ba-place-image img { width: 100%; height: auto; display: block; }
.ba-place-label {
	position: absolute;
	bottom: 14px;
	left: 14px;
	background: var(--ba-ink);
	color: var(--ba-paper);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 6px 12px;
	border-radius: 999px;
}
.ba-chef-image { margin: 16px -24px 4px; height: 280px; overflow: hidden; position: relative; background: var(--ba-cream); }
.ba-chef-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }

.ba-meta-row { display: flex; gap: 12px; margin: 14px 0 18px; padding: 12px 14px; background: var(--ba-cream); border-radius: 10px; }
.ba-meta-item { flex: 1; }
.ba-meta-label {
	font-size: 10px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ba-ink-soft);
	font-weight: 600;
	margin-bottom: 4px;
}
.ba-meta-value { font-family: 'Roboto', sans-serif; font-size: 16px; font-weight: 500; color: var(--ba-ink); }

.ba-compare { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.ba-compare-cell { padding: 14px 16px; border-radius: 10px; border: 1px solid var(--ba-cream-deep); background: var(--ba-cream); }
.ba-compare-tag {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ba-accent);
	margin-bottom: 6px;
}
.ba-compare-text { font-size: 14.5px; line-height: 1.5; color: var(--ba-ink); }
.ba-compare-text strong { font-weight: 600; }

.ba-aim-block { background: var(--ba-cream); border-radius: 12px; padding: 18px 20px; margin: 14px 0 16px; border: 1px solid var(--ba-cream-deep); }
.ba-aim-row { display: flex; align-items: baseline; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--ba-cream-deep); }
.ba-aim-row:last-child { border-bottom: none; }
.ba-aim-letter { font-family: 'Roboto', sans-serif; font-weight: 700; font-size: 26px; color: var(--ba-accent); width: 30px; line-height: 1; }
.ba-aim-text { font-size: 15px; color: var(--ba-ink); }
.ba-aim-text strong { font-weight: 600; }

.ba-small-note {
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--ba-ink-soft);
	font-style: italic;
	padding: 10px 12px;
	background: var(--ba-cream);
	border-radius: 8px;
	border-left: 2px solid var(--ba-accent);
}
/* ------------------------------------------- BAP certification block */
.ba-card-sub {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 17px;
	color: var(--ba-ink);
	margin: 10px 0;
}
.ba-bap-pillars {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 0 0 16px;
}
.ba-bap-pillar {
	background: var(--ba-cream);
	border: 1px solid var(--ba-cream-deep);
	border-radius: 10px;
	padding: 12px;
}
.ba-bap-pillar-title {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 14px;
	color: var(--ba-ink);
	margin-bottom: 4px;
}
.ba-bap-pillar-text { font-size: 12.5px; line-height: 1.45; color: var(--ba-dark-text); }

.ba-bap-chain { margin: 0 0 14px; padding: 0; position: relative; }
/* The connecting spine between the three stars. Inset top and bottom so it
   runs between the circles rather than through the first and last. */
.ba-bap-chain::before {
	content: "";
	position: absolute;
	left: 13px;
	top: 18px;
	bottom: 18px;
	width: 2px;
	background: var(--ba-cream-deep);
}
.ba-bap-step {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 8px 0;
	position: relative;
}
.ba-bap-star {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--ba-ink);
	color: var(--ba-paper);
	display: grid;
	place-items: center;
	font-size: 14px;
	flex-shrink: 0;
	position: relative;
}
.ba-bap-step-title {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 15px;
	color: var(--ba-ink);
	line-height: 1.3;
}
.ba-bap-step-text { font-size: 13.5px; line-height: 1.5; color: var(--ba-dark-text); }

/* ------------------------------------------------------- dish photos */
.ba-dish-image {
	margin: 6px 0 16px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--ba-cream);
}
.ba-dish-image img { width: 100%; height: auto; display: block; }
.ba-dish-caption {
	font-size: 12px;
	line-height: 1.45;
	color: var(--ba-ink-soft);
	font-style: italic;
	margin: -8px 0 14px;
}
.ba-dish-group {
	margin: 4px 0 12px;
	padding: 14px 16px;
	background: var(--ba-cream);
	border-radius: 12px;
	border: 1px solid var(--ba-cream-deep);
}
.ba-dish-group-title {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 15px;
	color: var(--ba-ink);
	margin-bottom: 4px;
}
.ba-dish-group .ba-bullets { margin: 0; }
.ba-dish-group .ba-bullets li { font-size: 14px; padding: 5px 0 5px 22px; }

.ba-cert-logos { display: flex; align-items: center; gap: 18px; margin: 6px 0 16px; flex-wrap: wrap; }
.ba-cert-logos img { max-height: 50px; width: auto; display: block; }

/* ----------------------------------------------------------- mini test */
.ba-mini-test { margin-top: 14px; padding: 16px; background: var(--ba-cream); border-radius: 12px; border: 1px dashed var(--ba-accent); }
.ba-mini-test-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--ba-accent);
	margin-bottom: 10px;
}
.ba-mini-test-question { font-style: italic; font-size: 14px; color: var(--ba-ink); margin-bottom: 12px; line-height: 1.45; }
.ba-mini-test-options { display: flex; gap: 8px; }
.ba-mini-opt {
	flex: 1;
	padding: 14px 0;
	font-family: 'Roboto', sans-serif;
	font-weight: 700;
	font-size: 22px;
	color: var(--ba-ink);
	background: var(--ba-paper);
	border: 2px solid var(--ba-cream-deep);
	border-radius: 10px;
	cursor: pointer;
	transition: all .2s;
	letter-spacing: .02em;
}
.ba-mini-opt:hover:not(:disabled) { border-color: var(--ba-ink); }
.ba-mini-opt.ba-correct { background: #EAF2EA; border-color: var(--ba-moss); color: var(--ba-moss); }
.ba-mini-opt.ba-wrong { background: #FBE9E4; border-color: var(--ba-error); color: var(--ba-error); }
.ba-mini-opt.ba-dim { opacity: .4; }
.ba-mini-opt:disabled { cursor: default; }
.ba-mini-test-feedback { margin-top: 10px; font-size: 13px; line-height: 1.5; display: none; font-weight: 500; }
.ba-mini-test-feedback.ba-show { display: block; }
.ba-mini-test-feedback.ba-ok { color: var(--ba-moss); }
.ba-mini-test-feedback.ba-no { color: #A8412B; }

/* --------------------------------------------------------------- video */
.ba-video-embed { margin: 12px 0 16px; position: relative; }
.ba-video-trigger {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 12px 16px 12px 12px;
	background: var(--ba-ink);
	color: var(--ba-paper);
	border-radius: 12px;
	border: none;
	cursor: pointer;
	font-family: inherit;
	text-align: left;
	transition: all .2s;
}
.ba-video-trigger:hover { background: var(--ba-accent-dim); transform: translateY(-1px); }
.ba-video-trigger .ba-play {
	width: 64px;
	height: 48px;
	border-radius: 8px;
	background-color: var(--ba-brand-blue-deep);
	background-size: cover;
	background-position: center;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	color: var(--ba-paper);
	font-size: 14px;
	font-weight: 700;
	position: relative;
	overflow: hidden;
}
.ba-video-trigger .ba-play::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(rgba(0,61,113,.05), rgba(0,61,113,.55));
	z-index: 0;
}
.ba-video-trigger .ba-play::after {
	content: "\25B6";
	position: relative;
	z-index: 1;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
.ba-video-trigger .ba-v-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ba-video-trigger .ba-v-label { font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 15px; line-height: 1.2; }
.ba-video-trigger .ba-v-meta { font-size: 11px; font-weight: 500; opacity: .75; letter-spacing: .06em; }
.ba-video-trigger .ba-v-arrow { font-size: 18px; opacity: .6; transition: transform .2s; }
.ba-video-trigger:hover .ba-v-arrow { transform: translateX(3px); opacity: 1; }
.ba-video-embed.ba-playing .ba-video-trigger { display: none; }
.ba-video-frame { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--ba-ink); }
.ba-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ba-video-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; flex-wrap: wrap; }
.ba-video-close {
	background: transparent;
	border: none;
	color: var(--ba-ink-soft);
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 6px;
	transition: color .2s;
}
.ba-video-close:hover { color: var(--ba-ink); }
.ba-video-external {
	color: var(--ba-accent);
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-decoration: none;
	padding: 6px 10px;
	border-radius: 6px;
	transition: all .2s;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.ba-video-external:hover { background: var(--ba-cream); text-decoration: none; }

/* ------------------------------------------------------ buttons / footer */
.ba-footer { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; flex-shrink: 0; }
.ba-btn {
	font-family: 'Open Sans', sans-serif;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: .02em;
	border: none;
	border-radius: 999px;
	padding: 14px 22px;
	cursor: pointer;
	transition: all .2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
}
.ba-btn-primary { background: var(--ba-ink); color: var(--ba-paper); flex: 1; }
.ba-btn-primary:hover:not([disabled]) { background: var(--ba-accent-dim); transform: translateY(-1px); color: var(--ba-paper); }
.ba-btn-primary:active { transform: translateY(0); }
.ba-btn-primary[disabled] { opacity: .4; cursor: not-allowed; }
.ba-btn-ghost { color: var(--ba-ink-soft); padding: 14px 18px; background: transparent; }
.ba-btn-ghost:hover { color: var(--ba-ink); }
.ba-btn .ba-arrow { transition: transform .2s; }
.ba-btn-primary:hover:not([disabled]) .ba-arrow { transform: translateX(3px); }
.ba-btn.ba-busy { opacity: .6; pointer-events: none; }
.ba-btn:focus-visible {
	outline: 2px solid var(--ba-accent);
	outline-offset: 2px;
}

/* The signup form's own footer sits under the fields rather than being pinned
   to the bottom of the view, and its button is sized to match the inputs. */
.ba-signup .ba-footer { margin-top: 6px; padding-top: 4px; }
.ba-signup .ba-btn-primary {
	min-height: 56px;
	font-size: 15px;
	/* Modest side padding: the button is full-width (flex: 1) so horizontal
	   padding buys nothing visually, and 24px was enough to wrap the label
	   onto two lines on a 320px screen. */
	padding: 16px 18px;
}

/* ---------------------------------------------------------------- quiz */
.ba-quiz-options { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ba-opt {
	text-align: left;
	background: var(--ba-paper);
	border: 1.5px solid var(--ba-cream-deep);
	border-radius: 12px;
	padding: 14px 16px;
	font-family: 'Open Sans', sans-serif;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--ba-ink);
	cursor: pointer;
	transition: all .2s;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
}
.ba-opt:hover:not(:disabled) { border-color: var(--ba-ink); background: var(--ba-cream); }
.ba-opt:disabled { cursor: default; }
.ba-opt-letter { font-family: 'Roboto', sans-serif; font-weight: 700; font-size: 15px; color: var(--ba-accent); flex-shrink: 0; width: 18px; }
.ba-opt.ba-correct { border-color: var(--ba-moss); background: #EAF2EA; }
.ba-opt.ba-correct .ba-opt-letter { color: var(--ba-moss); }
.ba-opt.ba-wrong { border-color: var(--ba-error); background: #FBE9E4; }
.ba-opt.ba-wrong .ba-opt-letter { color: var(--ba-error); }
.ba-opt.ba-dim { opacity: .5; }

.ba-feedback { margin-top: 12px; padding: 14px 16px; border-radius: 10px; font-size: 14px; line-height: 1.5; display: none; }
.ba-feedback.ba-show { display: block; }
.ba-feedback.ba-ok { background: #EAF2EA; color: var(--ba-moss); }
.ba-feedback.ba-no { background: #FBE9E4; color: #A8412B; }
.ba-feedback strong { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------------------------------------------------------- completion */
.ba-badge { margin: 18px auto 14px; width: 130px; height: 130px; position: relative; animation: ba-pop .6s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes ba-pop {
	0%   { transform: scale(.6); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}
.ba-completion-text { text-align: center; margin: 0 auto 14px; max-width: 320px; color: var(--ba-dark-text); }
.ba-next-up { margin-top: 2px; padding: 14px 16px; border: 1px solid var(--ba-cream-deep); border-radius: 12px; background: var(--ba-cream); }
.ba-next-up-label {
	font-size: 10px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ba-ink-soft);
	font-weight: 600;
	margin-bottom: 6px;
}
.ba-next-up-title { font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 17px; color: var(--ba-ink); margin-bottom: 4px; }
.ba-next-up-desc { font-size: 13px; color: var(--ba-dark-text); line-height: 1.5; }

/* --------------------------------------------------------------- signup */
.ba-signup { padding: 30px 24px 32px; flex: 1 0 auto; display: flex; flex-direction: column; }
.ba-signup-logo { max-width: 150px; margin-bottom: 24px; display: block; }
.ba-form { margin-top: 8px; }
.ba-field { margin-bottom: 20px; }
.ba-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ba-ink-soft);
	margin-bottom: 8px;
}
.ba-input {
	display: block;
	width: 100%;
	/* 16px is not cosmetic: below 16px, iOS Safari zooms the page on focus. */
	font-size: 16px;
	line-height: 1.4;
	padding: 15px 16px;
	min-height: 54px;
	font-family: 'Open Sans', sans-serif;
	color: var(--ba-ink);
	background: var(--ba-paper-warm);
	border: 1.5px solid var(--ba-cream-deep);
	border-radius: 12px;
	transition: border-color .2s, box-shadow .2s;
	-webkit-appearance: none;
	appearance: none;
}
.ba-input::placeholder { color: var(--ba-ink-soft); opacity: .55; }
.ba-input:focus {
	outline: none;
	border-color: var(--ba-accent);
	/* Visible focus ring - the border colour change alone is too subtle to
	   satisfy keyboard users. */
	box-shadow: 0 0 0 3px rgba(0, 129, 175, .18);
}
.ba-input.ba-invalid { border-color: var(--ba-error); background: #FDF4F1; }
.ba-field-error { display: none; margin-top: 5px; font-size: 12px; color: #A8412B; font-weight: 600; }
.ba-field-error.ba-show { display: block; }

/* ------------------------------------------------------- access code */
/* The gate, so it reads as the key it is: large, spaced, centred. */
.ba-input-code {
	font-family: 'Roboto', Menlo, Consolas, monospace;
	font-size: 30px;
	font-weight: 500;
	letter-spacing: .34em;
	text-align: center;
	text-transform: uppercase;
	/* The tracking is applied to the right of the last glyph too, which shifts
	   the visual centre. Nudging the text box compensates. */
	padding-left: calc(16px + .34em);
	min-height: 66px;
}
.ba-input-code::placeholder {
	letter-spacing: .34em;
	font-size: 26px;
	color: var(--ba-ink-soft);
	opacity: .3;
}

/* Group name echoed back once the code checks out - the participant's
   confirmation they typed it right before filling in anything else. */
.ba-code-group {
	margin-top: 8px;
	padding: 9px 12px;
	border-radius: 8px;
	background: #EAF2EA;
	border-left: 3px solid var(--ba-moss);
	font-size: 13px;
	line-height: 1.45;
	color: var(--ba-moss);
	font-weight: 600;
}
.ba-code-group.ba-checking {
	background: var(--ba-cream);
	border-left-color: var(--ba-ink-soft);
	color: var(--ba-ink-soft);
	font-weight: 500;
}

/* --------------------------------------------------- privacy consent */
.ba-consent-field { margin-top: 4px; }
.ba-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ba-dark-text);
}
.ba-consent input[type="checkbox"] {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	accent-color: var(--ba-accent);
	cursor: pointer;
}
.ba-consent-text a { color: var(--ba-accent); font-weight: 600; }
.ba-consent-text a:hover { text-decoration: underline; }
.ba-consent.ba-invalid .ba-consent-text { color: #A8412B; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.ba-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}
.ba-form-error {
	display: none;
	margin: 4px 0 14px;
	padding: 12px 14px;
	border-radius: 10px;
	background: #FBE9E4;
	color: #A8412B;
	font-size: 13.5px;
	line-height: 1.5;
	font-weight: 600;
}
.ba-form-error.ba-show { display: block; }
.ba-privacy-note { margin-top: 14px; font-size: 12px; line-height: 1.5; color: var(--ba-ink-soft); text-align: center; }

/* -------------------------------------------------------------- loading */
.ba-loading { padding: 30px 24px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.ba-skeleton { background: var(--ba-cream-deep); border-radius: 8px; animation: ba-pulse 1.4s ease-in-out infinite; }
.ba-skeleton-logo { width: 150px; height: 44px; margin-bottom: 14px; }
.ba-skeleton-line { height: 14px; }
.ba-skeleton-line.ba-short { width: 45%; }
.ba-skeleton-line.ba-mid { width: 75%; }
.ba-skeleton-block { height: 118px; border-radius: 14px; }
@keyframes ba-pulse {
	0%, 100% { opacity: .45; }
	50%      { opacity: .85; }
}

/* ---------------------------------------------------------- certificate */
.ba-cert-stage { padding: 24px 22px 28px; flex: 1 0 auto; display: flex; flex-direction: column; }
.ba-cert-eyebrow {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--ba-accent);
	margin-bottom: 10px;
}
.ba-cert-headline {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 26px;
	line-height: 1.15;
	color: var(--ba-ink);
	text-align: center;
	margin-bottom: 22px;
	letter-spacing: -.01em;
}
.ba-cert-headline em { font-style: italic; color: var(--ba-accent); font-weight: 400; }
.ba-cert-frame {
	border: 1px solid var(--ba-gold);
	background: var(--ba-paper-warm);
	padding: 30px 22px 26px;
	border-radius: 4px;
	position: relative;
	text-align: center;
	box-shadow: 0 8px 30px rgba(0,61,113,.06);
}
.ba-cert-frame::before,
.ba-cert-frame::after { content: ""; position: absolute; width: 50px; height: 1px; background: var(--ba-gold); top: 88px; }
.ba-cert-frame::before { left: 22px; }
.ba-cert-frame::after { right: 22px; }
.ba-cert-monogram {
	font-family: 'Roboto', sans-serif;
	font-size: 11px;
	letter-spacing: .4em;
	color: var(--ba-ink);
	font-weight: 600;
	margin-bottom: 22px;
}
.ba-cert-label {
	font-size: 10px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--ba-ink-soft);
	margin-bottom: 10px;
	font-weight: 600;
}
/* Read-only now: the name and venue come from the signup record rather than
   being typed into the certificate, as they were in the reference. */
.ba-cert-recipient {
	font-family: 'Roboto', sans-serif;
	font-style: italic;
	font-weight: 400;
	font-size: 26px;
	color: var(--ba-ink);
	margin-bottom: 14px;
	padding: 4px 0;
	border-bottom: 1px solid var(--ba-rule);
	word-break: break-word;
}
.ba-cert-venue {
	font-size: 15px;
	color: var(--ba-ink);
	margin-bottom: 22px;
	padding: 4px 0;
	border-bottom: 1px solid var(--ba-rule);
	word-break: break-word;
}
.ba-cert-label.ba-venue-label { margin-top: 6px; margin-bottom: 8px; }
.ba-cert-statement { font-size: 14px; line-height: 1.5; color: var(--ba-dark-text); margin-bottom: 6px; }
.ba-cert-course {
	font-family: 'Roboto', sans-serif;
	font-style: italic;
	font-weight: 500;
	font-size: 19px;
	color: var(--ba-accent);
	margin-bottom: 22px;
}
.ba-cert-seal-area { width: 110px; height: 110px; margin: 0 auto 18px; }
.ba-cert-creds {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
/* max-width as well as max-height: the Sustainable Barramundi logo is 4.5:1,
   so height alone lets it overflow the frame on a 375px screen. */
.ba-cert-creds img { max-height: 32px; max-width: 46%; width: auto; }
.ba-cert-meta {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--ba-cream-deep);
	text-align: left;
	gap: 12px;
}
.ba-cert-meta-item:last-child { text-align: right; }
.ba-cert-meta-label {
	font-size: 9px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ba-ink-soft);
	font-weight: 600;
	margin-bottom: 3px;
}
.ba-cert-meta-value { font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 12px; color: var(--ba-ink); }
.ba-cert-number { font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 12px; color: var(--ba-ink); letter-spacing: .04em; }
.ba-cert-contact { margin-top: 22px; padding: 16px 18px; background: var(--ba-cream); border-radius: 12px; text-align: center; }
.ba-cert-contact h4 { font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 17px; color: var(--ba-ink); margin-bottom: 8px; }
.ba-cert-contact p { font-size: 12.5px; line-height: 1.7; color: var(--ba-dark-text); }
.ba-cert-contact a { color: var(--ba-accent); text-decoration: none; font-weight: 600; }
.ba-cert-contact a:hover { text-decoration: underline; }
.ba-cert-readmore {
	margin-top: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 16px;
	background: var(--ba-paper-warm);
	border: 1px solid var(--ba-cream-deep);
	border-radius: 10px;
	color: var(--ba-ink);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	transition: all .2s;
}
.ba-cert-readmore:hover { border-color: var(--ba-accent); color: var(--ba-accent); transform: translateY(-1px); }
.ba-cert-readmore .ba-pdf-icon {
	width: 22px;
	height: 22px;
	background: var(--ba-accent);
	color: var(--ba-paper);
	border-radius: 4px;
	display: grid;
	place-items: center;
	font-size: 9px;
	font-weight: 700;
	flex-shrink: 0;
}
.ba-cert-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.ba-cert-actions .ba-btn { flex: 1 1 auto; }
.ba-cert-status { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--ba-ink-soft); text-align: center; }

/* Very narrow phones (320px). The block theme adds its own page padding, so
   the card's usable content width drops to ~188px there and the submit
   label wraps onto a second line. Shrink it just enough to stay on one. */
@media (max-width: 360px) {
	.ba-app { padding: 8px; }
	.ba-dashboard,
	.ba-signup { padding-left: 18px; padding-right: 18px; }
	.ba-card { padding-left: 18px; padding-right: 18px; }
	/* The full-bleed images pull themselves out by exactly the card's side
	   padding, so these two must track the value above or they hang over the
	   card edge. */
	.ba-place-image { margin-left: -18px; margin-right: -18px; }
	.ba-chef-image { margin-left: -18px; margin-right: -18px; }
	.ba-signup .ba-btn-primary { font-size: 14px; padding: 16px 12px; }
	/* The wide tracking on the code field is the first thing to overflow on a
	   320px screen, so ease it off there. */
	.ba-input-code { font-size: 26px; letter-spacing: .24em; padding-left: calc(14px + .24em); }
	.ba-input-code::placeholder { font-size: 22px; letter-spacing: .24em; }
	.ba-dash-headline { font-size: 30px; }
	.ba-card h1 { font-size: 28px; }
	/* Two columns of BAP pillars leaves ~80px per cell at this width. */
	.ba-bap-pillars { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- print */
@media print {
	.ba-app { padding: 0; background: #fff; max-width: none; }
	.ba-phone { box-shadow: none; min-height: auto; border-radius: 0; max-width: none; }
	.ba-view { position: static; }
	.ba-topbar,
	.ba-cert-contact,
	.ba-cert-actions,
	.ba-cert-readmore,
	.ba-cert-status { display: none; }
	.ba-cert-frame { border: 2px solid var(--ba-gold); box-shadow: none; }
}

/* Mini-test response copy. Held in the DOM rather than in data- attributes,
   because wptexturize() rewrites quotes in shortcode output and would break
   any attribute containing prose. JS copies it into .ba-mini-test-feedback. */
.ba-mini-response { display: none; }
