/*
 * Digima BNI Live Dashboard 2.0
 *
 * Built for one target: a large flat screen in a room, viewed from the back row.
 * No breakpoints. The whole 1920x1080 canvas scales as a single unit, so every
 * measurement below is in rem against a root that is itself derived from the
 * viewport. 2560x1440 lands on a 21.33px root and everything grows by exactly
 * 1.333.
 *
 * The font-family declaration on .bni is the fix for the old font bug: the
 * previous stylesheet declared none at all, so overlays fell through to the
 * system stack while Elementor typography controls covered everything else.
 */

/*
 * Almoni DL AAA, self hosted. Three real weights ship: Regular, Bold, Black.
 * Everything in this file uses 400, 700 or 900 so the browser never has to
 * synthesise a weight, which on a 260px figure looks obviously fake.
 */
@font-face {
	font-family: 'Almoni';
	src: url('../fonts/almoni-regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Almoni';
	src: url('../fonts/almoni-bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Almoni';
	src: url('../fonts/almoni-black.woff2') format('woff2');
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

:root {
	/*
	 * The whole 1920x1080 canvas scales as one unit, so every measurement in
	 * this file is authored in rem against a 16px root at that size.
	 *
	 * Do not write this as `min(100vw / 1920, 100vh / 1080) * 16px`. Dividing a
	 * viewport unit by a plain number yields a length, not a ratio, so that
	 * expression multiplies a length by a length, is invalid, and silently
	 * falls back to the default 16px. It happens to be right at exactly
	 * 1920x1080 and wrong everywhere else: 1440x810 clipped 270px of the board
	 * and 2560x1440 rendered a third too small.
	 *
	 * 1920/16 = 120 and 1080/16 = 67.5, so dividing by those constants gives
	 * the correct px root directly, and min() picks whichever axis is tighter.
	 */
	font-size: min(calc(100vw / 120), calc(100vh / 67.5));

	--field-950: #030B14;
	--field-900: #061424;
	--field-800: #0B2137;
	--field-700: #12304C;
	--field-600: #1C4468;
	--icon-mark: #16395A;

	/* Hairlines and inner highlights. A premium surface is defined by the light
	   catching its top edge, not by a 1px solid grey border. */
	--hair:      rgba(255, 255, 255, 0.07);
	--hair-soft: rgba(255, 255, 255, 0.04);
	--lip:       inset 0 1px 0 rgba(255, 255, 255, 0.09);
	--lip-deep:  inset 0 3px 10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
	/* Contact + ambient. One blurred shadow reads as fog; two read as an object
	   resting above a surface. */
	--elev-1: 0 1px 2px rgba(0, 0, 0, 0.6), 0 1.2rem 2.4rem rgba(0, 0, 0, 0.45);
	--elev-2: 0 2px 4px rgba(0, 0, 0, 0.7), 0 2.4rem 5rem rgba(0, 0, 0, 0.55),
	          0 5rem 9rem rgba(0, 0, 0, 0.35);

	--ink-0:   #FFFFFF;
	--ink-100: #DCE8F2;
	--ink-300: #8FA9BF;
	/* Was #5D7A92, which gave 4.12:1 on the field and 3.62:1 on the modal
	   surface. Both clear the 3:1 large text threshold, but the type here only
	   counts as large while the root scale keeps it at 24px or more, and that
	   stops being true below roughly a 1646px viewport. Raised again once the
	   background gained light sources: measured against the brightest point of
	   the blue orb rather than against the flat token, so it holds 4.5:1
	   everywhere on the board, not just where the gradient happens to be dark. */
	--ink-500: #6F92AE;

	--bni-red:  #C0282D;
	--red-deep: #A81F24;
	--red-lit:  #E8484C;
	--bni-blue: #72A5C7;
	--gold:     #E4B75A;
	--green:    #23C176;

	--font-heb: 'Almoni', 'Assistant', 'Heebo', system-ui, sans-serif;
	--font-fig: 'Almoni', 'Archivo', system-ui, sans-serif;

	--ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-exit:  cubic-bezier(0.5, 0, 0.75, 0);
	--ease-move:  cubic-bezier(0.65, 0, 0.35, 1);
	--ease-pop:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
	background: var(--field-950);
}

/*
 * Film grain. Fixed, inert, and painted once, so it never costs a repaint.
 * At 3% it is invisible as texture and does the whole job: it stops the large
 * flat areas from reading as an empty canvas.
 */
.bni-grain {
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0.035;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bni-body { -webkit-font-smoothing: antialiased; }
.bni-body.hide-cursor { cursor: none; }

/* The one declaration that fixes the old font bug. Inheritance reaches every
   descendant including position:fixed overlays. */
.bni {
	font-family: var(--font-heb);
	position: relative;
	width: 100%;
	height: 100dvh;
	padding: 0 6rem;
	color: var(--ink-0);
	display: flex;
	flex-direction: column;
	overflow: hidden;

	/*
	 * Two soft light sources rather than one flat fill: a cool one behind the
	 * hero and a warm red one low on the trailing side, so the board has a
	 * direction of light and the corners fall away.
	 */
	background:
		radial-gradient(120rem 70rem at 50% -12%, rgba(63, 116, 163, 0.22), transparent 62%),
		radial-gradient(90rem 60rem at 6% 108%, rgba(192, 40, 45, 0.16), transparent 60%),
		linear-gradient(175deg, var(--field-900) 0%, var(--field-950) 78%);
}

/* Vignette. The board is lit from the middle and falls away at the edges, which
   is what stops a full bleed dark screen from reading as a flat sheet. */
.bni::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(130% 105% at 50% 42%, transparent 46%, rgba(0, 0, 0, 0.40) 100%);
}
.bni > * { position: relative; z-index: 1; }

.bni-fig {
	font-family: var(--font-fig);
	font-weight: 900;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.015em;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.bni-hdr {
	flex: 0 0 auto;
	height: 6rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--hair);
}

.bni-brand { display: flex; align-items: center; gap: 1.1rem; }
.bni-logo  { height: 3.4rem; width: auto; display: block; }

.bni-mark {
	font-family: var(--font-fig);
	font-weight: 900;
	font-size: 2.6rem;
	line-height: 1;
	letter-spacing: 0.02em;
}
.bni-mark b { color: var(--bni-red); font-weight: inherit; }
.bni-mark i { font-style: normal; color: var(--ink-300); font-weight: 400; }

.bni-chapter { font-size: 2.75rem; font-weight: 700; letter-spacing: 0.01em; }

.bni-meta {
	font-size: 1.75rem;
	font-weight: 400;
	color: var(--ink-500);
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.bni-hero {
	position: relative;
	flex: 0 0 auto;
	text-align: center;
	padding-top: 1.6rem;
}
/* A pool of light under the headline figure. Without it the largest element on
   the board is also the one with the least presence. */
.bni-hero::before {
	content: "";
	position: absolute;
	top: 40%;
	left: 50%;
	width: 78rem;
	height: 26rem;
	transform: translate(-50%, -50%);
	background: radial-gradient(closest-side, rgba(120, 175, 220, 0.16), transparent 72%);
	pointer-events: none;
}

/* Eyebrow: a microscopic pill above the headline figure. Cheap to build and it
   does more for perceived quality than any amount of extra colour. */
.bni-eyebrow { display: flex; justify-content: center; }
.bni-eyebrow span {
	display: inline-block;
	padding: 0.5rem 1.5rem;
	border-radius: 999px;
	border: 1px solid var(--hair);
	background: rgba(255, 255, 255, 0.035);
	box-shadow: var(--lip);
	font-size: 1.6rem;
	font-weight: 400;
	color: var(--ink-300);
	letter-spacing: 0.22em;
	text-transform: none;
}

.bni-hero-val {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 1.3rem;
	margin-top: 0.6rem;
}

.bni-hero-num {
	font-size: 16.5rem;
	line-height: 0.87;
	will-change: transform;
}

.bni-cur {
	font-family: var(--font-heb);
	font-size: 5.5rem;
	font-weight: 400;
	color: var(--ink-300);
	line-height: 1;
}

/* ── Progress. The story of the year, and the largest object on screen. ───── */

.bni-prog { flex: 0 0 auto; margin-top: 2rem; }

/* The goal figure sits directly above the gold marker that represents it, at
   the far end of the track. Having the label at one end and its marker at the
   other made the same fact read as two unrelated things. */
.bni-goal-row {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 0.6rem;
	padding-left: 0.55rem;
}

.bni-goal-tag {
	display: inline-flex;
	align-items: baseline;
	gap: 0.6rem;
	font-size: 2rem;
	font-weight: 700;
	color: var(--gold);
	letter-spacing: 0.02em;
}
/* A short riser tying the label down to the marker on the track below it. */
.bni-goal-tag::after {
	content: "";
	align-self: stretch;
	width: 1px;
	margin-inline-start: 0.5rem;
	background: linear-gradient(180deg, transparent, var(--gold));
	opacity: 0.55;
}
.bni-goal-tag .bni-fig { font-weight: 700; }

/* Outer shell. The track is not laid flat on the board, it sits in a tray. */
.bni-bezel {
	padding: 0.55rem;
	border-radius: 1.5rem;
	border: 1px solid var(--hair);
	background: rgba(255, 255, 255, 0.028);
	box-shadow: var(--lip), var(--elev-2);
}

/* Inner core. Radius is concentric: outer 1.5rem minus the 0.55rem padding. */
.bni-track {
	position: relative;
	height: 5.5rem;
	border-radius: 0.95rem;
	background: linear-gradient(180deg, #0A1E33, #0D2740);
	box-shadow: var(--lip-deep);
	overflow: hidden;
}

/* Fills from the right. This is the native direction for RTL and building it
   left to right would be a full regression. */
.bni-fill {
	position: absolute;
	inset: 0 0 0 auto;
	width: var(--pct, 0%);
	/* Light hits the top third and falls away, so the fill reads as a curved
	   surface rather than a rectangle of colour. */
	background:
		linear-gradient(180deg,
			rgba(255, 255, 255, 0.22) 0%,
			rgba(255, 255, 255, 0.05) 34%,
			rgba(0, 0, 0, 0.10) 72%,
			rgba(0, 0, 0, 0.22) 100%),
		linear-gradient(180deg, var(--red-lit) 0%, var(--bni-red) 42%, var(--red-deep) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
	transition: width 1.1s var(--ease-move);
	will-change: width;
}

.bni-hatch {
	position: absolute;
	inset: 0 auto 0 0;
	width: calc(100% - var(--pct, 0%));
	background: repeating-linear-gradient(45deg,
		rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 14px);
	transition: width 1.1s var(--ease-move);
}

.bni-ticks { position: absolute; inset: 0; }
.bni-ticks i { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.10); }
.bni-ticks i.mid { background: rgba(255, 255, 255, 0.22); }

.bni-goalmk {
	position: absolute; inset: 0 auto 0 0;
	width: 0.375rem;
	background: var(--gold);
	box-shadow: 0 0 1.6rem rgba(228, 183, 90, 0.55);
}

.bni-head {
	position: absolute;
	top: 0; bottom: 0;
	right: var(--pct, 0%);
	width: 0.5rem;
	background: var(--red-lit);
	box-shadow: 0 0 3.2rem rgba(232, 72, 76, 0.75), 0 0 1rem rgba(255, 255, 255, 0.35);
	transition: right 1.1s var(--ease-move);
	animation: bni-breathe 3.2s cubic-bezier(0.37, 0, 0.63, 1) infinite;
	will-change: right, opacity;
}

@keyframes bni-breathe {
	0%, 100% { opacity: 0.55; }
	50%      { opacity: 0.75; }
}

.bni-pct {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	left: calc(100% - var(--pct, 0%) + 1.4rem);
	font-size: 4.75rem;
	line-height: 1;
	color: var(--ink-0);
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
	transition: left 1.1s var(--ease-move);
	white-space: nowrap;
}

/* The empty part of the bar carries a measurement of what is missing. */
.bni-gapwrap { position: relative; height: 4rem; margin-top: 0.6rem; }

.bni-gap {
	position: absolute;
	inset: 0.5rem auto 0 0;
	width: calc(100% - var(--pct, 0%));
	transition: width 0.7s var(--ease-move);
}

.bni-gapline { position: relative; height: 0.75rem; }
.bni-gapline::before,
.bni-gapline::after {
	content: "";
	position: absolute;
	top: 0;
	width: 1px;
	height: 0.75rem;
	background: var(--ink-300);
}
.bni-gapline::before { left: 0; }
.bni-gapline::after  { right: 0; }
.bni-gapline span {
	position: absolute;
	top: 0.34rem;
	left: 0; right: 0;
	height: 1px;
	background: var(--ink-300);
}

/*
 * Centred on the gap it measures, not pushed against the filled end. The gap
 * box is exactly as wide as the shortfall, so centring here means the figure
 * sits over the middle of the distance it describes.
 *
 * nowrap is kept deliberately: as the bar approaches the goal the gap gets
 * narrower than the text, and centring makes it overflow evenly on both sides
 * rather than sliding off one edge.
 */
.bni-gaptxt {
	margin-top: 0.35rem;
	font-size: 2rem;
	font-weight: 700;
	color: var(--ink-300);
	white-space: nowrap;
	text-align: center;
}

/* ── Counters. Four columns, one hairline rule each, no cards. ────────────── */

.bni-cols {
	flex: 1 1 auto;
	display: grid;
	/* Money sits last in reading order now, so the wide track moves with it. */
	grid-template-columns: 1fr 1fr 1fr 1.75fr;
	gap: 1.6rem;
	margin-top: 2.4rem;
	margin-bottom: 1.2rem;
	min-height: 0;
}

/*
 * Double-Bezel. The outer shell is the tray, the inner core is the plate that
 * sits in it. Concentric radii: 1.75rem outer minus 0.55rem of padding gives
 * 1.2rem inner, so the curves stay parallel instead of fighting each other.
 * This is the difference between a stat on a background and a made object.
 */
.bni-col {
	position: relative;
	padding: 0.5rem;
	border-radius: 1.75rem;
	border: 1px solid rgba(58, 110, 158, 0.45);
	background: rgba(58, 110, 158, 0.10);
	box-shadow: var(--lip);
	min-height: 0;
}

.bni-col-core {
	position: relative;
	height: 100%;
	padding: 1.5rem 1.6rem 1.2rem;
	border-radius: 1.2rem;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border: 2px solid #3A6E9E;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 46%),
		linear-gradient(180deg, #1B3A57 0%, #10263D 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.18),
		var(--elev-1);
}

/* The accent rule reads as light spilling along the top edge of the plate,
   not as a border drawn on top of it. */
.bni-col-core::after {
	content: "";
	position: absolute;
	top: 1.2rem; bottom: 1.2rem; right: 0;
	width: 1px;
	background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.10), transparent);
	pointer-events: none;
}

.bni-col-core::before {
	content: "";
	position: absolute;
	top: 0; right: 0; left: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--field-600) 22%, var(--field-600) 78%, transparent);
}
.bni-col.is-money { border-color: rgba(232, 72, 76, 0.5); background: rgba(232, 72, 76, 0.10); }
.bni-col.is-money .bni-col-core { border-color: #C0453F; }
.bni-col.is-money .bni-col-core::before {
	background: linear-gradient(90deg, transparent, var(--red-lit) 18%, var(--bni-red) 50%, var(--red-lit) 82%, transparent);
	box-shadow: 0 0 1.6rem rgba(232, 72, 76, 0.45);
}

/* The same four drawings, minus the light blue disc they used to sit in. That
   disc was the single strongest admin panel signal on the screen. They are kept
   whole rather than cropped: a half circle reads as a rendering bug, not as a
   design choice, and David asked for these icons specifically. */
.bni-wm {
	position: absolute;
	/* Fully inside the plate. Hanging it off the corner meant the core's
	   overflow:hidden sliced a piece off every icon, which is what made them
	   look broken rather than quiet. */
	bottom: 1.1rem;
	left: 1.3rem;
	width: 7.6rem;
	height: 7.6rem;
	color: #2E5C87;
	opacity: 0.55;
	pointer-events: none;
}
.bni-wm svg { width: 100%; height: 100%; display: block; }

.bni-collbl {
	position: relative;
	font-size: 1.9rem;
	font-weight: 400;
	color: var(--ink-300);
	letter-spacing: 0.14em;
	text-align: center;
}

/* dir="ltr" is needed so the digit grouping and comma order are correct, but it
   also resolves text-align:start to left. Inside an RTL column that pushed every
   number away from its own label, so the alignment is stated explicitly. */
.bni-colnum {
	position: relative;
	margin: auto 0;
	font-size: 6.6rem;
	line-height: 0.92;
	letter-spacing: -0.02em;
	text-align: center;
	will-change: transform;
}
.bni-col.is-money .bni-colnum { font-size: 9.2rem; }

/* Delta chip. Lives for 900ms after a change. */
.bni-delta {
	position: absolute;
	top: 1.2rem;
	left: 0;
	font-size: 2.75rem;
	font-weight: 700;
	color: var(--green);
	pointer-events: none;
	opacity: 0;
}
.bni-delta.on { animation: bni-delta 900ms var(--ease-enter) forwards; }
/* A correction is not an achievement. Same motion, opposite colour. */
.bni-delta.is-down { color: var(--red-lit); }
@keyframes bni-delta {
	0%   { opacity: 0; transform: translateY(0); }
	20%  { opacity: 1; }
	100% { opacity: 0; transform: translateY(-1.5rem); }
}

.bni-col.pulse .bni-colnum { animation: bni-pulse 700ms var(--ease-pop); }
@keyframes bni-pulse {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.06); }
	100% { transform: scale(1); }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.bni-ftr {
	position: relative;
	flex: 0 0 auto;
	height: 4.6rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
/* The credit is centred on the board, not tucked in a corner. It is the one
   piece of Digima on a screen forty people look at every week. */
.bni-ftr .bni-credit {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.bni-credit {
	font-size: 2.3rem;
	font-weight: 700;
	color: var(--ink-300);
	letter-spacing: 0.14em;
	text-decoration: none;
}
.bni-credit:hover { color: var(--ink-300); }

.bni-live { display: flex; align-items: center; gap: 0.6rem; font-size: 1.6rem; color: var(--ink-500); font-weight: 400; }
.bni-live b {
	width: 0.65rem; height: 0.65rem; border-radius: 50%;
	background: var(--green);
	animation: bni-breathe 2.4s ease-in-out infinite;
}
.bni-live.stale b { background: var(--ink-500); animation: none; }

/* An open meeting is data entered and not yet rolled into the annual total.
   Amber rather than green, because it is a state that needs closing. */
.bni-live.is-open { color: var(--gold); }
.bni-live.is-open b {
	background: var(--gold);
	box-shadow: 0 0 1.2rem rgba(228, 183, 90, 0.7);
}

/* ── Celebration. The board quiets down rather than a panel appearing. ────── */

.bni-dim, .bni-keep { transition: opacity 0.6s var(--ease-enter), filter 0.6s var(--ease-enter); }

.bni.party .bni-dim { opacity: 0.12; filter: blur(6px); }
.bni.party .bni-celeb { opacity: 1; pointer-events: auto; }

.bni-celeb {
	position: fixed;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.6s var(--ease-enter);
	z-index: 60;
}

.bni-vig {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at center, transparent 34%, rgba(3, 10, 18, 0.82) 100%);
}

.bni-confetti { position: absolute; inset: 0; width: 100%; height: 100%; }

.bni-badge { position: absolute; left: 0; right: 0; top: 58%; text-align: center; }

.bni-badge-in {
	display: inline-block;
	background: linear-gradient(180deg, var(--gold), #C79A3E);
	color: #2A1D05;
	padding: 1.1rem 3.2rem;
	border-radius: 0.9rem;
	box-shadow: 0 1.5rem 4rem rgba(228, 183, 90, 0.28);
	transform: translateY(1rem);
	opacity: 0;
}
.bni.party .bni-badge-in { animation: bni-badge-in 500ms var(--ease-enter) 400ms forwards; }
@keyframes bni-badge-in { to { transform: translateY(0); opacity: 1; } }

.bni-badge-k { font-size: 2rem; font-weight: 700; letter-spacing: 0.08em; opacity: 0.75; }
.bni-badge-vwrap { display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; }
.bni-badge-cur { font-size: 2.4rem; font-weight: 400; opacity: 0.7; }
.bni-badge-v { font-size: 4.5rem; line-height: 1.05; font-weight: 900; letter-spacing: -0.01em; }

.bni-badge-sub {
	margin-top: 1.1rem;
	font-size: 2.5rem;
	font-weight: 400;
	color: var(--ink-100);
	opacity: 0;
}
.bni.party .bni-badge-sub { animation: bni-badge-in 500ms var(--ease-enter) 620ms forwards; }

.bni.party .bni-hero-num { animation: bni-hero-pop 900ms var(--ease-pop) 400ms; }
@keyframes bni-hero-pop {
	0%   { transform: scale(1); }
	45%  { transform: scale(1.055); }
	100% { transform: scale(1); }
}

/* ── Stats ────────────────────────────────────────────────────────────────── */

.bni-overlay {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(4, 13, 23, 0.72);
	backdrop-filter: blur(28px);
	z-index: 70;
	padding: 4rem;
}
.bni-overlay.on { display: flex; }

.bni-modal {
	width: min(100rem, 100%);
	max-height: 100%;
	background: linear-gradient(180deg, var(--field-800), #071A2C);
	border: 1px solid var(--field-600);
	border-radius: 1.4rem;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 3rem 8rem rgba(0, 0, 0, 0.5);
}

.bni-modal-hd {
	flex: 0 0 auto;
	padding: 1.6rem 2.2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--field-600);
}
.bni-modal-t { margin: 0; font-size: 2.75rem; font-weight: 700; }
.bni-modal-actions { display: flex; align-items: center; gap: 0.8rem; }

.bni-modal-bd {
	padding: 1.6rem 2.2rem 2rem;
	display: grid;
	/* Four entered values on top, four derived ratios beneath. */
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(2, auto);
	gap: 1.6rem 2rem;
	overflow: hidden;
}

.bni-metric { padding: 1.2rem 0; border-top: 1px solid var(--field-600); }
/* The four typed values read first and brightest; the derived row is quieter. */
.bni-metric.is-raw .bni-mv { color: var(--ink-0); }
.bni-metric.is-raw { border-top-color: var(--red-lit); }
.bni-mk { font-size: 1.95rem; font-weight: 400; color: var(--ink-300); letter-spacing: 0.03em; }
.bni-mv {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 3.4rem;
	color: var(--ink-100);
	line-height: 1.05;
	margin-top: 0.2rem;
	font-family: var(--font-fig);
	font-weight: 900;
	font-variant-numeric: tabular-nums;
}
.bni-mv-cur { font-family: var(--font-heb); font-size: 0.5em; font-weight: 400; color: var(--ink-300); }
.bni-metric.is-raw .bni-mv { font-size: 4.6rem; }
.bni-ms { font-size: 1.6rem; font-weight: 400; color: var(--ink-500); margin-top: 0.2rem; }

/* ── Operator surfaces ────────────────────────────────────────────────────── */

.bni-btn {
	font: inherit;
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--ink-100);
	background: var(--field-700);
	border: 1px solid var(--field-600);
	border-radius: 0.6rem;
	padding: 0.7rem 1.2rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.bni-btn:hover { background: var(--field-600); }
.bni-btn.bni-primary { background: var(--bni-red); border-color: var(--bni-red); color: #fff; }
.bni-btn.bni-primary:hover { background: var(--red-lit); }
.bni-btn.bni-danger { background: transparent; border-color: var(--bni-red); color: var(--red-lit); }
.bni-btn.bni-danger:hover { background: rgba(192, 40, 45, 0.15); }
.bni-btn kbd {
	font: inherit;
	font-size: 0.85em;
	opacity: 0.65;
	border: 1px solid currentColor;
	border-radius: 0.25rem;
	padding: 0 0.35em;
}

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.bni-dock {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 50;
	transform: translateY(110%);
	transition: transform 320ms var(--ease-enter);
	padding: 0 6rem 1.4rem;
}
.bni-dock.on { transform: translateY(0); }

/*
 * Operate mode: the dock is a row of the board, not a floating strip that
 * appears on hover. The room sees the controls all the time, and everything
 * above them gives up a little height so the whole board still lands inside
 * one screen. David asked for exactly this after the 16.9.2026 meeting.
 */
.bni-body.is-operate .bni-dock {
	position: static;
	transform: none;
	padding: 0 0 1rem;
	flex: 0 0 auto;
	order: 20;
}
.bni-body.is-operate .bni-ftr { order: 10; height: 3.6rem; }
.bni-body.is-operate .bni-dock-in { padding: 0.7rem 1.2rem; }
.bni-body.is-operate .bni-hero { padding-top: 1rem; }
.bni-body.is-operate .bni-hero-num { font-size: 14rem; }
.bni-body.is-operate .bni-prog { margin-top: 1.2rem; }
.bni-body.is-operate .bni-gapwrap { height: 3.4rem; }
.bni-body.is-operate .bni-cols { margin-top: 1.6rem; margin-bottom: 1rem; }
.bni-body.is-operate .bni-colnum { font-size: 5.8rem; }


.bni-dock-in {
	background: rgba(11, 33, 55, 0.94);
	backdrop-filter: blur(20px);
	border: 1px solid var(--field-600);
	border-radius: 1rem;
	padding: 1rem 1.4rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.4rem;
	flex-wrap: wrap;
}

.bni-dockgrp { display: flex; align-items: center; gap: 0.6rem; }
.bni-dock-lbl { font-size: 1.375rem; font-weight: 700; color: var(--ink-300); margin-left: 0.3rem; }

/* Same treatment as the M and S hints on the buttons, so the whole dock reads
   as one keyboard legend rather than two conventions. */
.bni-dock-key {
	font: inherit;
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--ink-100);
	border: 1px solid var(--field-600);
	border-radius: 0.3rem;
	padding: 0.1rem 0.5rem;
	margin-left: 0.4rem;
	background: rgba(255, 255, 255, 0.05);
}
.bni-dock-tip { font-size: 1.2rem; color: var(--ink-500); }

.bni-mini {
	font: inherit;
	font-size: 1.5rem;
	font-weight: 700;
	width: 2.8rem;
	height: 2.8rem;
	color: var(--ink-0);
	background: var(--field-700);
	border: 1px solid var(--field-600);
	border-radius: 0.5rem;
	cursor: pointer;
	line-height: 1;
}
.bni-mini:hover { background: var(--field-600); }

.bni-cmd {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(4, 13, 23, 0.6);
	backdrop-filter: blur(16px);
	z-index: 80;
}
.bni-cmd.on { display: flex; }

.bni-cmd-box {
	width: min(56rem, 90vw);
	background: var(--field-800);
	border: 1px solid var(--field-600);
	border-radius: 1.2rem;
	padding: 2rem 2.4rem 1.6rem;
	box-shadow: 0 3rem 8rem rgba(0, 0, 0, 0.5);
}
.bni-cmd-lbl { display: block; font-size: 1.75rem; font-weight: 700; color: var(--ink-300); margin-bottom: 0.8rem; }
.bni-cmd-in {
	width: 100%;
	font-size: 6rem;
	line-height: 1.1;
	color: var(--ink-0);
	background: transparent;
	border: none;
	border-bottom: 2px solid var(--field-600);
	padding: 0 0 0.4rem;
	outline: none;
	text-align: left;
}
.bni-cmd-in:focus { border-bottom-color: var(--bni-red); }
.bni-cmd-in::placeholder { color: var(--ink-500); opacity: 0.5; }
.bni-cmd-hint { margin-top: 0.8rem; font-size: 1.375rem; color: var(--ink-500); }
.bni-cmd-note { display: block; margin-top: 0.4rem; color: var(--ink-300); }
.bni-cmd-hint kbd {
	font: inherit; border: 1px solid currentColor; border-radius: 0.25rem; padding: 0 0.35em;
}

.bni-toast {
	position: fixed;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%) translateY(1rem);
	background: var(--field-800);
	border: 1px solid var(--field-600);
	color: var(--ink-100);
	font-size: 1.5rem;
	font-weight: 700;
	padding: 0.8rem 1.6rem;
	border-radius: 0.6rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 240ms, transform 240ms;
	z-index: 90;
}
.bni-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.bni-toast.err { border-color: var(--bni-red); color: var(--red-lit); }

/* ── Reduced motion ───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
	.bni.party .bni-track { outline: 4px solid var(--gold); outline-offset: 4px; }
}
