:root {
    color-scheme: dark;
    --background: #141612;
    --surface: #1b1e17;
    --raised: #22251d;
    --hover: #2a2e24;
    --rule: #353a2e;
    --soft-rule: #292e24;
    --text: #f1f3eb;
    --muted: #a9b1a2;
    --accent: #c9f476;
    --on-accent: #1b280c;
    --accent-soft: #293822;
    --hero: #202719;
    --hero-line: #647945;
    --danger: #ffb7ae;
    --danger-bg: #422621;
    --shadow: 0 15px 45px #0004;
    --radius: 12px;
    --font: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

:root[data-theme="light"],
:root[data-default-theme="light"]:not([data-theme]) {
    color-scheme: light;
    --background: #f5f6ef;
    --surface: #fff;
    --raised: #eff2e7;
    --hover: #e7ecdc;
    --rule: #d1d8c7;
    --soft-rule: #e2e6da;
    --text: #1c2516;
    --muted: #53614e;
    --accent: #35591c;
    --on-accent: #fff;
    --accent-soft: #e5efd6;
    --hero: #e7efd8;
    --hero-line: #a1b985;
    --danger: #852c26;
    --danger-bg: #f9e4e0;
    --shadow: 0 15px 45px #34452a1a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: var(--background); color: var(--text); font: 400 15px/1.55 var(--font); }
h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2, h3 { line-height: 1.15; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 3.9vw, 3.5rem); font-weight: 740; letter-spacing: -.048em; }
h2 { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 700; letter-spacing: -.023em; }
h3 { font-size: 1.08rem; font-weight: 680; letter-spacing: -.01em; }
p, .break-word { overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea, select { color: inherit; font: inherit; }
button, summary { cursor: pointer; }
button, input[type="checkbox"] { accent-color: var(--accent); }
:where(button, a, summary, input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
time { white-space: nowrap; }
fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--rule); border-radius: var(--radius); }
legend { padding-inline: .4rem; font-weight: 680; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
    position: fixed; z-index: 20; top: 12px; left: 12px; padding: .65rem 1rem; border-radius: 7px;
    background: var(--accent); color: var(--on-accent); transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
.icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; vertical-align: -.23em; }
.muted, .field-help { color: var(--muted); }
.pre-wrap { white-space: pre-wrap; }

.site-header { position: sticky; z-index: 9; top: 0; border-bottom: 1px solid var(--rule); background: var(--background); }
.header-inner {
    display: grid; grid-template-columns: 212px minmax(160px, 580px) 1fr; gap: 20px; align-items: center;
    max-width: 1536px; min-height: 66px; padding: 10px 28px; margin-inline: auto;
}
.brand {
    display: inline-flex; align-items: center; gap: 10px; justify-self: start; min-height: 42px;
    color: var(--text); font-size: 1.55rem; font-weight: 780; letter-spacing: -.055em;
}
.brand-mark {
    position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px;
    border-radius: 10px; color: var(--on-accent); background: var(--accent);
}
.brand-mark::before, .brand-mark::after {
    position: absolute; content: ""; border: 1.8px solid currentColor; width: 16px; height: 16px; border-radius: 50%;
}
.brand-mark::before { transform: translate(-3px, -2px); }
.brand-mark::after { transform: translate(3px, 2px); }
.brand-mark span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: currentColor; top: 7px; right: 7px; }
.header-search {
    display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 42px; padding: 0 8px 0 13px;
    color: var(--muted); background: var(--surface); border: 1px solid var(--rule); border-radius: 9px;
}
.header-search:focus-within { border-color: var(--accent); }
.header-search input {
    width: 100%; min-width: 0; height: 40px; padding: 0; border: 0; background: transparent; color: var(--text); outline: 0;
}
.header-search input::placeholder { color: var(--muted); opacity: 1; }
.search-submit {
    display: grid; flex-shrink: 0; place-items: center; width: 32px; height: 32px; border: 0;
    background: transparent; color: var(--muted); border-radius: 6px;
}
.search-submit:hover, .icon-button:hover { background: var(--hover); color: var(--text); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; white-space: nowrap; }
.header-actions .button { min-height: 40px; }
.icon-button {
    display: inline-grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; padding: 0;
    border: 1px solid var(--rule); border-radius: 9px; background: var(--surface); color: var(--muted);
}
.theme-toggle svg:nth-child(2), :root[data-theme="light"] .theme-toggle svg:nth-child(1) { display: none; }
:root[data-theme="light"] .theme-toggle svg:nth-child(2) { display: block; }
.notification-link { position: relative; }
.notification-dot {
    position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; background: var(--accent); border-radius: 50%;
    box-shadow: 0 0 0 2px var(--surface);
}
.account-menu { position: relative; }
.account-menu summary { display: flex; align-items: center; gap: 3px; list-style: none; padding: 3px; border-radius: 9px; color: var(--muted); }
.account-menu summary::-webkit-details-marker, .nav-circles summary::-webkit-details-marker { display: none; }
.account-menu summary > .icon { width: 13px; }
.account-dropdown {
    position: absolute; z-index: 5; top: calc(100% + 12px); right: 0; width: 176px; padding: 5px;
    border-radius: var(--radius); border: 1px solid var(--rule); background: var(--surface); box-shadow: var(--shadow);
}
.account-dropdown a, .account-dropdown button {
    display: flex; width: 100%; align-items: center; min-height: 40px; padding: 6px 10px; text-align: left;
    border-radius: 6px; border: 0; color: var(--text); background: transparent;
}
.account-dropdown a:hover, .account-dropdown button:hover { color: var(--accent); background: var(--hover); }

.site-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: 1152px; margin-inline: auto; padding: 26px 28px 56px; min-height: 74vh; }
.site-grid.has-sidebar, .site-grid.has-aside { max-width: 1536px; }
.site-grid.has-sidebar { grid-template-columns: 204px minmax(0, 1fr); }
.site-grid.has-aside { grid-template-columns: minmax(0, 1fr) 294px; }
.site-grid.has-sidebar.has-aside { grid-template-columns: 204px minmax(0, 1fr) 294px; }
.main-content { min-width: 0; }
.main-content:focus { outline: none; }
.site-sidebar, .site-aside { align-self: start; min-width: 0; }
.site-sidebar { position: sticky; top: 86px; overflow-y: auto; max-height: calc(100dvh - 100px); scrollbar-width: thin; }
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); }
.site-footer > div {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 22px;
    max-width: 1536px; margin-inline: auto; padding: 20px 28px;
}
.site-footer > div > span { font-weight: 700; color: var(--text); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.primary-nav { display: grid; gap: 3px; padding-bottom: 17px; border-bottom: 1px solid var(--soft-rule); }
.primary-nav > a, .circle-nav > a {
    display: flex; align-items: center; gap: 10px; min-height: 41px; padding: 6px 9px; border-radius: 8px;
    color: var(--muted); font-weight: 550; font-size: .91rem;
}
.primary-nav > a { padding-inline: 11px; }
.primary-nav > a:hover, .circle-nav > a:hover { color: var(--text); background: var(--surface); }
.primary-nav > a.current, .circle-nav > a.current { background: var(--accent-soft); color: var(--accent); }
.nav-circles { margin-top: 13px; }
.nav-circles > summary {
    display: flex; justify-content: space-between; align-items: center; min-height: 38px; padding-inline: 9px 11px;
    list-style: none; color: var(--muted); font-weight: 640; font-size: .85rem; border-radius: 7px;
}
.nav-circles[open] > summary .icon { transform: rotate(180deg); }
.circle-nav { display: grid; gap: 2px; }
.circle-nav > a { min-height: 34px; padding-block: 3px; }

.circle-icon {
    display: inline-grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px;
    background: var(--icon-bg, var(--accent-soft)); color: var(--icon-color, var(--accent));
}
.circle-icon .icon { width: 58%; height: 58%; }
.circle-icon-small { width: 27px; height: 27px; border-radius: 7px; }
.circle-icon-tiny { width: 21px; height: 21px; border-radius: 6px; }
.circle-icon-large { width: 51px; height: 51px; border-radius: 13px; }
.tone-fern { --icon-bg: #344328; --icon-color: #c6ee90; }
.tone-lilac { --icon-bg: #3b3148; --icon-color: #dec4f6; }
.tone-sky { --icon-bg: #263b48; --icon-color: #b4dcf3; }
.tone-amber { --icon-bg: #463923; --icon-color: #f6d79c; }
.tone-rose { --icon-bg: #49343b; --icon-color: #f7c8d3; }
.tone-teal { --icon-bg: #273d38; --icon-color: #a7e4d4; }
:root:is([data-theme="light"], [data-default-theme="light"]:not([data-theme])) .tone-fern { --icon-bg: #e5f0d9; --icon-color: #31511c; }
:root:is([data-theme="light"], [data-default-theme="light"]:not([data-theme])) .tone-lilac { --icon-bg: #eee6f3; --icon-color: #674282; }
:root:is([data-theme="light"], [data-default-theme="light"]:not([data-theme])) .tone-sky { --icon-bg: #e3eff6; --icon-color: #285473; }
:root:is([data-theme="light"], [data-default-theme="light"]:not([data-theme])) .tone-amber { --icon-bg: #f6edd7; --icon-color: #785115; }
:root:is([data-theme="light"], [data-default-theme="light"]:not([data-theme])) .tone-rose { --icon-bg: #f6e5eb; --icon-color: #7b3d53; }
:root:is([data-theme="light"], [data-default-theme="light"]:not([data-theme])) .tone-teal { --icon-bg: #dcefe8; --icon-color: #245f52; }

.avatar {
    display: inline-block; position: relative; flex: 0 0 auto; overflow: hidden; width: 35px; height: 35px; border-radius: 35%;
    background: var(--avatar-bg); isolation: isolate;
}
.avatar-tiny { width: 19px; height: 19px; }
.avatar-small { width: 33px; height: 33px; }
.avatar-large { width: 66px; height: 66px; }
.avatar > span { position: absolute; width: 50%; height: 50%; background: var(--avatar-fg); border-radius: 50%; top: 13%; left: 13%; }
.avatar > span:nth-child(2) { top: 40%; left: 43%; opacity: .82; }
.avatar > span:nth-child(3) { top: 20%; left: 63%; width: 12%; height: 12%; background: #fff9; }
.avatar-mark-1 > span:nth-child(1), .avatar-mark-4 > span:nth-child(2) { border-radius: 30% 70% 70% 30%; transform: rotate(32deg); }
.avatar-mark-2 > span:nth-child(2), .avatar-mark-3 > span:nth-child(1) { border-radius: 25%; transform: rotate(45deg); }
.avatar-mark-5 > span:nth-child(2) { transform: translateX(-60%); }
.avatar-tone-0 { --avatar-bg: #334829; --avatar-fg: #c3ed80; }
.avatar-tone-1 { --avatar-bg: #4a3854; --avatar-fg: #e3b7ec; }
.avatar-tone-2 { --avatar-bg: #213b49; --avatar-fg: #9cdbed; }
.avatar-tone-3 { --avatar-bg: #503c29; --avatar-fg: #f2c880; }
.avatar-tone-4 { --avatar-bg: #4b3238; --avatar-fg: #ffacbf; }
.avatar-tone-5 { --avatar-bg: #284b40; --avatar-fg: #8ce4bc; }
.avatar-tone-6 { --avatar-bg: #2e3b5d; --avatar-fg: #afc1fb; }
.avatar-tone-7 { --avatar-bg: #4a452a; --avatar-fg: #f3e48a; }

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 7px 13px;
    border: 1px solid var(--rule); border-radius: 8px; background: var(--raised); color: var(--text);
    font-weight: 660; line-height: 1.25; text-align: center; white-space: normal;
}
.button:hover { color: var(--text); background: var(--hover); }
.button.primary { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.button.primary:hover { filter: brightness(.91); }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button.ghost:hover { background: var(--hover); color: var(--text); }
.button.danger { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.button.small { min-height: 36px; padding: 5px 9px; font-size: .88rem; }
.button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.text-link { display: inline-flex; align-items: baseline; gap: 5px; color: var(--accent); font-weight: 620; text-decoration: underline; text-underline-offset: 3px; }
.stack { display: grid; gap: 12px; }
.stack > button, .stack > .button, .stack > .text-link { justify-self: start; }
.panel { padding: 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.panel > div > p, .panel h2 + p { margin-top: 6px; color: var(--muted); }
.auth-card { max-width: 510px; margin: 30px auto; }
.auth-card h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.auth-card p a, .alert a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.alert { padding: 12px 15px; margin-bottom: 14px; border-radius: 9px; border: 1px solid var(--rule); background: var(--accent-soft); }
.alert > ul { margin-top: 5px; padding-left: 22px; }
.alert > p { margin: 4px 0; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.field { display: grid; gap: 6px; min-width: 0; font-weight: 620; }
.field input, .field textarea, .field select {
    display: block; width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--rule);
    border-radius: 8px; background: var(--background); font-weight: 400;
}
.field textarea { resize: vertical; min-height: 86px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .88; }
.field-help { font-size: .88rem; font-weight: 400; }
.field input[type="checkbox"], .check-row input[type="checkbox"] { width: 1.1rem; min-height: auto; height: 1.1rem; flex: 0 0 auto; }
.check-row { display: flex; align-items: center; gap: 7px; min-height: 37px; }
.form-panel { max-width: 780px; }
.form-panel + .action-details { margin-top: 14px; }
.editor-tools { display: flex; flex-wrap: wrap; gap: 5px; }
.page-heading { margin: 2px 0 20px; }
.page-heading > p, .page-heading > div > p { margin-top: 7px; color: var(--muted); max-width: 58ch; }
.page-heading > .actions { margin-top: 10px; gap: 14px; }
.section-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 13px; }
.section-heading p { margin-top: 4px; color: var(--muted); }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; color: var(--muted); font-size: .88rem; }
.breadcrumbs .icon { width: 14px; }
.breadcrumbs a:hover { text-decoration: underline; }


.welcome {
    position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: 252px;
    margin-bottom: 25px; padding: clamp(20px, 3vw, 39px); border: 1px solid var(--hero-line); border-radius: 16px;
    background: radial-gradient(ellipse at 100% 9%, color-mix(in srgb, var(--hero-line), transparent 59%), transparent 60%), var(--hero);
}
.welcome-content { position: relative; max-width: 515px; z-index: 1; }
.welcome h1 { max-width: 17ch; font-size: clamp(2.2rem, 4.2vw, 4.1rem); font-weight: 750; line-height: .98; text-wrap: balance; }
.welcome p { max-width: 42ch; margin: 15px 0 16px; color: var(--muted); }
.welcome-link { padding: 7px 4px; font-weight: 640; color: var(--accent); }
.welcome-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.welcome-art {
    position: absolute; inset: 0 0 0 48%; opacity: .86; pointer-events: none;
    background-image: radial-gradient(var(--hero-line) 1px, transparent 1.1px); background-size: 13px 13px;
    mask-image: linear-gradient(90deg, transparent, #000 36%);
}
.welcome-art i {
    position: absolute; top: 49%; left: 50%; width: 86%; aspect-ratio: 1.55;
    border: 1px solid var(--hero-line); border-radius: 50%; transform: translate(-48%, -50%) rotate(-34deg);
}
.welcome-art i:nth-child(2) { transform: translate(-42%, -50%) rotate(40deg); }
.welcome-art i:nth-child(3) { transform: translate(-40%, -50%) rotate(-5deg); }
.welcome-art b {
    position: absolute; top: 25%; right: 27%; width: 8px; aspect-ratio: 1; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent), transparent 80%);
}
.welcome-art b:last-child { top: 72%; right: 14%; width: 5px; background: var(--hero-line); }

.feed-tabs {
    display: flex; align-items: center; gap: 5px; overflow-x: auto; padding: 4px; margin: 0 0 10px;
    background: var(--surface); border: 1px solid var(--rule); border-radius: 9px;
}
.feed-tabs a {
    display: flex; align-items: center; justify-content: center; min-height: 34px; padding: 4px 13px; border-radius: 6px;
    color: var(--muted); font-size: .9rem; white-space: nowrap; font-weight: 650;
}
.feed-tabs a:hover { background: var(--hover); color: var(--text); }
.feed-tabs a.current { color: var(--accent); background: var(--accent-soft); }
.feed-list { display: grid; gap: 9px; }
.discussion-card {
    display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 13px; padding: 15px 16px; min-width: 0;
    border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface);
}
.discussion-card:hover, .circle-card:hover { border-color: var(--hero-line); }
.card-score {
    display: flex; flex-direction: column; align-items: center; align-self: start; justify-content: center; min-height: 48px;
    padding: 3px; gap: 1px; font-weight: 700; font-size: .87rem; border: 1px solid var(--soft-rule);
    border-radius: 7px; background: var(--raised); color: var(--accent);
}
.card-score .icon { width: 15px; height: 15px; }
.card-main { display: grid; gap: 5px; min-width: 0; }
.card-main h3 { font-size: clamp(1.02rem, 1.6vw, 1.24rem); }
.card-main > p, .list-panel p { color: var(--muted); font-size: .91rem; }
.card-meta, .card-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; font-size: .82rem; line-height: 1.35; color: var(--muted); }
.card-footer { gap: 6px 12px; margin-top: 5px; }
.card-meta a, .card-footer a { max-width: 100%; overflow-wrap: anywhere; }
.card-circle, .author-link, .comment-count, .meta-label, .accepted-label { display: inline-flex; align-items: center; gap: 5px; }
.card-circle { color: var(--text); font-weight: 630; }
.author-link { min-width: 0; overflow-wrap: anywhere; font-weight: 560; color: var(--muted); }
.separator { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.accepted-label { font-size: .82rem; font-weight: 650; color: var(--accent); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag, .tag-filter a {
    display: inline-flex; min-height: 25px; align-items: center; padding: 1px 7px; font-size: .83rem; line-height: 1.2;
    border: 1px solid var(--rule); border-radius: 6px; color: var(--muted); background: var(--raised);
}
a.tag:hover { color: var(--accent); border-color: var(--accent); }
.tag-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 10px; font-size: .88rem; }
.tag-filter a { text-decoration: underline; }
.empty-state {
    display: grid; min-height: 125px; place-items: center; align-content: center; justify-items: center; text-align: center; gap: 7px;
    padding: 17px; border: 1px dashed var(--rule); border-radius: var(--radius); background: var(--surface); color: var(--muted);
}
.empty-state > .icon { color: var(--accent); width: 23px; height: 23px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 11px; flex-wrap: wrap; margin: 17px 0 0; }

.aside-stack { display: grid; gap: 13px; }
.aside-panel { padding: 15px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.aside-panel h2 { display: flex; align-items: center; gap: 7px; font-size: 1rem; font-weight: 700; }
.aside-panel h2 > .icon { color: var(--accent); }
.aside-panel p { margin-top: 8px; color: var(--muted); font-size: .88rem; }
.aside-panel > .text-link { margin-top: 10px; font-size: .88rem; }
.resource-list { display: grid; list-style: none; padding: 0; }
.resource-list li { padding: 11px 0; border-bottom: 1px solid var(--soft-rule); }
.resource-list li:last-child { padding-bottom: 2px; border-bottom: 0; }
.resource-list a { display: flex; align-items: start; justify-content: space-between; gap: 8px; font-weight: 630; overflow-wrap: anywhere; }
.resource-list a > .icon { width: 15px; height: 15px; color: var(--muted); }
.resource-list p { margin-top: 4px; color: var(--muted); font-size: .87rem; }
.featured-circles { display: grid; gap: 4px; margin: 10px 0 0; }
.featured-circles > a {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px; min-height: 39px; padding: 4px;
    border-radius: 7px; font-size: .88rem; font-weight: 630;
}
.featured-circles > a:hover { background: var(--hover); }
.featured-circles > a > .icon { width: 14px; color: var(--muted); }
.aside-note {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 9px;
    padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--hero);
}
.aside-note > .icon { margin-top: 1px; color: var(--accent); }
.aside-note h2 { font-size: .95rem; }
.aside-note p, .aside-note .text-link { margin-top: 5px; font-size: .86rem; }
.aside-note p { color: var(--muted); }

.circle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 12px; }
.circle-grid + .panel { margin-top: 17px; }
.circle-card {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 15px; min-height: 115px;
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
.circle-card h2 { font-size: 1.08rem; }
.circle-card p { margin: 5px 0 2px; font-size: .9rem; color: var(--muted); }
.circle-card-link { display: grid; place-items: center; align-self: start; width: 32px; height: 32px; color: var(--accent); border-radius: 7px; }
.circle-card-link:hover { background: var(--accent-soft); }
.circle-heading, .profile-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 14px; margin-bottom: 20px; }
.circle-heading h1, .profile-heading h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.circle-heading p, .profile-heading p { margin: 5px 0 0; color: var(--muted); }
.circle-heading .actions, .circle-heading .meta-label { margin-top: 12px; }
.circle-rules { margin-bottom: 13px; }
.search-section { margin-top: 16px; }

.discussion-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; }
.discussion-detail h1 { font-size: clamp(1.95rem, 4vw, 3.35rem); line-height: 1.06; }
.discussion-detail .prose { margin: 4px 0; }
.prose-page { width: min(100%, 850px); margin-inline: auto; }
.prose-page > header, .prose-page > h1 { margin-bottom: 15px; }
.prose { max-width: 100%; overflow-wrap: anywhere; }
.prose > * + * { margin-top: .85em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.45rem; }
.prose pre {
    max-width: 100%; padding: 12px 13px; overflow-x: auto; border: 1px solid var(--rule);
    border-radius: 8px; background: var(--background); line-height: 1.45; white-space: pre;
}
.prose code, .auth-card code { font-family: "IBM Plex Mono", Consolas, monospace; font-size: .91em; }
.prose :not(pre) > code { padding: .13em .3em; border-radius: 4px; background: var(--raised); }
.prose blockquote { margin-inline: 0; padding-inline: 11px; border-inline-start: 3px solid var(--hero-line); color: var(--muted); }
.prose table { display: block; max-width: 100%; overflow: auto; border-collapse: collapse; }
.prose :is(pre, table):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prose td, .prose th { padding: 7px; border: 1px solid var(--rule); text-align: left; }
.external-card {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center;
    padding: 10px 11px; border: 1px solid var(--rule); border-radius: 8px; background: var(--raised);
}
.external-card > .icon { color: var(--accent); }
.external-card small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.remote-image { display: inline-block; max-width: 100%; }
.remote-image a { display: inline-flex; min-height: 38px; align-items: center; padding: 4px 9px; color: var(--accent); border: 1px solid var(--rule); border-radius: 7px; background: var(--raised); }
.remote-image img { display: block; max-height: 66vh; object-fit: contain; border-radius: 8px; }
.discussion-actions { padding-top: 9px; border-top: 1px solid var(--soft-rule); }
.vote-controls { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 5px; border-radius: 8px; background: var(--raised); color: var(--accent); font-weight: 680; }
.vote-controls > span { min-width: 1ch; text-align: center; }
.vote-controls .icon-button { width: 31px; height: 36px; border: 0; background: transparent; }
.vote-controls .icon-button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.vote-controls .icon-button:hover { background: var(--hover); }
.action-details { position: relative; min-width: 0; }
.action-details > summary {
    min-height: 36px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px;
    border-radius: 7px; color: var(--muted); font-weight: 650; font-size: .88rem;
}
.action-details > summary:hover, .action-details[open] > summary { color: var(--text); background: var(--hover); }
.action-details > form { margin-top: 7px; }
.actions > .action-details[open] { flex: 1 0 100%; }
.replies-section { margin-top: 20px; }
.reply-form { margin-bottom: 10px; }
.replying-to { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .88rem; }
.replying-to a, .reply-parent a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.reply-invite { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.reply-list, .reply-branch { list-style: none; padding: 0; }
.reply-node { margin-top: 8px; }
.reply-branch { margin-inline-start: 12px; padding-inline-start: 9px; border-inline-start: 1px solid var(--rule); }
.reply { min-width: 0; padding: 12px 13px; border: 1px solid var(--rule); border-radius: 9px; background: var(--surface); }
.reply:target, .reply-accepted { border-color: var(--hero-line); }
.reply:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.reply .prose { margin-top: 8px; }
.reply-actions { margin-top: 6px; }
.reply-permalink { display: inline-grid; place-items: center; min-width: 27px; min-height: 27px; margin-left: auto; }
.reply-parent { margin-top: 6px; font-size: .83rem; }

.list-panel, .inline-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-panel > div, .inline-row > div { min-width: 0; }
.list-panel h2 { margin-top: 4px; font-size: 1.09rem; }
.list-panel > form, .inline-row > form { flex-shrink: 0; }
.inline-row { padding: 7px 0; border-top: 1px solid var(--soft-rule); }
.session-details p { overflow-wrap: anywhere; font-size: .88rem; }
.settings-stack { display: grid; gap: 14px; max-width: 790px; }
.settings-stack .section-heading { margin: 0; }
.notification-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; }
.notification-item h2 { margin-top: 4px; }
.notification-item .actions { margin-top: 5px; }
.notification-item.unread { border-inline-start: 3px solid var(--accent); }

@media (max-width: 1180px) {
    .header-inner { grid-template-columns: 176px minmax(140px, 1fr) auto; gap: 15px; }
    .site-grid { gap: 17px; }
    .site-grid.has-sidebar { grid-template-columns: 171px minmax(0, 1fr); }
    .site-grid.has-aside { grid-template-columns: minmax(0, 1fr) 241px; }
    .site-grid.has-sidebar.has-aside { grid-template-columns: 171px minmax(0, 1fr) 241px; }
    .circle-nav > a { font-size: .86rem; gap: 6px; }
}
@media (max-width: 940px) {
    .site-grid.has-sidebar.has-aside { grid-template-columns: 171px minmax(0, 1fr); }
    .site-grid.has-sidebar.has-aside .site-aside { grid-column: 2; }
    .header-inner { grid-template-columns: 171px minmax(120px, 1fr) auto; }
    .header-compose span { display: none; }
}
@media (max-width: 720px) {
    html { scroll-padding-top: 120px; }
    .header-inner { grid-template-columns: 1fr auto; column-gap: 8px; row-gap: 5px; padding: 7px 13px; }
    .header-search { grid-column: 1 / -1; grid-row: 2; }
    .header-actions { grid-column: 2; grid-row: 1; gap: 5px; }
    .brand { font-size: 1.39rem; gap: 7px; }
    .brand-mark { width: 30px; height: 30px; }
    .header-actions .button { padding-inline: 9px; font-size: .88rem; }
    .header-actions .icon-button { width: 36px; height: 36px; }
    .header-actions .header-compose { min-width: 36px; min-height: 36px; padding: 4px; }
    .account-menu summary { padding: 0; }
    .site-grid, .site-grid.has-sidebar, .site-grid.has-aside, .site-grid.has-sidebar.has-aside {
        grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 11px 13px 35px;
    }
    .site-grid.has-sidebar.has-aside .site-aside { grid-column: 1; }
    .site-sidebar { position: static; max-height: none; overflow: visible; }
    .primary-nav { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 8px; }
    .primary-nav > a { min-height: 36px; gap: 6px; padding-inline: 8px; font-size: .87rem; }
    .nav-circles { display: none; }
    .site-footer > div { padding-inline: 13px; }
    .welcome { min-height: 220px; padding: 17px; margin-bottom: 17px; }
    .welcome-art { opacity: .42; }
    .welcome h1 { max-width: 17ch; }
    .welcome p { margin-block: 11px; }
    .feed-tabs a { min-height: 38px; padding-inline: 9px; }
    .panel { padding: 13px; }
    .reply-branch { margin-inline-start: 5px; padding-inline-start: 4px; }
    .discussion-card { grid-template-columns: 33px minmax(0, 1fr); gap: 8px; padding: 11px; }
    .card-score { min-height: 42px; }
    .card-footer { gap: 4px 8px; }
}
@media (max-width: 350px) {
    .brand { font-size: 1.23rem; }
    .brand-mark { width: 25px; height: 25px; border-radius: 7px; }
    .header-inner, .site-grid, .site-grid.has-sidebar, .site-grid.has-aside, .site-grid.has-sidebar.has-aside { padding-inline: 8px; }
    .header-actions { gap: 3px; }
    .header-actions .button { padding-inline: 6px; }
    .account-menu summary > .icon { display: none; }
}
