/* Council Reader - Main Stylesheet */

/* ==========================================================================
   Base / Reset
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f5f5f5;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

footer.index-footer {
    font-size: 1.125rem;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

/* ==========================================================================
   Components: Breadcrumb
   ========================================================================== */

.breadcrumb {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   Components: Tags
   ========================================================================== */

.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    background: #f0f0f0;
    color: #666;
}

.tag.council-file-tag {
    background: #e3f2fd;
    color: #1565c0;
    text-decoration: none;
}

a.tag.council-file-tag:hover {
    background: #cfe8fc;
}

.tag.district {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* ==========================================================================
   Index Page: Header
   ========================================================================== */

.index-header {
    padding: 2rem 0 1.5rem;
    margin-bottom: 2rem;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.header-link {
    font-size: 0.875rem;
    color: #666;
}

.header-link:hover {
    color: #0066cc;
}

.tagline {
    font-size: 1.125rem;
    color: #666;
}

.contested-count {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    max-width: 400px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.875rem;
}

.newsletter-form input[type="submit"] {
    padding: 0.5rem 1rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
}

.newsletter-form input[type="submit"]:hover {
    background: #0052a3;
}

.newsletter-note {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Index Page: Meetings Sections
   ========================================================================== */

.meetings-section {
    margin-bottom: 2.5rem;
}

.meetings-section h2 {
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.meetings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.meeting-card {
    padding: 1rem 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
    color: inherit;
    position: relative;
}

.meeting-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #0066cc;
    text-decoration: none;
}

.meeting-card-upcoming {
    border-left: 3px solid #f59e0b;
}

.meeting-card-summarized {
    border-left: 3px solid #10b981;
}

.meeting-card-agenda-only {
    border-left: 3px solid #6b7280;
}

.meeting-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.meeting-badge-summarized {
    background: #d1fae5;
    color: #065f46;
}

.meeting-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.meeting-date {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.meeting-stats {
    font-size: 0.8125rem;
    color: #999;
}

.show-more-note {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.pagination-link {
    padding: 0.5rem 1rem;
    border: 1px solid #0066cc;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
    color: #0066cc;
    transition: all 0.2s;
}

.pagination-link:hover {
    background: #0066cc;
    color: #fff;
    text-decoration: none;
}

.pagination-disabled {
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
}

.pagination-disabled:hover {
    background: transparent;
    color: #999;
}

.pagination-info {
    font-size: 0.875rem;
    color: #666;
}

/* ==========================================================================
   Meeting Page: Meta & Links
   ========================================================================== */

.meeting-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.meeting-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.meeting-links a {
    font-size: 0.875rem;
    color: #0066cc;
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border: 1px solid #0066cc;
    border-radius: 4px;
    transition: all 0.2s;
}

.meeting-links a:hover {
    background: #0066cc;
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   Meeting Page: Video Summary
   ========================================================================== */

.video-summary {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.video-summary h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.video-summary-content {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #333;
}

.video-summary-content h3.summary-section {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 1.5rem 0 0.75rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.video-summary-content h3.summary-section:first-child {
    margin-top: 0;
}

.video-summary-content p {
    margin-bottom: 1rem;
}

.video-summary-content ul {
    margin: 0 0 1rem 0;
    padding-left: 1.25rem;
}

.video-summary-content li {
    margin-bottom: 0.5rem;
}

/* H4 headers in summary (### level headings) */
.video-summary-content h4.vote-item {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 1.25rem 0 0.5rem 0;
}

/* Tables in summary */
.video-summary-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0 1.25rem 0;
    font-size: 0.875rem;
}

.video-summary-content th,
.video-summary-content td {
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.video-summary-content th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Votes Appendix (political memo format) */
.votes-appendix {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.votes-appendix > summary.section-title {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: #f8f9fa;
    border-radius: 8px;
}

.votes-appendix[open] > summary.section-title {
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
}

.votes-appendix-content {
    padding: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #333;
}

.votes-appendix-content h3.summary-section {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 1.5rem 0 0.75rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.votes-appendix-content h3.summary-section:first-child {
    margin-top: 0;
}

.votes-appendix-content p {
    margin-bottom: 1rem;
}

.votes-appendix-content ul {
    margin: 0 0 1rem 0;
    padding-left: 1.25rem;
}

.votes-appendix-content li {
    margin-bottom: 0.5rem;
}

/* Vote Item Headers (### level in votes appendix) */
.votes-appendix-content h4.vote-item {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 1.5rem 0 0.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.votes-appendix-content h4.vote-item:first-child {
    margin-top: 0;
}

/* Vote Tables */
.votes-appendix-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0 1.25rem 0;
    font-size: 0.875rem;
}

.votes-appendix-content th,
.votes-appendix-content td {
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.votes-appendix-content th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.votes-appendix-content td {
    vertical-align: top;
}

/* Council File Links */
.council-file-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.council-file-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Meeting Page: Agenda Sections
   ========================================================================== */

.section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 3px solid #0066cc;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title:hover {
    color: #0066cc;
}

.section-title::before {
    content: "▼";
    font-size: 0.75rem;
    transition: transform 0.2s;
    display: inline-block;
}

.section[open] .section-title::before {
    transform: rotate(0deg);
}

.section:not([open]) .section-title::before {
    transform: rotate(-90deg);
}

.section-content {
    margin-top: 1rem;
}

/* ==========================================================================
   Meeting Page: Item Cards
   ========================================================================== */

.item-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.item-card-clickable {
    cursor: pointer;
}

.item-card-clickable:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #0066cc;
}

.item-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.item-header {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.item-number {
    font-weight: 600;
    color: #0066cc;
    font-size: 0.875rem;
}

.item-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.item-title {
    font-size: 1rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.item-title strong {
    font-weight: 700;
}

.item-title em {
    font-style: italic;
}

/* ==========================================================================
   Meeting Page: Item Details & Attachments
   ========================================================================== */

.item-details,
.item-attachments {
    margin-top: 0.75rem;
}

.item-details summary,
.item-attachments summary {
    font-size: 0.875rem;
    color: #0066cc;
    cursor: pointer;
    user-select: none;
}

.item-details summary {
    font-weight: 500;
}

.item-details summary:hover,
.item-attachments summary:hover {
    text-decoration: underline;
}

.item-details-content {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-left: 3px solid #e0e0e0;
    font-size: 0.875rem;
    color: #444;
    line-height: 1.6;
}

.attachment-list {
    margin-top: 0.5rem;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.document-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.document-title {
    font-size: 0.875rem;
    color: #1a1a1a;
    font-weight: 500;
}

.document-links {
    display: flex;
    gap: 0.5rem;
}

.document-action {
    font-size: 0.8125rem;
    text-decoration: none;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.document-action.view {
    color: #0066cc;
    border: 1px solid #0066cc;
    background: transparent;
}

.document-action.view:hover {
    background: #0066cc;
    color: #fff;
}

.document-action.download {
    color: #fff;
    background: #0066cc;
    border: 1px solid #0066cc;
}

.document-action.download:hover {
    background: #0052a3;
    border-color: #0052a3;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.empty-section {
    font-size: 0.875rem;
    color: #999;
    font-style: italic;
    padding: 0.5rem 0.75rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .meeting-meta {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .item-card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .tagline {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   About Page
   ========================================================================== */

.about-content {
    max-width: 650px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 2rem;
}

.about-section h2 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.about-section p {
    margin-bottom: 1rem;
    color: #333;
}

/* Site-wide nav tabs (Meetings / Contested Votes / About) */
.site-nav {
    display: flex;
    gap: 0.5rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.site-nav-link {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: #555;
    background: #f0f0f0;
    transition: background 0.15s ease;
}

.site-nav-link:hover {
    background: #e0e0e0;
}

.site-nav-link.active {
    background: #1a1a1a;
    color: #fff;
}

/* Contested Votes table page */
/* Wider than the default .container - the table needs more room than
   article/prose pages do, so it fits without a needless horizontal scroll
   on typical desktop widths. Mobile still gets .table-responsive's
   overflow-x scroll where the table genuinely can't fit. */
.votes-page .container {
    max-width: 1200px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
}

.votes-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.votes-table th,
.votes-table td {
    border: 1px solid #ddd;
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.votes-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.votes-table-date {
    white-space: nowrap;
    color: #666;
}

.votes-table-meeting a {
    color: #0066cc;
    text-decoration: none;
}

.votes-table-meeting a:hover {
    text-decoration: underline;
}

.votes-table-item {
    white-space: nowrap;
}

.votes-table-voteof {
    color: #666;
    font-size: 0.8125rem;
}

.votes-table-desc {
    min-width: 280px;
}

.votes-table-result {
    white-space: nowrap;
    text-align: center;
}

.votes-table-tally {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.votes-table-tally-adopted {
    background: #e6f4ea;
    color: #1e7e34;
}

.votes-table-tally-failed {
    background: #fbe9e7;
    color: #c62828;
}

.votes-table-dissent {
    min-width: 200px;
}

.votes-table-dissent div {
    margin-bottom: 0.25rem;
}

.votes-table-dissent div:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Left Tracker key votes
   ========================================================================== */

.votes-table-tally-unknown {
    background: #eeeeee;
    color: #555555;
}

.tag-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.tag-left-tracker-key-vote {
    background: #fdf0e3;
    color: #a4520c;
    border: 1px solid #f0d3b0;
}

/* Denominator behind a score: "(28 votes)", "(11/15)". */
.score-basis {
    color: #666666;
    font-size: 0.8em;
    font-weight: 400;
}

.page-note,
.section-note {
    color: #555555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    max-width: 70ch;
}

.votes-appendix-note,
.vote-item-note {
    color: #666666;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.appendix-note {
    border-left: 3px solid #e0e0e0;
    padding-left: 0.85rem;
    margin: 0.85rem 0;
    color: #444444;
}

/* A tracked vote as shown on a council file page. */
.tracked-vote {
    border: 1px solid #eee0cc;
    border-radius: 6px;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    background: #fffdfa;
}

.tracked-vote-column {
    margin-left: 0.4rem;
    font-weight: 600;
}

.tracked-vote-desc {
    margin: 0.5rem 0 0.35rem;
}

.tracked-vote-meta {
    color: #666666;
    font-size: 0.85rem;
}

/* ==========================================================================
   DESIGN LAYER — the clerk's ledger
   --------------------------------------------------------------------------
   The subject is a municipal voting record, so the material is the greenbar
   accounting stock city clerks print on, not newsprint. Row banding is the
   decoration and the utility at once: it is what makes a seven-column table
   scannable. Loaded last so these win at equal specificity over the older
   rules above, without rewriting 5,400 pages' worth of page-specific CSS.
   ========================================================================== */

:root {
    --paper:  #F2F4EF;   /* ledger stock — green-grey, deliberately not cream */
    --bar:    #E4EBDF;   /* the greenbar band */
    --ink:    #14180F;   /* near-black with a green cast */
    --ink-2:  #5A6353;   /* secondary text */
    --rule:   #C3CDBB;   /* hairlines */
    --aye:    #2F6B3F;   /* voted the tracked position */
    --nay:    #A3372B;   /* voted against — oxide, like a stamp pad */
    --stamp:  #2A4B8D;   /* municipal ink: links, council files */
    --surface:#FBFCFA;   /* cards and table ground */

    --font-display: 'Archivo Narrow', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-data: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--stamp); }

h1, h2, h3, .section-title {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    color: var(--ink);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Long-form reading — meeting summaries — gets the serif. Data never does. */
.summary-content, .summary-content p, .summary-content li,
.section-content p, .section-content li {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
}

header {
    background: var(--surface);
    border-bottom: 2px solid var(--ink);
    padding: 1.25rem 0 1rem;
}

.breadcrumb, .tagline, .page-note, footer { color: var(--ink-2); }

.site-nav-link {
    border-radius: 2px;
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink-2);
    font-family: var(--font-display);
    letter-spacing: 0.02em;
}
.site-nav-link:hover { background: var(--bar); }
.site-nav-link.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Everything that is a code — tallies, council files, item numbers, dates —
   is set in mono with tabular figures so columns of them line up. */
.votes-table-date, .votes-table-item, .votes-table-tally,
.votes-table-voteof, .tag.council-file-tag, .score-basis, .score-total {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
}

/* --- Tables: greenbar ------------------------------------------------- */

.votes-table { background: var(--surface); font-size: 0.9rem; }

.votes-table th,
.votes-table td { border: none; border-bottom: 1px solid var(--rule); }

.votes-table th {
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.votes-table tbody tr:nth-child(even) { background: var(--bar); }
.votes-table tbody tr:hover { background: #DCE6D6; }

.tag.council-file-tag {
    background: transparent;
    border: 1px solid var(--stamp);
    color: var(--stamp);
    border-radius: 2px;
    font-size: 0.75rem;
}

.votes-table-tally-adopted { color: var(--aye); font-weight: 700; }
.votes-table-tally-failed  { color: var(--nay); font-weight: 700; }

/* --- The board: the alignment matrix ----------------------------------- */
/* One mark per tracked vote, oldest first. Every row shares the same column
   count, so a column reads down the whole council as one roll call. Shape
   carries the meaning as well as colour, for greyscale and colourblindness. */

.board {
    background: var(--surface);
    border: 1px solid var(--rule);
    margin-bottom: 0.75rem;
}

.board-row {
    display: grid;
    grid-template-columns:
        minmax(8.5rem, 13rem)   /* name   */
        2.25rem                 /* CD     */
        1fr                     /* strip  */
        3.25rem 3.25rem 3.75rem;/* voting, sponsor, total */
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.9rem;
    border-bottom: 1px solid var(--rule);
}
.board-row:last-child { border-bottom: none; }
.board-row:not(.board-head):nth-of-type(even) { background: var(--bar); }
.board-row:not(.board-head):hover { background: #DCE6D6; }

.board-head {
    background: var(--ink);
    color: var(--paper);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 3;
}
.board-head .board-district, .board-head .score-cell { color: var(--paper); }

.board-name { font-weight: 600; letter-spacing: -0.01em; }
.board-district {
    font-family: var(--font-data);
    font-size: 0.75rem;
    color: var(--ink-2);
    text-align: right;
}

.score-cell {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
    font-size: 0.8125rem;
    text-align: right;
    color: var(--ink-2);
}
.score-total { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.board-head .score-total { font-size: 0.7rem; }
.score-total .none { color: var(--ink-2); font-weight: 400; }

/* The strip is a grid, not a flex row: identical column tracks on every row is
   what makes a column line up down the board. --n is set once on .board. */
.strip {
    display: grid;
    grid-template-columns: repeat(var(--n, 40), 1fr);
    gap: 1px;
    min-width: 0;
}

.strip-axis {
    font-family: var(--font-data);
    font-size: 0.65rem;
    letter-spacing: 0;
    text-transform: none;
    display: flex;
    justify-content: space-between;
    opacity: 0.75;
    /* The grid gap alone left the end date touching the VOTING header. */
    padding-right: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
}
.axis-start, .axis-end { flex: 0 0 auto; }

.mark {
    height: 15px;
    border-radius: 1px;
    display: block;
    min-width: 0;
}
.mark-with     { background: var(--aye); }
.mark-against  { background: transparent; box-shadow: inset 0 0 0 1.5px var(--nay); }
.mark-absent   {
    background: transparent;
    /* A centred rule, not a baseline one: "no vote recorded" is a state and has
       to be visible as a mark, not read as an empty cell. */
    background-image: linear-gradient(var(--rule), var(--rule));
    background-size: 100% 3px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
}
.mark-unscored { background: var(--rule); opacity: 0.45; }

/* Column hover: every mark sharing the hovered index lights up, so one vote
   reads across the whole council. */
.mark.col-on { outline: 2px solid var(--stamp); outline-offset: 1px; z-index: 2; position: relative; }

.board-key {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--ink-2);
    margin: 0 0 2rem;
    align-items: center;
}
.board-key span { display: inline-flex; align-items: center; gap: 0.4rem; }
.board-key .mark { width: 10px; flex: 0 0 10px; }

/* --- Tooltip ----------------------------------------------------------- */

.board-tip {
    position: fixed;
    z-index: 50;
    max-width: 19rem;
    background: var(--ink);
    color: var(--paper);
    border-radius: 3px;
    padding: 0.6rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    pointer-events: none;
    box-shadow: 0 6px 20px rgba(20, 24, 15, 0.28);
}
.board-tip[hidden] { display: none; }
.board-tip b { display: block; font-size: 0.875rem; margin-bottom: 0.15rem; }
.board-tip .meta {
    font-family: var(--font-data);
    font-size: 0.7rem;
    opacity: 0.8;
    display: block;
    margin-top: 0.35rem;
}

@media (max-width: 640px) {
    .board-row { grid-template-columns: 1fr 3.5rem; grid-template-areas: "name total" "strip strip"; }
    .board-name { grid-area: name; }
    .board-district { display: none; }
    .strip { grid-area: strip; }
    .score-total { grid-area: total; }
    h1 { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }

/* --- Static headings must not look collapsible -------------------------- */
/* .section-title is shared with meeting.html's <summary> elements, where the
   triangle, pointer cursor and hover colour are all true. On key-votes.html the
   same class dresses plain <h2>s, which promised a disclosure that does not
   exist. Scope the affordances to the element that actually has them. */

h2.section-title {
    cursor: default;
    user-select: auto;
    border-left-color: var(--stamp);
    color: var(--ink);
}
h2.section-title::before { content: none; }
h2.section-title:hover { color: var(--ink); }
