/* Members' app — layout on top of brand.css */
.app-body { background: var(--sand); }

.app-header { position: sticky; top: 0; z-index: 30; background: var(--green-dk); color: var(--ondark); border-bottom: 1px solid var(--gold); }
.app-header-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 66px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ondark); font-family: var(--serif); font-weight: 600; font-size: .92rem; letter-spacing: .14em; text-transform: uppercase; }
.brand:hover { text-decoration: none; color: var(--gold-lt); }
.brand span { white-space: nowrap; }
@media (max-width: 760px){ .brand span { display: none; } }

.app-nav { display: flex; gap: 4px; margin-left: 8px; }
.app-nav a { color: var(--ondark); font-weight: 500; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; padding: .5rem .85rem; border-radius: 2px; }
.app-nav a:hover { color: var(--gold-lt); text-decoration: none; background: rgba(255,255,255,.06); }
.app-nav a.active { color: var(--green-dk); background: var(--gold); }

.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--ondark-mut); }
.who .avatar { width: 32px; height: 32px; border-radius: 2px; background: var(--gold); color: var(--green-dk); display: grid; place-items: center; font-weight: 600; font-size: .78rem; }
.who-btn { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; color: var(--ondark-mut); font: inherit; font-size: .82rem; padding: 4px 8px 4px 4px; border-radius: 999px; cursor: pointer; }
.who-btn:hover { background: rgba(255,255,255,.08); color: var(--ondark); }
@media (max-width: 520px){ .who .name { display:none; } }

.app-main { padding: 28px 24px 80px; }
.loading { color: var(--slate); padding: 40px 0; }

/* Page heading */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.9rem; margin: 0; }
.page-head p { margin: .3rem 0 0; }

/* Two-column layout */
.cols { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
@media (max-width: 920px){ .cols { grid-template-columns: 1fr; } }
.side .card { padding: 18px; margin-bottom: 18px; }
.side h3 { font-size: 1rem; }

/* Composer */
.composer { padding: 16px; margin-bottom: 22px; }
.composer textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; font: inherit; resize: vertical; min-height: 70px; background: var(--sand); }
.composer textarea:focus { outline: 2px solid var(--teal); border-color: transparent; background: #fff; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.composer select { padding: .5rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff; }

/* Post card */
.post { padding: 18px; margin-bottom: 16px; }
.post-top { display: flex; gap: 12px; align-items: flex-start; }
.avatar-lg { width: 42px; height: 42px; border-radius: 3px; background: var(--teal); color: var(--cream); display: grid; place-items: center; font-weight: 600; flex: none; }
.avatar-lg.admin { background: var(--gold); color: var(--green-dk); }
.post-meta { line-height: 1.25; }
.post-meta .nm { font-weight: 600; }
.post-meta .sub { font-size: .82rem; color: var(--slate); }
.post-body { margin: 12px 0 10px; white-space: pre-wrap; }
.post-where { display:inline-block; margin-bottom: 6px; }
.actions { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.actbtn { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 1px solid transparent; color: var(--slate); font: inherit; font-size: .85rem; font-weight: 600; padding: .35rem .7rem; border-radius: 999px; cursor: pointer; }
.actbtn:hover { background: var(--sand-2); }
.actbtn.on { color: var(--teal-dk); background: #DCEBEE; }

/* Comments */
.comments { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); display: none; }
.comments.open { display: block; }
.comment { display: flex; gap: 10px; margin-bottom: 10px; }
.comment .avatar-sm { width: 30px; height: 30px; border-radius: 3px; background: var(--cream-2); color: var(--ink); display: grid; place-items: center; font-weight: 600; font-size: .72rem; flex: none; }
.comment .c-body { background: var(--sand); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; flex: 1; }
.comment .c-body .nm { font-weight: 600; font-size: .85rem; }
.comment .c-body .tx { white-space: pre-wrap; }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: .5rem .9rem; font: inherit; }
.comment-form input:focus { outline: 2px solid var(--teal); border-color: transparent; }

/* Initiatives */
.horizon-group { margin-bottom: 34px; }
.horizon-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.horizon-head h2 { margin: 0; font-size: 1.35rem; }
.ini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px){ .ini-grid { grid-template-columns: 1fr; } }
.ini-card { padding: 18px; display: flex; flex-direction: column; cursor: pointer; transition: box-shadow .15s, transform .08s; }
.ini-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ini-card h3 { margin: 10px 0 6px; font-size: 1.12rem; }
.ini-card .summary { color: var(--slate); font-size: .92rem; flex: 1; }
.ini-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-size: .82rem; color: var(--slate); }
.status-pill { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .2rem .55rem; border-radius: 999px; }
.s-proposed { background: var(--sand-2); color: var(--slate); }
.s-active { background: #DCEBEE; color: var(--teal-dk); }
.s-progressing { background: #FBEFD8; color: #8A6418; }
.s-parked { background: #EEE; color: #888; }
.s-delivered { background: #DCEFE2; color: var(--good); }

/* Detail */
.back-link { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: 14px; font-weight: 600; }
.detail-head { padding: 22px; margin-bottom: 22px; }
.detail-head h1 { margin: 10px 0 8px; }
.detail-meta { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; color: var(--slate); font-size: .9rem; margin-top: 8px; }

/* Members */
.member-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px){ .member-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .member-grid { grid-template-columns: 1fr; } }
.member-card { padding: 18px; }
.member-card .top { display: flex; gap: 12px; align-items: center; }
.member-card h3 { margin: 0; font-size: 1.05rem; }
.member-card .role { color: var(--slate); font-size: .85rem; }
.member-card .exp { margin-top: 10px; }
.member-card .bio { color: var(--slate); font-size: .88rem; margin-top: 10px; }
.founder-badge { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-dk); }
.member-card.is-me { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.you-badge { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cream); background: var(--teal); padding: .12rem .4rem; border-radius: 999px; vertical-align: middle; }

/* Papers */
.paper-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.paper-row .ic { width: 40px; height: 40px; border-radius: 9px; background: var(--sand-2); display: grid; place-items: center; flex: none; }
.paper-row .pmeta { flex: 1; }
.paper-row .pmeta .t { font-weight: 600; }
.paper-row .pmeta .s { font-size: .8rem; color: var(--slate); }
.upload-box { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; background: #fff; }
.upload-box input[type=file] { display: block; margin: 10px auto; }

/* Empty state */
.empty { text-align: center; padding: 50px 20px; color: var(--slate); }
.empty svg { opacity: .5; margin-bottom: 10px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(14,42,59,.5); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal-backdrop[hidden]{ display: none; }
.modal { max-width: 520px; width: 100%; padding: 26px; position: relative; max-height: 88vh; overflow: auto; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--slate); cursor: pointer; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .7rem; font: inherit; }
.field textarea { min-height: 80px; resize: vertical; }

/* Toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--sand); padding: .7rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow); z-index: 60; font-size: .9rem; }
.toast[hidden]{ display: none; }
.toast.err { background: var(--warn); }

/* Up/down voting */
.votes { display: inline-flex; align-items: center; gap: 2px; }
.votebtn { background: none; border: 1px solid transparent; color: var(--slate); font: inherit; font-size: .82rem; line-height: 1; width: 26px; height: 24px; border-radius: 4px; cursor: pointer; display: grid; place-items: center; transition: background .12s, color .12s; }
.votebtn:hover { background: var(--cream-2); }
.votebtn.up.on { color: var(--good); background: #DCEFE2; }
.votebtn.down.on { color: var(--warn); background: #F6E5DA; }
.votes .score { min-width: 26px; text-align: center; font-weight: 600; font-size: .82rem; color: var(--slate); }
.votes .score.pos { color: var(--good); }
.votes .score.neg { color: var(--warn); }
.c-votes { margin-top: 8px; }
.detail-meta .votes { border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
