/* Conclave: light paper feed, charcoal chrome and violet accents. No JS or remote assets. */
:root {
  color-scheme: light;
  --canvas: #efefed;
  --paper: #fff;
  --paper-soft: #f7f7f5;
  --ink: #252932;
  --muted: #555d66;
  --line: #d9dadd;
  --line-strong: #aeb3ba;
  --purple: #694084;
  --purple-dark: #4b2866;
  --purple-soft: #f3edf7;
  --chrome: #1a1e23;
  --chrome-line: #343943;
  --success: #176b39;
  --danger: #a62f27;
  --button-bg: #694084;
  --button-hover: #4b2866;
  --side-accent-from: #faf7fb;
  --side-accent-to: #eee7f3;
  --radius: 5px;
  --space-page-y: clamp(0.55rem, 1.1vw, 0.72rem);
  --space-page-bottom: 2rem;
  --mobile-dock-height: calc(3.35rem + env(safe-area-inset-bottom, 0px));
  --space-intro-after: 0.75rem;
  --space-section: 0.85rem;
  --site-width: 1240px;
  --site-gutter: 2.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body { min-width: 320px; min-height: 100vh; display: flex; flex-direction: column; margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.5; }
body > main { flex: 1; }
button, input, select, textarea { font: inherit; }
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); line-height: 1.2; letter-spacing: -.025em; }
h2 { font-size: 1.18rem; line-height: 1.3; }
h3 { font-size: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -4rem; left: 1rem; z-index: 100; padding: .5rem 1rem; background: #fff; }
.skip-link:focus { top: .5rem; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 .45rem; color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.inline-form { display: inline; }

/* Four reserved advertising spaces, shared by every page; no remote assets. */
.advertising-strip { width: min(100% - var(--site-gutter), var(--site-width)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin: .8rem auto .15rem; }
.advertising-slot { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 100px; overflow: hidden; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(120deg, var(--paper), var(--purple-soft)); }
.advertising-slot__label { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; color: var(--muted); font-size: .62rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.advertising-slot__message { max-width: 19ch; margin: 0; color: var(--purple-dark); font-size: clamp(.85rem, 1.1vw, 1rem); font-weight: 650; line-height: 1.35; text-wrap: balance; overflow-wrap: anywhere; }
.advertising-slot__ornament { position: absolute; z-index: -1; right: -28px; bottom: -55px; width: 120px; height: 120px; border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 0 0 14px var(--paper-soft), 0 0 0 15px var(--line), 0 0 0 29px var(--paper-soft), 0 0 0 30px var(--line); opacity: .45; }
@media (max-width: 900px) {
  .advertising-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .advertising-slot { padding: .65rem .75rem; }
}

/* Charcoal masthead with compact navigation and logo. */
.site-header { background: var(--chrome); border-bottom: 1px solid var(--chrome-line); color: #f4f4f3; }
.site-header__inner { position: relative; width: min(100% - var(--site-gutter), var(--site-width)); min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1rem, 2vw, 2rem); margin: auto; }
.site-header a { color: #e9e9ec; }
.site-header a:hover { color: #fff; text-decoration: none; }
.site-header :is(a, button, input):focus-visible { outline-color: #c59ad8; }
.brand { display: inline-flex; align-items: center; gap: .2rem; flex: 0 0 auto; white-space: nowrap; }
.brand__mark { display: block; flex: 0 0 auto; width: 40px; height: 40px; }
.brand__name { color: #fff; font-size: 1.75rem; font-weight: 700; letter-spacing: -.012em; line-height: 1; text-rendering: optimizeLegibility; }
.primary-nav, .account-nav { display: flex; align-items: center; gap: .2rem; }
.primary-nav a, .account-nav > a { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem .7rem; border-bottom: 3px solid transparent; background: none; color: #d7d9dc; font-size: .9rem; white-space: nowrap; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { border-bottom-color: #b883ce; color: #fff; }
.account-nav { margin-left: 0; }
.account-nav__avatar { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--purple); color: #fff; font-weight: 700; }
.account-nav__avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.account-nav__register { border: 1px solid #9f79b5 !important; border-radius: 3px; min-height: 36px !important; margin-left: .25rem; padding: .35rem .75rem !important; }
.mobile-search { position: relative; display: block; flex: 0 0 auto; margin-left: auto; }
.mobile-search > summary {
  display: flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: .35rem;
  border: 1px solid transparent; border-radius: 3px;
  color: #eef1f4; list-style: none; cursor: pointer;
}
.mobile-search > summary::-webkit-details-marker { display: none; }
.mobile-search > summary:hover, .mobile-search[open] > summary { border-color: #725986; background: #292431; color: #fff; }
.mobile-search > summary:focus-visible { outline: 2px solid #c59ad8; outline-offset: 2px; }
.mobile-search__panel {
  position: absolute; top: calc(100% + .35rem); right: 0; z-index: 40;
  width: min(360px, calc(100vw - 2rem));
  padding: .6rem .8rem .75rem; border-top: 1px solid var(--chrome-line);
  background: var(--chrome); box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}
.mobile-search__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .4rem; max-width: 100%; }
.mobile-search__form input[type="search"] {
  grid-column: 1 / -1; min-width: 0; width: 100%; min-height: 40px;
  padding: .5rem .65rem; border: 1px solid #6a5b78; border-radius: 3px;
  background: #292d35; color: #fff; font-size: .9rem;
}
.mobile-search__form input::placeholder { color: #d3cbd9; opacity: 1; }
.mobile-search__form select { min-width: 0; width: 100%; min-height: 44px; padding: .45rem .5rem; border: 1px solid #6a5b78; border-radius: 3px; background: #292d35; color: #fff; font-size: .9rem; }
.mobile-search__form button {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-width: 44px; min-height: 44px; padding: 0 .6rem;
  border: 1px solid #6a5b78; border-radius: 3px; background: #292d35;
  color: #eee4f2; cursor: pointer;
}
.mobile-search__form button:hover { color: #fff; background: #3a3343; }
.account-menu > summary { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; padding: .4rem .55rem; border: 1px solid transparent; border-radius: 3px; color: #e9e9ec; cursor: pointer; list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover, .account-menu[open] > summary { border-color: #725986; background: #292431; color: #fff; }
.account-menu__panel { position: absolute; z-index: 30; top: calc(100% - 1px); right: 0; width: min(390px, 100%); padding: 1rem; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: var(--paper); box-shadow: 0 15px 28px rgba(12, 12, 20, .22); color: var(--ink); }
.account-menu { min-width: 0; }
.account-menu > summary { max-width: 190px; }
.account-menu__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu__chevron { color: #cdb8d6; font-size: .75rem; }
.account-menu__panel { z-index: 31; width: min(245px, 100%); padding: .4rem; }
.site-header .account-menu__panel a, .account-menu__panel button { display: block; width: 100%; padding: .65rem .75rem; border: 0; border-radius: 3px; background: none; color: var(--ink); font-size: .85rem; text-align: left; }
.site-header .account-menu__panel a:hover, .account-menu__panel button:hover { background: var(--purple-soft); color: var(--purple-dark); text-decoration: none; }
.account-menu__panel form { margin: .25rem 0 0; padding-top: .25rem; border-top: 1px solid var(--line); }

/* Overall frame */
.page-shell, .layout { width: min(100% - var(--site-gutter), var(--site-width)); margin: 0 auto; padding: var(--space-page-y) 0 var(--space-page-bottom); }
.page-shell--feed { padding-top: max(0.45rem, calc(var(--space-page-y) - 0.12rem)); }
.page-shell--columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 310px); gap: 1rem; align-items: start; }
.page-shell--feed > .page-main { grid-column: 1; grid-row: 1; }
.page-shell--feed > .page-sidebar { grid-column: 2; grid-row: 1; }
.page-shell--columns > .breadcrumbs { grid-column: 1 / -1; margin: 0 0 -0.35rem; }
.page-main, .page-sidebar, .card, .side-card { min-width: 0; }
.page-heading, .list-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 0.65rem; margin: 0 0 var(--space-intro-after); }
.page-heading h1, .list-heading h1 { margin: 0 0 0.28rem; }
.page-heading p:last-child { margin: 0; color: var(--muted); font-size: 0.92rem; }
.page-main > .page-heading:first-child, .page-main > .list-heading:first-child, .page-shell > .page-heading:first-child { margin-top: 0; }
.page-sidebar { display: grid; gap: 1rem; }
.page-sidebar--aux { padding: .75rem; border: 1px dashed #c8ccd1; border-radius: var(--radius); background: rgba(255, 255, 255, .45); }
.page-sidebar--aux .side-card { box-shadow: 0 1px 0 rgba(37, 41, 50, .04); }
.discovery-toggle, .discovery-trigger, .discovery-backdrop, .discovery-drawer__head { display: none; }
.panel-chrome { margin: -1.25rem -1.25rem 0; padding: 1rem 1.25rem .85rem; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: var(--paper-soft); }
.panel-chrome .feed-tabs { min-height: 42px; margin-top: .35rem; padding: 0 .35rem; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--paper); }
.feed-chrome { margin-bottom: .75rem; padding: .55rem .75rem .65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-soft); }
.feed-chrome .feed-tabs { min-height: 42px; margin: 0; padding: 0 .35rem; border: 0; border-radius: 0; background: transparent; }
.feed-chrome .period-form { margin: .55rem 0 0; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); }
.home-feed-header { margin-bottom: .55rem; }
.list-heading--with-sort { align-items: center; gap: .45rem .85rem; margin-bottom: .35rem; }
.list-heading__titles { min-width: 0; }
.home-feed-header__controls { display: flex; flex: 1 1 12rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .35rem .45rem; min-width: 0; }
.feed-sort-inline { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.feed-sort-inline a { padding: .32rem .72rem; border: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .82rem; font-weight: 650; }
.feed-sort-inline a:hover, .feed-sort-inline a[aria-current="page"] { border-color: var(--purple); background: var(--purple-soft); color: var(--purple-dark); text-decoration: none; }
.period-form.period-form--compact { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: .35rem; margin: 0; padding: 0; border: 0; background: transparent; font-size: .82rem; }
.period-form.period-form--compact select { max-width: 7.5rem; min-height: 32px; padding: .28rem .45rem; font-size: .82rem; }
.period-form.period-form--compact .btn--compact { min-height: 32px; }
.btn--compact { min-height: 32px; padding: .28rem .65rem; font-size: .82rem; }
.feed-stream { display: grid; gap: .45rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0 0 0.65rem; color: var(--muted); font-size: 0.87rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--purple); }
.card, .side-card, .section-card, .topic-card, .empty-state, .community-hero, .profile-hero { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.card, .side-card { padding: 1.25rem; }
.card { margin-bottom: var(--space-section); }
.card h1 { margin-bottom: .75rem; }
.card h2 { margin-bottom: .8rem; }
.side-card { margin: 0; }
.side-card h2 { padding-bottom: .75rem; margin-bottom: .9rem; border-bottom: 1px solid var(--line); font-size: .78rem; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.side-card__description { color: var(--muted); font-size: .9rem; }
.community-description { overflow-wrap: anywhere; }
.side-card--accent { padding: 1.35rem; background: linear-gradient(135deg, var(--side-accent-from), var(--side-accent-to)); border-top: 3px solid var(--purple); }
.side-card--accent h2 { padding: 0; border: 0; margin-bottom: .55rem; color: var(--ink); font-size: 1.22rem; letter-spacing: -.01em; text-transform: none; }
.side-card--accent > p:not(.eyebrow) { color: var(--muted); font-size: .91rem; }
.empty-state { padding: 2.75rem 1.5rem; text-align: center; }
.empty-state h2 { font-size: 1.35rem; }
.empty-state p { color: var(--muted); }

/* Filters and compact topic rows */
.feed-tabs { display: flex; flex-wrap: wrap; align-items: stretch; gap: .15rem; min-height: 47px; padding: 0 .65rem; background: var(--paper); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.feed-tabs a { display: inline-flex; align-items: center; padding: .7rem .9rem .55rem; border-bottom: 3px solid transparent; color: var(--muted); font-size: .9rem; font-weight: 650; }
.feed-tabs a:hover, .feed-tabs a[aria-current="page"] { color: var(--purple); border-bottom-color: var(--purple); text-decoration: none; }
.mobile-sort-menu { display: none; }
.topic-list { display: grid; gap: .45rem; }
.topic-card { display: block; border-radius: 3px; }
.topic-card:hover { border-color: #bdb5c3; }
.topic-card--spotlight { border-color: #d9c9e4; background: linear-gradient(90deg, #fbf8fd, #fff 38%); box-shadow: inset 3px 0 0 #a881bd; }
.topic-card--spotlight:hover { border-color: #b99bca; }
.topic-card__body { min-width: 0; padding: .72rem .9rem .75rem; }
.topic-card__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .55rem; margin-top: .42rem; }
.topic-card__vote { display: inline-flex; align-items: center; gap: .2rem; min-height: 34px; padding: .15rem .55rem .15rem .45rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-soft); color: var(--muted); }
form.topic-card__vote { padding: 0; }
form.topic-card__vote button { display: inline-flex; align-items: center; justify-content: center; gap: .2rem; width: 100%; min-height: 42px; padding: .25rem .55rem .25rem .45rem; border: 0; border-radius: inherit; background: none; color: var(--muted); font-size: 1.05rem; line-height: 1; cursor: pointer; }
form.topic-card__vote:hover, form.topic-card__vote:focus-within { border-color: var(--purple); background: var(--purple-soft); }
form.topic-card__vote button:hover { color: var(--purple); }
form.topic-card__vote button:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.topic-card__vote-icon { font-size: 1.05rem; line-height: 1; }
.topic-card__vote strong { font-size: .88rem; font-weight: 750; color: var(--ink); }
.topic-card__vote--own { color: var(--muted); }
.topic-card__vote--own .topic-card__vote-icon { opacity: .45; }
.topic-card__vote--guest { color: var(--purple); text-decoration: none; border-style: dashed; }
.topic-card__vote--guest:hover { background: var(--purple-soft); color: var(--purple-dark); text-decoration: none; }
.topic-card__vote--guest .topic-card__vote-icon { color: var(--purple); }
.topic-card__save { display: inline-flex; align-items: center; }
.topic-card__save .save-flag { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-soft); }
.topic-card__meta { display: flex; flex-wrap: wrap; column-gap: .4rem; align-items: center; color: var(--muted); font-size: .78rem; }
.topic-card__meta a { color: var(--muted); }
.topic-card__meta .topic-card__community { color: var(--purple); font-weight: 650; }
.topic-card__title { margin: .3rem 0 .28rem; color: var(--ink); font-size: 1.07rem; font-weight: 700; line-height: 1.36; overflow-wrap: anywhere; }
.topic-card__title a { color: var(--ink); }
.topic-card__title a:visited { color: #62546e; }
.topic-card__language { display: inline-flex; align-items: center; gap: .2rem; margin-left: .45rem; padding: .12rem .4rem; border: 1px solid var(--purple); border-radius: 999px; background: var(--purple-soft); color: var(--purple-dark) !important; font-size: .65rem; font-weight: 700; line-height: 1.2; vertical-align: middle; white-space: nowrap; }
.topic-card__language:hover { border-color: var(--purple-dark); text-decoration: none; }
.topic-card__excerpt { max-width: 78ch; margin: 0 0 .45rem; color: var(--muted); font-size: .86rem; line-height: 1.45; overflow-wrap: anywhere; }
.topic-card__actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .78rem; }
.topic-card__actions a, .topic-card__kind { display: inline-flex; align-items: center; min-height: 25px; padding: .15rem .55rem; background: #efefef; border-radius: 13px; color: #4d535c; }
.topic-card__actions a:hover { background: #e6ddec; color: var(--purple-dark); text-decoration: none; }
.topic-source { display: inline-flex; max-width: 100%; }
.topic-source__link { position: relative; display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; overflow-wrap: anywhere; }
.topic-source__label { min-width: 0; overflow-wrap: anywhere; }
.topic-source__warning { display: inline-grid; flex: none; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 999px; background: #fff0d7; color: #845313; font-size: .82rem; }
.topic-source__tip { display: none; position: absolute; z-index: 5; left: 0; bottom: calc(100% + .35rem); width: max-content; max-width: min(17rem, 70vw); padding: .45rem .6rem; border: 1px solid #b78b50; border-radius: .3rem; background: #fff9ec; color: #3d3020; box-shadow: 0 2px 8px #0002; font-size: .75rem; line-height: 1.35; font-weight: 500; white-space: normal; text-align: left; }
.topic-source__link:hover .topic-source__tip, .topic-source__link:focus-visible .topic-source__tip { display: block; }
.save-flag { display: inline-grid; place-items: center; width: 29px; height: 29px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; }
.save-flag--active { color: #252b35; }
.save-flag:hover { background: var(--purple-soft); color: var(--purple-dark); }
.save-flag:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.topic-card__pinned { display: inline-block; margin-left: .5rem; padding: .08rem .35rem; border-radius: 3px; background: #a83229; color: #fff; font-size: .65rem; font-weight: 750; vertical-align: middle; }
.topic-card__pinned--icon { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-left: .35rem; padding: 0; border-radius: .3rem; }
.topic-card__poll { display: inline-block; margin-left: .5rem; padding: .08rem .35rem; border-radius: 3px; background: var(--purple-soft); color: var(--purple-dark); font-size: .65rem; font-weight: 750; vertical-align: middle; }
.period-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .65rem .8rem; margin-bottom: .5rem; background: var(--paper); border: 1px solid var(--line); }
.editor-panel { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.editor-panel > h2 { margin-bottom: 1rem; padding-bottom: .65rem; border-bottom: 1px solid var(--line); }
.editor-panel .form-field { margin-bottom: 1rem; min-width: 0; }
.editor-panel .form-field label { display: block; margin-bottom: .35rem; font-size: .86rem; font-weight: 700; }
.editor-panel .form-field:not(.form-field--check) input, .editor-panel .form-field textarea, .editor-panel .form-field select { width: 100%; }
.editor-panel .form-field small { display: block; margin-top: .3rem; color: var(--muted); font-size: .78rem; }
.editor-panel textarea { min-height: 110px; }
.editor-panel .form-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.editor-panel .form-field--check { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.editor-panel .form-field--check label { display: inline; margin: 0; }
.editor-panel .form-field--check small { flex-basis: 100%; margin: 0 0 0 1.5rem; }
.editor-fieldset { min-width: 0; padding: 1rem 1rem 0; margin: 1.35rem 0; border: 1px solid var(--line); border-radius: 3px; background: var(--paper-soft); }
.editor-fieldset legend { padding: 0 .35rem; color: var(--purple); font-weight: 700; }
.editor-fieldset .field-note { color: var(--muted); font-size: .8rem; }
.topic-access-explainer { margin: .25rem 0 1rem; padding: .55rem .7rem; border-left: 3px solid #b489c5; background: #f8f5fa; color: var(--muted); font-size: .79rem; line-height: 1.45; }
.topic-access-explainer p { margin: .2rem 0; }
.field-optional { color: var(--muted); font-size: .75rem; font-weight: 400; }
.editor-actions { display: flex; flex-wrap: wrap; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.period-form label, .search-summary { color: var(--muted); font-size: .87rem; }
.search-summary { margin: .6rem 0; }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 230px) auto; gap: .25rem .75rem; align-items: end; padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.search-form label { font-size: .78rem; font-weight: 700; }
.search-form label[for="search-q"] { grid-area: 1 / 1; }
.search-form #search-q { grid-area: 2 / 1; width: 100%; }
.search-form label[for="search-scope"] { grid-area: 1 / 2; }
.search-form #search-scope { grid-area: 2 / 2; width: 100%; }
.search-form button { grid-area: 2 / 3; }
.search-block { margin: 1.15rem 0; }
.search-block__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .55rem; }
.search-block h2 { margin-bottom: .55rem; }
.search-block__head h2 { margin: 0; }
.search-block > .section-card__communities { padding: 0 1rem; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.search-block > .section-card__communities li:last-child { border-bottom: 0; }
.search-block .shop-card { padding: 1rem; margin-bottom: .55rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.search-block .shop-card h3 { margin: 0 0 .2rem; }
.search-block .shop-card p:last-child { margin-bottom: 0; }
.list-heading h1, .list-heading h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.32rem); }
.list-heading .eyebrow { margin-bottom: 0.2rem; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; padding: .15rem .5rem; border-radius: 3px; background: var(--purple-soft); color: var(--purple-dark); font-size: .8rem; font-weight: 750; }

/* Sidebar identity, people and resource cards */
.side-search { display: flex; gap: .35rem; margin-bottom: .9rem; }
.side-search input { flex: 1; width: 100%; min-width: 0; }
.community-links, .people-list, .resource-links, .section-card__communities { margin: 0; padding: 0; list-style: none; }
.discovery-list { margin: 0; padding: 0; list-style: none; }
.discovery-list li + li { border-top: 1px solid var(--line); }
.discovery-list a { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: .55rem 0; color: var(--ink); overflow-wrap: anywhere; }
.discovery-list a:hover { color: var(--purple); text-decoration: none; }
.discovery-list .discovery-list__community { flex-direction: row; align-items: flex-start; justify-content: flex-start; gap: .65rem; }
.discovery-list__community > span:last-child { min-width: 0; }
.discovery-list strong { display: block; font-size: .88rem; font-weight: 650; line-height: 1.35; }
.discovery-list small { display: block; margin-top: .25rem; color: var(--muted); font-size: .73rem; }
.community-links li + li, .people-list li + li { border-top: 1px solid var(--line); }
.community-links a, .people-list a { display: flex; align-items: center; gap: .65rem; min-height: 52px; padding: .45rem .05rem; color: var(--ink); font-size: .91rem; overflow-wrap: anywhere; }
.community-links a:hover, .people-list a:hover { color: var(--purple); text-decoration: none; }
.community-links a > span:last-child, .section-card__communities a > span:last-child { margin-left: auto; color: var(--muted); }
.community-links small, .people-list small { display: block; color: var(--muted); font-size: .74rem; }
.community-links__mark, .people-list__avatar { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 6px; background: #eee5f3; color: var(--purple); font-weight: 750; }
.people-list__avatar { border-radius: 50%; }
.community-links__mark img, .people-list__avatar img, .comment-node__avatar img, .entity-card__mark img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.community-links__mark img, .entity-card__mark img { position: absolute; inset: 0; }
.entity-avatar__letter { display: grid; place-items: center; width: 100%; height: 100%; }
/* DREAD2-254: random-shops cover cards. Scoped to sidebar-shop* only; no global discovery-list changes. */
.discovery-list .sidebar-shop-row + .sidebar-shop-row { border-top: 0; margin-top: .5rem; }
.discovery-list a.sidebar-shop-card {
  display: block;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}
.discovery-list a.sidebar-shop-card:hover { color: var(--ink); text-decoration: none; }
.discovery-list a.sidebar-shop-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.sidebar-shop-card__media { position: relative; display: block; width: 100%; aspect-ratio: 1240 / 434; background: linear-gradient(160deg, #4b2866 0%, #2c1a44 100%); }
.sidebar-shop-card__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sidebar-shop-card__content {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  padding: .55rem .7rem;
  background: var(--paper-soft);
}
.sidebar-shop-card__avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--purple-soft);
  color: var(--purple);
}
.sidebar-shop-card__avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.sidebar-shop-card__letter { font-size: .8rem; font-weight: 700; line-height: 1; }
.discovery-list .sidebar-shop-card__title {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.entity-card__identity { display: inline-flex; align-items: center; gap: .7rem; min-width: 0; }
.entity-card__mark { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 8px; background: #eee5f3; color: var(--purple); font-weight: 750; }
.owned-list__row > .owned-list__identity { flex-direction: row; align-items: center; gap: .7rem; }
.resource-links li + li { margin-top: .5rem; }
.resource-links a { display: block; overflow-wrap: anywhere; font-size: .86rem; }
.rules-text { font-size: .9rem; }
.side-stat { display: flex; align-items: baseline; gap: .4rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.side-stat strong { font-size: 1.4rem; }
.side-stat span { color: var(--muted); font-size: .82rem; }

/* Hero covers: live image or gradient, identity card overlaid on the cover. */
.community-hero, .profile-hero { overflow: hidden; }
.community-hero { margin-bottom: var(--space-section); }
.hero-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 176px;
  padding: 1rem 1.15rem 1.1rem;
  background: linear-gradient(120deg, #694084, #9b59b6 62%, #b784ca);
}
.profile-hero__cover.hero-cover { min-height: 192px; }
.hero-cover__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-cover__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(18, 10, 28, 0.15) 0%, rgba(18, 10, 28, 0.55) 55%, rgba(18, 10, 28, 0.78) 100%);
  pointer-events: none;
}
.hero-cover__card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: max-content;
  max-width: min(100%, 540px);
  min-width: 0;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  background: rgba(18, 13, 30, 0.38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(22, 8, 32, 0.16);
  color: #fff;
}
.hero-cover__avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 66px;
  height: 66px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: #eee5f3;
  color: var(--purple);
  font-size: 1.65rem;
  font-weight: 750;
  box-shadow: 0 2px 8px rgba(30, 10, 40, 0.12);
}
.hero-cover__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-cover__identity { min-width: 0; flex: 1 1 12rem; }
.hero-cover__identity h1, .profile-hero h1 { margin: 0; font-size: 1.55rem; line-height: 1.15; overflow-wrap: anywhere; }
.hero-cover__identity .eyebrow { margin: 0 0 0.15rem; color: #f3e9f8; }
.hero-cover__subtitle { margin: 0.12rem 0 0; color: #f3e9f8; font-size: 0.85rem; overflow-wrap: anywhere; }
.hero-cover__tagline { margin: 0.25rem 0 0; max-height: 2.9em; overflow: hidden; color: #f3e9f8; font-size: 0.88rem; line-height: 1.45; overflow-wrap: anywhere; }
.hero-cover__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0.45rem 0 0;
  padding: 0;
  max-width: 100%;
}
.hero-cover__stats div { min-width: 3.25rem; }
.hero-cover__stats dt {
  margin: 0;
  color: rgba(243, 233, 248, 0.82);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.hero-cover__stats dd {
  margin: 0.08rem 0 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.1;
}
.profile-hero__cover.hero-cover .hero-cover__card {
  width: min(100%, 560px);
  max-width: 100%;
  align-items: flex-start;
}
.community-hero__description { max-width: 78ch; margin: .8rem 1.25rem 0; padding-bottom: 1rem; color: var(--muted); font-size: .92rem; white-space: pre-wrap; }
.community-hero__actions { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem 1.25rem 1.25rem; }
.community-hero__actions:empty { display: none; }
.link-expand { margin-top: 0.45rem; font-size: 0.86rem; }
.link-expand summary {
  display: inline-block;
  padding: 0.2rem 0.35rem;
  color: var(--purple);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.link-expand summary::-webkit-details-marker { display: none; }
.link-expand summary::before { content: "+ "; font-weight: 750; }
.link-expand[open] summary::before { content: "− "; }
.link-expand summary:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 2px; }
.link-expand .resource-links { margin-top: 0.45rem; }
.profile-hero { position: relative; margin: 0 0 0; padding-bottom: 0; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.profile-hero--compact { margin-bottom: 0; }
.profile-chrome { margin: 0 0 var(--space-section); }
.profile-chrome__row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0;
  background: var(--paper);
}
.profile-chrome .profile-tabs {
  flex: 1 1 12rem;
  margin: 0;
  min-width: 0;
  border: 0;
  border-radius: 0;
}
.profile-owner-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: stretch;
  gap: 0.35rem 0.65rem;
  padding: 0.35rem 0.75rem 0.45rem;
  border-left: 1px solid var(--line);
}
.profile-owner-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
}
.profile-owner-links a:hover,
.profile-owner-links a[aria-current="page"] {
  color: var(--purple);
  border-bottom-color: var(--purple);
  text-decoration: none;
}
.profile-owner-links .btn--compact {
  padding: 0.45rem 0.85rem;
  font-size: 0.84rem;
  white-space: nowrap;
}
.profile-tabs { margin-bottom: 0; }
.profile-public-overview__bio { margin: 0.75rem 0; max-width: 72ch; }
.profile-public-key { margin-top: .85rem; padding: 1rem; }
.profile-public-key h2 { margin: 0 0 .55rem; font-size: 1rem; }
.profile-public-key p { margin: 0 0 .65rem; overflow-wrap: anywhere; }
.profile-public-key summary { color: var(--purple-dark); cursor: pointer; font-weight: 700; }
.profile-public-key pre { max-height: 18rem; overflow: auto; margin: .7rem 0 0; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-soft); font-size: .78rem; line-height: 1.4; }
.profile-panel, .profile-public-key { min-width: 0; }
.profile-public-key__fingerprint { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.profile-public-key details, .profile-public-key pre { min-width: 0; max-width: 100%; }
.profile-security h1 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.profile-security h2 { margin: 0 0 0.75rem; font-size: 1rem; font-weight: 650; color: var(--muted); }
.profile-panel { padding: 0.95rem; background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.profile-panel > .feed-tabs.profile-sort-tabs { margin: -0.95rem -0.95rem 0.75rem; border-radius: 0; border-left: 0; border-right: 0; }
.profile-panel > .topic-list, .profile-panel > .profile-comment-list, .profile-panel > .profile-shop-list { margin-top: 0; }
.profile-feed { display: grid; gap: 1.15rem; }
.profile-feed__heading { margin: 0 0 0.55rem; font-size: 1rem; }
.profile-feed__more { margin: 0.55rem 0 0; font-size: 0.86rem; }
.profile-comment-list { display: grid; gap: 0.55rem; }
.profile-comment { padding: 0.85rem 0.95rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-soft); }
.profile-comment__context { margin: 0 0 0.35rem; font-size: 0.84rem; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.profile-comment__meta { display: flex; flex-wrap: wrap; gap: 0.15rem 0.45rem; margin: 0 0 0.55rem; font-size: 0.76rem; }
.profile-comment__body { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.profile-comment__link { margin: 0.55rem 0 0; font-size: 0.82rem; }
.profile-public-overview__rep { margin: 0.85rem 0; }
.profile-public-overview__rep strong { margin-left: 0.35rem; font-size: 1.35rem; }
.profile-shop-list { display: grid; gap: 0.65rem; }
.profile-shop-card { margin: 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-soft); }
.profile-shop-card h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.profile-empty { margin: 0; }
.profile-about { margin-bottom: 0; }

/* Directory */
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-section); align-items: stretch; }
.translation-note { margin: 0.45rem 0 0.75rem; padding: 0.55rem 0.75rem; border-left: 3px solid var(--purple); background: var(--wash); color: var(--muted); font-size: 0.88rem; }
.translation-note--outdated { border-left-color: #c4a000; }
.translation-picker { display: inline-block; position: relative; margin: .2rem 0 .6rem; font-size: .78rem; }
.translation-picker > summary { display: inline-flex; align-items: center; gap: .32rem; min-height: 30px; padding: .16rem .5rem; border: 1px solid #e2d8e9; border-radius: 999px; background: var(--paper-soft); color: var(--purple-dark); font-size: .74rem; font-weight: 600; line-height: 1.2; cursor: pointer; list-style: none; }
.translation-picker > summary::-webkit-details-marker { display: none; }
.translation-picker > summary:hover, .translation-picker[open] > summary { border-color: #bda5ca; background: var(--purple-soft); }
.translation-picker > summary:focus-visible, .translation-picker > nav a:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.translation-picker > nav { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .4rem; padding: .4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.translation-picker > nav :is(a, span) { display: inline-flex; align-items: center; min-height: 2rem; padding: .25rem .55rem; border-radius: 3px; white-space: nowrap; }
.translation-picker > nav a:hover, .translation-picker > nav span[aria-current] { background: var(--purple-soft); color: var(--purple-dark); }
.community-hero > .translation-picker { margin: 0 1.25rem .6rem; }
.access-chip { display: inline-block; margin: 0.35rem 0 0; padding: 0.15rem 0.45rem; border-radius: 4px; background: var(--wash); color: var(--ink); font-size: 0.75rem; font-weight: 600; }
.section-card { display: flex; flex-direction: column; min-width: 0; padding: 1.4rem; }
.section-card__head { display: flex; align-items: center; gap: .75rem; }
.section-card__head .eyebrow { margin-bottom: .2rem; }
.section-card__head h2 { margin: 0; font-size: 1.3rem; }
.section-card__mark { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; border-radius: 5px; background: var(--purple); color: #fff; font-size: 1.45rem; font-weight: 700; }
.section-card > p { margin: .8rem 0 1rem; color: var(--muted); }
@media (min-width: 621px) { .section-card > p { min-height: 3.2em; } }
.section-card__communities { margin: 1rem 0; border-top: 1px solid var(--line); }
.section-card__communities li { border-bottom: 1px solid var(--line); }
.section-card__communities a { display: flex; align-items: center; gap: .65rem; min-height: 53px; color: var(--ink); font-weight: 600; }
.section-card__communities a:hover { color: var(--purple); text-decoration: none; }
.section-card__community-label { min-width: 0; overflow-wrap: anywhere; }
.section-card__community-label small { display: block; margin-top: .12rem; color: var(--muted); font-size: .74rem; font-weight: 400; }

.control { min-width: 0; }
.control-nav, .control-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .7rem 0 1rem; }
.control-stats__scroll { max-width: 100%; overflow-x: auto; }
.control-search { max-width: 42rem; margin: 1rem 0; }
.control-search > div { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
.control-search input { flex: 1 1 15rem; min-width: 0; }
.control-list { display: grid; gap: .65rem; }
.control-item { margin: 0; min-width: 0; padding: 1rem; overflow-wrap: anywhere; }
.control-item h2 { margin: 0 0 .4rem; font-size: 1.15rem; }
.control-item h2 small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.control-item p { margin: .3rem 0; }
.control-item form { margin-bottom: 0; }

/* Existing forms, topic pages and pagination share one visual system. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-height: 36px; padding: .42rem .78rem; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); color: var(--ink); font-size: .88rem; font-weight: 650; text-align: center; text-decoration: none; }
.btn:hover { border-color: #bdaac8; background: var(--purple-soft); color: var(--purple-dark); text-decoration: none; }
.btn--primary { border-color: var(--purple); background: var(--button-bg); color: #fff; }
.btn--primary:hover { border-color: var(--purple-dark); background: var(--button-hover); color: #fff; }
.profile-owner-links a.btn--primary { border: 1px solid var(--purple); background: var(--button-bg); color: #fff; }
.profile-owner-links a.btn--primary:hover,
.profile-owner-links a.btn--primary:focus-visible { border-color: var(--purple-dark); background: var(--button-hover); color: #fff; }
.btn--danger { border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: #fae9e7; color: #92271f; }
input[type="search"], input[type="text"], input[type="password"], input[type="url"], input[type="email"], input[type="number"], input[type="datetime-local"], select, textarea { max-width: 100%; min-height: 38px; padding: .48rem .65rem; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--paper); color: var(--ink); }
textarea { min-height: 100px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
.form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .form textarea, .form select, .card form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .card form textarea, .card form select { width: 100%; }
.form label, .card form label { display: block; margin-bottom: .25rem; font-size: .87rem; font-weight: 650; }
.form p, .card form p { margin-bottom: 1rem; }
.form .helptext, .card form .helptext { display: block; margin-top: .25rem; color: var(--muted); font-size: .8rem; }
.image-current-preview { display: block; width: min(100%, 320px); height: 96px; margin: .35rem 0 .65rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-soft); }
.image-current-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.image-current-preview--avatar { width: 76px; height: 76px; }
.form .image-clear-option, .card form .image-clear-option, .shop-form .form-row .image-clear-option { display: inline-flex; align-items: center; gap: .5rem; margin: 0; cursor: pointer; }
.image-clear-option input[type="checkbox"] { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--purple); }
.image-clear-row { margin-top: -.3rem; }
.errorlist { padding-left: 1.2rem; color: var(--danger); font-size: .83rem; }
.notice-stack { width: min(100% - var(--site-gutter), var(--site-width)); margin: 0.45rem auto 0; }
.notice { padding: .65rem .8rem; margin: 0 0 .5rem; border: 1px solid #ccb2d9; border-radius: 3px; background: var(--purple-soft); color: var(--purple-dark); }
.notice--success { border-color: #9fc9ac; background: #e7f4eb; color: var(--success); }
.notice--error { border-color: #deaaa5; background: #fae9e7; color: #92271f; }
.vote-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .8rem; }
.vote-strip > span { min-width: 2rem; text-align: center; font-weight: 750; }
.comment-node { min-width: 0; margin: 0; padding: .55rem .7rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.comment-sort-hint { margin: .45rem 0 0; font-size: .82rem; line-height: 1.45; }
.comments-panel__chrome .comments-empty { margin: .35rem 0 0; }
.comment-branch + .comment-branch { margin-top: .5rem; }
.comment-children > .comment-branch + .comment-branch { margin-top: .45rem; }
.comment-children > .comment-branch { position: relative; }
.comment-children > .comment-branch::before { content: ""; position: absolute; top: 1.15rem; left: -.9rem; width: .75rem; border-top: 2px solid #c9b3d8; }
.comment-node__content { min-width: 0; }
.comment-node__header { display: flex; align-items: center; gap: .45rem; }
.comment-node__avatar { display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; overflow: hidden; border-radius: 50%; background: var(--purple-soft); color: var(--purple-dark); font-size: .72rem; font-weight: 750; }
.comment-node__byline { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .55rem; min-width: 0; font-size: .79rem; }
.comment-node__byline a { font-weight: 750; overflow-wrap: anywhere; }
.comment-node__byline time, .comment-node__byline span { color: var(--muted); }
.comment-node__body { margin: .35rem 0 .35rem 2.1rem; line-height: 1.5; }
.comment-node__reply-target { color: var(--purple-dark); font-weight: 700; font-size: inherit; text-decoration: underline; text-underline-offset: .12em; }
.comment-node__reply-target:hover { color: var(--purple); }
/* DREAD2-242: render a reply mention inline at the start of its markdown
   paragraph (same body font, bold) so it does not force a separate block line.
   Plain-text bodies are already inline; stored body/markdown/escaping untouched. */
.body-text--markdown > .comment-node__reply-target + p { display: inline; margin: 0; }
.comment-node__full-text > div > .comment-node__reply-target + p { display: inline; margin: 0; }
.comment-node__missing-parent { color: var(--muted); font-size: .78rem; font-style: italic; }
.comment-node__full-text { margin-top: .35rem; }
.comment-node__full-text summary { cursor: pointer; list-style-position: inside; }
.comment-node__full-text summary .comment-node__preview { display: block; color: var(--ink); font-weight: 400; white-space: pre-wrap; }
.comment-node__full-text summary .comment-node__expand,
.comment-node__full-text summary .comment-node__collapse { color: var(--purple-dark); font-weight: 700; }
.comment-node__full-text[open] .comment-node__preview,
.comment-node__full-text[open] .comment-node__expand,
.comment-node__full-text:not([open]) .comment-node__collapse { display: none; }
.comment-node__full-text > div { margin-top: .5rem; }
.comment-node__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem;
  margin: .5rem 0 0; color: var(--muted); font-size: .8rem;
}
.comment-node__actions > a { font-weight: 650; }
.comment-node__toolbar { display: inline-flex; align-items: center; gap: .2rem; }
.comment-node__votes { display: inline-flex; align-items: center; gap: .15rem; }
.comment-vote {
  display: inline-grid; place-items: center; min-width: 30px; min-height: 30px;
  padding: 0; border: 1px solid transparent; border-radius: 3px;
  background: transparent; color: var(--muted);
  line-height: 1;
}
.comment-vote svg { display: block; }
.comment-vote:hover { background: var(--purple-soft); color: var(--purple-dark); border-color: var(--purple); }
.comment-vote:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.comment-node__votes strong { min-width: 1.4rem; text-align: center; color: var(--ink); font-weight: 600; white-space: nowrap; }
.comment-node__score { color: var(--muted); }
.comment-action-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid transparent; border-radius: 3px; background: transparent;
  color: var(--muted); font-size: .82rem; text-decoration: none; cursor: pointer; list-style: none;
}
.comment-action-btn::-webkit-details-marker { display: none; }
.comment-action-btn svg { display: block; }
.comment-action-btn:hover { background: var(--purple-soft); color: var(--purple-dark); text-decoration: none; border-color: var(--purple); }
.comment-action-btn:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.comment-action-btn--pin .ui-icon { filter: brightness(0) invert(48%); }
.comment-action-btn--pin-active { background: var(--purple-soft); border-color: var(--purple); }
.comment-action-btn--pin-active .ui-icon { filter: brightness(0) saturate(100%) invert(29%) sepia(30%) saturate(2170%) hue-rotate(246deg) brightness(91%) contrast(91%); }
:root[data-theme="dark"] .comment-action-btn--pin .ui-icon { filter: brightness(0) invert(85%); }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .comment-action-btn--pin .ui-icon { filter: brightness(0) invert(85%); } }
.comment-node__more { position: relative; margin-left: auto; }
.comment-node__more > summary { width: 30px; height: 30px; }
/* Desktop-only direct action cluster (author edit/delete beside thumbs/reply):
   shown >=621px; on mobile these remain in the native More menu instead, so we
   hide the cluster and show the More edit/delete copies. */
.comment-node__direct { display: inline-flex; align-items: center; gap: .15rem; }
.comment-node__direct .comment-action-btn { width: 30px; height: 30px; }
.comment-action-btn--danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(162, 47, 39, .1); }
/* On mobile, hide the direct cluster and restore the More-menu copies (default). */
@media (max-width: 620px) {
  .comment-node__direct { display: none; }
  .comment-node__more-item--desktop-hidden { display: flex; }
}
/* On desktop, hide the More-menu copies of edit/delete/reset/moderation (they
   are shown in the direct cluster instead); moderation/reply endpoints intact.
   Every More-menu item is desktop-hidden, so on desktop the '…' menu has
   nothing to offer and collapses to a dead clickable control — hide the whole
   More trigger on desktop, preserving the native menu on mobile only. */
@media (min-width: 621px) {
  .comment-node__more { display: none; }
  .comment-node__more-item--desktop-hidden,
  .comment-node__more-item-form--desktop-hidden,
  .comment-node__moderation--desktop-hidden { display: none; }
}
.comment-node__more[open] > summary { border-color: var(--purple); background: var(--purple-soft); color: var(--purple-dark); }
.comment-node__more-menu {
  position: absolute; z-index: 25; top: calc(100% + .35rem); right: 0;
  display: grid; gap: .15rem; min-width: min(14rem, calc(100vw - 2rem));
  max-width: calc(100vw - 1rem); padding: .4rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--paper);
  box-shadow: 0 10px 26px rgba(12, 12, 20, .18);
}
.comment-node__more-item {
  display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 40px;
  padding: .35rem .55rem; border: 0; border-radius: 3px; background: none;
  color: var(--ink); font: inherit; font-size: .85rem; text-align: left; text-decoration: none; cursor: pointer;
}
.comment-node__more-item:hover { background: var(--purple-soft); color: var(--purple-dark); text-decoration: none; }
.comment-node__more-item--danger, .comment-node__more-item--danger:hover { color: var(--danger); }
.comment-node__more-item--danger:hover { background: rgba(162, 47, 39, .1); background-color: rgba(162, 47, 39, .1); }
.comment-node__more-item:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.comment-node__more-item-form { display: contents; }
.comment-node__more-item-form .comment-node__more-item { min-height: 40px; }
.comment-node__moderation { min-width: 0; margin: 0; font-size: .8rem; }
.comment-node__moderation > summary { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; color: inherit; font-weight: 650; }
.comment-node__moderation > summary::-webkit-details-marker { display: none; }
.comment-node__moderation[open] { grid-column: 1 / -1; width: 100%; }
.comment-node__moderation form { display: grid; gap: .4rem; max-width: 500px; margin: .5rem 0 0; padding: .5rem .6rem; border-top: 1px solid var(--line); }
.comment-node__moderation .btn { justify-self: start; }
.author-actions--comment .comment-action-btn { padding: 0; }
.reply-composer { min-width: 0; }
.reply-composer summary, .comment-node__moderation summary { cursor: pointer; color: var(--purple); font-weight: 650; }
.reply-composer > summary, .comment-node__moderation > summary { list-style: none; }
.reply-composer > summary::-webkit-details-marker, .comment-node__moderation > summary::-webkit-details-marker { display: none; }
/* An open reply form takes its OWN full row (votes/toggle stay on the row above).
   The toolbar must wrap so the details can flow to a second line, and the form
   uses minmax(0,1fr) + min-width:0 so its min-content never widens the page
   (reply must be fully visible/usable, no overflow:hidden/font-shrink). */
.comment-node__toolbar:has(.reply-composer[open]) { display: flex; flex-wrap: wrap; width: 100%; max-width: 100%; }
.reply-composer[open] { flex-basis: 100%; max-width: 100%; min-width: 0; margin: .4rem 0 .3rem; }
.reply-composer[open] form {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; margin-top: .5rem;
  min-width: 0; max-width: 100%;
}
.reply-composer label, .reply-composer select, .reply-composer textarea,
.reply-composer input, .reply-composer .markdown-editor-tools { width: 100%; max-width: 100%; min-width: 0; }
.reply-composer textarea { min-height: 76px; }
.reply-composer .btn { justify-self: start; }
.reply-composer .markdown-editor-tools, .reply-composer .editor-actions { width: 100%; max-width: 100%; min-width: 0; }
.comment-node__moderation { min-width: 0; margin: 0; font-size: .8rem; }
.comment-node__moderation[open] { flex-basis: 100%; margin: .25rem 0 .5rem; }
.comment-node__moderation form { display: grid; gap: .4rem; max-width: 500px; margin-top: .5rem; }
.comment-node__moderation .btn { justify-self: start; }
/* DREAD2-242: on desktop an open DIRECT moderation form takes its OWN full-width
   row below the compact control row, never beside the votes. The direct
   wrapper only flattens to `contents` at >=621px, so it cannot override the
   mobile base `.comment-node__direct { display:none; }` — mobile keeps the
   native More menu and the direct cluster stays hidden. */
@media (min-width: 621px) {
  .comment-node__toolbar:has(.comment-node__moderation--direct[open]) { display: flex; flex-wrap: wrap; width: 100%; max-width: 100%; }
  .comment-node__direct:has(.comment-node__moderation[open]) { display: contents; }
  .comment-node__direct .comment-node__moderation--direct[open] { flex-basis: 100%; min-width: 100%; }
  .comment-node__direct .comment-node__moderation--direct[open] form { width: 100%; max-width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
}
.comment-children { min-width: 0; margin: 0 0 0 .85rem; padding: .35rem 0 .05rem .75rem; border-left: 2px solid #c9b3d8; }
.comment-children > summary { position: relative; width: fit-content; max-width: 100%; margin: .05rem 0 .45rem; cursor: pointer; color: var(--purple-dark); font-size: .8rem; font-weight: 700; overflow-wrap: anywhere; }
.comment-children > summary::before { content: ""; position: absolute; top: .6em; left: -.9rem; width: .75rem; border-top: 2px solid #c9b3d8; }
.comment-children:not([open]) { padding-bottom: .2rem; }
.card__meta { color: var(--muted); font-size: .82rem; }
.card__meta a { color: var(--purple); }
.card__title { margin: .4rem 0 .65rem; font-size: 1.3rem; }
.card__title a { color: var(--ink); }
.layout > .form { width: min(100%, 780px); }
.auth-shell { display: grid; place-items: start center; }
.auth-card { width: min(100%, 460px); margin-top: 1.5rem; padding: 1.5rem; }
.auth-card h1 { margin-bottom: 1.2rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 1.25rem; border-bottom: 1px solid var(--line); }
.auth-tabs a { padding: .7rem; border-bottom: 3px solid transparent; color: var(--muted); text-align: center; font-weight: 650; }
.auth-tabs a[aria-current="page"] { border-bottom-color: var(--purple); color: var(--purple); }
.auth-tabs a:hover { color: var(--purple); text-decoration: none; }
.auth-form p { margin-bottom: 1rem; }
.auth-form label { display: block; margin-bottom: .35rem; font-weight: 650; font-size: .86rem; }
.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { width: 100%; }
.auth-form input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: .25rem .35rem 0 0; vertical-align: middle; accent-color: var(--purple); }
.auth-form .btn { width: 100%; margin-top: .35rem; }
.captcha { display: grid; grid-template-columns: minmax(0, 1fr) 2.75rem; align-items: center; gap: .65rem; max-width: 380px; margin: .15rem 0 .7rem; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: #f8f5fa; }
/* DREAD2-275: honeypot decoy field is visually-hidden, off-tab, never a
   password/username/email so browsers will not autofill it; a filled value is
   rejected server-side before account work. The whole field row (empty label
   wrapper) is collapsed on cold render too so nothing shows before site.css
   arrives. */
.hp-field { display: none; }
.auth-form p:has(.hp-field) { display: none; }
.captcha__frame { display: block; min-width: 0; overflow-x: auto; border: 1px solid #ddd3e2; border-radius: 6px; background: #fff; }
/* Click coordinates are reported in CSS pixels of the element: never scale the image. */
form .captcha .captcha__frame > input.captcha__image[type="image"][name] { display: block; width: 300px; height: 180px; max-width: none; min-height: 0; padding: 0; border: 0; border-radius: 0; cursor: crosshair; }
/* Registration text-CAPTCHA PNG: fill the answer-column width (the frame's first
   grid column), no page refresh or JS. width:100% of the frame and height:auto
   proportional, so the 300px bitmap is shown at exactly the column width with no
   distortion. Ring input[type=image] above is untouched (no click-coordinate
   scaling). */
form .captcha .captcha__frame > img.captcha__image { display: block; width: 100%; height: auto; }
.captcha__choices { display: grid; gap: .7rem; margin: .65rem 0; }
.captcha__choices label { display: grid; gap: .25rem; min-width: 0; }
.captcha__choices select { width: 100%; }
@media (min-width: 768px) { .auth-captcha-panel .captcha__choices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.captcha__refresh { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid #c9b7d1; border-radius: 8px; background: #fff; color: var(--purple); }
.captcha__refresh:hover, .captcha__refresh:focus-visible { border-color: var(--purple); background: #eee5f2; text-decoration: none; }
.guest-compose-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; margin: 0 0 1rem; padding: .85rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper-soft); }
.comment-node__reply-guest { font-size: .92rem; font-weight: 650; }
.error-page__lead { color: var(--muted); max-width: 36rem; }
.error-page__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; }
.topic-detail { padding: 1.15rem 1.25rem; }
.topic-detail--multilingual { position: relative; z-index: 1; }
.topic-detail--multilingual > .topic-card__meta { min-height: 2rem; padding-right: 12rem; }
.topic-detail--multilingual > .translation-picker { position: absolute; z-index: 20; top: 1rem; right: 1.25rem; margin: 0; }
.topic-detail--multilingual > .translation-picker > nav { position: absolute; top: calc(100% + .35rem); right: 0; display: grid; width: max-content; max-width: min(18rem, calc(100vw - 3rem)); margin: 0; box-shadow: 0 8px 20px rgba(16, 18, 24, .16); }
.topic-detail h1 { margin: .6rem 0 1rem; font-size: clamp(1.4rem, 2vw, 1.8rem); }
.topic-detail__body { max-width: 78ch; line-height: 1.58; white-space: normal; }
.topic-detail__body h2 { margin: 1.25rem 0 .45rem; font-size: 1.12rem; line-height: 1.3; }
.topic-detail__body p { margin: 0 0 .7rem; }
.topic-detail__body p:last-child { margin-bottom: 0; }
.topic-evidence-figure { margin: 1rem 0; max-width: 1240px; }
.topic-evidence-figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.topic-evidence-figure figcaption { margin-top: .4rem; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.guide-index { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.guide-index h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.guide-index__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .85rem; }
.guide-index__group { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-soft); }
.guide-index__group h3 { margin: 0 0 .7rem; font-size: 1rem; }
.guide-index__group ul { margin: 0; padding-left: 1.2rem; }
.guide-index__group li + li { margin-top: .45rem; }
.guide-index__group a { overflow-wrap: anywhere; }
.topic-detail__link { margin: 1rem 0 0; overflow-wrap: anywhere; }
.topic-detail__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: 1rem; margin-top: 1.2rem; border-top: 1px solid var(--line); }
.topic-detail__actions .vote-strip { margin: 0 auto 0 0; }
.author-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.author-actions--comment { margin-left: 0; }
.author-actions .btn { min-height: 34px; font-size: .82rem; }
.content-tombstone { margin: .75rem 0; padding: .65rem .75rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper-soft); color: var(--muted); font-style: italic; }
.content-tombstone--topic { margin-top: 0; }
.topic-pin-controls { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: .8rem; }
.topic-pin-controls form { margin: 0; }
.topic-pin-controls__button { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; max-width: 100%; white-space: normal; text-align: left; }
.topic-pin-controls__button .ui-icon { --ui-icon-size: 18px; }
.topic-pin-controls__button:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.moderation-panel { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.moderation-panel summary { color: var(--muted); cursor: pointer; font-size: .86rem; }
.moderation-panel form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-top: .75rem; }
.moderation-panel label { width: 100%; }
.moderation-panel textarea { width: 100%; }
.topic-updates { margin: 1.15rem 0 0; padding-top: .95rem; border-top: 1px dashed var(--line); }
.topic-updates h2 { margin: 0 0 .65rem; font-size: .86rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.topic-update { padding: .45rem 0 .55rem .85rem; border-left: 3px solid var(--purple); }
.topic-update + .topic-update { margin-top: .55rem; }
.topic-update__meta { margin: 0 0 .35rem; color: var(--muted); font-size: .86rem; }
.topic-update__label { color: var(--purple); }
.topic-update__heading { margin: 0 0 .35rem; font-size: 1.02rem; line-height: 1.35; }
.topic-update__body { max-width: 78ch; }
.topic-update__link { margin: .5rem 0 0; overflow-wrap: anywhere; }
.update-compose { margin: .95rem 0 0; padding: .55rem .85rem .75rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--paper-soft); }
.update-compose summary { cursor: pointer; font-size: .9rem; font-weight: 650; }
.update-compose form { margin-top: .65rem; }
.update-compose textarea { width: 100%; min-height: 80px; }
.poll-card { margin: .7rem 0 1rem; padding: .85rem 1rem; border: 1px solid var(--line); border-top: 3px solid var(--purple); border-radius: var(--radius); background: var(--paper-soft); }
.poll-card h2 { margin-bottom: .65rem; }
.poll-results { padding: 0; margin: 0; list-style: none; }
.poll-results li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.poll-choices { display: grid; gap: .4rem; padding: 0; margin: 0 0 .7rem; list-style: none; }
.poll-choices li, .poll-options label { min-height: 44px; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.poll-card > .muted { margin: .55rem 0 0; }
.comments-panel .list-heading { margin: 0 0 .75rem; }
.comments-panel__body { padding-top: 1rem; }
.comments-empty { margin: 0; }
.comment-compose { padding: 1rem; background: var(--paper-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-compose + .comments-tree { margin-top: 1rem; }
.comment-compose p { margin-bottom: .65rem; }
.comment-compose label { display: block; margin-bottom: .3rem; font-size: .86rem; font-weight: 650; }
.comment-compose textarea { width: 100%; min-height: 90px; }
.comments-tree { margin-top: 0; }
.comments-tree > .comment-branch > .comment-node:not(.comment-node--nested) { box-shadow: 0 1px 0 rgba(37, 41, 50, .03); }
.poll-options label { display: flex !important; align-items: center; gap: .6rem; margin-bottom: .4rem; cursor: pointer; }
.poll-options label:focus-within { border-color: var(--purple); }
.poll-options input { flex: 0 0 auto; width: 1rem; height: 1rem; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 1rem 0; color: var(--muted); font-size: .84rem; }
.pagination > span:first-child { margin-right: .4rem; }
.pagination .current { color: var(--ink); background: #e8e1ed; }
.pagination > span:not(:first-child) { padding: .2rem; }

.site-footer { margin-top: auto; background: var(--chrome); border-top: 3px solid var(--purple); color: #d7d9dc; }
.site-footer__inner { width: min(100% - var(--site-gutter), var(--site-width)); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin: auto; padding: 1.3rem 0; font-size: .81rem; }
.site-footer__brand { color: #fff; font-size: 1.2rem; font-weight: 750; white-space: nowrap; }
.site-footer__inner p { flex: 1; min-width: 180px; margin: 0; }
.site-footer a { color: #d9b7e6; }
.site-footer .lang-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; margin-left: auto; font-size: .8rem; }
.lang-nav__current, .lang-nav__link { display: inline-flex; align-items: center; gap: .25rem; min-height: 2rem; padding: .3rem .45rem; border: 1px solid transparent; border-radius: 3px; color: #d7d9dc; font: inherit; font-weight: 700; white-space: nowrap; }
.lang-nav__current { border-color: #9f79b5; background: rgba(185, 131, 206, .22); color: #fff; }
.lang-nav__link { background: transparent; cursor: pointer; }
.lang-nav__link:hover { border-color: #9f79b5; color: #fff; }
.lang-nav :is(a, span):focus-visible { outline: 2px solid #d2a9e4; outline-offset: 2px; }

.pm-inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.pm-inbox__item { margin: 0; }
.pm-inbox__link { display: grid; gap: 0.2rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff; text-decoration: none; color: inherit; }
.pm-inbox__item--unread .pm-inbox__link { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: inset 3px 0 0 var(--accent); }
.pm-inbox__peer { display: flex; align-items: center; gap: 0.45rem; }
.pm-inbox__badge { display: inline-flex; min-width: 1.2rem; padding: 0 0.35rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; justify-content: center; }
.pm-inbox__preview { font-size: 0.88rem; overflow-wrap: anywhere; }
.pm-inbox__time { font-size: 0.78rem; }
.pm-inbox__delete { display: inline-block; margin: .25rem 1rem .4rem; font-size: .8rem; }
.pm-thread-header { margin: 0 0 1rem; }
.pm-thread-header__title { margin: 0 0 0.35rem; font-size: 1.35rem; }
.pm-thread-header__delete { display: inline-block; margin-top: .2rem; font-size: .85rem; }
.pm-delete-confirm { max-width: 640px; padding: 1.5rem; }
.pm-delete-confirm form { display: flex; flex-wrap: wrap; gap: .6rem; }
.pm-thread { display: grid; gap: 0.65rem; margin: 0 0 1rem; }
.pm-bubble { max-width: min(100%, 42rem); padding: 0.65rem 0.85rem; border-radius: var(--radius-card); border: 1px solid var(--line); background: #fff; }
.pm-bubble--mine { margin-left: auto; border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.pm-bubble--theirs { margin-right: auto; }
.pm-bubble__meta { margin: 0 0 0.35rem; font-size: 0.78rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem; }
.pm-bubble__body { margin: 0; overflow-wrap: anywhere; }
.pm-reply { margin-top: 0.5rem; }
.pm-compose { max-width: 36rem; }

.btn--compact { display: inline-flex; align-items: center; min-height: 34px; padding: .25rem .65rem; font-size: .82rem; }

.mobile-menu, .mobile-dock { display: none; }
.mobile-menu > summary { list-style: none; cursor: pointer; }
.mobile-menu > summary::-webkit-details-marker { display: none; }
.mobile-menu__panel { position: absolute; z-index: 40; top: calc(100% - 1px); left: 0; right: 0; max-height: min(78vh, 32rem); overflow: auto; padding: .85rem 1rem 1rem; border-top: 1px solid var(--chrome-line); background: var(--chrome); color: #f0f0ef; box-shadow: 0 12px 28px rgba(0, 0, 0, .28); }
.mobile-menu__nav { display: grid; gap: .15rem; margin-bottom: .85rem; }
.mobile-menu__nav a { display: flex; align-items: center; min-height: 44px; padding: .45rem .65rem; border-radius: 3px; color: #e9e9ec; font-weight: 650; }
.mobile-menu__nav a:hover, .mobile-menu__nav a[aria-current="page"] { background: #292431; color: #fff; text-decoration: none; }
.mobile-menu__account { margin-bottom: .75rem; padding-bottom: .75rem; border-bottom: 1px solid var(--chrome-line); }
.mobile-menu__account-label { margin: 0 0 .45rem; color: #cdb8d6; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mobile-menu__join { margin-bottom: .55rem; }
.mobile-menu .account-menu__panel--flat { position: static; width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: inherit; }
.mobile-menu .account-menu__panel--flat a, .mobile-menu .account-menu__panel--flat button { color: #e9e9ec; }
.mobile-menu .account-menu__panel--flat a:hover, .mobile-menu .account-menu__panel--flat button:hover { background: #292431; color: #fff; }
.mobile-menu .lang-nav { display: flex; flex-wrap: nowrap; align-items: center; gap: .25rem; max-width: 100%; margin-top: .35rem; overflow-x: auto; }
.mobile-menu .lang-nav > * { flex: 0 0 auto; }
.mobile-menu .lang-nav__current, .mobile-menu .lang-nav__link { color: #e9e9ec; border-color: #4a4f58; }
.mobile-dock { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; display: none; align-items: stretch; justify-content: space-around; gap: .15rem; min-height: var(--mobile-dock-height); padding: .35rem calc(.35rem + env(safe-area-inset-right, 0px)) calc(.35rem + env(safe-area-inset-bottom, 0px)) calc(.35rem + env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line-strong); background: rgba(255, 255, 255, .97); backdrop-filter: blur(6px); }
.mobile-dock__item, .mobile-dock__profile > summary { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; gap: .12rem; min-width: 0; min-height: 44px; padding: .15rem .2rem; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: .62rem; font-weight: 650; line-height: 1.15; text-align: center; list-style: none; cursor: pointer; }
.mobile-dock__profile > summary::-webkit-details-marker { display: none; }
.mobile-dock__item svg, .mobile-dock__profile > summary svg { flex: 0 0 auto; }
.mobile-dock__item:hover, .mobile-dock__profile > summary:hover { color: var(--purple); text-decoration: none; }
.mobile-dock__item--active, .mobile-dock__profile[open] > summary { color: var(--purple-dark); background: var(--purple-soft); }
.mobile-dock__profile { position: relative; flex: 1 1 0; min-width: 0; }
.mobile-dock__menu { position: fixed; z-index: 51; top: auto; right: max(var(--site-gutter), env(safe-area-inset-right, 0px)); bottom: calc(var(--mobile-dock-height) + .45rem); left: max(var(--site-gutter), env(safe-area-inset-left, 0px)); width: auto; max-height: min(60vh, calc(100dvh - var(--mobile-dock-height) - 1.25rem)); overflow: auto; padding: .45rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 10px 26px rgba(12, 12, 20, .18); color: var(--ink); }
.owned-list__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem .75rem; }

@media (max-width: 1050px) {
  .site-header__inner { flex-wrap: wrap; gap: .2rem 1rem; padding: .55rem 0; }
}
@media (max-width: 900px) {
  .page-shell--columns { grid-template-columns: minmax(0, 1fr); }
  .page-shell--feed > .page-main { grid-column: 1; grid-row: 1; }
  .page-shell--feed > .page-sidebar { grid-column: 1; grid-row: 2; }
  .page-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-card--accent { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .topic-detail--multilingual > .topic-card__meta { min-height: 0; padding-right: 0; }
  .topic-detail--multilingual > .translation-picker { position: relative; top: auto; right: auto; z-index: auto; margin: .2rem 0 .6rem; }
  .topic-detail--multilingual > .translation-picker > nav { position: static; display: flex; width: auto; max-width: none; margin-top: .4rem; box-shadow: none; }
  :root { --site-gutter: 1rem; --space-page-bottom: calc(1.25rem + var(--mobile-dock-height)); }
  body { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .site-header__inner { align-items: center; flex-wrap: nowrap; gap: .35rem; min-height: 52px; padding: .3rem 0; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand__name { font-size: 1.25rem; }
  .brand__mark { width: 32px; height: 32px; }
  .primary-nav, .account-nav { display: none; }
  .mobile-menu { display: block; order: 2; margin-left: .15rem; }
  .mobile-menu > summary { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .35rem; border: 1px solid transparent; border-radius: 3px; color: #e9e9ec; }
  .mobile-menu > summary:hover, .mobile-menu[open] > summary { border-color: #725986; background: #292431; color: #fff; }
  .mobile-search { position: static; order: 1; }
  .mobile-search__panel { top: 100%; left: 0; right: 0; width: auto; }
  .mobile-dock { display: flex; }
  .site-footer { display: none; }
  .poll-card { padding: .75rem; }
  .poll-options .btn { width: 100%; }
  .search-form { grid-template-columns: minmax(0, 1fr); }
  .search-form label[for="search-q"], .search-form #search-q, .search-form label[for="search-scope"], .search-form #search-scope, .search-form button { grid-area: auto; }
  .page-shell, .layout { padding-top: 0.5rem; }
  .page-shell--feed { padding-top: 0.4rem; }
  .feed-tabs--sort { display: none !important; }
  .mobile-sort-menu { position: relative; display: block; margin: 0 0 .45rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
  .mobile-sort-menu > summary { display: inline-flex; align-items: center; min-height: 36px; padding: .3rem .5rem; color: var(--muted); font-size: .85rem; list-style: none; cursor: pointer; }
  .mobile-sort-menu > summary::-webkit-details-marker { display: none; }
  .mobile-sort-menu > summary strong { color: var(--purple-dark); font-weight: 750; }
  .mobile-sort-menu__chevron { margin-left: .5rem; font-size: 1.1rem; transition: transform .15s ease; }
  .mobile-sort-menu[open] .mobile-sort-menu__chevron { transform: rotate(180deg); }
  .mobile-sort-menu > nav { position: absolute; z-index: 25; top: calc(100% + .2rem); left: 0; display: grid; width: min(240px, calc(100vw - 2rem)); padding: .25rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); box-shadow: 0 8px 20px rgba(16, 18, 24, .16); }
  .mobile-sort-menu > nav a { display: block; padding: .55rem .65rem; border-radius: 3px; color: var(--ink); font-size: .85rem; font-weight: 650; }
  .mobile-sort-menu > nav a:hover, .mobile-sort-menu > nav a[aria-current="page"] { background: var(--purple-soft); color: var(--purple-dark); text-decoration: none; }
  .mobile-sort-menu__period { display: grid; grid-template-columns: repeat(3, 1fr); gap: .15rem; padding: .35rem .2rem .15rem; border-top: 1px solid var(--line); }
  .mobile-sort-menu__period span { grid-column: 1 / -1; padding: .15rem .4rem; color: var(--muted); font-size: .72rem; }
  .mobile-sort-menu__period a { padding: .4rem .2rem !important; font-size: .72rem !important; text-align: center; }
  .feed-chrome { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem; min-height: 44px; margin-bottom: .45rem; padding: .2rem .35rem; background: var(--paper); }
  .feed-chrome .mobile-sort-menu { flex: 1 1 auto; min-width: 0; margin: 0; border: 0; background: transparent; }
  .feed-chrome .period-form { display: none; }
  .list-heading--with-sort { flex-wrap: nowrap; align-items: center; gap: .35rem; margin-bottom: .25rem; }
  .home-feed-header__page-title { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .list-heading--with-sort .count-badge { flex: 0 0 auto; order: 3; margin-left: .15rem; }
  .home-feed-header__controls { flex: 1 1 auto; flex-wrap: nowrap; justify-content: flex-end; order: 2; min-width: 0; padding: .15rem .2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
  .home-feed-header .mobile-sort-menu { flex: 1 1 auto; min-width: 0; margin: 0; border: 0; background: transparent; }
  .home-feed-header .period-form--compact { display: none; }
  .home-feed-header .discovery-trigger { flex: 0 0 36px; margin: 0; border-left: 1px solid var(--line); }
  .mobile-sort-menu + .period-form { display: none; }
  .discovery-toggle { display: block; }
  .discovery-trigger { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--purple-dark); font-size: 1.05rem; cursor: pointer; }
  .discovery-toggle:focus-visible ~ .page-main .discovery-trigger { outline: 2px solid var(--purple); outline-offset: -2px; }
  .discovery-toggle:checked ~ .page-main .discovery-trigger { background: var(--purple-soft); }
  .discovery-backdrop { position: fixed; z-index: 80; inset: 0; display: block; visibility: hidden; opacity: 0; background: rgba(16, 18, 24, .55); transition: opacity .2s ease, visibility .2s ease; }
  .discovery-toggle:checked ~ .discovery-backdrop { visibility: visible; opacity: 1; }
  .page-shell--feed > .page-main { grid-column: 1; grid-row: 1; }
  .page-shell--feed > .page-sidebar--aux { position: fixed; z-index: 81; top: 0; right: 0; bottom: 0; left: auto; display: grid; align-content: start; width: min(88vw, 360px); max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; padding: calc(.6rem + env(safe-area-inset-top, 0px)) .8rem calc(.8rem + env(safe-area-inset-bottom, 0px)); border: 0; border-left: 1px solid var(--line); border-radius: 0; background: var(--paper-soft); box-shadow: -12px 0 32px rgba(16, 18, 24, .22); visibility: hidden; pointer-events: none; transform: translateX(105%); transition: transform .22s ease, visibility .22s ease; }
  .discovery-toggle:checked ~ .page-sidebar--aux { visibility: visible; pointer-events: auto; transform: translateX(0); }
  .discovery-drawer__head { position: sticky; z-index: 1; top: 0; display: flex; order: -1; align-items: center; justify-content: space-between; min-height: 44px; padding: .15rem 0 .45rem; margin: 0 0 .35rem; border-bottom: 1px solid var(--line); background: var(--paper-soft); color: var(--ink); }
  .discovery-drawer__head label { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius); color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
  .discovery-drawer__head label:hover, .discovery-drawer__head label:focus-visible { background: var(--purple-soft); color: var(--purple-dark); outline: 2px solid var(--purple); outline-offset: 0; }
  .page-sidebar, .profile-grid, .section-grid { grid-template-columns: 1fr; }
  .editor-panel { padding: 1rem; }
  .editor-panel .form-field-row { grid-template-columns: 1fr; gap: 0; }
  .topic-card__body { padding: .58rem .65rem .62rem; }
  .topic-card__title { margin: .22rem 0 .18rem; font-size: .98rem; line-height: 1.32; }
  .topic-card__meta { font-size: .72rem; }
  .topic-card__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: none; margin: 0 0 .32rem; font-size: .82rem; line-height: 1.38; }
  .topic-card__toolbar { gap: .35rem .45rem; margin-top: .28rem; }
  .topic-card__actions { flex: 1 1 auto; justify-content: flex-end; }
  .topic-card__actions a { min-height: 34px; padding: .25rem .55rem; font-size: .74rem; }
  .hero-cover { min-height: 152px; padding: 0.85rem; }
  .profile-hero__cover.hero-cover { min-height: 168px; }
  .hero-cover__card { flex-wrap: wrap; align-items: flex-start; padding: 0.65rem 0.75rem; }
  .hero-cover__avatar { width: 56px; height: 56px; font-size: 1.45rem; }
  .hero-cover__identity h1, .profile-hero h1 { font-size: 1.25rem; }
  .community-hero__description { margin: .7rem .8rem 0; }
  .community-hero__actions { padding: .8rem; }
  .profile-chrome, .profile-chrome__row { min-width: 0; max-width: 100%; }
  .profile-chrome__row { flex-direction: column; align-items: stretch; }
  .profile-chrome .profile-tabs { flex: 0 0 auto; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; }
  .profile-owner-links {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 0.35rem 0.65rem 0.5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .profile-owner-links a { flex: 0 0 auto; }
  .hero-cover__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem 0.65rem; }
  .hero-cover__stats dd { font-size: 0.92rem; }
  .profile-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .profile-tabs a { flex: 0 0 auto; }
  .profile-panel { padding: 0.75rem; }
  .comment-node { padding: .75rem .65rem .65rem; }
  .comment-node__body, .comment-node__actions, .comment-node__moderation { margin-left: 0; }
  .comment-node__actions { flex-wrap: nowrap; overflow-x: auto; gap: .3rem; }
  .comment-node__actions:has(.reply-composer[open]),
  .comment-node__actions:has(.comment-node__moderation[open]) { flex-wrap: wrap; overflow-x: visible; justify-content: flex-end; }
  /* Opening '…' alone must NOT reflow the toolbar, but must free the absolute
     menu from the scroll container's y-clip so it stays visible/tappable. */
  .comment-node__actions:has(.comment-node__more[open]) { overflow-x: visible; overflow-y: visible; }
  .comment-node__votes, .comment-node__toolbar { flex-wrap: nowrap; }
  .comment-vote, .comment-action-btn, .comment-node__more > summary { min-width: 40px; min-height: 40px; width: 40px; height: 40px; }
  .comment-node__votes strong { min-width: 1.6rem; }
  .comment-children { margin-left: .45rem; padding-left: .55rem; }
  .comment-children > .comment-branch::before { left: -.55rem; width: .42rem; }
  .comment-children > summary::before { left: -.55rem; width: .42rem; }
  .comment-children .comment-children .comment-children { padding-left: .25rem; }
  .comment-children .comment-children .comment-children > .comment-branch::before { left: -.25rem; width: .13rem; }
  .comment-children .comment-children .comment-children > summary::before { left: -.25rem; width: .13rem; }
  .page-sidebar--aux { padding: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  .discovery-backdrop, .page-shell--feed > .page-sidebar--aux, .mobile-sort-menu__chevron { transition: none; }
}
@media (min-width: 621px) {
  .mobile-menu, .mobile-dock { display: none !important; }
  .discovery-drawer__head { display: none; }
}
@media (max-width: 420px) {
  .mobile-dock__item span, .mobile-dock__profile > summary span { font-size: .58rem; }
}
.pgp-ciphertext {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--border-color, #d8d8df);
  border-radius: .35rem;
  background: #f5f4f7;
  color: #24242b;
  font-size: .8rem;
  line-height: 1.35;
}
.profile-security .form-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
  min-width: 0;
  margin: .75rem 0 1.25rem;
}
.profile-security .form-stack + .form-stack { margin-top: 1rem; }
.profile-security .form-stack > *, .profile-security .form-stack > p > * { min-width: 0; max-width: 100%; }
.profile-security .form-stack > p { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; min-width: 0; margin: 0; }
.profile-security .form-stack label { margin: 0; }
.profile-security .form-stack textarea { width: 100%; resize: vertical; }
.profile-security .form-stack .btn { justify-self: start; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.profile-security .pgp-fingerprint { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 620px) {
  .profile-security .form-stack .btn { width: 100%; }
}
.security-help { margin: .65rem 0 1rem; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-soft); }
.security-help summary { cursor: pointer; color: var(--purple-dark); font-weight: 700; }
.security-help ol { margin: .75rem 0 .2rem; padding-left: 1.45rem; }
.security-help li + li { margin-top: .4rem; }
.comment-thread-page { display: grid; gap: .65rem; }
.comment-branch__more { position: relative; margin: 0 0 .25rem 1rem; padding: .6rem 0 0 1rem; font-size: .86rem; font-weight: 700; }
.comment-branch__more::before { content: ""; position: absolute; top: 0; left: 0; height: calc(.6rem + 17px); border-left: 2px solid #c9b3d8; }
.comment-branch__more::after { content: ""; position: absolute; top: calc(.6rem + 17px); left: 0; width: 1rem; border-top: 2px solid #c9b3d8; }
.comment-thread-page__collapse { margin: 0; }
.comment-branch__more a, .comment-thread-page__collapse a { display: inline-flex; align-items: center; min-height: 34px; }
.comment-branch__more a { padding: .35rem .55rem; }
@media (max-width: 620px) {
  .comment-branch__more a, .comment-thread-page__collapse a { min-height: 44px; }
  .comment-branch__more { margin-left: .45rem; }
  .comment-branch__more::before { height: calc(.6rem + 22px); }
  .comment-branch__more::after { top: calc(.6rem + 22px); }
}

/* Two separate inboxes: replies on the bell, private messages on the envelope. */
.header-alerts { display: flex; flex: 0 0 auto; align-items: center; gap: .15rem; }
.header-alerts__link { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; border-radius: 5px; color: #e9e9ec; }
.header-alerts__link:hover, .header-alerts__link:focus-visible, .header-alerts__link[aria-current="page"] { background: #34283d; color: #fff; }
.header-alerts__report-symbol { font-size: 1.35rem; line-height: 1; }
.header-alerts__count { position: absolute; top: 0; right: 0; display: grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .22rem; border: 2px solid var(--chrome); border-radius: 999px; background: #bd2d35; color: #fff; font-size: .66rem; font-weight: 800; line-height: 1; }
.profile-comment--unread { border-left: 3px solid var(--accent); padding-left: .65rem; }
.notification-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; border-bottom: 1px solid var(--line); }
.notification-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .65rem .8rem; border-bottom: 3px solid transparent; color: var(--ink); font-weight: 650; }
.notification-tabs a:hover, .notification-tabs a[aria-current="page"] { border-bottom-color: var(--purple); color: var(--purple-dark); text-decoration: none; }
.notification-tabs span { min-width: 1.3rem; padding: 0 .3rem; border-radius: 999px; background: var(--purple-soft); font-size: .75rem; text-align: center; }
@media (max-width: 620px) { .header-alerts { order: 2; gap: 0; } .mobile-menu { order: 3; } }
@media (max-width: 400px) { .brand__name { display: none; } }

/* No-JS Markdown authoring and safe rendered content. */
.markdown-input { font-family: ui-monospace, monospace; line-height: 1.6; min-height: 8rem; }
.markdown-editor-tools { margin: .8rem 0 1.2rem; }
.markdown-help { padding: .7rem .9rem; border: 1px solid var(--line); border-radius: .7rem; }
.markdown-help summary { cursor: pointer; font-weight: 600; }
.markdown-help dl { display: grid; grid-template-columns: minmax(9rem, 1fr) 2fr; gap: .6rem 1rem; }
.markdown-help dd { margin: 0; }
.markdown-help pre, .body-text--markdown pre { overflow-x: auto; white-space: pre; padding: .8rem; border: 1px solid var(--line); border-radius: .5rem; }
.editor-preview { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; }
.editor-preview h3 { margin-top: 0; }
.editor-actions--secondary { flex-wrap: wrap; margin: .8rem 0; }
.editor-status { font-weight: 600; }
.body-text--markdown { white-space: normal; overflow-x: auto; }
.body-text--markdown > :first-child { margin-top: 0; }
.body-text--markdown p { margin: .65rem 0; }
.body-text--markdown h1, .body-text--markdown h2, .body-text--markdown h3 { font-size: 1.2rem; line-height: 1.4; }
.body-text--markdown blockquote { border-inline-start: 3px solid var(--line); margin-inline: 0; padding-inline-start: 1rem; color: var(--muted); }
.body-text--markdown table { border-collapse: collapse; margin: 1rem 0; }
.body-text--markdown th, .body-text--markdown td { border: 1px solid var(--line); padding: .5rem .8rem; }
.body-text--markdown code { font-family: ui-monospace, monospace; white-space: pre-wrap; }
.body-text--markdown pre code { white-space: pre; }
@media (max-width: 600px) { .markdown-help dl { grid-template-columns: 1fr; gap: .3rem; } .markdown-help dd { margin-bottom: .5rem; } }

/* Appearance theme switch (DREAD2-228) and Blog nav badge (DREAD2-235). */
.header-theme { display: block; flex: 0 1 auto; }
.mobile-menu__theme { display: block; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--chrome-line); }
.site-footer__theme { display: flex; align-items: center; flex: 0 0 auto; }
.theme-switch { display: inline-flex; align-items: center; gap: .15rem; }
.theme-switch__item { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid transparent; border-radius: 3px; color: #e9e9ec; }
.theme-switch__item:hover, .theme-switch__item--active { border-color: #725986; background: #292431; color: #fff; text-decoration: none; }
.theme-switch__item:focus-visible { outline: 2px solid #c59ad8; outline-offset: 2px; }
.site-footer__theme .theme-switch__item { width: 34px; height: 34px; }
.mobile-menu__theme .theme-switch { width: 100%; }
.mobile-menu__theme .theme-switch__item { flex: 1 1 0; width: 44px; min-height: 44px; }
.theme-preference__lead { margin-bottom: 1rem; }
.theme-preference__modes { display: grid; gap: .5rem; margin-bottom: 1.1rem; }
.theme-preference__form { margin: 0; }
.theme-preference__button { width: 100%; }
.theme-preference__back { margin: 0; }
.primary-nav__link--blog { column-gap: .15rem; }
.blog-badge { display: inline-flex; align-items: center; justify-content: center; margin-left: .3rem; padding: .08rem .4rem; border-radius: 999px; background: #f5c518; color: #221a12; font-size: .62rem; font-weight: 750; line-height: 1.2; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 620px) {
  .header-theme { display: none; }
  .mobile-menu__theme .theme-switch__item { flex: 1 1 0; width: 44px; min-height: 44px; }
}

/* Dark appearance theme: forced dark and system @media share the same tokens,
   raw-hex pairs keep readability without JS or white patches. LIGHT stays the
   base :root above, so an absent/invalid cookie renders exactly as before. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #16181d;
  --paper: #1e2128;
  --paper-soft: #242830;
  --ink: #e8e9ec;
  --muted: #a6adb8;
  --line: #343943;
  --line-strong: #4c535e;
  --purple: #b08cd0;
  --purple-dark: #cbb0e2;
  --purple-soft: #2c2436;
  --chrome: #101216;
  --chrome-line: #2c313a;
  --success: #57c98a;
  --danger: #e07a70;
  --button-bg: #765091;
  --button-hover: #654179;
  --side-accent-from: #26232d;
  --side-accent-to: #2c2436;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --canvas: #16181d;
    --paper: #1e2128;
    --paper-soft: #242830;
    --ink: #e8e9ec;
    --muted: #a6adb8;
    --line: #343943;
    --line-strong: #4c535e;
    --purple: #b08cd0;
    --purple-dark: #cbb0e2;
    --purple-soft: #2c2436;
    --chrome: #101216;
    --chrome-line: #2c313a;
    --success: #57c98a;
    --danger: #e07a70;
    --button-bg: #765091;
    --button-hover: #654179;
    --side-accent-from: #26232d;
    --side-accent-to: #2c2436;
  }
}
:root[data-theme="dark"] input[type="search"],
:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="password"],
:root[data-theme="dark"] input[type="url"],
:root[data-theme="dark"] input[type="email"],
:root[data-theme="dark"] input[type="number"],
:root[data-theme="dark"] input[type="datetime-local"],
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background: var(--paper); border-color: var(--line-strong); color: var(--ink); }
:root[data-theme="dark"] input::placeholder, :root[data-theme="dark"] textarea::placeholder { color: var(--muted); }
:root[data-theme="dark"] .skip-link { background: var(--paper); color: var(--ink); }
:root[data-theme="dark"] .topic-card__title a:visited { color: #c4a9d8; }
:root[data-theme="dark"] .topic-card--spotlight { border-color: #3a3144; background: linear-gradient(90deg, #252830, #1e2128 38%); box-shadow: inset 3px 0 0 #a881bd; }
:root[data-theme="dark"] .topic-card--spotlight:hover { border-color: #5b4d6b; }
:root[data-theme="dark"] .topic-card__actions a, :root[data-theme="dark"] .topic-card__kind { background: #2a2e37; color: #c8ccd4; }
:root[data-theme="dark"] .topic-card__actions a:hover { background: #34283d; color: var(--purple-dark); }
:root[data-theme="dark"] .pagination .current { background: #2c2436; color: var(--ink); }
:root[data-theme="dark"] .mobile-dock { background: rgba(30, 33, 40, .97); }
:root[data-theme="dark"] .notice--success { border-color: #2f6a42; background: #14351f; color: var(--success); }
:root[data-theme="dark"] .notice--error { border-color: #6a302b; background: #3a1c1a; color: var(--danger); }
:root[data-theme="dark"] .captcha__refresh { background: var(--paper); }
:root[data-theme="dark"] form .captcha .captcha__frame { background: var(--paper); border-color: var(--line-strong); border-radius: 6px; }
:root[data-theme="dark"] .pm-inbox__link { background: var(--paper); }
:root[data-theme="dark"] .pm-bubble { background: var(--paper); border-color: var(--line); }
:root[data-theme="dark"] .pm-bubble--mine { background: #2c2436; border-color: #6a5b78; }
:root[data-theme="dark"] .hero-cover__card { background: rgba(18, 13, 30, .42); }

/* Desktop: two-column grid keeps the compact icon toolbar in the top-right
   column without overlapping the author/avatar/time byline — the body spans
   both columns. An open reply/moderation panel reflows to a full-width row
   below the text. Native More menu stays anchored to its relative details. */
@media (min-width: 621px) {
  .comment-node {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: .7rem;
    row-gap: .2rem;
  }
  .comment-node__header { grid-column: 1; grid-row: 1; min-width: 0; }
  .comment-node__actions {
    grid-column: 2; grid-row: 1; align-self: start; justify-self: end;
    margin: 0; flex-wrap: nowrap; max-width: none;
  }
  .comment-node__body { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
  .comment-node__actions:has(.comment-node__more[open]) { overflow: visible; }
  .comment-node__actions:has(.reply-composer[open]),
  .comment-node__actions:has(.comment-node__moderation[open]) {
    grid-column: 1 / -1; grid-row: 3; flex-wrap: wrap;
    justify-self: stretch; width: 100%;
  }
  .reply-composer[open] { flex-basis: 100%; }
}

/* DREAD2-259: no-JS body editor chrome. Verbatim copies in body-editor.css and
   _critical_style.html; test_cold_load_css.py fails on drift. */
.body-editor {
  display: grid;
  gap: .55rem;
  padding: .85rem .9rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  min-width: 0;
}
.body-editor__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .45rem .75rem;
}
.body-editor__heading { margin: 0; font-size: .9rem; font-weight: 750; color: var(--ink); }
.body-editor__format { display: flex; align-items: center; gap: .5rem; }
.body-editor__format-label { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 650; }
.body-editor__format-label label { margin: 0; font-weight: 650; }
.body-editor__format-radios {
  display: flex; align-items: center; gap: .15rem;
  padding: .12rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--paper);
}
.body-editor__format-radios input {
  position: absolute; width: 1px; height: 1px; margin: 0;
  opacity: 0; pointer-events: none;
}
.body-editor__format-radios label {
  display: inline-flex; align-items: center; min-height: 26px;
  margin: 0; padding: .1rem .55rem; border-radius: 999px;
  color: var(--muted); font-size: .78rem; font-weight: 650; cursor: pointer;
}
.body-editor__format-radios input:checked + label { background: var(--button-bg); color: #fff; }
.body-editor__format-radios input:focus-visible + label { outline: 2px solid var(--purple); outline-offset: 1px; }
.body-editor__help {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 26px; height: 26px; padding: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--purple);
  font-size: .9rem; font-weight: 750; cursor: pointer;
}
.body-editor__help:hover { border-color: var(--purple); background: var(--purple-soft); }
.body-editor__format-errors { color: var(--danger); font-size: .8rem; }
.body-editor textarea, .body-editor .markdown-input { width: 100%; min-width: 0; }
.body-editor__actions { display: flex; flex-wrap: wrap; gap: .45rem; }
/* Admin identity badge (DREAD2): red (A) mark on the site admin's avatar. */
.comment-node__avatar, .people-list__avatar { position: relative; }
.admin-mark {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: .55rem; font-weight: 750; line-height: 1;
  padding: 1px 3px; border-radius: 6px; white-space: nowrap;
}

/* Raster sprite: functional controls work with SVG and JavaScript disabled. */
.ui-icon { --ui-icon-size: 20px; --ui-icon-row: 0; display: inline-block; flex: 0 0 auto; width: var(--ui-icon-size); height: var(--ui-icon-size); vertical-align: middle; background-image: image-set('/static/forum/images/ui-icons-v1.png' 1x); background-repeat: no-repeat;
  background-size: calc(var(--ui-icon-size) * 25) calc(var(--ui-icon-size) * 2);
  background-position: calc(var(--ui-icon-size) * var(--ui-icon-col) * -1) calc(var(--ui-icon-size) * var(--ui-icon-row) * -1); }
.ui-icon--edit { --ui-icon-col: 0; }
.ui-icon--delete { --ui-icon-col: 1; }
.ui-icon--bookmark { --ui-icon-col: 2; }
.ui-icon--bookmark-saved { --ui-icon-col: 3; }
.ui-icon--moon { --ui-icon-col: 4; }
.ui-icon--sun { --ui-icon-col: 5; }
.ui-icon--pinned { --ui-icon-col: 6; }
.ui-icon.ui-icon--community-pin { background-image: image-set('/static/forum/images/community-pin-v1.png' 1x); background-size: var(--ui-icon-size) var(--ui-icon-size); background-position: 0 0; }
.ui-icon--language { --ui-icon-col: 7; }
.ui-icon--search { --ui-icon-col: 8; }
.ui-icon--menu { --ui-icon-col: 9; }
.ui-icon--messages { --ui-icon-col: 10; }
.ui-icon--notifications { --ui-icon-col: 11; }
.ui-icon--home { --ui-icon-col: 12; }
.ui-icon--polls { --ui-icon-col: 13; }
.ui-icon--communities { --ui-icon-col: 14; }
.ui-icon--shop { --ui-icon-col: 15; }
.ui-icon--profile { --ui-icon-col: 16; }
.ui-icon--vote-up { --ui-icon-col: 17; }
.ui-icon--vote-down { --ui-icon-col: 18; }
.ui-icon--reply { --ui-icon-col: 19; }
.ui-icon--undo { --ui-icon-col: 20; }
.ui-icon--moderation { --ui-icon-col: 21; }
.ui-icon--more { --ui-icon-col: 22; }
.ui-icon--refresh { --ui-icon-col: 23; }
.ui-icon--comments { --ui-icon-col: 24; }

:root[data-theme="dark"] .ui-icon { --ui-icon-row: 1; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .ui-icon { --ui-icon-row: 1; } }
.site-header .ui-icon, .site-footer .ui-icon { --ui-icon-row: 1; }
.comment-vote .ui-icon, .comment-action-btn .ui-icon, .save-flag .ui-icon { --ui-icon-size: 18px; }
.theme-switch .ui-icon, .comment-node__more-item .ui-icon { --ui-icon-size: 16px; }
.translation-picker .ui-icon, .community-card__topic-stat .ui-icon { --ui-icon-size: 14px; }
.topic-card__pinned .ui-icon { --ui-icon-size: 15px; }
.mobile-dock .ui-icon, .header-alerts .ui-icon, .mobile-search__toggle .ui-icon, .mobile-menu > summary .ui-icon { --ui-icon-size: 22px; }
.comment-node__moderation--direct > summary { justify-content: center; }
.comment-node__moderation .ui-icon--moderation-pencil { --ui-icon-col: 0; --ui-icon-row: 0; filter: brightness(0) saturate(100%) invert(24%) sepia(82%) saturate(2500%) hue-rotate(346deg) brightness(91%) contrast(93%); }

.home-pins { margin: 0 0 .75rem; border: 1px solid var(--line); border-left: 3px solid var(--purple); border-radius: 6px; background: var(--paper); }
.home-pins__summary { display: flex; align-items: center; gap: .65rem; min-height: 58px; padding: .6rem .85rem; list-style: none; cursor: pointer; }
.home-pins__summary::-webkit-details-marker { display: none; }
.home-pins__summary:hover { background: var(--purple-soft); }
.home-pins__mark { display: flex; align-items: center; justify-content: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--purple-soft); color: var(--purple-dark); font-weight: 800; }
.home-pins__heading { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; gap: .2rem .65rem; min-width: 0; overflow-wrap: anywhere; }
.home-pins__heading strong { color: var(--purple); font-size: .95rem; }
.home-pins__hint { color: var(--muted); font-size: .78rem; }
.home-pins__count { padding: .15rem .5rem; border-radius: 999px; background: var(--purple-soft); color: var(--purple-dark); font-size: .82rem; font-weight: 750; }
.home-pins__toggle { flex: 0 0 7px; width: 7px; height: 7px; margin: 0 .2rem .2rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
.home-pins__more[open] .home-pins__toggle { margin-bottom: -.2rem; transform: rotate(225deg); }
.home-pins__list { margin: 0; padding: 0 .85rem .25rem; list-style: none; border-top: 1px solid var(--line); }
.home-pins__item + .home-pins__item { border-top: 1px solid var(--line); }
.home-pins__link { display: block; min-height: 44px; padding: .55rem 0; overflow-wrap: anywhere; }
.home-pins__link strong { display: block; color: var(--ink); font-size: .92rem; line-height: 1.4; }
.home-pins__link:hover strong { color: var(--purple); text-decoration: underline; }
.home-pins__meta { display: block; margin-top: .18rem; color: var(--muted); font-size: .75rem; }
.home-pins__intro { cursor: default; }
.home-pins__intro:hover { background: transparent; }
.home-pins__featured { padding: 0 .85rem .65rem; }
.home-pins__featured .topic-card { margin: 0; }
.home-pins__more { border-top: 1px solid var(--line); }

/* Scoped author roles and manually assigned visual labels. */
.activity-badge { display: inline-flex; align-items: center; justify-content: center; vertical-align: baseline; margin-inline-start: .22rem; min-width: 1.5rem; height: 1.35rem; padding: 0 .16rem; box-sizing: border-box; border: 2px solid #b9d7f5; border-radius: 45% 45% 50% 50%; background: #193455; color: #fff; font-size: .67rem; font-weight: 800; line-height: 1; }
.activity-badge--2 { border-color: #b4d8c6; background: #245a35; }
.activity-badge--3 { border-color: #e4c492; background: #704629; }
.activity-badge--4 { border-color: #e2c5ee; background: #613077; }
.activity-badge--5 { border-color: #ffe082; background: #65440d; }
.activity-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: 0; list-style: none; }
.activity-legend li { display: flex; align-items: center; gap: .3rem; }
.author-badge { display: inline-flex; align-items: center; justify-content: center; vertical-align: baseline; margin-inline-start: .22rem; padding: .06rem .28rem; border-radius: .18rem; background: #193455; color: #fff; font-size: .67rem; font-weight: 800; line-height: 1.35; letter-spacing: .02em; white-space: nowrap; }
.comment-node__byline .author-badge { color: #fff; }
.author-badge--rounded { border-radius: 999px; }
.author-badge--burgundy { background: #702434; }
.author-badge--crimson { background: #8b2635; }
.author-badge--forest { background: #245a35; }
.author-badge--emerald { background: #176747; }
.author-badge--ink { background: #193455; }
.author-badge--navy { background: #18345e; }
.author-badge--purple { background: #613077; }
.author-badge--slate { background: #374151; }
.author-badge--gold { background: #65440d; }
.author-badge--brown { background: #704629; color: #fff; }
.author-badge--role-global-admin { background: #d32f2f; color: #fff; border: 1px solid #ffca55; font-size: .72rem; font-weight: 900; }
.shadow-publication-mark { display: inline-flex; align-items: center; margin-inline-start: .35rem; padding: .08rem .42rem; border-radius: .25rem; background: #65440d; color: #fff; font-size: .7rem; font-weight: 750; line-height: 1.4; white-space: nowrap; vertical-align: middle; }
.comment-node__byline .shadow-publication-mark { color: #fff; }
.flair-palette-guide { display: flex; flex-wrap: wrap; gap: .45rem .7rem; padding: 0; margin: .5rem 0 1rem; list-style: none; }
.flair-palette-guide li { display: inline-flex; align-items: center; gap: .3rem; min-width: 6.5rem; }
.shop-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-block: .3rem .45rem; max-width: 100%; }
.shop-badge { display: inline-flex; max-width: 100%; padding: .16rem .48rem; border-radius: 999px; background: #176747; color: #fff; font-size: .72rem; font-weight: 750; line-height: 1.4; overflow-wrap: anywhere; }
.shop-badge--burgundy { background: #702434; }
.shop-badge--crimson { background: #8b2635; }
.shop-badge--forest { background: #245a35; }
.shop-badge--emerald { background: #176747; }
.shop-badge--ink { background: #193455; }
.shop-badge--navy { background: #18345e; }
.shop-badge--purple { background: #613077; }
.shop-badge--slate { background: #374151; }
.shop-badge--gold { background: #65440d; }
.staff-page { display: grid; gap: .9rem; }
.staff-list { list-style: none; margin: 0; padding: 0; }
.staff-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.staff-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.profile-badges { margin-top: .35rem; }

/* News stays visible in the main column, including narrow screens. */
.home-news { margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.home-news__header { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .85rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.home-news__header h2 { margin: 0; font-size: 1.1rem; }
.home-news__header > a { flex-shrink: 0; font-size: .85rem; }
.home-news__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.home-news__card { position: relative; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.home-news__card + .home-news__card::before { content: ""; position: absolute; top: .1rem; bottom: .1rem; left: -.75rem; width: 1px; background: linear-gradient(to bottom, transparent, var(--line) 18%, var(--line) 82%, transparent); pointer-events: none; }
.home-news__card h3 { margin: 0 0 .5rem; font-size: .95rem; line-height: 1.4; }
.home-news__card p { margin: 0 0 .75rem; font-size: .85rem; line-height: 1.45; color: var(--muted); }
.home-news__meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .75rem; white-space: nowrap; font-size: .75rem; color: var(--muted); }
.home-news__comments { display: inline-flex; align-items: center; justify-content: flex-end; gap: .3rem; min-width: 32px; min-height: 24px; }
.home-news__comments .ui-icon { --ui-icon-size: 16px; }
@media (max-width: 700px) {
  .home-news__grid { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .home-news__card + .home-news__card::before { content: none; }
  .home-news__card + .home-news__card { border-top: 1px solid var(--line); padding-top: .75rem; }
}

/* Topic images: a quiet, keyboard-accessible disclosure with native file picking. */
.topic-image-upload { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-soft); }
.topic-image-upload > summary { display: flex; align-items: center; gap: .6rem; min-height: 48px; padding: .65rem 1rem; color: var(--muted); font-size: .9rem; font-weight: 600; cursor: pointer; list-style: none; }
.topic-image-upload > summary::-webkit-details-marker { display: none; }
.topic-image-upload > summary::marker { content: ""; }
.topic-image-upload > summary:hover, .topic-image-upload[open] > summary { color: var(--ink); }
.topic-image-upload > summary:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.topic-image-upload__icon { position: relative; flex-shrink: 0; display: inline-block; width: 19px; height: 17px; border: 1.5px solid currentColor; border-radius: 3px; overflow: hidden; }
.topic-image-upload__icon::before { content: ""; position: absolute; top: 3px; left: 3px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.topic-image-upload__icon::after { content: ""; position: absolute; right: 2px; bottom: -3px; width: 11px; height: 11px; border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor; transform: rotate(45deg); }
.topic-image-upload__toggle { margin-left: auto; font-size: 1.35rem; font-weight: 400; line-height: 1; transition: transform .15s; }
.topic-image-upload[open] .topic-image-upload__toggle { transform: rotate(45deg); }
.topic-image-upload .topic-figure-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 1rem; margin: 0; padding: 1rem; border-top: 1px solid var(--line); }
.topic-figure-form__field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.topic-figure-form__field label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.topic-figure-form__field small { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.topic-figure-form__field input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; margin: 0; border: 1px solid var(--line); border-radius: .5rem; background: var(--paper); color: var(--ink); font: inherit; font-size: .9rem; }
.topic-figure-form__field input[type="text"] { padding: .65rem .75rem; }
.topic-figure-form__field input[type="file"] { padding: .25rem; overflow: hidden; text-overflow: ellipsis; }
.topic-figure-form__field input::file-selector-button { min-height: 36px; margin-right: .6rem; padding: .35rem .7rem; border: 0; border-radius: .3rem; background: var(--paper-soft); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.topic-figure-form__field input:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.topic-figure-form__actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.topic-figure-form__actions .btn { min-height: 44px; margin: 0; }
@media (max-width: 640px) {
  .topic-image-upload .topic-figure-form { grid-template-columns: minmax(0, 1fr); padding: .85rem; }
  .topic-figure-form__actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .topic-image-upload__toggle { transition: none; } }

/* Publication image previews */
.publication-figures img { max-width: 100%; height: auto; }

.auth-captcha-panel .captcha { display: block; max-width: none; }
.auth-captcha-panel .captcha__frame { width: 100%; }
.auth-captcha-panel .captcha__image { display: block; width: 100%; height: auto; }
.auth-implicit-guard, .auth-captcha-open, .auth-captcha-close, .auth-captcha-final { display: none; }
@supports selector(:popover-open) {
  .auth-captcha-open, .auth-captcha-close, .auth-captcha-final { display: inline-flex; }
  .auth-submit-fallback { display: none !important; }
  .auth-captcha-panel:popover-open { position: fixed; inset: 0; margin: auto; max-height: 90vh; width: min(32rem, 94vw); overflow: auto; padding: 1.25rem; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink); }
  .auth-captcha-panel::backdrop { background: rgba(0, 0, 0, .55); }
  .auth-captcha-close { float: right; }
}

/* A fragment-targeted viewer enlarges the existing processed image node. */
.image-viewer { display: block; min-width: 0; }
.image-viewer__trigger { display: block; width: 100%; height: 100%; }
.image-viewer__trigger:focus-visible, .image-viewer__actions a:focus-visible { outline: 3px solid #d7b5ff; outline-offset: 3px; }
.image-viewer__actions { display: none; }
.hero-cover > .image-viewer--hero-cover, .hero-cover__media > .image-viewer--hero-cover { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-cover__avatar .image-viewer--hero-avatar { width: 100%; height: 100%; }
.hero-cover__avatar .image-viewer__trigger { border-radius: 50%; overflow: hidden; }
.community-hero:has(.image-viewer:target), .profile-hero:has(.image-viewer:target), .hero-cover__avatar:has(.image-viewer:target) { overflow: visible; }
.hero-cover__card:has(.image-viewer:target) { z-index: auto; -webkit-backdrop-filter: none; backdrop-filter: none; }
.shop-page .hero-cover.hero-cover--shop:has(.image-viewer:target) { overflow: visible; }
.topic-detail--multilingual:has(.image-viewer:target) { z-index: auto; }
.image-viewer:target { position: fixed !important; inset: 0 !important; z-index: 1200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; width: 100vw !important; height: 100vh !important; height: 100dvh !important; max-width: none !important; padding: .8rem; overflow: auto; border: 0; border-radius: 0; background: rgba(13, 10, 22, .96); }
.image-viewer:target .image-viewer__trigger { display: grid; place-items: center; flex: 1 1 auto; min-width: 0; min-height: 0; width: 100%; height: auto !important; max-height: calc(100vh - 5rem); max-height: calc(100dvh - 5rem); overflow: auto; border: 0; border-radius: 0; background: transparent; }
.image-viewer:target img { position: static !important; display: block; width: auto !important; height: auto !important; max-width: min(100%, 96vw) !important; max-height: calc(100vh - 6rem) !important; max-height: calc(100dvh - 6rem) !important; margin: auto; object-fit: contain !important; border: 0; border-radius: 0; }
.image-viewer:target .image-viewer__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: center; gap: .5rem; width: 100%; }
.image-viewer__actions a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding: .45rem .8rem; border: 1px solid #cfc2e0; border-radius: .4rem; color: #fff; background: #30213f; overflow-wrap: anywhere; }
