/* =========================================================
   JUSTLAW Frontend — editorial entity & archive UI
   Inspired by just.law article layout
   ========================================================= */

.jl-entity-shell {
    --jl-ink: #0f172a;
    --jl-body: #2f3a48;
    --jl-muted: #5c6678;
    --jl-faint: #8a93a3;
    --jl-border: #e4e7ed;
    --jl-border-soft: #eef0f4;
    --jl-surface: #ffffff;
    --jl-bg: #f6f8fb;
    --jl-primary: #1e63c4;
    --jl-primary-dark: #154f9e;
    --jl-success-ink: #0a6b3f;
    --jl-success-bg: #e8f7ef;
    --jl-success-border: #b8e6cc;
    --jl-radius: 14px;
    --jl-radius-sm: 10px;
    --jl-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px -14px rgba(15, 23, 42, 0.2);

    --jl-content-width: 720px;
    --jl-page-width: 1180px;
    --jl-space-top: clamp(2rem, 5vw, 4rem);
    --jl-space-bottom: clamp(2.5rem, 6vw, 5rem);
    --jl-gap: clamp(1rem, 2vw, 1.5rem);
    --jl-section-gap: clamp(2rem, 3.5vw, 2.75rem);

    width: 100%;
    max-width: var(--jl-page-width);
    margin: 0 auto;
    padding: var(--jl-space-top) clamp(1rem, 3vw, 1.5rem) var(--jl-space-bottom);
    color: var(--jl-body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.jl-entity-shell *,
.jl-entity-shell *::before,
.jl-entity-shell *::after {
    box-sizing: border-box;
}

.jl-entity-page,
.jl-entity-archive {
    width: 100%;
}

/* ---------- Breadcrumbs ---------- */
.jl-breadcrumbs {
    font-size: 0.8125rem;
    margin: 0 0 1.5rem;
    color: var(--jl-faint);
    letter-spacing: 0.01em;
}

.jl-breadcrumbs a {
    color: var(--jl-muted);
    text-decoration: none;
}

.jl-breadcrumbs a:hover {
    color: var(--jl-primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* ---------- Kicker ---------- */
.jl-entity-kicker {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--jl-primary);
}

/* ---------- Hero header ---------- */
.jl-entity-header {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.jl-entity-header__main {
    display: block;
}

.jl-entity-title {
    margin: 0 0 0.85rem;
    font-size: clamp(2rem, 4.2vw, 2.875rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
    font-weight: 800;
    color: var(--jl-ink);
}

.jl-entity-byline {
    margin: 0 0 0.85rem;
    font-size: 0.9375rem;
    color: var(--jl-muted);
    line-height: 1.55;
}

.jl-entity-byline strong {
    color: var(--jl-ink);
    font-weight: 600;
}

.jl-entity-byline__sep {
    margin: 0 0.5rem;
    color: var(--jl-faint);
}

.jl-entity-byline__date {
    color: var(--jl-faint);
}

.jl-entity-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.jl-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--jl-muted);
    background: var(--jl-bg);
    border: 1px solid var(--jl-border);
    letter-spacing: 0.02em;
}

.jl-meta-pill--confidence {
    color: var(--jl-success-ink);
    background: var(--jl-success-bg);
    border-color: var(--jl-success-border);
}

/* ---------- Featured image hero ---------- */
.jl-entity-featured {
    margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
    border-radius: var(--jl-radius);
    overflow: hidden;
    background: var(--jl-bg);
    box-shadow: var(--jl-shadow);
}

.jl-entity-featured__image,
.jl-entity-featured img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
}

/* ---------- Intelligence stats ---------- */
.jl-entity-stats {
    margin: 0 0 var(--jl-section-gap);
}

.jl-entity-stats:empty {
    display: none;
}

.jl-intelligence-grid {
    display: grid;
    gap: 0.85rem;
}

.jl-intelligence-grid--metrics {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.jl-entity-page--claims .jl-intelligence-grid--metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jl-intelligence-grid--wide {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0.85rem;
}

.jl-grid-item {
    background: var(--jl-surface);
    border: 1px solid var(--jl-border);
    border-radius: var(--jl-radius-sm);
    padding: 1.05rem 1.25rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.jl-grid-item:hover {
    border-color: rgba(30, 99, 196, 0.3);
    box-shadow: var(--jl-shadow);
}

.jl-grid-item--wide .jl-grid-value {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--jl-body);
}

.jl-grid-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--jl-faint);
    margin-bottom: 0.45rem;
}

.jl-grid-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--jl-ink);
    letter-spacing: -0.01em;
}

/* ---------- Two-column body ---------- */
.jl-entity-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: clamp(2rem, 4vw, 3.25rem);
    margin-top: var(--jl-section-gap);
    align-items: start;
}

.jl-entity-main {
    min-width: 0;
}

.jl-entity-main > * + * {
    margin-top: var(--jl-section-gap);
}

.jl-entity-aside {
    position: sticky;
    top: 1.5rem;
}

.jl-entity-aside:empty {
    display: none;
}

/* ---------- Article blocks ---------- */
.jl-article-block {
    max-width: var(--jl-content-width);
}

.jl-article-block__title {
    margin: 0 0 1rem;
    font-size: clamp(1.5rem, 2.4vw, 1.875rem);
    line-height: 1.25;
    letter-spacing: -0.015em;
    font-weight: 700;
    color: var(--jl-ink);
}

.jl-article-block--summary .jl-prose > :first-child {
    margin-top: 0;
    font-size: 1.1875rem;
    line-height: 1.65;
    color: var(--jl-body);
}

.jl-article-block--summary .jl-prose > :first-child::first-line {
    font-weight: 500;
}

/* ---------- Prose typography ---------- */
.jl-prose {
    color: var(--jl-body);
    font-size: 1.0625rem;
    line-height: 1.75;
}

.jl-prose > :first-child {
    margin-top: 0;
}

.jl-prose > :last-child {
    margin-bottom: 0;
}

.jl-prose p {
    margin: 0 0 1.15rem;
}

.jl-prose h1,
.jl-prose h2,
.jl-prose h3,
.jl-prose h4,
.jl-prose h5,
.jl-prose h6 {
    color: var(--jl-ink);
    line-height: 1.25;
    letter-spacing: -0.01em;
    font-weight: 700;
    margin: 2.25rem 0 0.85rem;
}

.jl-prose h2 {
    font-size: clamp(1.5rem, 2.4vw, 1.75rem);
    letter-spacing: -0.015em;
}

.jl-prose h3 {
    font-size: 1.25rem;
}

.jl-prose h4 {
    font-size: 1.0625rem;
}

.jl-prose ul,
.jl-prose ol {
    margin: 0 0 1.15rem;
    padding-left: 1.5rem;
}

.jl-prose li {
    margin: 0;
}

.jl-prose li + li {
    margin-top: 0.45rem;
}

.jl-prose a {
    color: var(--jl-primary);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

.jl-prose a:hover {
    color: var(--jl-primary-dark);
    text-decoration-thickness: 2px;
}

.jl-prose strong {
    color: var(--jl-ink);
    font-weight: 600;
}

.jl-prose em {
    font-style: italic;
}

.jl-prose blockquote {
    margin: 1.5rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 3px solid var(--jl-primary);
    color: var(--jl-muted);
    font-style: italic;
    font-size: 1.05rem;
}

.jl-prose blockquote p:last-child {
    margin-bottom: 0;
}

.jl-prose code {
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: var(--jl-bg);
    border: 1px solid var(--jl-border-soft);
    font-size: 0.92em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.jl-prose pre {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    border-radius: var(--jl-radius-sm);
    background: var(--jl-ink);
    color: #f1f5f9;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.jl-prose pre code {
    padding: 0;
    background: transparent;
    border: 0;
    color: inherit;
}

.jl-prose hr {
    margin: 2.25rem 0;
    border: 0;
    border-top: 1px solid var(--jl-border);
}

.jl-prose img,
.jl-prose figure {
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
    border-radius: var(--jl-radius-sm);
}

.jl-prose figure img {
    border-radius: var(--jl-radius-sm);
    margin: 0;
}

.jl-prose figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--jl-faint);
    text-align: center;
}

.jl-prose table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.jl-prose th,
.jl-prose td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--jl-border-soft);
    text-align: left;
    vertical-align: top;
}

.jl-prose th {
    color: var(--jl-ink);
    font-weight: 700;
    background: var(--jl-bg);
}

.jl-report-date {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--jl-radius-sm);
    background: var(--jl-bg);
    border: 1px solid var(--jl-border);
    font-size: 0.9rem;
    color: var(--jl-muted);
}

/* ---------- Sidebar ---------- */
.jl-sidebar {
    background: var(--jl-surface);
    border: 1px solid var(--jl-border);
    border-radius: var(--jl-radius);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--jl-shadow);
}

.jl-sidebar__title {
    margin: 0 0 1rem;
    padding-bottom: 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--jl-primary);
    border-bottom: 1px solid var(--jl-border-soft);
}

.jl-related-group + .jl-related-group {
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--jl-border-soft);
}

.jl-related-group__title {
    margin: 0 0 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--jl-faint);
}

.jl-related-group__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jl-related-group__list li + li {
    margin-top: 0.55rem;
}

.jl-related-group__list a {
    display: inline-block;
    color: var(--jl-body);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.15s ease, transform 0.15s ease;
}

.jl-related-group__list a:hover {
    color: var(--jl-primary);
    transform: translateX(2px);
}

/* ---------- FAQ accordion (theme-safe resets) ---------- */
.jl-entity-shell .jl-faq-block {
    width: 100%;
    max-width: none;
    margin-top: 0.5rem;
}

.jl-entity-shell .jl-faq-block__header {
    margin-bottom: 1.5rem;
}

.jl-entity-shell .jl-faq-block__kicker {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--jl-primary);
}

.jl-entity-shell .jl-faq-block__title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.5rem, 2.4vw, 1.875rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--jl-ink);
}

.jl-entity-shell .jl-faq-block__intro {
    margin: 0;
    max-width: 38rem;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--jl-muted, #5c6678);
}

.jl-entity-shell .jl-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
}

.jl-entity-shell .jl-faq-card {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid var(--jl-border);
    border-radius: calc(var(--jl-radius) + 2px);
    background: var(--jl-surface);
    box-shadow: var(--jl-shadow);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.jl-entity-shell .jl-faq-card:hover {
    border-color: #cdd5e1;
    box-shadow: 0 4px 18px -10px rgba(15, 23, 42, 0.22);
}

.jl-entity-shell .jl-faq-card.is-open {
    border-color: rgba(30, 99, 196, 0.35);
    box-shadow: 0 10px 28px -16px rgba(30, 99, 196, 0.35);
}

.jl-entity-shell .jl-faq-card__heading {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.jl-entity-shell button.jl-faq-card__trigger,
.jl-entity-shell .jl-faq-card__trigger {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 1.15rem 1.25rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: var(--jl-ink) !important;
    text-align: left !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    font: inherit !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    outline: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.jl-entity-shell .jl-faq-card__index {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 999px;
    background: #eef4fc !important;
    color: var(--jl-primary) !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    line-height: 1 !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.jl-entity-shell .jl-faq-card__question {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    font-size: 1.02rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    color: var(--jl-ink) !important;
    white-space: normal !important;
}

.jl-entity-shell .jl-faq-card__toggle {
    position: relative;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    justify-content: center;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    min-height: 2.25rem !important;
    max-width: 2.25rem !important;
    max-height: 2.25rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--jl-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--jl-primary) !important;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.jl-entity-shell .jl-faq-card__toggle::before,
.jl-entity-shell .jl-faq-card__toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: currentColor;
    border-radius: 1px;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.jl-entity-shell .jl-faq-card__toggle::before {
    width: 12px;
    height: 2px;
}

.jl-entity-shell .jl-faq-card__toggle::after {
    width: 2px;
    height: 12px;
}

.jl-entity-shell .jl-faq-card__trigger:hover {
    background: rgba(30, 99, 196, 0.03) !important;
}

.jl-entity-shell .jl-faq-card__trigger:hover .jl-faq-card__toggle {
    border-color: rgba(30, 99, 196, 0.35) !important;
}

.jl-entity-shell .jl-faq-card__trigger:focus {
    outline: 0;
}

.jl-entity-shell .jl-faq-card__trigger:focus-visible {
    outline: 2px solid rgba(30, 99, 196, 0.35);
    outline-offset: -2px;
}

.jl-entity-shell .jl-faq-card.is-open .jl-faq-card__trigger {
    background: rgba(30, 99, 196, 0.04) !important;
}

.jl-entity-shell .jl-faq-card.is-open .jl-faq-card__index {
    background: var(--jl-primary) !important;
    color: #fff !important;
}

.jl-entity-shell .jl-faq-card.is-open .jl-faq-card__toggle {
    background: var(--jl-primary) !important;
    border-color: var(--jl-primary) !important;
    color: #fff !important;
}

.jl-entity-shell .jl-faq-card.is-open .jl-faq-card__toggle::after {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}

.jl-entity-shell .jl-faq-card__panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease;
}

.jl-entity-shell .jl-faq-card__panel[hidden] {
    display: block;
}

.jl-entity-shell .jl-faq-card__answer {
    padding: 0 1.25rem 1.25rem calc(1.25rem + 2.25rem + 1rem);
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--jl-body);
    border-top: 1px solid var(--jl-border-soft);
}

.jl-entity-shell .jl-faq-card__answer p {
    margin: 0.9rem 0 0.75rem;
}

.jl-entity-shell .jl-faq-card__answer p:last-child {
    margin-bottom: 0;
}

/* Kill theme SVG/button rules inside FAQ */
.jl-entity-shell .jl-faq-card__trigger svg,
.jl-entity-shell .jl-faq-card__toggle svg {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    .jl-entity-shell .jl-faq-card,
    .jl-entity-shell .jl-faq-card__trigger,
    .jl-entity-shell .jl-faq-card__index,
    .jl-entity-shell .jl-faq-card__toggle,
    .jl-entity-shell .jl-faq-card__toggle::before,
    .jl-entity-shell .jl-faq-card__toggle::after,
    .jl-entity-shell .jl-faq-card__panel,
    .jl-related-group__list a {
        transition: none;
    }
}

.jl-el-widget-placeholder {
    padding: 1rem 1.25rem;
    border: 1px dashed var(--jl-border, #e4e7ed);
    border-radius: 8px;
    color: var(--jl-muted, #5c6678);
    font-size: 0.9rem;
    background: #fafbfd;
}

/* Nested shell inside Elementor column — avoid double page padding */
.elementor-widget .jl-entity-shell.jl-el-widget {
    max-width: none;
    padding: 0;
}
.jl-entity-shell--archive {
    --jl-archive-accent: #b81e5a;
    --jl-archive-accent-dark: #9a1849;
}

.jl-entity-archive {
    padding-top: clamp(2rem, 4vw, 3rem);
}

.jl-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.2vw, 2rem);
}

.jl-archive-card {
    height: 100%;
}

.jl-archive-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--jl-border);
    border-radius: 10px;
    background: var(--jl-surface);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.jl-archive-card__link:hover {
    border-color: rgba(184, 30, 90, 0.35);
    box-shadow: 0 14px 34px -22px rgba(15, 23, 42, 0.35);
    transform: translateY(-3px);
}

.jl-archive-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f3f4f6;
    overflow: hidden;
}

.jl-archive-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jl-archive-card__image--placeholder {
    object-fit: contain;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: linear-gradient(180deg, #f8f9fb 0%, #f1f3f6 100%);
}

.jl-archive-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.75rem;
    padding: 1.15rem 1.2rem 1.25rem;
}

.jl-archive-card__title {
    margin: 0;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--jl-ink);
    letter-spacing: -0.015em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jl-archive-card__meta,
.jl-archive-card__excerpt {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--jl-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jl-archive-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.35rem;
}

.jl-archive-card__confidence {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--jl-muted);
}

.jl-archive-card__cta {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--jl-archive-accent);
    white-space: nowrap;
}

.jl-archive-card__link:hover .jl-archive-card__cta {
    color: var(--jl-archive-accent-dark);
}

.jl-archive-empty {
    padding: 2.5rem;
    text-align: center;
    border: 1px dashed var(--jl-border);
    border-radius: var(--jl-radius);
    color: var(--jl-muted);
}

.jl-entity-archive .nav-links {
    margin-top: clamp(2.5rem, 4vw, 3.5rem);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.jl-entity-archive .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    height: 2.4rem;
    padding: 0 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--jl-border);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--jl-ink);
    background: var(--jl-surface);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.jl-entity-archive .page-numbers.current,
.jl-entity-archive .page-numbers:hover {
    border-color: var(--jl-archive-accent);
    color: var(--jl-archive-accent);
    background: rgba(184, 30, 90, 0.05);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .jl-entity-grid {
        grid-template-columns: 1fr;
    }

    .jl-entity-aside {
        position: static;
    }

    .jl-entity-page--claims .jl-intelligence-grid--metrics {
        grid-template-columns: 1fr 1fr;
    }

    .jl-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .jl-entity-shell {
        font-size: 1rem;
    }

    .jl-entity-featured__image,
    .jl-entity-featured img {
        max-height: 320px;
    }

    .jl-entity-page--claims .jl-intelligence-grid--metrics,
    .jl-intelligence-grid--metrics {
        grid-template-columns: 1fr;
    }

    .jl-archive-grid {
        grid-template-columns: 1fr;
    }

    .jl-entity-shell button.jl-faq-card__trigger,
    .jl-entity-shell .jl-faq-card__trigger {
        gap: 0.75rem !important;
        padding: 1rem !important;
    }

    .jl-entity-shell .jl-faq-card__question {
        font-size: 0.95rem !important;
    }

    .jl-entity-shell .jl-faq-card__answer {
        padding: 0 1rem 1rem calc(1rem + 2.25rem + 0.75rem);
    }
}

/* ---------- Legacy aliases ---------- */
.jl-confidence-high {
    color: green;
}

.jl-confidence-medium {
    color: orange;
}

.jl-confidence-low {
    color: red;
}
