
:root {
    font-family: Inter, sans-serif;
    color: #273b36;
    background: #f5f6f1;
    font-synthesis: none
}
* {
    box-sizing: border-box
}
body {
    margin: 0
}
button, input, textarea, select {
    font: inherit
}
button {
    cursor: pointer
}
button:disabled {
    opacity: .55;
    cursor: not-allowed
}
.top {
    height: 72px;
    background: #fcfdf9;
    border-bottom: 1px solid #e5eae2;
    position: sticky;
    top: 0;
    z-index: 5
}
.topin {
    max-width: 1120px;
    margin: auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between
}
.brand {
    font-weight: 800;
    font-size: 29px;
    letter-spacing: 0;
    color: #295c50
}
.brandmark {
    display: inline-grid;
    place-items: center;
    background: #dcece3;
    border-radius: 12px;
    width: 36px;
    height: 36px;
    margin-right: 8px;
    color: #2b6758
}
.topactions {
    display: flex;
    align-items: center;
    gap: 12px
}
.shell {
    max-width: 1120px;
    margin: 34px auto;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr) 235px;
    gap: 24px;
    padding: 0 24px
}
.sidebar, .right {
    align-self: start;
    position: sticky;
    top: 100px
}
.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-radius: 12px;
    font-weight: 600;
    color: #65736c;
    text-decoration: none;
    margin-bottom: 6px
}
.nav.active {
    background: #e3eee6;
    color: #2b6758
}
.nav:hover {
    background: #eaf0e9
}
.navicon {
    font-size: 19px;
    width: 22px;
    text-align: center
}
.sidefoot {
    margin: 24px 14px;
    color: #8b9990;
    font-size: 12px;
    line-height: 1.8
}
.hero {
    background: linear-gradient(120deg, #e1eee5, #edf3e9 68%, #f1e9dc);
    border: 1px solid #dce8dc;
    border-radius: 20px;
    padding: 27px 29px;
    margin-bottom: 20px
}
.eyebrow {
    color: #548070;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase
}
.hero h1 {
    font-size: 26px;
    letter-spacing: -1.1px;
    margin: 10px 0 8px;
    line-height: 1.25
}
.hero p {
    color: #63796d;
    margin: 0;
    font-size: 14px;
    line-height: 1.7
}
.card {
    background: #fff;
    border: 1px solid #e6eae4;
    border-radius: 17px;
    box-shadow: 0 4px 18px #31483a06
}
.compose {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 18px;
    margin-bottom: 20px
}
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e4eee7;
    color: #477b66;
    display: grid;
    place-items: center;
    font-weight: 800;
    flex: none
}
.composePrompt {
    flex: 1;
    background: #f7f9f6;
    border: 1px solid #edf0eb;
    color: #8b9990;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    font-size: 13px
}
.btn {
    border: 0;
    border-radius: 11px;
    background: #347663;
    color: white;
    padding: 12px 17px;
    font-weight: 700;
    font-size: 13px
}
.btn:hover {
    background: #285d4e
}
.btn.light {
    background: #e4eee8;
    color: #316d59
}
.btn.ghost {
    background: transparent;
    color: #5c7769
}
.feedbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 12px;
    gap: 12px
}
.feedbar h2 {
    font-size: 17px;
    margin: 0;
    letter-spacing: -.4px
}
.filters {
    display: flex;
    gap: 8px;
    overflow: auto;
    padding: 2px 0 13px;
    scrollbar-width: thin
}
.chip {
    white-space: nowrap;
    border: 1px solid #e2e8df;
    background: #fff;
    color: #708078;
    border-radius: 99px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600
}
.chip.selected {
    background: #dfece3;
    color: #2d705c;
    border-color: #d4e5da
}
.post {
    padding: 22px;
    margin-bottom: 13px
}
.posthead {
    display: flex;
    align-items: center;
    gap: 11px
}
.posthead .meta {
    flex: 1;
    min-width: 0
}
.username {
    font-size: 13px;
    font-weight: 800;
    color: #344b40
}
.small {
    color: #94a097;
    font-size: 12px
}
.postbody {
    font-size: 14px;
    line-height: 1.85;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 17px 0;
    color: #405349
}
.postfooter {
    border-top: 1px solid #f0f2ed;
    padding-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center
}
.linkbtn {
    background: none;
    border: 0;
    color: #708378;
    font-size: 12px;
    font-weight: 600;
    padding: 5px
}
.linkbtn:hover {
    color: #296c55
}
.tag {
    background: #eef4ee;
    border-radius: 99px;
    padding: 5px 9px;
    color: #658674;
    font-size: 11px;
    font-weight: 700
}
.rightcard {
    padding: 20px;
    margin-bottom: 15px
}
.rightcard h3 {
    font-size: 14px;
    margin: 0 0 12px
}
.rightcard p {
    color: #7c8d81;
    font-size: 12px;
    line-height: 1.8;
    margin: 0
}
.minilist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}
.empty {
    padding: 40px 24px;
    text-align: center;
    color: #819087;
    font-size: 13px
}
.footnote {
    font-size: 11px;
    color: #99a79b;
    margin: 16px 0
}
.toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: #304b3e;
    color: white;
    border-radius: 12px;
    padding: 12px 17px;
    font-size: 13px;
    z-index: 30;
    max-width: 90vw;
    display: none
}
.modalwrap {
    position: fixed;
    inset: 0;
    background: #1e342c78;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 20
}
.modalwrap.open {
    display: flex
}
.modal {
    width: min(100%, 490px);
    max-height: 90vh;
    overflow: auto;
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 25px 80px #183c2d30
}
.modalheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px
}
.modalheader h2 {
    font-size: 19px;
    margin: 0
}
.close {
    border: 0;
    background: #f0f4ef;
    border-radius: 9px;
    width: 32px;
    height: 32px;
    color: #5e796c
}
.field {
    display: block;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 700;
    color: #5b7365
}
.field input, .field textarea, .field select {
    width: 100%;
    border: 1px solid #e0e7df;
    border-radius: 10px;
    padding: 13px;
    background: #fbfcfa;
    color: #34483d;
    margin-top: 7px;
    outline-color: #78aa91
}
.field textarea {
    min-height: 150px;
    resize: vertical
}
.row {
    display: flex;
    align-items: center;
    gap: 10px
}
.comment {
    padding: 13px 0;
    border-top: 1px solid #edf1eb;
    font-size: 13px;
    line-height: 1.6
}
.comment strong {
    color: #346e58
}
.status {
    font-size: 12px;
    color: #8b9b90
}
.mobilebar {
    display: none
}

@media(max-width:980px) {
.shell {
    grid-template-columns: 190px minmax(0, 1fr)
}
.right {
    display: none
}
}

@media(max-width:680px) {
.top {
    height: 64px
}
.topin {
    padding: 0 17px
}
.brand {
    font-size: 22px
}
.brandmark {
    width: 32px;
    height: 32px
}
.shell {
    display: block;
    padding: 0 13px;
    margin: 18px auto 85px
}
.sidebar {
    display: none
}
.hero {
    padding: 22px 20px;
    border-radius: 17px
}
.hero h1 {
    font-size: 23px
}
.compose {
    padding: 13px
}
.composePrompt {
    padding: 12px
}
.post {
    padding: 18px
}
.mobilebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 66px;
    background: #fff;
    border-top: 1px solid #e4eae1;
    z-index: 6
}
.mobilebar button {
    background: none;
    border: 0;
    color: #708276;
    font-size: 11px;
    display: grid;
    gap: 4px;
    place-items: center
}
.mobilebar button span {
    font-size: 19px
}
.topactions .btn {
    padding: 10px 12px
}
}
/* BAFAAT V1: darker readable typography */
:root {
    color: #263a33;
    background: #f5f6f1
}
body {
    font-size: 15px;
    line-height: 1.55
}
.nav {
    color: #405b50;
    font-size: 15px
}
.sidefoot, .small, .status, .footnote {
    color: #5b7065;
    font-size: 13px
}
.hero p {
    color: #3e6053;
    font-size: 15px
}
.eyebrow {
    color: #366d5b;
    font-size: 13px
}
.composePrompt {
    color: #506a5e;
    font-size: 14px
}
.chip {
    color: #425d51;
    font-size: 13px
}
.postbody {
    color: #2e463a;
    font-size: 15px
}
.username {
    font-size: 14px
}
.linkbtn {
    color: #3f6655;
    font-size: 13px
}
.tag {
    color: #426c58;
    font-size: 12px
}
.rightcard p {
    color: #52695d;
    font-size: 13px
}
.field {
    font-size: 14px;
    color: #344e41
}
.btn {
    font-size: 14px
}
.empty {
    color: #536b5e;
    font-size: 14px
}
.footnote {
    font-size: 13px
}
.brand {
    letter-spacing: -.6px
}
/* Display settings: accessible text scaling and two gentle color palettes. */
:root {
--font-scale:1.08;
--page-bg:#f5f6f1;
--surface:#fff;
--surface-alt:#f7f9f6;
--surface-top:#fcfdf9;
--text:#263a33;
--muted:#52695d;
--line:#e1e9df;
--accent:#347663;
--accent-soft:#e3eee6;
--input-bg:#fbfcfa
}
:root[data-font-size="normal"] {
--font-scale:1
}
:root[data-font-size="medium"] {
--font-scale:1.08
}
:root[data-font-size="large"] {
--font-scale:1.23
}
:root[data-theme="dark"] {
    color-scheme: dark;
--page-bg:#192823;
--surface:#24352f;
--surface-alt:#2c4038;
--surface-top:#21322b;
--text:#eff5ee;
--muted:#c3d4c8;
--line:#41564b;
--accent:#82c5a7;
--accent-soft:#345347;
--input-bg:#2b4036
}
html, body {
    background: var(--page-bg);
    color: var(--text)
}
body {
font-size:calc(15px * var(--font-scale))
}
.top, .mobilebar {
    background: var(--surface-top);
    border-color: var(--line)
}
.brand {
    color: var(--accent)
}
.brandmark, .avatar {
    background: var(--accent-soft);
    color: var(--accent)
}
.card, .modal, .chip {
    background: var(--surface);
    border-color: var(--line);
    color: var(--text)
}
.modal {
    box-shadow: 0 25px 80px #0003
}
.nav {
    color: var(--muted);
font-size:calc(15px * var(--font-scale))
}
.nav.active, .nav:hover, .chip.selected {
    background: var(--accent-soft);
    color: var(--accent)
}
.hero {
    background: linear-gradient(125deg, var(--accent-soft), var(--surface-alt) 72%, var(--surface));
    border-color: var(--line)
}
.hero h1 {
    color: var(--text);
font-size:calc(26px * var(--font-scale))
}
.hero p, .hero .eyebrow {
    color: var(--muted);
font-size:calc(14px * var(--font-scale))
}
.composePrompt, .field input, .field textarea, .field select {
    background: var(--input-bg);
    border-color: var(--line);
    color: var(--text)
}
.composePrompt {
font-size:calc(14px * var(--font-scale))
}
.btn {
font-size:calc(14px * var(--font-scale));
    background: #347663;
    color: #fff
}
.btn.light {
    background: var(--accent-soft);
    color: var(--accent)
}
.btn.ghost {
    background: transparent;
    color: var(--accent)
}
.feedbar h2 {
font-size:calc(17px * var(--font-scale))
}
.postbody {
font-size:calc(15px * var(--font-scale));
    color: var(--text)
}
.username {
font-size:calc(14px * var(--font-scale));
    color: var(--text)
}
.small, .status, .footnote, .sidefoot, .rightcard p {
    color: var(--muted);
font-size:calc(13px * var(--font-scale))
}
.chip, .linkbtn, .tag, .field, .comment, .empty, .rightcard h3, .mobilebar button {
font-size:calc(13px * var(--font-scale));
    color: var(--muted)
}
.tag, .close {
    background: var(--accent-soft);
    color: var(--accent)
}
.postfooter, .comment {
    border-color: var(--line)
}
.field input, .field textarea, .field select {
font-size:calc(15px * var(--font-scale))
}
.field {
    color: var(--text)
}
.settings-trigger {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
font-size:calc(13px * var(--font-scale));
    font-weight: 700
}
.settings-trigger:hover {
    background: var(--accent-soft)
}
.settings-description {
    color: var(--muted);
font-size:calc(13px * var(--font-scale));
    line-height: 1.6;
    margin: 4px 0 18px
}
.setting-group {
    margin: 20px 0
}
.setting-label {
    font-weight: 700;
font-size:calc(15px * var(--font-scale));
    margin-bottom: 10px
}
.setting-options {
    display: flex;
    gap: 8px
}
.setting-options button {
    flex: 1;
    padding: 12px 8px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-alt);
    color: var(--text);
    font-weight: 700;
font-size:calc(13px * var(--font-scale))
}
.setting-options button[aria-pressed="true"] {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent)
}
.settings-preview {
    border: 1px solid var(--line);
    background: var(--surface-alt);
    border-radius: 12px;
    padding: 16px;
font-size:calc(15px * var(--font-scale))
}
.settings-preview p {
    color: var(--muted);
    line-height: 1.7;
    margin: 8px 0 0
}
:root[data-theme="dark"] .rightcard h3, :root[data-theme="dark"] .modalheader h2, :root[data-theme="dark"] .feedbar h2 {
    color: var(--text)
}
:root[data-theme="dark"] .linkbtn, :root[data-theme="dark"] .tag, :root[data-theme="dark"] .eyebrow {
    color: var(--accent)
}
:root[data-theme="dark"] .mobilebar button {
    color: var(--muted)
}

@media(max-width:680px) {
.hero h1 {
font-size:calc(23px * var(--font-scale))
}
.settings-trigger {
    padding: 9px
}
.settings-trigger span {
    display: none
}
.topactions {
    gap: 7px
}
.setting-options button {
    padding: 12px 5px
}
}

/* BAFAAT V2: profile and moderation workspace */
.view-panel{display:none}.view-panel.active{display:block}
.page-title{font-size:calc(23px * var(--font-scale));margin:0 0 8px}
.page-subtitle{color:var(--muted);margin:0 0 22px;font-size:calc(14px * var(--font-scale))}
.panel-card{padding:23px;margin-bottom:15px}
.profile-cover{height:105px;border-radius:13px;background:linear-gradient(115deg,var(--accent-soft),var(--surface-alt));margin-bottom:-26px}
.profile-top{display:flex;align-items:end;gap:15px;padding:0 16px 16px;position:relative}
.profile-top .avatar{width:70px;height:70px;border:4px solid var(--surface);font-size:25px}
.profile-top h2{margin:0;font-size:22px}
.profile-stats{display:flex;gap:16px;flex-wrap:wrap;margin:14px 0;color:var(--muted)}
.profile-stats strong{color:var(--text)}
.toolbar{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin:16px 0}
.toolbar .btn{padding:9px 12px}
.moderation-row{padding:17px 0;border-bottom:1px solid var(--line)}
.moderation-row:last-child{border:0}
.moderation-row p{white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0}
.moderation-meta{color:var(--muted);font-size:13px}
.moderation-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.field-hint{color:var(--muted);font-size:12px;line-height:1.6;margin:-5px 0 14px}
.privacy-note{background:var(--accent-soft);border-radius:11px;padding:13px;color:var(--text);font-size:13px;line-height:1.7;margin-bottom:15px}
.navbutton{border:0;background:transparent;width:100%;text-align:left;font-family:inherit}
.navbutton.active{background:var(--accent-soft);color:var(--accent)}
@media(max-width:680px){.panel-card{padding:17px}.profile-top{padding:0 8px 12px}.topactions{gap:5px}.topactions .btn{padding:9px}.profile-stats{gap:10px}}

/* Cloudflare Pages multi-page additions */
.category-admin-form {display:grid;gap:12px;margin-bottom:25px;padding-bottom:20px;border-bottom:1px solid var(--border,#dce6df)}
.category-admin-form .field {margin:0}
.category-admin-form h3 {margin:0 0 4px}
.category-admin-form .btn {justify-self:start}
.username a {color:inherit;text-decoration:none}
.username a:hover {text-decoration:underline}

/* Interactive category navigation */
.topic-button{appearance:none;border:1px solid var(--border,#dce6df);border-radius:99px;padding:7px 11px;background:var(--card,#fff);color:var(--text,#355e50);font:inherit;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s}
.topic-button:hover,.topic-button:focus-visible{border-color:#7bb09a;outline-offset:2px}
.topic-button.selected{background:#dfece3;color:#2d705c;border-color:#91bca6}
.mobile-topic-panel{margin:0 0 16px;padding:18px}
.mobile-topic-panel[hidden]{display:none!important}
.mobile-topic-panel h3{font-size:14px;margin:0 0 12px}
:root[data-theme="dark"] .topic-button{background:#25362f;color:#dcece1;border-color:#4a6657}
:root[data-theme="dark"] .topic-button.selected{background:#426b57;color:#fff;border-color:#81b79b}

.minilist a.topic-button{display:inline-flex;align-items:center;text-decoration:none;width:max-content;max-width:100%}
