/* ═══════════════════════════════════════════════════════════════════════════
   BGW Baby Registry Checklist — /tools/baby-registry-checklist/
   ---------------------------------------------------------------------------
   A PLANNING WORKBENCH, not a gamified checklist.

   Deliberately absent (these made it read as a game):
     ✗ XP / levels / progress bars        ✗ emoji stage headers
     ✗ big italic stat-number boxes       ✗ tab + toggle-switch chrome
     ✗ cards-inside-cards

   What it is: a two-pane ledger. A filter rail on the left, a dense sheet of
   items on the right, and one decision per row — keep it or skip it.

   Palette (unchanged, house system)
     page:  cream      card: rgb(43,42,40)   text: rgb(247,242,234) FULL
     accent: rgb(143,179,159)  ·  buy: mint + WHITE text, hover darkens
   ═══════════════════════════════════════════════════════════════════════════ */

.bgw-registry {
	--ink:      #F7F2EA;
	--mint:     rgb(143, 179, 159);
	--mint-dim: rgba(143, 179, 159, .14);
	--line:     rgba(255, 255, 255, .10);
	--line-soft:rgba(255, 255, 255, .06);
	--void:     rgb(43, 42, 40);
	--field:    rgba(255, 255, 255, .055);
	--muted:    rgba(247, 242, 234, .58);
	color: var(--ink);
}

/* ── the one dark surface ───────────────────────────────────────────────── */
.bgw-registry .reg-work {
	background: var(--void);
	border: 1px solid var(--line);
	border-radius: 10px;
	overflow: hidden;
	color: var(--ink);
}

/* ── top bar: search is the point ───────────────────────────────────────── */
.bgw-registry .reg-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--line);
	flex-wrap: wrap;
}
.bgw-registry .reg-search {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 280px;
	min-width: 220px;
	background: var(--field);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 0 12px;
}
.bgw-registry .reg-search:focus-within { border-color: var(--mint); }
.bgw-registry .reg-search svg { flex: 0 0 auto; color: var(--muted); }
.bgw-registry .reg-search input {
	flex: 1;
	background: none;
	border: 0;
	outline: 0;
	color: var(--ink);
	font: inherit;
	font-size: .95rem;
	padding: 11px 0;
	min-width: 0;
}
.bgw-registry .reg-search input::placeholder { color: var(--muted); }
.bgw-registry .reg-search input::-webkit-search-cancel-button { filter: invert(.7); }

.bgw-registry .reg-bar-act { display: flex; gap: 8px; flex-wrap: wrap; }
.bgw-registry .reg-btn {
	appearance: none;
	font: inherit;
	font-size: .82rem;
	font-weight: 600;
	padding: 9px 14px;
	border-radius: 5px;
	border: 1px solid var(--line);
	background: var(--field);
	color: var(--ink);
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}
.bgw-registry .reg-btn:hover { background: var(--mint-dim); border-color: var(--mint); }
.bgw-registry .reg-btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* ── two panes ──────────────────────────────────────────────────────────── */
.bgw-registry .reg-ledger { display: grid; grid-template-columns: 232px 1fr; }

/* ── the rail ───────────────────────────────────────────────────────────── */
.bgw-registry .reg-rail {
	border-right: 1px solid var(--line);
	padding: 18px 0 22px;
}
.bgw-registry .reg-rail h4 {
	margin: 0;
	padding: 14px 18px 7px;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--muted);
}
.bgw-registry .reg-rail h4:first-child { padding-top: 0; }

.bgw-registry .reg-rail button {
	display: flex;
	width: 100%;
	align-items: baseline;
	gap: 8px;
	appearance: none;
	background: none;
	border: 0;
	border-left: 3px solid transparent;
	color: var(--ink);
	font: inherit;
	font-size: .88rem;
	text-align: left;
	padding: 7px 16px 7px 15px;
	cursor: pointer;
	transition: background .12s ease, border-color .12s ease;
}
.bgw-registry .reg-rail button:hover { background: var(--line-soft); }
.bgw-registry .reg-rail button:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
.bgw-registry .reg-rail button b {
	margin-left: auto;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--muted);
}
.bgw-registry .reg-rail button[aria-pressed="true"] {
	background: var(--mint-dim);
	border-left-color: var(--mint);
	font-weight: 700;
}
.bgw-registry .reg-rail button[aria-pressed="true"] b { color: var(--ink); }

/* ── the sheet ──────────────────────────────────────────────────────────── */
.bgw-registry .reg-sheet { min-width: 0; }

.bgw-registry .reg-tally {
	margin: 0;
	padding: 15px 22px;
	border-bottom: 1px solid var(--line);
	font-size: .88rem;
	color: var(--muted);
}
.bgw-registry .reg-tally b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── one row = one decision ─────────────────────────────────────────────── */
.bgw-registry .reg-list { margin: 0; padding: 0; list-style: none; }

.bgw-registry .reg-item {
	display: grid;
	grid-template-columns: 30px 1fr auto;
	gap: 14px;
	align-items: start;
	padding: 14px 22px;
	border-bottom: 1px solid var(--line-soft);
	color: var(--ink);
}
.bgw-registry .reg-item:last-child { border-bottom: 0; }
.bgw-registry .reg-item:hover { background: rgba(255, 255, 255, .035); }
/* hidden must beat display:grid */
.bgw-registry .reg-item[hidden],
.bgw-registry .reg-list[hidden],
.bgw-registry .reg-none[hidden] { display: none; }

/* kept */
.bgw-registry .reg-item[data-state="keep"] { background: var(--mint-dim); }
.bgw-registry .reg-item[data-state="keep"] .reg-name::after {
	content: "on my list";
	margin-left: 9px;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: .63rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mint);
	vertical-align: 2px;
}
/* skipped — visibly set aside, still legible */
.bgw-registry .reg-item[data-state="skip"] { background: transparent; }
.bgw-registry .reg-item[data-state="skip"] .reg-name,
.bgw-registry .reg-item[data-state="skip"] .reg-desc { color: var(--muted); text-decoration: line-through; }
.bgw-registry .reg-item[data-state="skip"] .fit-buy,
.bgw-registry .reg-item[data-state="skip"] .reg-tier { display: none; }

/* the tick */
.bgw-registry .reg-check {
	appearance: none;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	border: 1px solid rgba(255, 255, 255, .34);
	border-radius: 4px;
	background: transparent;
	cursor: pointer;
	position: relative;
	transition: background .12s ease, border-color .12s ease;
}
.bgw-registry .reg-check:hover { border-color: var(--mint); }
.bgw-registry .reg-check:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.bgw-registry .reg-check[aria-checked="true"] { background: var(--mint); border-color: var(--mint); }
.bgw-registry .reg-check[aria-checked="true"]::after {
	content: "";
	position: absolute;
	left: 6px; top: 2px;
	width: 5px; height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* row content */
.bgw-registry .reg-body { min-width: 0; }
.bgw-registry .reg-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin: 0; }
.bgw-registry .reg-name {
	font-size: 1rem;
	font-weight: 600;
	color: var(--ink);
	line-height: 1.35;
}
.bgw-registry .reg-qty {
	font-size: .76rem;
	font-weight: 700;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.bgw-registry .reg-tier {
	margin-left: auto;
	font-size: .84rem;
	font-weight: 700;
	letter-spacing: .07em;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.bgw-registry .reg-desc {
	margin: 4px 0 0;
	font-size: .89rem;
	line-height: 1.55;
	color: var(--ink);
}
.bgw-registry .reg-where {
	margin: 5px 0 0;
	font-size: .74rem;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--muted);
}

/* actions */
.bgw-registry .reg-act {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 7px;
	padding-top: 1px;
}
.bgw-registry .fit-buy {
	display: inline-block;
	font-size: .78rem;
	font-weight: 700;
	padding: 6px 12px;
	border-radius: 4px;
	background: var(--mint);
	color: #fff;
	border: 1px solid var(--mint);
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s ease, border-color .15s ease;
}
.bgw-registry .fit-buy:hover,
.bgw-registry .fit-buy:focus-visible {
	background: rgb(110, 150, 128);
	border-color: rgb(110, 150, 128);
	color: #fff;
	outline: none;
}
.bgw-registry .reg-skip {
	appearance: none;
	background: none;
	border: 0;
	padding: 2px 0;
	font: inherit;
	font-size: .76rem;
	font-weight: 600;
	color: var(--muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	white-space: nowrap;
}
.bgw-registry .reg-skip:hover { color: var(--ink); }
.bgw-registry .reg-skip[aria-pressed="true"] { color: var(--mint); }

/* empty state */
.bgw-registry .reg-none {
	padding: 44px 22px;
	text-align: center;
	color: var(--muted);
	font-size: .93rem;
}

/* ── print: a plain paper list ──────────────────────────────────────────── */
@media print {
	.bgw-registry .reg-bar,
	.bgw-registry .reg-rail,
	.bgw-registry .reg-act,
	.bgw-registry .bgw-noprint { display: none !important; }

	.bgw-registry .reg-work { background: #fff !important; border-color: #ccc !important; }
	.bgw-registry .reg-ledger { grid-template-columns: 1fr; }
	.bgw-registry .reg-item { background: #fff !important; border-color: #ddd !important; }
	.bgw-registry .reg-name, .bgw-registry .reg-desc,
	.bgw-registry .reg-where, .bgw-registry .reg-tier,
	.bgw-registry .reg-tally, .bgw-registry .reg-tally b { color: #000 !important; }
	.bgw-registry .reg-check { border-color: #999 !important; }
	.bgw-registry .reg-check[aria-checked="true"] { background: #444 !important; border-color: #444 !important; }
	.bgw-registry .reg-item { break-inside: avoid; }
}

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
	.bgw-registry .reg-ledger { grid-template-columns: 1fr; }
	.bgw-registry .reg-rail {
		border-right: 0;
		border-bottom: 1px solid var(--line);
		display: flex;
		flex-wrap: wrap;
		gap: 4px;
		padding: 14px;
	}
	.bgw-registry .reg-rail h4 { width: 100%; padding: 8px 4px 2px; }
	.bgw-registry .reg-rail button { width: auto; border-left: 0; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
	.bgw-registry .reg-rail button b { margin-left: 5px; }
	.bgw-registry .reg-rail button[aria-pressed="true"] { border-color: var(--mint); }
}
@media (max-width: 620px) {
	.bgw-registry .reg-item { grid-template-columns: 26px 1fr; }
	.bgw-registry .reg-act { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
	.bgw-registry .reg-tier { margin-left: 0; }
}

/* BGW-CONTRAST-FILL */
/* Brand mint rgb(143,179,159) with white text measures 2.30:1 — fails WCAG AA.
   Anything carrying WHITE text uses this darker green instead: 4.80:1.
   The light mint remains for accents, borders and dark-text fills. */
.bgw-gender .fit-buy,
.bgw-hospital .fit-buy,
.bgw-gender .gq-start,
.bgw-gender .gq-opt.chosen,
.bgw-gender .gq-badge,
.bgw-hospital .hbc-badge.essential,
.bgw-registry .fit-buy,
.bgw-sizechart .fit-buy,
.bgw-duedate .fit-buy,
.bgw-duedate .dd-chip.on,
a.fit-buy,
button.gq-start {
	background: rgb(86, 122, 102) !important;
	border-color: rgb(86, 122, 102) !important;
	color: #fff !important;
}
.bgw-gender .fit-buy:hover,
.bgw-hospital .fit-buy:hover,
.bgw-gender .gq-start:hover,
a.fit-buy:hover,
button.gq-start:hover {
	background: rgb(74, 106, 89) !important;
	border-color: rgb(74, 106, 89) !important;
}
