/* ============================================================================
The sheet filter (SheetFilter.astro) and the section jump strip
(SectionJump.astro).
Global rather than scoped to the components: scripts/sheet-filter.ts
creates chips at runtime, and a node made by script never receives a
component's scope attribute (the same trap SearchModal documents).
Form follows the rest of the archive — square, hairline, 10px mono — and
colour is the only thing that says "on": a pressed chip is filled with its
accent, an unpressed one is an outline.
========================================================================== */
.sf {
--sf-acc: var(--love);
display: grid;
gap: 0.85rem;
margin: 1.4rem 0 2.4rem;
scroll-margin-top: 5.5rem;
}
/* ---- Search field + live count ------------------------------------------ */
.sf__bar { display: flex; align-items: center; gap: 1.1rem; }
.sf__search {
flex: 1; min-width: 0;
display: flex; align-items: center; gap: 0.8rem;
min-height: 3.1rem; padding: 0 1rem;
border: 1px solid var(--rule-hi);
background: var(--surface);
cursor: text;
transition: border-color 180ms ease;
}
.sf__search:focus-within { border-color: var(--fg); outline: 1px solid var(--fg); outline-offset: 2px; }
.sf__search svg { width: 15px; height: 15px; flex: none; color: var(--sf-acc); }
.sf__search input {
flex: 1; min-width: 0;
background: none; border: 0; outline: 0;
color: var(--fg);
font-family: var(--font-mono); font-size: 0.84rem; letter-spacing: 0.04em;
}
.sf__search input::placeholder {
color: var(--fg-faint);
font-size: var(--step-micro); letter-spacing: var(--track-micro); text-transform: uppercase;
}
.sf__search input::-webkit-search-cancel-button { filter: grayscale(1); cursor: pointer; }
.sf__count {
flex: none; min-width: 7.5em; text-align: right;
font-family: var(--font-mono); font-size: var(--step-micro);
letter-spacing: var(--track-micro); text-transform: uppercase;
color: var(--sf-acc);
font-variant-numeric: tabular-nums;
}
/* ---- Tag chips ----------------------------------------------------------- */
.sf__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sf-chip {
display: inline-flex; align-items: center; gap: 0.55rem;
padding: 0.44rem 0.7rem;
border: 1px solid var(--rule);
color: var(--sf-acc);
font-family: var(--font-mono); font-size: var(--step-micro);
letter-spacing: var(--track-micro); text-transform: uppercase;
line-height: 1.2;
transition: background-color 200ms ease, border-color 180ms ease, color 1ms;
}
.sf-chip[hidden] { display: none; }
.sf-chip:hover { border-color: var(--sf-acc); }
.sf-chip[aria-pressed='true'] { background: var(--sf-acc); border-color: var(--sf-acc); color: var(--base); }
/* The count is a second register inside the chip, as on the Tags page. */
.sf-chip__n {
padding-left: 0.55rem; border-left: 1px solid var(--rule);
color: var(--fg-faint); font-variant-numeric: tabular-nums;
}
.sf-chip[aria-pressed='true'] .sf-chip__n { color: inherit; border-left-color: currentColor; }
/* A chip that would empty the list: still pressable, visibly spent. */
.sf-chip[data-none] { color: var(--fg-faint); border-style: dashed; }
/* More / clear: furniture, not filters — ink, never the accent. */
.sf-chip--aux { color: var(--fg-dim); border-style: dashed; border-color: var(--rule-hi); }
.sf-chip--aux:hover { color: var(--base); background: var(--fg); border-color: var(--fg); border-style: solid; }
/* A filter that arrived by link: says what kind it is, and how to drop it. */
.sf-chip--set { text-transform: none; letter-spacing: 0.06em; }
.sf-chip__kind { text-transform: uppercase; letter-spacing: var(--track-micro); opacity: 0.75; }
.sf-chip__x { font-size: 13px; line-height: 0.8; }
/* ---- Stats block --------------------------------------------------------- */
/* The fold is only a control on narrow screens; from 860px the block is
always open and its summary is not drawn. */
.sf__fold > summary {
display: flex; align-items: center; justify-content: space-between;
padding: 0.7rem 0.9rem;
border: 1px solid var(--rule);
list-style: none; cursor: pointer;
font-family: var(--font-mono); font-size: var(--step-micro);
letter-spacing: var(--track-micro); text-transform: uppercase;
color: var(--fg-dim);
}
.sf__fold > summary::-webkit-details-marker { display: none; }
.sf__fold-mark::before { content: '+'; font-size: 13px; color: var(--sf-acc); }
.sf__fold[open] .sf__fold-mark::before { content: '−'; }
.sf__fold[open] > summary { border-bottom: 0; }
@media (min-width: 860px) { .sf__fold > summary { display: none; } }
.sf__stats {
display: grid; gap: 1.7rem clamp(1.6rem, 5vw, 4.5rem);
padding: clamp(1.1rem, 2.8vw, 1.9rem);
border: 1px solid var(--rule);
background: var(--surface);
--bracket: var(--sf-acc);
}
@media (min-width: 860px) {
.sf__stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.sf__col { display: grid; gap: 1.6rem; align-content: start; min-width: 0; }
.sf__label {
margin-bottom: 0.8rem;
font-family: var(--font-mono); font-size: var(--step-micro);
letter-spacing: var(--track-micro); text-transform: uppercase;
color: var(--fg-faint);
}
/* A split: one bar cut in true proportion, with a pressable key under it.
The key is separate from the bar because the parts are not all wide
enough to label in place — one beginner sheet in 143 is a sliver. */
.sf-split__bar { display: flex; gap: 3px; height: 7px; }
.sf-split__bar i {
flex: 0 1 0; min-width: 0; background: var(--seg);
transition: flex-grow 320ms var(--ease), background-color 200ms ease;
}
/* A part that still has sheets never vanishes into the gap. */
.sf-split__bar i:not([data-zero]) { min-width: 3px; }
.sf[data-has-diff] .sf-split__bar i[data-sf-mark^='diff:']:not([data-on]),
.sf[data-has-sec] .sf-split__bar i[data-sf-mark^='sec:']:not([data-on]) { background: var(--rule-hi); }
.sf-key__n, .sf-barrow__n { color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.sf-legend { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.8rem -0.5rem 0; }
.sf-key {
display: inline-flex; align-items: center; gap: 0.5rem;
padding: 0.32rem 0.5rem;
border: 1px solid transparent;
font-family: var(--font-mono); font-size: var(--step-micro);
letter-spacing: 0.14em; text-transform: uppercase;
color: var(--fg-dim);
transition: border-color 160ms ease, color 160ms ease;
}
.sf-key i { width: 7px; height: 7px; flex: none; background: var(--seg); }
.sf-key:hover { color: var(--fg); border-color: var(--rule-hi); }
.sf-key[aria-pressed='true'] { color: var(--fg); border-color: var(--seg); }
.sf-key[data-none] { color: var(--fg-faint); }
.sf-key[data-none] i { background: var(--rule-hi); }
/* Few parts: the key reads as the labels of the bar, a size up. */
.sf-legend--wide { gap: 0.3rem 1.1rem; }
.sf-legend--wide .sf-key { font-size: 11px; color: var(--fg); }
/* Ranked bars: label, a track filled in proportion to the longest, count. */
.sf-bars { --bar: var(--sf-acc); list-style: none; padding: 0; display: grid; }
.sf-barrow {
width: 100%;
display: grid; align-items: center;
grid-template-columns: minmax(6.5rem, 12.5rem) minmax(2rem, 1fr) 2.4em;
gap: clamp(0.7rem, 2vw, 1.4rem);
padding: 0.46rem 0;
text-align: left;
font-family: var(--font-mono); font-size: 11px;
letter-spacing: 0.14em; text-transform: uppercase;
color: var(--fg);
}
.sf-barrow__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 1ms; }
.sf-barrow__track { display: block; height: 7px; background: var(--rule-faint); }
.sf-barrow__track i { display: block; height: 100%; background: var(--bar); transition: width 320ms var(--ease); }
.sf-barrow__n { text-align: right; }
.sf-barrow:hover .sf-barrow__label,
.sf-barrow[aria-pressed='true'] .sf-barrow__label { color: var(--bar); }
.sf-barrow[aria-pressed='true'] .sf-barrow__track { outline: 1px solid var(--bar); outline-offset: 2px; }
.sf-barrow[data-none] { color: var(--fg-faint); }
/* ---- Empty state --------------------------------------------------------- */
.sf__empty {
display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.2rem;
padding: 1.1rem 1.2rem;
border: 1px dashed var(--rule-hi);
font-family: var(--font-mono); font-size: 0.84rem; color: var(--fg-dim);
}
.sf__empty[hidden] { display: none; }
/* With scripting off the panel is a readout: the stats are true, but a
search field and chips that do nothing would be a lie. */
@media (scripting: none) {
.sf__bar, .sf__chips { display: none; }
.sf :is(.sf-key, .sf-barrow) { pointer-events: none; }
}
@media (max-width: 560px) {
.sf__bar { flex-wrap: wrap; gap: 0.5rem; }
.sf__search { flex-basis: 100%; }
.sf__count { min-width: 0; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
.sf-split__bar i, .sf-barrow__track i { transition: none; }
}
/* Rows and sections the filter has switched off. `.rec[hidden]` is already
covered in daemon.css; sections and jump links are covered here because a
`display` set by a class beats the UA's `[hidden]` rule. */
[data-sf-section][hidden], [data-sf-jump][hidden] { display: none; }
/* ---- Section jump strip -------------------------------------------------- */
/* Rides under the masthead (62px) while a sectioned list scrolls, so the
next section is one press away from anywhere in a 140-row shelf. */
.sec-jump {
position: sticky; top: 62px; z-index: 40;
display: flex; align-items: stretch;
margin-bottom: 1.6rem;
border: 1px solid var(--rule);
background: var(--base);
font-family: var(--font-mono); font-size: var(--step-micro);
letter-spacing: 0.14em; text-transform: uppercase;
}
.sec-jump__top {
flex: none; display: flex; align-items: center; gap: 0.45rem;
padding: 0.6rem 0.85rem;
border-right: 1px solid var(--rule);
color: var(--fg-faint);
}
.sec-jump__top:hover { color: var(--base); background: var(--fg); }
.sec-jump__track {
display: flex; min-width: 0; flex: 1;
overflow-x: auto; overscroll-behavior-x: contain;
scrollbar-width: none;
}
.sec-jump__track::-webkit-scrollbar { display: none; }
.sec-jump__track a {
flex: none; display: flex; align-items: center; gap: 0.5rem;
padding: 0.6rem 0.85rem;
border-right: 1px solid var(--rule-faint);
color: var(--fg-dim); white-space: nowrap;
transition: background-color 180ms ease, color 1ms;
}
.sec-jump__track a .n { color: var(--acc); }
.sec-jump__track a .cnt { color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.sec-jump__track a:hover { background: var(--wash-strong); color: var(--fg); }
.sec-jump__track a[aria-current='true'] { background: var(--acc); color: var(--base); }
.sec-jump__track a[aria-current='true'] :is(.n, .cnt) { color: inherit; }
/* Headings land clear of the masthead and the strip, not under them. */
[data-sf-section] { scroll-margin-top: calc(62px + 3.4rem); }
/* ---- Tool links on a sheet ---------------------------------------------- */
/* The tools row under a sheet's tags: same pills, pine instead of ink, and
in the tool's own casing — `NetExec` is a name, not a label. */
.tools-row { align-items: center; }
.tools-row__label {
display: inline-flex; align-items: center; gap: 0.4rem; margin-right: 0.2rem;
font-family: var(--font-mono); font-size: var(--step-micro);
letter-spacing: var(--track-micro); text-transform: uppercase;
color: var(--fg-faint);
}
.tools-row__label svg { width: 12px; height: 12px; }
.tag-pill--tool { text-transform: none; letter-spacing: 0.06em; color: var(--pine); border-color: color-mix(in oklab, var(--pine) 45%, transparent); }
.tag-pill--tool:hover { background: var(--pine); border-color: var(--pine); color: var(--base); }