/* ÖBVP Digitalisierungs-Erhebung — styles taken from the oebvpcms theme (styles.css / responsive.css), not invented.
   Palette: orange #f07d00, blue #5c92aa, text #4f514f, input border #f7c4b1, button #fdf2e5 / hover #ffe6c8, box #edf3f6, row line #edf3f6 */
:root {
  --orange: #f07d00;
  --orange-soft: #fdf2e5;
  --orange-hover: #ffe6c8;
  --input-border: #f7c4b1;
  --blue: #5c92aa;
  --blue-soft: #edf3f6;
  --blue-line: #d6e4ea;
  --text: #4f514f;
  --footer-text: #434343;
  --red: #cc0000;
  --grey-bg: #f6f6f6;
  --grey-line: #e0dddd;
  --font: 'Roboto', Verdana, Helvetica, Sans-Serif;
  --font-cond: 'Roboto Condensed', Helvetica, Arial, Sans-Serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Theme: body 110%/1.4 Roboto — forms on the site use 1rem, and this app is one long form, so 1rem is the base here. */
body { margin: 0; font: 400 1rem/1.4 var(--font); color: var(--text); background: #fff; min-height: 100vh; display: flex; flex-direction: column; }
img { display: block; max-width: 100%; height: auto; border: none; }
a { color: var(--text); text-decoration: underline; }
a:hover, a:active { text-decoration: none; }
main a:not(.btn):not(.tile):not(.card-action):not(.back):not(.seg):not(td.aktion a) { color: var(--orange); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
/* Theme: input, select, textarea { outline: none } — no focus frame on fields */
/* Theme headings: h1 300 orange · h2 Condensed uppercase · h3 Condensed orange */
h1 { font-weight: 300; font-size: 1.75rem; line-height: 1.2em; margin: 0 0 .51em; color: var(--orange); }
h2 { font-family: var(--font-cond); font-weight: 400; font-size: 1.5rem; line-height: 1.4em; text-transform: uppercase; margin: 25px 0 .51em; color: var(--text); }
h3 { font-family: var(--font-cond); font-weight: 400; font-size: 1.4rem; line-height: 1.2em; margin: 25px 0 .51em; color: var(--orange); }
.card > h2:first-child, .card > h3:first-child, .page-head h1, .module-head h1 { margin-top: 0; }
p { margin: 0 0 1em; }
code { font-size: .85em; background: var(--blue-soft); padding: .1em .35em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--orange); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }
.hidden { display: none !important; }
.wrap { width: 100%; max-width: 1266px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; padding-top: 30px; padding-bottom: 40px; }
.muted { color: #7a7c7a; }
.lead { margin-bottom: 1em; }
.u-center { text-align: center; }
.u-mt { margin-top: 1rem; }
.icon { vertical-align: -.2em; flex: none; }

/* Header — white, logo top left, orange 32 px strip at the bottom (theme header:before), menu row below */
.site-header { background: #fff; position: relative; }
.site-header .strip { background: var(--orange); height: 32px; }
.header-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-top: 20px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: flex-end; gap: 16px; text-decoration: none; color: var(--text); }
.brand img { width: 110px; }
.strip-inner { display: flex; align-items: center; justify-content: flex-end; gap: 20px; height: 32px; color: #fff; font-size: .91rem; }
.strip-inner a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.strip-inner a:hover, .strip-link:hover { text-decoration: underline; }
.strip-form { margin: 0; }
.strip-link { background: none; border: 0; padding: 0; color: #fff; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav-toggle { background: none; border: 1px solid var(--input-border); padding: 4px 10px; color: var(--text); cursor: pointer; font: inherit; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.site-nav { display: none; width: 100%; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0 0 10px; display: flex; flex-direction: column; }
.site-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 0; text-decoration: none; color: var(--text); text-transform: uppercase; font-size: 1rem; border-bottom: 1px solid var(--blue-soft); }
.site-nav a:hover { color: var(--orange); }
.site-nav a.is-active { color: var(--orange); }
@media (min-width: 900px) {
  .brand img { width: 140px; }
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; }
  .site-nav ul { flex-direction: row; padding: 0; gap: 30px; }
  .site-nav a { padding: 6px 0 4px; border-bottom: 3px solid transparent; }
  .site-nav a.is-active { border-bottom-color: var(--orange); color: var(--text); }
}

/* Footer — theme: orange, centered, 0.91rem, white links separated by | */
.site-footer { background: var(--orange); padding: 20px 20px 40px; }
.site-footer p { text-align: center; margin: 0; color: var(--footer-text); font-size: .91rem; }
.site-footer a { color: #fff; font-size: .91rem; }
.site-footer .footer-links { margin-top: 6px; }
.site-footer .footer-links .sep { color: #fff; margin: 0 6px; }
.site-footer .footer-note { margin-top: 6px; overflow-wrap: anywhere; }
.site-footer .footer-note span { white-space: normal; }
.site-footer p span { white-space: nowrap; }

/* Messages */
.alert { padding: 8px 12px; margin: 0 0 20px; border: 1px solid transparent; font-size: 1rem; }
.alert-success { background: var(--orange-soft); border-color: var(--orange-hover); color: var(--text); }
.alert-error { background: #fff; border: 2px solid var(--red); color: var(--red); }
.alert-info { background: var(--blue-soft); border-color: var(--blue-line); color: var(--text); }
.badge { display: inline-block; font-size: .8rem; padding: 1px 6px; background: var(--blue-soft); color: var(--blue); vertical-align: middle; }
.badge-warn { background: var(--orange-soft); color: var(--orange); }
.badge-ok { background: var(--blue); color: #fff; }
.notice { font-size: .91rem; background: var(--blue-soft); padding: 10px 12px; margin-top: 30px; }

/* Boxes — theme content boxes are flat with soft orange / blue borders */
.card { background: #fff; border: 1px solid var(--orange-soft); padding: 16px 18px; margin-bottom: 20px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-kicker { display: flex; align-items: center; gap: 6px; font-family: var(--font-cond); text-transform: uppercase; color: var(--orange); margin-bottom: 4px; }
.card-action { display: block; text-decoration: none; color: var(--text); border-left: 4px solid var(--orange); }
.card-action strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.card-action:hover strong { color: var(--orange); }
.card-sub { display: block; font-size: .91rem; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.section-title { margin-top: 30px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 20px; }
.page-head h1 { margin: 0; flex: 1 1 100%; }
.page-head .back { flex-basis: 100%; }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: .91rem; margin-bottom: 8px; }
.kicker { font-family: var(--font-cond); text-transform: uppercase; font-size: .91rem; }

/* Overview hero with ring */
.hero { display: flex; flex-direction: column-reverse; align-items: center; gap: 24px; border: 1px solid var(--orange-soft); padding: 24px 30px; margin-bottom: 20px; text-align: center; }
.hero .lead { margin-bottom: 0; }
@media (min-width: 720px) { .hero { flex-direction: row; text-align: left; } .hero-text { flex: 1; } }
.ring { position: relative; width: 200px; height: 200px; flex: none; margin: 0 10px; }
.seg-ring { display: block; }
.seg { cursor: pointer; }
.seg path { fill: none; stroke-linecap: butt; transition: stroke-width .2s ease; }
.seg-bg { stroke: var(--blue-soft); stroke-width: 14; }
.seg-bg-in { stroke-width: 10; }
.seg-own { stroke: var(--orange); stroke-width: 14; }
.seg-others { stroke: var(--blue); stroke-width: 10; }
.seg:hover .seg-own, .seg:focus-visible .seg-own { stroke-width: 18; }
.seg:hover .seg-bg:not(.seg-bg-in), .seg:focus-visible .seg-bg:not(.seg-bg-in) { stroke-width: 18; }
.seg:focus-visible { outline: none; }
[data-ring-fill] { transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1); }

.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; line-height: 1.15; text-align: center; padding: 0 44px; pointer-events: none; }
.ring-label strong { font-size: 1.5rem; font-weight: 300; color: var(--orange); }
.ring-label span { font-size: .75rem; }
.ring-hover { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(340px, 90vw); background: #fff; border: 1px solid var(--orange-soft); padding: 6px 12px; text-align: center; line-height: 1.3; z-index: 5; pointer-events: none; }
.ring-hover strong { display: block; font-weight: 500; font-size: .95rem; }
.ring-hover span { font-size: .8125rem; }
.ring-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .8125rem; margin: -8px 0 20px; }
.legend-own, .legend-others { display: inline-block; width: 14px; height: 14px; }
.legend-own { background: var(--orange); }
.legend-others { background: var(--blue); }
.mini-ring { flex: none; transform: rotate(-90deg); }
.mr-bg { fill: none; stroke: var(--blue-soft); stroke-width: 6; }
.mr-own { fill: none; stroke: var(--orange); stroke-width: 6; }
.mr-others { fill: none; stroke: var(--blue); stroke-width: 5; }
.tile-progress { display: flex; align-items: center; gap: 10px; }
.tile-progress-text { font-size: .875rem; line-height: 1.25; }
.tile-progress-text small { font-size: .8rem; color: #7a7c7a; }
.tile.is-done .tile-progress-text { color: var(--orange); }

/* Module tiles */
.tiles { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .tiles { grid-template-columns: 1fr 1fr 1fr; } }
.tile { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--orange-soft); border-top: 4px solid var(--blue-soft); padding: 14px 16px; text-decoration: none; color: var(--text); }
a.tile:hover .tile-title { color: var(--orange); }
.tile.is-partial { border-top-color: var(--orange); }
.tile.is-done { border-top-color: var(--orange); }
.tile-head { display: flex; align-items: center; gap: 8px; }
.tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--blue-soft); color: var(--blue); flex: none; }
.tile.is-done .tile-icon { background: var(--orange); color: #fff; }
.tile.is-partial .tile-icon { background: var(--orange-soft); color: var(--orange); }
.tile-num { font-family: var(--font-cond); text-transform: uppercase; font-size: .91rem; }
.tile-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: .8rem; color: var(--orange); }
.tile-title { font-weight: 500; }
.tile-sub { font-size: .8125rem; color: #7a7c7a; }
.tile-social { font-size: .8125rem; }
.tiles-compact .tile { padding: 10px 12px; gap: 6px; }

/* Progress bar (evaluation): own value orange, average blue (theme second colour) */
.bar { position: relative; height: 20px; background: var(--blue-soft); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--orange); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.bar.is-avg .bar-fill { background: var(--blue); }
.bar-text { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 8px; font-size: .8rem; color: var(--text); }

/* Stats (admin) */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { border: 1px solid var(--orange-soft); padding: 12px 14px; display: flex; flex-direction: column; }
.stat strong { font-size: 1.5rem; font-weight: 300; color: var(--orange); }
.stat span { font-size: .8125rem; }

/* Forms — theme: 1 px #f7c4b1 border, orange text, 4 px padding, 2 rem height, no radius; labels 1 rem 500 */
.field { margin-bottom: 12px; }
.label { display: block; font-size: 1rem; font-weight: 500; padding: 0 10px 3px 0; }
.input { width: 100%; font: 1rem/1.2em var(--font); color: var(--orange); border: 1px solid var(--input-border); background: #fff; padding: 4px 8px; height: 2rem; outline: none; border-radius: 0; }
.form-required { color: #ff0000; }
.auth-links { margin-top: 20px; }
textarea.input { height: auto; min-height: 100px; resize: vertical; padding: 6px 8px; }
select.input { padding: 4px; }
.input-row { display: flex; align-items: center; gap: 8px; }
.input-num { max-width: 120px; }
.input-other { margin-top: 6px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.inline-form .label { margin: 0; padding: 0; }
.inline-form .input { width: auto; min-width: 160px; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; }
.copy-row .input { font-size: .85rem; }

/* Buttons — theme: no radius, 4 px 20 px, #fdf2e5 with orange text; hover #ffe6c8; strong action orange with white text */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 1rem/21px var(--font); padding: 4px 20px; min-height: 29px; border: 1px solid var(--orange-soft); background: var(--orange-soft); color: var(--orange); cursor: pointer; text-decoration: none; border-radius: 0; }
.btn:hover { background: var(--orange-hover); border-color: var(--orange-hover); text-decoration: none; }
.btn-primary { background: var(--orange-soft); border-color: var(--orange-soft); color: var(--orange); }
.btn-primary:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-secondary { background: var(--orange-soft); border-color: var(--orange-soft); color: var(--orange); }
.btn-ghost { background: var(--blue-soft); border-color: var(--blue-soft); color: var(--blue); padding: 4px 10px; }
.btn-ghost:hover { background: var(--blue-line); border-color: var(--blue-line); }
.btn-danger { color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { font-size: .91rem; padding: 3px 10px; min-height: 26px; }
button.link, .link { background: none; border: 0; padding: 0; font: inherit; color: var(--orange); text-decoration: underline; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }

/* Auth pages */
.page-auth main.wrap { display: flex; align-items: flex-start; justify-content: center; }
.auth-card { border: 1px solid var(--orange-soft); padding: 24px; width: 100%; max-width: 440px; text-align: center; }
.auth-card-wide { max-width: 640px; text-align: left; }
.auth-card form { text-align: left; }
.auth-logo { width: 110px; margin: 0 auto 12px; }
.auth-note { font-size: .8125rem; margin-top: 16px; }

/* Questions — one bordered box per question, orange left edge once answered */
.q { position: relative; border: 1px solid var(--orange-soft); border-left: 4px solid var(--orange-soft); padding: 14px 16px; margin: 0 0 16px; min-width: 0; }
.q.is-answered { border-left-color: var(--orange); }
.q-label { font-weight: 500; font-size: 1rem; padding: 0; margin-bottom: 4px; display: flex; gap: 8px; align-items: flex-start; width: 100%; }
.q-label-text { flex: 1; }
.q-num { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; background: var(--blue-soft); color: var(--blue); font-size: .8rem; font-family: var(--font-cond); }
.q.is-answered .q-num { background: var(--orange); color: #fff; }
.q-help { font-size: .8125rem; margin: 0 0 8px; padding-top: 2px; }
.q-body { margin-top: 6px; transition: opacity .15s ease; }
.q-body.is-muted { opacity: .4; pointer-events: none; }
/* Follow-up questions: indented, marked with a corner arrow; the parent announces them */
.q.is-followup { margin-left: 20px; border-left-color: var(--orange); }
.q-followup-icon { flex: none; color: var(--orange); margin-top: 4px; }
.q-optional { font-weight: 400; color: #7a7c7a; }
.q-section { margin: 30px 0 16px; }
.q-section h2 { margin-top: 0; }
/* Matrix: one row per item, the choices next to it (below it on narrow screens) */
.matrix-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; padding: 6px 0; border-bottom: 1px solid var(--blue-soft); }
.matrix-row:last-child { border-bottom: 0; }
.matrix-label { padding-top: 6px; }
.matrix-extra-title { margin: 14px 0 0; font-weight: 500; }
.matrix-extra .row-remove { justify-self: start; }
.matrix + .matrix-extra-title + .rows + .btn { margin-top: 8px; }
@media (min-width: 720px) { .matrix-row { grid-template-columns: minmax(180px, 1fr) auto; align-items: center; } .matrix-label { padding-top: 0; } }
.q-followup-hint { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .8125rem; color: #7a7c7a; }
@media (max-width: 559px) { .q.is-followup { margin-left: 10px; } }
.q-extras { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--blue-soft); display: flex; flex-wrap: wrap; gap: 4px 20px; }
.q-state { flex: none; min-width: 22px; min-height: 22px; font-size: .8rem; font-weight: 400; color: var(--red); display: inline-flex; align-items: center; }
.q-state.is-error { flex-basis: 100%; }
.nd-reason { flex-basis: 100%; display: grid; gap: 6px; margin-top: 4px; }

/* Radio / checkbox rows — theme label.option 400, native controls */
.choices { display: flex; flex-direction: column; }
.choices-inline { flex-direction: row; flex-wrap: wrap; gap: 0 20px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-weight: 400; cursor: pointer; min-height: 38px; border-bottom: 1px solid var(--blue-soft); }
.choices-inline .choice, .q-extras .choice { border-bottom: 0; }
.choice:last-child { border-bottom: 0; }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--orange); flex: none; }
.choice:has(input:checked) span { color: var(--orange); }
.choice-extra { font-size: .91rem; min-height: 32px; padding: 4px 0; border-bottom: 0; }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
@media (min-width: 560px) { .scale { grid-template-columns: repeat(10, 1fr); } }
.scale-item { position: relative; }
.scale-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale-item span { display: flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid var(--input-border); background: #fff; color: var(--orange); cursor: pointer; }
.scale-item span:hover { background: var(--orange-soft); }
.scale-item input:checked + span { background: var(--orange); border-color: var(--orange); color: #fff; }
.scale-item input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.scale-legend { display: flex; justify-content: space-between; font-size: .8125rem; margin-top: 4px; }

.rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.row-card { border: 1px solid var(--blue-soft); padding: 10px 12px; background: var(--grey-bg); display: grid; gap: 8px; }
@media (min-width: 720px) { .row-card { grid-template-columns: 1fr 1fr; } .row-card .row-remove { grid-column: 1 / -1; justify-self: end; } }
.row-field { min-width: 0; }
.row-label { display: block; font-size: .8125rem; margin-bottom: 2px; }
.row-remove { justify-self: end; }

.module-head { margin-bottom: 24px; }
.module-head .kicker { display: block; margin-bottom: 0; line-height: 1.2; }
.module-head h1 { margin: 0; }
.module-title { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.module-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex: none; background: var(--blue-soft); color: var(--blue); }
.module-title h1 { margin: 0; }
.module-actions { display: flex; align-items: center; gap: 20px; min-height: 1.5rem; margin: 4px 0 20px; }
.save-state { font-size: .91rem; }
.module-finish p { margin-bottom: 12px; }
.module-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Result profile */
.profile-item { padding: 12px 0; border-top: 1px solid var(--blue-soft); }
.profile-item:first-of-type { border-top: 0; }
.profile-q { font-weight: 500; margin-bottom: 8px; }
.profile-row { display: grid; grid-template-columns: 1fr; gap: 4px; margin-bottom: 6px; }
@media (min-width: 640px) { .profile-row { grid-template-columns: 200px 1fr; align-items: center; } }
.profile-key { font-size: .8125rem; }

/* Tables — theme php-page tables: th blue with white text, rows separated by #edf3f6 */
.table-wrap { overflow-x: auto; margin-bottom: 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45em; }
.table th { background: var(--blue); color: #fff; font-weight: normal; padding: 5px 10px; border-right: 1px solid #fff; text-align: left; vertical-align: top; }
.table th:last-child { border-right: none; }
.table td { padding: 5px 10px; vertical-align: top; }
.table tr { border-bottom: 1px solid var(--blue-soft); }
@media (max-width: 719px) {
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: 8px 0; }
  .table-stack td { display: block; padding: 2px 0; }
  .table-stack td[data-label]:not([data-label=""])::before { content: attr(data-label) ": "; font-size: .8125rem; }
}
.account-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--blue-soft); }
.account-row.is-inactive { opacity: .6; }
.account-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.account-actions form { margin: 0; }
.pagination { display: flex; align-items: center; gap: 12px; }

/* Answers / evaluation (admin) */
.answers { margin: 0; }
.answer { padding: 8px 0; border-top: 1px solid var(--blue-soft); }
.answer.is-empty dt { font-weight: 400; }
.answer dt { font-weight: 500; }
.answer dd { margin: 2px 0 0; }
.answer-meta { display: block; font-size: .8rem; margin-top: 2px; }
.answer-rows { margin: 0; padding-left: 18px; }
.agg { padding: 12px 0; border-top: 1px solid var(--blue-soft); }
.agg-q { margin-bottom: 6px; }
.agg-bars { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 4px; }
.agg-bars li { display: grid; grid-template-columns: 1fr; gap: 2px; }
@media (min-width: 640px) { .agg-bars li { grid-template-columns: minmax(160px, 40%) 1fr; align-items: center; } }
.agg-label { font-size: .91rem; }
.agg-texts { margin: 4px 0 0; padding-left: 18px; }
.agg-texts li { margin-bottom: 4px; }
.catalog li { margin-bottom: 8px; }

/* Text pages */
.prose { max-width: 780px; }
.prose ul { padding-left: 18px; }

/* Table actions — theme pattern (#rechnungslegung td.aktion a): light blue block links, stacked, no icons */
.table td.aktion { width: 1%; white-space: nowrap; }
main .table td.aktion a { display: block; background: var(--blue-soft); border: 1px solid var(--blue-soft); color: var(--blue); padding: 4px 7px; text-align: center; text-decoration: none; margin-bottom: 5px; }
.table td.aktion a:last-child { margin-bottom: 0; }
main .table td.aktion a:hover { background: var(--blue-line); border-color: var(--blue-line); color: var(--blue); }
@media (max-width: 719px) { .table-stack td.aktion { display: flex; gap: 6px; } .table-stack td.aktion a { margin: 0; flex: 1; } }

.hero-admin { margin-top: 0; }
.hero-admin .ring-legend { margin: 0 0 8px; }

/* Motion: one-off, on load or on achievement; off for prefers-reduced-motion */
@keyframes tile-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes pulse-seg { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes pulse-tile { 0% { box-shadow: 0 0 0 0 rgba(240,125,0,.55); } 100% { box-shadow: 0 0 0 14px rgba(240,125,0,0); } }
@keyframes check-in { 0% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; transform: scale(1.1); } 40% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
.js-motion .tiles .tile { animation: tile-in .45s cubic-bezier(.2,.8,.2,1) both; }
.q-num.is-bump { animation: bump .5s ease; }
.seg.is-just-done .seg-own { animation: pulse-seg .5s ease 2; animation-delay: 1.6s; }
.js-motion .tile.is-just-done { animation: tile-in .45s cubic-bezier(.2,.8,.2,1) both, pulse-tile 1s ease 1.2s 1; }
.q-state .save-check { display: inline-flex; color: var(--orange); animation: check-in 1.8s ease forwards; }
@media (prefers-reduced-motion: reduce) {
  .js-motion .tiles .tile, .q-num.is-bump, .seg.is-just-done .seg-own, .js-motion .tile.is-just-done, .q-state .save-check { animation: none; }
  .bar-fill, [data-ring-fill] { transition: none; }
}

.mr-own { transition: stroke-dashoffset .7s cubic-bezier(.2,.8,.2,1); }

.hero-module { margin-top: 8px; }
.hero-module .lead { margin: 0 0 8px; }
.module-ring .tile-social { max-width: 180px; }
.module-ring { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; margin: 0 10px; text-align: center; }
.module-ring .mini-ring { width: 120px; height: 120px; }
.module-ring .tile-progress-text { font-size: 1rem; }

/* Theme: option:hover/focus/active/checked grey with orange text; option list itself plain */
option { color: var(--orange); background: transparent; }
option:hover, option:focus, option:active, option:checked { background-color: var(--grey-line); color: var(--orange); }
.card-half { max-width: 520px; }
.stack { display: flex; flex-direction: column; gap: 8px; }

.module-finish.is-just-done { animation: pulse-tile 1s ease 1; }

/* Sticky module bar: slides in from the top once the site header (logo) is out of view */
.sticky-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: #fff; border-bottom: 3px solid var(--orange); transform: translateY(-100%); transition: transform .25s ease; }
.sticky-bar.is-shown { transform: none; }
.sticky-inner { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
.sticky-logo img { width: 48px; height: auto; }
.sticky-title { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-title .kicker { margin-right: 6px; }
.sticky-progress { display: flex; align-items: center; gap: 8px; flex: none; }
.sticky-progress .mini-ring { width: 36px; height: 36px; }
.sticky-progress .tile-progress-text { font-size: .8125rem; white-space: nowrap; }
.sticky-link { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--orange); text-decoration: none; flex: none; }
.sticky-link:hover { color: var(--text); }
@media (max-width: 559px) { .sticky-title { display: none; } .sticky-progress .tile-progress-text { font-size: .75rem; } }
@media (prefers-reduced-motion: reduce) { .sticky-bar { transition: none; } }
