/* Pre-Phase-A styles. Wrapped in the "legacy" cascade layer (see tokens.css): page layout stays, shared components win. */
@layer legacy {
[hidden]{display:none!important}.menu-panel{position:absolute;right:0;top:78px;width:250px;padding:10px;background:var(--card-bg);border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 50px #0002;z-index:25}.menu-panel a,.menu-panel button{display:block;width:100%;padding:12px;text-align:left;background:transparent;color:var(--ink);border:0;border-radius:7px;font-size:14px}.menu-panel a:hover,.menu-panel button:hover{background:var(--bg-secondary)}.menu-panel small{display:block;padding:8px 12px;color:var(--muted)}.community{padding:54px 0 90px;min-height:65vh}.community h1{font-size:clamp(30px,4vw,46px);letter-spacing:-.05em}.community h2{font-size:23px;margin:0 0 20px}.community .kicker{font-size:12px;letter-spacing:.16em;color:var(--blue);font-weight:700;margin:0 0 9px}.community .subtitle{color:var(--muted);margin:12px 0 30px}.community .row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.community .spread{justify-content:space-between}.community .muted{color:var(--muted);font-size:13px}.community .panel{border:1px solid var(--line);border-radius:16px;background:var(--card-bg);padding:28px;margin-top:22px}.community .account-panel{max-width:510px;margin:28px auto}.community button,.community .btn{border:1px solid var(--line);background:var(--card-bg);color:var(--ink);border-radius:8px;padding:11px 17px;display:inline-flex;align-items:center;justify-content:center;font-weight:600;line-height:1.4;font-size:14px;min-height:44px}.community button:hover,.community .btn:hover{border-color:var(--blue)}.community button.primary,.community .btn.primary{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}.community .danger{color:var(--danger)}.community button:disabled{opacity:.55;cursor:not-allowed}.community label{display:block;font-weight:600;font-size:14px;margin:18px 0 6px}.community input:not([type=checkbox]),.community select,.community textarea{width:100%;font:inherit;border:1px solid var(--line);background:var(--white);color:var(--ink);border-radius:8px;padding:12px}.community textarea{min-height:150px;resize:vertical;line-height:1.8;word-break:normal}.community .check{display:flex;align-items:flex-start;gap:9px;font-weight:400}.community input[type=checkbox]{width:18px;height:18px;accent-color:var(--brand);margin:3px 0;flex-shrink:0}.community .hint{display:block;font-size:12px;color:var(--muted);font-weight:400;margin-top:5px}.community .full{width:100%;margin-top:22px}.community .links{justify-content:center;margin-top:20px;font-size:13px;color:var(--blue);gap:15px}.community .notice{border:1px solid var(--line);background:var(--bg-secondary);border-radius:9px;padding:14px 17px;margin:18px 0;font-size:14px;line-height:1.7}.community .error{color:var(--danger)}.community .status:empty{display:none}.community .status{padding:12px 0;color:var(--blue);font-size:14px;white-space:pre-wrap}.community .status.error{color:var(--danger)}.community .toolbar{margin:28px 0 18px;gap:10px}.community .toolbar input{flex:1;min-width:170px}.community .toolbar select{width:auto}.community .board-list{border-top:2px solid var(--ink)}.community .post-row{display:grid;grid-template-columns:1fr 130px 90px;gap:20px;align-items:center;padding:22px 8px;border-bottom:1px solid var(--line);color:var(--ink)}.community .post-row:hover{background:var(--bg-secondary)}.community .post-row h3{font-size:17px;line-height:1.5;margin:3px 0 7px;font-weight:600;overflow-wrap:anywhere;word-break:break-word}.community .badge{display:inline-block;font-size:12px;color:var(--blue);font-weight:600}.community .locked{color:var(--muted);cursor:default}.community .meta{font-size:12px;color:var(--muted)}.community .empty{text-align:center;padding:66px 20px;color:var(--muted)}.community .empty h2{color:var(--ink);font-size:21px;margin-bottom:12px}.community .pagination{justify-content:center;margin-top:28px}.community .pagination [aria-current=page]{background:var(--brand);color:var(--on-brand)}.community .post-heading{border-bottom:1px solid var(--line);padding-bottom:26px;margin-bottom:28px}.community .post-heading h1{font-size:32px;margin:14px 0;word-break:break-word}.community .prose{overflow-wrap:anywhere;word-break:break-word;line-height:1.9;min-height:120px}.community .prose p{margin:0 0 16px}.community .prose a{color:var(--blue);text-decoration:underline}.community .prose blockquote{margin:15px 0;border-left:3px solid var(--blue);padding:4px 20px;color:var(--muted)}.community .prose code{background:var(--bg-secondary);padding:2px 5px;border-radius:4px;white-space:pre-wrap}.community .post-actions{border-block:1px solid var(--line);padding:20px 0;margin-top:32px}.community .comments{margin-top:34px}.community .comment{padding:20px 0;border-bottom:1px solid var(--line)}.community .comment-body{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.community .comment button{padding:5px 9px;min-height:34px;font-size:12px}.community .editor-tools{padding:8px;background:var(--bg-secondary);border:1px solid var(--line);border-bottom:0;border-radius:8px 8px 0 0;gap:5px;margin-top:12px}.community .editor-tools button{padding:6px 10px;min-height:34px}.community #post-body{min-height:360px;border-top-left-radius:0;border-top-right-radius:0}.community .preview{padding:22px;border:1px solid var(--line);border-radius:8px;min-height:180px}.community .stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:25px 0}.community .stat{background:var(--bg-secondary);border:1px solid var(--line);border-radius:12px;padding:22px}.community .stat strong{display:block;font-size:30px;color:var(--ink)}.community .tabs{border-bottom:1px solid var(--line);padding-bottom:16px;margin:25px 0}.community .tabs .active{background:var(--brand);color:var(--on-brand)}.community .table-wrap{overflow:auto}.community table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:13px}.community th,.community td{text-align:left;border-bottom:1px solid var(--line);padding:15px 12px}.community th{background:var(--bg-secondary);font-weight:600}.community td button{font-size:12px;padding:7px 10px;min-height:34px}.community .setup{max-width:720px}.community .setup ol{padding-left:22px;line-height:2}.community .setup a,.community .privacy a{color:var(--blue);text-decoration:underline}.community .privacy{max-width:760px;line-height:1.9}.community dialog{max-width:460px;width:calc(100% - 40px);padding:25px;border:1px solid var(--line);border-radius:14px;background:var(--card-bg);color:var(--ink)}.community dialog::backdrop{background:var(--overlay)}.community dialog textarea{min-height:140px}.community dialog h2{font-size:21px}.account-head{text-align:center}.community .security-note{font-size:12px;color:var(--muted);margin-top:24px;line-height:1.8}body:has(.community:not([hidden])) .site-footer{border-top:1px solid var(--line)}
@media(max-width:740px){.menu-panel{top:66px;right:0}.community{padding-top:32px}.community .panel{padding:20px}.community .post-row{grid-template-columns:1fr;gap:2px;padding:18px 3px}.community .post-row>.meta{display:none}.community .toolbar{align-items:stretch}.community .toolbar select{flex:1;min-width:120px}.community .toolbar input{flex-basis:100%}.community .stats{grid-template-columns:repeat(2,1fr);gap:10px}.community .stat{padding:15px}.community .stat strong{font-size:25px}.community .post-heading h1{font-size:26px}.community .tabs{gap:6px}.community .tabs button{font-size:12px;padding:9px 11px}.community .account-panel{margin-top:15px}.community .post-actions .row{gap:6px}.community .editor-tools{gap:4px}.community .editor-tools button{padding:6px 8px}}

/* Apply only to explicit ON/OFF settings; consent and multi-select remain checkboxes. */

.community .replies{margin-left:22px;padding-left:18px;border-left:2px solid var(--line)}
.community .comment-thread{border-bottom:1px solid var(--line)}
.community .comment-thread>.comment{border-bottom:0}
.community .comment form{margin:14px 0;padding:16px;background:var(--bg-secondary);border-radius:10px}
@media(max-width:740px){.community .replies{margin-left:8px;padding-left:12px}.community .comment time{font-size:12px}}
.community .check:has(.setting-switch){align-items:center;min-height:44px;cursor:pointer}
.community input[type=checkbox].setting-switch{appearance:none;position:relative;width:44px;height:26px;margin:0;flex:0 0 44px;border:1px solid var(--muted);border-radius:999px;background:var(--bg-secondary);cursor:pointer}
.community .setting-switch::before{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:var(--muted);transform:translateX(0);transition:transform .18s ease}
.community input[type=checkbox].setting-switch:checked{background:var(--brand);border-color:var(--brand)}
.community .setting-switch:checked::before{background:#fff;transform:translateX(18px)}
.community .setting-switch:disabled{opacity:.5;cursor:not-allowed}
@media(prefers-reduced-motion:reduce){.theme-thumb,.community .setting-switch::before{transition:none}}
@media(forced-colors:active){.community input[type=checkbox].setting-switch{background:Canvas;border-color:ButtonText}.community .setting-switch::before{background:ButtonText}.community input[type=checkbox].setting-switch:checked{background:Highlight;border-color:Highlight}.community .setting-switch:checked::before{background:HighlightText}}

/* Notification surfaces reuse the current theme tokens. */
.notification-bell{position:relative;display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border:1px solid var(--line);border-radius:50%;background:var(--card-bg);color:var(--ink);cursor:pointer}
.notification-bell[hidden],.notification-badge[hidden],.notification-panel[hidden]{display:none}
.notification-badge{position:absolute;right:-5px;top:-5px;min-width:19px;padding:2px 4px;border-radius:12px;background:var(--brand);color:var(--on-brand);font-size:11px;font-weight:700;line-height:15px}
.notification-panel{position:absolute;right:0;top:calc(100% - 4px);width:min(380px,100%);max-height:min(580px,75dvh);overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:16px;background:var(--card-bg);color:var(--ink);box-shadow:0 12px 30px #0002;z-index:60;padding:16px}
.notification-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.notification-heading h2{font-size:17px;margin:0}.notification-heading h1{margin:0;font-size:30px}
.notification-panel button,.notification-center button{font:inherit;color:var(--ink);cursor:pointer}.notification-read-all,.notification-pagination button{border:1px solid var(--line);border-radius:8px;background:var(--card-bg);padding:8px 10px;font-size:12px;white-space:nowrap;min-height:40px}
.notification-list{list-style:none;padding:0;margin:0}.notification-item{border-bottom:1px solid var(--line);border-radius:8px}.notification-item.is-unread{background:var(--bg-secondary)}
.notification-panel .notification-entry,.notification-center .notification-entry{display:flex;flex-direction:column;align-items:stretch;gap:8px;text-align:left;width:100%;padding:14px 10px;background:transparent;border:0;border-radius:8px;white-space:normal;min-width:0;line-height:1.6}
.notification-message{overflow-wrap:anywhere;word-break:normal;font-size:14px}.is-unread .notification-message{font-weight:600}.notification-meta{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:var(--muted)}.is-unread .notification-state{color:var(--blue);font-weight:700}.notification-entry time{font-size:12px;color:var(--muted)}
.notification-all{display:block;padding:14px 0 0;text-align:center;color:var(--blue);font-size:13px}.notification-empty{padding:24px 8px;color:var(--muted);font-size:14px}.notification-status{font-size:13px;color:var(--muted);overflow-wrap:anywhere}.notification-status:empty{display:none}.notification-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:24px;font-size:13px}
.notification-center{max-width:760px;margin:auto}.notification-panel button:disabled,.notification-center button:disabled{opacity:.5;cursor:default}.comment:focus{outline:2px solid var(--blue);outline-offset:4px;scroll-margin-top:110px}

@media(max-width:540px){.notification-panel{right:0}.notification-heading h1{font-size:25px}}

.message-results{margin:16px 0}.community .message-results button{white-space:normal;overflow-wrap:anywhere}.message-results [aria-pressed=true]{border-color:var(--blue);background:var(--bg-secondary)}.message-history{margin-top:32px}.message-history .panel{margin-top:16px}.message-history h3{overflow-wrap:anywhere}.admin-message-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}.admin-message-detail{padding:18px 10px;border-top:1px solid var(--line);margin-top:14px;overflow-wrap:anywhere}.admin-message-detail:focus{outline:2px solid var(--blue);outline-offset:-2px}.notification-preview{font-size:13px;color:var(--muted);overflow-wrap:anywhere;white-space:pre-wrap}.admin-message-detail h3{font-size:18px}.admin-message-detail p{font-size:14px}

.member-avatar{display:inline-grid;position:relative;place-items:center;vertical-align:middle;flex:none;width:30px;height:30px;border-radius:50%;overflow:hidden;background:var(--tag-bg);color:var(--tag-ink);font-size:13px;font-weight:700;margin-right:7px}.member-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.image-previews{display:flex;flex-wrap:wrap;gap:12px;margin-block:12px}.image-preview{display:grid;gap:6px;max-width:140px}.image-preview img{width:120px;height:100px;object-fit:cover;border-radius:12px;background:var(--tag-bg)}.post-images{display:grid;gap:16px;margin-block:20px}.post-images img{display:block;max-width:100%;width:auto;height:auto;max-height:900px;object-fit:contain;border-radius:12px}.community input[type=file]{max-width:100%;font-size:14px}.community #avatar-form{margin-block:24px}

.post-tags{display:flex;flex-wrap:wrap;gap:6px;margin-block:8px}.post-tags .badge{overflow-wrap:anywhere;font-size:12px}

.health-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-block:16px}.health-grid article{padding:12px;border:1px solid var(--border-subtle);border-radius:12px}.health-grid .badge{margin-left:8px}#ops-member textarea{min-height:80px}
.project-team{list-style:none;margin:14px 0 0;padding:0}
.project-team li{padding:12px 0;border-bottom:1px solid var(--line);gap:12px;flex-wrap:wrap}
.project-update{padding:16px 0;border-bottom:1px solid var(--line)}
.project-update h3{font-size:17px;margin:6px 0}
}
