:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #eef3f4;
    --text: #172033;
    --muted: #647184;
    --border: #d8dee6;
    --accent: #0f766e;
    --accent-strong: #0b5f59;
    --danger: #b91c1c;
    --focus: #f59e0b;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    --radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #111318;
        --surface: #1b1f27;
        --surface-2: #242a34;
        --text: #eef2f7;
        --muted: #a5afbf;
        --border: #374151;
        --accent: #2dd4bf;
        --accent-strong: #14b8a6;
        --danger: #f87171;
        --focus: #fbbf24;
        --shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
    }
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #eef3f4;
    --text: #172033;
    --muted: #647184;
    --border: #d8dee6;
    --accent: #0f766e;
    --accent-strong: #0b5f59;
    --danger: #b91c1c;
    --focus: #f59e0b;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111318;
    --surface: #1b1f27;
    --surface-2: #242a34;
    --text: #eef2f7;
    --muted: #a5afbf;
    --border: #374151;
    --accent: #2dd4bf;
    --accent-strong: #14b8a6;
    --danger: #f87171;
    --focus: #fbbf24;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

body:not(.auth-body) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea {
    font: inherit;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    padding: 0.72rem 0.78rem;
}

textarea { resize: vertical; }

label {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-weight: 650;
}

label span, label input, label textarea, label select { font-weight: 500; }

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
}

.checkbox-line input {
    width: auto;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.button, button {
    border: 0;
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    padding: 0.72rem 0.95rem;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 750;
    cursor: pointer;
}

.button {
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.button:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}

.button.primary {
    background: var(--accent);
    color: #fff;
}

.button.primary:hover {
    background: var(--accent-strong);
}

.button.is-submitting {
    cursor: wait;
    opacity: 0.92;
}

.button-spinner {
    width: 1.05em;
    height: 1.05em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.button.ghost {
    background: transparent;
    border: 1px solid var(--border);
}

.button.ghost:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    text-decoration: none;
}

.button.small {
    min-height: 34px;
    padding: 0.45rem 0.65rem;
    font-size: 0.88rem;
}

.button.danger {
    background: var(--danger);
    color: #fff;
}

.button.is-disabled,
.button[aria-disabled="true"] {
    cursor: default;
    opacity: 0.48;
    pointer-events: none;
}

.icon-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: var(--radius);
    background: var(--surface-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.icon-button:hover {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}

.icon-button svg {
    display: block;
    width: 20px;
    height: 20px;
}

.topbar {
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1200;
    box-shadow: 0 1px 0 var(--border);
}

.topbar-inner {
    height: 64px;
    width: min(1520px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
}

.app-title {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-weight: 850;
}

.brand-link {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    overflow: visible;
}

.brand-link:hover {
    text-decoration: none;
}

.brand-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-weight: 850;
}

.brand-block .brand-logo {
    width: min(300px, 100%);
    max-width: 100%;
    height: 84px;
    object-fit: contain;
    object-position: left center;
}

.brand-block div {
    display: grid;
    gap: 0.1rem;
}

.brand-block strong {
    line-height: 1.15;
}

.brand-block span:last-child {
    color: var(--muted);
    font-size: 0.9rem;
}

.brand-logo {
    width: 245px;
    max-width: 42vw;
    height: 58px;
    object-fit: contain;
    object-position: left center;
    display: block;
    flex: 0 0 auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    justify-content: flex-end;
    margin-left: auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.5rem 0.78rem;
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.main-nav-link:hover,
.main-nav-link:focus-visible {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

.main-nav-link svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.main-nav-logout-form {
    display: none;
    margin: 0;
}

.main-nav-logout {
    border: 0;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
}

.main-nav-law strong {
    display: inline-flex;
    align-items: center;
    height: 18px;
    color: inherit;
    font-size: 0.96rem;
    font-weight: 950;
    line-height: 1;
    transform: translateY(-1px);
}

.topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.28rem;
    min-width: 0;
}

.topbar-tools form {
    display: flex;
    align-items: center;
    height: 42px;
    margin: 0;
}

.mobile-menu-toggle {
    display: none;
}

.mobile-menu-toggle.is-active {
    background: var(--accent);
    color: #fff;
}

.top-search {
    width: 42px;
    display: grid;
    grid-template-columns: 1fr 42px;
    align-items: center;
    gap: 0;
    justify-self: end;
    height: 42px;
    transition: width 0.18s ease, gap 0.18s ease;
}

.top-search input[type="search"] {
    min-width: 0;
    opacity: 0;
    pointer-events: none;
    padding-inline: 0;
    border-width: 0;
    border-color: transparent;
    transition: opacity 0.16s ease, padding 0.16s ease, border-color 0.16s ease;
}

.top-search.is-open,
.top-search:focus-within {
    width: min(420px, 34vw);
    gap: 0.4rem;
}

.top-search.is-open input[type="search"],
.top-search:focus-within input[type="search"] {
    opacity: 1;
    pointer-events: auto;
    padding: 0.72rem 0.82rem;
    border-width: 1px;
    border-color: var(--border);
}

.user-strip {
    padding: 0.45rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.user-strip-inner {
    width: min(1520px, 100%);
    margin: 0 auto;
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.user-strip-events,
.user-strip-account,
.user-strip-admin,
.user-strip-profile {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.user-strip-events {
    min-width: 0;
    overflow-wrap: anywhere;
    color: inherit;
    text-decoration: none;
}

.user-strip-press-digest {
    color: #c5401d;
    font-weight: 800;
    padding-left: 1rem;
}

.user-strip-press-digest .mark-badge {
    --mark-color: #c5401d;
    width: 12px;
    height: 18px;
}

.user-strip-events:hover,
.user-strip-events:focus-visible,
.user-strip-admin:hover,
.user-strip-admin:focus-visible,
.user-strip-profile:hover,
.user-strip-profile:focus-visible {
    color: var(--accent);
    text-decoration: none;
}

.user-strip-press-digest:hover,
.user-strip-press-digest:focus-visible {
    color: #c5401d;
}

.user-strip-account {
    margin-left: auto;
    min-width: 0;
}

.user-strip-admin,
.user-strip-profile {
    color: inherit;
    text-decoration: none;
}

.user-strip-profile {
    min-width: 0;
    max-width: min(52vw, 620px);
    overflow: hidden;
    white-space: nowrap;
}

.user-strip-profile span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page {
    width: min(1520px, 100%);
    margin: 0 auto;
    padding: 0 1rem 2rem;
    flex: 1 0 auto;
}

.site-footer {
    width: min(1520px, 100%);
    margin: 0 auto;
    padding: 0.9rem 1rem 1.1rem;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
    flex: 0 0 auto;
}

.page-notice {
    width: min(1200px, calc(100% - 2rem));
    margin: 1rem auto;
}

.notice {
    border: 1px solid var(--border);
    background: var(--surface);
    border-left: 4px solid var(--accent);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
}

.notice-error { border-left-color: var(--danger); }
.notice-success { border-left-color: #16a34a; }

.inline-action-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    padding: 1rem;
}

.auth-card {
    width: min(440px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    box-shadow: var(--shadow);
}

.auth-card h1, .page-section h1, .admin-panel h1 {
    margin: 0 0 0.4rem;
}

.muted { color: var(--muted); }
.small-link { font-size: 0.92rem; }
.stack { display: grid; gap: 1rem; }

.installer-form fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.installer-form legend {
    color: var(--muted);
    font-weight: 850;
}

.install-code {
    display: grid;
    gap: 0.45rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.install-code span {
    color: var(--muted);
    font-weight: 750;
}

.install-code code {
    font-size: 1.05rem;
    word-break: break-all;
}

.map-shell {
    position: relative;
    min-height: calc(100vh - 112px);
}

.map-admin-notice {
    margin: 0.75rem 0 0.35rem;
    padding: 0.85rem 1rem;
    border: 1px solid color-mix(in srgb, #38bdf8 46%, var(--border));
    border-left: 4px solid #0284c7;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
}

.map-admin-notice > p,
.map-admin-notice .comment-body {
    margin: 0;
    line-height: 1.45;
}

.map-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
}

.map-toolbar .global-notify {
    align-self: flex-end;
    margin-bottom: 0;
}

.map-toolbar h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.3vw, 2.25rem);
}

.map-toolbar p {
    margin: 0.2rem 0 0;
    color: var(--muted);
}

.context-switcher {
    position: relative;
    display: inline-block;
    margin-top: 0.25rem;
}

.context-switcher select {
    appearance: none;
    min-height: 40px;
    max-width: min(100%, 360px);
    padding: 0.48rem 2.35rem 0.48rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 750;
    box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 70%, transparent);
    cursor: pointer;
}

.context-switcher::after {
    content: "⌄";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-58%);
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 900;
    pointer-events: none;
}

.context-switcher select:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.search-context-switcher {
    margin: 0.4rem 0 1rem;
}

.admin-context-switcher {
    display: grid;
    gap: 0.35rem;
    margin: 0 0 1rem;
}

.admin-context-switcher::after {
    top: auto;
    bottom: 0.67rem;
}

.admin-context-switcher label {
    color: var(--muted);
    font-weight: 750;
}

.admin-context-switcher select {
    max-width: 100%;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius);
    color: var(--text);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.map-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.filter-row {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin: 0 0 0.8rem;
}

.party-filter {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
}

.filter-actions {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.filter-actions .button,
.filter-row .party-chip,
.filter-row .switch-row-compact {
    min-height: 42px;
}

.filter-actions .button.is-active {
    border-color: #f59e0b;
    background: color-mix(in srgb, #f59e0b 14%, var(--surface));
}

.filter-actions .button[data-marked-filter],
.filter-actions .button[data-planned-meeting-filter] {
    color: var(--muted);
}

.filter-actions .button[data-marked-filter] svg,
.filter-actions .button[data-planned-meeting-filter] svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke-width: 2.25;
}

.filter-actions .button[data-marked-filter] svg {
    color: #22d3ee;
}

.filter-actions .button[data-planned-meeting-filter] svg {
    color: #86efac;
}

.filter-actions .button[data-marked-filter].is-active {
    border-color: color-mix(in srgb, #22d3ee 56%, var(--border));
    background: color-mix(in srgb, #22d3ee 13%, var(--surface));
    color: #0e7490;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #22d3ee 18%, transparent);
}

.filter-actions .button[data-planned-meeting-filter].is-active {
    border-color: color-mix(in srgb, #86efac 64%, var(--border));
    background: color-mix(in srgb, #86efac 17%, var(--surface));
    color: #166534;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #86efac 22%, transparent);
}

.filter-actions .button[data-marked-filter].is-active svg,
.filter-actions .button[data-planned-meeting-filter].is-active svg {
    color: currentColor;
}

@media (min-width: 1180px) {
    .map-shell .filter-row,
    .map-shell .party-filter,
    .map-shell .filter-actions {
        flex-wrap: nowrap;
    }

    .map-shell .filter-row {
        align-items: stretch;
    }

    .map-shell .party-chip,
    .map-shell .filter-actions .button {
        min-height: 40px;
        padding: 0.56rem 0.66rem;
        white-space: nowrap;
    }

    .map-shell .party-chip {
        gap: 0.34rem;
    }

    .map-shell .party-chip input {
        width: 16px;
        height: 16px;
    }
}

.party-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: auto;
    padding: 0.62rem 0.72rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--party-color, var(--accent));
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.party-chip input {
    width: 18px;
    height: 18px;
}

.party-chip span {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-weight: 800;
}

.mark-filter-chip {
    --party-color: #22d3ee;
}

.planned-meeting-filter-chip {
    --party-color: #86efac;
}

.mark-filter-chip .marked-filter-icon,
.planned-meeting-filter-chip .planned-meeting-filter-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke-width: 2.25;
}

.mark-filter-chip .marked-filter-icon {
    color: #22d3ee;
}

.planned-meeting-filter-chip .planned-meeting-filter-icon {
    color: #86efac;
}

.mark-filter-chip:has(input:checked) {
    border-color: color-mix(in srgb, #22d3ee 56%, var(--border));
    border-left-color: #22d3ee;
    background: color-mix(in srgb, #22d3ee 13%, var(--surface));
    color: #0e7490;
}

.planned-meeting-filter-chip:has(input:checked) {
    border-color: color-mix(in srgb, #86efac 64%, var(--border));
    border-left-color: #86efac;
    background: color-mix(in srgb, #86efac 17%, var(--surface));
    color: #166534;
}

.mark-filter-chip:has(input:checked) .marked-filter-icon,
.planned-meeting-filter-chip:has(input:checked) .planned-meeting-filter-icon {
    color: currentColor;
}

.mark-badge {
    --mark-color: #22d3ee;
    display: inline-block;
    width: 16px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 0 0 3px 3px;
    background: var(--mark-color);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--mark-color) 26%, transparent);
    line-height: 1;
    vertical-align: middle;
}

.planned-meeting-badge {
    --mark-color: #86efac;
}

.meeting-coordination-badge {
    --mark-color: #fde047;
}

.politician-inline-status-flags,
.profile-status-flags-inner,
.mandate-status-flags,
.admin-politician-status-flags {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.22rem;
}

.map {
    position: relative;
    z-index: 1;
    height: calc(100vh - 190px);
    min-height: 520px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-2);
}

.regional-planning-page {
    display: grid;
    gap: 1rem;
}

.regional-planning-page-head {
    padding: 0.8rem 0 0.15rem;
}

.regional-planning-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 1rem;
    align-items: start;
}

.regional-planning-page .regional-planning-map {
    height: min(54vh, 520px);
    min-height: 420px;
}

.regional-planning-legend {
    position: sticky;
    top: calc(var(--sticky-topbar-height, 64px) + 1rem);
    display: grid;
    gap: 0.75rem;
}

.regional-planning-legend-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--region-color);
    border-radius: var(--radius);
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.regional-planning-legend-item:hover,
.regional-planning-legend-item:focus-visible,
.regional-planning-legend-item.is-active {
    border-color: color-mix(in srgb, var(--region-color) 48%, var(--border));
    border-left-color: var(--region-color);
    background: color-mix(in srgb, var(--region-color) 7%, var(--surface));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--region-color) 14%, transparent);
    text-decoration: none;
}

.regional-planning-legend-item:hover,
.regional-planning-legend-item:focus-visible {
    transform: translateY(-1px);
}

.regional-planning-color {
    width: 0.95rem;
    height: 0.95rem;
    margin-top: 0.25rem;
    border: 2px solid color-mix(in srgb, var(--region-color) 86%, #ffffff);
    border-radius: 999px;
    background: var(--region-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--region-color) 16%, transparent);
}

.regional-planning-legend-item h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
}

.regional-planning-legend-item strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.25;
}

.regional-planning-legend-item p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.regional-planning-tabs {
    scroll-margin-top: calc(var(--sticky-topbar-height, 64px) + 1rem);
    display: grid;
    gap: 0.9rem;
}

.regional-planning-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    border-bottom: 1px solid var(--border);
}

.regional-planning-tab {
    width: auto;
    min-height: 42px;
    margin-bottom: -1px;
    padding: 0.55rem 0.8rem;
    border: 1px solid transparent;
    border-radius: var(--radius) var(--radius) 0 0;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}

.regional-planning-tab:hover,
.regional-planning-tab:focus-visible {
    color: var(--text);
    background: color-mix(in srgb, var(--surface-2) 78%, transparent);
}

.regional-planning-tab.is-active {
    border-color: var(--border);
    border-bottom-color: var(--surface);
    background: var(--surface);
    color: var(--text);
}

.regional-planning-panel {
    min-height: 260px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.regional-planning-panel[hidden] {
    display: none;
}

.regional-planning-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.regional-planning-panel-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.regional-planning-panel-head p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.regional-planning-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.regional-planning-website-button {
    flex: 0 0 auto;
    justify-self: end;
    white-space: nowrap;
}

.regional-planning-website-button svg {
    width: 1rem;
    height: 1rem;
}

.regional-planning-panel-body {
    min-height: 150px;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--border) 58%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 58%, transparent);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.regional-planning-panel-body > :first-child {
    margin-top: 0;
}

.regional-planning-panel-body > :last-child {
    margin-bottom: 0;
}

.regional-planning-region-details {
    display: grid;
    gap: 0.9rem;
}

.regional-planning-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.regional-planning-meta-item {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.regional-planning-meta-item span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.regional-planning-meta-item strong {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.regional-planning-advisory-note {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.68rem 0.8rem;
    border: 1px solid color-mix(in srgb, var(--muted) 22%, var(--border));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.regional-planning-advisory-note.is-member {
    border-color: color-mix(in srgb, #16a34a 34%, var(--border));
    background: color-mix(in srgb, #16a34a 8%, var(--surface));
    color: color-mix(in srgb, #166534 84%, var(--text));
}

.regional-planning-advisory-note.is-not-member {
    color: var(--muted);
}

.regional-planning-advisory-note strong {
    text-decoration: none;
}

.regional-planning-advisory-note svg {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
}

.regional-planning-comments-disclosure {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.regional-planning-comments-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
}

.regional-planning-comments-summary::marker {
    color: var(--muted);
}

.regional-planning-comments-summary span:last-child {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.regional-planning-comments-disclosure[open] .regional-planning-comments-summary {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.regional-planning-comments {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: start;
    gap: 0.9rem;
}

.regional-planning-comments-list-panel,
.regional-planning-comment-entry-card {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.regional-planning-comment-entry-card {
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.regional-planning-comment-entry-card h4 {
    margin: 0;
    font-size: 1.12rem;
}

.regional-planning-comment-notify {
    margin: 0;
    align-items: center;
}

.regional-planning-comments .comment-form,
.regional-planning-comments .comments-list {
    margin: 0;
}

.regional-planning-comment-entry-card .button.primary {
    width: 100%;
}

.map-empty-message {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: min(420px, calc(100% - 2rem));
    padding: 0.8rem 0.95rem;
    border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--border));
    border-left: 4px solid var(--danger);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--danger) 8%, var(--surface));
    color: var(--text);
    box-shadow: var(--shadow);
    font-weight: 700;
    line-height: 1.35;
}

.map-loading {
    position: absolute;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: color-mix(in srgb, var(--surface) 28%, transparent);
    backdrop-filter: blur(1px);
    pointer-events: none;
}

.map-loading[hidden] {
    display: none;
}

.map-loading > span:last-child {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    max-width: min(92vw, 360px);
    padding: 0.7rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow);
    color: var(--text);
    font-weight: 850;
}

.map-loading-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-right: 0.55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--accent);
    animation: map-hourglass-turn 1.45s ease-in-out infinite;
}

.map-loading-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.4;
}

@keyframes map-hourglass-turn {
    0%, 38% { transform: rotate(0deg); }
    62%, 100% { transform: rotate(180deg); }
}

.list-mandates,
.direct-mandates,
.events-section {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.list-mandates h2,
.direct-mandates h2,
.events-section h2 {
    margin: 0.2rem 0 0;
}

.mandate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.55rem;
}

.mandate-item {
    position: relative;
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--party-color, var(--accent));
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
}

.mandate-item.is-marked,
.mandate-item.has-status-flags {
    padding-right: 2rem;
}

.mandate-item.has-status-flags {
    padding-right: 3.85rem;
}

.mandate-item > .mark-badge,
.mandate-item > .mandate-status-flags {
    position: absolute;
    top: 0;
    right: 0.75rem;
}

.mandate-item strong,
.mandate-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.mandate-item span {
    color: var(--muted);
    font-size: 0.92rem;
}

.event-info-note {
    margin: 0;
    padding: 0.72rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 700;
}

.events-page {
    display: grid;
    gap: 0.85rem;
}

.legislation-page {
    display: grid;
    gap: 0.85rem;
}

.legislation-page-head {
    align-items: center;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.legislation-page-head > div {
    display: grid;
    gap: 0.1rem;
}

.legislation-page-head h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2.3vw, 2.15rem);
}

.legislation-page-head p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.legislation-detail-page {
    gap: 1rem;
}

.legislation-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.legislation-section {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 88%, var(--accent) 4%);
}

.legislation-list-head {
    align-items: center;
}

.legislation-list-head h2 {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.legislation-filter-panel {
    display: grid;
    gap: 0.9rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.legislation-filter-group {
    display: grid;
    gap: 0.55rem;
}

.legislation-filter-row {
    display: grid;
    grid-template-columns: max-content minmax(220px, 1fr);
    align-items: start;
    gap: 0.9rem;
}

.legislation-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.legislation-filter-row .legislation-filter-head {
    min-height: 34px;
}

.legislation-filter-head strong {
    font-size: 0.96rem;
}

.legislation-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.legislation-type-filter-form {
    display: grid;
    gap: 0.45rem;
}

.legislation-status-filters,
.legislation-party-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.legislation-filter-button {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    min-height: 44px;
    max-width: 270px;
    padding: 0.45rem 0.62rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--muted);
    text-align: left;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.legislation-filter-button span,
.legislation-filter-button small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.legislation-filter-button span {
    color: var(--text);
    font-size: 0.86rem;
    line-height: 1.2;
}

.legislation-filter-button small {
    margin-top: 0.14rem;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.18;
}

.legislation-filter-button.is-active {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.legislation-filter-button[aria-pressed="false"] {
    opacity: 0.62;
}

.legislation-document-filter {
    max-width: 220px;
}

.legislation-status-filter {
    flex-direction: row;
    align-items: center;
    gap: 0.42rem;
    min-height: 36px;
}

.legislation-party-filter {
    --party-color: #6b7280;
    border-left: 4px solid var(--party-color);
    min-height: 36px;
    padding-left: 0.54rem;
}

.legislation-status-filter .mark-badge {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    width: 13px;
    height: 18px;
    box-shadow: none;
}

.legislation-status-filter[aria-pressed="false"] .mark-badge::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: var(--surface-2);
    clip-path: inherit;
}

.legislation-status-filter .legislation-status-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: var(--accent);
    fill: none;
}

.legislation-status-filter[data-legislation-status-filter="bookmarked"] .legislation-status-icon {
    color: #1d4ed8;
}

.legislation-status-filter[data-legislation-status-filter="marked"] .legislation-status-icon {
    color: #22d3ee;
}

.legislation-status-filter[data-legislation-status-filter="statement"] .legislation-status-icon {
    color: #dc2626;
}

.legislation-status-filter.is-active[data-legislation-status-filter="marked"] {
    border-color: color-mix(in srgb, #22d3ee 54%, var(--border));
    background: color-mix(in srgb, #22d3ee 13%, var(--surface-2));
    color: #0e7490;
}

.legislation-status-filter.is-active[data-legislation-status-filter="statement"] {
    border-color: color-mix(in srgb, #dc2626 48%, var(--border));
    background: color-mix(in srgb, #dc2626 10%, var(--surface-2));
    color: #b91c1c;
}

.legislation-status-filter.is-active[data-legislation-status-filter="bookmarked"] {
    border-color: color-mix(in srgb, #2563eb 48%, var(--border));
    background: color-mix(in srgb, #2563eb 11%, var(--surface-2));
    color: #1d4ed8;
}

.legislation-status-filter.is-active[data-legislation-status-filter="marked"] .legislation-status-icon,
.legislation-status-filter.is-active[data-legislation-status-filter="statement"] .legislation-status-icon,
.legislation-status-filter.is-active[data-legislation-status-filter="bookmarked"] .legislation-status-icon {
    fill: currentColor;
}

.legislation-status-filter.is-active[data-legislation-status-filter="bookmarked"] .legislation-status-icon {
    fill: currentColor;
}

.legislation-status-filter.is-active[data-legislation-status-filter] span {
    color: currentColor;
}

.legislation-party-filter[aria-pressed="true"] {
    border-left-color: var(--party-color);
}

.legislation-list {
    display: grid;
    gap: 0.65rem;
}

.legislation-item {
    position: relative;
    scroll-margin-top: 96px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    min-width: 0;
}

.legislation-item[data-card-url] {
    cursor: pointer;
}

.legislation-item[data-card-url] .legislation-actions,
.legislation-item[data-card-url] .legislation-info,
.legislation-item[data-card-url] .legislation-quick-actions {
    cursor: auto;
}

.legislation-detail-card {
    gap: 0.55rem 0.75rem;
    padding: 1rem;
}

.legislation-detail-card-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    display: flex;
}

.legislation-detail-card-actions .button {
    white-space: nowrap;
}

.legislation-detail-card > p {
    grid-column: 1 / -1;
    margin: 0;
    max-width: 980px;
    line-height: 1.55;
}

.legislation-detail-info {
    grid-column: 1 / -1;
}

.legislation-item.is-hidden {
    display: none;
}

.legislation-item:hover,
.legislation-item:focus-within {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
    text-decoration: none;
}

.legislation-detail-card.has-legislation-flags {
    padding-right: 4.15rem;
}

.legislation-flags {
    display: inline-flex;
    align-items: flex-start;
    flex: 0 0 auto;
    gap: 0.22rem;
}

.legislation-detail-card > .legislation-flags {
    position: absolute;
    top: -1px;
    right: 0.9rem;
    z-index: 2;
}

.legislation-marked-flag {
    --mark-color: #22d3ee;
}

.legislation-statement-flag {
    --mark-color: #dc2626;
}

.legislation-kicker {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.legislation-item strong,
.legislation-meta {
    min-width: 0;
    overflow-wrap: anywhere;
}

.legislation-item strong {
    font-size: 1.06rem;
    line-height: 1.28;
}

.legislation-meta {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.legislation-actions {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: start;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.legislation-actions .legislation-flags {
    align-self: center;
}

.legislation-info-toggle {
    white-space: nowrap;
}

.legislation-info-toggle svg,
.legislation-external svg {
    width: 17px;
    height: 17px;
}

.legislation-info-toggle[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
    color: var(--accent);
}

.legislation-external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 34px;
    white-space: nowrap;
    color: var(--accent);
}

.legislation-external:hover {
    background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
    text-decoration: none;
}

.legislation-tags {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.legislation-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.18rem 0.48rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.legislation-tag.subject {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
    color: var(--text);
}

.legislation-tag.marked {
    border-color: color-mix(in srgb, #22d3ee 50%, var(--border));
    background: color-mix(in srgb, #22d3ee 12%, var(--surface-2));
    color: var(--text);
}

.legislation-tag.statement {
    border-color: color-mix(in srgb, #16a34a 42%, var(--border));
    background: color-mix(in srgb, #16a34a 10%, var(--surface-2));
    color: var(--text);
}

.legislation-parties {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.legislation-party-chip {
    --party-color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.14rem 0.46rem 0.14rem 0.38rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--party-color, var(--accent));
    border-radius: calc(var(--radius) - 2px);
    background: var(--surface);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.1;
}

.legislation-info {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.65rem;
    margin-top: 0.3rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 72%, var(--surface) 28%);
}

.legislation-info[hidden] {
    display: none;
}

.legislation-info p {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
}

.legislation-info dl {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.legislation-info dl > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.6rem;
}

.legislation-info dt {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.legislation-info dd {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.legislation-info dd span {
    display: inline-flex;
    padding: 0.12rem 0.38rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.8rem;
    font-weight: 800;
}

.legislation-info dd .legislation-result-list {
    display: grid;
    gap: 0.28rem;
    width: 100%;
    margin: 0;
    padding-left: 1rem;
}

.legislation-info dd .legislation-result-list li {
    line-height: 1.35;
}

.legislation-empty {
    margin: 0;
}

.legislation-statement,
.legislation-comments-disclosure {
    grid-column: 1 / -1;
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.legislation-statement-form {
    display: grid;
    grid-template-columns: minmax(120px, 150px) minmax(180px, 220px) minmax(240px, 1fr) auto;
    align-items: end;
    gap: 0.65rem;
}

.legislation-statement-form .switch-row {
    min-height: 42px;
    margin: 0;
    align-items: center;
}

.legislation-statement-form label {
    min-width: 0;
}

.legislation-statement-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 42px;
}

.legislation-statement-actions .is-hidden {
    display: none;
}

.legislation-statement-readonly {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-weight: 800;
}

.legislation-quick-actions {
    grid-column: 1 / -1;
    position: relative;
    display: block;
    min-height: 42px;
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.legislation-quick-actions .legislation-comments-disclosure {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.legislation-quick-actions .legislation-comments-summary {
    margin-right: 10.25rem;
}

.legislation-bookmark-button {
    min-height: 42px;
    justify-content: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.legislation-quick-actions > .legislation-bookmark-button {
    position: absolute;
    top: 0.75rem;
    right: 0;
    z-index: 3;
}

.legislation-comments-disclosure {
    display: grid;
    gap: 0.75rem;
}

.legislation-comments-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
    min-width: 0;
}

.legislation-comments-summary::marker {
    color: var(--muted);
}

.legislation-comments-summary span:last-child {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.legislation-comments-disclosure[open] .legislation-comments-summary {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.legislation-comments {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: start;
    gap: 0.9rem;
}

.legislation-comments-list-panel,
.legislation-comment-entry-card {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.legislation-comment-entry-card {
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.legislation-comment-entry-card h4 {
    margin: 0;
    font-size: 1.12rem;
}

.legislation-comment-notify {
    margin: 0;
    align-items: center;
}

.legislation-comments .comment-form,
.legislation-comments .comments-list {
    margin: 0;
}

.legislation-comment-entry-card .button.primary {
    width: 100%;
}

.event-submit-card[hidden] {
    display: none;
}

.events-page-head {
    align-items: center;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.events-page-head > div {
    display: grid;
    gap: 0.1rem;
}

.events-page-head h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2.3vw, 2.15rem);
}

.events-page-head p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.events-section.standalone {
    margin-top: 0;
    background: color-mix(in srgb, var(--surface-2) 88%, var(--accent) 4%);
}

.events-list-head {
    align-items: center;
}

.events-list-head h2 {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.event-submit-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.event-submit-body {
    display: grid;
    gap: 0.85rem;
    padding-top: 0.2rem;
}

.event-submit-card h2 {
    margin: 0;
}

.event-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

.event-card {
    display: grid;
    gap: 0.75rem;
    align-content: start;
    padding: 0.95rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--party-color, var(--accent));
    border-radius: var(--radius);
    background: var(--surface);
}

.event-card.is-archived {
    border-left-color: var(--muted);
}

.event-card-head {
    display: grid;
    gap: 0.25rem;
}

.event-party {
    color: var(--party-color, var(--accent));
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.event-archive-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.62rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 850;
}

.event-archive-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.event-archive-actions .muted {
    font-weight: 800;
}

.event-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.event-meta {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.event-meta div {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.6rem;
}

.event-meta dt {
    color: var(--muted);
    font-weight: 800;
}

.event-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.event-description {
    margin: 0;
    line-height: 1.45;
}

.event-link {
    justify-self: start;
}

.event-attendance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.event-attendance span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.event-attendees {
    display: grid;
    gap: 0.35rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border);
}

.event-attendees strong {
    font-size: 0.9rem;
}

.event-attendees ul {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.event-attendees li {
    padding: 0.18rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    font-size: 0.86rem;
    font-weight: 750;
}

.event-attendees li.muted {
    border-color: transparent;
    background: transparent;
    padding-left: 0;
}

.event-comments-disclosure {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.event-comments-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
}

.event-comments-summary::marker {
    color: var(--muted);
}

.event-comments-summary span:last-child {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.event-comments-disclosure[open] .event-comments-summary {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.event-comments {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: start;
    gap: 0.9rem;
}

.event-comments-list-panel,
.event-comment-entry-card {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.event-comment-entry-card {
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.event-comment-entry-card h4 {
    margin: 0;
    font-size: 1.12rem;
}

.event-comment-notify {
    margin: 0;
    align-items: center;
}

.event-comments .comment-form {
    margin: 0;
}

.event-comments .comments-list {
    margin: 0;
}

.event-comment-entry-card .button.primary {
    width: 100%;
}

.forum-page {
    display: grid;
    gap: 1rem;
}

.forum-page-head {
    align-items: center;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.forum-page-head > div {
    display: grid;
    gap: 0.12rem;
}

.forum-page-head h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2.3vw, 2.15rem);
}

.forum-page-head p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
}

.forum-admin-card[hidden] {
    display: none;
}

.forum-admin-card,
.forum-section,
.forum-thread-detail {
    display: grid;
    gap: 0.95rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    min-width: 0;
}

.forum-admin-card h2,
.forum-section h2 {
    margin: 0;
}

.forum-admin-card p {
    margin: 0;
}

.forum-category-admin summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text);
    font-weight: 900;
    list-style: none;
}

.forum-category-admin summary::-webkit-details-marker {
    display: none;
}

.forum-category-admin summary::after {
    content: "+";
    width: 1.7rem;
    height: 1.7rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 950;
}

.forum-category-admin[open] summary::after {
    content: "-";
}

.forum-category-admin summary small {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.forum-thread-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: end;
}

.forum-thread-form .wide-field,
.forum-thread-form > .file-upload,
.forum-thread-form > button {
    grid-column: 1 / -1;
}

.forum-thread-form-actions {
    display: grid;
    gap: 0.45rem;
}

.forum-thread-edit-status {
    min-height: 1.2em;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 750;
}

.forum-thread-edit-status.is-success {
    color: var(--accent-strong);
}

.forum-thread-edit-status.is-error {
    color: var(--danger);
}

.forum-cover-preview {
    display: grid;
    gap: 0.4rem;
    color: var(--muted);
    font-weight: 750;
}

.forum-cover-preview img {
    width: min(360px, 100%);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.forum-cover-preview button {
    width: min(360px, 100%);
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    cursor: zoom-in;
    text-align: left;
}

.forum-cover-preview button img {
    width: 100%;
}

.forum-cover-preview button:hover img,
.forum-cover-preview button:focus-visible img {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.forum-cover-delete,
.forum-existing-attachment {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 38px;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
}

.forum-cover-delete {
    width: min(360px, 100%);
}

.forum-cover-delete input[type="checkbox"],
.forum-existing-attachment input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: var(--accent);
}

.forum-existing-attachments {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.forum-existing-attachments legend {
    padding: 0 0.25rem;
    color: var(--text);
    font-weight: 850;
}

.forum-existing-attachments p {
    margin: 0;
}

.forum-existing-attachment-list {
    display: grid;
    gap: 0.4rem;
}

.forum-existing-attachment span {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.forum-existing-attachment small {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--muted);
    font-weight: 750;
    white-space: nowrap;
}

.forum-thread-form textarea {
    min-height: 150px;
}

.forum-category-create {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 110px auto;
    gap: 0.65rem;
    align-items: center;
}

.forum-category-list {
    display: grid;
    gap: 0.55rem;
}

.forum-category-row {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) 96px auto auto auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.forum-list-head {
    align-items: center;
}

.forum-list-head > span {
    color: var(--muted);
    font-weight: 800;
}

.forum-filter-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.forum-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.forum-bookmarks-filter {
    flex: 0 0 auto;
    white-space: nowrap;
}

.forum-bookmarks-filter svg {
    width: 16px;
    height: 16px;
}

.forum-thread-list {
    display: grid;
    gap: 0.65rem;
}

.forum-thread-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: start;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    min-width: 0;
    scroll-margin-top: 96px;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.forum-thread-card.is-pinned {
    border-left-color: var(--focus);
    background: color-mix(in srgb, var(--focus) 8%, var(--surface));
}

.forum-thread-card:hover,
.forum-thread-card:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 14%, transparent);
    transform: translateY(-1px);
}

.forum-thread-card:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.forum-thread-side {
    display: grid;
    gap: 0.55rem;
    justify-items: end;
}

.forum-thread-side.has-cover {
    width: min(240px, 24vw);
}

.forum-thread-cover {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: inherit;
    cursor: zoom-in;
    text-align: left;
}

.forum-thread-cover:hover,
.forum-thread-cover:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

.forum-thread-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.forum-thread-main {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    min-width: 0;
}

.forum-thread-main h3 {
    flex: 1 0 100%;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.forum-thread-main h3 a {
    color: var(--text);
}

.forum-thread-main h3 a:hover {
    color: var(--accent-strong);
    text-decoration: none;
}

.forum-thread-main p {
    flex: 1 0 100%;
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.forum-thread-category,
.forum-pin {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.24rem 0.55rem;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 850;
}

.forum-pin {
    border-color: color-mix(in srgb, var(--focus) 48%, var(--border));
    background: color-mix(in srgb, var(--focus) 12%, var(--surface));
    color: var(--text);
}

.forum-thread-meta {
    flex: 1 0 100%;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 650;
}

.forum-thread-comment-summary {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-weight: 850;
}

.forum-thread-quick-actions {
    flex: 1 0 100%;
    position: relative;
    display: block;
    min-height: 42px;
    margin-top: 0.25rem;
}

.forum-thread-list-actions {
    grid-column: 1 / -1;
}

.forum-thread-quick-actions .forum-thread-comment-summary,
.forum-thread-quick-actions .forum-comments-summary {
    display: flex;
    width: auto;
    margin-right: 10.25rem;
}

.forum-detail-quick-actions {
    grid-column: 1 / -1;
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.forum-thread-quick-actions > .forum-comments-disclosure {
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.forum-bookmark-button {
    min-height: 42px;
    justify-content: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.forum-thread-quick-actions > .forum-bookmark-button {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
}

.forum-thread-comment-summary span:last-child {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.forum-thread-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.forum-thread-detail {
    border-left: 4px solid var(--accent);
}

.forum-thread-detail.is-pinned {
    border-left-color: var(--focus);
}

.forum-thread-detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
}

.forum-start-layout {
    display: grid;
    gap: 0.85rem;
}

.forum-start-layout.has-cover {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    align-items: stretch;
}

.forum-start-post {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.forum-start-post h2 {
    margin: 0;
    font-size: 1.08rem;
}

.forum-start-post .comment-body > :first-child {
    margin-top: 0;
}

.forum-start-post .comment-body > :last-child {
    margin-bottom: 0;
}

.forum-detail-cover {
    margin: 0;
    width: 100%;
    min-height: 0;
    padding: 0;
    align-self: stretch;
    aspect-ratio: 16 / 9;
    max-height: 220px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: inherit;
    cursor: zoom-in;
    text-align: left;
}

.forum-detail-cover:hover,
.forum-detail-cover:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

.forum-detail-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.forum-admin-edit {
    display: grid;
    gap: 0.85rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.forum-admin-edit summary {
    cursor: pointer;
    color: var(--accent-strong);
    font-weight: 850;
}

.forum-admin-edit[open] summary {
    margin-bottom: 0.75rem;
}

.forum-comments-disclosure,
.press-comments-disclosure {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.forum-comments-summary,
.press-comments-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
    min-width: 0;
}

.forum-comments-summary::marker,
.press-comments-summary::marker {
    color: var(--muted);
}

.forum-comments-summary span:last-child,
.press-comments-summary span:last-child {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.forum-comments-disclosure[open] .forum-comments-summary,
.press-comments-disclosure[open] .press-comments-summary {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.legislation-comments-disclosure.has-new-comments-for-user > .legislation-comments-summary,
.event-comments-disclosure.has-new-comments-for-user > .event-comments-summary,
.forum-comments-disclosure.has-new-comments-for-user > .forum-comments-summary,
.press-comments-disclosure.has-new-comments-for-user > .press-comments-summary,
.forum-thread-card.has-new-comments-for-user .forum-thread-comment-summary {
    border-color: #fa9136;
    box-shadow: 0 0 0 1px color-mix(in srgb, #fa9136 24%, transparent);
}

.forum-comments,
.press-comments {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: start;
    gap: 0.9rem;
}

.forum-comments-list-panel,
.forum-comment-entry-card,
.press-comments-list-panel,
.press-comment-entry-card {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.forum-comment-entry-card,
.press-comment-entry-card {
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.forum-comment-entry-card h4,
.press-comment-entry-card h4 {
    margin: 0;
    font-size: 1.12rem;
}

.forum-comment-notify,
.press-comment-notify {
    margin: 0;
    align-items: center;
}

.forum-comments .comment-form,
.forum-comments .comments-list,
.press-comments .comment-form,
.press-comments .comments-list {
    margin: 0;
}

.forum-comment-entry-card .button.primary,
.press-comment-entry-card .button.primary {
    width: 100%;
}

.press-comments-disclosure {
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-comments-summary {
    background: var(--surface-2);
}

.press-comments-list-panel {
    min-height: 220px;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-comments-list-panel .comment-section-head {
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.press-comments .comments-list {
    min-height: 110px;
}

.press-page {
    display: grid;
    gap: 0.85rem;
}

.press-page-head {
    align-items: center;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-page-head > div {
    display: grid;
    gap: 0.12rem;
    flex: 1;
    min-width: 0;
}

.press-page-head h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2.3vw, 2.15rem);
}

.press-page-head p {
    margin: 0;
    color: var(--muted);
}

.press-page-subline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.press-page-subline p {
    min-width: 0;
}

.press-page-subline span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 750;
    white-space: nowrap;
}

.press-detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.press-feed-live {
    display: block;
    min-height: 1.15rem;
    margin-top: 0.2rem;
    color: var(--muted);
    font-weight: 800;
}

.press-feed-live.is-success {
    color: var(--accent-strong);
}

.press-feed-live.is-error {
    color: var(--danger);
}

.press-filter-bar {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.48rem;
    align-items: end;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-filter-bar.has-status-filters {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.press-filter-mobile-toggle {
    display: none;
}

.press-filter-bar input,
.press-filter-bar select,
.press-work-card textarea {
    min-width: 0;
}

.press-filter-bar input,
.press-filter-bar select,
.press-filter-bar .button {
    min-height: 38px;
}

.press-filter-source {
    grid-column: 1 / span 2;
}

.press-filter-region {
    grid-column: 3 / span 2;
}

.press-filter-topic {
    grid-column: 5 / span 2;
}

.press-date-from {
    grid-column: 7 / span 2;
}

.press-date-to {
    grid-column: 9 / span 2;
}

.press-filter-submit {
    grid-column: 11 / span 2;
    width: 100%;
}

.press-date-control {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.press-date-control span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1;
}

.press-date-control input {
    width: 100%;
}

.press-date-control input::-webkit-date-and-time-value {
    min-height: 1.25em;
    text-align: left;
}

.press-filter-search {
    grid-column: 1 / span 4;
}

.press-filter-bar.has-status-filters .press-filter-search {
    grid-column: 1 / span 4;
}

.press-filter-status {
    display: flex;
    grid-column: 5 / span 4;
    gap: 0.36rem;
    align-items: center;
    align-self: stretch;
    flex-wrap: nowrap;
    min-width: 0;
}

.press-filter-actions {
    display: grid;
    grid-column: 9 / span 4;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 0.42rem;
    align-items: stretch;
    align-self: stretch;
    min-width: 0;
}

.press-filter-per-page {
    grid-column: 6 / 7;
    min-width: 130px;
}

.press-status-toggle {
    position: relative;
    display: inline-flex;
    min-width: 0;
    cursor: pointer;
}

.press-status-toggle input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.press-status-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.42rem 0.62rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 850;
    white-space: nowrap;
}

.press-status-toggle input:checked + span {
    border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    color: var(--accent-strong);
}

.press-status-toggle input:focus-visible + span {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.press-filter-create,
.press-filter-reset {
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding-inline: 0.62rem;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.press-list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    padding: 0.12rem 0.42rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-weight: 500;
}

.press-list-control-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.press-per-page-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.press-per-page-form .press-filter-per-page {
    box-sizing: border-box;
    height: 26px;
    min-height: 26px;
    padding: 0 2.05rem 0 0.7rem;
    font-weight: 700;
}

.press-keyword-toggle {
    height: 26px;
    min-height: 26px;
    gap: 0.36rem;
    margin: 0;
    padding: 0 0.52rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 90%, var(--surface-2));
}

.press-keyword-toggle .switch {
    width: 28px;
    height: 15px;
    border-color: color-mix(in srgb, var(--border) 82%, #94a3b8);
    background: color-mix(in srgb, var(--surface-2) 64%, #ffffff);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.press-keyword-toggle .switch::after {
    top: 1px;
    left: 1px;
    width: 11px;
    height: 11px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.press-keyword-toggle input:checked + .switch {
    border-color: #3c7c78;
    background: #3c7c78;
}

.press-keyword-toggle input:checked + .switch::after {
    transform: translateX(6px);
}

.press-keyword-toggle .switch-text {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 620;
    line-height: 1;
    white-space: nowrap;
}

.press-keyword-toggle:has(input:checked) .switch-text {
    color: var(--text);
}

.press-list-controls-bottom {
    margin-top: 0.2rem;
}

.press-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.press-pagination .button[aria-current="page"] {
    pointer-events: none;
}

.press-pagination .is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.press-pagination-gap {
    color: var(--muted);
    font-weight: 900;
    padding: 0 0.15rem;
}

.press-filter-loading {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    width: fit-content;
    padding: 0.45rem 0.7rem;
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
    color: var(--accent-strong);
    font-weight: 850;
}

.press-filter-loading[hidden] {
    display: none;
}

.press-filter-bar.is-filtering input,
.press-filter-bar.is-filtering select,
.press-filter-bar.is-filtering a.button,
.press-filter-bar.is-filtering label {
    opacity: 0.72;
}

.press-manual-form {
    gap: 1rem;
}

.press-manual-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
}

.press-source-other {
    grid-column: 1 / -1;
}

.press-linklist-range {
    display: grid;
    align-items: end;
    grid-template-columns: repeat(2, minmax(180px, 260px)) minmax(220px, 1fr) auto;
    gap: 0.85rem 1rem;
    margin: 1rem 0 1.35rem;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 42%, var(--surface));
}

.press-linklist-range .button {
    min-width: 160px;
    margin-left: 0.35rem;
}

.press-linklist-range .button.primary {
    width: 100%;
}

.press-linklist-form {
    gap: 1.15rem;
}

.press-linklist-subject {
    width: 100%;
}

.press-linklist-form label.press-linklist-recipient {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    align-self: flex-start;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    margin-top: -0.25rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 50%, var(--surface));
    color: var(--text);
    font-weight: 800;
    white-space: nowrap;
}

.press-linklist-recipient span {
    font-weight: 800;
}

.press-linklist-items {
    display: grid;
    gap: 0.7rem;
}

.press-linklist-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-linklist-item.is-dragging {
    opacity: 0.55;
    box-shadow: var(--shadow);
}

.press-linklist-item.is-excluded {
    border-left-color: var(--border);
    opacity: 0.62;
}

.press-linklist-item.is-nested {
    margin-left: 2.35rem;
    border-left-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    background: color-mix(in srgb, var(--surface-2) 58%, var(--surface));
}

.press-linklist-controls {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    justify-self: start;
}

.press-linklist-include-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 34px;
    cursor: pointer;
}

.press-linklist-include-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.press-linklist-include-switch {
    position: relative;
    width: 38px;
    height: 22px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.press-linklist-include-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.22);
    transition: transform 0.18s ease;
}

.press-linklist-include-toggle input:checked + .press-linklist-include-switch {
    border-color: var(--accent);
    background: var(--accent);
}

.press-linklist-include-toggle input:checked + .press-linklist-include-switch::after {
    transform: translateX(16px);
}

.press-linklist-include-toggle input:focus-visible + .press-linklist-include-switch {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.press-linklist-drag,
.press-linklist-nest-toggle {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 900;
}

.press-linklist-drag {
    cursor: grab;
}

.press-linklist-drag:active {
    cursor: grabbing;
}

.press-linklist-nest-toggle {
    cursor: pointer;
}

.press-linklist-nest-toggle:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.press-linklist-nest-toggle span {
    font-size: 1.1rem;
    line-height: 1;
}

.press-linklist-main {
    min-width: 0;
}

.press-linklist-item strong,
.press-linklist-item a {
    display: block;
}

.press-linklist-item a {
    margin-top: 0.35rem;
    color: var(--accent-strong);
    overflow-wrap: anywhere;
}

.press-linklist-authors {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.press-linklist-authors label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 36px;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    font-weight: 800;
}

.press-linklist-authors label:has(input:checked) {
    border-color: var(--accent);
    color: var(--accent-strong);
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.press-linklist-preview {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    line-height: 1.5;
    min-height: 320px;
}

.press-topic-select {
    margin: 0;
}

.press-article-list {
    display: grid;
    gap: 0.65rem;
}

.press-article-card,
.press-detail-card,
.press-work-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
    min-width: 0;
}

.press-article-card {
    position: relative;
    scroll-margin-top: 96px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.press-article-card[data-card-url] {
    cursor: pointer;
}

.press-article-card[data-card-url] .press-article-meta,
.press-article-card[data-card-url] .press-article-comments-disclosure {
    cursor: auto;
}

.press-detail-card {
    position: relative;
}

.press-detail-primary-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.press-detail-primary-actions .button.primary {
    flex: 1 1 18rem;
}

.press-article-card.has-press-flags,
.press-detail-card.has-press-flags {
    padding-right: 4.35rem;
}

.press-flags {
    position: absolute;
    top: -1px;
    right: 0.9rem;
    z-index: 3;
    display: inline-flex;
    align-items: flex-start;
    gap: 0.22rem;
}

.press-sachsen-update-flag {
    --mark-color: #f97316;
}

.press-marked-flag {
    --mark-color: #22d3ee;
}

.press-article-card-main,
.press-article-meta {
    position: relative;
    z-index: 2;
}

.press-article-card-main {
    pointer-events: none;
}

.press-article-source-line {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    align-items: baseline;
}

.press-article-inline-date {
    color: var(--muted);
}

.press-article-inline-author {
    color: var(--muted);
    text-transform: none;
}

.press-article-card-main a,
.press-article-meta a,
.press-article-meta form,
.press-article-meta button {
    pointer-events: auto;
}

.press-article-comment-summary {
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.68rem 0.78rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    font-weight: 850;
    pointer-events: none;
}

.press-article-comment-summary span:last-child {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.press-article-comments-disclosure {
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
    pointer-events: auto;
    padding: 0.55rem 0 0;
    border: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    gap: 0.85rem;
}

.press-article-comments-disclosure .press-comments-list-panel {
    min-height: 150px;
}

.press-article-comments-disclosure .press-comments {
    margin-top: 0.25rem;
}

.press-article-comments-disclosure .press-comment-entry-card {
    background: var(--surface-2);
}

.press-article-quick-actions {
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
    display: block;
    min-height: 42px;
    pointer-events: auto;
}

.press-article-quick-actions > .press-article-comments-disclosure {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
    padding-top: 0;
}

.press-article-quick-actions > .press-article-comments-disclosure > .press-comments-summary {
    margin-right: 10.25rem;
}

.press-article-mobile-original-link {
    display: none;
}

.press-bookmark-button {
    min-height: 42px;
    justify-content: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.press-article-quick-actions > .press-bookmark-button {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
}

.press-bookmark-button svg,
.legislation-bookmark-button svg,
.forum-bookmark-button svg {
    width: 18px;
    height: 18px;
}

.press-bookmark-button.is-active,
.legislation-bookmark-button.is-active,
.forum-bookmark-button.is-active {
    border-color: color-mix(in srgb, #2563eb 48%, var(--border));
    background: color-mix(in srgb, #2563eb 11%, var(--surface-2));
    color: #1d4ed8;
}

.press-bookmark-button.is-active svg,
.legislation-bookmark-button.is-active svg,
.forum-bookmark-button.is-active svg {
    fill: currentColor;
}

[data-theme="dark"] .press-bookmark-button.is-active,
[data-theme="dark"] .legislation-bookmark-button.is-active,
[data-theme="dark"] .forum-bookmark-button.is-active {
    color: #93c5fd;
}

.press-article-card h2,
.press-detail-card h1 {
    margin: 0;
}

.press-article-card h2 {
    font-size: 1.05rem;
}

.press-article-card h2 a {
    color: var(--text);
    text-decoration: none;
}

.press-article-card h2 a:hover,
.press-article-card h2 a:focus-visible {
    color: var(--accent-strong);
}

.press-article-card p,
.press-detail-card p {
    margin: 0;
}

.press-page:not(.is-keyword-highlight-enabled) .press-keyword-highlight {
    background: transparent;
    color: inherit;
}

.press-page.is-keyword-highlight-enabled .press-keyword-highlight {
    background: #3c7c78;
    color: #ffffff;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.press-article-card-main,
.press-article-meta,
.press-detail-meta,
.press-topic-row,
.press-work-card form {
    display: grid;
    gap: 0.5rem;
}

.press-article-meta {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.6rem;
    min-width: 205px;
    color: var(--muted);
    font-size: 0.9rem;
}

.press-article-action-flags {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.22rem;
    padding-top: 0.1rem;
}

.press-article-actions {
    display: grid;
    gap: 0.42rem;
    justify-items: stretch;
    min-width: 0;
}

.press-article-actions form,
.press-detail-actions form {
    margin: 0;
}

.press-article-actions .button {
    justify-content: center;
}

.press-manual-delete-form {
    justify-self: start;
    margin-top: 0.8rem;
}

.press-detail-meta,
.press-topic-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.press-detail-meta {
    gap: 0.35rem 0.8rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.press-topic-row {
    gap: 0.35rem;
}

.press-match-reason {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 500;
}

.press-status-tag {
    --press-status-color: var(--accent);
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.18rem 0.48rem;
    border: 1px solid color-mix(in srgb, var(--press-status-color) 48%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--press-status-color) 13%, var(--surface));
    color: color-mix(in srgb, var(--press-status-color) 78%, var(--text));
    font-size: 0.82rem;
    font-weight: 850;
}

.press-status-tag.is-sachsen-update {
    --press-status-color: #f97316;
}

.press-status-tag.is-marked {
    --press-status-color: #22d3ee;
}

.press-work-card {
    border-left-color: var(--focus);
    background: var(--surface-2);
}

.press-work-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    min-width: 0;
}

.press-work-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.press-hide-form {
    margin: 0;
}

.press-article-card.is-removing {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
}

.press-work-card h2 {
    margin: 0;
    font-size: 1.15rem;
}

.press-work-badge {
    --press-work-badge-color: var(--muted);
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.28rem 0.6rem;
    border: 1px solid color-mix(in srgb, var(--press-work-badge-color) 34%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--press-work-badge-color) 7%, var(--surface));
    color: color-mix(in srgb, var(--press-work-badge-color) 64%, var(--text));
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.press-work-badge.is-planned {
    --press-work-badge-color: #f97316;
}

.press-work-badge.is-marked {
    --press-work-badge-color: #22d3ee;
}

.press-work-status-button {
    --press-work-status-color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.28rem 0.6rem;
    border: 1px solid color-mix(in srgb, var(--press-work-status-color) 34%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--press-work-status-color) 7%, var(--surface));
    color: color-mix(in srgb, var(--press-work-status-color) 64%, var(--text));
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.press-work-status-button.is-marked {
    --press-work-status-color: #22d3ee;
}

.press-work-status-button.is-sachsen-update {
    --press-work-status-color: #f97316;
}

.press-work-status-button.is-active {
    border-color: color-mix(in srgb, var(--press-work-status-color) 72%, var(--border));
    background: color-mix(in srgb, var(--press-work-status-color) 17%, var(--surface));
    color: color-mix(in srgb, var(--press-work-status-color) 82%, var(--text));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--press-work-status-color) 24%, transparent);
}

.press-work-status-button:hover,
.press-work-status-button:focus-visible {
    border-color: color-mix(in srgb, var(--press-work-status-color) 78%, var(--border));
    background: color-mix(in srgb, var(--press-work-status-color) 20%, var(--surface));
    color: var(--text);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--press-work-status-color) 14%, transparent);
}

.press-work-status-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.press-work-view {
    display: grid;
    gap: 0.65rem;
}

.press-work-switch {
    align-self: start;
    margin: 0 0 0.35rem;
}

.press-work-editor-field {
    display: grid;
    gap: 0.45rem;
}

.press-work-editor-label {
    color: var(--muted);
    font-weight: 850;
}

.press-work-empty {
    margin: 0;
    padding: 0.85rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 68%, transparent);
    color: var(--muted);
    font-weight: 700;
}

.press-work-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-work-file span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 850;
    text-transform: uppercase;
}

.press-work-file a {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--accent-strong);
    font-weight: 850;
    text-decoration: none;
}

.press-work-file a:hover,
.press-work-file a:focus-visible {
    text-decoration: underline;
}

.press-work-edit-panel {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.press-work-edit-panel > summary {
    width: max-content;
    list-style: none;
}

.press-work-edit-panel > summary::-webkit-details-marker {
    display: none;
}

.press-work-edit-panel[open] > summary {
    margin-bottom: 0.75rem;
}

.press-internal-preview {
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-internal-preview > :first-child {
    margin-top: 0;
}

.press-internal-preview > :last-child {
    margin-bottom: 0;
}

.comment-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.comment-section-head h4 {
    margin: 0;
    font-size: 1rem;
}

.leaflet-container {
    font: inherit;
    background: var(--surface-2);
}

.map-reset-control .map-reset-button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: #fff;
    color: #111827;
    cursor: pointer;
}

.map-reset-control .map-reset-button:hover,
.map-reset-control .map-reset-button:focus-visible {
    background: #f4f6f8;
    color: #0f766e;
}

.map-reset-control .map-reset-button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
}

.map-reset-control .map-reset-button svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.saxony-night-mask {
    fill-opacity: 0;
    pointer-events: none;
}

.legislation-item.is-new-for-user,
.event-card.is-new-for-user,
.press-article-card.is-new-for-user,
.forum-thread-card.is-new-for-user,
.forum-thread-card.is-pinned.is-new-for-user {
    border-color: #fa9136;
    border-left-color: #fa9136;
    box-shadow: 0 0 0 2px color-mix(in srgb, #fa9136 38%, transparent);
}

.press-article-card.is-new-for-user {
    box-shadow: 0 0 0 2px color-mix(in srgb, #fa9136 42%, transparent), 0 10px 22px color-mix(in srgb, #fa9136 14%, transparent);
}

.legislation-item.is-new-for-user:hover,
.legislation-item.is-new-for-user:focus-within,
.event-card.is-new-for-user:hover,
.event-card.is-new-for-user:focus-within,
.forum-thread-card.is-new-for-user:hover,
.forum-thread-card.is-new-for-user:focus-visible {
    border-color: #fa9136;
    border-left-color: #fa9136;
    box-shadow: 0 0 0 2px color-mix(in srgb, #fa9136 42%, transparent), 0 10px 22px color-mix(in srgb, #fa9136 14%, transparent);
}

.press-article-card.is-new-for-user:hover,
.press-article-card.is-new-for-user:focus-within {
    border-color: #fa9136;
    border-left-color: #fa9136;
    box-shadow: 0 0 0 2px color-mix(in srgb, #fa9136 42%, transparent), 0 10px 22px color-mix(in srgb, #fa9136 14%, transparent);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .saxony-night-mask {
        fill-opacity: 0.54;
    }
}

[data-theme="dark"] .saxony-night-mask {
    fill-opacity: 0.54;
}

[data-theme="light"] .saxony-night-mask {
    fill-opacity: 0;
}

.map-popup {
    display: grid;
    gap: 0.45rem;
    min-width: 260px;
}

.map-popup strong { font-size: 1rem; }
.map-popup span { color: #4b5563; }

.regional-planning-popup ul {
    margin: 0;
    padding-left: 1.1rem;
    color: #334155;
}

.regional-planning-popup li + li {
    margin-top: 0.15rem;
}

.regional-planning-label {
    width: min(220px, 28vw);
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.regional-planning-label span,
.regional-planning-label strong {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-inline: auto;
    padding: 0.18rem 0.34rem;
    border-radius: 4px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--text);
    text-align: center;
    line-height: 1.1;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
    white-space: normal;
}

.regional-planning-label span {
    font-size: 0.74rem;
    font-weight: 850;
}

.regional-planning-label strong {
    margin-top: 0.12rem;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 750;
}

@media (max-width: 960px) {
    .regional-planning-map-layout {
        grid-template-columns: 1fr;
    }

    .regional-planning-page .regional-planning-map {
        height: 54vh;
        min-height: 360px;
    }

    .regional-planning-legend {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .regional-planning-meta,
    .regional-planning-comments {
        grid-template-columns: 1fr;
    }

    .regional-planning-label {
        width: min(180px, 38vw);
    }
}

@media (max-width: 640px) {
    .regional-planning-page .regional-planning-map {
        min-height: 320px;
    }

    .regional-planning-legend {
        grid-template-columns: 1fr;
    }

    .regional-planning-label {
        width: 42vw;
    }

    .regional-planning-label span {
        font-size: 0.66rem;
    }

    .regional-planning-label strong {
        display: none;
    }

    .regional-planning-panel-head {
        display: grid;
    }

    .regional-planning-panel-actions {
        justify-content: stretch;
    }

    .regional-planning-panel-actions > * {
        width: 100%;
    }

    .regional-planning-website-button {
        justify-self: stretch;
        justify-content: center;
        white-space: normal;
    }
}

.map-popup a,
.panel-head h2 a,
.profile-mini-photo a {
    color: inherit;
    text-decoration: none;
}

.map-popup a:hover,
.panel-head h2 a:hover,
.profile-mini-photo a:hover {
    text-decoration: underline;
}

.popup-mandates {
    display: grid;
    gap: 0.45rem;
}

.popup-mandate-divider {
    height: 1px;
    background: var(--border);
    margin: 0.1rem 0;
}

.popup-mandate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    border-left: 5px solid var(--party-color, #6b7280);
    padding: 0.45rem 0 0.45rem 0.55rem;
}

.popup-mandate.is-marked,
.popup-mandate.has-status-flags {
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 0.42rem;
}

.popup-mark-slot {
    display: flex;
    align-self: stretch;
    align-items: start;
    justify-content: center;
    gap: 0.18rem;
    padding-top: 0.05rem;
}

.popup-mark-slot .mark-badge {
    width: 14px;
    height: 22px;
}

.popup-mandate div {
    display: grid;
    gap: 0.1rem;
}

.popup-mandate .button {
    justify-self: end;
}

.popup-mandate span {
    font-size: 0.86rem;
}

.mandate-marker {
    background: transparent;
}

.mandate-marker span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    border: 3px solid var(--accent);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.24);
    font-weight: 900;
}

.marked-politician-marker {
    background: transparent;
}

.marked-politician-marker span,
.planned-meeting-politician-marker span {
    width: 28px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 2px 2px 4px 4px;
    background: #22d3ee;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
    color: #083344;
    border: 0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
    font-weight: 900;
    font-size: 0.82rem;
}

.planned-meeting-politician-marker {
    background: transparent;
}

.planned-meeting-politician-marker span {
    background: #cbd5e1;
    color: #334155;
}

.planned-meeting-politician-marker.is-coordinating span {
    background: #fde047;
    color: #713f12;
}

.planned-meeting-politician-marker.is-planned span {
    background: #86efac;
    color: #14532d;
}

.side-panel {
    position: fixed;
    top: 84px;
    right: 1rem;
    width: min(440px, calc(100vw - 2rem));
    max-height: calc(100vh - 108px);
    overflow: auto;
    transform: translateX(calc(100% + 2rem));
    transition: transform 180ms ease;
    z-index: 80;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
}

.side-panel.is-open {
    transform: translateX(0);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.panel-head h2 { margin: 0.2rem 0 0; }

.eyebrow {
    color: var(--accent-strong);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0;
}

.profile-compact {
    display: grid;
    gap: 0.5rem;
    padding: 0.85rem;
    background: var(--surface-2);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.profile-mini-photo {
    display: grid;
    gap: 0.35rem;
    margin: 0 0 0.3rem;
}

.profile-mini-photo img {
    width: 96px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--surface);
}

.profile-mini-photo a {
    width: max-content;
    display: block;
}

.profile-mini-photo figcaption {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.3;
}

.switch-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.8rem 0;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.switch-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.switch {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.24);
    transition: transform 0.18s ease;
}

.switch-row input:checked + .switch {
    border-color: var(--accent);
    background: var(--accent);
}

.switch-row input:checked + .switch::after {
    transform: translateX(20px);
}

.regional-planning-admin-switch {
    position: relative;
    justify-self: start;
}

.regional-planning-admin-switch input {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 2;
    width: 48px;
    height: 28px;
    margin: 0;
    padding: 0;
    clip: auto;
    opacity: 0;
    cursor: pointer;
    transform: translateY(-50%);
}

label.press-keyword-toggle input:checked + .switch {
    border-color: #3c7c78;
    background: #3c7c78;
}

label.press-keyword-toggle input:checked + .switch::after {
    transform: translateX(13px);
}

.switch-row input:focus-visible + .switch {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.switch-row input:disabled + .switch,
.switch-row input:disabled ~ .switch-text {
    opacity: 0.55;
    cursor: progress;
}

.switch-row.is-global-active input:disabled + .switch,
.switch-row.is-global-active input:disabled ~ .switch-text {
    opacity: 1;
    cursor: not-allowed;
}

.switch-text {
    font-weight: 700;
}

.switch-row-compact {
    min-height: 42px;
    margin: 0;
    padding: 0.42rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.switch-row-compact .switch-text {
    max-width: 11rem;
    font-size: 0.9rem;
    line-height: 1.15;
    text-align: left;
}

.global-notify .switch-text {
    max-width: none;
    white-space: nowrap;
}

.user-rights-create {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.45rem;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.user-rights-create-secondary {
    grid-column: auto;
}

.admin-user-management-card {
    display: grid;
    gap: 0.85rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
}

.admin-user-management-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-user-management-head h2 {
    margin: 0;
    font-size: 1.18rem;
}

.admin-user-management-head p {
    margin: 0.2rem 0 0;
}

.admin-role-create-form,
.admin-user-create-form {
    margin: 0;
}

.admin-role-create-form {
    grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(150px, 0.45fr);
}

.admin-role-create-form input {
    min-width: 190px;
}

.admin-user-create-form {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
}

.admin-user-create-form > .button {
    justify-self: start;
    min-width: 210px;
}

.admin-role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.1rem;
}

.admin-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 42px;
    padding: 0.42rem 0.5rem 0.42rem 0.7rem;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent) 7%, var(--surface-2));
}

.admin-role-pill > span {
    display: inline-grid;
    gap: 0.1rem;
    min-width: 0;
    font-weight: 850;
}

.admin-role-pill small {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 750;
}

.admin-role-pill.is-system {
    border-color: var(--border);
    background: var(--surface-2);
}

.admin-forum-role-form {
    display: grid;
    gap: 1rem;
}

.admin-forum-role-list {
    display: grid;
    gap: 0.8rem;
}

.admin-forum-role-card {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
}

.admin-forum-role-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-forum-role-card h2 {
    margin: 0;
    font-size: 1rem;
}

.admin-forum-role-card p {
    margin: 0.18rem 0 0;
}

.admin-forum-role-options {
    align-items: stretch;
}

.admin-forum-role-open {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.user-rights-cell {
    min-width: 360px;
}

.user-rights-block {
    display: grid;
    gap: 0.5rem;
}

.admin-user-identity-cell,
.admin-user-access-cell {
    min-width: 230px;
}

.admin-user-field {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 0.55rem;
}

.admin-user-field:last-child {
    margin-bottom: 0;
}

.admin-user-field span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.user-rights-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.user-rights-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.admin-users-table .user-role-options {
    display: grid;
    grid-template-columns: minmax(210px, 240px);
    align-items: stretch;
}

.admin-users-table .user-area-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(170px, 210px));
    align-items: stretch;
}

.admin-users-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.admin-user-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
}

.admin-user-card[open] {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 8%, transparent);
}

.admin-user-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    list-style: none;
}

.admin-user-summary::-webkit-details-marker {
    display: none;
}

.admin-user-summary-grid {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.85fr) minmax(210px, 1.15fr) minmax(130px, 0.72fr);
    gap: 0.8rem;
    align-items: center;
    min-width: 0;
}

.admin-user-summary-item {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.admin-user-summary-item > span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
}

.admin-user-summary-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-summary-login strong {
    font-size: 0.9rem;
}

.admin-user-toggle {
    min-width: 128px;
    pointer-events: none;
}

.admin-user-toggle i {
    width: 17px;
    height: 17px;
    transition: transform 0.16s ease;
}

.admin-user-toggle-close,
.admin-user-card[open] .admin-user-toggle-open {
    display: none;
}

.admin-user-card[open] .admin-user-toggle-close {
    display: inline;
}

.admin-user-card[open] .admin-user-toggle i {
    transform: rotate(180deg);
}

.admin-user-detail {
    display: grid;
    grid-template-columns: minmax(230px, 0.85fr) minmax(230px, 0.85fr) minmax(350px, 1.25fr) minmax(180px, 0.6fr);
    gap: 1rem;
    padding: 0.95rem;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-2) 42%, var(--surface));
}

.admin-user-detail-section {
    display: grid;
    gap: 0.55rem;
    align-content: start;
}

.admin-user-detail-section h3 {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-user-card .user-role-options {
    display: grid;
    grid-template-columns: minmax(210px, 240px);
    align-items: stretch;
}

.admin-user-card .user-area-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(165px, 210px));
    align-items: stretch;
}

.admin-user-card .user-rights-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
}

.admin-user-card .user-rights-check span {
    min-width: 0;
}

.admin-user-meta {
    display: grid;
    gap: 0.15rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.admin-user-meta span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.admin-user-actions {
    align-items: stretch;
}

.user-rights-switch {
    min-width: 145px;
    margin: 0;
    background: var(--surface-2);
}

.user-rights-check {
    min-height: 36px;
    margin: 0;
    padding: 0.42rem 0.58rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 750;
}

.admin-users-table .user-rights-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
}

.admin-users-table .user-rights-check span {
    min-width: 0;
}

.user-rights-check input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.user-rights-check:has(input:checked) {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.user-rights-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.user-rights-note {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.admin-user-autosave-status {
    min-height: 1rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-user-autosave-status.is-success {
    color: var(--accent-strong);
}

.admin-user-autosave-status.is-error {
    color: var(--danger);
}

.comment-form {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0;
}

.wysiwyg-field {
    display: grid;
    gap: 0.45rem;
    align-items: start;
}

.wysiwyg-field-label {
    color: var(--muted);
    font-weight: 850;
}

.comment-toolbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.format-select {
    width: auto;
    min-height: 38px;
    padding: 0.38rem 2rem 0.38rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 750;
}

.comment-toolbar .icon-button {
    width: 38px;
    height: 38px;
}

.comment-toolbar .icon-button.is-active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
    color: var(--accent-strong);
}

.comment-editor {
    width: 100%;
    min-height: 7.5rem;
    max-height: 22rem;
    overflow: auto;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    padding: 0.72rem 0.78rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.comment-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}

.comment-editor ul,
.comment-editor ol {
    margin: 0.35rem 0 0.35rem 1.2rem;
    padding: 0;
}

.comment-editor p,
.comment-editor h1,
.comment-editor h2,
.comment-editor h3 {
    margin: 0 0 0.65rem;
}

.comment-editor h1 {
    font-size: 1.45rem;
    line-height: 1.15;
}

.comment-editor h2 {
    font-size: 1.2rem;
    line-height: 1.2;
}

.comment-editor h3 {
    font-size: 1.05rem;
    line-height: 1.25;
}

.comment-editor a {
    text-decoration: underline;
}

.comment-mention,
.comment-editor span[data-mention-user-id],
.comment-editor span[data-mention-politician-id] {
    display: inline-block;
    padding: 0.05rem 0.32rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 13%, var(--surface));
    color: var(--accent-strong);
    font-weight: 850;
}

.comment-mention:hover,
.comment-mention:focus-visible {
    color: #fff;
    background: var(--accent);
    text-decoration: none;
}

.comment-mention-politician {
    background: color-mix(in srgb, var(--focus) 16%, var(--surface));
}

.mention-menu {
    display: grid;
    gap: 0.2rem;
    max-height: 14rem;
    overflow: auto;
    margin-top: -0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    z-index: 30;
}

.mention-menu[hidden] {
    display: none;
}

.mention-menu button {
    display: grid;
    gap: 0.12rem;
    width: 100%;
    padding: 0.48rem 0.55rem;
    border: 0;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mention-menu button:hover,
.mention-menu button:focus-visible {
    background: var(--surface-2);
    outline: none;
}

.mention-menu strong {
    font-size: 0.92rem;
}

.mention-menu span {
    color: var(--muted);
    font-size: 0.82rem;
}

.wysiwyg-source {
    display: none;
}

.file-upload {
    display: grid;
    gap: 0.35rem;
    padding: 0.7rem 0.75rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-weight: 800;
}

.file-upload input {
    width: 100%;
    color: var(--text);
    font: inherit;
    font-weight: 650;
}

.file-upload span {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 650;
}

.comments-list {
    display: grid;
    gap: 0.75rem;
}

.comment-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comment-list-head h2 {
    margin: 0;
}

.comment-sort {
    display: none;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
}

.has-sortable-comments .comment-sort {
    display: flex;
}

.comment-sort .button {
    min-height: 34px;
}

.comment-sort .button.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.comment-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem;
    background: var(--surface);
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.comment-body {
    margin-top: 0.65rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.comment-body :first-child {
    margin-top: 0;
}

.comment-body :last-child {
    margin-bottom: 0;
}

.comment-body ul,
.comment-body ol {
    margin: 0.45rem 0 0.45rem 1.2rem;
    padding: 0;
}

.comment-body p {
    margin: 0 0 0.65rem;
}

.comment-body h1,
.comment-body h2,
.comment-body h3,
.comment-body h4 {
    margin: 0.25rem 0 0.45rem;
    line-height: 1.15;
}

.comment-body h1 {
    font-size: clamp(1.35rem, 2.4vw, 1.65rem);
}

.comment-body h2 {
    font-size: clamp(1.18rem, 2vw, 1.35rem);
}

.comment-body h3,
.comment-body h4 {
    font-size: 1.05rem;
}

.comment-body a {
    color: var(--accent);
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.comment-attachments {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.7rem;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.comment-attachments > strong {
    font-size: 0.9rem;
}

.comment-attachments ul {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.comment-attachments li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.comment-attachments a {
    color: var(--accent);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.comment-attachments span {
    color: var(--muted);
    font-size: 0.84rem;
    white-space: nowrap;
}

.comment-attachment-previews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 250px));
    gap: 0.55rem;
    align-items: start;
}

.comment-attachment-preview {
    display: grid;
    gap: 0.4rem;
    width: min(250px, 100%);
    max-width: 250px;
    min-width: 0;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.comment-attachment-preview:hover,
.comment-attachment-preview:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.comment-attachment-preview img {
    display: block;
    width: min(250px, 100%);
    max-width: 250px;
    height: min(250px, 60vw);
    max-height: 250px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 3px);
    background: var(--surface-2);
}

.comment-attachment-preview span {
    overflow: hidden;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.6rem;
}

.comment-edit-form {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.comment-edit-label {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 850;
}

.comment-edit-form textarea {
    width: 100%;
    min-height: 11rem;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    line-height: 1.45;
    padding: 0.72rem 0.78rem;
}

.comment-edit-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.comment-item.is-linked-comment {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 24%, transparent);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
    align-items: start;
    gap: 1rem;
    padding-top: 1rem;
}

.profile-stack {
    display: grid;
    gap: 1rem;
}

.profile-main, .comment-card, .comment-history-card, .page-section, .admin-panel, .metric, .admin-columns article, .upload-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.profile-main {
    position: relative;
    border-left: 8px solid var(--party-color, var(--accent));
    min-width: 0;
}

.profile-main > .profile-status-flags {
    position: absolute;
    top: -1px;
    right: 1rem;
    display: inline-flex;
    align-items: flex-start;
    gap: 0.24rem;
}

.profile-main > .profile-status-flags:empty,
.profile-main > .profile-status-flags[hidden] {
    display: none;
}

.profile-main > .profile-status-flags .mark-badge {
    width: 20px;
    height: 32px;
}

.comment-card {
    position: sticky;
    top: 82px;
}

.politician-status-actions {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
}

.politician-status-actions form {
    margin: 0;
}

.politician-status-actions .button {
    width: 100%;
}

.politician-meeting-toggle svg,
.politician-mark-toggle svg {
    width: 18px;
    height: 18px;
}

.politician-meeting-toggle svg {
    color: var(--muted);
}

.politician-meeting-toggle.is-coordinating {
    border-color: color-mix(in srgb, #fde047 64%, var(--border));
    background: color-mix(in srgb, #fde047 20%, var(--surface));
    color: #713f12;
}

.politician-meeting-toggle.is-coordinating svg {
    color: #ca8a04;
}

.politician-meeting-toggle.is-planned {
    border-color: color-mix(in srgb, #86efac 64%, var(--border));
    background: color-mix(in srgb, #86efac 18%, var(--surface));
    color: #166534;
}

.politician-meeting-toggle.is-planned svg {
    color: #16a34a;
}

.politician-mark-toggle.is-active {
    border-color: color-mix(in srgb, #22d3ee 56%, var(--border));
    background: color-mix(in srgb, #22d3ee 13%, var(--surface));
    color: #0e7490;
}

.politician-mark-toggle.is-active svg {
    fill: currentColor;
}

.panel-status-actions {
    margin: 0.7rem 0 0.2rem;
}

.comment-card h2 {
    margin-top: 0;
}

.profile-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.profile-header > div {
    min-width: 0;
}

.profile-header img, .photo-placeholder {
    width: 112px;
    height: 140px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--surface-2);
}

.profile-photo-button {
    display: block;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: inherit;
    cursor: zoom-in;
}

.profile-photo-button img {
    display: block;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.profile-photo-button:hover img {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--party-color, var(--accent)) 24%, transparent);
}

.profile-photo-button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.photo-placeholder {
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 900;
}

.profile-header h1 {
    margin: 0.2rem 0;
    overflow-wrap: anywhere;
}

.profile-header p {
    overflow-wrap: anywhere;
}

.photo-credit {
    max-width: 42rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.has-photo-modal {
    overflow: hidden;
}

.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.photo-modal[hidden] {
    display: none;
}

.photo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(3px);
}

.photo-modal-card {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(80vw, 1440px);
    max-width: calc(100vw - 2rem);
    max-height: min(82vh, calc(100vh - 2rem));
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-left: 8px solid var(--party-color, var(--accent));
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

.photo-modal-card.is-low-resolution {
    width: min(360px, calc(100vw - 2rem));
}

.photo-modal-card img {
    width: 100%;
    max-height: calc(82vh - 4.5rem);
    object-fit: contain;
    background: var(--surface-2);
}

.attachment-image-modal .photo-modal-card {
    width: min(80vw, 1440px);
    max-width: calc(100vw - 2rem);
    border-left-color: var(--accent);
}

.attachment-image-modal .photo-modal-card img {
    max-height: calc(82vh - 4.5rem);
}

.photo-modal-card.is-low-resolution img {
    width: auto;
    max-width: 100%;
    justify-self: center;
}

.photo-modal-card figcaption {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem 1rem;
}

.photo-modal-card figcaption strong {
    font-size: 1.25rem;
    line-height: 1.15;
}

.photo-modal-card figcaption span {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 0.2rem 0.5rem;
    border-left: 5px solid var(--party-color, var(--accent));
    border-radius: 4px;
    background: color-mix(in srgb, var(--party-color, var(--accent)) 12%, var(--surface));
    color: var(--text);
    font-weight: 850;
}

.photo-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow);
}

.profile-contact-grid {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(260px, 1fr);
    gap: 1.2rem;
    align-items: start;
    min-width: 0;
}

.details-list {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0.8rem 1rem;
    min-width: 0;
    margin: 0;
}

.details-list dt {
    color: var(--muted);
    font-weight: 750;
    line-height: 1.35;
}

.details-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.details-list a,
.profile-note p,
.profile-header p,
.photo-credit,
.profile-list strong,
.profile-list span,
.profile-chip-list span,
.profile-chip-list a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile-note {
    min-height: 100%;
    border-left: 1px solid var(--border);
    padding-left: 1.2rem;
    padding-top: 0.02rem;
    min-width: 0;
}

.profile-note p {
    margin: 0;
    color: var(--text);
    line-height: 1.35;
}

.profile-section {
    margin-top: 1.2rem;
    min-width: 0;
}

.profile-section h2 {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
}

.profile-disclosure {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.profile-disclosure summary,
.profile-mini-disclosure summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--text);
    font-weight: 850;
    cursor: pointer;
    list-style: none;
}

.profile-disclosure summary::-webkit-details-marker,
.profile-mini-disclosure summary::-webkit-details-marker {
    display: none;
}

.profile-disclosure summary::after,
.profile-mini-disclosure summary::after {
    content: "+";
    width: 1.55rem;
    height: 1.55rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 900;
}

.profile-disclosure[open] summary::after,
.profile-mini-disclosure[open] summary::after {
    content: "-";
}

.profile-disclosure summary small,
.profile-mini-disclosure summary small {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.profile-disclosure .profile-list {
    margin-top: 0.65rem;
}

.profile-list {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.profile-list article {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.profile-list span {
    color: var(--muted);
    font-size: 0.92rem;
}

.profile-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.profile-chip-list span,
.profile-chip-list a {
    max-width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-weight: 700;
}

.profile-mini-section {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.profile-mini-section h3 {
    margin: 0;
    font-size: 0.9rem;
}

.profile-settings-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.profile-settings-card h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.profile-settings-card-start .profile-start-page {
    max-width: 28rem;
}

.profile-start-page select {
    min-height: 44px;
}

.profile-theme-toggle {
    justify-self: start;
    gap: 0.5rem;
}

.profile-theme-toggle svg {
    width: 18px;
    height: 18px;
}

.profile-account-panel {
    width: 100%;
}

.profile-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.1rem;
}

.profile-subnav .button {
    min-width: 0;
}

.profile-subnav .button.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.profile-account-section {
    display: grid;
    gap: 1rem;
}

.profile-digest-window {
    display: grid;
    gap: 1.2rem;
    margin-top: 1rem;
}

.profile-digest-window-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid var(--border);
}

.profile-digest-window-head h2 {
    margin: 0.2rem 0 0;
    font-size: 1.35rem;
}

.profile-digest-head-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.45rem;
    align-items: flex-end;
    justify-content: flex-start;
}

.profile-digest-master-toggle {
    margin: 0;
}

.profile-digest-master-toggle .switch-text {
    max-width: none;
    white-space: nowrap;
}

.profile-digest-enabled-state {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.profile-digest-enabled-state:empty {
    display: none;
}

.profile-digest-enabled-state[data-state="ok"] {
    color: var(--accent-strong);
}

.profile-digest-enabled-state[data-state="error"] {
    color: var(--danger);
}

.profile-digest-window.is-digest-disabled .profile-digest-row {
    opacity: 0.68;
}

.profile-digest-count {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
    white-space: nowrap;
}

.profile-digest-intro {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.profile-digest-form {
    display: grid;
    gap: 0.85rem;
}

.profile-digest-keywords {
    display: grid;
    gap: 0.42rem;
    padding: 0.78rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 48%, var(--surface));
}

.profile-digest-keywords label {
    color: var(--text);
    font-weight: 850;
}

.profile-digest-keywords textarea {
    min-height: 86px;
    resize: vertical;
}

.profile-digest-keyword-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: start;
}

.profile-digest-keyword-footer p {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-digest-keyword-actions {
    flex: 0 0 auto;
    display: grid;
    gap: 0.32rem;
    justify-items: end;
    margin-left: auto;
}

.profile-digest-keyword-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-end;
}

.profile-digest-keyword-actions .button {
    white-space: nowrap;
}

.profile-digest-keyword-actions .button svg {
    width: 16px;
    height: 16px;
}

.profile-digest-keywords p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.42;
}

.profile-digest-keywords-important {
    color: #c5401d;
    font-weight: 400;
}

.profile-digest-list {
    display: grid;
    gap: 0.65rem;
}

.profile-digest-row {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(260px, 1fr) 150px;
    gap: 1rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 68%, var(--surface));
}

.profile-digest-row.is-inactive {
    background: var(--surface);
}

.profile-digest-time {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    color: var(--muted);
    font-weight: 800;
}

.profile-digest-time input {
    width: 122px;
    min-height: 40px;
    padding-block: 0.55rem;
}

.profile-digest-last {
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 650;
}

.profile-digest-last strong {
    color: var(--text);
}

.profile-digest-toggle {
    width: 100%;
    white-space: nowrap;
}

.profile-digest-add-row {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.profile-digest-add-row.is-hidden,
.profile-digest-add[hidden] {
    display: none !important;
}

.profile-digest-add svg {
    width: 18px;
    height: 18px;
}

.profile-digest-save-state {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 750;
}

.profile-digest-save-state[data-state="ok"] {
    color: var(--accent-strong);
}

.profile-digest-save-state[data-state="error"] {
    color: var(--danger);
}

.profile-bookmarks {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.profile-bookmarks-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.profile-bookmarks-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.profile-bookmarks-head p {
    margin: 0.2rem 0 0;
    color: var(--muted);
}

.profile-bookmarks-head > span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
}

.profile-bookmark-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
    gap: 0.7rem;
    align-items: end;
}

.profile-bookmark-filter label {
    display: grid;
    gap: 0.25rem;
    color: var(--muted);
    font-weight: 800;
}

.profile-bookmark-list {
    display: grid;
    gap: 0.55rem;
}

.profile-bookmark-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.2rem 0.8rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface-2);
    scroll-margin-top: 5.5rem;
}

.profile-bookmark-list strong,
.profile-bookmark-list span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-bookmark-list span {
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-bookmark-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.profile-bookmark-actions form {
    margin: 0;
}

.profile-bookmark-original {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent-strong);
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.profile-bookmark-original:hover,
.profile-bookmark-original:focus-visible {
    text-decoration: underline;
}

.profile-bookmark-original svg {
    width: 17px;
    height: 17px;
}

.profile-bookmark-remove {
    color: var(--danger);
}

.profile-bookmark-remove svg {
    width: 16px;
    height: 16px;
}

.profile-bookmark-remove:hover,
.profile-bookmark-remove:focus-visible {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.profile-bookmark-send {
    display: grid;
    gap: 0.65rem;
}

.profile-bookmark-option {
    width: max-content;
    max-width: 100%;
}

.profile-mini-disclosure {
    display: block;
}

.profile-mini-disclosure summary {
    font-size: 0.9rem;
}

.profile-mini-disclosure summary::after {
    width: 1.35rem;
    height: 1.35rem;
    background: var(--surface);
}

.profile-mini-disclosure .profile-mini-list {
    margin-top: 0.4rem;
}

.profile-mini-list {
    display: grid;
    gap: 0.4rem;
}

.profile-mini-list div,
.profile-mini-list a {
    display: grid;
    gap: 0.12rem;
    color: var(--text);
}

.profile-mini-list span {
    color: var(--muted);
    font-size: 0.86rem;
}

.search-page-form, .inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    align-items: end;
    margin: 1rem 0;
}

.search-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-page-head h1 {
    margin: 0;
}

.search-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.6rem 0 1rem;
}

.search-section-link {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.search-section-link span:last-child {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 750;
}

.search-section-link.has-results {
    border-color: color-mix(in srgb, var(--accent) 36%, var(--border));
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.search-section-link.is-empty {
    color: var(--muted);
}

.list-filter-form {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 1.2rem;
}

.list-filter-form .search-page-form {
    margin: 0;
}

.list-filter-row {
    margin-bottom: 0;
}

.search-main-form {
    margin-bottom: 1.2rem;
}

.search-section-filter {
    margin: 0.1rem 0 0.25rem;
}

.inline-form {
    grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.admin-search-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 0.55rem;
    align-items: center;
    margin: 1rem 0;
}

.table-link {
    color: var(--text);
    font-weight: 750;
    text-decoration: none;
}

.table-link:hover,
.table-link:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.result-section {
    display: grid;
    gap: 0.7rem;
    scroll-margin-top: 92px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.section-head h2 {
    margin: 0;
}

.section-head span {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 750;
}

.representative-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.65rem;
}

.result-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1.2rem;
}

.result-columns > section {
    min-width: 0;
}

.result-item {
    position: relative;
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--party-color, var(--border));
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    scroll-margin-top: 5.5rem;
}

.result-item + .result-item {
    margin-top: 0.4rem;
}

.result-item:hover,
.result-item:focus-visible {
    border-color: color-mix(in srgb, var(--party-color, var(--accent)) 42%, var(--border));
    text-decoration: none;
}

.result-item.is-marked {
    padding-right: 2rem;
}

.result-item.has-politician-flags {
    padding-right: 4.15rem;
}

.result-item.legislation-search-result {
    --party-color: var(--accent);
}

.result-item.press-search-result {
    --party-color: var(--accent);
}

.result-item.forum-search-result {
    --party-color: #f59e0b;
}

.result-item.legislation-search-result.is-marked,
.result-item.legislation-search-result.has-vee-statement,
.result-item.press-search-result.is-marked,
.result-item.press-search-result.has-sachsen-update {
    padding-right: 4.15rem;
}

.result-flags {
    position: absolute;
    top: 0;
    right: 0.75rem;
    display: inline-flex;
    align-items: flex-start;
    gap: 0.22rem;
}

.result-item > .mark-badge {
    --mark-color: #22d3ee;
    position: absolute;
    top: 0;
    right: 0.75rem;
}

.result-item > .legislation-statement-flag {
    --mark-color: #dc2626;
}

.result-item strong,
.result-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.result-item span {
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.8rem 0;
}

.admin-nav a {
    white-space: nowrap;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
}

.press-admin-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.press-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.press-digest-detail-row > td {
    padding: 0 0 0.85rem;
    background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
}

.press-digest-detail {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-digest-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    color: var(--muted);
    font-size: 0.93rem;
    font-weight: 750;
}

.press-digest-detail-head > div {
    display: grid;
    gap: 0.15rem;
}

.press-digest-detail-head strong {
    color: var(--text);
    font-size: 1rem;
}

.press-digest-schedule-table {
    min-width: 720px;
}

.press-topic-admin-list {
    display: grid;
    gap: 0.75rem;
}

.press-topic-admin-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 52%, var(--surface));
}

.press-topic-admin-head {
    display: grid;
    grid-template-columns: minmax(220px, 0.32fr) auto;
    gap: 0.7rem;
    align-items: end;
}

.press-topic-admin-keywords {
    display: grid;
    padding: 0.62rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-topic-admin-details {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 0.9fr) minmax(220px, auto);
    gap: 0.65rem;
    align-items: start;
}

.press-topic-admin-head > label,
.press-topic-admin-keywords > label,
.press-topic-admin-details > label,
.press-topic-admin-status {
    display: grid;
    gap: 0.32rem;
    min-width: 0;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 850;
}

.press-topic-admin-card input:not([type="checkbox"]),
.press-topic-admin-card textarea {
    width: 100%;
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 500;
}

.press-topic-admin-card textarea {
    min-height: 62px;
    resize: vertical;
}

.press-topic-admin-keywords textarea {
    min-height: 74px;
    border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
}

.press-topic-admin-status {
    grid-template-columns: minmax(76px, 0.9fr) auto;
    align-content: start;
    align-items: end;
}

.press-topic-admin-status > span {
    grid-column: 1 / -1;
}

.press-topic-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
}

.press-topic-admin-actions form {
    margin: 0;
}

.press-log-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 750;
}

.press-log-pager-actions {
    display: inline-flex;
    gap: 0.45rem;
}

.press-hidden-list {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0;
}

.press-hidden-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: start;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--muted);
    border-radius: var(--radius);
    background: var(--surface);
}

.press-hidden-main {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.press-hidden-main h3,
.press-hidden-main p {
    margin: 0;
}

.press-hidden-main h3 {
    font-size: 1.02rem;
}

.press-hidden-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 650;
}

.press-hidden-actions {
    display: grid;
    gap: 0.42rem;
    justify-items: stretch;
}

.press-hidden-actions form {
    margin: 0;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.metric span {
    display: block;
    color: var(--muted);
    text-transform: capitalize;
}

.metric strong {
    display: block;
    font-size: 2rem;
    margin-top: 0.25rem;
}

.admin-columns {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-users-table {
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0 0.85rem;
}

.admin-users-table thead th {
    border-bottom: 0;
    padding-bottom: 0.15rem;
}

.admin-users-table tbody td {
    padding: 0.85rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.admin-users-table tbody td:first-child {
    border-left: 4px solid var(--accent);
    border-radius: var(--radius) 0 0 var(--radius);
}

.admin-users-table tbody td:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.admin-users-table tbody tr:hover td,
.admin-users-table tbody tr:focus-within td {
    border-top-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    border-bottom-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}

.admin-users-table tbody tr:hover td:first-child,
.admin-users-table tbody tr:focus-within td:first-child {
    border-left-color: var(--accent-strong);
}

.admin-users-table tbody tr:hover td:last-child,
.admin-users-table tbody tr:focus-within td:last-child {
    border-right-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

th, td {
    border-bottom: 1px solid var(--border);
    padding: 0.65rem;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.86rem;
}

td input, td select, td textarea {
    min-width: 150px;
}

.actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.table-actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
}

.table-action-form {
    display: inline-flex;
    margin: 0;
}

.comment-visibility-form {
    display: grid;
    gap: 0.45rem;
    min-width: 150px;
}

.danger-zone {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 1rem;
    align-items: end;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--border));
    border-left: 6px solid var(--danger);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}

.danger-zone h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.danger-zone p {
    margin: 0;
}

.reset-comments-form {
    display: grid;
    gap: 0.65rem;
}

.restore-backup {
    min-width: 260px;
}

.restore-backup summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius);
    background: var(--danger);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 750;
    cursor: pointer;
}

.restore-backup[open] summary {
    margin-bottom: 0.7rem;
}

.restore-backup form {
    min-width: min(360px, 72vw);
    padding: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--border));
    border-left: 5px solid var(--danger);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--danger) 7%, var(--surface));
}

.restore-backup .button {
    width: 100%;
}

.template-block {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.template-block h2 {
    margin: 0;
    font-size: 1.05rem;
}

.template-block p {
    margin: 0;
}

.template-block-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.template-block-head > div {
    display: grid;
    gap: 0.45rem;
}

.template-block-head .button {
    flex: 0 0 auto;
}

.mail-settings-block {
    margin-bottom: 1rem;
}

.mail-settings-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
}

.mail-settings-summary::-webkit-details-marker {
    display: none;
}

.mail-settings-summary::after {
    content: "Aufklappen";
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 800;
}

.mail-settings-block[open] .mail-settings-summary {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.mail-settings-block[open] .mail-settings-summary::after {
    content: "Einklappen";
}

.mail-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 0.85rem;
}

.mail-password-clear {
    align-self: end;
    min-height: 42px;
    padding: 0.72rem 0;
}

.mail-test-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
    .admin-user-create-form {
        grid-template-columns: 1fr;
    }

    .admin-user-summary {
        grid-template-columns: 1fr;
    }

    .admin-user-summary-grid {
        grid-template-columns: 1fr;
    }

    .admin-user-toggle {
        width: 100%;
    }

    .admin-user-detail,
    .admin-user-card .user-role-options,
    .admin-user-card .user-area-options {
        grid-template-columns: 1fr;
    }

    .template-block-head {
        align-items: stretch;
        flex-direction: column;
    }

    .template-block-head .button {
        width: 100%;
    }

    .mail-settings-grid {
        grid-template-columns: 1fr;
    }

    .mail-test-form {
        align-items: stretch;
        flex-direction: column;
    }

    .mail-test-form .button {
        width: 100%;
    }
}

.activity-list {
    display: grid;
    gap: 0.7rem;
}

.activity-list div {
    display: grid;
    gap: 0.15rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border);
}

.activity-list span {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-panel {
    margin-top: 1rem;
}

.schema-update-warning {
    border-left: 4px solid var(--danger);
}

.schema-issue-list {
    margin: 0.7rem 0 1rem;
    padding-left: 1.1rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.schema-issue-list li + li {
    margin-top: 0.25rem;
}

.cron-panel {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.cron-panel h2 {
    margin: 0.2rem 0 0.35rem;
}

.cron-panel p {
    margin: 0.2rem 0;
}

.cron-panel-actions {
    display: grid;
    gap: 0.6rem;
    justify-items: end;
    text-align: right;
}

.admin-panel.narrow {
    width: min(980px, 100%);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-grid .wide-field {
    grid-column: 1 / -1;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.check-row input {
    width: auto;
}

.admin-users-table .check-row.user-rights-check,
.admin-user-create-form .check-row.user-rights-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 0.55rem;
    text-align: left;
}

.admin-users-table .check-row.user-rights-check input,
.admin-user-create-form .check-row.user-rights-check input {
    grid-column: 1;
    justify-self: center;
    width: 16px;
    height: 16px;
    margin: 0;
}

.admin-users-table .check-row.user-rights-check span,
.admin-user-create-form .check-row.user-rights-check span {
    grid-column: 2;
    justify-self: start;
    min-width: 0;
    color: var(--text);
    line-height: 1.2;
}

.event-admin-form {
    display: grid;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.event-admin-form h2 {
    margin: 0;
}

.event-admin-form.compact {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.admin-list-section {
    margin-top: 1.5rem;
}

.event-admin-list {
    display: grid;
    gap: 0.9rem;
}

.event-admin-item {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-left: 5px solid var(--party-color, var(--accent));
    border-radius: var(--radius);
    background: var(--surface);
}

.event-admin-item.is-muted {
    opacity: 0.72;
}

.event-admin-meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.event-delete-form {
    justify-self: start;
}

.checkbox-grid {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 1rem;
}

.checkbox-grid legend {
    color: var(--muted);
    font-weight: 800;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.checkbox-grid input {
    width: 18px;
    height: 18px;
}

.export-mandate-grid label {
    align-items: flex-start;
}

.export-mandate-grid label > span {
    display: grid;
    gap: 0.12rem;
}

.export-mandate-grid strong {
    font-weight: 800;
}

.export-mandate-grid small {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.25;
}

.timeline {
    display: grid;
    gap: 1rem;
}

.timeline article {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.timeline h2 {
    margin: 0.2rem 0;
}

.is-muted {
    opacity: 0.65;
}

code {
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1100px) {
    .admin-user-detail {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .topbar-inner {
        gap: 0.65rem;
    }

    .brand-logo {
        width: 196px;
        height: 58px;
    }

    .main-nav-link {
        gap: 0.38rem;
        padding-inline: 0.58rem;
    }

    .top-search.is-open,
    .top-search:focus-within {
        width: min(340px, 42vw);
    }

    .user-strip-inner {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .user-strip-profile {
        margin-left: 0;
    }

    .map {
        height: calc(100vh - 230px);
        min-height: 420px;
    }

    .side-panel {
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: 86vh;
        border-radius: 8px 8px 0 0;
        transform: translateY(105%);
    }

    .side-panel.is-open {
        transform: translateY(0);
    }

    .content-grid, .admin-columns, .result-columns {
        grid-template-columns: 1fr;
    }

    .press-filter-bar,
    .press-filter-bar.has-status-filters {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 0.42rem;
        padding: 0.55rem;
    }

    .press-filter-bar input,
    .press-filter-bar select,
    .press-filter-bar .button {
        min-height: 36px;
        font-size: 0.88rem;
    }

    .press-filter-source {
        grid-column: 1 / span 2;
    }

    .press-filter-region {
        grid-column: 3 / span 2;
    }

    .press-filter-topic {
        grid-column: 5 / span 2;
    }

    .press-date-from {
        grid-column: 7 / span 2;
    }

    .press-date-to {
        grid-column: 9 / span 2;
    }

    .press-filter-submit {
        grid-column: 11 / span 2;
    }

    .press-filter-search,
    .press-filter-bar.has-status-filters .press-filter-search {
        grid-column: 1 / span 4;
    }

    .press-filter-status {
        grid-column: 5 / span 4;
        gap: 0.32rem;
    }

    .press-filter-actions {
        grid-column: 9 / span 4;
        gap: 0.32rem;
    }

    .press-status-toggle span {
        min-height: 36px;
        padding: 0.34rem 0.46rem;
        font-size: 0.8rem;
    }

    .press-date-control {
        gap: 0.1rem;
    }

    .press-date-control span {
        font-size: 0.68rem;
    }

    .press-linklist-range {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .press-linklist-range .button {
        grid-column: 1 / -1;
        justify-self: start;
        margin-left: 0;
        margin-top: 0.25rem;
    }

    .press-linklist-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .press-linklist-drag {
        justify-self: start;
    }

    .press-linklist-item.is-nested {
        margin-left: 1rem;
    }

    .press-linklist-authors {
        justify-content: flex-start;
    }

    .event-comments,
    .legislation-comments,
    .forum-comments,
    .press-comments {
        grid-template-columns: 1fr;
    }

    .forum-thread-form,
    .forum-category-create,
    .forum-category-row,
    .forum-thread-card {
        grid-template-columns: 1fr;
    }

    .forum-category-row {
        align-items: stretch;
    }

    .forum-thread-side {
        justify-items: stretch;
        width: 100%;
    }

    .forum-thread-side.has-cover {
        width: 100%;
    }

    .forum-thread-cover {
        max-width: 360px;
    }

    .forum-start-layout.has-cover {
        grid-template-columns: 1fr;
    }

    .forum-detail-cover {
        max-width: 360px;
        justify-self: start;
    }

    .forum-thread-admin-actions {
        justify-content: flex-start;
    }

    .press-article-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .press-article-meta {
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .press-article-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .danger-zone {
        grid-template-columns: 1fr;
    }

    .admin-search-form {
        grid-template-columns: 1fr;
    }

    .comment-card {
        position: static;
    }

    .cron-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .cron-panel-actions {
        justify-items: start;
        text-align: left;
    }

    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .press-topic-admin-head,
    .press-topic-admin-details {
        grid-template-columns: 1fr;
    }

    .press-topic-admin-actions {
        justify-content: flex-start;
    }

    .legislation-statement-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legislation-statement-form label:last-of-type,
    .legislation-statement-actions {
        grid-column: 1 / -1;
    }

    .legislation-statement-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 1180px) {
    .topbar {
        height: auto;
    }

    .topbar-inner {
        height: auto;
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 0.38rem 0.5rem;
        padding: 0.42rem 0.7rem 0.5rem;
    }

    .brand-link {
        min-width: 0;
        order: 1;
    }

    .brand-logo {
        width: 164px;
        max-width: min(52vw, 180px);
        height: 36px;
    }

    .main-nav {
        grid-column: 1 / -1;
        order: 3;
        display: none;
        justify-content: stretch;
        width: 100%;
        max-width: none;
        margin: 0.1rem 0 0;
        padding: 0.45rem;
        gap: 0.42rem;
        grid-template-columns: minmax(0, 1fr);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: color-mix(in srgb, var(--surface) 96%, var(--surface-2));
        box-shadow: 0 12px 24px color-mix(in srgb, var(--border) 40%, transparent);
        overflow: visible;
    }

    .main-nav.is-open {
        display: grid;
    }

    .topbar-tools {
        grid-column: 2;
        order: 2;
        gap: 0.28rem;
        justify-content: flex-end;
    }

    .topbar-tools .topbar-logout {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .main-nav-link {
        justify-content: flex-start;
        width: 100%;
        min-height: 40px;
        padding: 0.48rem 0.65rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .main-nav-link svg {
        width: 17px;
        height: 17px;
    }

    .main-nav-profile {
        display: inline-flex;
        margin-top: 0.14rem;
    }

    .main-nav-logout-form {
        display: block;
    }

    .main-nav-logout {
        width: 100%;
    }

    .main-nav-law strong {
        width: 17px;
        height: 17px;
        justify-content: center;
        font-size: 0.9rem;
    }

    .topbar-tools .icon-button,
    .top-search {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

    .topbar-tools form {
        height: 38px;
    }

    .top-search {
        grid-template-columns: 1fr 38px;
    }

    .top-search.is-open,
    .top-search:focus-within {
        width: min(220px, calc(100vw - 14.2rem));
        min-width: 0;
    }

    .press-filter-search,
    .press-filter-bar.has-status-filters .press-filter-search {
        grid-column: 1 / span 6;
    }

    .press-filter-status {
        grid-column: 7 / span 6;
    }

    .press-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .page {
        padding-inline: 0.7rem;
    }

    .topbar {
        height: auto;
    }

    .topbar-inner {
        height: auto;
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 0.38rem 0.5rem;
        padding: 0.42rem 0.7rem 0.5rem;
    }

    .brand-link {
        min-width: 0;
        order: 1;
    }

    .brand-logo {
        width: 164px;
        max-width: min(52vw, 180px);
        height: 36px;
    }

    .brand-block .brand-logo {
        width: min(260px, 100%);
        height: 74px;
    }

    .main-nav {
        grid-column: 1 / -1;
        order: 3;
        display: none;
        justify-content: stretch;
        width: 100%;
        max-width: none;
        margin: 0.1rem 0 0;
        padding: 0.45rem;
        gap: 0.42rem;
        grid-template-columns: minmax(0, 1fr);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: color-mix(in srgb, var(--surface) 96%, var(--surface-2));
        box-shadow: 0 12px 24px color-mix(in srgb, var(--border) 40%, transparent);
        overflow: visible;
    }

    .main-nav.is-open {
        display: grid;
    }

    .topbar-tools .topbar-logout {
        display: none;
    }

    .main-nav-link {
        justify-content: flex-start;
        width: 100%;
        min-height: 40px;
        padding: 0.48rem 0.65rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .main-nav-link svg {
        width: 17px;
        height: 17px;
    }

    .main-nav-profile {
        display: inline-flex;
        margin-top: 0.14rem;
    }

    .main-nav-logout-form {
        display: block;
    }

    .main-nav-logout {
        width: 100%;
    }

    .main-nav-law strong {
        width: 17px;
        height: 17px;
        justify-content: center;
        font-size: 0.9rem;
    }

    .press-filter-mobile-toggle {
        display: inline-flex;
        justify-content: center;
        width: 100%;
    }

    .press-filter-bar[data-press-filter-panel] {
        display: none;
    }

    .press-filter-bar[data-press-filter-panel].is-open {
        display: grid;
    }

    .press-filter-bar {
        grid-template-columns: minmax(0, 1fr);
    }

    .press-filter-bar.has-status-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .press-filter-search,
    .press-filter-bar.has-status-filters .press-filter-search,
    .press-filter-status,
    .press-filter-source,
    .press-filter-region,
    .press-filter-topic,
    .press-date-from,
    .press-date-to,
    .press-filter-submit,
    .press-filter-actions,
    .press-filter-per-page,
    .press-filter-create,
    .press-filter-reset {
        grid-column: auto;
    }

    .press-filter-status {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .press-filter-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .press-date-control span {
        font-size: 0.82rem;
    }

    .press-status-toggle,
    .press-status-toggle span {
        width: 100%;
    }

    .press-list-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .press-list-control-actions {
        align-items: stretch;
        justify-content: flex-start;
        margin-left: 0;
        width: 100%;
    }

    .press-per-page-form,
    .press-per-page-form select {
        width: 100%;
    }

    .press-pagination {
        justify-content: flex-start;
    }

    .press-pagination .button {
        flex: 1 1 auto;
    }

    .press-linklist-range {
        grid-template-columns: minmax(0, 1fr);
        padding: 0.75rem;
    }

    .topbar-tools {
        grid-column: 2;
        order: 2;
        gap: 0.28rem;
        justify-content: flex-end;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .topbar-tools .icon-button,
    .top-search {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

    .topbar-tools form {
        height: 38px;
    }

    .top-search {
        grid-template-columns: 1fr 38px;
    }

    .top-search.is-open,
    .top-search:focus-within {
        width: min(220px, calc(100vw - 14.2rem));
        min-width: 0;
    }

    .user-strip {
        padding: 0.35rem 0;
        font-size: 0.8rem;
    }

    .user-strip-inner {
        align-items: flex-start;
        gap: 0.2rem 0.55rem;
        padding: 0 0.7rem;
    }

    .user-strip-events {
        flex: 1 1 100%;
    }

    .user-strip-account {
        align-items: flex-start;
        flex: 1 1 100%;
        gap: 0.2rem 0.55rem;
    }

    .user-strip-admin,
    .user-strip-profile {
        min-height: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .user-strip-profile {
        max-width: 100%;
        flex-wrap: wrap;
        white-space: normal;
        gap: 0.15rem 0.45rem;
    }

    .legislation-page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .forum-page-head,
    .press-page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .forum-page-head .button,
    .press-page-head .button,
    .legislation-page-head .button {
        justify-content: center;
        width: 100%;
    }

    .forum-admin-card,
    .forum-section,
    .forum-thread-detail {
        padding: 0.75rem;
    }

    .forum-category-filter .button {
        flex: 1 1 auto;
    }

    .forum-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-bookmarks-filter {
        justify-content: center;
        width: 100%;
    }

    .forum-thread-card {
        padding: 0.75rem;
    }

    .forum-thread-cover,
    .forum-detail-cover {
        max-width: 100%;
    }

    .legislation-section {
        padding: 0.75rem;
    }

    .legislation-filter-panel {
        padding: 0.65rem;
    }

    .legislation-filter-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .legislation-filter-row .legislation-filter-head {
        min-height: 0;
    }

    .legislation-item {
        grid-template-columns: minmax(0, 1fr);
        padding: 0.75rem;
    }

    .legislation-detail-card.has-legislation-flags {
        padding-right: 3.45rem;
    }

    .legislation-actions {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        width: 100%;
        flex-wrap: wrap;
    }

    .legislation-actions > * {
        justify-content: center;
        width: 100%;
    }

    .legislation-actions > .legislation-flags {
        justify-content: flex-start;
        width: auto;
    }

    .legislation-detail-card-actions {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
    }

    .legislation-filter-head,
    .legislation-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .legislation-actions .button {
        width: 100%;
    }

    .legislation-filter-button {
        max-width: none;
        width: 100%;
    }

    .legislation-info dl > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.18rem;
    }

    .legislation-statement-form,
    .legislation-comments,
    .forum-comments,
    .press-comments {
        grid-template-columns: minmax(0, 1fr);
    }

    .press-article-card {
        grid-template-columns: minmax(0, 1fr) auto;
        scroll-margin-top: 152px;
    }

    .press-article-card.has-press-flags,
    .press-detail-card.has-press-flags {
        padding-right: 3.45rem;
    }

    .press-article-card-main {
        grid-column: 1 / -1;
    }

    .press-article-meta {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-end;
        min-width: 0;
        width: auto;
        z-index: 4;
    }

    .press-article-actions {
        justify-content: flex-end;
    }

    .press-article-actions .button {
        width: 42px;
        min-width: 42px;
        min-height: 42px;
        padding-inline: 0;
        justify-content: center;
        white-space: nowrap;
    }

    .press-article-comments-disclosure:not([open]) {
        grid-column: 1;
        grid-row: 2;
        align-self: stretch;
        min-width: 0;
        padding-top: 0;
    }

    .press-article-comments-disclosure[open] {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .press-page-subline {
        flex-direction: column;
        gap: 0.18rem;
        line-height: 1.22;
    }

    .press-page-subline p {
        font-size: 0.78rem;
    }

    .press-page-subline span {
        font-size: 0.76rem;
        line-height: 1.2;
        white-space: normal;
    }

    .press-detail-primary-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .press-detail-primary-actions .button.primary,
    .press-detail-primary-actions .press-bookmark-button {
        flex: 0 0 auto;
        width: 100%;
    }

    .press-work-head,
    .press-work-file {
        align-items: stretch;
        flex-direction: column;
    }

    .press-work-badge,
    .press-work-status-button {
        width: max-content;
        max-width: 100%;
        white-space: normal;
    }

    .legislation-statement-actions,
    .legislation-comments-summary,
    .forum-comments-summary,
    .press-comments-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .legislation-comments-summary span:last-child,
    .forum-comments-summary span:last-child,
    .press-comments-summary span:last-child {
        white-space: normal;
    }

    .press-article-comments-disclosure:not([open]) .press-comments-summary {
        min-height: 42px;
        height: 100%;
        align-items: center;
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.54rem 0.68rem;
    }

    .press-article-comments-disclosure:not([open]) .press-comments-summary span:last-child {
        white-space: nowrap;
    }

    .press-article-quick-actions {
        grid-column: 1 / -1;
        grid-row: 2;
        display: block;
        min-height: 42px;
    }

    .press-article-quick-actions > .press-article-comments-disclosure,
    .press-article-quick-actions > .press-article-comments-disclosure:not([open]),
    .press-article-quick-actions > .press-article-comments-disclosure[open] {
        grid-column: 1 / -1;
        grid-row: auto;
        padding-top: 0;
    }

    .press-article-quick-actions > .press-article-comments-disclosure > .press-comments-summary {
        margin-right: 6.95rem;
    }

    .press-article-quick-actions > .press-bookmark-button {
        right: 3.25rem;
        width: 42px;
        min-width: 42px;
        padding-inline: 0;
    }

    .press-bookmark-button,
    .legislation-bookmark-button,
    .forum-bookmark-button {
        min-height: 42px;
        padding-inline: 0.68rem;
    }

    .forum-thread-quick-actions {
        min-height: 42px;
    }

    .forum-thread-quick-actions .forum-thread-comment-summary,
    .forum-thread-quick-actions .forum-comments-summary {
        min-height: 42px;
        height: 100%;
        align-items: center;
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.54rem 0.68rem;
        margin-right: 3.65rem;
    }

    .forum-thread-quick-actions > .forum-bookmark-button {
        width: 42px;
        min-width: 42px;
        padding-inline: 0;
    }

    .legislation-quick-actions {
        display: block;
        min-height: 42px;
    }

    .legislation-quick-actions .legislation-comments-summary {
        min-height: 42px;
        height: 100%;
        align-items: center;
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.54rem 0.68rem;
        margin-right: 3.65rem;
    }

    .legislation-bookmark-button {
        min-height: 42px;
        padding-inline: 0.68rem;
    }

    .press-article-actions .button span,
    .press-bookmark-button span,
    .legislation-bookmark-button span,
    .forum-bookmark-button span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .legislation-comment-entry-card,
    .forum-comment-entry-card,
    .press-comment-entry-card {
        padding: 0.75rem;
    }

    .comment-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-sort {
        justify-content: flex-start;
        margin-left: 0;
    }

    .comment-attachments li,
    .press-work-file,
    .forum-existing-attachment {
        align-items: flex-start;
        flex-direction: column;
    }

    .comment-attachments span,
    .forum-existing-attachment small {
        margin-left: 0;
        white-space: normal;
    }

    .map-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .map-actions {
        justify-content: flex-start;
    }

    .filter-row,
    .filter-actions {
        align-items: stretch;
    }

    .global-notify {
        width: 100%;
        justify-content: space-between;
    }

    .switch-row-compact .switch-text {
        max-width: none;
    }

    .global-notify .switch-text {
        white-space: normal;
    }

    .map {
        min-height: 360px;
    }

    .mandate-grid,
    .representative-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-main,
    .comment-card,
    .comment-history-card {
        padding: 0.85rem;
    }

    .comment-list-head {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-sort {
        justify-content: flex-start;
    }

    .profile-header {
        display: grid;
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
    }

    .profile-header img,
    .photo-placeholder {
        width: 86px;
        height: 108px;
    }

    .profile-photo-button {
        width: 86px;
    }

    .profile-header h1 {
        font-size: clamp(1.35rem, 7vw, 1.9rem);
        line-height: 1.08;
    }

    .profile-contact-grid,
    .details-list, .form-grid, .checkbox-grid, .inline-form, .search-page-form {
        grid-template-columns: 1fr;
    }

    .profile-bookmarks-head {
        flex-direction: column;
        gap: 0.35rem;
    }

    .profile-subnav {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-subnav .button {
        justify-content: center;
        width: 100%;
    }

    .profile-digest-window-head,
    .profile-digest-add-row {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-digest-head-actions {
        align-items: stretch;
    }

    .profile-digest-master-toggle {
        justify-content: space-between;
        width: 100%;
    }

    .profile-digest-keyword-buttons {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-digest-count {
        white-space: normal;
    }

    .profile-digest-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-digest-time {
        justify-content: space-between;
    }

    .profile-digest-last {
        justify-self: start;
    }

    .profile-bookmark-filter,
    .profile-bookmark-list article {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-bookmark-actions {
        grid-column: auto;
        grid-row: auto;
        justify-content: flex-start;
        margin-top: 0.2rem;
    }

    .profile-note {
        border-left: 0;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 1rem;
    }

    .profile-note p {
        line-height: 1.45;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 760px) {
    .admin-user-create-form,
    .admin-user-summary-grid,
    .admin-user-detail,
    .admin-user-card .user-role-options,
    .admin-user-card .user-area-options {
        grid-template-columns: 1fr;
    }

    .admin-user-summary {
        grid-template-columns: 1fr;
    }

    .admin-user-toggle {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .top-search.is-open,
    .top-search:focus-within {
        width: min(190px, calc(100vw - 13.6rem));
    }

    .brand-logo {
        width: 150px;
        max-width: 50vw;
    }

    .main-nav-link {
        padding-inline: 0.42rem;
    }
}

@media (max-width: 380px) {
    .brand-logo {
        width: 136px;
        max-width: 48vw;
    }

    .top-search.is-open,
    .top-search:focus-within {
        width: min(160px, calc(100vw - 13rem));
    }

    .main-nav-link {
        flex-basis: 100%;
    }
}

/* Nutzeroberfläche: ruhigeres Raster, klare Arbeitsflächen, frühere mobile Navigation. */
body.is-user-area .page {
    padding-top: 0.15rem;
}

body.is-user-area .map-shell,
body.is-user-area .content-grid,
body.is-user-area .page-section,
body.is-user-area .press-page,
body.is-user-area .legislation-page,
body.is-user-area .forum-page,
body.is-user-area .events-page {
    margin-top: 1rem;
}

body.is-user-area .topbar {
    box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 86%, transparent);
}

body.is-user-area .main-nav-link {
    min-height: 40px;
    padding: 0.48rem 0.72rem;
    font-weight: 820;
}

body.is-user-area .user-strip {
    position: sticky;
    top: var(--sticky-topbar-height, 64px);
    z-index: 1190;
    padding: 0.38rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    background: color-mix(in srgb, var(--surface) 72%, var(--bg));
    backdrop-filter: blur(8px);
}

body.is-user-area .user-strip-inner {
    align-items: center;
}

body.is-user-area .user-strip-press-digest {
    padding-left: calc(1.05rem + 1px);
    color: #c5401d;
    line-height: 1.25;
}

body.is-user-area .user-strip-press-digest span:last-child {
    font-weight: 820;
}

body.is-user-area .press-page,
body.is-user-area .legislation-page {
    gap: 0.95rem;
}

body.is-user-area .press-page-head,
body.is-user-area .legislation-page-head,
body.is-user-area .forum-page-head,
body.is-user-area .events-page-head,
body.is-user-area .profile-account-panel {
    border-color: color-mix(in srgb, var(--border) 88%, transparent);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 45%, transparent);
}

body.is-user-area .press-page-head {
    padding: 1rem 1.05rem;
}

body.is-user-area .press-page-head h1,
body.is-user-area .legislation-page-head h1,
body.is-user-area .forum-page-head h1,
body.is-user-area .events-page-head h1,
body.is-user-area .profile-account-panel > h1 {
    line-height: 1.05;
}

body.is-user-area .press-page-subline {
    align-items: flex-end;
}

body.is-user-area .press-page-subline p {
    max-width: 860px;
    line-height: 1.28;
}

body.is-user-area .press-page-subline span {
    color: var(--muted);
    font-weight: 820;
}

body.is-user-area .press-filter-bar {
    grid-template-columns:
        minmax(75px, 0.525fr)
        minmax(75px, 0.525fr)
        minmax(75px, 0.525fr)
        minmax(75px, 0.525fr)
        minmax(75px, 0.525fr)
        minmax(75px, 0.525fr)
        minmax(62px, 0.39fr)
        minmax(62px, 0.39fr)
        minmax(62px, 0.39fr)
        minmax(62px, 0.39fr)
        minmax(67px, 0.42fr)
        minmax(67px, 0.42fr);
    grid-template-areas:
        "source source region region topic topic from from to to submit submit"
        "search search search status status status status status actions actions actions actions";
    gap: 0.44rem;
    align-items: end;
    padding: 0.55rem 0.65rem;
    border-color: color-mix(in srgb, var(--border) 88%, transparent);
    background: color-mix(in srgb, var(--surface) 96%, var(--surface-2));
}

body.is-user-area .press-filter-source { grid-area: source; }
body.is-user-area .press-filter-region { grid-area: region; }
body.is-user-area .press-filter-topic { grid-area: topic; }
body.is-user-area .press-date-from { grid-area: from; }
body.is-user-area .press-date-to { grid-area: to; }
body.is-user-area .press-filter-submit { grid-area: submit; }
body.is-user-area .press-filter-search,
body.is-user-area .press-filter-bar.has-status-filters .press-filter-search { grid-area: search; }
body.is-user-area .press-filter-status { grid-area: status; }
body.is-user-area .press-filter-actions { grid-area: actions; }

body.is-user-area .press-filter-bar input,
body.is-user-area .press-filter-bar select,
body.is-user-area .press-filter-bar .button,
body.is-user-area .press-status-toggle span {
    height: 40px;
    min-height: 40px;
}

body.is-user-area .press-filter-bar select,
body.is-user-area .press-filter-bar input {
    padding-block: 0.54rem;
}

body.is-user-area .press-date-control {
    align-self: end;
    gap: 0.12rem;
}

body.is-user-area .press-date-control input {
    height: 40px;
}

body.is-user-area .press-date-control span {
    margin-bottom: 0;
    font-size: 0.7rem;
}

body.is-user-area .press-status-toggle {
    flex: 1 1 0;
}

body.is-user-area .press-status-toggle span {
    --press-status-button-bg: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
    gap: 0.36rem;
    width: 100%;
    padding-inline: 0.5rem;
    background: var(--press-status-button-bg);
    font-size: 0.84rem;
    font-weight: 780;
}

body.is-user-area .press-status-toggle .mark-badge {
    display: inline-block;
    position: relative;
    overflow: hidden;
    width: 13px;
    min-width: 13px;
    height: 18px;
    box-shadow: none;
}

body.is-user-area .press-status-toggle input:not(:checked) + span .mark-badge::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: var(--press-status-button-bg);
    clip-path: inherit;
}

body.is-user-area .press-status-toggle svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    stroke-width: 2.3;
    fill: none;
}

body.is-user-area .press-status-toggle input[name="sachsen_update"] + span svg {
    color: #f97316;
}

body.is-user-area .press-status-toggle input[name="marked"] + span svg {
    color: #22d3ee;
}

body.is-user-area .press-flags .mark-badge,
body.is-user-area .press-article-action-flags .mark-badge,
body.is-user-area .legislation-flags .mark-badge,
body.is-user-area .result-flags .mark-badge {
    display: inline-block;
    width: 14px;
    min-width: 14px;
    height: 21px;
    opacity: 1;
}

body.is-user-area .press-status-toggle input:checked + span,
body.is-user-area .legislation-filter-button.is-active {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
}

body.is-user-area .press-status-toggle input[name="sachsen_update"]:checked + span {
    --press-status-button-bg: color-mix(in srgb, #f97316 11%, var(--surface-2));
    border-color: color-mix(in srgb, #f97316 48%, var(--border));
    background: var(--press-status-button-bg);
    color: #c2410c;
}

body.is-user-area .press-status-toggle input[name="marked"]:checked + span {
    --press-status-button-bg: color-mix(in srgb, #22d3ee 13%, var(--surface-2));
    border-color: color-mix(in srgb, #22d3ee 54%, var(--border));
    background: var(--press-status-button-bg);
    color: #0e7490;
}

body.is-user-area .press-status-toggle input[name="bookmarked"] + span svg {
    color: #1d4ed8;
}

body.is-user-area .press-status-toggle input[name="bookmarked"]:checked + span {
    --press-status-button-bg: color-mix(in srgb, #2563eb 11%, var(--surface-2));
    border-color: color-mix(in srgb, #2563eb 48%, var(--border));
    background: var(--press-status-button-bg);
    color: #1d4ed8;
}

body.is-user-area .press-status-toggle input:checked + span svg {
    fill: currentColor;
}

[data-theme="dark"] body.is-user-area .press-status-toggle input[name="bookmarked"]:checked + span {
    color: #93c5fd;
}

body.is-user-area .press-filter-actions {
    grid-template-columns:
        minmax(62px, 0.39fr)
        minmax(62px, 0.39fr)
        minmax(67px, 0.42fr)
        minmax(67px, 0.42fr);
    gap: 0.44rem;
}

body.is-user-area .press-filter-create {
    grid-column: 1 / span 2;
}

body.is-user-area .press-filter-reset {
    grid-column: 3 / span 2;
}

body.is-user-area .press-filter-reset:only-child {
    grid-column: 3 / span 2;
}

body.is-user-area .press-filter-create,
body.is-user-area .press-filter-reset {
    height: 40px;
    min-height: 40px;
    white-space: nowrap;
    font-weight: 780;
}

body.is-user-area .press-filter-submit {
    height: 40px;
    min-height: 40px;
    align-self: end;
    font-weight: 820;
}

body.is-user-area .press-filter-search {
    height: 40px;
}

body.is-user-area .press-list-controls {
    padding: 0 0.4rem 0 1.05rem;
    border-color: color-mix(in srgb, var(--border) 88%, transparent);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 38%, transparent);
    font-size: 0.8rem;
    font-weight: 650;
}

body.is-user-area .press-list-controls:not(.press-list-controls-bottom) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.48rem;
    min-height: 28px;
}

body.is-user-area .press-filter-bar + .press-list-controls:not(.press-list-controls-bottom),
body.is-user-area .press-list-controls:not(.press-list-controls-bottom) + .press-article-list {
    margin-top: -0.48rem;
}

body.is-user-area .press-list-controls:not(.press-list-controls-bottom) > span {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 24px;
}

body.is-user-area .press-list-controls:not(.press-list-controls-bottom) .press-list-control-actions {
    margin-left: 0;
}

body.is-user-area .press-list-controls:not(.press-list-controls-bottom) .press-filter-per-page {
    width: 142px;
    height: 26px;
    min-height: 26px;
    padding-block: 0;
}

body.is-user-area .press-article-list,
body.is-user-area .legislation-list {
    gap: 0.7rem;
}

body.is-user-area .press-article-card,
body.is-user-area .legislation-item {
    gap: 0.42rem 1rem;
    padding: 0.9rem 0.95rem;
    border-left-width: 4px;
    border-color: color-mix(in srgb, var(--border) 90%, transparent);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 42%, transparent);
}

body.is-user-area .press-article-card:hover,
body.is-user-area .press-article-card:focus-within,
body.is-user-area .legislation-item:hover,
body.is-user-area .legislation-item:focus-within {
    box-shadow: 0 12px 28px color-mix(in srgb, var(--border) 34%, transparent);
}

body.is-user-area .press-article-card.is-new-for-user,
body.is-user-area .press-article-card.is-new-for-user:hover,
body.is-user-area .press-article-card.is-new-for-user:focus-within {
    border-color: #fa9136;
    border-left-color: #fa9136;
    box-shadow: 0 0 0 2px color-mix(in srgb, #fa9136 42%, transparent), 0 10px 22px color-mix(in srgb, #fa9136 14%, transparent);
}

body.is-user-area .press-article-card-main {
    grid-column: 1;
    gap: 0.42rem;
    max-width: none;
}

body.is-user-area .press-article-source-line,
body.is-user-area .legislation-kicker {
    color: color-mix(in srgb, var(--accent-strong) 90%, var(--text));
    letter-spacing: 0;
}

body.is-user-area .press-article-card h2 {
    font-size: 1.02rem;
    line-height: 1.28;
}

body.is-user-area .press-article-card p {
    max-width: none;
    color: var(--text);
    line-height: 1.38;
}

body.is-user-area .press-topic-row,
body.is-user-area .legislation-tags,
body.is-user-area .legislation-parties {
    gap: 0.35rem;
}

body.is-user-area .legislation-tag,
body.is-user-area .press-status-tag,
body.is-user-area .legislation-party-chip {
    min-height: 24px;
    align-items: center;
}

body.is-user-area .press-article-meta {
    min-width: 196px;
}

body.is-user-area .press-article-actions .button,
body.is-user-area .press-bookmark-button,
body.is-user-area .legislation-bookmark-button {
    min-height: 40px;
}

body.is-user-area .press-article-quick-actions,
body.is-user-area .legislation-quick-actions {
    margin-top: 0.18rem;
}

body.is-user-area .press-article-quick-actions > .press-article-comments-disclosure > .press-comments-summary,
body.is-user-area .legislation-quick-actions .legislation-comments-summary {
    background: color-mix(in srgb, var(--surface-2) 78%, var(--surface));
}

body.is-user-area .legislation-section {
    padding: 0.9rem;
    background: color-mix(in srgb, var(--surface) 78%, var(--surface-2));
}

body.is-user-area .legislation-filter-panel {
    gap: 0.8rem;
    padding: 0.8rem;
    border-color: color-mix(in srgb, var(--border) 88%, transparent);
}

body.is-user-area .legislation-filter-row {
    grid-template-columns: minmax(280px, max-content) minmax(300px, 1fr);
}

body.is-user-area .legislation-filter-button {
    min-height: 40px;
    padding: 0.42rem 0.62rem;
    background: color-mix(in srgb, var(--surface-2) 68%, var(--surface));
}

body.is-user-area .legislation-item strong {
    font-size: 1.02rem;
}

body.is-user-area .legislation-meta {
    font-size: 0.89rem;
}

body.is-user-area .legislation-detail-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    max-width: min(100%, 340px);
}

body.is-user-area .legislation-detail-card-actions .button {
    flex: 0 0 auto;
    min-width: max-content;
}

body.is-user-area .profile-account-panel {
    padding: 1rem;
}

body.is-user-area .profile-subnav {
    margin-block: 0.95rem 1rem;
}

body.is-user-area .profile-subnav .button {
    min-height: 42px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

body.is-user-area .profile-subnav .button.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

body.is-user-area .profile-subnav .button:not(.is-active):hover,
body.is-user-area .profile-subnav .button:not(.is-active):focus-visible {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
    color: var(--accent-strong);
    box-shadow: none;
}

body.is-user-area .profile-subnav .button.is-active:hover,
body.is-user-area .profile-subnav .button.is-active:focus-visible {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
    color: #fff;
}

body.is-user-area .profile-settings-card,
body.is-user-area .profile-digest-window,
body.is-user-area .profile-bookmarks {
    border-color: color-mix(in srgb, var(--border) 88%, transparent);
    background: color-mix(in srgb, var(--surface) 82%, var(--surface-2));
}

body.is-user-area .profile-bookmark-list article,
body.is-user-area .profile-digest-row {
    border-left-width: 4px;
    border-color: color-mix(in srgb, var(--border) 88%, transparent);
}

body.is-user-area .profile-bookmark-filter input,
body.is-user-area .profile-bookmark-filter .button {
    min-height: 44px;
}

@media (max-width: 1320px) {
    body.is-user-area .topbar {
        height: auto;
    }

    body.is-user-area .topbar-inner {
        height: auto;
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 0.42rem 0.6rem;
        padding: 0.45rem 0.8rem 0.52rem;
    }

    body.is-user-area .brand-link {
        min-width: 0;
        order: 1;
    }

    body.is-user-area .brand-logo {
        width: 176px;
        max-width: min(50vw, 190px);
        height: 38px;
    }

    body.is-user-area .main-nav {
        grid-column: 1 / -1;
        order: 3;
        display: none;
        justify-content: stretch;
        width: 100%;
        max-width: none;
        margin: 0.12rem 0 0;
        padding: 0.45rem;
        gap: 0.42rem;
        grid-template-columns: minmax(0, 1fr);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: color-mix(in srgb, var(--surface) 96%, var(--surface-2));
        box-shadow: 0 12px 24px color-mix(in srgb, var(--border) 40%, transparent);
        overflow: visible;
    }

    body.is-user-area .main-nav.is-open {
        display: grid;
    }

    body.is-user-area .topbar-tools {
        grid-column: 2;
        order: 2;
        gap: 0.3rem;
        justify-content: flex-end;
    }

    body.is-user-area .topbar-tools .topbar-logout {
        display: none;
    }

    body.is-user-area .mobile-menu-toggle {
        display: inline-flex;
    }

    body.is-user-area .main-nav-link {
        justify-content: flex-start;
        width: 100%;
        min-height: 40px;
        padding: 0.5rem 0.68rem;
        font-size: 0.92rem;
        gap: 0.5rem;
    }

    body.is-user-area .main-nav-profile,
    body.is-user-area .main-nav-logout-form {
        display: block;
    }

    body.is-user-area .main-nav-profile {
        display: inline-flex;
        margin-top: 0.12rem;
    }

    body.is-user-area .main-nav-logout {
        width: 100%;
    }

    body.is-user-area .topbar-tools .icon-button,
    body.is-user-area .top-search {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

    body.is-user-area .topbar-tools form {
        height: 38px;
    }

    body.is-user-area .top-search {
        grid-template-columns: 1fr 38px;
    }

    body.is-user-area .top-search.is-open,
    body.is-user-area .top-search:focus-within {
        width: min(260px, calc(100vw - 14.7rem));
        min-width: 0;
    }

    body.is-user-area .user-strip {
        top: var(--sticky-topbar-height, 53px);
    }
}

@media (max-width: 1180px) {
    body.is-user-area .press-filter-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas:
            "source region topic"
            "from to submit"
            "search search search"
            "status status actions";
    }

    body.is-user-area .press-filter-status {
        gap: 0.42rem;
    }

    body.is-user-area .press-filter-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.is-user-area .press-article-card {
        grid-template-columns: minmax(0, 1fr);
    }

    body.is-user-area .press-article-meta {
        width: 100%;
        justify-content: flex-start;
    }

    body.is-user-area .press-article-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    body.is-user-area .legislation-filter-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    body.is-user-area .press-page-head,
    body.is-user-area .legislation-page-head,
    body.is-user-area .forum-page-head,
    body.is-user-area .events-page-head,
    body.is-user-area .profile-account-panel {
        padding: 0.85rem;
    }

    body.is-user-area .press-page-subline {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.24rem;
    }

    body.is-user-area .user-strip-press-digest {
        padding-left: calc(0.85rem + 1px);
        margin-top: 0.18rem;
        font-size: 0.78rem;
        font-weight: 650;
        line-height: 1.16;
    }

    body.is-user-area .user-strip-press-digest span:last-child {
        font-weight: 650;
    }

    body.is-user-area .user-strip:has(.user-strip-press-digest) .user-strip-account {
        padding-left: calc(0.85rem + 1px);
    }

    body.is-user-area .user-strip:has(.user-strip-press-digest) .user-strip-profile {
        font-size: 0.78rem;
    }

    body.is-user-area .press-filter-bar {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "source"
            "region"
            "topic"
            "from"
            "to"
            "submit"
            "search"
            "status"
            "actions";
    }

    body.is-user-area .press-filter-status,
    body.is-user-area .press-filter-actions {
        grid-template-columns: minmax(0, 1fr);
        flex-direction: column;
        align-items: stretch;
    }

    body.is-user-area .press-status-toggle {
        width: 100%;
    }

    body.is-user-area .press-list-controls,
    body.is-user-area .press-list-control-actions {
        align-items: stretch;
    }

    body.is-user-area .press-list-controls:not(.press-list-controls-bottom) {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.44rem;
        min-height: 0;
        padding: 0.58rem 0.62rem;
    }

    body.is-user-area .press-list-controls:not(.press-list-controls-bottom) > span {
        width: 100%;
        min-height: 0;
        padding: 0.04rem 0.08rem 0;
        color: var(--muted);
        font-size: 0.78rem;
        line-height: 1.35;
    }

    body.is-user-area .press-list-controls:not(.press-list-controls-bottom) .press-list-control-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 142px;
        align-items: stretch;
        gap: 0.42rem;
        width: 100%;
    }

    body.is-user-area .press-list-controls:not(.press-list-controls-bottom) .press-keyword-toggle {
        justify-content: flex-start;
        height: 30px;
        min-height: 30px;
        width: 100%;
    }

    body.is-user-area .press-list-controls:not(.press-list-controls-bottom) .press-per-page-form {
        width: 100%;
    }

    body.is-user-area .press-list-controls:not(.press-list-controls-bottom) .press-per-page-form select {
        height: 30px;
        min-height: 30px;
        width: 100%;
    }

    body.is-user-area .press-article-card,
    body.is-user-area .legislation-item {
        padding: 0.78rem;
    }

    body.is-user-area .legislation-item.has-legislation-flags .legislation-kicker {
        max-width: calc(100% - 2.35rem);
    }

    body.is-user-area .legislation-item.has-legislation-flags .legislation-flags {
        position: absolute;
        top: 0.72rem;
        right: 0.78rem;
        width: auto;
        justify-content: flex-end;
        z-index: 5;
    }

    body.is-user-area .press-article-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.52rem;
        padding-right: 0.78rem;
    }

    body.is-user-area .press-article-card.has-press-flags {
        padding-right: 0.78rem;
    }

    body.is-user-area .press-article-card.has-press-flags .press-article-source-line {
        max-width: calc(100% - 2.35rem);
    }

    body.is-user-area .press-article-card-main,
    body.is-user-area .press-article-meta,
    body.is-user-area .press-article-quick-actions {
        grid-column: 1 / -1;
        grid-row: auto;
        width: 100%;
        min-width: 0;
    }

    body.is-user-area .press-article-meta {
        justify-content: flex-start;
    }

    body.is-user-area .press-article-card.has-press-flags .press-article-meta {
        position: absolute;
        top: 0.72rem;
        right: 0.78rem;
        width: auto;
        min-width: 0;
        justify-content: flex-end;
        z-index: 5;
    }

    body.is-user-area .press-article-action-flags {
        padding-top: 0;
    }

    body.is-user-area .press-article-meta .press-article-original-link {
        display: none;
    }

    body.is-user-area .press-article-actions {
        justify-content: flex-start;
    }

    body.is-user-area .press-article-quick-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px 42px;
        gap: 0.45rem;
        min-height: 42px;
        margin-top: 0.12rem;
    }

    body.is-user-area .press-article-quick-actions > .press-article-comments-disclosure,
    body.is-user-area .press-article-quick-actions > .press-article-comments-disclosure:not([open]) {
        grid-column: 1 / -1;
        grid-row: 1;
        min-width: 0;
        width: 100%;
        padding-top: 0;
    }

    body.is-user-area .press-article-quick-actions > .press-article-comments-disclosure[open] {
        grid-column: 1 / -1;
    }

    body.is-user-area .press-article-quick-actions > .press-article-comments-disclosure > .press-comments-summary {
        margin-right: calc(42px + 0.45rem);
        min-height: 42px;
        align-items: center;
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.54rem 0.68rem;
    }

    body.is-user-area .press-article-quick-actions.has-original-link > .press-article-comments-disclosure > .press-comments-summary {
        margin-right: calc(84px + 0.9rem);
    }

    body.is-user-area .press-article-quick-actions > .press-article-comments-disclosure > .press-comments-summary span:last-child {
        white-space: nowrap;
    }

    body.is-user-area .press-article-mobile-original-link {
        display: inline-flex;
        position: relative;
        z-index: 4;
        grid-column: 2;
        grid-row: 1;
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        justify-content: center;
    }

    body.is-user-area .press-article-mobile-original-link span {
        display: none;
    }

    body.is-user-area .press-article-quick-actions > .press-bookmark-button {
        position: static;
        z-index: 4;
        grid-column: 3;
        grid-row: 1;
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
    }

    body.is-user-area .press-article-quick-actions:not(.has-original-link) > .press-bookmark-button {
        grid-column: 2;
    }

    body.is-user-area .press-article-quick-actions > .press-bookmark-button span {
        display: none;
    }

    body.is-user-area .legislation-detail-card-actions {
        justify-content: stretch;
        max-width: none;
        width: 100%;
    }

    body.is-user-area .legislation-detail-card-actions .button {
        flex: 1 1 100%;
    }

    body.is-user-area .profile-bookmark-filter,
    body.is-user-area .profile-bookmark-list article,
    body.is-user-area .profile-digest-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 430px) {
    body.is-user-area .top-search.is-open,
    body.is-user-area .top-search:focus-within {
        width: min(188px, calc(100vw - 13.8rem));
    }
}

@media (max-width: 380px) {
    body.is-user-area .brand-logo {
        width: 144px;
        max-width: 46vw;
    }

    body.is-user-area .press-list-controls:not(.press-list-controls-bottom) .press-list-control-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    body.is-user-area .top-search.is-open,
    body.is-user-area .top-search:focus-within {
        width: min(150px, calc(100vw - 12.8rem));
    }
}
