/* Colinas Del Sol HOA — site styles. Identity carried from the board proposal:
   warm paper, sun-gold + hill-sage accents, dusk-slate, humanist serif + system sans. */
:root {
  --paper: #F7F4EC;
  --paper-2: #FBF9F3;
  --ink: #231F1A;
  --ink-soft: #5C554A;
  --gold: #DDA02C;
  --gold-deep: #B67F16;
  --sage: #5E6B4F;
  --sage-deep: #47523A;
  --dusk: #2E3446;
  --dusk-soft: #3C4457;
  --border: #E4DCCB;
  --border-strong: #D6CBB4;
  --good: #4F7A4A;
  --warn: #B4472B;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  --wrap: 980px;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-underline-offset: 2px; }
a:hover { color: var(--sage-deep); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.prose { max-width: var(--measure); }
.prose p { margin: 16px 0; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.05; margin: 0; }
h2 { font-size: 26px; margin: 0 0 4px; }
h3 { font-size: 19px; margin: 0 0 4px; }
.eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.15em;
  font-size: 11.5px; font-weight: 700; color: var(--gold-deep); margin: 0;
}

/* ---- Top navigation (hamburger dropdown at all widths) ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247,244,236,0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { position: relative; display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand .glyph {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 50% 40%, var(--gold) 0%, var(--gold-deep) 70%);
  box-shadow: 0 0 0 3px rgba(221,160,44,0.18);
}
.brand-text { display: block; line-height: 1.03; }
.brand b { display: block; font-family: var(--serif); font-weight: 600; font-size: 21px;
  letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); text-transform: none; }
.brand-sub { display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--sage); font-weight: 700; margin-top: 2px; }

/* hamburger button */
.nav-toggle { display: inline-flex; align-items: center; gap: 9px; margin-left: auto;
  background: none; border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.nav-toggle:hover { background: rgba(94,107,79,0.08); }
.nav-toggle .bars { position: relative; display: block; width: 16px; height: 2px;
  background: currentColor; border-radius: 2px; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0;
  width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle .bars::before { top: -5px; } .nav-toggle .bars::after { top: 5px; }

/* dropdown panel */
.nav-links {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: stretch;
  min-width: 240px; max-width: min(320px, 88vw);
  background: var(--paper-2); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 16px 44px rgba(35,31,26,0.18);
  overflow: hidden;
  max-height: 0; opacity: 0; visibility: hidden;
  transition: max-height .2s ease, opacity .15s ease, visibility .15s;
}
.nav:has(#navcheck:checked) .nav-links { max-height: 82vh; opacity: 1; visibility: visible; overflow: auto; }
.nav-links a { text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500;
  padding: 12px 16px; border-bottom: 1px solid var(--border); }
.nav-links a:last-child { border-bottom: none; }
.nav-links a:hover { background: rgba(94,107,79,0.10); }
.nav-links a.active { color: var(--sage-deep); background: rgba(94,107,79,0.12); font-weight: 650; }
.nav-links a.portal, .nav-links a.leave { color: var(--sage-deep); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .nav-links { transition: none; } }

/* ---- Page header band ---- */
.page-head { border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.page-head .wrap { padding: 40px 24px 34px; }
.page-head .eyebrow { margin-bottom: 10px; }
.page-head p.sub { color: var(--ink-soft); margin: 12px 0 0; max-width: var(--measure); font-size: 18px; }

/* ---- Home hero ---- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FBF9F3, var(--paper)); }
.hero .sun {
  position: absolute; top: -170px; right: -70px; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(221,160,44,0.30) 0%, rgba(221,160,44,0.13) 40%, rgba(221,160,44,0) 70%);
  pointer-events: none;
}
.hero .ridge { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; pointer-events: none;
  background:
    radial-gradient(130% 100% at 22% 100%, rgba(94,107,79,0.17) 0%, rgba(94,107,79,0) 60%),
    radial-gradient(130% 100% at 78% 100%, rgba(94,107,79,0.13) 0%, rgba(94,107,79,0) 60%); }
.hero .wrap { position: relative; padding: 76px 24px 68px; }
.hero h1 { font-size: clamp(38px, 7vw, 60px); }
.hero .lede { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 3vw, 24px);
  color: var(--ink-soft); margin: 18px 0 0; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .cta { margin-top: 30px; }

.btn { display: inline-block; text-decoration: none; font-weight: 650; font-size: 15px;
  padding: 11px 20px; border-radius: 8px; border: 1px solid transparent; }
.btn.primary { background: var(--sage); color: #fff; }
.btn.primary:hover { background: var(--sage-deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn.ghost:hover { background: rgba(94,107,79,0.10); color: var(--ink); }

/* ---- Sections & content ---- */
main section { padding: 44px 0; border-bottom: 1px solid var(--border); }
main section:last-child { border-bottom: none; }
.lead { font-family: var(--serif); font-size: 20px; color: var(--ink-soft); max-width: var(--measure); }

/* Feature/quicklink cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-top: 22px; }
.card {
  display: block; text-decoration: none; color: inherit; background: var(--paper-2);
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 18px 18px 16px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card h3 { margin: 8px 0 3px; }
.card p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.card .tick { width: 26px; height: 26px; border-radius: 7px; background: rgba(221,160,44,0.16);
  display: grid; place-items: center; color: var(--gold-deep); font-weight: 800; font-family: var(--serif); }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

/* Board grid */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 22px; }
.person { background: var(--paper-2); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.person .role { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--sage); font-weight: 700; }
.person .name { font-family: var(--serif); font-size: 20px; margin: 4px 0 2px; }
.person .muted { color: var(--ink-soft); font-size: 14px; }

/* Document / list rows */
.doclist { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--border); }
.doclist li { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.doclist .ico { width: 34px; height: 40px; flex: none; border-radius: 4px; background: var(--paper-2);
  border: 1px solid var(--border-strong); position: relative; }
.doclist .ico::after { content: ""; position: absolute; top: 0; right: 0; border-width: 0 10px 10px 0;
  border-style: solid; border-color: var(--paper) var(--paper) var(--border-strong) var(--border-strong); }
.doclist .meta { flex: 1; min-width: 0; }
.doclist .meta b { font-weight: 600; }
.doclist .meta span { display: block; font-size: 13px; color: var(--ink-soft); }
.doclist .tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
  color: var(--sage); background: rgba(94,107,79,0.12); padding: 3px 9px; border-radius: 20px; white-space: nowrap; }

/* Collapsible document groups */
.doc-fold { border-bottom: 1px solid var(--border); }
.doc-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 16px 4px; font-family: var(--serif); font-size: 21px; color: var(--ink); }
.doc-fold > summary::-webkit-details-marker { display: none; }
.doc-fold > summary::before { content: "›"; font-family: var(--sans); font-size: 22px; line-height: 1;
  color: var(--sage); transition: transform 0.15s ease; transform: rotate(90deg); }
.doc-fold:not([open]) > summary::before { transform: rotate(0deg); }
.doc-fold > summary .count { margin-left: auto; font-family: var(--sans); font-size: 12px; font-weight: 700;
  color: var(--sage); background: rgba(94,107,79,0.12); border-radius: 20px; padding: 2px 10px; }
.doc-fold > summary:hover { color: var(--sage-deep); }
.doc-fold .doclist { margin: 0 0 8px; border-top: none; }

/* Inline-editable table cells (dues + budget) */
.rowform { display: none; }
.cell-in { font: inherit; font-size: 14px; padding: 6px 8px; width: 100%; box-sizing: border-box;
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--paper); color: var(--ink); }
.cell-in.amt { text-align: right; max-width: 120px; }
.dues-table input[type="checkbox"] { width: 18px; height: 18px; }
.dues-table td, .budget-table td { vertical-align: middle; }
.budget-table .add-row td { background: var(--paper-2); }
.budget-table tfoot td, .dues-table tfoot td { border-top: 2px solid var(--border-strong); color: var(--ink-soft); }
.data td.rowbtns { white-space: nowrap; display: table-cell; }
.money-good { color: var(--sage-deep); font-weight: 650; }
.money-bad { color: #a13d2d; font-weight: 650; }
.budget-desc { max-width: 62ch; margin-top: 3px; line-height: 1.4; }
.fin-wide { max-width: 1220px; }

/* ---- Finance header title (compact gold label, not a big serif h1) ---- */
.fin-head .fin-title {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 15px; font-weight: 700; color: var(--gold-deep); margin: 0;
  line-height: 1.3;
}

/* ---- Finance section tabs (in-page navigation) ---- */
.fin-tabs { border-bottom: 1px solid var(--border); background: var(--paper-2); }
.fin-tabs .wrap, .fin-tabs .fin-full { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.fin-tabs .wrap::-webkit-scrollbar, .fin-tabs .fin-full::-webkit-scrollbar { display: none; }
.fin-tabs a {
  display: inline-block; white-space: nowrap; padding: 13px 16px;
  font-size: 14.5px; font-weight: 650; color: var(--ink-soft); text-decoration: none;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
}
.fin-tabs a:hover { color: var(--ink); background: rgba(94,107,79,0.06); }
.fin-tabs a.active { color: var(--sage-deep); border-bottom-color: var(--gold); }
.budget-table textarea.cell-in { min-width: 320px; resize: vertical; font-size: 13px; line-height: 1.4; }
.budget-report td:first-child { max-width: 620px; }
.budget-report tbody a { font-weight: 600; }
.ledger-table td:nth-child(2) a { font-weight: 600; }

/* ---- Operating-budget document (Budget tab view) ---- */
.budget-doc-head { text-align: center; margin: 4px 0 24px; line-height: 1.28; }
.budget-doc-head b { display: block; font-family: var(--serif); font-weight: 700; color: var(--ink); }
.budget-doc-head b:first-child { font-size: 20px; }
.budget-doc-head b + b { font-size: 16px; }
.budget-doc col.c-amt { width: 15%; }
.budget-doc col.c-desc { width: 54%; }
.budget-doc td { vertical-align: top; }
.budget-doc .sec-title td { border-bottom: 2px solid var(--ink); padding-top: 22px; padding-bottom: 8px; }
.budget-doc tbody:first-child .sec-title td { padding-top: 4px; }
.budget-doc .sec-title td.title { font-weight: 700; font-size: 16px; color: var(--ink); }
.budget-doc .sec-title td.lbl { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.budget-doc td.desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.42; }
.budget-doc .sec-total td { font-weight: 700; border-top: 1px solid var(--border-strong); border-bottom: 3px double var(--ink); }
.budget-doc .sec-net td { font-weight: 800; font-size: 16px; border-top: none; border-bottom: none; padding-top: 16px; }
.budget-doc .sec-net td.desc { font-weight: 400; font-size: 13.5px; }

/* ---- Finance dashboard: cash hero + clickable stat tiles ---- */
.cash-hero { background: linear-gradient(160deg, var(--sage), var(--sage-deep)); color: #fff; border-radius: 14px; padding: 26px 28px; }
.cash-hero .eyebrow { color: #F2C879; }
.cash-hero b { display: block; font-family: var(--serif); font-size: clamp(38px, 6vw, 56px); line-height: 1.05; margin: 8px 0 6px; letter-spacing: -0.02em; }
.cash-hero em { font-style: normal; color: rgba(255,255,255,0.82); font-size: 14px; }
a.statlink { text-decoration: none; color: inherit; transition: border-color .12s, transform .12s; }
a.statlink:hover { border-color: var(--sage); transform: translateY(-1px); }

/* ---- Full-window finance content (breaks out of the 980px column) ---- */
.fin-full { max-width: none; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }

/* ---- Register: Itemized Statement of Activities ---- */
/* Sticky offsets are measured against the only sticky chrome — the 65px top
   nav. The column header parks just below it; each month marker parks below
   the header (65 + ~39) and gets bumped up by the next month's tbody. */
.stmt-title { border-bottom: 2.5px solid var(--ink); padding-bottom: 10px; margin-bottom: 16px; }
.stmt-title b { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--ink); }
.statement { border-collapse: collapse; width: 100%; font-size: 14px; }
.statement thead th {
  position: sticky; top: 65px; z-index: 6; background: var(--ink); color: #fff; text-align: left;
  padding: 10px 14px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; white-space: nowrap;
}
.statement thead th.num { text-align: right; }
.statement td { padding: 8px 14px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.4; }
.statement td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.statement td.nowrap { white-space: nowrap; }
.statement td.cmt { color: var(--ink-soft); font-size: 12.5px; }
.statement tr.month-break td {
  position: sticky; top: 104px; z-index: 4;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: 0.05em; padding: 7px 14px;
}
.statement tr.stmt-balance td { font-weight: 700; background: var(--paper-2); }
.statement tr.stmt-balance td.cmt { font-weight: 400; }
.statement tr.stmt-total td { border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); }
.statement td.stmt-edit { text-align: right; white-space: nowrap; }
.statement td.stmt-edit .btn-sm { margin-left: 2px; }
.statement tr.add-caption td { background: var(--sage); color: #fff; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 14px; }
.statement tr.add-row td { background: var(--paper-2); vertical-align: middle; }
.statement tr.add-row .fp-date, .statement tr.add-row input.flatpickr-input { min-width: 96px; }
.statement tr.add-row .cell-in { width: 100%; min-width: 0; }
.btn-sm.ghost-sm { background: transparent; color: var(--ink-soft); border-color: var(--border-strong); }
.btn-sm.ghost-sm:hover { background: rgba(94,107,79,0.10); color: var(--ink); }

/* ---- Revenues & Expenses (wide monthly statement) ---- */
.stmt-title .stmt-sub { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink-soft); margin-left: 12px; }
.statement.rande { font-size: 12.5px; }
.rande thead th { position: static; top: auto; background: var(--ink); color: #fff; padding: 8px 10px; }
.rande th, .rande td { padding: 6px 10px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.rande th:first-child, .rande td.re-name { text-align: left; white-space: normal; min-width: 200px; font-weight: 600; }
.rande td.num, .rande th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.rande .z { color: var(--border-strong); }
.rande tr.re-section td { background: var(--ink); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; padding: 6px 10px; }
.rande tr.re-total td { font-weight: 700; border-top: 1px solid var(--border-strong); border-bottom: 2px solid var(--ink); background: var(--paper-2); }
.rande tr.re-net td { font-weight: 800; border-top: 2px solid var(--ink); background: var(--paper-2); font-size: 13px; }
.rande td.re-year, .rande th.num:nth-child(14) { border-left: 2px solid var(--border-strong); }
.rande td.re-cmt { white-space: normal; min-width: 240px; max-width: 360px; font-size: 12px; color: var(--ink-soft); font-weight: 400; }

/* ---- Cash Flow statement ---- */
.cashflow col.c-amt { width: 24%; }
.cashflow col.c-desc { width: 44%; }
.cashflow td { border-bottom: none; padding: 6px 14px; vertical-align: baseline; }
.cashflow td.cf-amt {
  text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums;
  white-space: nowrap; position: relative; padding-left: 34px;
}
.cashflow td.cf-amt .cur { position: absolute; left: 14px; }
.cashflow tr.cf-balance td, .cashflow tr.cf-total td { font-weight: 700; }
.cashflow tr.cf-sum td.cf-amt { border-bottom: 1px solid var(--ink); }
.cashflow tr.cf-total td.cf-amt { border-bottom: 3px double var(--ink); }
.cashflow tr.cf-balance td:first-child, .cashflow tr.cf-total td:first-child { padding-top: 8px; }
.cashflow td.cf-note { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }

/* ---- Budget archive status note ---- */
.archive-note { line-height: 1.5; color: var(--ink-soft); max-width: var(--measure); }
.archive-note a { font-weight: 600; }
.archive-note.done b:first-child { color: var(--good); }
.archive-note.todo b:first-child { color: var(--gold-deep); }

/* ---- Budget editor: surplus/deficit note card ---- */
.notecard { margin-top: 26px; padding: 18px 20px; background: var(--paper-2); border: 1px solid var(--border); border-radius: 10px; }
.notecard-label { font-weight: 700; font-size: 15px; }
.notecard textarea.cell-in { resize: vertical; font-size: 14px; line-height: 1.45; }

/* Tables */
.tbl-scroll { overflow-x: auto; margin-top: 20px; }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
table.data thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft);
  font-weight: 700; border-bottom: 2px solid var(--border-strong); }
table.data .num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 22px; }
.photo-grid { display: flex; align-items: flex-start; gap: 16px; margin-top: 22px; }
.photo-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 620px) { .photo-grid { flex-direction: column; } }
.photo { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--paper-2); }
.photo img { display: block; width: 100%; height: auto; }
.photo figcaption { padding: 10px 14px; font-size: 13.5px; line-height: 1.45; color: var(--sage); }
.shot { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--paper-2); aspect-ratio: 4 / 3;
  display: grid; place-items: center; color: var(--sage); font-size: 13px; text-align: center; padding: 10px; }

/* Disclosure package download */
.download-card { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin: 24px 0 8px; padding: 18px 20px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--paper-2); border-left: 3px solid var(--gold); }
.download-card .dl-meta { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; }
.download-card .dl-meta b { font-family: var(--serif); font-size: 18px; }
.download-card .dl-meta span { font-size: 13.5px; line-height: 1.5; color: var(--sage); max-width: 60ch; }
.download-card .btn { flex: none; }
.contents-head { font-family: var(--serif); font-size: 20px; margin: 26px 0 6px; }

/* Map page figures */
.mapfig { margin: 26px 0 0; }
.mapfig img { display: block; width: 100%; max-width: 920px; height: auto; border-radius: 10px;
  border: 1px solid var(--border); background: var(--paper-2); }
.mapembed { max-width: 920px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 16 / 10; background: var(--paper-2); }
.mapembed iframe { display: block; width: 100%; height: 100%; border: 0; }
.mapfig figcaption { margin-top: 8px; font-size: 13.5px; color: var(--sage); max-width: 920px; }

/* Simple link list (references) */
.linklist { list-style: none; margin: 14px 0 0; padding: 0; }
.linklist li { padding: 11px 0; border-bottom: 1px solid var(--border); }
.linklist li:last-child { border-bottom: none; }
.linklist li a { font-weight: 600; }
.linklist li span { display: block; font-size: 13.5px; color: var(--sage); margin-top: 2px; }

/* Notice / callout */
.notice { background: var(--paper-2); border: 1px solid var(--border-strong); border-left: 3px solid var(--gold);
  border-radius: 6px; padding: 16px 18px; margin: 22px 0; font-size: 15px; }
.notice b { font-weight: 700; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 20px; }

/* Footer */
footer.site { background: var(--dusk); color: #C7C9CF; margin-top: 8px; }
footer.site .wrap { padding: 40px 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
footer.site h4 { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold); margin: 0 0 12px; }
footer.site a { color: #D8DAE0; text-decoration: none; font-size: 14.5px; display: block; padding: 3px 0; }
footer.site a:hover { color: #fff; }
footer.site .brand-f b { font-family: var(--serif); font-size: 20px; color: #FBF9F3; }
footer.site .brand-f p { font-size: 14px; margin: 8px 0 0; max-width: 32ch; }
footer.site .fine { grid-column: 1 / -1; border-top: 1px solid var(--dusk-soft); padding-top: 18px; font-size: 12.5px; color: #9A9DA6; }
@media (max-width: 700px) { footer.site .wrap { grid-template-columns: 1fr 1fr; } footer.site .brand-f { grid-column: 1 / -1; } }

/* ===================== Resident portal ===================== */
.portal-nav .brand-sub { color: var(--gold-deep); }
.nav-links a.leave { color: var(--ink-soft); }
.nav-links a.leave:hover { color: var(--ink); }

.whoami { background: var(--dusk); color: #C7C9CF; font-size: 13.5px; }
.whoami .wrap { padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.whoami b { color: #FBF9F3; }
.whoami .signout { color: #C7C9CF; text-decoration: none; font-weight: 600; border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px; padding: 3px 10px; white-space: nowrap; transition: color 0.12s, border-color 0.12s; }
.whoami .signout:hover { color: #FBF9F3; border-color: rgba(255,255,255,0.5); }
.rolechip { display: inline-block; background: rgba(221,160,44,0.18); color: var(--gold);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 20px; margin-left: 6px; }
.rolechip.sm { font-size: 10px; padding: 1px 7px; color: var(--sage-deep); background: rgba(94,107,79,0.16); }

/* Directory: message-the-group card, cohorts, chips, sortable table */
.msg-card { background: var(--paper-2); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 22px; }
.msg-card h2 { margin: 0; font-family: var(--serif); font-size: 20px; }
.cohort-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 16px; }
.cohort-btn { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 7px 14px;
  border-radius: 20px; border: 1px solid var(--border-strong); background: var(--paper); color: var(--ink); }
.cohort-btn:hover { border-color: var(--sage); color: var(--sage-deep); }
.cohort-btn.active { background: var(--sage); border-color: var(--sage); color: #fff; }
.cohort-count { font-size: 13px; color: var(--ink-soft); margin-left: 4px; }
.cohort-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.dir-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dir-search { flex: 1 1 240px; max-width: 360px; font: inherit; font-size: 15px; padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--paper); color: var(--ink); }
.dir-wrap { max-width: 1180px; }
.directory-table th, .directory-table td { white-space: nowrap; }
th.sort-th { cursor: pointer; user-select: none; white-space: nowrap; }
th.sort-th:hover { color: var(--sage-deep); }
th.sort-th[aria-sort]::after { content: " ▾"; color: var(--sage); }
th.sort-th[aria-sort="ascending"]::after { content: " ▴"; }

.form-lbl { font-size: 13px; font-weight: 650; color: var(--ink-soft); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 44px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--paper-2); margin-bottom: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  background: rgba(94,107,79,0.14); color: var(--sage-deep); border-radius: 16px; padding: 4px 6px 4px 11px; }
.chip-x { border: none; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--sage-deep);
  padding: 0 4px; border-radius: 50%; }
.chip-x:hover { background: rgba(94,107,79,0.22); }

/* Breadcrumbs */
.crumbs { border-bottom: 1px solid var(--border); background: var(--paper); }
.crumbs .wrap { padding: 10px 24px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0;
  font-size: 13px; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "›"; color: var(--ink-soft); }
.crumbs a { color: var(--sage-deep); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink-soft); }

/* Modal dialogs */
dialog.modal { width: min(560px, 92vw); max-height: 88vh; padding: 0; border: 1px solid var(--border-strong);
  border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(35,31,26,0.28); overflow: auto; }
dialog.modal::backdrop { background: rgba(35,31,26,0.44); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--paper); }
.modal-head h3 { font-family: var(--serif); font-size: 20px; margin: 0; }
.modal-close { background: none; border: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-soft);
  padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: rgba(94,107,79,0.10); color: var(--ink); }
dialog.modal .form { padding: 18px 20px; }
.modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.modal-actions .spacer { margin-left: auto; }

/* Small row action buttons (edit/delete) */
.rowbtns { display: inline-flex; gap: 6px; flex: none; }
.linkbtn { background: none; border: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 650;
  color: var(--sage-deep); padding: 3px 6px; border-radius: 6px; }
.linkbtn:hover { background: rgba(94,107,79,0.12); }
.linkbtn.danger { color: #a13d2d; }
.linkbtn.danger:hover { background: rgba(161,61,45,0.10); }
.btn.danger, .btn-sm.danger { background: #a13d2d; border-color: #a13d2d; color: #fff; }
.btn.danger:hover, .btn-sm.danger:hover { background: #8a3325; border-color: #8a3325; color: #fff; }

.muted { color: var(--ink-soft); }
.sm { font-size: 13px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 12px; }
.sec-head h2 { font-size: 20px; }
.seeall { font-size: 13px; text-decoration: none; }

.stack { list-style: none; margin: 0; padding: 0; }
.stack-item { display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 10px 2px; border-bottom: 1px solid var(--border); }

.post { list-style: none; padding: 16px 0; border-bottom: 1px solid var(--border); }
.post-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.post-meta { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.post-body { margin-top: 6px; white-space: pre-wrap; color: var(--ink); }

/* Composer (details/summary) */
.composer { border: 1px solid var(--border-strong); border-radius: 10px; background: var(--paper-2); margin-bottom: 8px; }
.composer > summary { cursor: pointer; padding: 12px 16px; font-weight: 650; color: var(--sage-deep); list-style: none; }
.composer > summary::-webkit-details-marker { display: none; }
.composer[open] > summary { border-bottom: 1px solid var(--border); }
.form { display: grid; gap: 12px; padding: 16px; }
.form label { display: grid; gap: 4px; font-size: 13px; font-weight: 650; color: var(--ink-soft); }
.form input, .form textarea, .form select {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1px solid var(--border-strong); border-radius: 7px; padding: 9px 11px; width: 100%;
}
.form textarea { resize: vertical; }
.form .check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 550; }
.form .check input { width: auto; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form .row2 { grid-template-columns: 1fr; } }
.form button { justify-self: start; }

/* Directory */
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.lotcard { background: var(--paper-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.lotcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 10px; }
.lotnum { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.member { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.member:last-child { border-bottom: none; }
.member-name { font-weight: 600; }
.member-contact { font-size: 13px; margin-top: 1px; }

/* Threads */
.threadlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.threadlist li a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit;
  padding: 14px 4px; border-bottom: 1px solid var(--border); }
.threadlist li a:hover { background: rgba(94,107,79,0.06); }

/* Calendar list */
.cal { list-style: none; margin: 0; padding: 0; }
.cal-item { display: flex; gap: 16px; padding: 14px 2px; border-bottom: 1px solid var(--border); }
.cal-date { flex: none; width: 56px; text-align: center; background: var(--paper-2);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 0; align-self: start; }
.cal-mon { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-deep); font-weight: 700; }
.cal-day { display: block; font-family: var(--serif); font-size: 22px; line-height: 1; }
.cal-body { display: flex; flex-direction: column; gap: 2px; }

.portal-foot .wrap { padding: 24px; }

/* ===================== Finances ===================== */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat { background: var(--paper-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 16px 18px; }
.stat span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 700; }
.stat b { display: block; font-family: var(--serif); font-size: 28px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.stat em { font-style: normal; font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.stat.good b { color: var(--good); }
.stat.bad b { color: var(--warn); }

table.pnl .grouprow td { font-weight: 700; color: var(--gold-deep); background: rgba(221,160,44,0.07);
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
table.pnl .subtotal td { font-weight: 700; border-top: 1px solid var(--border-strong); }
table.pnl .netrow td { font-weight: 700; border-top: 2px solid var(--ink); font-size: 16px; }
table.pnl tbody td:first-child { padding-left: 18px; }
table.pnl .grouprow td:first-child, table.pnl .subtotal td:first-child, table.pnl .netrow td:first-child { padding-left: 14px; }

.pay-ok { color: var(--good); font-weight: 700; font-size: 13px; }
.pay-due { color: var(--warn); font-weight: 700; font-size: 13px; }

.budget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

/* ===================== Documents & search ===================== */
.searchbar { display: flex; gap: 8px; margin: 8px 0 6px; max-width: 560px; }
.searchbar input { flex: 1; font: inherit; font-size: 15px; padding: 10px 13px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--ink); }
.doc-group { margin-top: 26px; }
.doc-group h2 { font-size: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }

.results { list-style: none; margin: 16px 0 0; padding: 0; }
.results li { padding: 14px 2px; border-bottom: 1px solid var(--border); }
.results li a { text-decoration: none; color: var(--ink); display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.results li a b { color: var(--gold-deep); }
.results li a:hover b { text-decoration: underline; }
.snip { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.snip mark { background: rgba(221,160,44,0.32); color: inherit; padding: 0 2px; border-radius: 2px; }

/* ---- Document library tabs (progressive enhancement) ---- */
/* No JS: the tablist is hidden and panels stack under their own headings.
   With JS the .doctabs gets a .js class → tabs appear, one panel at a time. */
.tablist { display: none; }
.doctabs.js .tablist { display: flex; flex-wrap: wrap; gap: 3px; align-items: flex-end;
  margin: 26px 0 0; border-bottom: 2px solid var(--border-strong); }
.tab { appearance: none; border: none; background: none; font: inherit; font-weight: 650; font-size: 14.5px;
  color: var(--ink-soft); cursor: pointer; padding: 9px 14px; display: inline-flex; align-items: center; gap: 7px;
  border-bottom: 2px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0; white-space: nowrap; }
.tab:hover { color: var(--ink); background: rgba(94,107,79,0.07); }
.tab[aria-selected="true"] { color: var(--sage-deep); border-bottom-color: var(--sage); }
.tabcount { font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--paper-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; line-height: 1.75; }
.tab[aria-selected="true"] .tabcount { color: var(--sage-deep); background: rgba(94,107,79,0.14); border-color: transparent; }
.tabpanel { padding-top: 4px; }
.tabpanel[hidden] { display: none; }
.doctabs.js .tabpanel > .panel-head { display: none; }

/* Date shown on a document row (library, minutes, public docs) */
.docdate { flex: none; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Board Edit button sits at the end of the row, after the Read tag */
.doclist .rowbtns { flex: none; }

/* ---- Change-log tags ---- */
.logtag { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; background: var(--border); color: var(--ink); }
.logtag.log-added { background: rgba(79,122,74,0.18); color: var(--good); }
.logtag.log-archived { background: rgba(161,61,45,0.15); color: #a13d2d; }
.logtag.log-restored { background: rgba(94,107,79,0.18); color: var(--sage-deep); }
.archived-list .meta b { color: var(--ink-soft); }
.nl-attach { margin: 8px 0 0; }

/* ---- Temporary public-site preview gate (remove with the gate middleware) ---- */
body.gate { display: grid; place-items: center; min-height: 100vh; background: var(--dusk); margin: 0; }
.gate-wrap { padding: 24px; width: 100%; max-width: 460px; }
.gate-card { background: var(--paper); border-radius: 16px; padding: 34px 30px; box-shadow: 0 24px 70px rgba(0,0,0,0.35); }
.gate-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.gate-brand .glyph { width: 30px; height: 30px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold), var(--gold-deep)); }
.gate-card h1 { font-size: 26px; margin: 20px 0 6px; }
.gate-card > p { color: var(--ink-soft); margin: 0 0 14px; }
.gate-error { color: var(--warn); font-weight: 650; }
.gate-input { width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--border-strong); border-radius: 8px; margin-bottom: 12px; background: #fff; }
.gate-card .btn.primary { width: 100%; text-align: center; }
.gate-fine { font-size: 13px; color: var(--ink-soft); margin-top: 18px; }
/* Sign-in / passkey screens: stack the buttons full-width in the gate card. */
.gate-card .btn { display: block; width: 100%; text-align: center; margin-top: 10px; }
.gate-card .btn.alt { background: transparent; }
.gate-card #err { color: var(--warn); font-weight: 600; }
/* Account bar: the Passkeys + Log off links sit together on the right. */
.whoami-links { display: flex; align-items: center; gap: 14px; }
.whoami-links a { color: #C7C9CF; text-decoration: none; font-weight: 600; }
.whoami-links a:hover { color: #FBF9F3; }
.btn-sm { font: inherit; font-size: 12.5px; font-weight: 650; padding: 5px 12px; border-radius: 6px;
  border: 1px solid var(--sage); background: var(--sage); color: #fff; cursor: pointer; }
.btn-sm:hover { background: var(--sage-deep); border-color: var(--sage-deep); }
.doclist .nav-links a.active { background: none; }

/* ===================== Photo hero ===================== */
.hero-photo { position: relative; min-height: 560px; display: flex; align-items: center;
  background: #1b1410; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-photo::before { content: ""; position: absolute; inset: 0;
  background: url(/hero.jpg) center 42% / cover no-repeat; }
.hero-scrim { position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(18,12,8,0.72) 0%, rgba(18,12,8,0.32) 45%, rgba(18,12,8,0) 75%),
    linear-gradient(0deg, rgba(18,12,8,0.55) 0%, rgba(18,12,8,0) 45%); }
.hero-photo .wrap { position: relative; padding: 96px 24px; }
.eyebrow.light { color: #F2C879; }
h1.on-photo { color: #FBF7EE; text-shadow: 0 2px 24px rgba(0,0,0,0.45); }
.lede.on-photo { color: #F1E7DA; text-shadow: 0 1px 12px rgba(0,0,0,0.4); }
.btn.on-photo-ghost { background: rgba(255,255,255,0.14); color: #fff;
  border-color: rgba(255,255,255,0.55); }
.btn.on-photo-ghost:hover { background: rgba(255,255,255,0.26); color: #fff; }
@media (max-width: 620px) { .hero-photo { min-height: 460px; } .hero-photo .wrap { padding: 64px 24px; } }

/* ===================== Utilities & Around Town ===================== */
.util-list { display: grid; gap: 0; margin-top: 4px; }
.util { padding: 18px 0; border-bottom: 1px solid var(--border); }
.util:last-child { border-bottom: none; }
.util-name { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.util-detail { margin: 5px 0 0; color: var(--ink); max-width: 65ch; }
.util-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 7px; font-size: 14px; }
.util-contact { font-weight: 650; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.util-lead { margin: 6px 0 0; font-size: 15px; }
.util-options { list-style: disc; margin: 8px 0 0; padding-left: 20px; max-width: 65ch; }
.util-options li { padding: 3px 0; font-size: 15px; line-height: 1.5; }
.util-options .opt-note { color: var(--ink-soft); }
.util-options a { word-break: break-word; }

.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }
.place { background: var(--paper-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.place-name { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.place-name a { text-decoration: none; }
.place-name a:hover { text-decoration: underline; }
.place p { margin: 5px 0 0; font-size: 14px; }

/* Playground (sandbox) banner — visually distinct from a normal notice */
.notice.demo-banner { border-left-color: var(--sage); background: rgba(94,107,79,0.09); }

/* ===================== Document reader ===================== */
.doc-text { max-width: 68ch; margin: 22px 0 0; font-size: 16.5px; line-height: 1.72; }
.doc-text p { margin: 0 0 14px; white-space: pre-wrap; }
.doc-ocr-note { max-width: 68ch; margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.doc-download { margin-top: 20px; padding-top: 20px; border-top: 2px solid var(--ink); }

/* Document page: embedded scanned original */
.doc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.doc-embed { border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: #fff; }
.doc-embed iframe { width: 100%; height: 82vh; border: 0; display: block; }
.doc-embed img { width: 100%; height: auto; display: block; }

/* ===================== Calendar (FullCalendar) ===================== */
/* Category chip (also used in the past-events list and event modals). */
.cat-chip { display: inline-block; background: var(--chip, #7a7568); color: #fff; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px;
  border-radius: 20px; vertical-align: middle; }

.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 18px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.cal-legend-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; user-select: none; padding: 5px 11px; border: 1px solid var(--border);
  border-radius: 20px; background: var(--paper-2); transition: border-color 0.12s, background 0.12s; }
.cal-legend-chip:hover { border-color: var(--border-strong); }
.cal-legend-chip input { margin: 0; width: 15px; height: 15px; accent-color: var(--chip); cursor: pointer; }
.cal-foot { margin-top: 14px; font-size: 14px; }
.cal-foot a { color: var(--gold-deep); text-decoration: none; }
.cal-foot a:hover { text-decoration: underline; }

.ev-view p { margin: 5px 0; }
.ev-view .ev-when { font-size: 15px; }
.ev-view .post-body { margin-top: 10px; white-space: pre-wrap; }

/* Theme FullCalendar to the site palette via its CSS variables + a few overrides. */
#calendar {
  --fc-border-color: var(--border);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: var(--paper-2);
  --fc-neutral-text-color: var(--ink-soft);
  --fc-today-bg-color: rgba(221, 160, 44, 0.12);
  --fc-button-text-color: #fff;
  --fc-button-bg-color: var(--ink);
  --fc-button-border-color: var(--ink);
  --fc-button-hover-bg-color: #3a332b;
  --fc-button-hover-border-color: #3a332b;
  --fc-button-active-bg-color: var(--gold-deep);
  --fc-button-active-border-color: var(--gold-deep);
  --fc-now-indicator-color: var(--warn);
  --fc-list-event-hover-bg-color: var(--paper-2);
  font-family: var(--sans);
}
.fc .fc-toolbar-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); }
.fc .fc-toolbar.fc-header-toolbar { margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.fc .fc-button { border-radius: 8px; font-weight: 600; text-transform: capitalize; box-shadow: none !important;
  padding: 5px 12px; }
.fc .fc-button:focus, .fc .fc-button-primary:focus, .fc .fc-button:active { box-shadow: none !important; }
.fc .fc-button-primary:not(:disabled).fc-button-active { color: #fff; }
.fc .fc-col-header-cell-cushion { padding: 8px 6px; text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 11.5px; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.fc .fc-daygrid-day-number { padding: 6px 8px; color: var(--ink-soft); text-decoration: none; }
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { color: var(--gold-deep); font-weight: 700; }
/* Slimmer chips that wrap so the whole title reads in the cell. */
.fc .fc-daygrid-event { border-radius: 6px; padding: 2px 6px; margin-top: 2px; font-weight: 500; font-size: 11.5px; line-height: 1.3; }
.fc .fc-daygrid-event .fc-event-title { white-space: normal; overflow: visible; font-weight: 500; }
.fc .fc-daygrid-event .fc-event-time { font-weight: 500; padding-right: 3px; }
.fc .fc-daygrid-event:hover { filter: brightness(0.94); }
.fc .fc-event { cursor: pointer; text-decoration: none; }
/* White text only on the colored grid chips — NOT the list rows. */
.fc-daygrid-event.fc-event, .fc-timegrid-event.fc-event,
.fc-daygrid-event.fc-event:hover, .fc-timegrid-event.fc-event:hover { color: #fff; }
.fc .fc-daygrid-day-frame { min-height: 92px; }
/* List view: dark, readable rows. */
.fc .fc-list-event:hover td { cursor: pointer; background: var(--paper-2); }
.fc .fc-list-event-title a { color: var(--ink); text-decoration: none; }
.fc .fc-list-event-time { color: var(--ink-soft); }
.fc-theme-standard .fc-list-day-cushion { background: var(--paper-2); }

/* Hover tooltip (desktop): full event details on pointer over a chip. */
.cal-tip { position: absolute; z-index: 1000; max-width: 260px; background: var(--ink); color: #fff;
  border-radius: 8px; padding: 9px 12px; font-family: var(--sans); font-size: 12.5px; line-height: 1.4;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28); pointer-events: none; }
.cal-tip-title { font-weight: 700; margin-bottom: 2px; }
.cal-tip-when, .cal-tip-loc { opacity: 0.82; }
.cal-tip-desc { margin-top: 6px; opacity: 0.92; white-space: pre-wrap; }
@media (max-width: 640px) {
  .fc .fc-toolbar.fc-header-toolbar { justify-content: center; }
  .fc .fc-toolbar-title { font-size: 1.2rem; }
  .fc .fc-daygrid-day-frame { min-height: 64px; }
}

/* ===================== Weather ===================== */
.wx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-top: 20px; }

.wx-card { background: var(--paper-2); border: 1px solid var(--border-strong); border-radius: 14px;
  padding: 20px 22px; border-top: 3px solid var(--sage); }
.wx-card.wx-gold { border-top-color: var(--gold); }
.wx-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.wx-card-head h2 { font-size: 20px; margin: 0; }
.wx-card-head p { margin: 2px 0 0; }

.wx-live, .wx-offline { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 4px 9px; border-radius: 999px; }
.wx-live { color: var(--good); background: rgba(79,122,74,0.12); }
.wx-offline { color: var(--warn); background: rgba(180,71,43,0.12); }

.wx-now { display: flex; align-items: center; gap: 20px; margin: 18px 0 4px; }
.wx-now > b { font-family: var(--serif); font-size: clamp(52px, 9vw, 68px); line-height: 1;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.wx-now-side { display: flex; flex-direction: column; gap: 3px; font-size: 15px; color: var(--ink-soft); }
.wx-now-side b { color: var(--ink); }
.wx-now-side em { font-style: normal; font-size: 12.5px; }
.wx-stale { color: var(--warn); font-weight: 600; }
.wx-warn { color: var(--warn); margin-top: 12px; }

.wx-tiles { margin-top: 16px; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.wx-tiles .stat { padding: 12px 13px; background: var(--paper); }
.wx-tiles .stat b { font-size: 21px; }
.wx-tiles .stat span { font-size: 10.5px; }
.wx-tiles .stat em { font-size: 11.5px; }

.wx-actions { display: flex; gap: 8px; margin-top: 16px; }

.wx-range { display: flex; gap: 2px; }
.wx-range a { font-size: 13px; font-weight: 650; color: var(--ink-soft); text-decoration: none;
  padding: 5px 11px; border-radius: 999px; }
.wx-range a:hover { background: rgba(94,107,79,0.08); color: var(--ink); }
.wx-range a.active { background: var(--sage); color: #fff; }

.wx-legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 0 4px; font-size: 13px; color: var(--ink-soft); }
.wx-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px;
  vertical-align: -1px; }
.wx-h { font-size: 14px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft);
  margin: 22px 0 4px; }

.wx-chart { width: 100%; height: auto; overflow: visible; }
.wx-chart .wx-gl { stroke: var(--border); stroke-width: 1; }
.wx-chart .wx-axis { font-family: var(--sans); font-size: 10.5px; fill: var(--ink-soft); }
.wx-chart .wx-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wx-chart .wx-bar { rx: 2; }

/* Dashboard current-conditions strip */
.wx-strip { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 20px;
  padding: 14px 18px; border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--paper-2); text-decoration: none; color: var(--ink); }
.wx-strip:hover { border-color: var(--gold); }
.wx-strip-item { display: flex; align-items: center; gap: 10px; }
.wx-strip-item b { font-family: var(--serif); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums;
  border-left: 3px solid var(--sage); padding-left: 10px; }
.wx-strip-item.wx-gold b { border-left-color: var(--gold); }
.wx-strip-item em { font-style: normal; font-size: 13px; color: var(--ink-soft); }
.wx-strip-more { margin-left: auto; font-size: 13px; font-weight: 650; color: var(--sage-deep); }
.wx-partial { margin: 6px 0 0; max-width: var(--measure); }

/* ===================== Admin ===================== */
.notice.adm-ok  { border-left-color: var(--good); background: rgba(79,122,74,0.09); }
.notice.adm-err { border-left-color: var(--warn); background: rgba(180,71,43,0.08); }

.adm-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; padding: 0; }
.adm-inline input, .adm-inline select { font: inherit; font-size: 14px; padding: 7px 9px;
  border: 1px solid var(--border-strong); border-radius: 7px; background: var(--paper); color: var(--ink); }
.adm-add { margin-top: 14px; }
.stack-item.adm-pos { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-pos .adm-inline input { min-width: 190px; }
.adm-pos form { margin: 0; }
.adm-term { max-width: 92px; }
.adm-addr { display: inline-flex; align-items: center; gap: 6px; }
.adm-addr input { min-width: 150px; }
.adm-never { color: var(--ink-soft); font-style: italic; }
.adm-pending { display: inline-block; font-size: 10px; color: var(--warn); background: rgba(180,71,43,0.12);
  padding: 1px 7px; border-radius: 999px; font-weight: 700; }
.adm-muted-row td { color: var(--ink-soft); background: var(--paper-2); }

/* Admin email on/off toggle */
.adm-on { display: inline-block; font-size: 10px; color: var(--good); background: rgba(79,122,74,0.14);
  padding: 1px 8px; border-radius: 999px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.adm-off { display: inline-block; font-size: 10px; color: var(--ink-soft); background: var(--paper-2);
  border: 1px solid var(--border-strong); padding: 1px 8px; border-radius: 999px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; }
.adm-rowbtns { display: flex; gap: 6px; justify-content: flex-end; }
.adm-rowbtns form { margin: 0; }
