/* Category navigation: all three destinations remain visible without scrolling. */
.sticky-nav-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11em), max-content));
    align-items: stretch;
    gap: 10px;
    max-width: 1180px;
    min-width: 0;
    margin: 0 auto;
    overflow: visible;
    font-size: 0.9375rem;
}

.nav-pill {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 52px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 0.9375rem;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-pill:hover {
    border-color: var(--blue);
    color: var(--ink);
    text-decoration: none;
}

.nav-pill:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    text-decoration: none;
}

.nav-pill.is-active,
.nav-pill[aria-current="location"] {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--soft);
}

.pill-title {
    min-width: 0;
}

.pill-title > span {
    display: inline;
}

.nav-pill .pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 1.5rem;
    min-height: 1.5rem;
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.nav-pill.is-active .pill-count,
.nav-pill[aria-current="location"] .pill-count {
    border-color: currentColor;
}

@media (max-width: 600px) {
    .sticky-nav-inner {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.25em), 1fr));
        gap: 6px;
    }

    .nav-pill {
        gap: 4px;
        padding: 8px 6px;
    }

    .pill-title > span {
        display: block;
    }

    .nav-pill .pill-count {
        display: none;
    }
}

.subgroup-label {
    margin: 32px 0 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

/* Effects are ordinary HTML, with container-driven comparisons rather than diagrams.
   Deliberately do not set .visual display: the page owns mobile disclosure states. */
.visual {
    container-name: case-effect;
    container-type: inline-size;
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--code);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.55;
    overflow: visible;
    overflow-wrap: anywhere;
}

.visual-title {
    margin: 0 0 18px;
    color: var(--ink);
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -0.015em;
    line-height: 1.3;
    text-transform: none;
    text-wrap: balance;
}

.effect-value {
    display: block;
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 2rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.effect-evidence {
    display: block;
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
}

.before-after {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

.state {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
}

.state.before,
.state.after {
    border-top: 1px solid var(--line);
}

.state.before {
    border-inline-start: 3px solid var(--line);
}

.state.after {
    border-inline-start: 3px solid var(--teal);
}

.state h4,
.effect-item h4 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    text-wrap: balance;
}

.state p,
.effect-item p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.state p + p,
.effect-item p + p {
    margin-top: 8px;
}

.effect-comparison {
    gap: 10px 12px;
}

.effect-comparison .state {
    padding: 10px 12px;
}

.effect-comparison .state h4 {
    margin: 0 0 6px;
    font-size: 1rem;
    line-height: 1.3;
}

.effect-comparison .effect-value {
    font-size: 1.75rem;
}

.effect-comparison .state.effect-secondary {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.effect-comparison .effect-secondary.before {
    border-inline-start: 3px solid var(--line);
}

.effect-comparison .effect-secondary.after {
    border-inline-start: 3px solid var(--teal);
}

.effect-comparison .effect-secondary p {
    font-size: 1rem;
}

@container case-effect (min-width: 420px) {
    .before-after {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.effect-list {
    display: grid;
    gap: 16px;
    margin: 0;
}

ul.effect-list {
    padding: 0;
    list-style: none;
}

ol.effect-list {
    padding-inline-start: 1.5rem;
}

.effect-item {
    min-width: 0;
}

.effect-item::marker {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 700;
}

.effect-item + .effect-item {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.effect-quote {
    margin: 0 0 16px;
    padding: 0 0 0 14px;
    border-inline-start: 3px solid var(--blue);
    color: var(--ink);
}

.effect-quote p {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 550;
    line-height: 1.55;
}

.effect-specimen {
    min-width: 0;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1.45;
}

.effect-specimen p {
    margin: 0;
}

.effect-specimen .state p {
    font-size: 1.25rem;
    line-height: 1.45;
}

.effect-specimen p + p {
    margin-top: 12px;
}

.effect-specimen h4 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    line-height: 1.3;
}

.effect-caption {
    margin: 10px 0 16px;
    color: var(--muted);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
}

.visual figure {
    min-width: 0;
    margin: 0 0 16px;
}

.visual-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.visual a:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

.visual > :last-child,
.visual figure > :last-child {
    margin-bottom: 0;
}
