body { color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- App-Rahmen: Seitenleiste + Inhalt ---------- */
.app { --gut: clamp(20px, 4vw, 48px); display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.app-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; padding: 22px 14px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.app-brand, .home-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; letter-spacing: -.9px; color: var(--violett); }
.app-brand { padding: 4px 10px 22px; }
.app-brand > span, .home-brand > span { display: grid; place-items: center; width: 34px; height: 34px; background: var(--violett); color: var(--mint); font-size: 22px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 9px)); padding-bottom: 3px; }
.app-nav { display: grid; gap: 2px; align-content: start; flex: 1; }
.app-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 0; font-size: 14px; color: var(--ink-muted); transition: background .15s, color .15s; }
.app-nav a:hover { background: #4513af0d; color: var(--violett-dark); }
.app-nav a[aria-current] { background: var(--mint-light); color: var(--violett); font-weight: 700; box-shadow: inset 3px 0 0 var(--violett); }
.app-ico { flex: none; opacity: .85; }
.app-nav-label { margin: 22px 12px 6px; font-size: 12px; font-weight: 700; color: #7a6c92; }
.app-user { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; padding: 14px 8px 4px; border-top: 1px solid var(--line); font-size: 13px; }
.app-avatar { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 0; background: var(--mint-light); color: var(--violett); font-weight: 700; border: 1px solid var(--mint); }
.app-user-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user button { justify-self: start; font-size: 12px; color: var(--ink-muted); }
.app-user button:hover { color: var(--violett); text-decoration: underline; }
.app-body { min-width: 0; display: flex; flex-direction: column; }
.app-topbar { display: flex; align-items: flex-end; gap: 16px; min-height: 52px; padding: 0 max(var(--gut), calc((100% - 1080px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.app-burger { display: none; margin: 0 0 8px -6px; padding: 6px; border-radius: 0; align-self: center; }
.app-topbar-empty { display: none; }
.app-body > .home-main, .app-body > .home-footer { width: min(1080px, calc(100% - 2 * var(--gut))); margin-inline: auto; }

/* Seiten fuer Nicht-Angemeldete (Formular, Kongress) behalten den schlanken Rahmen */
.home-shell { width: min(1160px, calc(100% - 64px)); margin: auto; }
.home-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px 0; }
.home-account { display: flex; align-items: center; gap: 24px; font-size: 13px; }
.home-account > span { font-weight: 600; overflow-wrap: anywhere; }
.home-account button { color: var(--ink-muted); white-space: nowrap; }
.home-account button:hover { color: var(--violett); }

/* ---------- Inhalt ---------- */
.home-nav { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.home-nav a { padding: 17px 0 14px; font-size: 14px; white-space: nowrap; color: var(--ink-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.home-nav a[aria-current] { color: var(--violett); border-color: var(--violett); font-weight: 700; }
.home-nav a:hover { color: var(--violett); }
.home-main { padding: 36px 0 56px; flex: 1; }
.home-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.home-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 0; background: var(--coral); }
.home-title { font-family: var(--font-serif); font-size: clamp(26px, 3.2vw, 34px); line-height: 1.2; font-weight: 500; letter-spacing: -.8px; margin: 10px 0 10px; overflow-wrap: anywhere; color: var(--ink); }
.home-intro { color: var(--ink-muted); line-height: 1.7; max-width: 660px; font-size: 15px; }
.home-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 20px; margin-top: 28px; }
.home-card { border: 1px solid var(--line); border-radius: 0; padding: 24px; background: var(--surface); }
.home-card.mint { background: var(--mint-light); border-color: #94f8d27a; }
.home-card h2 { font-family: var(--font-serif); font-size: 19px; line-height: 1.35; font-weight: 500; letter-spacing: -.3px; margin: 10px 0 8px; }
.home-card p { color: var(--ink-muted); font-size: 14px; line-height: 1.7; }
.home-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; margin-top: 20px; border-radius: 0; background: var(--violett); color: var(--surface); font-size: 14px; font-weight: 700; transition: background .15s; }
.home-button:hover { background: var(--violett-dark); }
.home-progress { width: 100%; height: 6px; accent-color: var(--violett); margin: 16px 0 10px; border: 0; border-radius: 0; overflow: hidden; }
.home-progress::-webkit-progress-bar { background: var(--mint-light); }
.home-progress::-webkit-progress-value { background: var(--violett); }
.home-progress::-moz-progress-bar { background: var(--violett); }
.home-checklist { list-style: none; padding: 0; margin: 18px 0 0; }
.home-checklist li { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding: 11px 0; font-size: 13px; }
.home-checklist span { color: var(--ink-muted); font-size: 12px; }
.home-section-title { font-size: 16px; font-weight: 700; margin: 32px 0 14px; }
.home-areas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.home-area { display: block; transition: background .15s; }
.home-badge, .text-highlight { display: inline-block; font-size: 11px; font-weight: 700; color: var(--violett-dark); background: var(--mint-light); border: 1px solid #94f8d2; padding: 2px 9px; border-radius: 0; }
.home-card .home-text-link { display: inline-block; font-size: 13px; font-weight: 700; margin-top: 18px; color: var(--violett); }
.home-card .home-text-link:hover { text-decoration: underline; }
.home-footer { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0 28px; font-size: 12px; color: #7a6c92; }
.home-footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.home-footer-nav a:hover { color: var(--violett); text-decoration: underline; }
.home-profile { max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: 0; padding: 28px; }
.home-empty { margin-top: 26px; max-width: 760px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--violett-light); outline-offset: 3px; border-radius: 0; }
.skip-link { position: absolute; top: -100px; padding: 12px; background: var(--surface); z-index: 100; }
.skip-link:focus { top: 8px; }
.home-areas.hub-areas a, .home-area h2 { color: var(--ink); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .app-side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 24px #320c832a; }
  .nav-open .app-side { transform: none; }
  .nav-open::after { content: ''; position: fixed; inset: 0; background: #320c8355; z-index: 20; }
  .app-burger { display: inline-flex; }
  .app-topbar-empty { display: flex; min-height: 52px; }
}
@media (max-width: 760px) { .home-shell { width: calc(100% - 40px); } .home-header { padding: 22px 0; align-items: flex-start; } .home-account { flex-direction: column; align-items: flex-end; gap: 7px; max-width: 60%; } .home-grid, .home-areas { grid-template-columns: 1fr; } .home-card, .home-profile { padding: 20px; } .home-main { padding-top: 26px; } }

/* ---------- Verwaltung: Tabellen, Formulare ---------- */
.admin-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1rem 0; }
.admin-table-wrap { overflow-x: auto; padding: 0; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #e1fdf24d; }
.admin-table th { font-size: 12px; font-weight: 700; color: var(--ink-muted); background: #E2F7EE; }
.admin-table a { color: var(--violett); font-weight: 700; }
.admin-table a:hover { text-decoration: underline; }
.admin-form { max-width: 650px; display: grid; gap: 1rem; }
.admin-form label { display: grid; gap: .4rem; }
.admin-form input:not([type=checkbox]), .admin-form textarea, .admin-form select { width: 100%; padding: .7rem; border: 1px solid #320c8338; border-radius: 0; background: var(--surface); font: inherit; }
.admin-definition { display: grid; gap: 1rem; }
.admin-definition dt { font-weight: 600; }
.admin-definition dd { margin: .3rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.hub-areas { margin-top: 32px; grid-template-columns: repeat(3, 1fr); }
.congress-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin: 28px 0; }
.congress-filters label { display: grid; gap: 8px; font-size: 14px; flex: 1; min-width: 150px; }
.congress-filters select { padding: 11px; border: 1px solid #320c8338; border-radius: 0; background: var(--surface); font: inherit; }
.congress-filters .home-button { margin: 0; }
.congress-session { display: grid; grid-template-columns: 90px 1fr auto; align-items: start; gap: 20px; margin: 16px 0; }
.congress-time { font-weight: 600; padding-top: 4px; }
.congress-date { display: inline-block; padding: 8px 12px; color: var(--highlight-ink); background: var(--highlight-bg); border-radius: 0; margin: 4px; font-weight: 600; }
.preserve-lines { white-space: pre-wrap; }
@media (max-width: 900px) { .hub-areas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .hub-areas { grid-template-columns: 1fr; } .congress-session { grid-template-columns: 1fr auto; } .congress-time { grid-column: 1 / -1; } }

:root { --academy-coral: #FE6758; --academy-coral-hover: #F05546; }
.congress-cta { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; padding: 14px 20px; border-radius: 0; background: var(--academy-coral); color: #1b0f2e; font-weight: 650; font-size: 14px; text-align: center; }
.congress-cta:hover { background: var(--academy-coral-hover); }
.public-congress .home-main { padding-top: 20px; }
.congress-hero { background: var(--highlight-bg); border: 1px solid #4513af1f; border-radius: 0; padding: clamp(24px, 5vw, 56px); color: var(--highlight-ink); }
.congress-hero .home-eyebrow { color: var(--highlight-ink); }
.congress-hero .home-intro, .congress-hero .congress-facts p, .congress-hero .congress-demo-note { color: var(--highlight-ink); opacity: .8; }
.congress-hero .congress-facts { border-top-color: #4513af33; }
.congress-hero .home-title { font-size: clamp(36px, 6vw, 64px); }
.congress-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 30px; }
.congress-facts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; margin-top: 40px; padding-top: 25px; border-top: 1px solid #320c8320; }
.congress-facts strong { font-size: 14px; }
.congress-facts p { color: #4e2d94; font-size: 14px; line-height: 1.8; margin-top: 8px; }
.congress-demo-note { font-size: 12px; line-height: 1.7; color: #4e2d94; margin-top: 28px; }
.public-program { margin-top: 56px; scroll-margin-top: 24px; }
.program-table-wrap { margin: 32px 0; overflow-x: auto; }
.program-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; table-layout: fixed; border: 0; background: transparent; }
.program-table caption { text-align: left; font-size: 23px; font-weight: 600; padding-bottom: 16px; }
.program-table thead th { background: transparent; color: var(--highlight-ink); font-size: 12px; font-weight: 600; text-align: left; padding: 16px 12px; overflow-wrap: anywhere; }
.program-table thead th:first-child { width: 105px; }
.program-table tbody th, .program-table td { vertical-align: top; padding: 12px; border: 0; }
.program-table td { background: var(--surface); }
.program-table tbody tr > :first-child { clip-path: polygon(0 var(--cut-y), var(--cut-x) 0, 100% 0, 100% 100%, var(--cut-x) 100%, 0 calc(100% - var(--cut-y))); }
.program-table tbody tr > :last-child { clip-path: polygon(0 0, calc(100% - var(--cut-x)) 0, 100% var(--cut-y), 100% calc(100% - var(--cut-y)), calc(100% - var(--cut-x)) 100%, 0 100%); }
.program-table tbody tr > :first-child:last-child { clip-path: none; }
.program-time { background: var(--surface); color: var(--highlight-ink); text-align: left; }
.program-time time { display: block; font-size: 20px; font-weight: 650; }
.program-time > span { font-size: 12px; font-weight: 400; }
.program-time small { display: block; margin-top: 12px; font-size: 11px; font-weight: 500; line-height: 1.5; color: var(--highlight-ink); opacity: .75; }
.program-entry { display: block; padding: 2px 0; margin-bottom: 20px; overflow-wrap: anywhere; }
.program-entry:last-child { margin-bottom: 0; }
a.program-entry:hover h3, a.program-entry:hover .program-detail { text-decoration: underline; }
.program-entry h3 { font-size: 15px; font-weight: 650; line-height: 1.3; margin: 10px 0; }
.program-entry p { font-size: 12px; line-height: 1.5; color: #4e2d94; }
.program-entry .home-badge { font-size: 10px; }
.program-detail { display: block; font-size: 11px; font-weight: 600; margin-top: 12px; }
.program-location { display: none; }
.program-empty { color: #7a6c92; }
.registration-steps { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 25px 0; font-size: 14px; color: #4e2d94; }
.registration-steps [aria-current] { font-weight: 600; color: #320c83; }
.registration-placeholder { border: 1px dashed #320c8330; padding: 20px; margin: 24px 0; border-radius: 0; }
@media (max-width: 760px) {
  .congress-facts { grid-template-columns: 1fr; gap: 18px; }
  .program-table-wrap { overflow: visible; }
  .program-table, .program-table tbody { display: block; border: 0; background: transparent; overflow: visible; }
  .program-table caption { display: block; }
  .program-table thead { display: none; }
  .program-time-group { display: block; border: 0; border-radius: 0; overflow: hidden; background: var(--surface); margin-bottom: 8px; clip-path: polygon(0 var(--cut-y), var(--cut-x) 0, calc(100% - var(--cut-x)) 0, 100% var(--cut-y), 100% calc(100% - var(--cut-y)), calc(100% - var(--cut-x)) 100%, var(--cut-x) 100%, 0 calc(100% - var(--cut-y))); }
  .program-table tbody tr > * { clip-path: none; }
  .program-table .program-time { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 16px; border: 0; background: var(--surface); }
  .program-time time { display: inline; }
  .program-time small { flex-basis: 100%; margin-top: 0; }
  .program-table .program-cell { display: block; border: 0; padding: 0 14px 14px; }
  .program-table .program-cell-empty { display: none; }
  .program-entry { margin-top: 14px; }
  .program-location { display: block; font-size: 12px; color: #4e2d94; margin-bottom: 8px; }
}

.congress-unlock { margin-top: 32px; max-width: 460px; display: grid; gap: 10px; }
.congress-unlock label { font-size: 14px; font-weight: 600; }
.congress-unlock-row { display: flex; gap: 10px; flex-wrap: wrap; }
.congress-unlock input { flex: 1; min-width: 180px; padding: 13px 14px; border: 1px solid #4513af40; border-radius: 0; background: var(--surface); font: inherit; }
.congress-unlock input:focus-visible { outline: 3px solid var(--violett-light); outline-offset: 2px; }
.congress-locked .kf-error { color: #b3261e; font-size: 13px; font-weight: 600; margin: 0; }

/* ---------- Abgeflachte Ecken (wie auf kleinstadtakademie.de) ---------- */
:root { --cut-y: 16px; --cut-x: 12px; --cut-btn: 8px; }
.home-card, .home-profile, .kf-paper, .fb-paper, .congress-hero {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-y)), calc(100% - var(--cut-x)) 100%, var(--cut-x) 100%, 0 calc(100% - var(--cut-y)));
  border-color: transparent;
}
.home-button, .congress-cta, .button {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-btn)), calc(100% - var(--cut-btn)) 100%, var(--cut-btn) 100%, 0 calc(100% - var(--cut-btn)));
}
.fb-paper { border-top-color: var(--violett); }
.home-area:hover, .kf-list-item:hover { background: var(--mint-light); box-shadow: none; }
.app-avatar { border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 78%, 78% 100%, 22% 100%, 0 78%); border: 0; }

.brand-logo { display: block; width: auto; max-width: 100%; }
