@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/assets/fonts/dm-sans-latin.woff2") format("woff2");
}

/* Functional member platform additions. The base member.css holds the shared visual language. */
.topbar-nav a:first-child { color: var(--muted); font-weight: 400; }
.topbar-nav a.active { color: var(--ink); font-weight: 700; }
.topbar-nav a { padding: 8px 2px; }
.member-actions a { text-decoration: none; }
.karma-balance { display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-soft); color: var(--muted); font-size: .78rem; white-space: nowrap; }
.karma-balance b { color: var(--ink); font-size: .95rem; }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.7; }
.button { transition: transform 160ms ease, border-radius 160ms ease; }
.button:hover { border-radius: 3px; transform: scale(1.025); }

.member-search { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-top: 4px; }
.member-search[hidden] { display: none; }
.member-search label { color: var(--muted); font-size: .85rem; font-weight: 700; }
.member-search input, .member-search button { min-height: 42px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.member-search input { width: 100%; padding: 9px 12px; background: var(--paper-soft); }
.member-search button { padding: 9px 18px; background: var(--ink); color: var(--paper-soft); cursor: pointer; }
.member-sidebar {
    display: flex;
    flex-direction: column;
    position: static;
    min-height: calc(100vh - 112px);
    min-height: calc(100dvh - 112px);
}
.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.sidebar-user-profile {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}
.sidebar-user-avatar {
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--moss-dark);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
}
.sidebar-user-text {
    display: grid;
    min-width: 0;
}
.sidebar-user-text strong {
    overflow: hidden;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-user-text small,
.sidebar-signout {
    color: var(--muted);
    font-size: .78rem;
}
.sidebar-signout {
    flex: 0 0 auto;
}

.view-hero, .create-panel, .profile-form, .profile-karma-summary, .knowledge-callout, .karma-info, .member-card, .event-card, .empty-state { border: 1px solid var(--line); border-radius: 8px; background: var(--paper-soft); box-shadow: var(--shadow); }
.view-hero { padding: clamp(26px, 5vw, 48px); }
.view-hero h1 { margin-bottom: 12px; }
.view-hero > p:last-child { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }
.section-heading, .panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 8px 2px 0; }
.section-heading h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 300; }
.section-heading a { color: var(--muted); }
.empty-state { padding: clamp(24px, 5vw, 42px); }
.empty-state h2 { margin-bottom: 10px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 300; line-height: 1.08; }
.empty-state p:not(.eyebrow) { max-width: 540px; color: var(--muted); }

.composer-title { grid-column: 2; width: 100%; min-height: 43px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.karma-rules { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, auto); align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px; background: #f2f2f0; }
.karma-rules[hidden] { display: none; }
.karma-rules > div { display: grid; }
.karma-rules > div > span { color: var(--muted); font-size: .84rem; }
.boost-toggle { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: .82rem; cursor: pointer; }
.boost-toggle input { width: 18px; height: 18px; accent-color: var(--clay); }
.boost-toggle input:disabled + span { color: var(--muted); opacity: .65; }
.chip-button { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.chip-button input { position: absolute; opacity: 0; pointer-events: none; }
.chip-button:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper-soft); }
.post-actions form { display: contents; }
.post-body { white-space: normal; }
.help-bounty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -5px 0 16px; color: var(--muted); font-size: .84rem; }
.help-bounty > span { padding: 4px 8px; border-radius: 999px; background: #eeeeec; color: var(--ink); font-weight: 800; }
.help-bounty strong { color: var(--ink); }
.post-replies { display: grid; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.post-replies[hidden] { display: none; }
.reply { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
.reply .mini-avatar { width: 34px; height: 34px; font-size: .74rem; }
.reply p { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--paper); }
.reply-content { min-width: 0; }
.thank-form { margin-top: 7px; }
.thank-form button, .thanked-label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #f2f2f0; color: var(--ink); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.thank-form button span { color: var(--muted); font-weight: 600; }
.thanked-label { cursor: default; }
.reply strong, .reply small { display: block; }
.reply small { margin-bottom: 5px; color: var(--muted); font-size: .78rem; }
.reply-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-left: 44px; }
.reply-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.reply-form textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
.reply-form button, .market-card-actions button, .market-card-actions a { min-height: 40px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-soft); color: inherit; font: inherit; text-decoration: none; cursor: pointer; }

.market-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.market-card-actions form { margin: 0; }
.full-marketplace .market-card { min-height: 230px; background: var(--paper-soft); }
.full-marketplace .market-card h2 { margin: 14px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 300; line-height: 1.08; }

.rail-empty { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.knowledge-filter-panel { align-content: start; }
.knowledge-intro { padding: 24px; }
.knowledge-intro > p:not(.eyebrow) { margin-bottom: 20px; color: var(--muted); }
.knowledge-intro .button { width: 100%; }
.knowledge-intro-mobile { display: none; }
.knowledge-rail-nav { display: grid; }
.knowledge-rail-nav a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.knowledge-rail-nav a:first-child { margin-top: 2px; }
.knowledge-rail-nav a.active { color: var(--ink); font-weight: 700; }
.knowledge-rail-nav small { min-width: 1.7em; color: inherit; text-align: right; }
.create-panel { padding: 20px 24px; }
.create-panel summary { cursor: pointer; font-weight: 800; }
.create-panel[open] summary { margin-bottom: 22px; }
.stacked-form { display: grid; gap: 16px; }
.stacked-form label, .admin-form label, .auth-form label { display: grid; gap: 7px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.stacked-form input, .stacked-form textarea, .stacked-form select, .admin-form input, .admin-form textarea, .admin-form select, .auth-form input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; }
.stacked-form textarea, .admin-form textarea { resize: vertical; }
.profile-form { padding: clamp(22px, 4vw, 34px); }
.profile-form small { font-weight: 400; }
.knowledge-callout {
    padding: clamp(22px, 4vw, 34px);
}
.knowledge-callout h2 {
    max-width: 620px;
    margin-bottom: 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 300;
    line-height: 1.1;
}
.knowledge-callout > p:not(.eyebrow) {
    max-width: 650px;
    color: var(--muted);
}
.knowledge-callout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.knowledge-admin-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f2f2f0;
}
.knowledge-admin-callout > div { display: grid; gap: 3px; }
.knowledge-admin-callout span { color: var(--muted); }
.knowledge-categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.knowledge-categories a {
    display: grid;
    gap: 5px;
    min-height: 112px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper-soft);
    color: var(--ink);
    text-decoration: none;
}
.knowledge-categories a.active { border-color: var(--ink); background: var(--ink); color: var(--paper-soft); }
.knowledge-categories strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 300; }
.knowledge-categories span { color: var(--muted); font-size: .85rem; }
.knowledge-categories a.active span { color: rgba(255, 255, 255, .7); }
.knowledge-contribute {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(22px, 4vw, 32px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f2f2f0;
}
.knowledge-contribute h2 { margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 300; line-height: 1.1; }
.knowledge-contribute p:last-child { max-width: 640px; margin-bottom: 0; color: var(--muted); }
.knowledge-contribute .button { flex: 0 0 auto; }
.knowledge-editor-form { margin-top: 4px; }
.rich-field { display: grid; gap: 7px; }
.rich-field-label { color: var(--muted); font-size: .88rem; font-weight: 700; }
.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: var(--paper);
}
.rich-toolbar button, .rich-toolbar select {
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--paper-soft);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}
.rich-editor {
    min-height: 240px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 0 0 7px 7px;
    background: #fff;
    color: var(--ink);
    outline: none;
}
.rich-editor:focus { border-color: var(--moss-dark); box-shadow: 0 0 0 2px rgba(51, 94, 78, .12); }
.rich-editor:empty::before { color: #929292; content: attr(data-placeholder); pointer-events: none; }
.rich-editor h2, .rich-editor h3, .knowledge-rich-content h2, .knowledge-rich-content h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 300; line-height: 1.15; }
.rich-editor h2, .knowledge-rich-content h2 { margin: 1.2em 0 .45em; font-size: 1.75rem; }
.rich-editor h3, .knowledge-rich-content h3 { margin: 1.1em 0 .4em; font-size: 1.35rem; }
.rich-editor p, .knowledge-rich-content p { margin: 0 0 1em; }
.rich-editor blockquote, .knowledge-rich-content blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--clay); color: var(--muted); }
.knowledge-existing-media { display: grid; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.knowledge-existing-media > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; }
.knowledge-existing-media form { margin: 0; }
.knowledge-existing-media button, .knowledge-owner-actions button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper-soft); color: var(--ink); cursor: pointer; }
.knowledge-cancel-edit { display: inline-block; margin-top: 18px; color: var(--muted); }
.knowledge-archive-list { display: grid; }
.knowledge-archive-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.knowledge-archive-list span { display: grid; }
.knowledge-archive-list small { color: var(--muted); }
.knowledge-archive-list form { margin: 0; }
.knowledge-archive-list button { min-height: 38px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-soft); color: var(--ink); cursor: pointer; }
.knowledge-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}
.knowledge-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper-soft);
    box-shadow: var(--shadow);
    transition: border-color 160ms ease, transform 160ms ease;
}
.knowledge-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.knowledge-card-link { display: block; height: 100%; padding: 22px; color: var(--ink); text-decoration: none; }
.knowledge-card-link h2 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 300;
    line-height: 1.12;
}
.knowledge-card-link p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.knowledge-resource-links { display: grid; justify-items: start; gap: 8px; margin-top: 18px; }
.knowledge-resource-link { font-weight: 800; }
.knowledge-rich-content { margin-top: 16px; overflow-wrap: anywhere; }
.knowledge-rich-content a { text-decoration: underline; }
.knowledge-owner-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.knowledge-owner-actions form { margin: 0; }
.knowledge-owner-actions a { color: var(--muted); }
.knowledge-back-link { display: inline-flex; width: fit-content; color: var(--muted); }
.knowledge-detail { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-soft); box-shadow: var(--shadow); }
.knowledge-detail-header { padding: clamp(24px, 5vw, 44px); }
.knowledge-detail-header h1 { margin-bottom: 16px; font-size: clamp(2.1rem, 5vw, 3.6rem); }
.knowledge-detail-creator { margin: 0 0 4px; color: var(--ink); font-weight: 700; }
.knowledge-detail-contributor { margin: 0; color: var(--muted); font-size: .9rem; }
.knowledge-detail-youtube { aspect-ratio: 16 / 9; background: var(--ink); }
.knowledge-detail-youtube iframe { display: block; width: 100%; height: 100%; border: 0; }
.knowledge-detail-media { display: grid; gap: 2px; background: var(--ink); }
.knowledge-detail-media img, .knowledge-detail-media video { display: block; width: 100%; max-height: 720px; object-fit: contain; background: var(--ink); }
.knowledge-detail-copy { margin: 0; padding: clamp(24px, 5vw, 44px); font-size: 1.05rem; line-height: 1.7; }
.knowledge-detail-links { padding: 0 clamp(24px, 5vw, 44px) clamp(24px, 5vw, 44px); }
.knowledge-detail-actions { margin: 0 clamp(24px, 5vw, 44px); padding-bottom: clamp(24px, 5vw, 44px); }
.profile-karma-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(22px, 4vw, 34px);
}
.profile-karma-summary h2 {
    margin-bottom: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    line-height: 1;
}
.karma-shop { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 3px; background: #f2f2f0; box-shadow: none; }
.karma-shop h2 { margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; line-height: 1; }
.karma-shop .karma-offer-title {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.1;
}
.karma-shop p:last-child { max-width: 520px; margin-bottom: 0; color: var(--muted); }
.karma-shop form { display: grid; gap: 8px; justify-items: stretch; min-width: 220px; }
.karma-shop form small { max-width: 220px; color: var(--muted); text-align: center; }
.purchase-pending { display: grid; gap: 3px; min-width: 220px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-soft); }
.purchase-pending span, .purchase-pending small { color: var(--muted); }
.karma-info {
    padding: clamp(22px, 4vw, 34px);
}
.karma-info h2 {
    max-width: 620px;
    margin-bottom: 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 300;
    line-height: 1.1;
}
.karma-info ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
    color: var(--muted);
}

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-row a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-soft); text-decoration: none; }
.filter-row a.active { border-color: var(--ink); background: var(--ink); color: var(--paper-soft); }
.member-directory, .event-list { display: grid; gap: 14px; }
.member-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 22px; }
.member-card h2, .event-card h2 { margin-bottom: 3px; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 300; line-height: 1.1; }
.member-card p { margin: 10px 0 0; }
.member-business { color: var(--muted); }
.member-need, .member-help { padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); }
.member-help strong { color: var(--moss-dark); }
.event-card { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 22px; padding: clamp(22px, 4vw, 34px); }
.event-card time { display: grid; align-content: center; justify-items: center; height: 70px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-transform: uppercase; }
.event-card time strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; font-weight: 300; line-height: 1; }
.event-card time span { font-size: .76rem; }

.tone-1 { background: #765b4d; } .tone-2 { background: #58684d; } .tone-3 { background: #935f72; } .tone-4 { background: #5b6678; } .tone-5 { background: #a85f55; } .tone-6 { background: #3f6f68; } .tone-7 { background: #716952; }
.member-toast { position: fixed; top: 78px; right: 20px; z-index: 40; display: flex; align-items: center; gap: 18px; max-width: min(420px, calc(100% - 32px)); padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-soft); box-shadow: var(--shadow); }
.member-toast.success { border-left: 4px solid var(--moss); }
.member-toast.error { border-left: 4px solid var(--rose); }
.member-toast button { border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; }

/* Login and activation use the site's paper grid, never a color gradient. */
.member-auth-page { min-height: 100vh; background-color: var(--paper); background-image: linear-gradient(rgba(11, 11, 11, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 11, 11, .055) 1px, transparent 1px); background-size: 80px 80px; }
.auth-site-header { position: absolute; top: 0; left: 0; z-index: 2; width: 100%; padding: clamp(28px, 5vh, 48px) clamp(24px, 5.2vw, 80px); }
.auth-site-brand { display: inline-block; padding: 8px 0; color: #0b0b0b; background: var(--paper); font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif; font-size: 14px; font-weight: 500; letter-spacing: .28em; line-height: 1.55; text-decoration: none; text-transform: uppercase; }
.auth-site-brand:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.auth-shell { display: grid; align-content: center; width: min(100% - 32px, 620px); min-height: 100vh; margin: 0 auto; padding: 38px 0; }
.auth-brand { justify-self: center; margin-bottom: 22px; padding: 8px 12px; background: var(--paper); font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; text-decoration: none; }
.auth-card { padding: clamp(28px, 7vw, 54px); border: 1px solid var(--line); border-radius: 8px; background: var(--paper-soft); box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(2.5rem, 8vw, 4.2rem); }
.invoice-shell { width: min(100% - 32px, 760px); }
.invoice-card { display: grid; gap: 20px; }
.invoice-card h1, .invoice-card p { margin-block: 0; }
.invoice-card h1.invoice-new-title { max-width: none; font-size: clamp(1.25rem, 6.4vw, 3.25rem); letter-spacing: -.035em; white-space: nowrap; }
.invoice-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 4px 0; border-top: 1px solid var(--line); }
.invoice-facts div { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.invoice-facts div:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--line); }
.invoice-facts .invoice-fact-wide { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
.invoice-facts dt { color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.invoice-facts dd { margin: 0; font-size: 1.08rem; font-weight: 700; }
.invoice-payment-instruction { font-weight: 300; font-variation-settings: "wght" 300; }
.invoice-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-intro { margin-bottom: 26px; color: var(--muted); font-size: 1.05rem; }
.auth-form { display: grid; gap: 16px; }
.auth-form .button { margin-top: 4px; }
.auth-secondary-link { display: inline-block; margin-top: 20px; color: var(--muted); }
.auth-help { justify-self: center; margin: 20px 0 0; padding: 6px 10px; background: var(--paper); color: var(--muted); text-align: center; }
.form-message { margin-bottom: 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.form-message.error { border-left: 4px solid var(--rose); }
.form-message.success { border-left: 4px solid var(--moss); }

/* Admin */
.admin-member-page { background: var(--paper); }
.admin-member-shell { display: grid; gap: 20px; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 72px; }
.admin-back, .admin-heading, .copy-row, .member-admin-list article, .admin-row-actions, .event-admin-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-back a, .member-admin-list a, .member-admin-list small, .event-admin-list span { color: var(--muted); }
.admin-heading { align-items: end; }
.admin-heading h1 { margin-bottom: 0; }
.admin-panel { padding: clamp(20px, 4vw, 32px); border: 1px solid var(--line); border-radius: 8px; background: var(--paper-soft); }
.admin-panel h2 { margin-bottom: 20px; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 300; line-height: 1.1; }
.admin-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; }
.admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-form label:has(textarea), .admin-form .button, .event-form .wide, .knowledge-admin-form .wide { grid-column: 1 / -1; }
.activation-panel { border-color: var(--moss); }
.copy-row input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; }
.copy-row button, .admin-row-actions button, .event-admin-list button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-soft); white-space: nowrap; cursor: pointer; }
.member-admin-list, .event-admin-list { display: grid; }
.member-admin-list article, .event-admin-list article { padding: 14px 0; border-top: 1px solid var(--line); }
.member-admin-list article { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; }
.member-admin-list article > div:nth-child(2) { display: grid; }
.password-requests { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.purchase-admin-list { display: grid; }
.purchase-admin-list article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); }
.purchase-admin-list article > div:first-child { display: grid; }
.purchase-admin-list a, .purchase-admin-list small, .admin-empty { color: var(--muted); }
.purchase-admin-list .confirm-button { border-color: var(--ink); background: var(--ink); color: var(--paper-soft); }
.resource-admin-list { display: grid; }
.resource-admin-list article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.resource-admin-list article > div:first-child { display: grid; gap: 3px; min-width: 0; }
.resource-admin-list article.is-archived { opacity: .62; }
.resource-admin-list small, .resource-admin-list a, .resource-status { color: var(--muted); }
.resource-status { font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.admin-action-link { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-soft); color: var(--ink) !important; text-decoration: none; white-space: nowrap; }

/* Match the monochrome public site: DM Sans, crisp rules and almost-square surfaces. */
.member-page,
.member-auth-page,
.admin-member-page {
    color: var(--ink);
    background-color: var(--paper);
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}
.member-topbar {
    background: rgba(251, 251, 250, .96);
}
.brand-name,
h1,
.today-panel h2,
.marketplace-panel h2,
.piggy-bank-panel h2,
.section-heading h2,
.empty-state h2,
.full-marketplace .market-card h2,
.knowledge-callout h2,
.knowledge-categories strong,
.knowledge-contribute h2,
.rich-editor h2,
.rich-editor h3,
.knowledge-rich-content h2,
.knowledge-rich-content h3,
.knowledge-card-copy h2,
.profile-karma-summary h2,
.karma-shop h2,
.karma-info h2,
.member-card h2,
.event-card h2,
.event-card time strong,
.admin-panel h2 {
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
}
.eyebrow,
.sidebar-group p,
.rich-field-label,
.stacked-form label,
.admin-form label,
.auth-form label,
.invoice-facts dt {
    letter-spacing: .08em;
}
.welcome-panel,
.daily-panel,
.today-panel,
.composer,
.post-card,
.piggy-bank-panel,
.marketplace-panel,
.rail-panel,
.view-hero,
.create-panel,
.profile-form,
.profile-karma-summary,
.knowledge-callout,
.karma-info,
.member-card,
.event-card,
.empty-state,
.knowledge-card,
.admin-panel,
.auth-card {
    border-color: var(--line);
    border-radius: 3px;
    background: rgba(255, 255, 255, .95);
    box-shadow: none;
}
.today-panel a,
.welcome-steps a,
.market-card,
.event-card time,
.knowledge-categories a,
.knowledge-admin-callout,
.knowledge-contribute,
.karma-shop,
.purchase-pending,
.member-toast,
.form-message {
    border-color: var(--line);
    border-radius: 3px;
    background: #fff;
    box-shadow: none;
}
.karma-rules,
.help-bounty > span,
.thank-form button,
.thanked-label,
.knowledge-admin-callout,
.knowledge-contribute,
.karma-shop {
    border-color: var(--line);
    background: #f2f2f0;
    color: var(--ink);
}
.member-search input,
.member-search button,
.composer-title,
.composer textarea,
.reply-form textarea,
.reply-form button,
.market-card-actions button,
.market-card-actions a,
.stacked-form input,
.stacked-form textarea,
.stacked-form select,
.admin-form input,
.admin-form textarea,
.admin-form select,
.auth-form input,
.rich-toolbar,
.rich-toolbar button,
.rich-toolbar select,
.rich-editor,
.knowledge-existing-media button,
.knowledge-owner-actions button,
.knowledge-archive-list button,
.copy-row input,
.copy-row button,
.admin-row-actions button,
.event-admin-list button,
.admin-action-link {
    border-color: var(--line);
    border-radius: 3px;
    background-color: #fff;
    box-shadow: none;
}
.button,
.member-search button {
    border-color: var(--ink);
    border-radius: 3px;
    background: var(--ink);
    color: #fff;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.button:hover {
    border-radius: 3px;
}
.quiet-button {
    background: #fff;
    color: var(--ink);
}
.karma-balance,
.icon-button,
.sidebar-user-profile {
    background: #fff;
}
.sidebar-user-avatar,
.mini-avatar {
    background: var(--ink);
    color: #fff;
}
.sidebar-group a.active {
    color: var(--ink);
    font-weight: 500;
}
.market-tag,
.knowledge-tags span {
    background: #eeeeec;
    color: var(--ink);
}
.rich-editor:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 2px rgba(11, 11, 11, .1);
}
.rich-editor blockquote,
.knowledge-rich-content blockquote {
    border-left-color: var(--ink);
}
.tone-1 { background: #111; }
.tone-2 { background: #292929; }
.tone-3 { background: #414141; }
.tone-4 { background: #202020; }
.tone-5 { background: #353535; }
.tone-6 { background: #4a4a4a; }
.tone-7 { background: #5a5a5a; }
.member-toast.success,
.member-toast.error,
.form-message.success,
.form-message.error {
    border-left-color: var(--ink);
}

@media (max-width: 1120px) {
    .member-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .knowledge-intro-desktop { display: none; }
    .knowledge-intro-mobile { display: block; }
}

@media (max-width: 820px) {
    .member-search { grid-template-columns: 1fr auto; }
    .member-search label { grid-column: 1 / -1; }
    .member-sidebar {
        flex-direction: row;
        min-height: 0;
    }
    .sidebar-user {
        flex: 0 0 auto;
        margin-top: 0;
        padding: 0 0 0 12px;
        border-top: 0;
        border-left: 1px solid var(--line);
    }
    .sidebar-user-profile {
        min-height: 42px;
        padding: 0 10px;
        border-radius: 6px;
        background: rgba(255, 255, 255, .9);
    }
    .member-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid { grid-template-columns: 1fr; }
    .profile-karma-summary { align-items: flex-start; flex-direction: column; }
    .knowledge-admin-callout { align-items: flex-start; flex-direction: column; }
    .knowledge-contribute { align-items: flex-start; flex-direction: column; }
    .knowledge-categories { grid-template-columns: 1fr; }
    .karma-shop { grid-template-columns: 1fr; }
    .karma-shop form, .purchase-pending { min-width: 0; }
}

@media (max-width: 560px) {
    .member-topbar { position: relative; }
    .topbar-nav { margin-inline: -14px; padding-inline: 14px; scrollbar-width: none; }
    .member-search { grid-template-columns: 1fr; }
    .member-search button { width: 100%; }
    .member-rail { grid-template-columns: 1fr; }
    .composer-title { grid-column: 1; }
    .karma-rules { grid-column: 1; grid-template-columns: 1fr; }
    .composer-actions { align-items: stretch; }
    .chip-button { flex: 1 1 calc(50% - 8px); justify-content: center; }
    .reply-form { grid-template-columns: 1fr; margin-left: 0; }
    .reply-form button { width: 100%; }
    .marketplace-panel, .piggy-bank-panel, .welcome-panel, .daily-panel, .today-panel, .view-hero, .profile-form, .profile-karma-summary, .knowledge-callout, .karma-info, .member-card, .event-card, .empty-state { padding: 18px; }
    .welcome-steps { gap: 8px; }
    .welcome-steps a { min-height: 0; }
    .event-card { grid-template-columns: 58px minmax(0, 1fr); gap: 14px; }
    .event-card time { height: 58px; }
    .member-card { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
    .full-marketplace { grid-template-columns: 1fr; }
    .member-toast { top: 12px; right: 12px; }
    .karma-balance { padding-inline: 8px; }
    .karma-balance b { font-size: .86rem; }
    .admin-heading, .copy-row, .admin-row-actions { align-items: stretch; flex-direction: column; }
    .admin-heading { align-items: flex-start; }
    .admin-form { grid-template-columns: 1fr; }
    .admin-form label, .admin-form .button { grid-column: 1; }
    .member-admin-list article { grid-template-columns: 42px minmax(0, 1fr); }
    .member-admin-list .admin-row-actions { grid-column: 1 / -1; }
    .purchase-admin-list article { align-items: stretch; flex-direction: column; }
    .resource-admin-list article { align-items: stretch; flex-direction: column; }
    .invoice-facts { grid-template-columns: 1fr; }
    .invoice-facts div:nth-child(even) { padding-left: 0; border-left: 0; }
    .invoice-actions .button { width: 100%; }
}
