/* Shared styles for /projects pages */
:root {
    --bar: #1e40af;
    --bar-soft: #dbe4f7;
    --bar-alt: #c2410c;
}
/* the page sits under the band of the site (css/site.css); these are the old variable names the pages still use */
.project { --color-text-secondary: #3d3b36; --color-text-primary: #0d0d0c; --color-border-light: #0d0d0c1f; --color-bg-alt: #ebe8df; --font-body: "Bricolage Grotesque", system-ui, sans-serif; --color-accent-hover: #0b3fd0; --bar: #0b3fd0; --bar-soft: #dbe3fb; }
.container.project { max-width: 1180px; margin: 0 auto; padding: clamp(26px, 4vw, 54px) clamp(16px, 3.2vw, 48px) 4rem; }
.project a { color: var(--n-link, #0b3fd0); }
.project .back { margin: 1.5rem 0 1rem; font-size: 0.9rem; }
.project .kicker { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); margin: 0; }
.project-title { font-size: 2rem; line-height: 1.2; margin: 0.3rem 0 0.8rem; }
.project .lede { font-size: 1.1rem; color: var(--color-text-secondary); max-width: 680px; margin: 0 0 0.5rem; }
.project .updated { font-size: 0.85rem; color: var(--color-text-muted); margin: 0 0 1.5rem; }
.project section { margin-top: 3rem; }
.project h2 { font-size: 1.25rem; margin: 0 0 0.3rem; }
.project h2 .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--color-text-muted); margin-right: 0.5rem; }
.project .note { font-size: 0.9rem; color: var(--color-text-muted); margin: 0 0 1rem; max-width: 680px; }
.project button { font: inherit; cursor: pointer; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.tile { border: 1px solid var(--color-border); border-radius: 8px; padding: 0.9rem 1rem; }
.tile b { display: block; font-size: 1.8rem; font-weight: 600; line-height: 1.1; }
.tile span { font-size: 0.85rem; color: var(--color-text-muted); }

.filters { position: sticky; top: 0; z-index: 5; background: var(--color-bg); border-bottom: 1px solid var(--color-border); padding: 0.6rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; font-size: 0.9rem; }
.filters .check { display: inline-flex; gap: 0.4rem; align-items: center; cursor: pointer; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { border: 1px solid var(--bar); color: var(--bar); background: var(--bar-soft); border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.8rem; }
.chip::after { content: " ×"; }
#reset, #more { border: 1px solid var(--color-border); background: var(--color-bg); border-radius: 6px; padding: 0.25rem 0.7rem; font-size: 0.85rem; color: var(--color-text-secondary); }
#reset:hover, #more:hover { border-color: var(--bar); color: var(--bar); }
#more { margin-top: 1rem; }

/* Horizontal bars */
.bars { display: grid; gap: 2px; }
.bars.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); column-gap: 2rem; }
.bar { display: grid; grid-template-columns: minmax(110px, 34%) 1fr 2.6rem; gap: 0.6rem; align-items: center; border: 0; background: none; padding: 3px 4px; text-align: left; border-radius: 4px; color: var(--color-text-primary); font-size: 0.9rem; width: 100%; }
.bar:hover { background: var(--color-bg-alt); }
.bar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .lab small { color: var(--color-text-muted); }
.bar .track { height: 14px; }
.bar .fill { display: block; height: 100%; min-width: 2px; background: var(--bar); border-radius: 0 4px 4px 0; }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text-secondary); }
.bar.dim .fill { background: var(--bar-soft); }
.bar.dim { color: var(--color-text-muted); }
.bar.zero { opacity: 0.45; }

/* Columns (timeline) */
.cols { display: flex; align-items: flex-end; gap: 2px; height: 220px; border-bottom: 1px solid var(--color-border); margin-bottom: 1.6rem; }
.col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border: 0; background: none; padding: 0; position: relative; color: var(--color-text-secondary); font-size: 0.75rem; }
.col .v { font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.col .fill { width: 78%; max-width: 44px; min-height: 1px; background: var(--bar); border-radius: 4px 4px 0 0; }
.col .x { position: absolute; bottom: -1.4rem; left: 0; right: 0; text-align: center; color: var(--color-text-muted); }
.col .x .c { font-style: normal; }
.col:hover .fill { background: var(--color-accent-hover); }
.col.dim .fill { background: var(--bar-soft); }

/* Federal Council split */
.split { display: flex; height: 26px; gap: 2px; margin-bottom: 0.5rem; }
.split span { display: block; height: 100%; }
.split .a { background: var(--bar); border-radius: 4px 0 0 4px; }
.split .r { background: var(--bar-alt); border-radius: 0 4px 4px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.9rem; color: var(--color-text-secondary); margin: 0 0 1rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.4rem; }
.fc-table { border-collapse: collapse; font-size: 0.9rem; width: 100%; max-width: 520px; }
.fc-table th, .fc-table td { text-align: right; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--color-border-light); font-variant-numeric: tabular-nums; }
.fc-table th { font-weight: 500; color: var(--color-text-muted); }
.fc-table th:first-child, .fc-table td:first-child { text-align: left; }

/* List */
.list-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.6rem 0; }
#search { flex: 1; min-width: 200px; font: inherit; font-size: 0.9rem; padding: 0.4rem 0.6rem; border: 1px solid var(--color-border); border-radius: 6px; }
.seg button { border: 1px solid var(--color-border); background: var(--color-bg); padding: 0.3rem 0.6rem; font-size: 0.8rem; color: var(--color-text-secondary); margin-left: -1px; }
.seg button:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.seg button:last-child { border-radius: 0 6px 6px 0; }
.seg button.on { background: var(--bar); border-color: var(--bar); color: #fff; }
.item { padding: 0.7rem 0; border-bottom: 1px solid var(--color-border-light); }
.item .meta { font-size: 0.8rem; color: var(--color-text-muted); font-family: var(--font-mono); }
.item .t { display: block; font-weight: 500; margin: 0.15rem 0; }
.item .who { font-size: 0.85rem; color: var(--color-text-secondary); }

.method { border-top: 1px solid var(--color-border); padding-top: 1.5rem; }
.method p { font-size: 0.9rem; color: var(--color-text-secondary); max-width: 680px; }

#tip { position: fixed; z-index: 20; pointer-events: none; background: #1a1a1a; color: #fff; font-size: 0.8rem; padding: 0.3rem 0.55rem; border-radius: 4px; max-width: 260px; }

/* Projects index */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.card { display: block; border: 1px solid var(--color-border); border-radius: 8px; padding: 1.1rem 1.2rem; text-decoration: none; color: inherit; }
.card:hover { border-color: var(--bar); }
.card h3 { margin: 0.3rem 0 0.4rem; font-size: 1.1rem; color: var(--color-text-primary); }
.card p { margin: 0; font-size: 0.9rem; color: var(--color-text-secondary); }

@media (max-width: 560px) {
    .project-title { font-size: 1.6rem; }
    .bar { grid-template-columns: minmax(90px, 40%) 1fr 2.2rem; font-size: 0.85rem; }
    .col { font-size: 0.65rem; }
    .col .x .c { display: none; }
}

/* Stacked shares: what members ask the State to do */
:root { --stack-none: #cbd5e1; }
.stacks { display: grid; gap: 2px; max-width: 720px; }
.srow { display: grid; grid-template-columns: minmax(110px, 30%) 1fr 2.6rem; gap: 0.6rem; align-items: center; border: 0; background: none; padding: 3px 4px; text-align: left; border-radius: 4px; color: var(--color-text-primary); font: inherit; font-size: 0.9rem; cursor: pointer; width: 100%; }
.srow[disabled] { cursor: default; font-weight: 600; margin-bottom: 4px; }
.srow.head { cursor: default; font-size: 0.75rem; color: var(--color-text-muted); padding-bottom: 0; }
.srow:not([disabled]):not(.head):hover { background: var(--color-bg-alt); }
.srow .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text-secondary); font-weight: 400; }
.srow .stack { display: flex; gap: 2px; height: 20px; }
.srow .stack span { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 0.72rem; font-weight: 500; font-variant-numeric: tabular-nums; color: #fff; overflow: hidden; }
.srow .stack span:first-child { border-radius: 4px 0 0 4px; }
.srow .stack span:last-child { border-radius: 0 4px 4px 0; }
.srow .stack .reg { background: var(--bar); }
.srow .stack .none { background: var(--stack-none); color: #334155; }
.srow .stack .pro { background: var(--bar-alt); }
.srow.dim { color: var(--color-text-muted); }
.srow.dim .stack { opacity: 0.4; }
@media (max-width: 600px) { .srow { grid-template-columns: minmax(84px, 34%) 1fr 2rem; font-size: 0.82rem; } }
.stacks + .note, #compassNote { margin-top: 0.9rem; }
.project .note.sub { margin-top: 1.6rem; }
/* Main kinds of rule, with examples */
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.9rem; }
.theme { border: 1px solid var(--color-border-light); border-radius: 8px; padding: 0.8rem 0.9rem; }
.theme.dim { opacity: 0.5; }
.theme .th { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; width: 100%; border: 0; background: none; padding: 0; font: inherit; text-align: left; cursor: pointer; color: var(--color-text-primary); }
.theme .th span { font-size: 0.8rem; color: var(--color-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.theme .hint { font-size: 0.82rem; color: var(--color-text-muted); margin: 0.25rem 0 0.5rem; line-height: 1.4; }
.theme ul { margin: 0; padding-left: 1.1rem; font-size: 0.88rem; line-height: 1.45; }
.theme li { margin-bottom: 0.3rem; }
.theme li small { color: var(--color-text-muted); font-family: var(--font-mono); font-size: 0.7rem; }
.item .sum { display: block; }
.item .who { display: block; }
@media (max-width: 600px) { .fc-table { font-size: 0.78rem; } .fc-table th, .fc-table td { padding: 0.25rem 0.3rem; } }

/* Findings, scope control, data centres, list */
.findings { margin: 0 0 1.5rem; padding: 1rem 1.1rem 1rem 2.2rem; background: var(--color-bg-alt); border-radius: 8px; max-width: 760px; }
.findings li { margin-bottom: 0.45rem; line-height: 1.5; }
.findings li:last-child { margin-bottom: 0; }
.tile small { display: block; font-size: 0.75rem; color: var(--color-text-muted); margin-top: 0.2rem; }
.tile b { font-variant-numeric: tabular-nums; }
.project .hint-line { margin: 0.5rem 0 2rem; }
.project section { margin-bottom: 2.6rem; }
.col .fill.rest { background: var(--bar-soft); border-radius: 4px 4px 0 0; margin-bottom: 2px; }
.col .fill.under { border-radius: 0; }
.col.dim .fill.rest { opacity: 0.5; }
.col.partial .v::after { content: ""; }
.scroll { overflow-x: auto; }
.item .orig { display: block; font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 0.15rem; }
.dc .item:last-child { border-bottom: 0; }
@media (max-width: 600px) {
    .filters { position: static; }
    .bar .lab, .srow .lab { white-space: normal; overflow: visible; line-height: 1.25; }
    .srow .stack span { font-size: 0.66rem; }
    .col .x { font-size: 0.6rem; }
    .findings { padding-left: 1.6rem; font-size: 0.95rem; }
}
@media (max-width: 600px) { .tiles { grid-template-columns: 1fr 1fr; } .tile b { font-size: 1.5rem; } }
#tip b, #tip span { color: #fff; }

.card .ext { font-size: 0.85em; color: var(--color-text-muted); }
