/* DuesDesk design system. No framework, no inline styles (CSP: style-src 'self').
   Tokens -> base -> layout -> components -> utilities. Brand accent switches with body[data-brand]. */

/* ------------------------------------------------------------------ fonts (self-hosted, SIL Open Font License) */
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }

/* Fallbacks with the same average width and line box as the web fonts: if a web font arrives after first paint,
   nothing changes size or reflows. (Font files are cached for a year: rename a file if it ever changes.) */
@font-face { font-family: "DD Sans Fallback"; src: local("Arial"), local("Liberation Sans"), local("Helvetica Neue"), local("Roboto");
             size-adjust: 91.4%; ascent-override: 112%; descent-override: 43.8%; line-gap-override: 0%; }
@font-face { font-family: "DD Serif Fallback"; src: local("Times New Roman"), local("Liberation Serif"), local("Times");
             size-adjust: 119.2%; ascent-override: 86.9%; descent-override: 28.1%; line-gap-override: 0%; }

/* ------------------------------------------------------------------ tokens */
/* One green family (spruce ink, evergreen, mint), two state accents taken from the street: mailbox brass for "due",
   brick for "overdue". One type family in two cuts: Source Sans 3 for everything people read or type (open shapes,
   a tailed l, plain zeros in amounts) and Source Serif 4 only for titles, like an association's letterhead. */
:root {
  color-scheme: light dark;
  --font: "Source Sans 3", "DD Sans Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", "DD Serif Fallback", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f5f7f5;
  --surface: #ffffff;
  --surface-2: #eff3f0;
  --text: #12261f;
  --muted: #52645b;
  --line: #dbe3de;
  --line-strong: #b9c7bf;

  --brand: #1e6a4b;
  --brand-strong: #154e37;
  --brand-soft: #e4f0e9;
  --brand-ink: #ffffff;
  --ink: #12261f;        /* the dark surfaces: sidebar, footer, closing band */
  --ink-2: #1c3a2e;
  --on-ink: #eaf2ed;
  --on-ink-muted: #a9bfb3;
  --brass: #a9772b;
  --band: #1e6a4b;       /* the closing band: always dark enough for white text */

  --ok: #1b6b45;      --ok-soft: #e2f1e8;
  --warn: #855610;    --warn-soft: #fbf1dc;
  --danger: #a63a28;  --danger-soft: #fae9e5;
  --info: #2a5285;    --info-soft: #e7eef7;

  --radius: 10px;      /* panels */
  --radius-sm: 6px;    /* controls and small boxes */
  --shadow: none;
  --shadow-lg: 0 18px 40px rgb(18 38 31 / 16%);
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent);

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --sidebar: 16.5rem;
}
body[data-brand="clubdues"] {
  --band: #2f4ba3;
  --brand: #2f4ba3;
  --brand-strong: #223a84;
  --brand-soft: #e8edf8;
  --ink: #15213f;
  --ink-2: #213261;
  --on-ink: #eaeefa;
  --on-ink-muted: #aab6d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1411;
    --surface: #141d19;
    --surface-2: #1a2520;
    --text: #e6eee9;
    --muted: #9db0a5;
    --line: #26332c;
    --line-strong: #3a4a41;
    --brand: #52c092;
    --brand-strong: #78d5ab;
    --brand-soft: #143326;
    --brand-ink: #06231a;
    --ink: #0a100d;
    --ink-2: #16221c;
    --on-ink: #e6eee9;
    --on-ink-muted: #9db0a5;
    --brass: #d9a653;
    --band: #17543b;
    --ok: #5cc796;      --ok-soft: #12301f;
    --warn: #e3b45c;    --warn-soft: #3a2c10;
    --danger: #f0907f;  --danger-soft: #3d1a14;
    --info: #8fb4ee;    --info-soft: #15263f;
    --shadow-lg: 0 18px 40px rgb(0 0 0 / 55%);
  }
  body[data-brand="clubdues"] {
    --band: #27408f;
    --brand: #91a6f3;
    --brand-strong: #b3c1f7;
    --brand-soft: #1b2550;
    --brand-ink: #0d1436;
    --ink: #0a0f1f;
    --ink-2: #172042;
  }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1.125rem/1.5 var(--font);
  min-height: 100vh; min-height: 100dvh;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--s3); font-weight: 700; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
p, li { text-wrap: pretty; }
p { margin: 0 0 var(--s4); }
a { color: var(--brand); text-underline-offset: .15em; }
a:hover { color: var(--brand-strong); }
img, svg { max-width: 100%; }
code, pre, kbd { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: .08em .35em; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--s3); overflow-x: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ icons */
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2;
        stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; }
.icon-lg { width: 1.75rem; height: 1.75rem; }

/* ------------------------------------------------------------------ public layout */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 72rem; margin: 0 auto; padding: var(--s3) var(--s5); display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.wordmark:hover { color: var(--text); }
.wordmark .mark { width: 1.9rem; height: 1.9rem; border-radius: var(--radius-sm); background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.wordmark .mark svg { width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--s2) var(--s4); flex-wrap: wrap; }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--brand); }
.site-main { max-width: 72rem; margin: 0 auto; padding: var(--s6) var(--s5) var(--s7); }
.narrow { max-width: 30rem; margin: var(--s6) auto; }
.narrow-wide { max-width: 44rem; margin: var(--s5) auto; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .97rem; }
.site-footer .inner { max-width: 72rem; margin: 0 auto; padding: var(--s5) var(--s5); display: flex; gap: var(--s3) var(--s5); flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* ------------------------------------------------------------------ app shell */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { background: var(--ink); color: var(--on-ink); display: flex; flex-direction: column;
           position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding: var(--s4) var(--s3) var(--s3); gap: var(--s4); }
.sidebar .wordmark, .sidebar .wordmark:hover { color: var(--on-ink); }
.sidebar .group-name { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.25; padding: 0 var(--s2); overflow-wrap: anywhere; }
.sidebar .group-meta { color: var(--on-ink-muted); font-size: .9rem; padding: 0 var(--s2); }
.nav-section { display: grid; gap: 1px; margin-bottom: var(--s3); }
.nav-title { font-size: .86rem; color: var(--on-ink-muted); padding: var(--s2) var(--s2) var(--s1); font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .4rem .65rem; font-size: 1rem; border-radius: var(--radius-sm); color: var(--on-ink); text-decoration: none; font-weight: 500; }
.nav-link:hover { background: var(--ink-2); color: #fff; }
.nav-link[aria-current="page"] { background: var(--ink-2); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--brass); }
.nav-link .icon { color: var(--on-ink-muted); }
.nav-link[aria-current="page"] .icon { color: #fff; }
.sidebar :focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, #fff 55%, transparent); }
.sidebar-foot { margin-top: auto; display: grid; gap: 1px; border-top: 1px solid var(--ink-2); padding-top: var(--s3); }
.sidebar-foot .who { font-size: .9rem; color: var(--on-ink-muted); padding: 0 var(--s2) var(--s1); overflow-wrap: anywhere; }
.sidebar-foot form { margin-top: var(--s2); }
.sidebar-foot .btn { background: transparent; border-color: color-mix(in srgb, var(--on-ink-muted) 45%, transparent); color: var(--on-ink); }
.sidebar-foot .btn:hover { background: var(--ink-2); color: #fff; }
.topbar { display: none; }
.main { min-width: 0; }
.container { max-width: 68rem; margin: 0 auto; padding: var(--s6) var(--s6) var(--s7); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3) var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: var(--s1) 0 0; }
.page-head .actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.crumbs { font-size: .95rem; color: var(--muted); margin-bottom: var(--s2); }
.crumbs a { color: var(--muted); }

@media (max-width: 899px) {
  .shell { display: block; }
  .topbar { display: flex; align-items: center; gap: var(--s3); background: var(--ink); color: var(--on-ink);
            padding: var(--s2) var(--s3); position: sticky; top: 0; z-index: 30; }
  .topbar .icon-btn { color: var(--on-ink); }
  .topbar .icon-btn:hover { background: var(--ink-2); }
  .topbar .title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(19rem, 86vw); z-index: 40; transform: translateX(-102%); transition: transform .18s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: none; position: fixed; inset: 0; background: rgb(8 12 16 / 45%); z-index: 35; border: 0; padding: 0; }
  body.nav-open .scrim { display: block; }
  .container { padding: var(--s4) var(--s3) var(--s7); }
  h1 { font-size: 1.55rem; }
}
@media (min-width: 900px) { .scrim { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 600; line-height: 1.2;
       padding: .62rem 1.05rem; min-height: 2.75rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
       cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--brand-ink); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: .38rem .7rem; min-height: 2.2rem; font-size: .95rem; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.12rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.btn-link:hover { color: var(--brand-strong); }
.btn-link.danger { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }

/* ------------------------------------------------------------------ forms */
form { margin: 0; }
.field { display: grid; gap: .35rem; margin-bottom: var(--s4); align-content: start; }
.field > label, label.label { font-weight: 600; font-size: .98rem; }
.field .hint { color: var(--muted); font-size: .93rem; font-weight: 400; }
.field .err { color: var(--danger); font-size: .95rem; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="search"],
input[type="tel"], input[type="url"], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .58rem .75rem; min-height: 2.75rem; width: 100%; max-width: 100%;
}
/* every single-line control is exactly the same height, whatever its type */
input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"], [type="range"]), select { height: 2.75rem; line-height: 1.3; }
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
/* one drawn arrow instead of each browser's own, so the text inside a list box lines up with text boxes */
select { appearance: none; -webkit-appearance: none; padding-right: 2.25rem; text-overflow: ellipsis; background-repeat: no-repeat; background-position: right .75rem center; background-size: .8rem;
         background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%237d8f86' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); }
select[multiple] { height: auto; background-image: none; padding-right: .75rem; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--brand); box-shadow: var(--focus); border-radius: var(--radius-sm); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
input[type="file"] { font: inherit; max-width: 100%; }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); flex: none; margin: .2rem 0 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: var(--s3); font-weight: 500; }
.check .hint { display: block; color: var(--muted); font-weight: 400; font-size: .93rem; }
.form-grid { display: grid; gap: 0 var(--s4); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.form-grid .span-all { grid-column: 1 / -1; }
/* in a row of fields, labels share one line, boxes the next and hints the third, however long each label or hint is */
@supports (grid-template-rows: subgrid) {
  .form-grid > .field { grid-row: span 3; grid-template-rows: subgrid; row-gap: .35rem; }
  .form-grid > .field > label:first-child { align-self: end; }
  .form-grid > .field:has(> :nth-child(4)) { grid-row: span 4; }
}
.form-grid > .field:only-child { max-width: 26rem; }
.form-actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-top: var(--s2); }
.inline-form { display: inline-flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; min-width: 9rem; }
/* next to small buttons, boxes are the same small height */
.inline-form:has(.btn-sm) :is(input, select), details.void :is(input, select) { height: 2.2rem; min-height: 2.2rem; padding-block: .2rem; font-size: .95rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); margin: 0 0 var(--s4); }
legend { font-weight: 650; padding: 0 var(--s2); }
.copy-field { display: flex; gap: var(--s2); }
.copy-field input { font-family: var(--mono); font-size: .9rem; }
.code-input { font-family: var(--mono); letter-spacing: .25em; font-size: 1.3rem; text-align: center; max-width: 14rem; }

/* ------------------------------------------------------------------ cards and stats */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: var(--s4) var(--s5) 0; }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: var(--s4) var(--s5) var(--s5); }
.card-body > :last-child { margin-bottom: 0; }
.card-foot { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card.flush .table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; margin: 0; }
.stat-grid { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-bottom: var(--s5);
             background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: var(--s4) var(--s5); }
.stat .label { color: var(--muted); font-size: .95rem; font-weight: 500; }
.stat .value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: .15rem; }
.stat .note { color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.grid-2 { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + * { margin-top: var(--s5); }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s5); }
table.table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.table th { text-align: left; font-size: .93rem; color: var(--muted); font-weight: 700;
            padding: .75rem var(--s5); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: .75rem var(--s5); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td, .table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.table .num, .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td, .table tfoot th, .table tr.total td, .table tr.total th { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-strong); color: var(--text); text-transform: none; letter-spacing: 0; font-size: 1rem; }
.table .sub { display: block; color: var(--muted); font-size: .92rem; }
.table td.actions { text-align: right; white-space: nowrap; }
.table a.row-link { font-weight: 600; text-decoration: none; }
.table a.row-link:hover { text-decoration: underline; }
tr.voided td { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
tr.voided td.keep { text-decoration: none; }
@media (max-width: 640px) {
  /* stacked tables: each row becomes a small card; cells carry their column name in data-label */
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { border-bottom: 1px solid var(--line); padding: var(--s2) 0; }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { border: 0; padding: .2rem var(--s5); text-align: left; display: flex; justify-content: space-between; gap: var(--s4); }
  .table.stack td::before { content: attr(data-label); color: var(--muted); font-size: .9rem; flex: none; }
  .table.stack td[data-label=""]::before, .table.stack td:not([data-label])::before { content: none; }
  .table.stack td.primary { font-weight: 650; font-size: 1.05rem; display: block; }
  .table.stack td.primary::before { content: none; }
  .table.stack td.actions { justify-content: flex-start; }
  .table.stack td.hide-sm { display: none; }
}

/* ------------------------------------------------------------------ badges, alerts, flash */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font); letter-spacing: 0; vertical-align: middle; font-size: .86rem; font-weight: 700; line-height: 1; padding: .32rem .5rem; border-radius: 4px;
         background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); border-color: transparent; }
.alert { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius-sm); background: var(--surface); padding: var(--s3) var(--s4); margin-bottom: var(--s4); }
.alert > :last-child { margin-bottom: 0; }
.alert.info { border-left-color: var(--info); background: var(--info-soft); }
.alert.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.alert.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.alert.danger, .error { border-left-color: var(--danger); background: var(--danger-soft); }
p.error { border: 1px solid var(--line); border-left: 4px solid var(--danger); border-radius: var(--radius-sm); padding: var(--s3) var(--s4); color: var(--text); }
.flash { display: flex; gap: var(--s3); align-items: flex-start; justify-content: space-between; border-radius: var(--radius-sm); padding: var(--s3) var(--s4); margin-bottom: var(--s4);
         background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); font-weight: 500; }
.flash.bad { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.notice { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); border-radius: var(--radius-sm); padding: var(--s3) var(--s4); }

/* ------------------------------------------------------------------ disclosure, dialog, tabs */
details.disclosure { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--s4); }
details.disclosure > summary { cursor: pointer; list-style: none; padding: var(--s3) var(--s4); font-weight: 600; display: flex; align-items: center; gap: var(--s2); border-radius: var(--radius); }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; flex: none; }
details.disclosure[open] > summary::before { content: "\2212"; }
details.disclosure[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
details.disclosure > .body { padding: var(--s4); }
details.plain > summary { cursor: pointer; color: var(--brand); font-weight: 600; }
details.plain[open] > summary { margin-bottom: var(--s4); }
details.void { display: inline-block; text-align: left; }
details.void > summary { list-style: none; }
details.void > summary::-webkit-details-marker { display: none; }
details.void[open] > summary { display: none; }
details.void form { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
details.void input { width: 13rem; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 0; width: min(34rem, calc(100vw - 2rem)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgb(8 12 16 / 50%); }
dialog .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--line); }
dialog .dialog-head h2 { margin: 0; }
dialog .dialog-body { padding: var(--s4); }
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s5); overflow-x: auto; }
.tabs a { padding: .6rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }

/* ------------------------------------------------------------------ assorted components */
.empty { text-align: center; padding: var(--s6) var(--s4); color: var(--muted); }
.empty .icon { width: 2.5rem; height: 2.5rem; color: var(--line-strong); margin-bottom: var(--s2); }
.empty h3 { color: var(--text); }
.empty p { max-width: 30rem; margin-inline: auto; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list > li:has(details) { align-items: flex-start; }
h1 .badge { translate: 0 -.15em; }
.list .main-col { min-width: 0; flex: 1 1 14rem; }
.list .title { font-weight: 600; }
.list .sub { color: var(--muted); font-size: .93rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.checklist li { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s2) 0; }
.checklist .tick { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; margin-top: .1rem; color: transparent; }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li.done .what { color: var(--muted); text-decoration: line-through; }
.checklist .what { font-weight: 600; }
.checklist .why { color: var(--muted); font-size: .93rem; display: block; font-weight: 400; }
.meter { height: .65rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: flex; }
.meter > span { display: block; height: 100%; }
.meter .a { background: var(--ok); } .meter .b { background: #d4a72c; } .meter .c { background: #d97a27; } .meter .d { background: var(--danger); }
.meter .w0{width:0}.meter .w5{width:5%}.meter .w10{width:10%}.meter .w15{width:15%}.meter .w20{width:20%}.meter .w25{width:25%}.meter .w30{width:30%}.meter .w35{width:35%}.meter .w40{width:40%}.meter .w45{width:45%}.meter .w50{width:50%}.meter .w55{width:55%}.meter .w60{width:60%}.meter .w65{width:65%}.meter .w70{width:70%}.meter .w75{width:75%}.meter .w80{width:80%}.meter .w85{width:85%}.meter .w90{width:90%}.meter .w95{width:95%}.meter .w100{width:100%}
.legend { display: flex; gap: var(--s2) var(--s4); flex-wrap: wrap; font-size: .92rem; color: var(--muted); margin-top: var(--s2); }
.legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .35rem; }
.legend .a { background: var(--ok); } .legend .b { background: #d4a72c; } .legend .c { background: #d97a27; } .legend .d { background: var(--danger); }
.big-money { font-size: 2.6rem; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.due { color: var(--danger); } .credit { color: var(--ok); }
.dl { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: var(--s2) var(--s4); margin: 0; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-size: 1.05rem; margin-top: var(--s4); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 var(--s4); }
.prose blockquote { margin: 0 0 var(--s4); padding-left: var(--s4); border-left: 3px solid var(--line-strong); color: var(--muted); }
.announcement { padding: var(--s4); border-bottom: 1px solid var(--line); }
.announcement:last-child { border-bottom: 0; }
.announcement h3 { margin-bottom: var(--s1); }
.qr { background: #fff; padding: .6rem; border-radius: var(--radius-sm); border: 1px solid var(--line); display: inline-block; line-height: 0; }
.qr svg { width: 11rem; height: 11rem; }
.error-page { text-align: center; padding: var(--s7) var(--s4); }
.recovery { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s2); }
.recovery code { display: block; text-align: center; padding: .5rem; font-size: 1rem; }
.pill-nav { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }

/* ------------------------------------------------------------------ utilities */
.muted { color: var(--muted); }
.small { font-size: .93rem; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-line; }
.right { text-align: right; }
.center { text-align: center; }
.stack > * + * { margin-top: var(--s4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; }
.between { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .mt4 { margin-top: var(--s4); } .mb4 { margin-bottom: var(--s4); } .mb2 { margin-bottom: var(--s2); }
.w-auto { width: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: var(--s2) var(--s3); z-index: 100; }
.skip:focus { left: var(--s2); top: var(--s2); }

@media print {
  .sidebar, .topbar, .scrim, .site-header, .site-footer, .no-print, .flash { display: none !important; }
  .shell { display: block; } body { background: #fff; font-size: 11pt; }
  .card, .table-wrap, .stat { box-shadow: none; }
}

/* polls */
.result { margin-bottom: var(--s3); }
.result-head { display: flex; justify-content: space-between; gap: var(--s3); margin-bottom: .25rem; font-weight: 500; }
.result-head .num { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vote-form + .vote-form { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }

/* data, handoff, support */
.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.danger-zone .card-head h2 { color: var(--danger); }
.support-banner { background: color-mix(in srgb, #d4a72c 18%, var(--surface)); border-color: #d4a72c; }
.plain-list { margin: 0; padding-left: 1.2rem; display: grid; gap: var(--s2); }
.mt5 { margin-top: var(--s5); }

/* ------------------------------------------------------------------ plan notices, small pieces */
.plan-banner { justify-content: space-between; }
.stat .small-value { font-size: 1.25rem; line-height: 1.3; }
.powered { text-align: center; color: var(--muted); font-size: .9rem; margin-top: var(--s5); }

/* ------------------------------------------------------------------ the bill (pay links) */
.bill { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); margin-bottom: var(--s5); }
.bill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); flex-wrap: wrap; padding: var(--s5) var(--s5) 0; }
.bill-head h1 { margin: 0; font-size: 1.6rem; }
.bill-head .for { color: var(--muted); margin: .2rem 0 0; }
.bill-amount { padding: var(--s4) var(--s5) var(--s5); }
.bill-amount .big-money { font-size: 3.2rem; margin: 0; }
.bill-amount .big-money.due { color: var(--text); }
.bill-pay { border-top: 1px solid var(--line); padding: var(--s5); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.bill-pay .field { max-width: 16rem; }
.bill-pay .btn-lg { min-width: 16rem; }

/* ------------------------------------------------------------------ public website */
/* Left-aligned, ruled rather than boxed. The one loud element is the street map in the hero. */
.site-header { position: sticky; top: 0; z-index: 20; }
.site-links { display: flex; gap: var(--s2) var(--s5); flex-wrap: wrap; margin-left: var(--s6); }
.site-links a { color: var(--text); text-decoration: none; font-weight: 500; }
.site-links a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: .3em; }
.site-main.site-wide { max-width: none; padding: 0; }
.site-wide > section { max-width: 72rem; margin: 0 auto; padding: var(--s8) var(--s5); }
.site-wide > section.band { max-width: none; padding-inline: 0; background: var(--surface); border-block: 1px solid var(--line); }
.site-wide > section.band > .wrap { max-width: 72rem; margin: 0 auto; padding-inline: var(--s5); }
.site-wide > section.tight { padding-block: var(--s7); }
.site-wide > section.tight + section.tight { padding-top: 0; }
.prose-page { max-width: 44rem; }

/* footer: dark, like the sidebar */
.site-wide ~ .site-footer, .site-footer.full { background: var(--ink); color: var(--on-ink-muted); border-top: 0; }
.site-footer.full a { color: var(--on-ink); text-decoration: none; }
.site-footer.full a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid !important; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--s6) var(--s5); align-items: start; padding-block: var(--s7) var(--s6) !important; }
.footer-grid nav { display: grid; gap: .5rem; align-content: start; }
.footer-grid h2 { font-size: 1rem; font-weight: 700; color: var(--on-ink); margin: 0 0 .25rem; letter-spacing: 0; }
.footer-brand { font-family: var(--serif); color: var(--on-ink); font-size: 1.35rem; font-weight: 600; }
.footer-grid p { margin: .5rem 0 0; max-width: 22rem; }
.footer-legal { border-top: 1px solid var(--ink-2); font-size: .92rem; }
@media (max-width: 60rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .site-header { position: static; }
  .site-links { order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; gap: var(--s5); padding-bottom: var(--s1); white-space: nowrap; } }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s7); align-items: center; }
.hero.solo { grid-template-columns: 1fr; max-width: 46rem; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 3.9rem); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 var(--s5); }
.hero.solo h1 { font-size: clamp(2.2rem, 4.4vw, 3.1rem); }
.hero .lede { font-size: 1.25rem; line-height: 1.5; color: var(--muted); margin: 0 0 var(--s6); max-width: 34rem; }
.eyebrow { display: block; font-weight: 700; color: var(--brand); margin-bottom: var(--s4); }
.cta-row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.cta-note { color: var(--muted); font-size: .98rem; margin-top: var(--s4); }
.trust-row { display: grid; gap: var(--s2); list-style: none; padding: var(--s5) 0 0; margin: var(--s6) 0 0; border-top: 1px solid var(--line-strong); color: var(--text); font-weight: 500; }
.trust-row li { display: flex; align-items: center; gap: .6rem; }
.trust-row .icon { color: var(--brand); width: 1.2rem; height: 1.2rem; }
@media (max-width: 58rem) { .hero { grid-template-columns: 1fr; gap: var(--s6); } }

/* the street map: 24 lots that fill in as dues arrive */
.plat { position: relative; padding-bottom: 11.5rem; }
.plat-sheet { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--s4) var(--s4) var(--s3); }
.plat-title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s2); }
.plat-title b { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.plat-title span { color: var(--muted); font-size: .95rem; }
.plat svg { display: block; width: 100%; height: auto; }
.plat .road { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1; }
.plat .street { font-family: var(--serif); font-style: italic; font-size: 13px; fill: var(--muted); }
.plat .lot { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.25; stroke-linejoin: round; }
.plat .lot.paid { fill: var(--brand-soft); stroke: var(--brand); animation: lot-paid .5s ease-out both; }
.plat .lot.due { fill: var(--warn-soft); stroke: var(--brass); }
.plat .lot.late { fill: var(--danger-soft); stroke: var(--danger); }
.plat .lot.plan { fill: var(--info-soft); stroke: var(--info); stroke-dasharray: 4 3; }
.plat .num { font-size: 12px; font-weight: 600; fill: var(--text); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
@keyframes lot-paid { from { fill: var(--surface); stroke: var(--line-strong); } }
.plat .lot.paid:nth-of-type(3n+1) { animation-delay: .25s; } .plat .lot.paid:nth-of-type(3n+2) { animation-delay: .7s; } .plat .lot.paid:nth-of-type(3n) { animation-delay: 1.15s; }
.plat .lot.paid:nth-of-type(5n) { animation-delay: 1.6s; } .plat .lot.paid:nth-of-type(7n) { animation-delay: 2s; }
@media (prefers-reduced-motion: reduce) { .plat .lot.paid { animation: none; } }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); list-style: none; margin: var(--s3) 0 var(--s5); padding: 0; font-size: .98rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .4rem; }
.legend i { width: .85rem; height: .85rem; border-radius: 2px; border: 1.5px solid var(--line-strong); background: var(--surface); }
.legend .k-paid i { background: var(--brand-soft); border-color: var(--brand); } .legend .k-due i { background: var(--warn-soft); border-color: var(--brass); }
.legend .k-late i { background: var(--danger-soft); border-color: var(--danger); } .legend .k-plan i { background: var(--info-soft); border-color: var(--info); border-style: dashed; }
.slip { position: absolute; right: var(--s5); bottom: 0; width: min(19rem, 78%); background: var(--surface); border: 1px solid var(--line-strong); border-top: 4px solid var(--brand);
        border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: var(--s4); font-size: .97rem; }
.slip h3 { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; margin: 0 0 var(--s2); }
.slip dl { display: grid; grid-template-columns: 1fr auto; gap: .3rem var(--s3); margin: 0 0 var(--s3); }
.slip dt { color: var(--muted); } .slip dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.slip .total { border-top: 1px solid var(--line-strong); padding-top: .4rem; font-weight: 700; color: var(--text); }
.slip .fake-btn { display: block; text-align: center; background: var(--brand); color: var(--brand-ink); font-weight: 700; border-radius: var(--radius-sm); padding: .55rem; }


/* the club roster: one square per member */
.roster { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.roster i { aspect-ratio: 1; border-radius: 3px; border: 1.5px solid var(--brand); background: var(--brand-soft); }
.roster i.due { background: var(--warn-soft); border-color: var(--brass); } .roster i.late { background: var(--danger-soft); border-color: var(--danger); }
.roster i.new { background: var(--info-soft); border-color: var(--info); border-style: dashed; }

/* sections */
.section-head { max-width: 40rem; margin: 0 0 var(--s6); }
.section-head h1, .section-head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.75rem, 3.2vw, 2.4rem); letter-spacing: -.02em; line-height: 1.12; margin: 0 0 var(--s3); }
.section-head p { color: var(--muted); font-size: 1.15rem; margin: 0; }
.cards { display: grid; gap: var(--s6) var(--s6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.feature { border-top: 2px solid var(--text); padding-top: var(--s4); }
.feature h3 { margin: 0 0 var(--s2); font-size: 1.15rem; }
.feature p { margin: 0; color: var(--muted); }
.feature .icon-wrap { color: var(--brand); margin-bottom: var(--s3); }
.feature .icon-wrap .icon { width: 1.6rem; height: 1.6rem; stroke-width: 1.75; }
.feature ul { margin: var(--s3) 0 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: .35rem; }
a.feature { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line-strong); border-top: 2px solid var(--text); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: var(--s4) var(--s5) var(--s5); background: var(--surface); }
a.feature:hover { border-color: var(--brand); border-top-color: var(--brand); }
a.feature h3 { color: var(--brand-strong); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* "what boards told us": a two-column ledger */

/* steps: a real sequence, so it is numbered */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.steps li { counter-increment: step; border-top: 2px solid var(--text); padding-top: var(--s3); }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 600; line-height: 1; color: var(--brand); margin-bottom: var(--s3); }
.steps h3 { margin: 0 0 var(--s1); font-size: 1.12rem; } .steps p { margin: 0; color: var(--muted); }

/* closing band */
.site-wide > section.cta-band { background: var(--band); color: #fff; border: 0; }
.cta-band h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin: 0 0 var(--s3); letter-spacing: -.02em; color: #fff; }
.cta-band p { color: color-mix(in srgb, #fff 82%, transparent); margin: 0 0 var(--s5); font-size: 1.15rem; max-width: 36rem; }
.cta-band .btn-primary { background: #fff; border-color: #fff; color: #12261f; }
.cta-band .btn-primary:hover { background: #e4f0e9; border-color: #e4f0e9; color: #12261f; }
.cta-band .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: color-mix(in srgb, #fff 45%, transparent); }
.cta-band .btn:not(.btn-primary):hover { background: color-mix(in srgb, #000 18%, transparent); color: #fff; }

/* prices: one rate card with ruled cells */
.price-grid { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.price { background: var(--surface); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); border-top: 4px solid transparent; }
.price.pick { background: var(--brand-soft); border-top-color: var(--brand); }
.price h3 { margin: 0; font-size: 1.1rem; }
.price .amount { font-size: 2.4rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price .amount small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price .limit { font-weight: 700; }
.price .muted { font-size: .95rem; }
.price .btn, .price form { margin-top: auto; }
.price .btn { margin-top: var(--s3); }

/* comparison tables */
.table-scroll { overflow-x: auto; }

/* questions: a ruled list */
.faq { max-width: 46rem; border-top: 2px solid var(--text); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; padding: var(--s4) 2rem var(--s4) 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; translate: 0 -50%; font-size: 1.5rem; font-weight: 400; color: var(--brand); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > :not(summary) { color: var(--muted); max-width: 40rem; }
.faq details > :last-child { margin-bottom: var(--s4); }

.note-box { background: var(--info-soft); border-left: 4px solid var(--info); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: var(--s4) var(--s5); }
.note-box.warn { background: var(--warn-soft); border-left-color: var(--brass); }
.note-box > :last-child { margin-bottom: 0; }
.sources { font-size: .93rem; color: var(--muted); }
.sources li { overflow-wrap: anywhere; }

/* long reading: help, legal, state pages */
.article { max-width: 44rem; overflow-wrap: break-word; }   /* a long citation or address must wrap, not widen the page */
@media (max-width: 44rem) { .article table { display: block; overflow-x: auto; } }   /* wide tables scroll inside themselves on a phone */
.article h1 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 var(--s4); }
.article .lede { font-size: 1.2rem; color: var(--muted); }
.article h2 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; margin: var(--s7) 0 var(--s3); letter-spacing: -.01em; }
.article h3 { font-size: 1.15rem; margin: var(--s5) 0 var(--s2); }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s4); border-top: 2px solid var(--text); }
.article th, .article td { border-bottom: 1px solid var(--line); padding: .6rem .75rem .6rem 0; text-align: left; vertical-align: top; }
.article th { font-weight: 700; border-bottom-color: var(--line-strong); }
.article li { margin-bottom: .4rem; }
.article blockquote { margin: 0 0 var(--s5); padding: var(--s1) 0 var(--s1) var(--s4); border-left: 3px solid var(--brass); color: var(--text); font-family: var(--serif); font-size: 1.05rem; line-height: 1.6; }
.article blockquote p { margin: 0; }
.help-grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); align-items: start; }
.help-cat { border: 0; border-top: 2px solid var(--text); border-radius: 0; background: none; margin: 0; }
.help-cat .card-body { padding: var(--s4) 0 0; }
.help-cat h2 { font-size: 1.15rem; margin: 0 0 var(--s3); }
.help-cat ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.help-cat a { font-weight: 700; }

/* calculators and templates */
.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
@media (max-width: 52rem) { .tool { grid-template-columns: 1fr; } }
.result-big { font-size: 2.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 0 0 var(--s1); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--s4); margin: var(--s4) 0 0; border-top: 1px solid var(--line-strong); }
.kv dt, .kv dd { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.letter { white-space: pre-wrap; font-family: var(--serif); font-size: 1.02rem; line-height: 1.6; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 2px; padding: var(--s5) var(--s6); margin: 0 0 var(--s3); }
.badge-row { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* Cloudflare Turnstile on the sign-in and sign-up forms (production only). The space is held before it loads. */
.turnstile { min-height: 65px; margin-bottom: var(--s4); }

/* Support threads (Contact support, and the owner's console) */
.thread { display: grid; gap: var(--s3); }
.msg { border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--s3) var(--s4); background: var(--surface); }
.msg-out { border-left-color: var(--brand); background: var(--brand-soft); }
.msg header { margin-bottom: var(--s2); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* The signed-in person's email in the header */
.site-nav a.nav-who { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .95rem; font-weight: 400; }
@media (max-width: 720px) { .site-nav .nav-who { display: none; } }

/* Upgrade, in the sidebar: shown to officers who handle money while the group has no paid plan */
.sidebar-plan + .sidebar-foot { margin-top: var(--s3); }
.sidebar-plan { margin: auto var(--s2) 0; padding: var(--s3); border: 1px solid var(--ink-2); border-radius: var(--radius-sm); background: var(--ink-2); }
.sidebar-plan .plan-now { color: var(--on-ink-muted); font-size: .9rem; margin-bottom: var(--s2); }
.sidebar-plan .btn-upgrade { background: var(--on-ink); color: var(--ink); border-color: transparent; font-weight: 700; }
.sidebar-plan .btn-upgrade:hover { background: #fff; color: var(--ink); }
