/*
Theme Name: MPU-Planer
Description: Eigenes, schnelles Theme für mpu-planer.de. Ohne externe Schriften, ohne Tracking.
Version: 1.0.0
Author: Andreas Stroms
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: mpu-planer
*/

/* Layout: Wegweiser. Blaue Schilder-Flächen tragen Orientierung, Signalgelb nur für Handlungen. */
:root {
	--road: #0b4a7e;
	--road-deep: #072f52;
	--signal: #f5b301;
	--signal-deep: #d99a00;
	--paper: #f3f6f9;
	--surface: #ffffff;
	--ink: #13202d;
	--muted: #4c5b6a;
	--line: #d6dee6;
	--tint: #e4edf6;
	--on-road: #ffffff;
	--on-road-muted: #bcd0e3;
	--display: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
	--body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--wrap: 1160px;
	--gutter-l: max(20px, env(safe-area-inset-left, 0px));
	--gutter-r: max(20px, env(safe-area-inset-right, 0px));
	--radius: 10px;
	color-scheme: light;
}

@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("assets/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("assets/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 200 900; font-style: normal; font-display: swap; src: url("assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 200 900; font-style: italic; font-display: swap; src: url("assets/fonts/source-sans-3-latin-wght-italic.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--road); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--road-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: 0.005em; text-wrap: balance; margin: 0; color: var(--ink); }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 6px; }

/* Schild-Etikett über Abschnitten */
.plate { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--road); }
.plate::before { content: ""; width: 18px; height: 4px; background: var(--signal); border-radius: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.01em; padding: 13px 22px; border-radius: 8px; text-decoration: none; border: 2px solid transparent; line-height: 1.1; transition: transform .15s ease, background-color .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-go { background: var(--signal); color: var(--road-deep); }
.btn-go:hover { background: var(--signal-deep); color: var(--road-deep); }
.btn-ghost { border-color: currentColor; color: var(--on-road); }
.btn-ghost:hover { color: var(--on-road); background: rgba(255,255,255,.08); }
.btn .arrow { font-size: 1.2em; line-height: 1; }

/* Kopfzeile */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.01em; line-height: 1; }
.brand-name span { color: var(--road); }
.brand-sub { display: block; font-family: var(--body); font-weight: 500; font-size: 0.8125rem; color: var(--muted); letter-spacing: 0; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav summary { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 6px; cursor: pointer; }
.nav a:hover, .nav summary:hover { background: var(--tint); color: var(--road-deep); }
.nav a[aria-current="page"] { color: var(--road); box-shadow: inset 0 -3px 0 var(--signal); border-radius: 0; }
.nav .nav-cta { background: var(--road); color: var(--on-road); margin-left: 8px; border-radius: 8px; }
.nav .nav-cta:hover { background: var(--road-deep); color: var(--on-road); }
.dropdown { position: relative; }
.dropdown summary { list-style: none; display: flex; align-items: center; gap: 6px; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.dropdown-panel { position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 34px rgba(7,47,82,.14); padding: 8px; display: grid; }
.dropdown-panel a { display: block; padding: 10px 12px; }

.menu-toggle { display: none; }
@media (max-width: 900px) {
	.nav { display: none; }
	.menu-toggle { display: block; }
	.menu-toggle summary { list-style: none; font-family: var(--display); font-weight: 700; font-size: 1.0625rem; border: 2px solid var(--road); color: var(--road); padding: 8px 14px; border-radius: 8px; cursor: pointer; }
	.menu-toggle summary::-webkit-details-marker { display: none; }
	.menu-toggle[open] summary { background: var(--road); color: var(--on-road); }
	.mobile-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(7,47,82,.12); padding: 8px var(--gutter-r) 18px var(--gutter-l); display: grid; }
	.mobile-panel a { font-family: var(--display); font-weight: 600; font-size: 1.1875rem; color: var(--ink); text-decoration: none; padding: 12px 4px; border-bottom: 1px solid var(--line); }
	.mobile-panel .sub { padding-left: 20px; font-size: 1.0625rem; color: var(--muted); }
	.brand-sub { display: none; }
}

/* Startseite: Held */
.hero { background: var(--road); color: var(--on-road); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 10px; background: repeating-linear-gradient(90deg, var(--signal) 0 46px, transparent 46px 74px); opacity: .9; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; padding-block: 72px 84px; }
.hero h1 { color: var(--on-road); font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.02; }
.hero .plate { color: var(--signal); }
.hero .lead { font-size: 1.25rem; line-height: 1.55; color: var(--on-road-muted); max-width: 34em; margin-top: 18px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; font-size: 0.9375rem; color: var(--on-road-muted); }
.hero .facts strong { color: var(--on-road); font-weight: 600; }
.hero-copy { min-width: 0; display: grid; gap: 0; }

/* Streckenplan im Held */
.route { background: var(--surface); color: var(--ink); border-radius: 14px; padding: 26px 26px 22px; box-shadow: 0 24px 50px rgba(0,0,0,.22); border: 3px solid var(--on-road); outline: 2px solid var(--road-deep); outline-offset: -8px; }
.route-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.route-head h2 { font-size: 1.375rem; }
.route-head span { font-size: 0.8125rem; color: var(--muted); }
.route ol { list-style: none; margin: 0; padding: 0; display: grid; }
.route li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 16px; }
.route li:last-child { padding-bottom: 0; }
.route li::before { content: ""; position: absolute; left: 16px; top: 30px; bottom: 0; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 11px); }
.route li:last-child::before { display: none; }
.route .stop { width: 34px; height: 34px; border-radius: 50%; background: var(--road); color: var(--on-road); font-family: var(--display); font-weight: 700; display: grid; place-items: center; font-size: 1rem; }
.route li:last-child .stop { background: var(--signal); color: var(--road-deep); }
.route b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.125rem; line-height: 1.2; padding-top: 5px; }
.route small { display: block; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }
.route a { font-weight: 600; }

/* Abschnitte */
.section { padding-block: 80px; }
.section-head { display: grid; gap: 12px; max-width: 46em; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.1875rem; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

/* Anlass-Schilder */
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.reason { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 10px; align-content: start; text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.reason:hover { border-color: var(--road); color: var(--ink); text-decoration: none; transform: translateY(-2px); }
.reason .value { font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--road); font-variant-numeric: tabular-nums; }
.reason .value small { font-size: 1.1rem; font-weight: 600; color: var(--muted); margin-left: 4px; }
.reason h3 { font-size: 1.4rem; }
.reason p { color: var(--muted); }
.reason .more { font-family: var(--display); font-weight: 700; color: var(--road); margin-top: 6px; }

/* Werkzeuge */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tool { border-radius: 14px; padding: 32px; display: grid; gap: 14px; align-content: start; }
.tool-cost { background: var(--road); color: var(--on-road); }
.tool-cost h3, .tool-cost .value { color: var(--on-road); }
.tool-cost p, .tool-cost li { color: var(--on-road-muted); }
.tool-plan { background: var(--tint); border: 1px solid #c9d9ea; }
.tool h3 { font-size: 1.75rem; }
.tool ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.tool .btn { justify-self: start; margin-top: 8px; }
.tool-plan .btn-go { background: var(--road); color: var(--on-road); }
.tool-plan .btn-go:hover { background: var(--road-deep); color: var(--on-road); }
.tool .example { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tool .example small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.875rem; opacity: .85; }

/* Ablauf in vier Teilen */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.steps li { padding: 26px 24px; display: grid; gap: 8px; align-content: start; border-right: 1px solid var(--line); }
.steps li:last-child { border-right: 0; }
.steps .num { font-family: var(--display); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--road); }
.steps h3 { font-size: 1.3rem; }
.steps p { color: var(--muted); font-size: 1rem; }
.steps-note { margin-top: 18px; color: var(--muted); }

/* Vertrauen */
.trust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.trust ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.trust li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.trust li::before { content: ""; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: var(--road) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.trust li strong { display: block; font-family: var(--display); font-size: 1.2rem; }
.trust li span { color: var(--muted); }
.notice { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 26px; display: grid; gap: 10px; }
.notice h3 { font-size: 1.4rem; }

/* Hilfe-Band */
.help { background: var(--road-deep); color: var(--on-road); }
.help .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding-block: 40px; }
.help p { max-width: 44em; color: var(--on-road-muted); }
.help strong { color: var(--on-road); font-family: var(--display); font-size: 1.35rem; display: block; margin-bottom: 4px; }

/* Inhaltsseiten */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-block: 44px 40px; display: grid; gap: 14px; }
.crumbs { font-size: 0.9375rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); max-width: 22em; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.9375rem; color: var(--muted); }
.meta span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: 1px; }

.page-body .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding-block: 48px 80px; align-items: start; }
.page-body.plain .wrap { grid-template-columns: minmax(0, 1fr); }
.content { min-width: 0; max-width: 46rem; }
.content > * + * { margin-top: 1.1em; }
.content h2 { font-size: 1.85rem; margin-top: 1.9em; padding-top: 0.2em; }
.content h3 { font-size: 1.4rem; margin-top: 1.6em; }
.content ul, .content ol { padding-left: 1.3em; }
.content li + li { margin-top: 0.4em; }
.content li::marker { color: var(--road); font-weight: 700; }
.content strong { font-weight: 650; }
.content em { color: var(--muted); }
.content .wp-block-table { margin-inline: 0; overflow-x: auto; }
.content table { width: 100%; border-collapse: collapse; font-size: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.content th { text-align: left; font-family: var(--display); font-weight: 700; font-size: 1.05rem; background: var(--tint); color: var(--road-deep); }
.content th, .content td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.content tr:last-child td { border-bottom: 0; }
.content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.content .wp-block-button__link { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1.125rem; padding: 13px 22px; border-radius: 8px; background: var(--signal); color: var(--road-deep); text-decoration: none; }
.content .wp-block-button__link:hover { background: var(--signal-deep); color: var(--road-deep); }
.content .wp-block-button + .wp-block-button .wp-block-button__link { background: var(--road); color: var(--on-road); }
.content a.anzeige::after, .content .anzeige { font-size: .8em; }

.side { display: grid; gap: 18px; position: sticky; top: 96px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.side-box h2 { font-size: 1.3rem; }
.side-box a.tool-link { display: grid; gap: 2px; padding: 12px 14px; border-radius: 8px; background: var(--tint); text-decoration: none; color: var(--ink); }
.side-box a.tool-link:hover { background: #d5e3f1; }
.side-box a.tool-link b { font-family: var(--display); font-size: 1.125rem; color: var(--road-deep); }
.side-box a.tool-link span { font-size: 0.9375rem; color: var(--muted); }
.side-box.warn { border: 2px solid var(--ink); }
.side-box p { font-size: 0.9875rem; color: var(--muted); }

/* Rechner aus dem Plugin an das Design anpassen */
.mpur-box { --mpur-c: var(--road); --mpur-c2: var(--tint); --mpur-t: var(--ink); --mpur-m: var(--muted); --mpur-b: var(--line); border-radius: 14px; max-width: none; box-shadow: 0 10px 30px rgba(7,47,82,.08); }
.mpur-box .mpur-h { font-family: var(--display); font-size: 1.7rem; }
.mpur-box .mpur-total { font-family: var(--display); font-size: 2.2rem; }
.mpur-box .mpur-opts label { font-weight: 600; }
.mpur-box .mpur-result { background: var(--tint); }

/* Fußzeile */
.site-footer { background: var(--ink); color: #c5d0db; font-size: 0.9875rem; }
.site-footer a { color: #e8eef4; text-decoration: none; }
.site-footer a:hover { color: var(--signal); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-block: 56px 40px; }
.footer-grid h2 { font-family: var(--display); color: #ffffff; font-size: 1.125rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-brand .brand { color: #ffffff; }
.footer-brand .brand-name span { color: var(--signal); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px; font-size: 0.875rem; color: #9fb0c0; }

@media (max-width: 1000px) {
	.hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 52px 68px; }
	.reasons { grid-template-columns: minmax(0, 1fr); }
	.tools { grid-template-columns: minmax(0, 1fr); }
	.steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.steps li:nth-child(2) { border-right: 0; }
	.steps li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
	.trust { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.page-body .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
	.side { position: static; }
	.footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	body { font-size: 1.03rem; }
	.section { padding-block: 56px; }
	.steps { grid-template-columns: minmax(0, 1fr); }
	.steps li { border-right: 0; border-bottom: 1px solid var(--line); }
	.steps li:last-child { border-bottom: 0; }
	.tool { padding: 24px; }
	.route { padding: 20px 18px 18px; }
	.hero .actions .btn { width: 100%; justify-content: center; }
	.footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
.side-box > a:not(.tool-link) { font-weight: 600; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line); }
.side-box > a:not(.tool-link):last-child { border-bottom: 0; }
.side-box > a:not(.tool-link):hover { text-decoration: underline; }
