/* HFB Tools — calculators.
   Themed to the husforbegyndere "Værksted" identity (graphite + spirit-level
   amber on warm concrete), with literal fallbacks so the calculator still looks
   right on a site that isn't running the child theme.
   Amber is too light to carry white text, so fills use dark ink on amber.
   Design record: docs/dk-husforbegyndere/theme-redesign.md */
.hfb-calc {
	--hfb-accent:     var(--hfb-amber,     #E8A317);
	--hfb-accent-ink: var(--hfb-amber-ink, #8A5E06);
	--hfb-ink:        var(--hfb-ink,       #23262B);
	--hfb-ink-soft:   var(--hfb-ink-soft,  #565A61);
	--hfb-line:       var(--hfb-line,      #DBD6CC);
	--hfb-soft:       var(--hfb-panel2,    #F3F0EA);
	--hfb-mono-stack: var(--hfb-mono, 'SFMono-Regular', ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', 'Consolas', monospace);
	max-width: 640px;
	margin: 1.5em auto;
	padding: 1.5rem 1.5rem 1.25rem;
	border: 1px solid var(--hfb-line);
	border-radius: 12px;
	background: var(--hfb-soft);
	color: var(--hfb-ink);
}
.hfb-calc .hfb-title {
	margin: 0 0 .85rem;
	font-size: 1.15rem;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -.02em;
}
.hfb-calc .hfb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: .85rem;
}
/* field labels read as spec-sheet keys, not sentence text */
.hfb-calc label {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	font-family: var(--hfb-mono-stack);
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hfb-ink-soft);
}
.hfb-calc input {
	width: 100%;
	padding: .6rem .7rem;
	border: 1px solid var(--hfb-line);
	border-radius: 8px;
	background: #fff;
	color: var(--hfb-ink);
	font-family: var(--hfb-mono-stack);
	font-size: 1.05rem;
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}
.hfb-calc input:focus {
	outline: 2px solid var(--hfb-accent);
	outline-offset: 1px;
	border-color: var(--hfb-accent);
}
.hfb-calc .hfb-adv { margin: .8rem 0 0; }
.hfb-calc .hfb-adv summary {
	cursor: pointer;
	font-family: var(--hfb-mono-stack);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--hfb-accent-ink);
	padding: .25rem 0;
}
.hfb-calc .hfb-adv .hfb-grid { margin-top: .6rem; }
/* Result readout. Deliberately NO coloured left-border rail — that stripe is one
   of the most recognisable generic-AI card tells; emphasis comes from the number. */
.hfb-calc .hfb-out {
	margin-top: 1.1rem;
	padding: 1rem 1.1rem;
	border-radius: 8px;
	background: #fff;
	border: 1px solid var(--hfb-line);
}
.hfb-calc .hfb-out p { margin: .15rem 0; font-size: 1.02rem; color: var(--hfb-ink-soft); }
.hfb-calc .hfb-out strong {
	color: var(--hfb-ink);
	font-family: var(--hfb-mono-stack);
	font-size: 1.45rem;
	font-weight: 700;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
}
.hfb-calc .hfb-out .hfb-sub {
	display: block;
	font-family: var(--hfb-mono-stack);
	font-size: .74rem;
	font-weight: 400;
	letter-spacing: .03em;
	color: var(--hfb-ink-soft);
	opacity: 1;
	margin-top: .3rem;
}
.hfb-calc .hfb-note {
	margin: .9rem 0 0;
	font-family: var(--hfb-mono-stack);
	font-size: .7rem;
	letter-spacing: .02em;
	color: var(--hfb-ink-soft);
	line-height: 1.6;
}
.hfb-calc .hfb-cta {
	display: inline-block;
	margin-top: .3rem;
	padding: .6rem 1.1rem;
	border-radius: 8px;
	background: var(--hfb-accent);
	color: #241D0B;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
}
.hfb-calc .hfb-cta:hover { background: #D6970C; color: #241D0B; }
