/* ThirdHome — single stylesheet. Palette: Slack-inspired (aubergine primary). Font: Manrope, self-hosted. */

/* ---------- Font ---------- */
@font-face{font-family:"Manrope";font-style:normal;font-weight:400 800;font-display:swap;src:url(../fonts/manrope-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Manrope";font-style:normal;font-weight:400 800;font-display:swap;src:url(../fonts/manrope-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}

/* ---------- Tokens ---------- */
:root{
  --aub:#4A154B; --aub-700:#3F0E40; --aub-800:#350D36; --aub-600:#611F69; --aub-50:#F4EDF4; --aub-100:#E8D8E8;
  --blue:#36C5F0; --green:#2EB67D; --yellow:#ECB22E; --red:#E01E5A; --link:#1264A3;
  --blue-50:#E8F5FA; --green-50:#E3F4EC; --yellow-50:#FDF4DE; --red-50:#FCE8EF;
  --ink:#1D1C1D; --ink-2:#454245; --muted:#616061; --line:#DDDDDD; --line-2:#EBEAEB; --bg:#FFFFFF; --bg-soft:#F8F8F8;
  --radius:8px; --radius-lg:12px; --shadow:0 1px 3px rgba(29,28,29,.08),0 4px 12px rgba(29,28,29,.06);
  --header-h:72px; --max:1200px;
  --font:"Manrope",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}

/* ---------- Base ---------- */
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font);font-size:16px;line-height:1.55;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
img,svg{display:block;max-width:100%}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{line-height:1.2;margin:0 0 .5em;letter-spacing:-.01em}
h1{font-size:clamp(1.75rem,2.5vw,2.25rem);font-weight:800}
h2{font-size:1.5rem;font-weight:800}
h3{font-size:1.125rem;font-weight:700}
p{margin:0 0 1em}
button,input,select,textarea{font:inherit;color:inherit}
.i{width:20px;height:20px;flex:none}
.i-sm{width:16px;height:16px}
.i-lg{width:24px;height:24px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.container{max-width:var(--max);margin:0 auto;padding:0 24px}
.muted{color:var(--muted)}
.small{font-size:.875rem}
.tiny{font-size:.75rem}
.stack>*+*{margin-top:16px}
.row{display:flex;align-items:center;gap:12px}
.row.wrap{flex-wrap:wrap}
.spacer{flex:1}
.grid{display:grid;gap:20px}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px;border-radius:4px}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:var(--radius);border:1px solid transparent;font-weight:700;font-size:.9375rem;cursor:pointer;text-decoration:none!important;white-space:nowrap;transition:background .15s,border-color .15s}
.btn-primary{background:var(--aub);color:#fff}
.btn-primary:hover{background:var(--aub-600)}
.btn-ghost{background:#fff;border-color:#BBB;color:var(--ink)}
.btn-ghost:hover{background:var(--bg-soft);border-color:#999}
.btn-subtle{background:transparent;color:var(--ink-2)}
.btn-subtle:hover{background:var(--bg-soft)}
.btn-green{background:#007A5A;color:#fff}
.btn-green:hover{background:#148567}
.btn-danger{background:#fff;border-color:var(--red);color:#B0154A}
.btn-danger:hover{background:var(--red-50)}
.btn-sm{height:32px;padding:0 12px;font-size:.875rem}
.btn-lg{height:48px;padding:0 22px;font-size:1rem}
.btn-icon{width:36px;height:36px;padding:0}
.btn-google{background:#fff;border:1px solid #BBB;color:var(--ink);height:48px;padding:0 20px}
.btn-google:hover{background:var(--bg-soft)}
.btn[disabled]{opacity:.5;cursor:not-allowed}

/* ---------- Badges, chips, avatars ---------- */
.badge{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:999px;font-size:.75rem;font-weight:700;background:var(--bg-soft);color:var(--ink-2);white-space:nowrap}
.badge-aub{background:var(--aub-50);color:var(--aub)}
.badge-blue{background:var(--blue-50);color:#0B5E7C}
.badge-green{background:var(--green-50);color:#0B6B43}
.badge-yellow{background:var(--yellow-50);color:#7A5500}
.badge-red{background:var(--red-50);color:#9E0E3D}
.chip{display:inline-flex;align-items:center;height:34px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:#fff;font-weight:600;font-size:.875rem;cursor:pointer}
.chip[aria-pressed=true]{background:var(--aub);border-color:var(--aub);color:#fff}
.avatar{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:8px;font-weight:800;font-size:.875rem;color:#fff;background:var(--aub-600);flex:none}
.avatar.sm{width:28px;height:28px;font-size:.75rem;border-radius:6px}
.avatar.lg{width:56px;height:56px;font-size:1.25rem;border-radius:12px}
.av-1{background:#611F69}.av-2{background:#1264A3}.av-3{background:#007A5A}.av-4{background:#B0154A}.av-5{background:#8A6100}.av-6{background:#3F0E40}
.avatar.masked{background:#CFCDCF;color:#fff}

/* ---------- Cards, forms ---------- */
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);padding:20px}
.card-flat{background:var(--bg-soft);border-radius:var(--radius-lg);padding:20px}
.field{display:grid;gap:6px;margin-bottom:16px}
.field label,.label{font-weight:700;font-size:.875rem}
.field .hint{font-size:.8125rem;color:var(--muted)}
.input,select.input,textarea.input{width:100%;height:42px;padding:0 12px;border:1px solid #BBB;border-radius:var(--radius);background:#fff}
textarea.input{height:auto;min-height:96px;padding:10px 12px;resize:vertical}
.input:focus{outline:none;border-color:var(--link);box-shadow:0 0 0 3px rgba(18,100,163,.2)}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.check{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px;font-size:.9375rem}
.check input{margin-top:4px;width:18px;height:18px;accent-color:var(--aub)}
fieldset{border:0;padding:0;margin:0 0 20px}
legend{font-weight:800;font-size:1rem;margin-bottom:12px;padding:0}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:50;height:var(--header-h);background:#fff;border-bottom:1px solid var(--line)}
.site-header .bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;height:100%;max-width:1440px;margin:0 auto;padding:0 24px}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink)!important;text-decoration:none!important;font-size:1.5rem;font-weight:800;letter-spacing:-.03em}
.brand svg{width:44px;height:33px}
.brand b{color:var(--aub)}
.header-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}
.user-chip{display:flex;align-items:center;gap:8px;padding:4px 10px 4px 4px;border:1px solid var(--line);border-radius:10px;font-weight:700;font-size:.875rem;background:#fff;cursor:pointer}
.role-visitor .when-auth,.role-member .when-guest,.role-core .when-guest{display:none!important}
.role-visitor .core-only,.role-member .core-only{display:none!important}
.role-core .member-note{display:none!important}

/* Left icon rail (Zillow-style): filled icon above a small label */
:root{--rail-w:80px}
.rail{position:fixed;top:var(--header-h);left:0;bottom:0;width:var(--rail-w);z-index:45;display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:12px 0;background:#fff;border-right:1px solid var(--line)}
.rail a{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px;font-size:.75rem;font-weight:700;color:var(--ink-2);text-decoration:none!important}
.rail .ri{position:relative;display:grid;place-items:center;width:44px;height:32px;border-radius:16px;transition:background .15s}
.rail .ri svg{width:26px;height:26px;color:#4A464A}
.rail .ri .lock{position:absolute;right:2px;bottom:-2px;width:14px;height:14px;padding:2px;border-radius:50%;background:#fff;color:var(--muted);display:none}
.role-visitor .rail .lock{display:block}
.rail a:hover .ri{background:var(--bg-soft)}
.rail a[aria-current=page]{color:var(--aub)}
.rail a[aria-current=page] .ri{background:var(--aub-50)}
.rail a[aria-current=page] .ri svg:first-child{color:var(--aub)}
main,.site-footer{margin-left:var(--rail-w)}
@media (max-width:760px){
  :root{--rail-w:0px}
  .site-header .bar{padding:0 12px}
  .brand{font-size:1.25rem}
  .header-actions .btn-ghost{display:none}
  .user-chip span{display:none}
  .rail{top:auto;right:0;width:auto;height:64px;flex-direction:row;justify-content:space-around;padding:4px 0 calc(4px + env(safe-area-inset-bottom));border-right:0;border-top:1px solid var(--line)}
  .rail a{flex:1;padding:4px}
  body{padding-bottom:64px}
}

/* ---------- Footer ---------- */
.site-footer{margin-top:80px;background:var(--bg-soft);border-top:1px solid var(--line);color:var(--ink-2);font-size:.875rem}
.site-footer .container{padding-top:40px;padding-bottom:0;text-align:center}
.footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 28px;margin-bottom:20px;font-weight:700}
.footer-links a{color:var(--ink)}
.footer-legal{max-width:820px;margin:0 auto 20px;color:var(--muted);font-size:.8125rem}
.social{display:flex;justify-content:center;gap:8px;margin-bottom:16px}
.social a{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;color:var(--ink-2);border:1px solid var(--line);background:#fff}
.social a:hover{color:var(--aub);border-color:var(--aub);text-decoration:none}
.copyright{display:flex;justify-content:center;align-items:center;gap:8px;margin-bottom:28px;color:var(--muted)}
.footer-art{height:84px;background:url(../img/footer.svg) center bottom/auto 84px repeat-x}

/* ---------- Home ---------- */
.hero{position:relative;min-height:520px;display:flex;align-items:center;color:#fff;background:#350D36 url(../img/hero.svg) center/cover no-repeat}
.hero .container{width:100%}
.hero h1{font-size:clamp(2.5rem,5.5vw,4.25rem);font-weight:800;letter-spacing:-.03em;line-height:1.02;max-width:760px;margin-bottom:20px}
.hero p{font-size:clamp(1.0625rem,1.6vw,1.375rem);max-width:600px;color:#F0E6F0;margin-bottom:28px}
.hero .btn-primary{background:#fff;color:var(--aub)}
.hero .btn-primary:hover{background:var(--aub-50)}
.hero .btn-ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.6)}
.hero .btn-ghost:hover{background:rgba(255,255,255,.1)}
.intro{padding:72px 0 24px;text-align:center}
.intro h2{font-size:clamp(1.5rem,2.6vw,2rem)}
.intro p{max-width:760px;margin:0 auto 16px;color:var(--ink-2);font-size:1.0625rem}
.pillars{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:40px;text-align:left}
.pillar{padding:24px;border:1px solid var(--line);border-radius:var(--radius-lg)}
.pillar .ic{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;margin-bottom:14px}
.pillar h3{margin-bottom:6px}
.pillar p{color:var(--ink-2);font-size:.9375rem;margin:0}
.activity{padding:48px 0 0}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:20px}
.section-head p{margin:0}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}
.stat{padding:20px;border-radius:var(--radius-lg);background:var(--bg-soft)}
.stat b{display:block;font-size:2rem;font-weight:800;letter-spacing:-.02em;line-height:1.1}
.stat span{color:var(--muted);font-size:.875rem;font-weight:600}
.activity-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:20px}
.feed{list-style:none;margin:0;padding:0}
.feed li{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid var(--line-2)}
.feed li:last-child{border-bottom:0}
.feed .what{font-size:.9375rem}
.feed .when{font-size:.8125rem;color:var(--muted)}
.mask{letter-spacing:.08em;color:var(--muted)}

/* ---------- Poll bars ---------- */
.poll-q{font-weight:800;margin-bottom:12px}
.bar-opt{margin-bottom:10px}
.bar-opt .lbl{display:flex;justify-content:space-between;font-size:.875rem;font-weight:600;margin-bottom:4px}
.bar-track{height:10px;border-radius:999px;background:var(--line-2);overflow:hidden}
.bar-fill{height:100%;border-radius:inherit;background:var(--aub)}
.bar-opt.lead .bar-fill{background:var(--green)}

/* ---------- App pages ---------- */
.page{padding:32px 0 0}
.page-head{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;margin-bottom:24px}
.page-head h1{margin:0}
.page-head .sub{width:100%;margin:0;color:var(--muted)}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:24px}
.tab{padding:10px 14px;font-weight:700;color:var(--muted);border:0;background:none;border-bottom:3px solid transparent;margin-bottom:-1px;cursor:pointer}
.tab[aria-selected=true]{color:var(--aub);border-color:var(--aub)}
.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:20px}
.toolbar .input{width:auto;height:36px}
.breadcrumb{display:flex;align-items:center;gap:6px;font-size:.875rem;color:var(--muted);margin-bottom:12px}
.breadcrumb .i{width:14px;height:14px}

/* Members */
.members{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.member{display:flex;gap:14px;align-items:flex-start}
.member h3{margin:0 0 2px;font-size:1rem}
.member .meta{font-size:.8125rem;color:var(--muted)}
.member .actions{display:flex;gap:6px;margin-top:10px}
table.tbl{width:100%;border-collapse:collapse;font-size:.9375rem}
.tbl th{text-align:left;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);padding:10px 12px;border-bottom:1px solid var(--line)}
.tbl td{padding:12px;border-bottom:1px solid var(--line-2);vertical-align:middle}

/* Polls */
.polls{grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}
.poll .meta{display:flex;gap:12px;flex-wrap:wrap;font-size:.8125rem;color:var(--muted);margin-bottom:14px}
.opt{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius);margin-bottom:8px;cursor:pointer;font-weight:600}
.opt:hover{border-color:var(--aub)}
.opt input{accent-color:var(--aub);width:18px;height:18px}

/* Properties */
.props{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.prop{padding:0;overflow:hidden;display:flex;flex-direction:column;color:inherit!important;text-decoration:none!important;transition:box-shadow .15s}
.prop:hover{box-shadow:var(--shadow)}
.thumb{position:relative;aspect-ratio:16/10;display:grid;place-items:center;color:rgba(255,255,255,.75)}
.thumb .i{width:40px;height:40px}
.thumb .badge{position:absolute;top:12px;left:12px}
.th-1{background:linear-gradient(135deg,#611F69,#36C5F0)}.th-2{background:linear-gradient(135deg,#007A5A,#ECB22E)}.th-3{background:linear-gradient(135deg,#1264A3,#2EB67D)}.th-4{background:linear-gradient(135deg,#B0154A,#ECB22E)}.th-5{background:linear-gradient(135deg,#3F0E40,#E01E5A)}.th-6{background:linear-gradient(135deg,#0B5E7C,#611F69)}
.prop-body{padding:16px 18px 18px}
.price{font-size:1.375rem;font-weight:800;letter-spacing:-.02em}
.facts{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:.875rem;color:var(--ink-2);margin:4px 0 8px}
.facts b{color:var(--ink)}
.loc{display:flex;align-items:center;gap:4px;font-size:.875rem;color:var(--muted)}
.rating{display:inline-flex;align-items:center;gap:4px;font-weight:800}
.rating .i{width:16px;height:16px;color:var(--yellow)}
.prop-foot{display:flex;align-items:center;gap:12px;margin-top:auto;padding:12px 18px;border-top:1px solid var(--line-2);font-size:.8125rem;color:var(--muted)}
.prop-foot .row{gap:4px}
.detail{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:28px;align-items:start}
.gallery{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr;gap:8px;border-radius:var(--radius-lg);overflow:hidden;height:380px;margin-bottom:24px}
.gallery .thumb{aspect-ratio:auto}
.gallery .thumb:first-child{grid-row:span 2}
.gallery .more{position:absolute;right:12px;bottom:12px}
.kv{display:grid;grid-template-columns:repeat(2,1fr);gap:14px 24px;margin:0}
.kv div{display:flex;gap:10px;align-items:flex-start}
.kv .i{color:var(--aub);margin-top:2px}
.kv dt{font-size:.75rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.kv dd{margin:0;font-weight:700}
.section{padding:24px 0;border-top:1px solid var(--line)}
.section h2{font-size:1.25rem}
.map-facade{position:relative;height:260px;border-radius:var(--radius-lg);overflow:hidden;background:#E8EEF2 repeating-linear-gradient(45deg,transparent 0 22px,rgba(18,100,163,.06) 22px 24px);display:grid;place-items:center}
.map-facade .pin{color:var(--red);width:44px;height:44px}
.map-facade .btn{position:absolute;bottom:14px;left:50%;transform:translateX(-50%)}
.map-facade iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.sticky{position:sticky;top:calc(var(--header-h) + 20px)}
.scale{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;margin:10px 0}
.scale button{height:38px;border:1px solid var(--line);border-radius:6px;background:#fff;font-weight:800;cursor:pointer}
.scale button:hover{border-color:var(--aub)}
.scale button[aria-pressed=true]{background:var(--aub);border-color:var(--aub);color:#fff}
.dist{display:grid;gap:4px;font-size:.75rem;color:var(--muted)}
.dist div{display:grid;grid-template-columns:18px 1fr 24px;gap:6px;align-items:center}
.locked{display:flex;gap:10px;align-items:center;padding:14px 16px;border-radius:var(--radius);background:var(--bg-soft);color:var(--muted);font-size:.875rem}
.status-track{display:flex;gap:4px;margin:6px 0 14px}
.status-track span{flex:1;height:6px;border-radius:3px;background:var(--line-2)}
.status-track span.on{background:var(--green)}

/* Comments */
.comment{display:flex;gap:12px;padding:14px 0}
.comment+.comment{border-top:1px solid var(--line-2)}
.comment .who{font-weight:800;font-size:.9375rem}
.comment .when{font-size:.75rem;color:var(--muted);margin-left:6px;font-weight:600}
.comment p{margin:4px 0 0;font-size:.9375rem}
.composer{display:flex;gap:10px;align-items:flex-end;margin-top:12px}
.composer .input{min-height:44px}

/* ---------- Chat (Slack-style) ---------- */
.chat-page .site-footer{display:none}
.chat{display:grid;grid-template-columns:260px minmax(0,1fr);height:calc(100vh - var(--header-h));height:calc(100dvh - var(--header-h))}
.channels{background:var(--aub-700);color:#CFC3CF;padding:16px 10px;overflow:auto}
.channels h2{color:#fff;font-size:1.125rem;padding:0 10px;margin-bottom:16px}
.channels .grp{font-size:.8125rem;font-weight:700;padding:8px 10px 4px;color:#B9A7B9}
.ch{display:flex;align-items:center;gap:8px;width:100%;height:32px;padding:0 10px;border:0;border-radius:6px;background:none;color:inherit;font-weight:600;font-size:.9375rem;cursor:pointer;text-align:left}
.ch .i{width:16px;height:16px;opacity:.8}
.ch:hover{background:rgba(255,255,255,.08)}
.ch[aria-current=true]{background:#1164A3;color:#fff}
.ch .unread{margin-left:auto;background:var(--red);color:#fff;border-radius:999px;font-size:.6875rem;padding:1px 7px;font-weight:800}
.ch.bold{color:#fff;font-weight:800}
.convo{display:flex;flex-direction:column;min-width:0;background:#fff}
.convo-head{display:flex;align-items:center;gap:10px;height:56px;padding:0 20px;border-bottom:1px solid var(--line)}
.convo-head h2{font-size:1.0625rem;margin:0;display:flex;align-items:center;gap:4px}
.convo-head .i{width:18px;height:18px}
.chat>*{min-height:0}
.msgs{flex:1;min-height:0;overflow:auto;padding:12px 0}
.day{display:flex;align-items:center;gap:12px;margin:12px 20px;font-size:.8125rem;font-weight:700;color:var(--ink-2)}
.day::before,.day::after{content:"";flex:1;height:1px;background:var(--line)}
.msg{position:relative;display:flex;gap:10px;padding:6px 20px}
.msg:hover{background:var(--bg-soft)}
.msg>div{flex:1;min-width:0}
.msg .who{font-weight:800;font-size:.9375rem}
.msg .time{font-size:.75rem;color:var(--muted);margin-left:6px}
.msg .edited{font-size:.75rem;color:var(--muted)}
.msg .text{font-size:.9375rem;word-wrap:break-word}
.msg.cont{padding-top:0}
.msg.cont .avatar{visibility:hidden;height:0}
.msg .atts{display:flex;gap:8px;margin-top:6px}
.msg .atts .thumb{width:180px;aspect-ratio:4/3;border-radius:8px}
.msg .tools{position:absolute;right:20px;top:-12px;display:none;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);padding:2px}
.msg:hover .tools{display:flex}
.msg .tools button{width:30px;height:30px;display:grid;place-items:center;border:0;background:none;border-radius:6px;cursor:pointer;color:var(--ink-2)}
.msg .tools button:hover{background:var(--bg-soft)}
.msg.deleted .text{font-style:italic;color:var(--muted)}
.msg-edit textarea{width:100%;min-height:60px}
.chat-composer{margin:0 20px 20px;border:1px solid #BBB;border-radius:10px}
.chat-composer textarea{display:block;width:100%;border:0;resize:none;padding:12px 14px;min-height:48px;outline:none;border-radius:10px 10px 0 0}
.chat-composer .bar{display:flex;align-items:center;gap:4px;padding:4px 6px;border-top:1px solid var(--line-2)}
.chat-composer .send{margin-left:auto;background:#007A5A;color:#fff;border:0;border-radius:6px;width:36px;height:32px;display:grid;place-items:center;cursor:pointer}
.chat-composer .send[disabled]{background:#DDD;cursor:not-allowed}
.chat-composer .tip{font-size:.75rem;color:var(--muted);padding:0 8px}
.chan-toggle{display:none}
@media (max-width:760px){
  .chat{grid-template-columns:1fr;height:calc(100dvh - var(--header-h) - 64px)}
  .chat-composer .tip{display:none}
  .msg .atts .thumb{width:calc(50% - 4px)}
  .msg .tools{display:flex;top:2px;right:10px;box-shadow:none;border:0;background:none}
  .channels{position:fixed;inset:var(--header-h) auto 0 0;width:280px;z-index:40;transform:translateX(-100%);transition:transform .2s}
  .channels.open{transform:none}
  .chan-toggle{display:inline-flex}
}

/* ---------- Auth / register ---------- */
.auth{display:grid;place-items:center;padding:64px 16px 0}
.auth .card{width:100%;max-width:440px;padding:36px;text-align:center}
.auth .brand{justify-content:center;margin-bottom:20px}
.steps{display:flex;gap:8px;list-style:none;padding:0;margin:0 0 28px;counter-reset:s}
.steps li{flex:1;font-size:.8125rem;font-weight:700;color:var(--muted);counter-increment:s}
.steps li::before{content:counter(s);display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--line-2);margin-bottom:6px;font-weight:800;color:var(--ink-2)}
.steps li::after{content:"";display:block;height:3px;border-radius:2px;background:var(--line-2);margin-top:8px}
.steps li.done::before{content:"✓";background:var(--green);color:#fff}
.steps li.done::after,.steps li.now::after{background:var(--aub)}
.steps li.now{color:var(--aub)}
.steps li.now::before{background:var(--aub);color:#fff}
.reg{max-width:720px;margin:0 auto}
.reg .step{display:none}
.reg .step.active{display:block}
.signed{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--radius);background:var(--green-50);margin-bottom:20px;font-size:.9375rem}
.signed .i{color:#007A5A}
.choice{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.choice label{display:flex;gap:8px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius);font-weight:600;font-size:.9375rem;cursor:pointer}
.choice input{accent-color:var(--aub)}
.done-box{text-align:center;padding:40px 20px}
.done-box .ic{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;margin:0 auto 16px;background:var(--green-50);color:#007A5A}
.done-box .ic .i{width:32px;height:32px}

/* ---------- Legal ---------- */
.legal{max-width:780px}
.legal h2{font-size:1.25rem;margin-top:32px}
.legal li{margin-bottom:6px}
.legal .note{padding:12px 16px;border-radius:var(--radius);background:var(--yellow-50);font-size:.875rem;margin-bottom:24px}

/* ---------- Dialog ---------- */
dialog{width:min(640px,calc(100vw - 32px));border:0;border-radius:var(--radius-lg);padding:0;box-shadow:0 20px 60px rgba(0,0,0,.25)}
dialog::backdrop{background:rgba(29,28,29,.5)}
.dlg-head{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--line)}
.dlg-head h2{margin:0;font-size:1.25rem}
.dlg-body{padding:24px;max-height:70vh;overflow:auto}
.dlg-foot{display:flex;justify-content:flex-end;gap:8px;padding:16px 24px;border-top:1px solid var(--line)}

/* ---------- Members-only gate (logged-out view of inner pages) ---------- */
.gate{display:none}
.role-visitor .gated{position:relative;max-height:520px;overflow:hidden;filter:blur(5px);pointer-events:none;user-select:none}
.role-visitor .gate{display:grid;place-items:center;position:absolute;inset:var(--header-h) 0 auto var(--rail-w);height:600px;z-index:30;padding:16px}
.gate .card{max-width:420px;text-align:center;box-shadow:var(--shadow);padding:32px}
.gate .ic{width:56px;height:56px;margin:0 auto 12px;border-radius:50%;display:grid;place-items:center;background:var(--aub-50);color:var(--aub)}

/* ---------- Prototype role switcher (remove in WordPress build) ---------- */
.proto{position:fixed;left:16px;bottom:16px;z-index:100;display:flex;align-items:center;gap:4px;padding:4px;border-radius:999px;background:var(--ink);color:#fff;font-size:.75rem;font-weight:700;box-shadow:var(--shadow)}
.proto span{padding:0 8px;opacity:.7}
.proto button{border:0;border-radius:999px;padding:6px 10px;background:none;color:#fff;cursor:pointer;font-weight:700}
.proto button[aria-pressed=true]{background:#fff;color:var(--ink)}
@media (max-width:760px){.proto{bottom:76px;left:50%;transform:translateX(-50%)}}

/* ---------- Responsive ---------- */
@media (max-width:1000px){.detail{grid-template-columns:1fr}.sticky{position:static}}
@media (max-width:860px){.pillars,.activity-grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}}
@media (max-width:600px){
  .container{padding:0 16px}
  .grid-2{grid-template-columns:1fr}
  .kv{grid-template-columns:1fr}
  .gallery{height:240px;grid-template-columns:1fr;grid-template-rows:1fr}
  .gallery .thumb:not(:first-child){display:none}
  .hero{min-height:440px}
  .scale{grid-template-columns:repeat(5,1fr)}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------- Theme additions (WordPress build) ---------- */
.header-left{min-width:1px}
.user-menu{position:relative}
.user-menu summary{list-style:none}
.user-menu summary::-webkit-details-marker{display:none}
.user-menu .menu{position:absolute;right:0;top:calc(100% + 6px);min-width:220px;background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:6px;z-index:60}
.user-menu .menu a{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:6px;color:var(--ink);font-weight:600;font-size:.9375rem;text-decoration:none}
.user-menu .menu a:hover{background:var(--bg-soft)}
.menu-who{display:grid;padding:8px 10px 10px;border-bottom:1px solid var(--line-2);margin-bottom:4px}
.menu-who span{font-size:.8125rem;color:var(--muted)}
.flash{position:fixed;top:calc(var(--header-h) + 12px);left:50%;transform:translateX(-50%);z-index:70;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 32px);padding:10px 10px 10px 16px;border-radius:10px;background:var(--ink);color:#fff;font-weight:600;font-size:.9375rem;box-shadow:var(--shadow);animation:flash-out 6s forwards}
.flash-err{background:#9E0E3D}
.flash button{border:0;background:none;color:inherit;cursor:pointer;display:grid;place-items:center;width:28px;height:28px}
@keyframes flash-out{0%,85%{opacity:1}100%{opacity:0;visibility:hidden}}
.phone-input{display:flex}
.phone-input .cc{display:grid;place-items:center;padding:0 12px;border:1px solid #BBB;border-right:0;border-radius:var(--radius) 0 0 var(--radius);background:var(--bg-soft);font-weight:700;color:var(--ink-2);user-select:none}
.phone-input .input{border-radius:0 var(--radius) var(--radius) 0}
.err{color:#B0154A}
.invalid .input,.invalid.check{border-color:var(--red)!important}
.invalid legend,.invalid>label{color:#B0154A}
.answers{display:grid;gap:12px;margin:0 0 16px}
.answers div{display:grid;gap:2px}
.answers dt{font-size:.75rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.answers dd{margin:0;font-weight:600}
.member .meta .i{display:inline;vertical-align:-3px}
.thumb{overflow:hidden}
.thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.thumb .badge{z-index:1}
.gallery .thumb{position:relative}
.gallery .more{z-index:1}
.gallery.g-0,.gallery.g-1{grid-template-columns:1fr;grid-template-rows:1fr}
.gallery.g-2{grid-template-columns:1fr 1fr;grid-template-rows:1fr}
.gallery.g-2 .thumb:first-child{grid-row:auto}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin-top:14px}
.photo-grid img{aspect-ratio:4/3;object-fit:cover;border-radius:8px;width:100%}
.msg .atts .thumb{position:relative;display:block}
.file-chip{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;font-weight:600;font-size:.875rem;color:var(--ink)}
.att-preview{padding:8px 14px 0;font-size:.8125rem;color:var(--muted)}
.load-more{display:block;margin:8px auto}
.chat-composer textarea{max-height:200px}
/* WordPress admin bar (administrator only) */
.admin-bar .site-header{top:32px}
.admin-bar .rail{top:calc(var(--header-h) + 32px)}
@media (max-width:782px){.admin-bar .site-header{top:46px}.admin-bar .rail{top:auto}}
.legal .toc{display:block;padding:12px 16px;border-radius:var(--radius);background:var(--bg-soft);font-size:.875rem;line-height:1.9;margin-bottom:8px}
.legal code{font-size:.875em;background:var(--bg-soft);padding:1px 5px;border-radius:4px}
