:root { --ink: #17243b; --muted: #526077; --line: #dce3ed; --accent: #4338ca; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
html { scroll-padding-top: calc(var(--sticky-header-height, 0px) + 12px); }
.portal-main :is([id], a, button, input, select, textarea, summary, [tabindex]) { scroll-margin-block: 12px; }
a, button, summary, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #6366f1; outline-offset: 3px; }
button, summary { touch-action: manipulation; cursor: pointer; }
button[aria-disabled="true"] { cursor: wait; opacity: .6; }
button:disabled { cursor: not-allowed; opacity: .6; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px; background: white; color: var(--accent); }
.skip-link:focus { top: 12px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header.is-sticky { position: sticky; top: 0; z-index: 40; box-shadow: 0 3px 10px #17243b0a; }
.header-inner { max-width: 1152px; margin: auto; padding: 16px 24px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; }
.site-brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); font-size: 20px; font-weight: 650; text-decoration: none; line-height: 1.3; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; color: #fff; background: var(--accent); border-radius: 10px; font-size: 27px; }
.site-brand small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.site-menu, .menu-panel { display: contents; }
.site-menu > .menu-trigger { display: none; }
.site-nav { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a, .section-nav a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; color: var(--muted); font-size: 14px; font-weight: 550; text-decoration: none; border-radius: 7px 7px 0 0; border-bottom: 3px solid transparent; }
.site-nav a:hover, .section-nav a:hover { background: #f1f5f9; color: var(--accent); }
.site-nav a[aria-current], .section-nav a[aria-current] { color: var(--accent); border-color: var(--accent); background: #eef2ff; }
.site-utilities { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 16px; font-size: 14px; padding-bottom: 4px; }
.admin-label { font-size: 12px; font-weight: 600; border-radius: 5px; padding: 4px 8px; background: #eef2ff; color: var(--accent); }
.language-form { display: flex; align-items: center; gap: 6px; }
.language-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.language-form select { min-height: 44px; border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; background: #fff; color: var(--muted); font-size: 14px; }
.language-apply { min-height: 44px; padding: 8px; color: var(--accent); }
.account-menu { position: relative; }
.account-menu > summary, .menu-trigger { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 12px; cursor: pointer; border: 1px solid var(--line); border-radius: 7px; font-weight: 550; }
.site-menu summary::-webkit-details-marker { display: none; }
.account-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 270px; max-width: calc(100vw - 32px); z-index: 30; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px #17243b18; }
.account-identity { overflow-wrap: anywhere; padding: 8px 10px 12px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.account-panel a, .account-panel button { display: block; width: 100%; text-align: left; min-height: 44px; padding: 10px; border-radius: 6px; }
.account-panel a:hover, .account-panel button:hover { background: #eef2ff; color: var(--accent); }
.portal-main { min-width: 0; }
.portal-main > *, .portal-main section, .portal-main aside { min-width: 0; }
.portal-main input, .portal-main select, .portal-main textarea { max-width: 100%; }
.section-nav { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 24px; }
.section-nav a { padding: 10px 12px; }
.page-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading > :first-child { min-width: 0; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 7px; font-size: 14px; font-weight: 550; line-height: 1.4; text-decoration: none; }
.button-primary { background: var(--accent); color: white; }
.button-primary:hover { background: #3730a3; }
.button-secondary { border-color: var(--line); background: white; color: var(--accent); }
.button-secondary:hover, .button-quiet:hover { background: #eef2ff; }
.button-quiet { color: var(--accent); }
.notice { margin-bottom: 16px; padding: 12px 16px; border-radius: 8px; border: 1px solid #c7d2fe; background: #eef2ff; color: #312e81; }
.notice-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.ledger-form label { display: block; margin-bottom: 6px; font-weight: 550; }
.ledger-form .helptext { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.ledger-form .errorlist { color: #b91c1c; margin: 8px 0; }
.ledger-form input:not([type="checkbox"]):not([type="hidden"]), .ledger-form select, .ledger-form textarea { min-height: 44px; font-size: 16px; }
.form-actions { padding-top: 16px; border-top: 1px solid var(--line); }
.report-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.report-summary > div { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.report-summary strong { display: block; margin-top: 8px; font-size: 22px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-summary p { font-size: 13px; color: var(--muted); }
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.finance-table { width: 100%; text-align: left; font-size: 14px; border-collapse: collapse; }
.finance-table th { padding: 12px 16px; background: #f8fafc; color: var(--muted); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
.finance-table td { padding: 12px 16px; border-bottom: 1px solid #edf1f6; }
.finance-table tr:last-child td { border-bottom: 0; }
.finance-table .amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.finance-table .entry-date { white-space: nowrap; }
.finance-table .entry-description { min-width: 180px; max-width: 360px; overflow-wrap: anywhere; }
.finance-table a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.dues-table { min-width: 640px; }
.dues-table td { vertical-align: top; }
.dues-payments-table { min-width: 760px; }
.dues-matrix { min-width: 1100px; }
.dues-matrix td { white-space: nowrap; }
.dues-breakdown { min-width: 170px; max-width: 240px; margin-top: 6px; margin-left: auto; white-space: normal; text-align: left; font-size: 12px; color: var(--muted); }
.dues-breakdown li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 4px; }
.dues-breakdown li > :first-child { overflow-wrap: anywhere; }
.dues-download { display: inline-flex; align-items: center; min-height: 44px; min-width: 130px; max-width: 190px; line-height: 1.5; }
.account-section { background: white; border: 1px solid var(--line); border-radius: 12px; margin-top: 20px; scroll-margin-top: 16px; }
.account-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; cursor: pointer; list-style: none; }
.account-section > summary::after { content: '+'; font-size: 24px; color: var(--muted); }
.account-section[open] > summary::after { content: '−'; }
.account-section[open] > summary { border-bottom: 1px solid var(--line); }
.account-section .account-name { font-size: 18px; font-weight: 650; }
.account-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.account-content { padding: 20px; }
.account-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.account-explanation { margin-bottom: 16px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.statement-links { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; font-size: 14px; }
.statement-links a { color: var(--accent); text-decoration: underline; }
.check-form { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.check-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid #94a3b8; border-radius: 8px; color: #475569; background: #fff; font-size: 20px; }
.check-toggle[aria-checked="true"] { background: #ecfdf5; border-color: #059669; color: #047857; }
.check-toggle:hover { box-shadow: 0 0 0 3px #e0e7ff; }
.check-feedback { max-width: 200px; font-size: 12px; color: var(--muted); }
.check-feedback[data-error="true"] { color: #b91c1c; }
.check-retry { display: block; min-height: 44px; color: #b91c1c; text-decoration: underline; font-weight: 600; }
.check-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.dashboard-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 24px; }
.dashboard-balance { padding: 24px; border: 1px solid #c7d2fe; border-radius: 12px; background: #eef2ff; }
.dashboard-balance h2 { font-size: 14px; font-weight: 600; color: #4338ca; }
.dashboard-balance .balance-status { font-size: 24px; font-weight: 650; margin: 10px 0 16px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; align-content: center; }
@media (min-width: 1400px) { .portal-main:has(.reconciliation-report) { max-width: 1320px; } }
@media (max-width: 1023px) {
    .header-inner { display: flex; flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
    .site-brand { flex: 1; font-size: 18px; }
    .site-brand small { display: none; }
    .brand-mark { width: 34px; height: 34px; font-size: 24px; }
    .site-menu > .menu-trigger { display: flex; font-size: 14px; }
    .menu-panel { display: block; width: 100%; }
    .has-collapsible-menu .menu-panel { position: absolute; top: 100%; left: 0; padding: 0 16px 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 8px 16px #17243b14; max-height: calc(100vh - var(--sticky-header-height, 70px) - 12px); max-height: calc(100dvh - var(--sticky-header-height, 70px) - 12px); overflow-y: auto; overscroll-behavior: contain; }
    .site-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
    .site-nav a { border: 0; border-radius: 7px; font-size: 16px; }
    .site-nav a[aria-current] { box-shadow: inset 3px 0 var(--accent); }
    .site-utilities { display: flex; flex-wrap: wrap; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
    .language-form label { position: static; width: auto; height: auto; clip-path: none; font-size: 13px; }
    .account-panel { position: static; width: 100%; max-width: none; box-shadow: none; margin-top: 8px; }
    .report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
    main.portal-main { padding: 20px 16px; }
    .portal-main .responsive-card { padding: 16px; }
    .site-brand { font-size: 16px; gap: 8px; }
    .brand-mark { display: none; }
    .site-utilities { display: grid; gap: 12px; }
    .account-panel { position: static; width: 100%; max-width: none; box-shadow: none; margin-top: 8px; }
    .account-menu { width: 100%; }
    .section-nav { gap: 0; }
    .section-nav a { flex: 1 0 45%; font-size: 13px; padding: 10px; border-radius: 6px; }
    .page-heading { display: block; }
    .page-heading > .page-actions, .page-heading > a { margin-top: 16px; }
    .page-actions { width: 100%; }
    .page-actions > .button, .page-actions > form { flex: 1 1 auto; }
    .page-actions > form > .button { width: 100%; }
    .report-summary { gap: 8px; }
    .report-summary > div { padding: 12px; }
    .report-summary strong { font-size: 18px; }
    .account-section > summary, .account-content { padding: 16px; }
    .finance-table td, .finance-table th { padding: 10px 12px; }
    .dashboard-summary { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .dashboard-balance { padding: 20px; }
    .quick-actions > a { flex: 1 1 auto; }
}
