/* =============================================
   Urteile – Semantische Urteilssuche
   ============================================= */

.urteile-page {
    flex: 1 1 0;
    height: var(--urteile-content-height, 100%);
    min-height: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 26%, #f8fafc 100%);
    overflow: hidden;
}

/* ── Hero / Search Section ── */

.urteile-hero {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(8px);
    border-radius: 28px;
    position: relative;
    overflow: clip;
    transition: padding 0.48s cubic-bezier(0.22, 1, 0.36, 1),
        border-radius 0.48s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.urteile-hero-inner {
    max-width: none;
    margin: 0 auto;
}

.urteile-hero-copy {
    display: grid;
    justify-items: center;
    max-height: 320px;
    opacity: 1;
    overflow: clip;
    transform: translateY(0) scale(1);
    transform-origin: top center;
    transition: max-height 0.56s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.34s ease,
        transform 0.46s cubic-bezier(0.22, 1, 0.36, 1),
        margin 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.urteile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 99px;
    margin-bottom: 1.25rem;
}

.urteile-badge svg {
    flex-shrink: 0;
}

.urteile-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.urteile-subtitle {
    font-size: 1rem;
    color: #475569;
    margin: 0 0 1.25rem;
    line-height: 1.6;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.urteile-help-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.3rem;
    padding: 0;
    border: 0;
    background: none;
    color: #346fed;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.16s ease;
}

.urteile-help-link:hover,
.urteile-help-link.is-open {
    color: #1d4ed8;
}

.urteile-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 9800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.urteile-help-overlay[hidden] {
    display: none;
}

.urteile-help-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.54);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.urteile-help-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 860px);
    max-height: min(86vh, 920px);
    overflow: auto;
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
}

.urteile-help-panel-inner {
    text-align: left;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
    border: 1px solid rgba(191, 219, 254, 0.85);
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.08);
    padding: 1.1rem;
}

.urteile-help-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid rgba(191, 219, 254, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
    transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.urteile-help-close:hover {
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.urteile-help-intro {
    margin-bottom: 0.95rem;
}

.urteile-help-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.58rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}

.urteile-help-title {
    font-size: 1.08rem;
    line-height: 1.28;
    margin: 0 0 0.42rem;
    color: #0f172a;
}

.urteile-help-text {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.urteile-help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.urteile-help-carousel-nav {
    display: none;
}

.urteile-help-card {
    position: relative;
    background: rgba(239, 246, 255, 0.65);
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 18px;
    padding: 0.95rem 0.95rem 1rem;
}

.urteile-help-card-highlight {
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(255, 255, 255, 0.98));
    border-color: rgba(251, 191, 36, 0.22);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.urteile-help-star-badge {
    position: absolute;
    top: -0.62rem;
    right: -0.52rem;
    z-index: 2;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.92));
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
    transform: rotate(10deg);
}

.urteile-help-star-badge svg {
    filter: drop-shadow(0 1px 1px rgba(249, 115, 22, 0.08));
}

.urteile-help-card-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
}

.urteile-help-card-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.urteile-help-card h3 {
    margin: 0;
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.35;
}

.urteile-help-card p {
    margin: 0;
    color: #475569;
    font-size: 0.89rem;
    line-height: 1.55;
}

.urteile-help-example {
    margin-top: 0.8rem;
    padding-top: 0.72rem;
    border-top: 1px solid rgba(191, 219, 254, 0.75);
    display: flex;
    flex-direction: column;
    gap: 0.36rem;
}

.urteile-help-example-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
}

.urteile-help-example code {
    display: block;
    padding: 0.42rem 0.02rem;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    font-style: italic;
}

.urteile-help-example code:last-child {
    border-bottom: 0;
}

.urteile-help-note {
    margin-top: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.55;
}

.urteile-help-note-text {
    margin: 0;
}

.urteile-help-note-text sup {
    font-size: 0.68em;
    line-height: 0;
    vertical-align: super;
}

.urteile-help-note-text + .urteile-help-note-text {
    margin-top: 0.55rem;
}

.urteile-help-sources {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.45rem;
}

.urteile-help-source-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(191, 219, 254, 0.55);
}

.urteile-help-source-mark {
    color: #1d4ed8;
    font-weight: 800;
    line-height: 1.4;
}

.urteile-help-source-item a {
    color: #0f172a;
    text-decoration: none;
    line-height: 1.45;
    word-break: break-word;
}

.urteile-help-source-item a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Search Box */

.urteile-search-wrap {
    position: relative;
    max-width: 720px;
    margin: 0 auto 0.25rem;
    transition: transform 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.urteile-search-input {
    width: 100%;
    padding: 1rem 8rem 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    outline: none;
    box-shadow: 0 16px 40px rgb(37 99 235 / 6%);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.urteile-search-input::placeholder {
    color: #94a3b8;
}

.urteile-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.16);
}

.urteile-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, transform 0.1s;
}

.urteile-search-btn:hover {
    background: #1d4ed8;
}

.urteile-search-btn:active {
    transform: translateY(-50%) scale(0.97);
}

/* Layout */

.urteile-layout {
    margin: 0 auto;
    padding: 1rem 1.5rem 1rem;
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr) 268px;
    gap: 1.25rem;
    align-items: start;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.urteile-sidebar {
    position: static;
    width: auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.urteile-sidebar-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(191, 219, 254, 0.6);
    border-radius: 24px;
    padding: 1.25rem 5px 1.25rem 15px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-clip: padding-box;
    isolation: isolate;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.urteile-sidebar-head {
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.urteile-sidebar-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}

.urteile-sidebar-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    line-height: 1.2;
    color: #0f172a;
}

.urteile-sidebar-text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #64748b;
}

.urteile-sidebar-section + .urteile-sidebar-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eef2f7;
}

.urteile-sidebar-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 0.75rem;
    text-align: left;
}

.urteile-sidebar-label-centered {
    text-align: center;
}

.urteile-sidebar-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.75rem;
}

.urteile-sidebar-label-row .urteile-sidebar-label {
    margin-bottom: 0;
}

.urteile-sidebar-inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.16s ease;
}

.urteile-sidebar-inline-toggle:hover {
    color: #2563eb;
}

.urteile-sidebar-inline-toggle svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.urteile-sidebar-inline-toggle.is-expanded svg {
    transform: rotate(180deg);
}

.urteile-sidebar-inline-toggle-icon {
    width: 24px;
    height: 24px;
    justify-content: center;
    border-radius: 999px;
}

.urteile-sidebar-inline-toggle-icon:hover {
    background: #eff6ff;
}

.urteile-inline-collapse {
    max-height: 520px;
    opacity: 1;
    overflow: hidden;
    transform: translateY(0);
    transition: max-height 0.26s ease, opacity 0.22s ease, transform 0.22s ease;
}

.urteile-inline-collapse.is-collapsed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.urteile-inline-more-btn {
    display: block;
    margin: 10px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #475569ab;
    font-size: 0.76rem;
    cursor: pointer;
    text-align: center;
    transition: color 0.16s ease;
}

.urteile-inline-more-btn:hover {
    color: #2563eb;
}

.urteile-main-shell {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    transition: transform 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.urteile-center-column {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1rem;
    height: 100%;
    overflow: hidden;
    transition: gap 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.urteile-page.is-search-committed .urteile-center-column {
    gap: 0.6rem;
}

.urteile-page.is-search-committed .urteile-hero {
    padding: 0.5rem 0.7rem;
    border-radius: 22px;
}

.urteile-page.is-search-committed .urteile-hero-copy {
    max-height: 0;
    opacity: 0;
    margin: 0;
    transform: translateY(-18px) scale(0.985);
    pointer-events: none;
}

.urteile-page.is-search-committed .urteile-main-shell {
    transform: translateY(-1px);
}

/* Filter Chips */

.urteile-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 640px;
    margin: 0 auto;
}

.urteile-filters[hidden] {
    display: none;
}

.urteile-subfilter-block {
    margin-top: 25px;
}

.urteile-subfilter-group {
    margin-top: 0.7rem;
}

.urteile-subfilter-group[hidden] {
    display: none;
}

.urteile-sidebar-sub-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 0.75rem;
}

.urteile-subfilter-block[hidden] {
    display: none;
}

.urteile-filters-sidebar {
    justify-content: flex-start;
    max-width: none;
    margin: 0;
}

.urteile-filter-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.urteile-filter-group-spaced {
    margin-top: 20px;
}

#urteile-land-state-filters {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding-top: 2px;
}

#urteile-land-state-filters .urteile-filter-chip {
    width: 100%;
    text-align: left;
    border-radius: 16px;
    padding: 0.55rem 1rem;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #0f172a;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe4f0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

#urteile-land-state-filters .urteile-filter-chip:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
    color: #0f172a;
}

#urteile-land-state-filters .urteile-filter-chip.is-active {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.06);
    color: #1d4ed8;
    font-weight: 600;
}

.urteile-filter-tools {
    max-width: 640px;
    margin: 0.875rem auto 0;
}

.urteile-sidebar .urteile-filter-tools {
    max-width: none;
    margin: 0;
}

.urteile-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 11px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe4f0;
    border-radius: 99px;
    font-size: 0.8125rem;
    font-family: inherit;
    color: #475569;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.urteile-filter-chip:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.urteile-filter-chip.is-active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
    font-weight: 600;
}

.urteile-date-range {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
}

.urteile-sidebar .urteile-date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.urteile-date-sep {
    font-size: 0.8rem;
    color: #64748b;
    flex-shrink: 0;
}

.urteile-date-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.urteile-sidebar .urteile-date-field {
    width: 100%;
}

.urteile-date-input {
    width: 132px;
    padding: 0.65rem 0.8rem;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-size: 13px;
    height: 30px;
}

.urteile-date-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.urteile-sidebar .urteile-date-input {
    width: 0;
    flex: 1 1 0;
}

.urteile-range-btn {
    min-height: 42px;
    padding: 0 1rem;
    border: none;
    border-radius: 10px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.urteile-range-btn:hover {
    background: #1e293b;
}

.urteile-range-btn:active {
    transform: scale(0.98);
}

.urteile-range-btn.is-secondary {
    background: #ffffff;
    color: #475569;
    border: 1px solid #dbe4f0;
}

.urteile-range-btn.is-secondary:hover {
    background: #f8fafc;
}

.urteile-sidebar .urteile-range-btn {
    min-height: 36px;
}

.urteile-sidebar-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding-top: 0.875rem;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.96) 26%, rgba(255, 255, 255, 0.96) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#urteile-filters-apply {
    flex: 1;
}

#urteile-filters-reset {
    flex: 0 0 auto;
    padding: 0 0.75rem;
    background: transparent;
    border-color: transparent;
    color: #94a3b8;
    font-size: 0.75rem;
    min-height: 32px;
}

#urteile-filters-reset:hover {
    color: #475569;
    background: #f1f5f9;
    border-color: transparent;
}

/* ── Results Section ── */

.urteile-body {
    max-width: none;
    margin: 0;
    padding: 1.3rem 1.4rem 1.6rem;
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(191, 219, 254, 0.55);
    border-radius: 28px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-clip: padding-box;
    isolation: isolate;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0.9rem;
}

/* Stats bar (shown when results exist) */

.urteile-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    flex: 0 0 auto;
}

.urteile-stats-count {
    font-size: 0.875rem;
    color: #64748b;
    flex: 1 1 0;
    min-width: 0;
    order: 1;
}

.urteile-stats-count strong {
    color: #0f172a;
    font-weight: 600;
}

.urteile-sort-wrap {
    position: relative;
    flex-shrink: 0;
    order: 2;
}

.urteile-source-filter {
    display: flex;
    justify-content: center;
    order: 3;
    flex-basis: 100%;
    margin-top: -10px;
}
.urteile-source-filter[hidden] { display: none; }

.urteile-source-filter-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.07);
}

.urteile-source-slider {
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
    pointer-events: none;
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, width;
    opacity: 0;
}

.urteile-sort-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.urteile-sort-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.urteile-sort-btn.is-active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.urteile-sort-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
    padding: 4px;
    min-width: 160px;
    z-index: 500;
}

.urteile-sort-menu[hidden] {
    display: none;
}

.urteile-sort-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-family: inherit;
    color: #475569;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, color 0.12s;
}

.urteile-sort-option:hover {
    background: #f8fafc;
    color: #0f172a;
}

.urteile-sort-option.is-active {
    color: #2563eb;
    font-weight: 600;
    background: #eff6ff;
}

.urteile-results-scroll {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0.35rem 0 0;
}

/* Result Cards */

.urteile-results {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    gap: 12px;
}

.urteil-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.urteil-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.urteil-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.625rem;
}

.urteil-card-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    margin-top: 2px;
}

.urteil-card-meta {
    flex: 1;
    min-width: 0;
}

.urteil-card-gericht {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 2px;
}

.urteil-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.urteil-card-excerpt {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.875rem;
}

.urteil-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.urteil-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.urteil-tag.tag-gebiet {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.urteil-tag.tag-leitsatz {
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.urteil-tag.tag-datum {
    background: #f8fafc;
    color: #64748b;
    margin-left: auto;
}

.urteil-tag.tag-source-keyword {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.urteil-tag.tag-source-semantic {
    background: #faf5ff;
    color: #7c3aed;
    border-color: #e9d5ff;
}


.urteile-source-btn {
    position: relative;
    z-index: 1;
    min-height: 30px;
    padding: 0 0.8rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.urteile-source-btn:hover {
    color: #1d4ed8;
}

.urteile-source-btn.is-active {
    color: #1d4ed8;
}

.urteile-source-btn.is-loading {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.urteil-card-fav-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    flex-shrink: 0;
    background: #fef9c3;
    border: 1px solid #fde047;
    color: #a16207;
    cursor: default;
}

.urteil-similarity {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 2px 9px;
    border-radius: 99px;
    white-space: nowrap;
}

/* ── Empty / Initial State ── */

.urteile-empty {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: auto;
    box-sizing: border-box;
    padding: 2rem 1rem;
    color: #94a3b8;
}

.urteile-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

.urteile-empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 0.5rem;
}

.urteile-empty-text {
    font-size: 0.9rem;
    color: #64748b;
    max-width: 380px;
    line-height: 1.6;
    margin: 0;
}

.urteile-empty-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 1.5rem;
}

.urteile-example-chip {
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 99px;
    font-size: 0.8125rem;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.urteile-example-chip:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

/* ── Scrollbars ── */

.urteile-scrollbar,
.us-list {
    scrollbar-width: thin;
    scrollbar-color: rgb(232 239 247) transparent;
}

.urteile-sidebar-collapsible {
    scrollbar-width: thin;
    scrollbar-color: rgb(232 239 247) transparent;
}

.urteile-scrollbar::-webkit-scrollbar,
.us-list::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.urteile-sidebar-collapsible::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.urteile-scrollbar::-webkit-scrollbar-track,
.us-list::-webkit-scrollbar-track {
    background: transparent;
}

.urteile-sidebar-collapsible::-webkit-scrollbar-track {
    background: transparent;
}

.urteile-scrollbar::-webkit-scrollbar-thumb,
.us-list::-webkit-scrollbar-thumb {
    background: rgb(232 239 247);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.urteile-sidebar-collapsible::-webkit-scrollbar-thumb {
    background: rgb(232 239 247);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.urteile-scrollbar::-webkit-scrollbar-thumb:hover,
.us-list::-webkit-scrollbar-thumb:hover {
    background: rgb(214 224 236);
    background-clip: padding-box;
}

.urteile-sidebar-collapsible::-webkit-scrollbar-thumb:hover {
    background: rgb(214 224 236);
    background-clip: padding-box;
}

/* ── Loading State ── */

.urteile-loading {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 3;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    gap: 1rem;
    color: #64748b;
    text-align: center;
    background: transparent;
    pointer-events: none;
}

.urteile-loading.is-visible {
    display: flex;
}

.urteile-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: urteile-spin 0.75s linear infinite;
}

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

/* ── Responsive ── */

@media (max-width: 600px) {
    .urteile-search-input {
        padding-right: 6.25rem;
    }

    .urteile-search-btn span {
        display: none;
    }

    .urteile-date-range {
        gap: 8px;
    }

    .urteile-date-field {
        width: 100%;
    }

    .urteile-date-input,
    .urteile-range-btn {
        width: 100%;
    }

    .urteil-card {
        padding: 1rem 1.125rem;
    }

    .urteil-card-header {
        gap: 10px;
    }
}

@media (max-width: 1180px) {
    /* Fixed-height app: left sidebar stays in-flow, right sidebar is overlay */
    .urteile-layout {
        grid-template-columns: 268px minmax(0, 1fr);
        gap: 1rem;
        height: 100%;
        overflow: hidden;
        padding-top: 5px;
    }

    .urteile-page {
        position: relative;
    }

    .urteile-center-column {
        height: 100%;
        overflow: hidden;
    }

    .urteile-main-shell {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        margin: 0;
    }

    .urteile-body {
        height: 100%;
        overflow: hidden;
    }

    .urteile-results-scroll {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-right: 0;
    }

    /* Hide old Merkliste toggle – FAB replaces it */
    .us-toggle {
        display: none;
    }

    /* Action bar buttons */
    #urteile-filters-apply,
    #urteile-filters-reset {
        flex: 1;
    }

    #urteile-filters-reset {
        background: transparent;
        border-color: rgba(148, 163, 184, 0.35);
        color: #64748b;
        font-size: 0.8rem;
        min-height: 36px;
    }

    #urteile-filters-reset:hover {
        background: rgba(241, 245, 249, 0.7);
        border-color: rgba(148, 163, 184, 0.5);
    }

    /* Empty state: compact */
    .urteile-empty {
        padding: 1rem 1.25rem;
    }

    .urteile-empty-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        margin-bottom: 0.75rem;
    }

    .urteile-empty-icon svg {
        width: 24px;
        height: 24px;
    }

    .urteile-empty-title {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .urteile-empty-text {
        font-size: 0.8rem;
        max-width: 100%;
        line-height: 1.45;
        margin: 0;
    }

    .urteile-empty-examples {
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin-top: 0.875rem;
        gap: 6px;
        width: 100%;
    }

    .urteile-example-chip {
        font-size: 0.72rem;
        padding: 6px 8px;
        text-align: center;
        border-radius: 10px;
        white-space: normal;
        line-height: 1.3;
    }
}

@media (max-width: 860px) {
    /* 1-column: left filter sidebar also becomes overlay */
    .urteile-layout {
        grid-template-columns: 1fr;
    }

    .urteile-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 85vw);
        height: 100dvh;
        max-height: 100dvh;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 8001;
    }

    .urteile-sidebar.is-open {
        transform: translateX(0);
    }

    .urteile-sidebar-card {
        height: 100%;
        border-radius: 0 24px 24px 0;
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.1);
        background: rgba(248, 251, 255, 0.98);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        overflow: hidden;
    }

    .urteile-sidebar-collapse-btn {
        display: none;
    }

    .urteile-sidebar-close-btn {
        display: flex;
    }

    .urteile-sidebar-head {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .urteile-sidebar-title {
        margin: 0;
    }

    .urteile-sidebar-actions {
        background: linear-gradient(180deg, rgba(248, 251, 255, 0) 0%, rgba(248, 251, 255, 0.98) 26%, rgba(248, 251, 255, 0.98) 100%);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

@media (max-width: 720px) {
    .urteile-layout {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 1.5rem;
    }

    .urteile-body {
        border-radius: 20px;
        padding: 1rem;
    }
}

/* ── Bottom-Nav Clearance (nav shows at ≤970px) ── */

@media (max-width: 970px) {
    .urteile-layout {
        padding-bottom: 1.5rem;
    }
}

/* ── Filter Backdrop ── */

.urteile-filter-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 7999;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.urteile-filter-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── Mobile Floating Action Buttons (Filter + Favorites) ── */

.urteile-mobile-bar-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(191, 219, 254, 0.8);
    border-radius: 12px;
    color: #475569;
    cursor: pointer;
    position: fixed;
    bottom: 1.25rem;
    z-index: 100;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    opacity: 0.6;
    transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}
.urteile-mobile-bar-btn:hover,
.urteile-mobile-bar-btn:active {
    opacity: 1;
}

.urteile-mobile-bar-filter {
    left: 1rem;
}

.urteile-mobile-bar-fav {
    right: 1rem;
}

.urteile-mobile-bar-btn:active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.urteile-mobile-bar-badge {
    display: none;
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #fff;
}

.urteile-mobile-bar-badge.is-visible {
    display: flex;
}

/* Must come AFTER the display:none base styles above */
@media (max-width: 1180px) {
    .urteile-mobile-bar-fav {
        display: flex;
    }
}

@media (min-width: 1501px) {
    .urteile-page.is-workspace-sidebar-overlay .urteile-filter-backdrop {
        display: block;
    }

    .urteile-page.is-workspace-sidebar-overlay .urteile-mobile-bar-fav {
        display: flex;
    }
}

.urteile-page.is-workspace-sidebar-overlay .urteile-mobile-bar-fav,
.urteile-page.is-modal-fav-button-visible .urteile-mobile-bar-fav {
    display: flex;
    z-index: 9600;
}

@media (max-width: 860px) {
    .urteile-filter-backdrop {
        display: block;
    }

    .urteile-mobile-bar-filter {
        display: flex;
    }
}

/* ── Close button inside filter sidebar ── */

.urteile-sidebar-close-btn {
    display: none;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.urteile-sidebar-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* ── Small screen card & chip refinements ── */

@media (max-width: 600px) {
    .urteil-card-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ── Very compact (≤480px) ── */

@media (max-width: 900px) {
    .urteile-help-grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 100%;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0.95rem 0 0.3rem;
        overscroll-behavior-x: contain;
    }

    .urteile-help-grid::-webkit-scrollbar {
        display: none;
    }

    .urteile-help-card {
        scroll-snap-align: start;
    }

    .urteile-help-star-badge {
        top: -0.54rem;
        right: 0.14rem;
    }

    .urteile-help-carousel-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.7rem;
        margin-top: 0.6rem;
        margin-bottom: 0.2rem;
    }

    .urteile-help-carousel-btn {
        width: 2.1rem;
        height: 2.1rem;
        border: 1px solid rgba(191, 219, 254, 0.95);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.92);
        color: #334155;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
    }

    .urteile-help-carousel-btn:hover:not(:disabled) {
        background: #eff6ff;
        color: #1d4ed8;
        transform: translateY(-1px);
    }

    .urteile-help-carousel-btn:disabled {
        opacity: 0.45;
        cursor: default;
        transform: none;
    }

    .urteile-help-dots {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.42rem;
    }

    .urteile-help-dot {
        width: 0.5rem;
        height: 0.5rem;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.5);
        cursor: pointer;
        transition: width 0.18s ease, background 0.18s ease, transform 0.18s ease;
    }

    .urteile-help-dot.is-active {
        width: 1.3rem;
        background: linear-gradient(90deg, #d1dfff, #2562eb);
    }
}

@media (max-width: 480px) {
    .urteile-layout {
        padding-left: 0.625rem;
        padding-right: 0.625rem;
    }

    .urteile-title {
        font-size: 1.35rem;
    }

    .urteile-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    .urteile-help-link {
        display: inline;
        margin-left: 0.15rem;
    }

    .urteile-help-overlay {
        padding: 0.75rem;
    }

    .urteile-help-panel-inner {
        padding: 0.8rem;
        border-radius: 18px;
    }

    .urteile-help-grid {
        scroll-padding-left: 0;
        scroll-padding-right: 0;
    }

    .urteile-help-dialog {
        max-height: calc(100vh - 1.5rem);
        border-radius: 18px;
    }

    .urteile-help-close {
        top: 0.65rem;
        right: 0.65rem;
        width: 2rem;
        height: 2rem;
    }

    .urteile-help-title {
        font-size: 0.98rem;
    }

    .urteile-help-text,
    .urteile-help-card p,
    .urteile-help-note,
    .urteile-help-example code {
        font-size: 0.84rem;
    }

    .urteile-badge {
        font-size: 0.6875rem;
        padding: 3px 10px;
        margin-bottom: 0.875rem;
    }

    .urteile-search-input {
        padding: 0.875rem 4.25rem 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .urteile-sidebar-card,
    .urteile-body {
        padding: 0.875rem;
    }

    .urteil-card {
        padding: 0.75rem 0.875rem;
    }

    .urteil-card-icon {
        width: 30px;
        height: 30px;
        border-radius: 7px;
    }

    .urteil-card-gericht {
        font-size: 0.75rem;
    }

    .urteil-card-title {
        font-size: 0.875rem;
    }

    .urteil-card-excerpt {
        font-size: 0.8125rem;
        margin-bottom: 0.625rem;
    }

    .urteil-tag {
        font-size: 0.6875rem;
        padding: 2px 7px;
    }
}

/* ── Collapsible Filter Sidebar ── */

.urteile-sidebar-collapse-btn {
    display: none;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.urteile-sidebar-collapse-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.urteile-sidebar-collapse-btn svg {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.urteile-sidebar-collapse-btn.is-collapsed svg {
    transform: rotate(-90deg);
}

.urteile-sidebar-collapsible {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0px;
}

.urteile-sidebar-collapsible.is-collapsed {
    display: none;
}

@media (max-width: 860px) {
    .urteile-sidebar-collapsible {
        display: flex;
        width: 100%;
    }
}
