/*
 * Fristående CSS för inloggning, kontoaktivering, faktura och adminsidor.
 * Den inloggade medlemsplattformen på /inne laddar inte den här filen.
 */

:root {
    --ink: #0b0b0b;
    --muted: #747474;
    --paper: #fbfbfa;
    --paper-soft: #ffffff;
    --line: rgba(11, 11, 11, 0.15);
    --moss: #0b0b0b;
    --moss-dark: #0b0b0b;
    --clay: #0b0b0b;
    --rose: #0b0b0b;
    --sky: #eeeeec;
    --shadow: none;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background-color: var(--paper);
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

button,
textarea {
    font: inherit;
}

h1,
h2,
p {
    margin-top: 0;
}

.member-brand,
.topbar-nav a,
.sidebar-link,
.sidebar-group a,
.rail-heading a,
.event-row,
.thread-row,
.intro-row,
.today-panel a {
    text-decoration: none;
}

.brand-name {
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.topbar-nav {
    display: flex;
    justify-content: center;
    gap: clamp(14px, 4vw, 42px);
    color: var(--muted);
    font-size: 0.95rem;
}

.topbar-nav a:first-child {
    color: var(--ink);
    font-weight: 700;
}

.member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper-soft);
    color: var(--ink);
    cursor: pointer;
}

.has-dot {
    position: relative;
}

.has-dot::after {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rose);
    content: "";
}

.mini-avatar {
    background: var(--moss-dark);
    color: #fff;
    font-weight: 800;
}

.member-shell {
    display: grid;
    grid-template-columns: minmax(210px, 280px) minmax(0, 700px) minmax(280px, 360px);
    align-items: start;
    gap: 24px;
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 24px clamp(16px, 3vw, 34px) 42px;
}

.member-sidebar,
.member-rail {
    position: sticky;
    top: 88px;
}

.member-sidebar {
    display: grid;
    gap: 7px;
}

.sidebar-group a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
}

.sidebar-group a:hover,
.sidebar-group a.active {
    color: var(--ink);
}

.sidebar-group a strong {
    min-width: 25px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--paper-soft);
    color: var(--moss-dark);
    font-size: 0.78rem;
    text-align: center;
}

.sidebar-group {
    display: grid;
    gap: 7px;
    margin-top: 24px;
    padding-top: 18px;
}

.sidebar-group p {
    margin-bottom: 2px;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-group a {
    color: var(--muted);
}

.member-feed {
    display: grid;
    gap: 18px;
}

.welcome-panel,
.daily-panel,
.today-panel,
.composer,
.post-card,
.piggy-bank-panel,
.marketplace-panel,
.rail-panel {
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.welcome-panel {
    padding: clamp(22px, 4vw, 38px);
    background: var(--paper-soft);
}

.daily-panel {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    padding: 26px;
}

.daily-panel p:last-child {
    max-width: 320px;
    margin-bottom: 0;
    color: var(--muted);
}

.today-panel {
    display: grid;
    grid-template-columns: minmax(170px, 0.9fr) repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 16px;
    box-shadow: none;
}

.today-panel h2 {
    margin-bottom: 0;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1.08;
}

.today-panel a {
    display: grid;
    gap: 5px;
    min-height: 108px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.78);
}

.today-panel span {
    color: var(--muted);
    font-size: 0.9rem;
}

.eyebrow {
    margin-bottom: 10px;
    color: var(--moss-dark);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin-bottom: 12px;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(2.15rem, 4vw, 3.7rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0;
}

.rail-panel h2,
.post-card h2 {
    margin-bottom: 2px;
    font-size: 1rem;
    line-height: 1.25;
}

.welcome-panel > p:not(.eyebrow) {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.05rem;
}

.welcome-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0;
}

.welcome-steps a {
    min-height: 132px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.welcome-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-bottom: 15px;
    border-radius: 50%;
    background: var(--clay);
    color: #fff;
    font-weight: 800;
}

.welcome-steps strong,
.welcome-steps small {
    display: block;
}

.welcome-steps small,
.post-meta p,
.intro-row small,
.intro-row em,
.event-row small,
.thread-row span,
.help-row span,
.help-row small {
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid var(--ink);
    border-radius: 3px;
    background: var(--ink);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.quiet-button {
    background: #fff;
    color: var(--ink);
}

.small-button {
    margin-left: auto;
}

.composer {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px 14px;
    padding: 18px;
}

.mini-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 50%;
    font-size: 0.9rem;
}

.composer label {
    align-self: center;
    color: var(--muted);
}

.composer textarea,
.composer-actions {
    grid-column: 2;
}

.composer textarea {
    width: 100%;
    min-height: 92px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    color: var(--ink);
    resize: vertical;
}

.composer-actions,
.post-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.chip-button,
.post-actions button {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.post-card {
    padding: 24px;
}


.post-meta {
    display: flex;
    gap: 13px;
    margin-bottom: 18px;
}

.post-meta p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.post-card > p {
    color: var(--ink);
    font-size: 1.02rem;
}

.compact-list {
    margin: 16px 0 0;
    padding-left: 20px;
    color: var(--muted);
}

.marketplace-panel {
    display: grid;
    gap: 18px;
    padding: 26px;
    box-shadow: none;
}

.marketplace-intro {
    max-width: 620px;
}

.marketplace-panel h2 {
    margin-bottom: 10px;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(1.9rem, 3vw, 3rem);
    font-weight: 500;
    line-height: 1.06;
}

.marketplace-intro p:not(.eyebrow) {
    color: var(--muted);
}

.marketplace-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.marketplace-filters a,
.marketplace-submit {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    text-decoration: none;
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.market-card {
    min-height: 180px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 3px;
}

.market-card h3 {
    margin: 12px 0 8px;
    font-size: 1.04rem;
    line-height: 1.2;
}

.market-card p {
    color: var(--ink);
}

.market-card small {
    color: var(--muted);
}

.market-tag {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--sky);
    color: var(--moss-dark);
    font-size: 0.76rem;
    font-weight: 800;
}

.marketplace-submit {
    justify-self: start;
    background: var(--ink);
    color: #fff;
}

.piggy-bank-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 190px);
    align-items: center;
    gap: 22px;
    padding: 26px;
    overflow: hidden;
    background: var(--paper-soft);
}

.piggy-bank-panel h2 {
    margin-bottom: 10px;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 500;
    line-height: 1.06;
}

.piggy-bank-panel p:not(.eyebrow) {
    max-width: 520px;
    color: var(--muted);
}

.piggy-bank-panel img {
    width: min(100%, 180px);
    justify-self: center;
    opacity: 0.9;
}

.piggy-bank-meter {
    height: 12px;
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(11, 11, 11, 0.07);
}

.piggy-bank-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--moss);
}

.piggy-bank-numbers {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
}

.piggy-bank-numbers strong {
    font-size: 1.35rem;
}

.piggy-bank-numbers span {
    color: var(--muted);
}

.post-actions {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.member-rail {
    display: grid;
    gap: 18px;
}

.rail-panel {
    padding: 18px;
    box-shadow: none;
}

.rail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.rail-heading a {
    color: var(--muted);
    font-size: 0.88rem;
}

.event-row,
.intro-row,
.help-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.help-row {
    display: grid;
    gap: 2px;
    text-decoration: none;
}

.event-row time {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--paper);
    text-transform: uppercase;
}

.event-row time strong {
    line-height: 1;
}

.event-row time span,
.event-row small,
.intro-row small,
.intro-row em,
.thread-row span {
    display: block;
    font-size: 0.82rem;
}

.intro-row em {
    margin-top: 3px;
    color: var(--moss-dark);
    font-style: normal;
    font-weight: 700;
}

.market-row,
.thread-row {
    display: grid;
    gap: 2px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.market-row span {
    color: var(--muted);
    font-size: 0.82rem;
}

.latest-introductions {
    align-self: end;
}

.tone-a { background: #111; }
.tone-b { background: #292929; }
.tone-c { background: #414141; }
.tone-d { background: #202020; }
.tone-e { background: #353535; }
.tone-f { background: #4a4a4a; }
.tone-g { background: #5a5a5a; }

body:not(.is-first-visit) [data-first-visit],
body.is-first-visit [data-returning] {
    display: none;
}

@media (max-width: 1120px) {
    .member-shell {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .member-rail {
        position: static;
        grid-column: 2;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rail-panel {
        min-width: 0;
    }
}

@media (max-width: 820px) {
    .topbar-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .member-shell {
        grid-template-columns: 1fr;
    }

    .member-sidebar,
    .member-rail {
        position: static;
        grid-column: auto;
    }

    .member-sidebar {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .sidebar-group a {
        min-width: max-content;
        gap: 10px;
        background: rgba(255, 255, 255, 0.9);
    }

    .sidebar-group {
        display: none;
    }

    .member-rail,
    .welcome-steps,
    .today-panel {
        grid-template-columns: 1fr;
    }

    .marketplace-grid {
        grid-template-columns: 1fr;
    }

    .daily-panel {
        display: block;
    }

    .piggy-bank-panel {
        grid-template-columns: 1fr;
    }

    .piggy-bank-panel img {
        width: 150px;
    }
}

@media (max-width: 560px) {
    .brand-name {
        font-size: 1.25rem;
    }

    .member-actions {
        gap: 6px;
    }

    .icon-button {
        width: 34px;
        height: 34px;
    }

    .member-shell {
        padding: 14px 12px 30px;
    }

    .composer {
        grid-template-columns: 1fr;
    }

    .composer textarea,
    .composer-actions {
        grid-column: 1;
    }

    .composer .mini-avatar {
        display: none;
    }

    .small-button {
        width: 100%;
        margin-left: 0;
    }

    .post-card,
    .rail-panel,
    .composer {
        padding: 16px;
    }
}
@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; }
.composer.composer-no-avatar { grid-template-columns: minmax(0, 1fr); }
.composer.composer-no-avatar label,
.composer.composer-no-avatar .composer-title,
.composer.composer-no-avatar textarea,
.composer.composer-no-avatar .karma-rules,
.composer.composer-no-avatar .composer-actions { grid-column: 1; }
.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 { flex: 0 0 18px; width: 18px; height: 18px; accent-color: var(--action); }
.boost-toggle input:disabled + span { color: var(--muted); opacity: .65; }
.karma-shortage { grid-column: 2; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.composer.composer-no-avatar .karma-shortage { grid-column: 1; }
.composer-actions button:disabled { border-color: var(--line); background: #e5e7eb; color: #737780; cursor: not-allowed; }
.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; }
.admin-row-actions .impersonate-button { border-color: var(--ink); background: var(--ink); color: var(--paper-soft); }
.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: minmax(0, 1fr) auto; }
.member-admin-list article > div:first-child { display: grid; }
.member-admin-list article:target, .member-admin-list article.is-selected { margin-inline: -12px; padding-inline: 12px; border-left: 3px solid var(--moss); background: rgba(26, 71, 55, .05); }
.member-email-editor { margin-top: 10px; }
.member-email-editor summary { width: fit-content; color: var(--muted); font-size: .82rem; font-weight: 700; cursor: pointer; }
.member-email-editor form { display: grid; gap: 7px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.member-email-editor label { color: var(--muted); font-size: .76rem; font-weight: 800; }
.member-email-editor form > div { display: flex; gap: 8px; }
.member-email-editor input { min-width: min(340px, 55vw); min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; }
.member-email-editor small { max-width: 560px; }
.member-activation-link { display: grid; gap: 7px; margin-top: 12px; padding: 12px; border: 1px solid var(--moss); border-radius: 6px; background: var(--paper); }
.member-activation-link strong { font-size: .88rem; }
.member-activation-link .copy-row { margin-top: 3px; }
.member-intake-admin { display: grid; gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); background: var(--paper); }
.member-intake-admin p { display: grid; gap: 3px; margin: 0; color: var(--ink); white-space: normal; }
.member-intake-admin strong { font-size: .76rem; letter-spacing: .02em; }
.admin-karma-grant { display: grid; grid-template-columns: 110px minmax(180px, 1fr) auto; align-items: end; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-karma-grant label { display: grid; gap: 5px; }
.admin-karma-grant label span { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.admin-karma-grant input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
.admin-karma-grant button { min-height: 40px; padding: 8px 14px; border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: var(--paper-soft); white-space: nowrap; cursor: pointer; }
.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;
}
.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) {
    .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: 1fr; }
    .member-admin-list .admin-row-actions { grid-column: 1 / -1; }
    .member-email-editor form > div { align-items: stretch; flex-direction: column; }
    .member-email-editor input { min-width: 0; width: 100%; }
    .admin-karma-grant { grid-template-columns: 1fr; }
    .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%; }
}

/* Focused professional member platform. Deliberately scoped away from login, invoice and admin. */
body.member-page {
    --ink: #101828;
    --muted: #667085;
    --paper: #fff;
    --paper-soft: #fff;
    --line: rgba(16, 24, 40, .16);
    --moss: #173b61;
    --moss-dark: #173b61;
    --clay: #173b61;
    --rose: #b42318;
    --sky: #f2f4f7;
    --shadow: none;
    --action: #0b0b0b;
    --action-hover: #2a2a2a;
    --member-grid-line: rgba(16, 16, 16, .024);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color-scheme: light;
    background-color: var(--paper);
    background-image:
        linear-gradient(to right, var(--member-grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--member-grid-line) 1px, transparent 1px);
    background-position: 82px 6px;
    background-size: 122px 122px;
}

body.member-page ::selection {
    background: var(--moss-dark);
    color: #fff;
}

body.member-page .member-shell {
    flex: 1 0 auto;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(28px, 3.6vw, 54px);
    width: min(100%, 1440px);
    padding-top: clamp(34px, 5vw, 68px);
    padding-bottom: 72px;
}

body.member-page .member-feed {
    gap: 26px;
    width: 100%;
    min-width: 0;
}

body.member-page .member-feed.help-feed,
body.member-page .member-feed.help-compose-feed,
body.member-page .member-feed.intro-feed,
body.member-page .member-feed.knowledge-compose-feed {
    max-width: 840px;
    margin-inline: auto;
}

body.member-page .help-intro-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    padding: clamp(24px, 5vw, 46px);
    border: 1px solid var(--line);
    background: #fff;
}

body.member-page .help-intro-panel > div {
    max-width: 650px;
}

body.member-page .help-intro-panel h1 {
    margin-bottom: 14px;
    font-size: clamp(2.35rem, 6vw, 4.8rem);
}

body.member-page .help-intro-panel p:last-child,
body.member-page .help-compose-hero p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.65;
}

body.member-page .help-intro-panel .button {
    flex: 0 0 auto;
}

body.member-page .website-help-offer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--line);
    background: var(--paper-soft);
}

body.member-page .website-help-offer > div {
    max-width: 620px;
}

body.member-page .website-help-offer h2 {
    margin-bottom: 10px;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
}

body.member-page .website-help-offer p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.65;
}

body.member-page .website-help-offer .website-help-offer-expiry {
    margin-bottom: 0;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 600;
}

body.member-page .website-help-offer .button {
    flex: 0 0 auto;
}

body.member-page .help-request-form {
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    background: #fff;
}

body.member-page .help-request-form > label {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

body.member-page .knowledge-compose-panel {
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    background: #fff;
}

body.member-page .member-feed.diary-feed {
    max-width: 840px;
    margin-inline: auto;
}

body.member-page .diary-hero,
body.member-page .diary-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

body.member-page .diary-hero > div > p:last-child {
    max-width: 620px;
    margin-bottom: 0;
    color: var(--muted);
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 1.12rem;
    line-height: 1.48;
}

body.member-page .diary-settings-button {
    flex: 0 0 auto;
}

body.member-page .diary-settings-header {
    align-items: end;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
}

body.member-page .diary-settings-header h1 {
    margin: 0;
}

body.member-page .diary-settings-back {
    flex: 0 0 auto;
    padding-bottom: 6px;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 700;
    text-underline-offset: .2em;
}

body.member-page .diary-form .button {
    justify-self: start;
}

body.member-page .diary-public-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    background: #fff;
}

body.member-page .diary-public-settings h2 {
    margin-bottom: 10px;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 500;
    letter-spacing: -.03em;
}

body.member-page .diary-public-settings p:not(.eyebrow) {
    max-width: 590px;
    margin-bottom: 14px;
    color: var(--muted);
    line-height: 1.6;
}

body.member-page .diary-public-settings form {
    display: grid;
    gap: 16px;
}

body.member-page .diary-slug-field {
    display: grid;
    gap: 7px;
    max-width: 650px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

body.member-page .diary-slug-field > span {
    display: flex;
    align-items: stretch;
}

body.member-page .diary-slug-field b {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 0 9px 12px;
    border: 1px solid var(--line);
    border-right: 0;
    background: #f5f7fa;
    color: var(--muted);
    font-weight: 500;
}

body.member-page .diary-slug-field input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 9px 12px 9px 2px;
    border: 1px solid var(--line);
    border-left: 0;
    background: #f5f7fa;
    color: var(--ink);
    font: inherit;
}

body.member-page .diary-slug-field small {
    color: var(--muted);
    font-weight: 400;
    line-height: 1.45;
}

body.member-page .diary-access-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

body.member-page .diary-access-fieldset legend {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

body.member-page .diary-access-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.member-page .diary-access-options label {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    cursor: pointer;
}

body.member-page .diary-access-options label:has(input:checked) {
    border-color: var(--action);
    background: #f5f7fa;
}

body.member-page .diary-access-options input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--action);
}

body.member-page .diary-access-options span {
    display: grid;
    gap: 3px;
}

body.member-page .diary-access-options small,
body.member-page .diary-shared-password small {
    color: var(--muted);
    font-weight: 400;
    line-height: 1.45;
}

body.member-page .diary-shared-password {
    display: grid;
    gap: 7px;
    max-width: 520px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

body.member-page .diary-shared-password input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font: inherit;
}

body.member-page .public-diary-link {
    color: var(--action);
    font-size: .82rem;
    font-weight: 700;
    text-underline-offset: .2em;
}

body.member-page .diary-invite-link {
    display: grid;
    gap: 8px;
    max-width: 650px;
    margin-top: 20px;
}

body.member-page .diary-invite-link > label {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

body.member-page .diary-invite-link > div {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

body.member-page .diary-invite-link input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    background: #f8f8f8;
    color: var(--ink);
    font: inherit;
    font-size: .82rem;
}

body.member-page .diary-invite-link .button {
    flex: 0 0 auto;
}

body.member-page .diary-follower-settings {
    display: grid;
    gap: 24px;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    background: #fff;
}

body.member-page .diary-follower-settings > header h2 {
    margin-bottom: 10px;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 500;
    letter-spacing: -.03em;
}

body.member-page .diary-follower-settings > header p:not(.eyebrow) {
    max-width: 660px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.6;
}

body.member-page .diary-follower-create {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

body.member-page .diary-follower-create .button {
    justify-self: start;
}

body.member-page .diary-follower-list {
    display: grid;
    border-top: 1px solid var(--line);
}

body.member-page .diary-follower-list article {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(300px, auto) auto;
    align-items: end;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

body.member-page .diary-follower-list article > div {
    display: grid;
    gap: 3px;
}

body.member-page .diary-follower-list article > div span {
    color: var(--muted);
    font-size: .78rem;
}

body.member-page .diary-follower-list article > form {
    display: flex;
    align-items: end;
    gap: 8px;
}

body.member-page .diary-follower-list article > form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
}

body.member-page .diary-follower-list input {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    font: inherit;
}

body.member-page .diary-follower-list .is-revoked {
    opacity: .62;
}

body.member-page .diary-visibility-fieldset {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

body.member-page .diary-visibility-fieldset legend {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
}

body.member-page .diary-visibility-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.member-page .diary-visibility-options label {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
}

body.member-page .diary-visibility-options label:has(input:checked) {
    border-color: var(--action);
    background: #f5f7fa;
}

body.member-page .diary-visibility-options input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--action);
}

body.member-page .diary-visibility-options span {
    display: grid;
    gap: 3px;
}

body.member-page .diary-visibility-options small {
    color: var(--muted);
    font-weight: 400;
    line-height: 1.45;
}

body.member-page .diary-own-section,
body.member-page .diary-shared-section {
    display: grid;
    gap: 16px;
}

body.member-page .diary-entry-list {
    display: grid;
    gap: 14px;
}

body.member-page .diary-entry-card {
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    background: #fff;
}

body.member-page .diary-entry-card header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

body.member-page .diary-entry-card h2 {
    margin: 0;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 500;
    letter-spacing: -.03em;
    line-height: 1.1;
}

body.member-page .diary-entry-card time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .72rem;
}

body.member-page .diary-entry-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--muted);
    font-size: .72rem;
    white-space: nowrap;
}

body.member-page .diary-entry-meta span {
    color: var(--ink);
    font-weight: 700;
}

body.member-page .diary-entry-card > p {
    margin: 0;
    white-space: normal;
    line-height: 1.7;
}

body.member-page .diary-visibility-form {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

body.member-page .diary-visibility-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

body.member-page .diary-visibility-form select {
    min-height: 40px;
    padding: 8px 34px 8px 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font: inherit;
}

body.member-page .diary-entry-shared {
    border-left: 3px solid var(--action);
}

body.member-page .brand-name {
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: .82rem;
    font-style: normal;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

body.member-page .member-footer {
    display: flex;
    align-items: flex-end;
    min-height: 150px;
    padding: 34px clamp(16px, 3vw, 34px);
    border-top: 1px solid var(--line);
}

body.member-page .member-footer .member-brand {
    color: var(--ink);
    text-decoration: none;
}

body.member-page .topbar-nav {
    grid-column: 2;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 1.7vw, 26px);
    min-width: 0;
    overflow-x: auto;
    padding: 4px 2px;
    color: var(--muted);
    font-size: .65rem;
    letter-spacing: .11em;
    scrollbar-width: none;
    text-transform: uppercase;
}

body.member-page .member-actions {
    grid-column: 3;
    justify-self: end;
}

body.member-page .topbar-nav::-webkit-scrollbar {
    display: none;
}

body.member-page .topbar-nav a {
    flex: 0 0 auto;
    padding: 6px 0 5px;
    border-bottom: 1px solid transparent;
    white-space: nowrap;
}

body.member-page .topbar-nav .menu-link-hello {
    margin-right: -2px;
}

body.member-page .topbar-nav a.active {
    border-bottom-color: var(--moss-dark);
}

body.member-page .topbar-nav a span {
    margin-left: 3px;
    color: var(--rose);
    font-size: .6rem;
    font-weight: 700;
}

body.member-page .topbar-nav a .menu-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--action);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

body.member-page .member-menu-toggle {
    display: none;
}

body.member-page h1,
body.member-page .today-panel h2,
body.member-page .marketplace-panel h2,
body.member-page .piggy-bank-panel h2,
body.member-page .section-heading h2,
body.member-page .empty-state h2,
body.member-page .full-marketplace .market-card h2,
body.member-page .knowledge-callout h2,
body.member-page .knowledge-categories strong,
body.member-page .knowledge-contribute h2,
body.member-page .rich-editor h2,
body.member-page .rich-editor h3,
body.member-page .knowledge-rich-content h2,
body.member-page .knowledge-rich-content h3,
body.member-page .knowledge-card-link h2,
body.member-page .profile-karma-summary h2,
body.member-page .karma-shop h2,
body.member-page .karma-info h2,
body.member-page .member-card h2,
body.member-page .event-card h2,
body.member-page .event-card time strong,
body.member-page .rail-panel h2,
body.member-page .post-card h2 {
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    letter-spacing: -.03em;
}

body.member-page h1 {
    font-size: clamp(2.55rem, 5vw, 4.5rem);
    line-height: .98;
}

body.member-page .view-hero > p:last-child,
body.member-page .welcome-panel > p:not(.eyebrow),
body.member-page .post-body,
body.member-page .knowledge-card-link p,
body.member-page .knowledge-rich-content,
body.member-page .knowledge-detail-copy {
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}

body.member-page .view-hero > p:last-child,
body.member-page .welcome-panel > p:not(.eyebrow) {
    font-size: 1.12rem;
    line-height: 1.48;
}

body.member-page .intro-hero > p:not(.eyebrow) {
    max-width: 620px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.48;
}

body.member-page .intro-hero {
    display: grid;
}

body.member-page .intro-hero .button {
    justify-self: end;
    margin-top: 30px;
}

body.member-page .intro-preview-list {
    display: grid;
    gap: 12px;
}

body.member-page .intro-preview {
    border: 1px solid var(--line);
    background: #fff;
}

body.member-page .intro-preview.is-unread {
    border-left: 3px solid var(--moss-dark);
}

body.member-page .intro-preview > a {
    display: block;
    padding: clamp(20px, 3vw, 30px);
    text-decoration: none;
}

body.member-page .intro-preview:hover {
    border-color: var(--moss-dark);
}

body.member-page .intro-preview-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

body.member-page .intro-preview-meta .mini-avatar {
    width: 34px;
    height: 34px;
    font-size: .72rem;
}

body.member-page .intro-preview-meta p {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
}

body.member-page .intro-unread-label {
    margin-left: auto;
    color: var(--moss-dark);
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body.member-page .intro-preview h2 {
    margin-bottom: 8px;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 500;
    letter-spacing: -.03em;
    line-height: 1.08;
}

body.member-page .intro-preview-excerpt {
    display: -webkit-box;
    max-width: 760px;
    margin-bottom: 18px;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

body.member-page .intro-preview-open,
body.member-page .intro-back-link {
    color: var(--moss-dark);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

body.member-page .intro-back-link {
    justify-self: start;
    text-decoration: none;
}

body.member-page .intro-detail-card {
    padding: clamp(24px, 5vw, 52px);
}

body.member-page .intro-detail-card .post-meta {
    align-items: flex-start;
}

body.member-page .intro-detail-card .post-meta h1 {
    margin: 4px 0 10px;
}

body.member-page .intro-detail-body {
    max-width: 780px;
    margin: 34px 0;
    font-size: 1.08rem;
    line-height: 1.7;
}

body.member-page .eyebrow,
body.member-page .sidebar-group p,
body.member-page .rich-field-label,
body.member-page .stacked-form label {
    color: var(--moss-dark);
    font-size: .66rem;
    letter-spacing: .18em;
}

body.member-page .topbar-nav a,
body.member-page .sidebar-group a,
body.member-page .sidebar-signout,
body.member-page .rail-heading a,
body.member-page .knowledge-back-link,
body.member-page .knowledge-cancel-edit,
body.member-page .knowledge-owner-actions a {
    transition: color 160ms ease;
}

body.member-page .topbar-nav a:hover,
body.member-page .sidebar-group a:hover,
body.member-page .sidebar-signout:hover,
body.member-page .rail-heading a:hover,
body.member-page .knowledge-back-link:hover,
body.member-page .knowledge-cancel-edit:hover,
body.member-page .knowledge-owner-actions a:hover {
    color: var(--moss-dark);
}

body.member-page .topbar-nav a.active,
body.member-page .sidebar-group a.active {
    color: var(--moss-dark);
}

body.member-page .sidebar-group a {
    position: relative;
}

body.member-page .sidebar-group a.active::before {
    position: absolute;
    top: 50%;
    left: -12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--moss-dark);
    content: "";
    transform: translateY(-50%);
}

body.member-page .sidebar-group a strong,
body.member-page .karma-balance,
body.member-page .icon-button,
body.member-page .sidebar-user-profile {
    border-color: var(--line);
    background: #fff;
}

body.member-page .icon-button:hover,
body.member-page .sidebar-user-profile:hover {
    border-color: var(--moss-dark);
}

body.member-page .sidebar-user-avatar,
body.member-page .mini-avatar {
    background: var(--moss-dark);
    color: #fff;
}

body.member-page .welcome-panel,
body.member-page .daily-panel,
body.member-page .today-panel,
body.member-page .composer,
body.member-page .post-card,
body.member-page .piggy-bank-panel,
body.member-page .marketplace-panel,
body.member-page .rail-panel,
body.member-page .view-hero,
body.member-page .create-panel,
body.member-page .profile-form,
body.member-page .profile-karma-summary,
body.member-page .knowledge-callout,
body.member-page .karma-info,
body.member-page .member-card,
body.member-page .event-card,
body.member-page .empty-state,
body.member-page .knowledge-card,
body.member-page .knowledge-detail,
body.member-page .purchase-pending,
body.member-page .member-toast,
body.member-page .form-message {
    border-color: var(--line);
    border-radius: 0;
    background: #fff;
}

body.member-page .welcome-panel,
body.member-page .view-hero {
    background: var(--paper-soft);
}

body.member-page .today-panel a,
body.member-page .welcome-steps a,
body.member-page .reply p,
body.member-page .event-row time,
body.member-page .event-card time,
body.member-page .full-marketplace .market-card,
body.member-page .marketplace-filters a,
body.member-page .marketplace-submit,
body.member-page .chip-button,
body.member-page .post-actions button,
body.member-page .market-card-actions button,
body.member-page .market-card-actions a,
body.member-page .filter-row a,
body.member-page .knowledge-categories a {
    border-color: var(--line);
    border-radius: 0;
    background: #fff;
}

body.member-page .today-panel a,
body.member-page .welcome-steps a,
body.member-page .market-card,
body.member-page .member-card,
body.member-page .event-card,
body.member-page .knowledge-card,
body.member-page .knowledge-categories a {
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

body.member-page .today-panel a:hover,
body.member-page .welcome-steps a:hover,
body.member-page .market-card:hover,
body.member-page .member-card:hover,
body.member-page .event-card:hover,
body.member-page .knowledge-card:hover,
body.member-page .knowledge-categories a:hover {
    border-color: var(--moss-dark);
    background: #f8fafc;
    transform: none;
}

body.member-page .welcome-steps span {
    background: var(--moss-dark);
    color: #fff;
}

body.member-page .karma-rules,
body.member-page .help-bounty > span,
body.member-page .thank-form button,
body.member-page .thanked-label,
body.member-page .knowledge-admin-callout,
body.member-page .knowledge-contribute,
body.member-page .karma-shop {
    border-color: var(--line);
    border-radius: 0;
    background: #f5f7fa;
    color: var(--ink);
}

body.member-page .market-tag,
body.member-page .knowledge-tags span {
    background: #eef2f6;
    color: var(--ink);
}

body.member-page .member-search input,
body.member-page .composer-title,
body.member-page .composer textarea,
body.member-page .reply-form textarea,
body.member-page .reply-form button,
body.member-page .market-card-actions button,
body.member-page .market-card-actions a,
body.member-page .stacked-form input,
body.member-page .stacked-form textarea,
body.member-page .stacked-form select,
body.member-page .rich-toolbar,
body.member-page .rich-toolbar button,
body.member-page .rich-toolbar select,
body.member-page .rich-editor,
body.member-page .knowledge-existing-media button,
body.member-page .knowledge-owner-actions button,
body.member-page .knowledge-archive-list button,
body.member-page .copy-row input {
    border-color: var(--line);
    border-radius: 0;
    background-color: #fff;
    color: var(--ink);
    caret-color: var(--moss-dark);
}

body.member-page input::placeholder,
body.member-page textarea::placeholder {
    color: #98a2b3;
    opacity: 1;
}

body.member-page input:focus,
body.member-page textarea:focus,
body.member-page select:focus,
body.member-page .rich-editor:focus {
    border-color: var(--moss-dark);
    box-shadow: 0 0 0 2px rgba(24, 58, 96, .1);
    outline: none;
}

body.member-page .button,
body.member-page .member-search button,
body.member-page .marketplace-submit,
body.member-page .filter-row a.active,
body.member-page .knowledge-categories a.active,
body.member-page .chip-button:has(input:checked) {
    border-color: var(--action);
    background: var(--action);
    color: #fff;
}

body.member-page .knowledge-categories a.active span {
    color: rgba(255, 255, 255, .72);
}

body.member-page .button,
body.member-page .member-search button {
    width: fit-content;
    max-width: 100%;
    justify-self: start;
    border-radius: 0;
    font-size: .69rem;
    letter-spacing: .08em;
    transform: none;
}

body.member-page .reply-form button {
    width: fit-content;
}

body.member-page .button:hover,
body.member-page .member-search button:hover {
    border-radius: 0;
    background: var(--action-hover);
    transform: none;
}

body.member-page .quiet-button:hover {
    color: var(--action);
}

body.member-page .quiet-button {
    border-color: var(--action);
    background: transparent;
    color: var(--action);
}

body.member-page .quiet-button:hover {
    border-color: var(--action);
    background: rgba(0, 0, 0, .06);
}

body.member-page .piggy-bank-meter {
    background: #e4e7ec;
}

body.member-page .piggy-bank-meter span {
    background: var(--moss-dark);
}

body.member-page .knowledge-detail-youtube,
body.member-page .knowledge-detail-media,
body.member-page .knowledge-detail-media img,
body.member-page .knowledge-detail-media video {
    background: #000;
}

body.member-page .knowledge-rich-content a,
body.member-page .knowledge-resource-link,
body.member-page .member-business a,
body.member-page .auth-secondary-link {
    color: var(--moss-dark);
    text-decoration-color: rgba(24, 58, 96, .48);
    text-underline-offset: .18em;
}

body.member-page .knowledge-intro-mobile {
    display: block;
}

body.member-page .knowledge-filter-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

body.member-page .knowledge-filter-inline a {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 13px 18px;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
}

body.member-page .knowledge-filter-inline a:first-child {
    padding-left: 0;
}

body.member-page .knowledge-filter-inline a.active,
body.member-page .knowledge-filter-inline a:hover {
    color: var(--moss-dark);
}

body.member-page .knowledge-filter-inline a.active {
    font-weight: 700;
}

body.member-page .knowledge-filter-inline small {
    color: var(--muted);
    font-size: .65rem;
}

body.member-page .profile-navigation {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

body.member-page .profile-navigation a {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 14px 18px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 160ms ease, color 160ms ease;
}

body.member-page .profile-navigation a:hover,
body.member-page .profile-navigation a.active {
    background: #f8fafc;
    color: var(--moss-dark);
}

body.member-page .profile-navigation a.active {
    font-weight: 700;
}

body.member-page .profile-inline-fields {
    display: grid;
    gap: 24px;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    background: #fff;
}

body.member-page .profile-inline-field {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0;
}

body.member-page .profile-inline-textarea {
    width: 100%;
    min-height: 112px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.55;
    resize: vertical;
    transition: border-color 140ms ease, background-color 140ms ease, padding 140ms ease;
}

body.member-page .profile-inline-textarea.has-value:not(:focus) {
    min-height: 1.55em;
    padding: 0;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    cursor: text;
    resize: none;
}

body.member-page .profile-inline-textarea:focus {
    min-height: 112px;
    padding: 13px;
    border-color: var(--moss-dark);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(24, 58, 96, .1);
    outline: none;
    resize: vertical;
}

body.member-page .profile-autosave-status {
    min-height: 1.4em;
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
}

body.member-page .profile-autosave-status.is-error {
    color: var(--rose);
}

body.member-page .profile-location-fieldset {
    display: grid;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

body.member-page .profile-form > label,
body.member-page .profile-form .profile-location-fieldset legend,
body.member-page .profile-form .profile-location-add label {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0;
}

body.member-page .profile-form > label,
body.member-page .profile-form > .profile-location-fieldset {
    margin-top: 6px;
}

body.member-page .profile-location-fieldset legend {
    margin-bottom: 7px;
    padding: 0;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
}

body.member-page .profile-location-fieldset > small {
    color: var(--muted);
}

body.member-page .profile-location-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 5px;
}

body.member-page .profile-location-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

body.member-page .profile-location-option:has(input:checked) {
    border-color: var(--moss-dark);
    background: #f8fafc;
}

body.member-page .profile-location-option input {
    flex: 0 0 18px;
    width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--moss-dark);
}

body.member-page .profile-location-option span {
    font-size: .88rem;
}

body.member-page .profile-location-add {
    display: grid;
    grid-template-columns: minmax(220px, 320px) auto;
    align-items: end;
    justify-content: start;
    gap: 8px;
    margin-top: 9px;
}

body.member-page .profile-location-add .button {
    min-height: 48px;
}

body.member-page .filter-row[aria-label="Filtrera ort"] {
    justify-content: flex-end;
}

body.member-page a:focus-visible,
body.member-page button:focus-visible,
body.member-page input:focus-visible,
body.member-page textarea:focus-visible,
body.member-page select:focus-visible,
body.member-page [contenteditable="true"]:focus-visible {
    outline: 2px solid var(--moss-dark);
    outline-offset: 3px;
}

@media (max-width: 960px) {
    body.member-page .member-menu-toggle {
        display: inline-flex;
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        gap: 8px;
        min-height: 38px;
        padding: 8px 11px;
        border: 1px solid var(--line);
        background: #fff;
        color: var(--ink);
        font: inherit;
        font-size: .68rem;
        font-weight: 500;
        letter-spacing: .1em;
        text-transform: uppercase;
        cursor: pointer;
    }

    body.member-page .member-menu-toggle svg {
        width: 17px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-width: 1.7;
    }

    body.member-page .member-menu-toggle[aria-expanded="true"] {
        border-color: var(--action);
        background: var(--action);
        color: #fff;
    }

    body.member-page .topbar-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        max-height: calc(100dvh - 86px);
        margin: 4px 0 0;
        padding: 0;
        overflow-x: visible;
        overflow-y: auto;
        border-top: 1px solid var(--line);
        background: #fff;
    }

    html.has-js body.member-page .topbar-nav {
        display: none;
    }

    body.member-page .topbar-nav a {
        width: 100%;
        padding: 14px 12px;
        border-bottom: 1px solid var(--line);
        border-left: 2px solid transparent;
    }

    body.member-page .topbar-nav .menu-link-hello {
        margin-right: 0;
    }

    body.member-page .topbar-nav a.active {
        border-bottom-color: var(--line);
        border-left-color: var(--moss-dark);
        background: #f8fafc;
    }

    body.member-page .member-actions {
        grid-column: 3;
        grid-row: 1;
    }

    body.member-page .member-search {
        grid-column: 1 / -1;
        grid-row: 3;
    }
}

@media (max-width: 820px) {
    body.member-page .member-shell {
        gap: 24px;
        padding-top: 26px;
    }

    body.member-page .profile-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.member-page .profile-location-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.member-page .help-intro-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    body.member-page .website-help-offer {
        align-items: flex-start;
        flex-direction: column;
    }

    body.member-page .diary-follower-list article {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    body.member-page .diary-follower-list article > form {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    body.member-page h1 {
        font-size: clamp(2.35rem, 13vw, 3.35rem);
    }

    body.member-page .member-footer {
        min-height: 116px;
        padding: 28px 14px;
    }

    body.member-page .knowledge-filter-inline a {
        padding-inline: 12px;
    }

    body.member-page .knowledge-filter-inline a:first-child {
        padding-left: 0;
    }

    body.member-page .profile-navigation {
        grid-template-columns: 1fr;
    }

    body.member-page .profile-location-options {
        grid-template-columns: 1fr;
    }

    body.member-page .profile-location-add {
        grid-template-columns: 1fr;
    }

    body.member-page .diary-visibility-options {
        grid-template-columns: 1fr;
    }

    body.member-page .diary-access-options {
        grid-template-columns: 1fr;
    }

    body.member-page .diary-hero,
    body.member-page .diary-settings-header {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    body.member-page .diary-settings-button,
    body.member-page .diary-settings-back {
        align-self: flex-start;
    }

    body.member-page .diary-invite-link > div {
        align-items: stretch;
        flex-direction: column;
    }

    body.member-page .diary-invite-link .button {
        align-self: flex-start;
    }

    body.member-page .diary-public-settings {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    body.member-page .diary-public-settings form {
        min-width: 0;
    }

    body.member-page .diary-visibility-form {
        align-items: stretch;
        flex-direction: column;
    }

    body.member-page .diary-entry-card header {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}
