/* ==========================================================================
   Einbruchschutz-Förderung (/ratgeber/einbruchschutz-foerderung/) — page layout only.
   Tokens from theme.css only: no colour literals, no new font sizes, no !important.
   Prefix .fo-
   ========================================================================== */

/* 1 · hero — text left, octagon-cut photo right ------------------------- */
.fo-hero .hero__title { max-width: none; }
.fo-hero .hero__inner { display: grid; gap: var(--sp-7); align-items: center; }
.fo-hero__figure { width: 100%; max-width: 23rem; justify-self: center; }
.fo-hero__figure .frame { --ratio: 16 / 10; --cut: 14%; }
@media (min-width: 60em) {
	.fo-hero .hero__inner { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: var(--sp-8); }
	.fo-hero__figure { justify-self: end; }
	.fo-hero__figure .frame { --ratio: 4 / 5; }
}

/* 1b · jump bar — static (a sticky bar would be clipped by its own section) */
.fo-toc .toc-bar { position: static; }

/* 2 · short answer — split + dark status board ------------------------- */
.fo-answer__split { align-items: start; }
.fo-status {
	display: grid; gap: var(--sp-5); padding: var(--sp-6) var(--sp-5);
	background: var(--ink-900); background-image: var(--grad-spot); color: var(--c-fg);
	border: 1px solid var(--ink-700); border-radius: var(--r-lg); box-shadow: var(--sh-lg);
}
.fo-status__title { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.2; color: var(--c-heading); }
.fo-status__list { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.fo-status__row {
	display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-4); align-items: center;
	padding: var(--sp-4); background: var(--ink-850); border: 1px solid var(--ink-700); border-left: 6px solid var(--st, var(--ink-600)); border-radius: var(--r-md);
}
.fo-status__row p { color: var(--c-fg); }
.fo-status__row strong { display: block; color: var(--c-heading); font-size: var(--fs-md); }
.fo-status__badge { display: grid; place-items: center; width: 3rem; height: 3rem; background: var(--st, var(--violet-500)); color: var(--white); }
.fo-status__row--ended { --st: var(--danger-band); }
.fo-status__row--paused { --st: var(--warn); }
.fo-status__row--paused .fo-status__badge { color: var(--ink-950); }
.fo-status__row--open { --st: var(--violet-500); }
.fo-answer__notice { margin-top: var(--sp-5); }
@media (min-width: 60em) { .fo-status { position: sticky; top: calc(var(--header-h) + var(--sp-5)); } }

/* 3 · programmes — table + status-coloured dossier cards ---------------- */
.fo-prog .section-head--split { align-items: start; }
.fo-prog__table .tag-label { white-space: nowrap; }
.fo-prog__table .compare__table td, .fo-prog__table .compare__table th { min-width: 0; }
/* phones: the table becomes stacked cards (no sideways scrolling needed) */
@media (max-width: 47.99em) {
	.fo-prog__table { overflow: visible; border: 0; background: transparent; }
	.fo-prog__table .compare__table { min-width: 0; display: block; }
	.fo-prog__table .compare__table caption { display: block; padding-inline: 0; }
	.fo-prog__table .compare__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
	.fo-prog__table .compare__table tbody { display: grid; gap: var(--sp-3); }
	.fo-prog__table .compare__table tr { display: grid; gap: var(--sp-2); padding: var(--sp-4); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); }
	.fo-prog__table .compare__table th, .fo-prog__table .compare__table td { display: block; padding: 0; border: 0; background: transparent; position: static; }
	.fo-prog__table .compare__table tbody th { font-size: var(--fs-md); }
	.fo-prog__table .compare__table td::before { content: attr(data-label); display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-muted); }
	.fo-prog .compare-hint { display: none; }
}
.fo-dossiers { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
.fo-dossier {
	--st: var(--c-line-strong); --st-text: var(--c-heading);
	display: grid; gap: var(--sp-3); align-content: start; padding: var(--sp-5);
	background: var(--c-surface); border: 1px solid var(--c-line); border-top: 6px solid var(--st); border-radius: var(--r-lg);
	transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.fo-dossier:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.fo-dossier--ended { --st: var(--danger); --st-text: var(--danger-text); }
.fo-dossier--paused { --st: var(--warn); --st-text: var(--warn-text); }
.fo-dossier--open { --st: var(--violet-500); --st-text: var(--violet-700); }
.fo-dossier__state {
	display: inline-flex; align-items: center; gap: 0.5em; font-size: var(--fs-xs); font-weight: 700;
	letter-spacing: 0.14em; text-transform: uppercase; color: var(--st-text);
}
.fo-dossier__title { font-size: var(--fs-md); color: var(--c-heading); }
.fo-dossier p:not([class]) { color: var(--c-fg); }
@media (min-width: 64em) { .fo-dossiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 4 · measures — wide horizontal photo cards + "which door" panel ------- */
.fo-mass .section-head--split { align-items: start; }
.fo-cards { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
.fo-card .svc-card__badge { top: var(--sp-4); bottom: auto; }
.fo-card .svc-card__title { align-items: flex-start; }
.fo-mass .svc-card__text a { text-decoration: underline; text-underline-offset: 0.2em; }
@media (min-width: 48em) {
	.fo-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
	.fo-card--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
	.fo-card--reverse .svc-card__media { order: 2; }
	.fo-card .svc-card__media { aspect-ratio: auto; min-height: 100%; }
	.fo-card .svc-card__media > img, .fo-card .svc-card__media > .img-placeholder { position: absolute; inset: 0; }
	.fo-card .svc-card__body { justify-content: center; padding: var(--sp-6); }
}
.fo-which {
	display: grid; gap: var(--sp-6); align-items: center; margin-top: var(--sp-8); padding: var(--sp-5);
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
}
.fo-which__plan { padding: var(--sp-5); background: var(--ink-900); border-radius: var(--r-lg); color: var(--on-dark-muted); max-width: 22rem; width: 100%; justify-self: center; }
.fo-which__caption { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--on-dark-muted); }
.fo-which__body { display: grid; gap: var(--sp-4); min-width: 0; }
.fo-which__title { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.15; color: var(--c-heading); }
.fo-which__title strong { font-weight: 400; }
.fo-which__body a { text-decoration: underline; text-underline-offset: 0.2em; }
@media (min-width: 60em) { .fo-which { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); padding: var(--sp-6); gap: var(--sp-7); } }

/* 5 · application order — sticky intro + vertical key-blade timeline ---- */
.fo-antrag__grid { display: grid; gap: var(--sp-7); }
.fo-antrag__steps { max-width: none; }
.fo-order { counter-reset: fo-order; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); padding: 0; list-style: none; }
.fo-order li {
	counter-increment: fo-order; display: inline-flex; align-items: center; gap: 0.55em; padding: 0.3em 1em 0.3em 0.35em;
	background: var(--c-surface); border: 1px solid var(--c-line-strong); border-radius: var(--r-pill);
	font-size: var(--fs-sm); font-weight: 600; color: var(--c-heading);
}
.fo-order li::before {
	content: counter(fo-order); display: grid; place-items: center; width: 1.75rem; height: 1.75rem; clip-path: var(--oct);
	background: var(--violet-500); color: var(--white); font-size: var(--fs-xs); font-weight: 700;
}
@media (min-width: 64em) {
	.fo-antrag__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--sp-9); align-items: start; }
	.fo-antrag__intro { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
}

/* 6 · Berlin funding + plaque card -------------------------------------- */
.fo-plakette__grid { display: grid; gap: var(--sp-8); align-items: start; }
.fo-plaque {
	position: relative; display: grid; gap: var(--sp-4); padding: var(--sp-7) var(--sp-5) var(--sp-5);
	background: var(--white); border: 1px solid var(--c-line); border-top: 6px solid var(--violet-500); border-radius: var(--r-lg); box-shadow: var(--sh-md);
}
.fo-plaque__seal {
	position: absolute; top: calc(var(--sp-6) * -1); right: var(--sp-5); display: grid; place-items: center; width: 4.5rem; height: 4.5rem;
	background: var(--violet-500); color: var(--white); box-shadow: var(--sh-md);
}
.fo-plaque__seal .i { width: 2rem; height: 2rem; }
.fo-plaque__title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-lg); line-height: 1.2; color: var(--c-heading); padding-right: var(--sp-8); }
.fo-plaque__steps { max-width: none; margin-block: var(--sp-2); }
.fo-plaque__steps .step { padding-bottom: var(--sp-5); }
.fo-plaque__steps .step__num { width: 2.75rem; height: 2.75rem; font-size: var(--fs-md); }
.fo-plaque__steps .step::after { left: calc(1.375rem - 2px); top: 3rem; }
.fo-plaque__steps .step__body { padding-top: 0.45rem; }
.fo-plaque__note { padding-top: var(--sp-4); border-top: 1px dashed var(--c-line-strong); color: var(--c-muted); }
@media (min-width: 64em) { .fo-plakette__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--sp-7); } }

/* 7 · plan with us — route cards, ready list, call strip ---------------- */
.fo-routes { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
.fo-route {
	display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-4); align-items: start; padding: var(--sp-5);
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
	transition: border-color var(--dur-base), transform var(--dur-base) var(--ease), box-shadow var(--dur-base);
}
.fo-route:hover { border-color: var(--violet-500); transform: translateY(-3px); box-shadow: var(--sh-md); }
.fo-route__icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; background: var(--c-surface-2); color: var(--c-accent); }
.fo-route p { color: var(--c-fg); }
.fo-route a { font-weight: 700; }
.fo-ready { --stack: var(--sp-4); }
.fo-ready__lead { font-size: var(--fs-md); font-weight: 700; color: var(--c-heading); }
.fo-ready .icon-list__title { font-weight: 600; }
@media (min-width: 48em) { .fo-ready .icon-list--2col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fo-after { --stack: var(--sp-3); }
.fo-after p { max-width: 70ch; }
.fo-after__note { display: flex; gap: 0.6em; align-items: flex-start; color: var(--c-muted); font-size: var(--fs-sm); }
.fo-after__note .i { flex: none; margin-top: 0.3em; color: var(--c-accent); }
@media (min-width: 48em) { .fo-routes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* narrow phones (320): badge above the text so "Barrierereduzierung" is not split mid-word */
@media (max-width: 30em) {
	.fo-status__row { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
	.fo-status__row p { hyphens: auto; }
}
