/* Shared white/blue theme. Status colors retain their semantic meaning. */
:root {
  color-scheme: light;
  --navy-950: #102f64;
  --navy-900: #163c78;
  --navy-800: #1e4687;
  --navy-700: #245395;
  --navy-600: #315f9c;
  --brand-blue: #1955b0;
  --brand-blue-soft: #edf4ff;
  --red-600: #1955b0;
  --red-500: #1955b0;
  --red-400: #245395;
  --surface: #fff;
  --surface-strong: #fff;
  --surface-soft: #f4f7fc;
  --text: #163c78;
  --muted: #45618a;
  --text-muted: #45618a;
  --line: #d4dfed;
  --line-strong: #aebfd6;
  --shadow: 0 8px 26px rgb(22 60 120 / 7%);
  --shadow-sm: 0 3px 14px rgb(22 60 120 / 5%);
  --radius-lg: 18px;
}
body { background: #fff; color: var(--text); font-size: 17px; line-height: 1.7; }
h1, h2, h3, h4, h5, h6 { color: var(--navy-900); line-height: 1.25; }
h1 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); }
p { overflow-wrap: break-word; }
a { color: var(--brand-blue); text-underline-offset: .2em; }
p a, .prose-content a, .footer-grid a { text-decoration: underline; }
a:hover { color: #103b80; }
.site-header, .site-header.scrolled, .site-footer, .hero-panel, .marketplace-hero,
.cta-band, .accent-card, .info-band, .cookie-notice, .main-nav {
  background: #fff; color: var(--text); border-color: var(--line);
}
.site-header { border-bottom: 1px solid var(--line); backdrop-filter: none; }
.site-footer, .cta-band { border-top: 1px solid var(--line); }
.hero-panel { border-bottom: 1px solid var(--line); padding-top: 3.5rem; }
.hero-panel::before, .hero-panel::after, .cta-band::before { display: none; }
.hero-panel h1, .marketplace-hero h1, .cta-band h2, .site-footer h4,
.brand strong, .main-nav a, .main-nav button, .accent-card h2, .accent-card h3 {
  color: var(--navy-900);
}
.hero-copy { color: var(--muted) !important; }
.brand small, .hero-panel p, .marketplace-hero p:not(.eyebrow), .cta-band p,
.accent-card p, .footer-grid a, .footer-grid h4, .footer-bottom, .hero-badge {
  color: var(--muted);
}
.footer-grid a:hover { color: var(--brand-blue); }
.hero-badge, .hero-panel .button-secondary, .main-nav .button-secondary,
.main-nav .ghost-button { background: #f4f7fc; color: var(--brand-blue); border: 1px solid var(--line); }
.button-primary, .main-nav .primary-link {
  background: var(--brand-blue); color: #fff; border: 1px solid var(--brand-blue); box-shadow: none;
}
.button-primary:hover, .main-nav .primary-link:hover { background: #103b80; color: #fff; transform: none; }
.button-secondary { background: #fff; border: 1px solid var(--line-strong); color: var(--brand-blue); }
.button-secondary:hover, .hero-panel .button-secondary:hover { background: #edf4ff; color: #103b80; transform: none; }
.main-nav a.active { color: var(--brand-blue); }
.nav-toggle { background: #fff; border-color: var(--line-strong); }
.nav-toggle-bar { background: var(--brand-blue); }
.nav-toggle, button, .button-primary, .button-secondary, .admin-tabs a, .admin-subnav a { min-height: 44px; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  background: #fff; color: var(--text); border: 1px solid #8ca4c5; font-size: 1rem; max-width: 100%;
}
input::placeholder, textarea::placeholder { color: #526c91; opacity: 1; }
:focus-visible { outline: 3px solid #1955b0; outline-offset: 3px; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
legend { font-size: 1.2rem; font-weight: 700; padding: 0 .4rem; }
.panel-card, .form-panel, .listing-card, .stat-card { border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.footer-grid, .footer-bottom, .news-item { border-color: var(--line); }
.page-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; margin: 1.5rem 0 2.5rem; }
.page-catalog h2 { font-size: 1.2rem; }
.page-catalog [hidden] { display: none; }
.editor-field { display: grid; gap: .4rem; margin-bottom: 1.5rem; }
.managed-section { max-width: 78ch; }
.prose-content, .whatsapp-group-detail .lede { white-space: pre-line; }
.table-scroll { overflow-x: auto; margin-top: 1.5rem; }
.table-scroll table { width: 100%; border-collapse: collapse; }
.table-scroll th, .table-scroll td { padding: .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll caption { text-align: left; font-weight: 700; }
.push-controls { padding: 1rem 0; max-width: 70ch; }
.push-controls p { margin: .5rem 0; }
.dashboard-grid > *, .footer-grid > *, .hero-grid > *, .stats-grid > * { min-width: 0; }
.admin-tabs { flex-wrap: wrap; }
@media (max-width: 800px) {
  .dashboard-grid, .newsletter-grid, .info-band { grid-template-columns: minmax(0, 1fr); }
  .main-nav { border: 1px solid var(--line); box-shadow: var(--shadow); }
  .hero-panel { padding-top: 2rem; }
  .brand small { font-size: .7rem; }
  .table-scroll th, .table-scroll td { padding: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

.trust-bar { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-item { color: var(--muted); }
.main-nav a { opacity: 1; }
.main-nav a:hover, .main-nav a:focus-visible { background: #edf4ff; color: #103b80; }
.main-nav .primary-link:hover, .main-nav .primary-link:focus-visible { background: #103b80; color: #fff; }
.hero-card { animation: none; }
.admin-tabs a.active { background: var(--brand-blue); box-shadow: none; }
.admin-tabs a:hover { transform: none; }
[hidden] { display: none !important; }

/* Allow grid/flex items and long user content to fit their available width. */
body { overflow-wrap: anywhere; }
img, video, iframe { max-width: 100%; }
input, select, textarea { min-width: 0; }
:is(.hero-grid, .dashboard-grid, .detail-grid, .editorial-grid, .filter-grid,
    .form-grid-two, .stats-grid, .feature-strip, .card-grid, .faq-grid,
    .quick-access-grid, .marketplace-shell, .marketplace-detail-grid,
    .marketplace-grid, .forum-layout, .forum-thread-card, .newsletter-layout,
    .topic-grid, .info-band, .stack-form, .section-head, .list-row,
    .thread-row, .photo-preview) > * { min-width: 0; }
.card-grid, .faq-grid, .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.quick-access-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
#whatsapp-gruppen .quick-access-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.button-group, .stack-actions, .action-row, .pagination, .pagination-nav,
.forum-opening-post footer, .forum-post footer, .forum-post header {
  flex-wrap: wrap;
  gap: .75rem;
}
:is(.button-group, .hero-actions, .stack-actions, .action-row) > *,
.button-primary, .button-secondary, .ghost-button, .primary-link {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}
.section-head a { white-space: normal; }
.section-head > div { flex: 1; }
.listing-card dd { margin-inline-start: 0; }
pre { max-width: 100%; overflow-x: auto; }
.table-scroll { max-width: 100%; overscroll-behavior-x: contain; }
.table-card > .table-scroll { margin-top: 0; }
.table-scroll table { min-width: 640px; }
.table-scroll td { overflow-wrap: anywhere; }
/* Keep table cells in the table formatting context; actions wrap inside them. */
td.action-row { display: table-cell; }
td.action-row > * { display: inline-block; margin: .25rem; vertical-align: middle; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
/* The desktop navigation can span several rows, so sidebars must not stick beneath it. */
.marketplace-sidebar, .marketplace-contact, .forum-rooms, .newsletter-sidebar { position: static; }
.nav-shell { flex-wrap: wrap; padding-block: .75rem; }
.brand { flex-shrink: 1; min-width: 0; max-width: 100%; }
.brand > span:last-child { min-width: 0; }
.main-nav { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; }
.nav-toggle { flex: 0 0 44px; }
@media (min-width: 981px) {
  .nav-toggle { display: none; }
}
@media (max-width: 980px) {
  /* A tall open menu should scroll locally, even on landscape phones. */
  .site-header { position: relative; }
  .nav-shell > .brand { max-width: calc(100% - 60px); }
  .js .main-nav { display: none; }
  .main-nav, .js .main-nav.is-open {
    display: flex;
    visibility: visible;
    opacity: 1;
    max-height: none;
    flex-wrap: nowrap;
    padding: .6rem;
  }
  .js .main-nav.is-open {
    max-height: 65vh;
    max-height: 65dvh;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  .main-nav > * { flex-shrink: 0; }
  .main-nav a { border-radius: 12px; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .nav-shell > .brand { max-width: 100%; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-filter-bar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hero-card, .panel-card, .auth-card, .form-panel, .table-card,
  .prose-section, .listing-card, .editorial-card, .stat-card { padding: 1rem; }
  .section-head::before { display: none; }
  .section-head { align-items: stretch; }
  .section-head > div { flex: auto; }
  .footer-grid, .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .list-row, .thread-row, .photo-preview { flex-wrap: wrap; }
  .brand { gap: .5rem; }
  .brand strong { font-size: .9rem; }
  .brand small { font-size: .65rem; }
  h2 { font-size: clamp(1.4rem, 6vw, 1.8rem); }
  .marketplace-hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .trust-bar-inner { flex-wrap: wrap; overflow: visible; }
  .cookie-notice { max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; }
}
