/* Owner Portal styles, shared by every page under /portal/.
   Colors and the site header come from site.css. */

main.wrap{padding:40px 16px 64px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:24px}
.narrow{max-width:440px;margin:0 auto}
/* ---- Sign in: brand panel + form, full height ---- */
body.signin-mode .site-header,body.signin-mode .menu-backdrop,body.signin-mode #loading{display:none}
body.signin-mode main.wrap{max-width:none;margin:0;padding:0}
.signin{display:grid;grid-template-columns:1fr 1fr;min-height:100vh}
.signin-brand{background:var(--brand);color:#fff;padding:56px;display:flex;flex-direction:column;justify-content:space-between;gap:40px}
@media (prefers-color-scheme: dark){.signin-brand{background:#1f3a33}}
.signin-logo{font-family:var(--font-display);font-size:1.5rem;font-weight:600;color:inherit;text-decoration:none}
.signin-logo span{font-family:var(--font);font-size:.75rem;font-weight:700;letter-spacing:.1em;margin-left:8px;opacity:.85}
.signin-logo.mobile{display:none;color:var(--ink);margin-bottom:28px}
.signin-logo.mobile span{color:var(--brand)}
.signin-headline{font-family:var(--font-display);font-weight:500;font-size:3rem;line-height:1.1;margin:0 0 20px;max-width:560px}
.signin-note{font-size:1rem;line-height:1.6;opacity:.85;max-width:460px;margin:0}
.signin-foot{opacity:.7;font-size:.9rem;margin:0}
.signin-panel{display:flex;align-items:center;justify-content:center;padding:48px 24px;background:var(--bg)}
.signin-col{width:100%;max-width:420px;display:grid;gap:22px}
.signin-col form{display:grid;gap:16px;margin:0}
.signin-col .eyebrow{margin:0 0 -8px}
.signin-col h1{margin:0}
.signin-col .intro{margin:0;color:var(--menu-link)}
.signin-col .help{margin:0;padding-top:18px;border-top:1px solid var(--line);font-size:.88rem;color:var(--muted)}
.signin-col .msg:empty{display:none}
@media (max-width:800px){
  .signin{grid-template-columns:1fr}
  .signin-brand{display:none}
  .signin-panel{align-items:flex-start;padding:32px 20px}
  .signin-logo.mobile{display:block}
}
.code-boxes{position:relative;display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:6px}
.code-boxes span{height:64px;border:1.5px solid var(--line);border-radius:10px;background:var(--surface);display:grid;place-items:center;
  font-size:1.75rem;font-weight:600;font-variant-numeric:tabular-nums}
.code-boxes span.filled{border-color:var(--brand)}
.code-boxes span.current{border:2px solid var(--accent);box-shadow:0 0 0 4px var(--sand)}
.code-boxes input{position:absolute;inset:0;width:100%;height:100%;opacity:0;font-size:16px;cursor:text;z-index:1}
.code-boxes:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:4px;border-radius:12px}
@media (max-width:380px){.code-boxes{gap:5px}.code-boxes span{height:54px;font-size:1.5rem}}
.code-links{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.muted-link{color:var(--muted)!important;font-weight:500!important}
.muted-link:not(:disabled){color:var(--brand)!important;font-weight:600!important}
h1{font-family:var(--font-display);font-weight:500;font-size:2.5rem;line-height:1.1;letter-spacing:-.005em;margin:0 0 6px}
@media (max-width:560px){h1{font-size:2rem}}
h2{font-size:1.2rem;line-height:1.3;margin:0 0 12px}
h3{font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:18px 0 4px}
.muted{color:var(--muted)}
.small-text{font-size:.9rem}
form{display:grid;gap:12px}
#signin form{margin-top:16px}
label{font-weight:600;font-size:.9rem}
input,select,textarea{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);font:inherit}
textarea{min-height:80px;resize:vertical}
.check{display:flex;gap:10px;align-items:flex-start;font-weight:400}
.check input{width:20px;height:20px;margin-top:3px}
input[type=checkbox],input[type=radio]{width:20px;height:20px;accent-color:var(--brand);flex:none;cursor:pointer}
#code{letter-spacing:.3em;font-size:1.3rem;text-align:center}
.msg{font-size:.9rem;margin:0}
.msg.error{color:var(--danger)} .msg.ok{color:var(--ok)}
.devnote{background:#fff5d6;color:#5a4500;border-radius:8px;padding:10px 12px;font-size:.9rem}
.grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));margin-top:20px}
.full{margin-top:16px}
.row-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.row-head h2{margin:0}
dl{margin:0;display:grid;grid-template-columns:auto 1fr;gap:6px 16px}
dt{color:var(--muted)} dd{margin:0;white-space:pre-line}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.doc{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.doc:last-child{border-bottom:0}
.doc .meta{font-size:.82rem;color:var(--muted)}
.pill{display:inline-block;white-space:nowrap;font-size:.75rem;font-weight:700;padding:1px 8px;border-radius:99px;background:var(--line);color:var(--ink);vertical-align:middle}
.pill.board{background:#6b3f7a;color:#fff}
.pill.public{background:transparent;color:var(--brand);box-shadow:inset 0 0 0 1.5px var(--brand)}
/* Document visibility tags */
.pill.vis-public{background:#2e7d4f;color:#fff}
.pill.vis-portal{background:#2d5f8a;color:#fff}
.upload{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.two{display:grid;gap:12px;grid-template-columns:1fr 1fr}
@media (max-width:560px){.two{grid-template-columns:1fr}}
.activity{list-style:none;margin:0;padding:0}
.activity li{padding:8px 0;border-bottom:1px solid var(--line);font-size:.92rem}
.activity li:last-child{border-bottom:0}
.toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin:28px 0 12px}
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
table{width:100%;border-collapse:collapse;font-size:.92rem}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}
.roster{min-width:880px}
.roster .nowrap{white-space:nowrap}
.roster td.col-addr{min-width:130px}
.roster th,.roster td{padding:10px}
.roster td.col-name{white-space:nowrap}
.roster a.tel{color:inherit;text-decoration:none}
.roster a.tel:hover{text-decoration:underline}
/* One heading row per street */
.roster tbody tr.street-row th{background:var(--bg);font-weight:700;font-size:1rem;color:var(--brand);padding:8px 10px;border-top:2px solid var(--line)}
.roster tbody tr.street-row:first-child th{border-top:0}
.roster .street-count{font-weight:400;color:var(--muted);font-size:.85rem;margin-left:6px}
th{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);position:sticky;top:0;background:var(--surface)}
tr:last-child td{border-bottom:0}
.empty{color:var(--muted);font-style:italic}
#search{max-width:280px}
dialog{border:1px solid var(--line);border-radius:var(--radius);padding:0;max-width:760px;width:calc(100% - 32px);background:var(--bg);color:var(--ink)}
dialog::backdrop{background:rgba(0,0,0,.45)}
.dlg-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 20px;background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1}
.dlg-head h2{margin:0}
.dlg-body{padding:16px 20px 24px;display:grid;gap:16px}
.dlg-body .card{padding:16px}
.owner-card{border:1px solid var(--line);border-radius:10px;padding:12px;display:grid;gap:10px}
.owner-card + .owner-card{margin-top:10px}
.three{display:grid;gap:12px;grid-template-columns:repeat(3,1fr)}
@media (max-width:640px){.three{grid-template-columns:1fr}}
.hint{font-size:.85rem;color:var(--muted);margin:0}
.req-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);cursor:pointer}
.req-row:last-child{border-bottom:0}
.req-row:hover .req-subject{text-decoration:underline}
.req-subject{font-weight:600;color:var(--brand)}
.st{display:inline-block;font-size:.75rem;font-weight:700;padding:1px 8px;border-radius:99px;white-space:nowrap}
.st.open{background:#fde7c7;color:#6b3d00} .st.in_review{background:#dbe7ff;color:#1c3d7a}
.st.approved{background:#d6f0dc;color:#1e5a2c} .st.denied{background:#f7d6d2;color:#7a2418} .st.closed{background:var(--line);color:var(--ink)}
.thread{display:grid;gap:10px}
.msg-item{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface)}
.msg-item.board{border-left:4px solid var(--brand)}
.msg-item.internal{background:#fff5d6;color:#3d3000;border-left:4px solid #c8a200}
.msg-item.status{background:transparent;border-style:dashed;font-size:.9rem}
.msg-item .who{font-size:.82rem;color:var(--muted);margin-bottom:4px}
.msg-item.internal .who{color:#5a4500}
.msg-body{white-space:pre-wrap;margin:0}
.files{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.files a{font-size:.85rem}
.filters{display:flex;gap:8px;flex-wrap:wrap}
.filters select{width:auto}

/* ---- Portal page layout ---- */
.page-head{margin:0 0 20px}
.page-head h1{margin:0 0 4px}
.page-head p{margin:0}
.card-link{display:inline-block;margin-top:12px;font-weight:600;text-decoration:none}
.card-link:hover{text-decoration:underline}
.gate{max-width:520px;margin:5vh auto 0;text-align:center}

/* Stat tiles */
.stats{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));margin:0 0 16px}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px}
.stat .label{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:0}
.stat .value{font-size:1.5rem;font-weight:700;margin:2px 0 0;font-variant-numeric:tabular-nums}
.stat .sub{font-size:.85rem;color:var(--muted);margin:0}
.stat.alert .value{color:var(--danger)}
.stat.good .value{color:var(--ok)}

.nowrap{white-space:nowrap}

/* Money */
.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.due{color:var(--danger);font-weight:600}
.credit{color:var(--ok)}
tr.voided td{color:var(--muted)}
tr.voided td.num,tr.voided td:first-child,tr.voided .strike{text-decoration:line-through}
tr.voided .void-note{font-style:italic;color:var(--danger)}
.ledger{min-width:640px}
.roster.balances{min-width:820px}
.roster.balances td.num{white-space:nowrap}

/* Announcements */
.ann{padding:16px 0;border-bottom:1px solid var(--line)}
.ann:last-child{border-bottom:0}
.ann h2,.ann h3{font-size:1.1rem;margin:0 0 2px;text-transform:none;letter-spacing:0;color:var(--ink)}
.ann .meta{font-size:.85rem;color:var(--muted);margin:0 0 8px}
.ann .body{white-space:pre-wrap;margin:0}
.ann .actions{margin-top:10px;align-items:center}

/* Documents */
.doc-tools{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:0 0 8px}
.doc-tools input[type=search]{max-width:320px}
.doc-tools select{width:auto}
details.archive{margin:6px 0 0}
details.archive summary{cursor:pointer;color:var(--brand);font-weight:600;font-size:.92rem;padding:6px 0}
.doc .row-actions{display:flex;gap:6px;flex:none}
/* Jump links (e.g. Past news) land below the pinned Post/Add bar too */
details.compose:not([hidden]) ~ section [id]{scroll-margin-top:calc(var(--header-h) + 84px)}
/* Community News rows (same layout as Meetings; buttons stay at the top of a long post) */
.news-row{align-items:flex-start;padding:14px 0}
.news-row .row-tags{display:flex;margin-bottom:4px}
.news-row .news-body{white-space:pre-line;font-size:.92rem;margin-top:6px;overflow-wrap:anywhere}
.news-row .msg:empty{display:none}
#editNote{background:var(--bg);padding:8px 10px;border-radius:8px}
@media (max-width:600px){.news-row{flex-direction:column;align-items:stretch;gap:8px}}

/* Exports */
.exports{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.export{border:1px solid var(--line);border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:6px}
.export strong{font-size:1rem}
.export p{margin:0;font-size:.88rem;color:var(--muted);flex:1}

/* Keyboard focus is always visible */
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.req-row:focus-visible{
  outline:3px solid var(--accent);outline-offset:2px}
.req-row{width:100%;background:none;border-left:0;border-right:0;border-top:0;font:inherit;color:inherit;text-align:left}
.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}
/* Row headers (the first cell of each row in the roster and ledgers) look like ordinary cells */
tbody th{font:inherit;text-transform:none;letter-spacing:0;color:inherit;position:static;background:none;font-weight:600}

/* Requests-by-type tile */
.stat .stat-head{display:block;text-decoration:none;color:inherit}
.stat .type-list{list-style:none;margin:8px 0 0;padding:8px 0 0;border-top:1px solid var(--line);display:grid;gap:2px}
.stat .type-list a{display:flex;justify-content:space-between;gap:8px;padding:2px 4px;margin:0 -4px;border-radius:6px;text-decoration:none;color:var(--ink);font-size:.9rem}
.stat .type-list a:hover{background:var(--hover)}
.stat .type-list a.zero{color:var(--muted)}
.stat .type-list strong{font-variant-numeric:tabular-nums}

/* Announcement tags */
.tags-inline{display:inline-flex;flex-wrap:wrap;gap:4px;vertical-align:middle}
.tags-inline:empty{display:none}
fieldset.tag-picker{border:0;margin:0;padding:0;display:grid;gap:6px}
fieldset.tag-picker legend{font-weight:600;font-size:.9rem;padding:0;margin-bottom:6px}
.tag-picker .opts{display:flex;flex-wrap:wrap;gap:8px 18px}
.tag-picker label{font-weight:400;display:flex;gap:6px;align-items:center}
.tag-picker input{width:20px;height:20px}
.tag-picker label{min-height:32px;cursor:pointer}

/* Announcements: the posting form is a folded bar pinned under the header */
details.compose{position:sticky;top:calc(var(--header-h) + 8px);z-index:5;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);box-shadow:0 6px 18px rgba(0,0,0,.06)}
details.compose > summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;padding:14px 20px;font-weight:700;font-size:1.05rem}
details.compose > summary::-webkit-details-marker{display:none}
details.compose > summary::before{content:"+";display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;
  background:var(--brand);color:var(--brand-ink);font-weight:700;line-height:1}
details.compose[open] > summary::before{content:"–"}
details.compose > summary:hover .compose-title{text-decoration:underline}
details.compose > form{padding:0 20px 20px;max-height:calc(100vh - var(--header-h) - 110px);overflow:auto}

/* QuickBooks test output */
.qbo-out{margin:12px 0 0;max-height:320px;overflow:auto;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:10px;font-size:.8rem;white-space:pre-wrap;overflow-wrap:anywhere}
.qbo-links select{min-width:240px;max-width:100%}
.qbo-links tr.changed td,.qbo-links tr.changed th{background:var(--bg)}
.qbo-links .suggest{display:block;margin-top:6px;white-space:normal;text-align:left}
/* QuickBooks warnings (Board overview and QuickBooks page) */
.qbo-alert{border:1px solid var(--danger);border-left-width:4px;border-radius:10px;padding:10px 14px;margin:0 0 16px;background:var(--surface)}
.qbo-alert strong{color:var(--danger)}
.qbo-alert ul{margin:6px 0;padding-left:18px}
.qbo-updated{margin:-4px 0 12px}

/* Phones: rows with Edit/Delete buttons put the buttons on their own line instead of squeezing the text */
@media (max-width:600px){.doc:has(.row-actions){flex-direction:column;align-items:stretch;gap:8px}.doc .row-actions{flex-wrap:wrap}}


/* Phones: tables become one card per row, each value labelled with its column (labels come from portal.js) */
@media (max-width:640px){
  .table-wrap:has(table.stack){overflow:visible;border:0;background:transparent}
  table.stack{min-width:0;font-size:.95rem}
  table.stack thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  table.stack,table.stack tbody,table.stack tr,table.stack td,table.stack tbody th{display:block;width:auto}
  table.stack tbody tr{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:10px 14px;margin:0 0 10px}
  table.stack tbody tr.stack-full{background:transparent;border:0;padding:6px 2px 2px;margin:4px 0 6px}
  table.stack tbody tr.stack-full th{padding:0;border:0;background:transparent}
  table.stack td,table.stack tbody th{border:0;padding:3px 0;text-align:left}
  table.stack td[data-label],table.stack tbody th[data-label]{display:flex;justify-content:space-between;gap:16px;align-items:baseline}
  table.stack td[data-label]::before,table.stack tbody th[data-label]::before{content:attr(data-label);flex:none;
    font-size:.78rem;font-weight:700;font-style:normal;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
  /* Text columns (descriptions, names, emails): the label sits above the value so longer text has room */
  table.stack td[data-label]:not(.num):not(.nowrap){display:block;text-align:left}
  table.stack td[data-label]:not(.num):not(.nowrap)::before{display:block;margin-bottom:1px}
  table.stack td[data-label] > *,table.stack td[data-label]{overflow-wrap:anywhere}
  table.stack td[data-label]{text-align:right}
  /* The first cell of a row is its title: shown bold, without a label */
  table.stack tbody tr > :first-child{display:block;font-weight:700;font-size:1rem;padding-bottom:6px;text-align:left}
  table.stack tbody tr > :first-child::before{content:none}
  table.stack td:not([data-label]){padding-top:8px}
  table.stack .nowrap,table.stack .num{white-space:normal}
  table.stack td:empty{display:none !important}
}

/* Neighbor post events: the date stands out */
.event-when{font-weight:600;color:var(--brand);margin:2px 0 0}

/* ---- Portal shell: sidebar on wide screens, header + menu below 960px, bottom tabs on phones ---- */
.portal-shell{display:flex;min-height:100vh}
.portal-main{flex:1;min-width:0}
.portal-side{display:none}
@media (min-width:961px){
  body.has-side .portal-side{display:flex;flex-direction:column;width:252px;flex:none;position:sticky;top:0;height:100vh;
    overflow-y:auto;background:var(--surface);border-right:1px solid var(--line);padding:24px 16px}
  body.has-side .site-header,body.has-side .menu-backdrop{display:none}
  body.has-side main.wrap{max-width:1180px;margin:0;padding:40px 48px 64px}
  body.has-side [id]{scroll-margin-top:24px}
}
.side-logo{display:block;padding:0 10px 22px;text-decoration:none;color:var(--ink)}
.side-logo .display{display:block;font-size:1.25rem;font-weight:600;line-height:1.15}
.side-logo small{display:block;font-size:.8rem;color:var(--muted);margin-top:2px}
.side-nav{display:flex;flex-direction:column;gap:2px}
.side-link{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;border-radius:8px;
  font-size:.95rem;color:var(--menu-link);text-decoration:none}
.side-link:hover{background:var(--hover)}
.side-link[aria-current="page"]{background:var(--brand-tint);color:var(--brand-deep);font-weight:600}
.side-link.board[aria-current="page"]{background:var(--board-tint);color:var(--board-deep)}
.side-label{margin:0;padding:18px 12px 6px;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--board)}
.nav-badge{display:inline-block;min-width:22px;text-align:center;background:#fde7c7;color:#6b3d00;font-size:.75rem;font-weight:700;
  border-radius:99px;padding:0 8px;line-height:1.6;margin-left:auto}
.side-me{margin-top:auto;padding:14px 10px 0;border-top:1px solid var(--line);display:flex;align-items:center;gap:10px}
.side-me .avatar{width:36px;height:36px;border-radius:50%;flex:none;display:grid;place-items:center;background:var(--brand);
  color:var(--brand-ink);font-size:.8rem;font-weight:700}
.side-me .avatar.board{color:#fff}
.side-me .avatar.board{background:var(--board)}
.side-name{font-weight:600;font-size:.92rem;line-height:1.3}
.side-sub{font-size:.8rem;color:var(--muted)}
.side-signout{background:none;border:0;padding:4px 0;font:inherit;color:var(--muted);cursor:pointer;text-decoration:underline}
.side-signout:hover{color:var(--danger)}

.tabbar{display:none}
@media (max-width:560px){
  body.has-tabs .tabbar{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:0;z-index:30;
    background:var(--surface);border-top:1px solid var(--line);padding:6px 8px calc(6px + env(safe-area-inset-bottom))}
  body.has-tabs main.wrap{padding-bottom:96px}
  .tab{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px;
    background:none;border:0;font:inherit;font-size:.75rem;font-weight:600;color:var(--muted);text-decoration:none;cursor:pointer}
  .tab[aria-current="page"]{color:var(--brand)}
  .tab[aria-current="page"]::before{content:"";position:absolute;top:0;width:22px;height:4px;border-radius:2px;background:var(--brand)}
  .tab .nav-badge{position:absolute;top:2px;right:calc(50% - 34px);margin:0;font-size:.68rem;min-width:18px;padding:0 5px}
}
.site-menu a .nav-badge{margin-left:8px}

/* ---- Owner home ---- */
.home-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 24px}
.home-head h1{margin:0}
.home-sub{margin:4px 0 0}
.home-row{display:grid;gap:20px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));margin:0 0 20px}
.home-row-1{grid-template-columns:1.2fr 1fr}
@media (max-width:860px){.home-row-1{grid-template-columns:1fr}}
.home-row .card,.home-row-1 .card{border-radius:14px;padding:26px 28px;margin:0}
#boardGlance{margin:0 0 20px;border-radius:14px}
.card-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 6px}
.card-top h2{margin:0}
h2.eyebrow{font-size:.8rem}
.card-top-link{font-size:.9rem;font-weight:700;text-decoration:none;padding:4px 0}
.card-top-link:hover{text-decoration:underline;color:var(--brand-deep)}
.list-card h2{font-size:1.125rem;font-weight:700}
.dues-big{display:flex;align-items:center;flex-wrap:wrap;gap:6px 16px;margin:14px 0 18px}
.dues-amount{font-size:3.25rem;font-weight:400;line-height:1}
.dues-foot{display:flex;flex-wrap:wrap;gap:12px 32px;padding-top:14px;border-top:1px solid var(--line)}
.dues-foot .meta{font-size:.82rem}
.dues-foot-value{font-weight:700;font-size:.95rem}
.dues-lot-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.dues-lot-row:first-of-type{border-top:0}
.dues-lot-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.dues-lot-amount{font-weight:700;font-size:1.1rem}
.meeting-card{background:var(--brand);border-color:var(--brand);color:#fff}
@media (prefers-color-scheme: dark){.meeting-card{background:#24453c;border-color:#2f5a4e}}
.meeting-card .eyebrow{color:rgba(255,255,255,.82);margin:0}
.meeting-title{font-size:1.875rem;line-height:1.2;margin:10px 0 6px;color:#fff}
.meeting-meta{margin:0 0 16px;color:rgba(255,255,255,.9)}
.meeting-empty{margin:12px 0 0;color:rgba(255,255,255,.9)}
.meeting-actions{display:flex;flex-wrap:wrap;gap:10px}
.list-row{padding:14px 0;border-top:1px solid var(--line)}
.list-card .card-top + div .list-row:first-child{border-top-color:var(--line)}
.list-row-split{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.list-row-title{display:block;font-weight:600;color:var(--ink);text-decoration:none;margin:4px 0 2px}
.list-row-title:hover{text-decoration:underline}
.list-row-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.list-row .meta{font-size:.82rem;color:var(--muted)}
.list-note{margin:8px 0}
.list-card .btn{margin-top:14px}

/* ---- Dues & payments ---- */
.dues-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}
@media (max-width:1100px){.dues-layout{grid-template-columns:1fr}}
.dues-lot{margin:0 0 28px}
.dues-lot-title{font-size:1.125rem;margin:0 0 12px}
.dues-stats{margin:0 0 20px;grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:640px){.dues-stats{grid-template-columns:1fr 1fr}.dues-stats .stat:last-child{grid-column:1 / -1}.dues-stats .stat .value{font-size:1.5rem}}
.dues-stats .stat{padding:16px 18px}
.dues-stats .stat .label{font-size:.75rem;font-weight:700;letter-spacing:.06em}
.dues-stats .stat .value{font-size:1.85rem}
.ledger-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.ledger-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;padding:18px 22px;border-bottom:1px solid var(--line)}
.ledger-head h2,.ledger-head h3{margin:0;font-size:1.06rem;font-weight:700;text-transform:none;letter-spacing:0;color:var(--ink)}
.ledger-head .qbo-updated{font-size:.82rem;color:var(--muted)}
.ledger-card .table-wrap{border:0;border-radius:0}
@media (min-width:641px){
  .ledger-card .ledger{min-width:560px;font-size:.95rem}
  .ledger-card .ledger th,.ledger-card .ledger td{padding:14px 22px}
  .ledger-card .ledger td.num,.ledger-card .ledger th.num{text-align:right;font-variant-numeric:tabular-nums;width:100px}
  .ledger-card .ledger td.nowrap{width:120px}
  .ledger-card .ledger th{font-size:.75rem;font-weight:700;letter-spacing:.06em}
  .ledger-card .ledger tbody tr:last-child td{border-bottom:0}
}
.ledger-empty{padding:18px 22px;margin:0}
.dues-hint{margin:10px 0 0}
.how-to-pay{background:var(--sand);color:var(--ink);border-radius:14px;padding:24px;margin-top:94px}
@media (max-width:1100px){.how-to-pay{margin-top:0}}
.how-to-pay h2{font-size:1.5rem;margin:0 0 10px;font-weight:500}
.how-to-pay p{margin:0 0 12px;line-height:1.55}
.how-to-pay .small-text{color:var(--muted);margin:0}
.memo-box{background:var(--surface);border-radius:10px;padding:12px 14px;margin:0 0 14px}
.memo-box .eyebrow{font-size:.75rem}
.memo-value{font-size:1.125rem;font-weight:700;font-variant-numeric:tabular-nums}
@media (max-width:640px){.ledger-card{border:0;background:transparent;overflow:visible}.ledger-head{padding:0 0 10px;border:0}}

/* ---- Requests: list + conversation (wide), list then window (narrower) ---- */
.req-layout{display:block}
.req-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.req-list-head h1{font-size:2rem;margin:0}
.req-intro{font-size:.92rem;margin:4px 0 14px}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.chip{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:99px;padding:5px 14px;font:inherit;
  font-size:.82rem;font-weight:600;cursor:pointer}
.chip[aria-pressed="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.req-list{border-top:1px solid var(--line)}
.req-row{display:block;width:100%;padding:16px 4px;border:0;border-bottom:1px solid var(--line);background:none;text-align:left;cursor:pointer;font:inherit;color:inherit}
.req-row-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.req-row .req-subject{font-weight:600;color:var(--ink)}
.req-row:hover .req-subject{text-decoration:underline}
.req-row .meta{display:block;font-size:.82rem;color:var(--muted);margin-top:3px}
.req-row[aria-current="true"]{background:var(--surface);box-shadow:inset 3px 0 0 var(--brand)}
.req-empty{padding:16px 4px}
.req-detail-col{display:none}
@media (min-width:1101px){
  .req-layout{display:grid;grid-template-columns:360px minmax(0,1fr);gap:0;background:var(--surface);border:1px solid var(--line);
    border-radius:14px;overflow:hidden;min-height:calc(100vh - 120px)}
  .req-list-col{background:var(--bg);border-right:1px solid var(--line);padding:26px 0 0}
  .req-list-head,.req-intro,.chips{padding:0 24px}
  .req-row{padding:16px 24px}
  .req-detail-col{display:flex;flex-direction:column;min-width:0}
  .req-detail-col .new-req{padding:28px 36px}
}
.req-placeholder{padding:40px 36px}
.req-detail{display:flex;flex-direction:column;min-height:100%}
.req-detail-head{background:var(--surface);border-bottom:1px solid var(--line);padding:28px 36px 20px}
.req-detail-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.req-detail-meta .meta{font-size:.85rem;color:var(--muted)}
.req-detail-title{font-size:1.75rem;line-height:1.2;margin:8px 0 18px}
.req-track{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
.req-track li{border-top:3px solid var(--line);padding-top:8px;font-size:.82rem;font-weight:700;color:var(--muted)}
.req-track li.done{border-top-color:var(--brand);color:var(--brand)}
.req-thread{padding:24px 36px;display:flex;flex-direction:column;gap:14px;flex:1;background:var(--bg)}
.msg-item{border-radius:12px;padding:14px 18px;background:var(--surface);border:1px solid var(--line)}
.msg-item.board{background:var(--brand-tint);border-color:transparent;border-left:0}
.msg-item.status{background:transparent;border:1px dashed var(--line-strong);font-size:.9rem;color:var(--muted);padding:10px 16px}
.msg-item.status .msg-body{color:var(--ink);margin:6px 0 0}
.msg-item .who{font-size:.82rem;color:var(--muted);margin-bottom:4px}
.msg-item .who strong{color:var(--ink)}
.msg-body{white-space:pre-line;margin:0;overflow-wrap:anywhere}
.file-chip{display:inline-block;border:1px solid var(--line);border-radius:8px;padding:4px 10px;font-size:.82rem;font-weight:600;text-decoration:none;background:var(--surface)}
.files{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.req-composer{background:var(--surface);border-top:1px solid var(--line);padding:18px 36px 24px;display:grid;gap:10px}
.req-composer textarea{background:var(--bg);min-height:64px}
.composer-row{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
.composer-left{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px}
.composer-right{display:flex;align-items:center;gap:16px;margin-left:auto}
.attach-link{font-weight:700;color:var(--brand);cursor:pointer;font-size:.92rem}
.attach-link:hover{text-decoration:underline}
.attach-names{font-size:.82rem;color:var(--muted)}
.req-closed{padding:16px 36px;margin:0}
.req-status-form{margin:16px 36px 24px}
.req-status-form h3{margin:0 0 8px}
.req-dialog .dlg-body{padding:0;display:block}
.req-dialog .req-detail-head,.req-dialog .req-thread,.req-dialog .req-composer{padding-left:20px;padding-right:20px}
.req-dialog .req-status-form{margin:16px 20px 20px}
@media (max-width:560px){.req-detail-title{font-size:1.4rem}}

/* New request form (full page on phones, in the detail column on wide screens) */
.new-req{display:grid;gap:14px;max-width:720px}
.new-req-bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center}
.new-req-bar h2{margin:0;font-size:1.05rem;font-weight:700}
.link-btn{background:none;border:0;padding:0;font:inherit;font-weight:600;color:var(--brand);cursor:pointer;justify-self:start}
.type-picker{border:0;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.type-picker legend{font-size:1.06rem;font-weight:700;padding:0;margin:0 0 10px}
.type-card{display:flex;flex-direction:column;gap:4px;min-height:88px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer}
.type-card strong{font-weight:600;line-height:1.25;color:var(--ink)}
.type-card{font-weight:400}
.type-card span{font-size:.78rem;font-weight:400;color:var(--muted);line-height:1.35}
.type-card.selected{background:var(--brand-tint);border:2px solid var(--brand);padding:13px}
.type-card:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:2px}
.type-hint{background:var(--sand);color:var(--sand-ink);border-radius:12px;padding:12px 14px;font-size:.82rem;line-height:1.5;margin:0}
.dropzone{border:1.5px dashed var(--line-strong);border-radius:12px;padding:16px;text-align:center;display:grid;gap:4px}
.dropzone label{font-weight:700;color:var(--brand);cursor:pointer}
.dropzone:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:2px}
.dropzone .meta{font-size:.8rem;color:var(--muted)}
.btn.block{width:100%}
@media (max-width:1100px){.new-req{margin:0 auto}}

/* ---- Documents ---- */
.doc-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;margin:0 0 16px}
.doc-toolbar input[type=search]{max-width:420px;flex:1 1 260px;border-radius:10px}
.doc-toolbar .chips{margin:0}
.doc-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:6px 24px}
.doc-card .table-wrap{border:0;border-radius:0;background:transparent}
.doc-table{min-width:0}
.doc-table th,.doc-table td{padding:14px 0;vertical-align:middle}
.doc-table thead th{padding-top:12px}
.doc-table td,.doc-table tbody th{padding-right:12px}
.doc-table tbody tr:last-child > *{border-bottom:0}
.doc-name{font-weight:700;color:var(--ink);text-decoration:none}
.doc-name:hover{text-decoration:underline}
.doc-table .meta{font-size:.8rem;color:var(--muted);font-weight:400;margin-top:2px}
.doc-cat,.doc-date{color:var(--menu-link);font-size:.92rem}
.doc-cat{width:140px}.doc-date{width:120px}
.doc-actions{text-align:right;white-space:nowrap;width:1%}
.doc-actions .btn{margin-left:6px}
.doc-open-link{font-weight:700;text-decoration:none;font-size:.92rem}
.doc-open-link:hover{text-decoration:underline}
.doc-empty{padding:16px 0}
.doc-archive{margin:16px 0 0}
.doc-archive > summary{font-weight:700;color:var(--brand);cursor:pointer;padding:6px 0}
.doc-archive .doc-card{margin-top:10px}
.doc-public-note{margin:16px 0 0}
#docCount:empty{display:none}
@media (max-width:640px){.doc-card{padding:0;border:0;background:transparent}.doc-actions{text-align:left}.doc-actions .btn{margin:0 6px 0 0}}

/* ---- Board overview ---- */
.head-actions{display:flex;flex-wrap:wrap;gap:10px}
.board-stats{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin:0 0 20px}
.board-stats .stat{padding:16px 18px}
.board-stats .stat .label{font-size:.75rem;font-weight:700;letter-spacing:.06em}
.board-stats .stat .value{font-size:1.85rem}
.board-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:20px;align-items:start;margin:0 0 20px}
@media (max-width:1000px){.board-grid{grid-template-columns:1fr}}
.board-grid .card{border-radius:14px;padding:24px;margin:0}
.board-grid h2{font-size:1.125rem;margin:0 0 6px}
.board-side{display:grid;gap:20px}
.need-row{display:grid;grid-template-columns:1fr 70px 96px;gap:12px;align-items:center;padding:14px 0;border-top:1px solid var(--line);
  color:inherit;text-decoration:none}
.need-row:hover .need-subject{text-decoration:underline}
.need-subject{font-weight:600}
.need-row .meta{font-size:.82rem;color:var(--muted)}
.need-age{font-size:.85rem;color:var(--muted)}
.need-row .st{justify-self:end}
@media (max-width:560px){.need-row{grid-template-columns:1fr auto}.need-age{display:none}}
.qbo-line{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.qbo-line h2{margin:0}
.qbo-line h2 a{color:inherit;text-decoration:none}
.qbo-line h2 a:hover{text-decoration:underline}
.qbo-line p{margin:2px 0 0;font-size:.85rem}
.dot{width:10px;height:10px;border-radius:50%;flex:none;margin-top:8px;background:var(--line-strong)}
.dot.ok{background:var(--ok)} .dot.bad{background:var(--danger)}
.board-exports{border-radius:14px}
#qboEnv:empty{display:none}

/* ---- Phones (560px and under) ---- */
button.who{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer;display:flex;align-items:center;gap:8px}
.mobile-new-req{display:none}
@media (max-width:560px){
  body.has-tabs .site-header .burger{display:none}
  body.has-tabs .site-header .initials{width:36px;height:36px}
  .portal-page .site-header .logo{font-family:var(--font-display);font-size:1.19rem;font-weight:600}
  .home-head{margin:0 0 16px}
  .home-head .btn{display:none}
  .home-sub{font-size:.9rem}
  .home-row,.home-row-1{gap:14px;margin:0 0 14px}
  .home-row .card,.home-row-1 .card{border-radius:16px;padding:18px}
  .dues-big{margin:8px 0 12px}
  .dues-amount{font-size:2.25rem}
  .dues-foot{gap:8px 20px;padding-top:10px}
  .meeting-title{font-size:1.25rem;font-family:var(--font);font-weight:700;margin:6px 0 4px}
  .meeting-meta{font-size:.9rem;margin:0 0 12px}
  .mobile-new-req{display:flex;border-radius:12px;padding:15px;margin:0 0 14px}
}

@media (prefers-color-scheme: dark){.side-label{color:#c9a3d9}}
.req-composer:has(input[type=file]:focus-visible) .attach-link{outline:3px solid var(--accent);outline-offset:2px;border-radius:4px}
.req-detail-title:focus{outline:none}
.req-detail-title:focus-visible{outline:3px solid var(--accent);outline-offset:4px}

/* About my home (owner home page) */
.home-about{border-radius:14px;padding:26px 28px;margin:0 0 20px}
.about-lot{padding:14px 0;border-bottom:1px solid var(--line)}
.about-lot:first-child{padding-top:4px}
.about-lot:last-child{border-bottom:0}
.about-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px 24px;margin:14px 0}
.about-facts dt{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:700}
.about-facts dd{margin:2px 0 0;font-size:1.15rem;font-weight:600}
.about-facts dd.meta{font-size:.82rem;font-weight:400;color:var(--muted)}
.about-tax{width:auto;min-width:min(100%,420px);margin:4px 0 6px;font-size:.9rem;border:1px solid var(--line);border-radius:10px;border-collapse:separate;border-spacing:0;overflow:hidden}
.about-tax .about-tax-cap{caption-side:top;text-align:left;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:700;padding:0 0 6px}
.about-tax th,.about-tax td{padding:7px 12px;position:static}
.about-tax tr:last-child td{border-bottom:0}
.about-tax .num{text-align:right;white-space:nowrap}
@media (max-width:560px){.about-tax{width:100%;font-size:.84rem}.about-tax th,.about-tax td{padding:6px 8px}}
.about-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.about-note{margin:14px 0 0}
@media (max-width:560px){.home-about{border-radius:16px;padding:18px;margin:0 0 14px}}

.meeting-card .meeting-agenda{display:inline-block;margin:0 0 14px;font-weight:600;color:inherit;text-decoration:underline;text-underline-offset:3px}
.dues-soon{font-size:1.6rem;margin:4px 0 6px}
.dues-soon-note{margin:0}
.dues-soon-card{padding:22px 24px}
.dues-soon-card h2{margin:0 0 6px}
.dues-soon-card p{margin:0 0 6px}
