:root {
    color-scheme: light;
    --ink: #17322c;
    --muted: #5c6f69;
    --paper: #f5f2e9;
    --card: #fffdf7;
    --green: #1f6653;
    --line: #d9ded7;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0 96px;
}

.hero { max-width: 850px; margin-bottom: 56px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { max-width: 800px; margin: 0; font-family: Georgia, serif; font-size: clamp(2.6rem, 7vw, 5.8rem); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.lead { max-width: 680px; margin: 28px 0 0; color: var(--muted); font-size: 1.18rem; line-height: 1.65; }
h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 500; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 32px; }
.quiet-link { color: var(--green); font-weight: 750; text-underline-offset: 4px; }
.public-intro { display: grid; grid-template-columns: .75fr 1.1fr; gap: 22px 56px; padding: 38px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 18px 50px rgb(23 50 44 / 8%); }
.public-intro .eyebrow { grid-column: 1 / -1; margin-bottom: -4px; }
.public-intro p:last-child { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.public-purpose { margin-top: 72px; }
.purpose-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.purpose-card { min-height: 230px; padding: 26px; border-top: 3px solid var(--green); background: var(--card); }
.purpose-card span { color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.purpose-card h3 { margin: 48px 0 10px; font-size: 1.25rem; }
.purpose-card p { margin: 0; color: var(--muted); line-height: 1.6; }

@media (max-width: 800px) {
    .shell { padding-top: 42px; }
    .public-intro { grid-template-columns: 1fr; }
    .purpose-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .shell { width: min(100% - 24px, 1120px); }
    .hero-actions { align-items: flex-start; flex-direction: column; }
    .public-intro { padding: 24px; }
}
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--green); color: white; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.button.secondary { background: var(--ink); }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px max(20px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--line); background: var(--card); }
.brand { color: var(--ink); font-family: Georgia, serif; font-size: 1.35rem; text-decoration: none; transition: color .18s ease; }
.app-header nav { display: flex; align-items: center; gap: 4px; }
.app-header nav a, .tools-menu summary, .text-button { padding: 9px 11px; border-radius: 8px; color: var(--ink); font: inherit; font-weight: 650; text-decoration: none; transition: background-color .18s ease, color .18s ease; }
.app-header nav a[aria-current="page"] { background: var(--green); color: white; }
.tools-menu { position: relative; }
.tools-menu summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; user-select: none; }
.tools-menu summary::-webkit-details-marker { display: none; }
.tools-menu summary::after { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; content: ""; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.tools-menu[open] summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.tools-menu.contains-current > summary { background: var(--green); color: white; }
.tools-menu-panel { position: absolute; top: calc(100% + 7px); right: 0; z-index: 20; display: grid; min-width: 220px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 16px 38px rgb(23 50 44 / 18%); }
.tools-menu:not([open]) .tools-menu-panel { display: none; }
.tools-menu-panel::before { position: absolute; top: -8px; right: 0; left: 0; height: 8px; content: ""; }
.tools-menu-panel a { display: block; white-space: nowrap; }
.inline-form { display: inline; margin: 0; }
.text-button { border: 0; background: transparent; cursor: pointer; }
.app-header nav a:focus-visible, .tools-menu summary:focus-visible, .text-button:focus-visible, .button:focus-visible { outline: 3px solid rgb(31 102 83 / 28%); outline-offset: 2px; }
@media (hover: hover) {
    .brand:hover { color: var(--green); }
    .app-header nav a:hover, .tools-menu summary:hover, .text-button:hover { background: #e3ece7; color: var(--green); }
    .app-header nav a[aria-current="page"]:hover { background: #174f41; color: white; }
    .tools-menu.contains-current > summary:hover { background: #174f41; color: white; }
    .tools-menu:hover .tools-menu-panel { display: grid; }
    .text-button.danger:hover { background: #f8e5e0; color: #7b3024; }
    .button:hover { background: #174f41; box-shadow: 0 8px 18px rgb(23 50 44 / 18%); transform: translateY(-1px); }
    .button.secondary:hover { background: #2b5147; }
}
.app-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 90px; }
.auth-card { width: min(520px, 100%); margin: 3vh auto 0; padding: 36px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 18px 50px rgb(23 50 44 / 8%); }
.auth-card h1, .page-heading h1 { font-size: clamp(2.3rem, 6vw, 4.5rem); }
.compact { margin-top: 16px; font-size: 1rem; }
.form-stack, .form-grid { display: grid; gap: 18px; margin-top: 28px; }
.form-grid { grid-template-columns: 1fr 1fr; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .86rem; font-weight: 700; }
input, select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #bcc8c2; border-radius: 9px; background: white; color: var(--ink); font: inherit; }
input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--green); }
input:focus, select:focus { outline: 3px solid rgb(31 102 83 / 18%); border-color: var(--green); }
.wide { grid-column: 1 / -1; }
.back-link { display: inline-block; margin-top: 24px; color: var(--green); }
.notice, .error { margin-bottom: 24px; padding: 14px 16px; border-radius: 10px; background: #e3f2e9; color: #174c3f; }
.error { background: #f8e5e0; color: #7b3024; }
.page-heading { max-width: 780px; margin-bottom: 36px; }
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.portal-card { min-height: 230px; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; }
.portal-card span { color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.portal-card h2 { margin-top: 50px; font-size: 1.6rem; }
.portal-card p { color: var(--muted); line-height: 1.55; }
.portal-card.muted { opacity: .68; }
.content-grid, .admin-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 22px; align-items: start; }
.admin-layout { grid-template-columns: minmax(360px, .8fr) minmax(0, 1.2fr); }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.panel.soft { background: #edf1eb; }
.panel h2 { font-size: 1.7rem; }
.help, small { color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading a { color: var(--green); }
.section-heading a.button { color: white; }
.count-badge { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; background: #e3ece7; font-weight: 800; }
.linked-items { margin-top: 22px; padding: 14px; border-radius: 9px; background: #edf1eb; }
.role-options { display: flex; flex-wrap: wrap; gap: 14px 22px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.role-options legend { padding: 0 6px; color: var(--muted); font-size: .86rem; font-weight: 700; }
.role-options label { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.role-options .help { flex-basis: 100%; margin: 0; }
.checkbox-label { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.ownership-card { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ownership-card.ended { opacity: .66; background: #f2f2ee; }
.calculation-breakdown { margin-top: 24px; padding: 20px; border-radius: 12px; background: #edf1eb; }
.calculation-breakdown h3 { margin: 0; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.compact-table { font-size: .78rem; }
.compact-table th, .compact-table td { padding: 9px 7px; }
.calculation-check { margin: 16px 0 0; padding: 10px 12px; border-radius: 8px; font-weight: 700; }
.calculation-check.matches { background: #dcece3; color: #174c3f; }
.calculation-check.differs { background: #f8e5e0; color: #7b3024; }
.end-form { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.end-form label { max-width: 180px; }
.danger { color: #9a3528; }
.danger-zone { margin-top: 30px; padding: 20px; border: 1px solid #d9a79f; border-radius: 12px; background: #fff4f1; }
.danger-zone h2 { color: #7b3024; }
.danger-zone p { color: #70483f; line-height: 1.55; }
.danger-button { width: fit-content; background: #9a3528; }
.danger-button:hover { background: #7b2a20; }
.small-button { min-height: 40px; }
hr { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
td a { color: var(--green); font-weight: 700; }

.statutes-heading { max-width: 880px; }
.document-actions { display: flex; align-items: center; gap: 22px; margin-top: 28px; }
.source-note { margin-bottom: 24px; padding: 18px 22px; border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; background: #e6eee9; }
.source-note p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; }
.document-meta { overflow: hidden; margin-bottom: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.document-meta div { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: baseline; gap: 28px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.document-meta div:last-child { border-bottom: 0; }
.document-meta span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.document-meta strong { font-family: Georgia, serif; font-size: 1.15rem; font-weight: 500; line-height: 1.35; }
.statutes-index { margin: 0 0 48px; padding: 24px 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.statutes-index > strong { display: block; margin-bottom: 18px; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }
.statutes-index div { display: grid; gap: 4px; }
.statutes-index a { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: baseline; min-height: 42px; padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 650; text-decoration: none; }
.statutes-index a span:first-child { color: var(--green); font-weight: 800; }
.statutes-index a:hover { background: #dce8e1; }
.statutes-document { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 18px 50px rgb(23 50 44 / 7%); }
.document-intro { padding: 34px; border-bottom: 1px solid var(--line); background: #edf1eb; }
.document-intro > p:last-child { max-width: 800px; margin: 0; font-family: Georgia, serif; font-size: 1.28rem; line-height: 1.65; }
.law-reference { color: var(--green); font-weight: 700; text-underline-offset: 3px; }
.statute { display: grid; grid-template-columns: minmax(220px, .38fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.statute-label { padding: 28px; background: #faf8f1; }
.statute-label > span { color: var(--green); font-size: .82rem; font-weight: 850; letter-spacing: .08em; }
.statute-label h2 { margin-top: 10px; font-size: 1.55rem; }
.statute-label small { display: block; margin-top: 8px; line-height: 1.45; }
.statute-text { padding: 28px 34px; font-family: Georgia, serif; font-size: 1.05rem; line-height: 1.72; }
.statute-text p { margin: 0 0 16px; }
.statute-text p:last-child { margin-bottom: 0; }
.statute-text ol { margin: 0; padding-left: 24px; }
.statute-text li { padding: 0 0 9px 8px; }
.struck-statute { background: #f3f1eb; }
.struck-statute del { color: #68746f; text-decoration-thickness: 2px; }
.document-signature { display: flex; justify-content: space-between; gap: 30px; padding: 34px; background: #edf1eb; }
.document-signature p { margin: 0; line-height: 1.6; }
.document-signature span { color: var(--muted); }
.historical-commentary { overflow: hidden; margin-top: 70px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 18px 50px rgb(23 50 44 / 7%); scroll-margin-top: 24px; }
.historical-commentary > header { padding: 34px; border-bottom: 1px solid var(--line); background: #edf1eb; }
.historical-commentary > header h2 { margin-bottom: 16px; }
.historical-commentary > header p:last-child { max-width: 800px; margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.comment-card { display: grid; grid-template-columns: minmax(220px, .38fr) minmax(0, 1fr); gap: 0; border-bottom: 1px solid var(--line); background: var(--card); }
.comment-card:last-child { border-bottom: 0; }
.comment-card h3 { grid-column: 1; grid-row: 1 / span 20; margin: 0; padding: 28px; background: #faf8f1; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.comment-card p { grid-column: 2; margin: 0; padding: 0 34px 14px; font-family: Georgia, serif; font-size: 1.05rem; line-height: 1.72; }
.comment-card p:first-of-type { padding-top: 28px; }
.comment-card p:last-child { padding-bottom: 28px; }
.legal-sources { margin-top: 52px; padding: 28px; border-radius: 16px; background: var(--ink); color: white; }
.legal-sources h2 { font-size: 1.7rem; }
.legal-sources p { max-width: 760px; color: #d5dfda; line-height: 1.6; }
.legal-sources li { margin-top: 10px; }
.legal-sources a { color: white; font-weight: 700; text-underline-offset: 4px; }
.board-page-heading { margin-bottom: 30px; }
.current-board { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 18px 50px rgb(23 50 44 / 8%); }
.current-board > header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 32px; border-bottom: 1px solid var(--line); background: #edf1eb; }
.current-board > header h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.board-empty { padding: 32px; }
.board-primary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.board-person-card { min-height: 245px; padding: 30px; background: var(--card); }
.board-person-card > span { color: var(--green); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.board-person-card h3 { margin: 58px 0 8px; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.board-person-card p { margin: 0 0 22px; color: var(--muted); }
.board-person-card small { display: inline-flex; padding: 6px 9px; border-radius: 7px; background: #edf1eb; color: var(--ink); font-weight: 700; }
.board-secondary-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.board-person-group { padding: 24px; background: #faf8f1; }
.board-person-group h3 { margin: 0 0 18px; font-family: Georgia, serif; font-size: 1.15rem; font-weight: 500; }
.board-person-group div { display: grid; gap: 2px; margin-top: 12px; }
.board-person-group span { color: var(--muted); font-size: .86rem; }
.board-statutes { margin-top: 34px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: #edf1eb; }
.board-statutes > header { margin-bottom: 22px; }
.board-statutes > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.board-statutes article { padding: 24px; border-radius: 12px; background: var(--card); }
.board-statutes article > span { color: var(--green); font-weight: 850; }
.board-statutes h3 { margin: 9px 0 12px; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.board-statutes article p { margin: 0; color: var(--muted); line-height: 1.65; }
.board-history { margin-top: 70px; }
.board-history > .section-heading { align-items: end; }
.board-history > .help { max-width: 750px; line-height: 1.6; }
.board-history-wrap { margin-top: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.board-history-table { min-width: 2200px; margin: 0; }
.board-history-table th, .board-history-table td { min-width: 205px; padding: 14px; }
.board-history-table th:first-child, .board-history-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 120px; background: var(--card); box-shadow: 1px 0 0 var(--line); }
.board-history-table th:first-child { z-index: 2; }
.board-history-table td span { color: var(--muted); }
.board-history-table td small { color: var(--muted); }
.board-history-table .reelection-two { background: #fff6bf; }
.board-admin-form { margin-top: 34px; scroll-margin-top: 24px; }
.board-period-form { display: grid; gap: 30px; margin-top: 28px; }
.board-period-field { max-width: 340px; }
.board-form-group { padding-top: 24px; border-top: 1px solid var(--line); }
.board-form-group h3 { margin: 0 0 18px; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.board-form-group > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.board-person-fields { display: grid; gap: 14px; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
.board-person-fields legend { padding: 0 7px; color: var(--green); font-weight: 800; }
.board-period-form > .button { width: fit-content; }
.profile-unlinked { max-width: 720px; }
.profile-unlinked p { line-height: 1.65; }
.profile-unlinked .button { margin-top: 10px; }
.assessment-heading { max-width: 900px; }
.assessment-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.assessment-summary article { min-height: 120px; padding: 24px; background: var(--card); }
.assessment-summary span { display: block; margin-bottom: 18px; color: var(--green); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.assessment-summary strong { font-family: Georgia, serif; font-size: 1.65rem; font-weight: 500; }
.assessment-table-panel { padding: 0; overflow: hidden; }
.assessment-table-panel > .section-heading, .assessment-table-panel > .help { margin-right: 28px; margin-left: 28px; }
.assessment-table-panel > .section-heading { padding-top: 28px; }
.assessment-table { width: 100%; table-layout: fixed; font-size: .88rem; }
.assessment-table th:first-child { width: 14%; }
.assessment-table th:nth-child(2) { width: 26%; }
.assessment-table th, .assessment-table td { padding: 12px 10px; }
.assessment-table th:nth-child(n+3):nth-child(-n+7), .assessment-table td:nth-child(n+3):nth-child(-n+7) { text-align: right; }
.assessment-table th { overflow-wrap: anywhere; }
.assessment-owner { line-height: 1.45; }
.assessment-table tfoot { background: #e3ece7; }
.assessment-table .assessment-incomplete { background: #fff4d6; }
.archive-heading { max-width: 850px; }
.archive-editor { overflow: hidden; margin-bottom: 30px; padding: 0; }
.archive-editor-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; list-style: none; cursor: pointer; transition: background-color .18s ease; }
.archive-editor-summary::-webkit-details-marker { display: none; }
.archive-editor-summary .eyebrow { margin-bottom: 8px; }
.archive-editor-summary h2 { font-size: 1.7rem; }
.archive-editor-toggle { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 9px 12px; border-radius: 9px; background: #e3ece7; color: var(--green); font-size: .86rem; font-weight: 800; }
.archive-editor-toggle::after { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; content: ""; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.archive-editor[open] > .archive-editor-summary { border-bottom: 1px solid var(--line); background: #edf1eb; }
.archive-editor[open] .archive-editor-toggle::after { transform: rotate(225deg) translate(-1px, -1px); }
.archive-editor .when-open { display: none; }
.archive-editor[open] .when-closed { display: none; }
.archive-editor[open] .when-open { display: inline; }
.archive-editor-summary:focus-visible { outline: 3px solid rgb(31 102 83 / 28%); outline-offset: -3px; }
.archive-editor-content { padding: 28px; }
.archive-editor-content > .help { margin-top: 0; }
.archive-editor-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.archive-editor-actions a { color: var(--green); font-weight: 700; }
@media (hover: hover) {
    .archive-editor-summary:hover { background: #f1f4ef; }
    .archive-editor[open] > .archive-editor-summary:hover { background: #e3ece7; }
}
.archive-upload-form { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .7fr); gap: 20px; margin-top: 24px; }
.archive-title-field, .archive-access-options, .archive-file-field { grid-column: 1 / -1; }
.archive-access-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; border: 0; }
.archive-access-options legend { margin-bottom: 9px; color: var(--muted); font-size: .86rem; font-weight: 700; }
.archive-access-options label { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); cursor: pointer; }
.archive-access-options label:has(input:checked) { border-color: var(--green); background: #e9f0ec; box-shadow: inset 0 0 0 1px var(--green); }
.archive-access-options input { flex: 0 0 auto; width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--green); }
.archive-access-options span, .archive-access-options small { display: block; }
.archive-access-options small { margin-top: 4px; font-weight: 500; }
.archive-file-field { padding: 18px; border: 1px dashed #9db1a8; border-radius: 12px; background: #f8faf7; }
.archive-file-field input { min-height: auto; padding: 12px; border: 0; background: transparent; }
.archive-file-field small { line-height: 1.5; }
.archive-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.archive-toolbar form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.archive-toolbar label:first-child { width: min(360px, 52vw); }
.archive-toolbar label:nth-child(2) { width: 130px; }
.archive-toolbar p { flex: 0 0 auto; margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.archive-years { display: grid; gap: 34px; }
.archive-year { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.archive-year > header { display: flex; align-items: center; gap: 20px; padding: 20px 24px; background: #e6eee9; }
.archive-year > header h2 { font-size: 1.7rem; }
.archive-year > header span { flex: 1; height: 1px; background: #bdcec5; }
.archive-list { display: grid; }
.archive-document { display: grid; grid-template-columns: 110px minmax(260px, 1fr) auto auto; align-items: center; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.archive-document:last-child { border-bottom: 0; }
.archive-document-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.archive-document-main h3 { margin: 0; font-size: 1rem; }
.archive-document-main p { margin: 6px 0 0; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.access-badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #e3ece7; color: #174c3f; font-size: .73rem; font-weight: 800; white-space: nowrap; }
.access-badge.board-only { background: #f4ead2; color: #6f5016; }
.archive-document-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.archive-document-actions form { margin: 0; }
.missing-file { color: #8b3c30; font-size: .84rem; font-weight: 750; }
.archive-empty { text-align: center; }
.archive-empty p { color: var(--muted); }
.supplier-heading { max-width: 900px; }
.supplier-layout { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr); gap: 24px; align-items: start; }
.supplier-editor .help { line-height: 1.55; }
.supplier-danger-zone { margin-top: 34px; }
.supplier-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.supplier-toolbar label { flex: 1 1 280px; }
.supplier-toolbar p { flex-basis: 100%; margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.supplier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.supplier-card { display: flex; overflow: hidden; min-height: 300px; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 10px 30px rgb(23 50 44 / 5%); }
.supplier-card > header { display: grid; gap: 14px; padding: 22px; border-bottom: 1px solid var(--line); background: #edf1eb; }
.supplier-card h2 { font-size: 1.45rem; overflow-wrap: anywhere; }
.supplier-card header p { margin: 5px 0 0; color: var(--muted); }
.supplier-card header > span { width: fit-content; padding: 6px 9px; border-radius: 999px; background: var(--card); color: var(--green); font-size: .74rem; font-weight: 800; }
.supplier-card-body { flex: 1; padding: 22px; }
.supplier-contact { display: grid; gap: 4px; margin: 0 0 17px; }
.supplier-contact small { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.supplier-contact-links { display: grid; gap: 8px; }
.supplier-contact-links a { width: fit-content; color: var(--green); font-weight: 700; overflow-wrap: anywhere; text-underline-offset: 3px; }
.supplier-card address { margin-top: 20px; color: var(--muted); font-style: normal; line-height: 1.55; }
.supplier-fax { margin: 16px 0 0; color: var(--muted); font-size: .88rem; }
.supplier-card footer { padding: 14px 22px; border-top: 1px solid var(--line); }
.supplier-empty { text-align: center; }
.supplier-empty p { color: var(--muted); }

.budget-heading { max-width: 900px; }
.budget-year-navigation { display: grid; gap: 12px; margin-bottom: 26px; }
.budget-year-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.budget-year-list a { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--ink); text-decoration: none; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.budget-year-list a strong { font-family: Georgia, serif; font-size: 1.3rem; font-weight: 500; }
.budget-year-list a span { color: var(--muted); font-size: .75rem; }
.budget-year-list a[aria-current="page"] { border-color: var(--green); background: var(--green); color: white; box-shadow: 0 8px 24px rgb(31 102 83 / 18%); }
.budget-year-list a[aria-current="page"] span { color: #dcece5; }
.budget-older-years { border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.budget-older-years summary { display: flex; justify-content: space-between; padding: 13px 16px; cursor: pointer; font-weight: 750; }
.budget-older-years summary span { color: var(--muted); font-size: .82rem; }
.budget-older-years > div { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 16px; }
.budget-older-years a { min-width: 66px; padding: 8px 10px; border-radius: 7px; background: #edf1eb; color: var(--ink); text-align: center; text-decoration: none; font-weight: 700; }
.budget-older-years a[aria-current="page"] { background: var(--green); color: white; }
.budget-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin-bottom: 26px; border: 1px solid var(--line); border-radius: 15px; background: var(--line); }
.budget-summary article { min-height: 112px; padding: 22px; background: var(--card); }
.budget-summary span { display: block; min-height: 32px; margin-bottom: 12px; color: var(--muted); font-size: .73rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.budget-summary strong { font-family: Georgia, serif; font-size: 1.42rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.negative-amount { color: #9a3528; }
.budget-editor { overflow: hidden; padding: 0; }
.budget-editor > .section-heading, .budget-editor > .help { margin-right: 26px; margin-left: 26px; }
.budget-editor > .section-heading { align-items: end; padding-top: 26px; }
.budget-editor > .help { line-height: 1.55; }
.budget-source { max-width: 360px; color: var(--muted); font-size: .82rem; text-align: right; }
.budget-table-wrap { overflow-x: auto; margin-top: 22px; border-top: 1px solid var(--line); }
.budget-table { min-width: 920px; margin: 0; table-layout: fixed; font-size: .84rem; }
.budget-table th:first-child { width: 29%; }
.budget-table th:nth-child(2) { width: 7%; }
.budget-table th:nth-child(3), .budget-table th:nth-child(4) { width: 20%; }
.budget-table th:nth-child(5) { width: 24%; }
.budget-table th, .budget-table td { padding: 10px 12px; vertical-align: middle; }
.budget-table thead th:nth-child(n+3) { text-align: right; }
.budget-table tbody th { font-weight: 650; }
.budget-table tbody th small { display: block; margin-top: 4px; color: #8c5d13; font-size: .7rem; text-transform: uppercase; }
.budget-section-row th { padding: 13px 12px; background: #e3ece7; color: var(--green); font-family: Georgia, serif; font-size: 1.08rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.money-input { display: flex; align-items: center; overflow: hidden; border: 1px solid #bbc8c2; border-radius: 8px; background: white; }
.money-input:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgb(31 102 83 / 14%); }
.money-input input { width: 100%; min-height: 38px; padding: 8px 6px 8px 9px; border: 0; border-radius: 0; background: transparent; text-align: right; font: inherit; font-variant-numeric: tabular-nums; }
.money-input input:focus { outline: 0; }
.money-input span { padding-right: 9px; color: var(--muted); font-size: .75rem; }
.budget-calculated-row { background: #f4f7f3; }
.budget-calculated-row th { color: var(--green); font-weight: 800; }
.budget-calculated-value { display: block; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.budget-deviation-row { background: #fff8e7; }
.budget-history-cell { font-variant-numeric: tabular-nums; }
.budget-history-cell strong, .budget-history-cell small, .budget-history-cell span { display: block; }
.budget-history-cell small { margin-top: 2px; color: var(--muted); }
.budget-history-cell span { margin-top: 5px; color: var(--muted); font-size: .76rem; }
.budget-history-cell span.large { color: #8c5d13; font-weight: 800; }
.budget-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 26px; border-top: 1px solid var(--line); background: #faf8f1; }
.budget-save-bar p { margin: 0; color: var(--muted); font-size: .82rem; }
.budget-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.budget-actions-grid > details { padding: 0; }
.budget-actions-grid summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px; list-style: none; cursor: pointer; }
.budget-actions-grid summary::-webkit-details-marker { display: none; }
.budget-actions-grid summary h2 { font-size: 1.55rem; }
.budget-actions-grid summary > span { color: var(--green); font-weight: 800; }
.budget-actions-grid details[open] summary { border-bottom: 1px solid var(--line); background: #edf1eb; }
.budget-actions-grid details > div { padding: 24px; }
.budget-actions-grid details > div > p { margin-top: 0; color: var(--muted); line-height: 1.55; }
.budget-create-year .form-grid { grid-template-columns: 160px 1fr; align-items: end; }
.budget-pdf-years { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; max-height: 220px; overflow-y: auto; padding: 3px; }
.budget-pdf-years label { display: flex; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.budget-pdf-years input { width: auto; min-height: auto; accent-color: var(--green); }
.budget-pdf-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.recycle-heading { max-width: 900px; }
.recycle-note { margin-bottom: 28px; }
.recycle-register { padding: 0; overflow: hidden; }
.recycle-register > .section-heading { padding: 26px 26px 0; }
.recycle-table { margin: 8px 0 0; }
.recycle-type { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #e3ece7; color: var(--green); font-size: .74rem; font-weight: 800; }
.recycle-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; min-width: 280px; }
.recycle-actions form { margin: 0; }
.recycle-purge { position: relative; }
.recycle-purge > summary { min-height: 40px; padding: 10px 12px; border-radius: 8px; color: #8b352a; cursor: pointer; font-weight: 750; list-style: none; }
.recycle-purge > summary::-webkit-details-marker { display: none; }
.recycle-purge[open] > summary { background: #fff0ec; }
.recycle-purge form { display: grid; gap: 12px; width: 310px; margin-top: 8px; padding: 16px; border: 1px solid #d9a79f; border-radius: 10px; background: #fff4f1; }
.recycle-purge .checkbox-label { font-size: .82rem; line-height: 1.4; }
.recycle-empty { text-align: center; }
.recycle-empty p { color: var(--muted); }

@media (hover: hover) {
    .budget-year-list a:hover { border-color: var(--green); background: #edf1eb; transform: translateY(-1px); }
    .budget-year-list a[aria-current="page"]:hover { background: #174c3f; }
    .budget-older-years a:hover { background: #dce8e1; }
}

@media (max-width: 900px) {
    .admin-layout, .content-grid { grid-template-columns: 1fr; }
    .portal-grid { grid-template-columns: 1fr; }
    .app-header { align-items: flex-start; }
    .app-header nav { flex-wrap: wrap; justify-content: flex-end; }
    .statute { grid-template-columns: 1fr; }
    .statute-label { padding-bottom: 18px; }
    .comment-card { grid-template-columns: 1fr; background: var(--card); }
    .comment-card h3 { grid-column: 1; grid-row: auto; padding: 24px; background: #faf8f1; }
    .comment-card p { grid-column: 1; padding-right: 24px; padding-left: 24px; }
    .comment-card p:first-of-type { padding-top: 24px; }
    .comment-card p:last-child { padding-bottom: 24px; }
    .board-primary-grid { grid-template-columns: 1fr; }
    .board-secondary-groups { grid-template-columns: 1fr 1fr; }
    .board-statutes > div { grid-template-columns: 1fr; }
    .board-form-group > div { grid-template-columns: 1fr 1fr; }
    .assessment-summary { grid-template-columns: 1fr; }
    .archive-document { grid-template-columns: 100px minmax(0, 1fr); }
    .archive-document > .access-badge, .archive-document-actions { grid-column: 2; justify-self: start; }
    .archive-toolbar { align-items: stretch; flex-direction: column; }
    .archive-toolbar p { margin: 0; }
    .supplier-layout { grid-template-columns: 1fr; }
    .budget-year-list { grid-template-columns: repeat(3, 1fr); }
    .budget-summary, .budget-actions-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .app-shell { width: min(100% - 24px, 1120px); padding-top: 34px; }
    .app-header { flex-direction: column; }
    .app-header nav { justify-content: flex-start; gap: 13px; }
    .tools-menu-panel { right: auto; left: 0; }
    .form-grid { grid-template-columns: 1fr; }
    .wide { grid-column: auto; }
    .auth-card, .panel { padding: 22px; }
    .document-actions { align-items: flex-start; flex-direction: column; }
    .document-meta div { grid-template-columns: 1fr; gap: 6px; }
    .document-intro, .statute-text, .document-signature, .historical-commentary > header { padding: 24px; }
    .document-signature { flex-direction: column; }
    .current-board > header { align-items: flex-start; flex-direction: column; padding: 24px; }
    .board-secondary-groups, .board-form-group > div { grid-template-columns: 1fr; }
    .board-statutes { padding: 22px; }
    .board-history > .section-heading { align-items: flex-start; flex-direction: column; }
    .archive-upload-form, .archive-access-options { grid-template-columns: 1fr; }
    .archive-editor-summary { align-items: flex-start; flex-direction: column; gap: 16px; padding: 22px; }
    .archive-editor-content { padding: 22px; }
    .archive-title-field, .archive-access-options, .archive-file-field { grid-column: 1; }
    .archive-toolbar form { align-items: stretch; flex-direction: column; }
    .archive-toolbar label:first-child, .archive-toolbar label:nth-child(2) { width: 100%; }
    .archive-document { grid-template-columns: 1fr; gap: 10px; }
    .archive-document > .access-badge, .archive-document-actions { grid-column: 1; }
    .archive-document-actions { align-items: flex-start; flex-wrap: wrap; }
    .supplier-grid { grid-template-columns: 1fr; }
    .supplier-toolbar { align-items: stretch; flex-direction: column; }
    .supplier-toolbar label { flex-basis: auto; }
    .budget-year-list { grid-template-columns: repeat(2, 1fr); }
    .budget-summary, .budget-actions-grid { grid-template-columns: 1fr; }
    .budget-source { max-width: none; text-align: left; }
    .budget-editor > .section-heading { align-items: flex-start; flex-direction: column; }
    .budget-save-bar { align-items: flex-start; flex-direction: column; }
    .budget-create-year .form-grid, .budget-pdf-years { grid-template-columns: repeat(2, 1fr); }
    .recycle-actions { min-width: 240px; }
}
