/* primary-legislation.html and secondary-legislation.html (legislation_index/).
   Builds on year-insights.css for the section headings and the chart. */

.zl-li-kp { font-size: .68rem; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; color: var(--zl-accent);
    border: 1px solid currentColor; border-radius: 4px; padding: 0 .3rem; margin-left: .3rem; text-decoration: none; vertical-align: 1px; opacity: .85; }
.zl-li-kp:hover { opacity: 1; }
.zl-li-group { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--zl-muted); font-weight: 600; margin: 1.75rem 0 .75rem; }

/* Finder */
.zl-finder { position: relative; max-width: 40rem; margin-top: 1rem; }
.zl-finder-label { display: block; font-size: .8rem; font-weight: 600; color: var(--zl-muted); margin: 0 0 .35rem; }
.zl-finder-box { display: flex; align-items: center; gap: .6rem; padding: 0 1rem; border: 1.5px solid var(--zl-border);
    border-radius: 10px; background: var(--zl-surface); color: var(--zl-muted); }
.zl-finder-box:focus-within { border-color: var(--zl-accent); box-shadow: 0 0 0 3px rgba(36, 92, 229, .15); color: var(--zl-accent); }
.zl-finder-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: .8rem 0;
    font-size: 1.05rem; color: var(--zl-ink); }
.zl-finder-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% - 1.9rem); list-style: none; margin: 0; padding: .35rem;
    max-height: 70vh; overflow-y: auto;
    background: var(--zl-surface); border: 1px solid var(--zl-border); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 42, .14); }
.zl-finder-list li { display: flex; align-items: center; gap: .5rem; }
.zl-finder-list li > a:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: .5rem .7rem; border-radius: 6px;
    text-decoration: none; color: var(--zl-ink); }
.zl-finder-list li > a:first-child:hover, .zl-finder-list li > a.is-active { background: var(--zl-soft); }
.zl-finder-list b { font-weight: 600; font-family: var(--zl-font-serif); }
.zl-finder-list span { font-size: .78rem; color: var(--zl-muted); font-variant-numeric: tabular-nums; }
.zl-finder-list .zl-li-kp { margin-right: .6rem; }
.zl-finder-list .zl-f-year b { color: var(--zl-accent); font-family: var(--zl-font); }
.zl-f-none { padding: .7rem; font-size: .9rem; color: var(--zl-muted); display: block !important; }
.zl-f-none a { color: var(--zl-accent); }
.zl-finder-hint { margin: .55rem 0 0; font-size: .82rem; color: var(--zl-muted); }
.zl-finder-hint button { border: 1px solid var(--zl-border); background: var(--zl-surface); color: var(--zl-ink); border-radius: 999px;
    padding: .05rem .6rem; font-size: .8rem; margin: 0 .1rem .25rem; }
.zl-finder-hint button:hover { border-color: var(--zl-accent); color: var(--zl-accent); }
.zl-finder-hint a { color: var(--zl-accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.zl-finder-sep { margin: 0 .3rem; }

/* Subject chips */
.zl-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.zl-chip { border: 1px solid var(--zl-border); background: var(--zl-surface); color: var(--zl-ink); border-radius: 999px;
    padding: .3rem .85rem; font-size: .88rem; }
.zl-chip:hover { border-color: var(--zl-accent); color: var(--zl-accent); }
.zl-chip[aria-expanded="true"] { background: var(--zl-accent); border-color: var(--zl-accent); color: #fff; }
.zl-subj-panel { margin-top: .9rem; padding: 1.1rem 1.25rem; border-radius: 8px; background: var(--zl-soft); border-left: 3px solid var(--zl-accent); }
.zl-subj-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; margin: 0 0 .6rem; }
.zl-subj-head h3 { margin: 0; font-family: var(--zl-font-serif); font-size: 1.15rem; font-weight: 600; color: var(--zl-ink); }
.zl-subj-head span { font-size: .8rem; color: var(--zl-muted); }
.zl-subj-acts { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.zl-subj-acts li { break-inside: avoid; padding: .2rem 0; font-size: .92rem; }
.zl-subj-acts li > a:first-child { color: var(--zl-ink); text-decoration: none; font-family: var(--zl-font-serif); }
.zl-subj-acts li > a:first-child:hover { color: var(--zl-accent); text-decoration: underline; }
.zl-subj-foot { margin: .6rem 0 0; font-size: .88rem; }
.zl-subj-foot a { color: var(--zl-accent); font-weight: 600; text-decoration: none; }

/* Cited this fortnight */
.zl-cited { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.zl-cited-card { border: 1px solid var(--zl-border); border-radius: 8px; background: var(--zl-surface); padding: .9rem 1rem; min-width: 0; }
.zl-cited-top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.zl-cited-act { font-family: var(--zl-font-serif); font-weight: 600; color: var(--zl-ink); text-decoration: none; line-height: 1.3; min-width: 0; }
.zl-cited-act:hover { color: var(--zl-accent); }
.zl-cited-n { font-weight: 600; font-size: 1.3rem; color: var(--zl-accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.zl-cited-n small { font-size: .7rem; font-weight: 400; color: var(--zl-muted); }
.zl-cited-case { margin: .5rem 0 0; font-size: .82rem; line-height: 1.45; color: var(--zl-muted);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.zl-cited-case a { color: var(--zl-ink); text-decoration: none; }
.zl-cited-case a:hover { color: var(--zl-accent); text-decoration: underline; }
.zl-cited-nc { white-space: nowrap; }

/* Timeline */
.zl-li-time { border-top: 1px solid var(--zl-border); padding-top: 2rem; }
.zl-li-hit { fill: transparent; }
.zl-li-chart a:hover .zl-yi-bar, .zl-li-chart a.is-peek .zl-yi-bar { fill: var(--zl-accent); opacity: 1; }
.zl-tl { position: relative; }
.zl-peek { position: absolute; width: 17rem; max-width: 100%; z-index: 10; pointer-events: none;
    background: var(--zl-surface); border: 1px solid var(--zl-border); border-radius: 8px; padding: .7rem .85rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .16); font-size: .85rem; }
.zl-peek.is-interactive { pointer-events: auto; }
.zl-peek-h { margin: 0 0 .35rem; color: var(--zl-muted); }
.zl-peek-h b { font-family: var(--zl-font-serif); font-size: 1.2rem; color: var(--zl-ink); margin-right: .35rem; }
.zl-peek-k { margin: 0 0 .15rem; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--zl-muted); }
.zl-peek ul { list-style: none; padding: 0; margin: 0; }
.zl-peek li { padding: .12rem 0; font-family: var(--zl-font-serif); line-height: 1.3; }
.zl-peek li a { color: var(--zl-ink); text-decoration: none; }
.zl-peek-go { display: inline-block; margin-top: .4rem; font-weight: 600; color: var(--zl-accent); text-decoration: none; }

.zl-li-decades { display: grid; margin: .25rem 0 0; }
.zl-li-dec { border-left: 1px solid var(--zl-border); padding: .4rem .6rem .2rem; min-width: 0; }
.zl-li-dec-h { margin: 0 0 .3rem; font-weight: 600; font-size: .85rem; color: var(--zl-ink); }
.zl-li-dec ul { list-style: none; padding: 0; margin: 0 0 .4rem; }
.zl-li-dec li { font-family: var(--zl-font-serif); font-size: .84rem; line-height: 1.3; margin: 0 0 .3rem; overflow-wrap: anywhere; }
.zl-li-dec li a { color: var(--zl-ink); text-decoration: none; }
.zl-li-dec li a:hover { color: var(--zl-accent); }
.zl-li-dec-y { margin: 0; font-size: .72rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.zl-li-dec-y a, .zl-li-early-years a { color: var(--zl-muted); text-decoration: none; margin-right: .2rem; }
.zl-li-dec-y a:hover, .zl-li-early-years a:hover { color: var(--zl-accent); }
.zl-li-early { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; margin-top: 1.5rem; }
.zl-li-early-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 1.5rem; }
.zl-li-early-list li { display: flex; gap: .6rem; font-size: .88rem; padding: .2rem 0; break-inside: avoid; }
.zl-li-early-list span { color: var(--zl-muted); font-variant-numeric: tabular-nums; min-width: 2.4rem; }
.zl-li-early-list a { color: var(--zl-ink); text-decoration: none; font-family: var(--zl-font-serif); }
.zl-li-early-list a:hover { color: var(--zl-accent); }
.zl-li-early-years { font-size: .82rem; line-height: 1.9; margin: 0; }

@media (max-width: 991.98px) {
    .zl-cited { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .zl-li-decades { display: block; padding-left: 0 !important; }
    .zl-li-dec { border-left: 0; border-top: 1px solid var(--zl-border); padding: .6rem 0; }
    .zl-li-dec ul { display: flex; flex-wrap: wrap; gap: 0 1rem; }
    .zl-li-dec-y { font-size: .82rem; }
    .zl-li-early { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .zl-cited { grid-template-columns: minmax(0, 1fr); }
    .zl-subj-acts, .zl-li-early-list { columns: 1; }
    /* Three rows that scroll sideways rather than a screen-high wall of chips. */
    .zl-chips { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); justify-content: start; justify-items: start;
        overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
    .zl-chip { white-space: nowrap; }
    .zl-li-dec-y a { display: inline-block; padding: .2rem .15rem; }
}
