@font-face { font-family: "Bricolage"; src: url("/static/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/static/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/static/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/static/fonts/atkinson-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  color-scheme: light dark;
  --ink: #16352f;
  --ink-soft: #4b6a62;
  --paper: #edf3ee;
  --surface: #ffffff;
  --surface-2: #e0ebe3;
  --line: #cbdcd1;
  --pine: #0e6655;
  --pine-strong: #0a4f42;
  --on-pine: #ffffff;
  --ember: #ff8a1f;
  --ember-ink: #a84c00;
  --sun: #ffc24b;
  --rose: #c21f5e;
  --rose-wash: #fbe6ee;
  --mint-wash: #d8efe3;
  --sun-wash: #fff1cf;
  --night: #16352f;
  --on-night: #f4faf5;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --display: "Bricolage", "Trebuchet MS", sans-serif;
  --body: "Atkinson", "Segoe UI", Roboto, sans-serif;
  --bar: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
--ink: #e8f2ec;
    --ink-soft: #a7c0b6;
    --paper: #0d211d;
    --surface: #15302a;
    --surface-2: #1d3d35;
    --line: #2d5048;
    --pine: #4fc9ac;
    --pine-strong: #7ddcc4;
    --on-pine: #06241d;
    --ember-ink: #ffb26b;
    --rose: #ff86b0;
    --rose-wash: #431c2d;
    --mint-wash: #17443a;
    --sun-wash: #43361a;
    --night: #0a1a17;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
--ink: #e8f2ec;
    --ink-soft: #a7c0b6;
    --paper: #0d211d;
    --surface: #15302a;
    --surface-2: #1d3d35;
    --line: #2d5048;
    --pine: #4fc9ac;
    --pine-strong: #7ddcc4;
    --on-pine: #06241d;
    --ember-ink: #ffb26b;
    --rose: #ff86b0;
    --rose-wash: #431c2d;
    --mint-wash: #17443a;
    --sun-wash: #43361a;
    --night: #0a1a17;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-text="large"] { font-size: 112.5%; }
:root[data-text="larger"] { font-size: 125%; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--body); overflow-wrap: anywhere; }
img, svg { display: block; max-width: 100%; }
a { color: var(--pine); text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.015em; margin: 0; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.8vw, 2.5rem); }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 .75em; }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); padding: 10px 14px; z-index: 50; border-radius: var(--radius-s); }
.skip:focus { top: 8px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Shell ------------------------------------------------------------------ */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 800 1.3rem/1 var(--display); letter-spacing: -.025em; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 31px; }
.brand .mark-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .mark-light-theme { display: none; }
  :root:not([data-theme="light"]) .brand .mark-dark { display: block; }
}
:root[data-theme="dark"] .brand .mark-light-theme { display: none; }
:root[data-theme="dark"] .brand .mark-dark { display: block; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.main { padding: 0 0 calc(var(--bar) + 28px + env(safe-area-inset-bottom)); min-width: 0; }
.page { max-width: 760px; margin: 0 auto; padding: 20px 16px; }
.page-narrow { max-width: 520px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.bottomnav { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--bar); font-size: .75rem; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.bottomnav .icon { width: 24px; height: 24px; }
.bottomnav a[aria-current="page"] { color: var(--pine); }
.bottomnav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 36px; height: 3px; background: var(--ember); border-radius: 0 0 3px 3px; }
.count { position: absolute; top: 7px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rose); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .count { color: #2c0614; } }
:root[data-theme="dark"] .count { color: #2c0614; }

.siderail { display: none; }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
  .topbar, .bottomnav { display: none; }
  .siderail { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 22px 14px; background: var(--surface); border-right: 1px solid var(--line); }
  .siderail .brand { padding: 0 10px 18px; }
  .siderail nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-m); font-weight: 700; color: var(--ink); text-decoration: none; }
  .siderail nav a:hover { background: var(--surface-2); }
  .siderail nav a[aria-current="page"] { background: var(--mint-wash); color: var(--pine-strong); }
  .siderail .count { position: static; margin-left: auto; }
  .siderail .btn { margin: 14px 4px 0; }
  .siderail-foot { margin-top: auto; padding: 0 12px; font-size: .85rem; color: var(--ink-soft); display: flex; gap: 12px; flex-wrap: wrap; }
  .siderail-foot a { color: inherit; }
  .main { padding-bottom: 48px; }
  .page { padding-top: 32px; }
}

/* Buttons and forms ------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 9px 18px; border: 2px solid transparent; border-radius: var(--radius-m); background: var(--pine); color: var(--on-pine); font: 700 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--pine-strong); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--surface-2); }
.btn-ember { background: var(--ember); color: #271300; }
.btn-ember:hover { background: var(--sun); }
.btn-danger { background: transparent; color: var(--rose); border-color: currentColor; }
.btn-danger:hover { background: var(--rose-wash); }
.btn-sm { min-height: 38px; padding: 5px 12px; font-size: .92rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.linkish { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 2px 8px; background: none; border: 0; border-radius: var(--radius-s); color: var(--ink-soft); font: 700 .88rem var(--body); text-decoration: none; cursor: pointer; }
.linkish:hover { background: var(--surface-2); color: var(--ink); }
.linkish.danger:hover { color: var(--rose); background: var(--rose-wash); }

.field { margin-bottom: 16px; }
label, .label { display: block; margin-bottom: 5px; font-weight: 700; }
.hint { display: block; margin-top: 4px; color: var(--ink-soft); font-size: .9rem; font-weight: 400; }
input[type=text], input[type=search], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); font: 400 1.0625rem/1.4 var(--body);
}
input:focus, select:focus, textarea:focus { border-color: var(--pine); outline: none; }
textarea { min-height: 130px; resize: vertical; }
input[type=file] { max-width: 100%; font: inherit; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 12px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--pine); }
.options { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-m); background: var(--surface); font-weight: 400; cursor: pointer; margin: 0; }
.option:has(input:checked) { border-color: var(--pine); background: var(--mint-wash); }
.option input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--pine); }
.option strong { display: block; }
.trap { position: absolute; left: -9999px; }
.inline-form { display: inline; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; margin-bottom: 18px; }
.form-card > h2 { margin-bottom: 12px; }
details.form-card > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; min-height: 28px; }
details.form-card > summary::-webkit-details-marker { display: none; }
details.form-card[open] > summary { margin-bottom: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-between { justify-content: space-between; }

/* Messages ---------------------------------------------------------------- */
.flash { display: flex; gap: 10px; align-items: flex-start; margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--radius-m); background: var(--mint-wash); font-weight: 700; }
@media (min-width: 960px) { .flash { max-width: 728px; margin: 18px auto 0; } }
.note { padding: 12px 14px; border-radius: var(--radius-m); background: var(--sun-wash); margin-bottom: 16px; }
.note-danger { background: var(--rose-wash); }
.form-error { display: none; }
.form-error.show { display: block; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); font-size: .8rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.badge-ember { background: var(--sun-wash); color: var(--ember-ink); }
.badge .icon { width: 13px; height: 13px; }

/* Landing ------------------------------------------------------------------ */
.hero { background: #16352f; color: var(--on-night); }
.hero-copy { max-width: 900px; margin: 0 auto; padding: 42px 20px 24px; }
.hero h1 { font-size: clamp(2.6rem, 1.5rem + 6.2vw, 5.4rem); font-weight: 800; line-height: .98; letter-spacing: -.035em; margin-bottom: 18px; max-width: 13ch; }
.hero p { max-width: 36em; font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: #d6e6dd; margin-bottom: 22px; }
.hero .btn-quiet { color: var(--on-night); border-color: #5b8176; }
.hero .btn-quiet:hover { background: #24524a; }
.hero .btn { min-height: 52px; font-size: 1.05rem; padding-inline: 22px; }
.hero-art { display: block; width: 100%; height: clamp(250px, 38vw, 520px); object-fit: cover; object-position: 50% 100%; }
.quilt { display: block; width: 100%; height: 40px; object-fit: cover; }
.landing-section { max-width: 1040px; margin: 0 auto; padding: 44px 20px 12px; }
.landing-section > h2 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.5rem); font-weight: 800; margin-bottom: 8px; max-width: 18ch; }
.features { display: grid; gap: 26px; margin-top: 22px; }
.feature img { width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-l); margin-bottom: 12px; }
.feature h3 { font-size: 1.3rem; margin-bottom: 4px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--sun); color: #271300; font: 800 1.25rem var(--display); }
.steps strong { display: block; font-size: 1.1rem; }
.closing { margin-top: 40px; background: var(--pine); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .closing { background: #0e5a4b; } }
:root[data-theme="dark"] .closing { background: #0e5a4b; }
.closing-inner { max-width: 1040px; margin: 0 auto; padding: 38px 20px; }
.closing h2 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.5rem); font-weight: 800; margin-bottom: 14px; }
.foot { max-width: 1040px; margin: 0 auto; padding: 20px; display: flex; gap: 16px; flex-wrap: wrap; font-size: .9rem; color: var(--ink-soft); }
.foot a { color: inherit; }
@media (min-width: 720px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { grid-template-columns: 1fr; }
}

/* Group cards ------------------------------------------------------------- */
.group-grid { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .group-grid { grid-template-columns: repeat(2, 1fr); } }
.group-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; color: inherit; text-decoration: none; }
.group-card:hover h3 { text-decoration: underline; }
.group-card img { width: 100%; height: 88px; object-fit: cover; }
.group-card-body { padding: 12px 14px 14px; }
.group-card h3 { margin-bottom: 3px; }
.group-card p { margin: 0 0 6px; color: var(--ink-soft); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px 8px; scrollbar-width: none; }
.chip { flex: none; padding: 7px 13px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: .92rem; text-decoration: none; }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.searchbar { display: flex; gap: 8px; margin-bottom: 14px; }
.searchbar input { flex: 1; min-width: 0; }

/* Group header ------------------------------------------------------------- */
.group-cover { display: block; width: 100%; height: clamp(120px, 24vw, 210px); object-fit: cover; background: var(--surface-2); }
.group-head { max-width: 760px; margin: 0 auto; padding: 16px 16px 0; }
.group-head h1 { font-weight: 800; margin-bottom: 5px; }
.group-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-soft); font-size: .95rem; margin-bottom: 8px; }
.group-meta span { display: inline-flex; gap: 5px; align-items: center; }
.group-desc { margin-bottom: 12px; max-width: 62ch; }
.group-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tabs-wrap { position: sticky; top: 56px; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); margin-top: 8px; }
@media (min-width: 960px) { .tabs-wrap { top: 0; } }
.tabs { display: flex; gap: 2px; max-width: 760px; margin: 0 auto; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 48px; padding: 0 12px; color: var(--ink-soft); font-weight: 700; font-size: .96rem; text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px var(--ember); }
.tabs .count { position: static; }
.banner-removed { background: var(--rose-wash); padding: 10px 16px; font-weight: 700; }

/* Discussion lists --------------------------------------------------------- */
.avatar { width: 40px; height: 40px; border-radius: 10px; flex: none; background: var(--surface-2); }
.avatar-lg { width: 72px; height: 72px; border-radius: 16px; }
.avatar-sm { width: 28px; height: 28px; border-radius: 7px; }
.thread-list { margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.thread-list > li + li { border-top: 1px solid var(--line); }
.thread { position: relative; display: flex; gap: 12px; padding: 14px; }
.thread:hover { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.thread-main { min-width: 0; flex: 1; }
.thread-title { display: block; font: 600 1.13rem/1.25 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.thread-title::after { content: ""; position: absolute; inset: 0; }
.thread-title:focus-visible::after { outline: 3px solid var(--ember); outline-offset: -3px; border-radius: 8px; }
.thread.unread .thread-title { font-weight: 800; }
.thread-excerpt { margin: 3px 0 5px; color: var(--ink-soft); font-size: .96rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread-meta { display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: center; color: var(--ink-soft); font-size: .86rem; }
.thread-meta span { display: inline-flex; gap: 4px; align-items: center; }
.thread-meta .icon { width: 15px; height: 15px; }
.unread-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--ember); flex: none; transform: rotate(45deg); margin: 7px 2px 0 0; }
.group-label { font-weight: 700; color: var(--pine); }

.empty { text-align: center; padding: 26px 16px; }
.empty img { width: 150px; margin: 0 auto 8px; }
.empty h2 { margin-bottom: 6px; }
.empty .btn { margin-top: 6px; }

.home-layout { display: grid; gap: 18px; max-width: 1080px; margin: 0 auto; padding: 20px 16px; }
@media (min-width: 1160px) {
  .home-layout { grid-template-columns: minmax(0, 1fr) 300px; padding-top: 32px; align-items: start; }
}
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px; margin-bottom: 14px; }
.side-card h2 { font-size: 1.1rem; margin-bottom: 8px; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mini-list a { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 9px; color: inherit; text-decoration: none; font-weight: 700; }
.mini-list a:hover { background: var(--surface-2); }
.mini-list img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; }
.segmented { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 11px; margin-bottom: 14px; }
.segmented a { padding: 7px 15px; border-radius: 9px; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.segmented a[aria-current="true"] { background: var(--surface); color: var(--ink); }

/* Topic page ---------------------------------------------------------------- */
.crumb { display: inline-flex; gap: 5px; align-items: center; color: var(--ink-soft); font-weight: 700; font-size: .92rem; text-decoration: none; margin-bottom: 10px; min-height: 30px; }
.topic-title { font-weight: 800; margin-bottom: 14px; }
.post { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.post-first { border-top: 0; padding-top: 0; }
.post-head { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; margin-bottom: 4px; }
.post-author { font-weight: 700; color: var(--ink); text-decoration: none; }
.post-author:hover { text-decoration: underline; }
.post-actions { display: flex; flex-wrap: wrap; margin: 6px 0 0 -8px; }
.prose { max-width: 66ch; }
.prose > *:last-child { margin-bottom: 0; }
.prose a { font-weight: 700; }
.prose blockquote { margin: 0 0 .75em; padding: 4px 12px; border-left: 4px solid var(--sun); background: var(--sun-wash); border-radius: 0 8px 8px 0; }
.prose pre { overflow-x: auto; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; font-size: .9rem; }
.prose code { background: var(--surface-2); padding: .1em .3em; border-radius: 4px; font-size: .92em; }
.prose pre code { background: none; padding: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 .75em; }
.prose h3, .prose h4 { margin: 1em 0 .35em; }
.reply-quote { display: block; margin-bottom: 7px; padding: 5px 10px; border-left: 4px solid var(--line); color: var(--ink-soft); font-size: .92rem; text-decoration: none; }
.reply-quote strong { color: var(--ink); }
.post-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; margin-top: 10px; max-width: 560px; }
.post-images img { width: 100%; height: 100%; max-height: 340px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.post:target .post-body { background: var(--sun-wash); box-shadow: 0 0 0 8px var(--sun-wash); border-radius: 2px; }
.removed-text { font-style: italic; color: var(--ink-soft); }
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px; margin-top: 14px; }
.composer h2 { font-size: 1.1rem; margin-bottom: 8px; }
.composer textarea { min-height: 100px; }
.reply-chip { display: none; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 4px 4px 4px 10px; border-radius: 9px; background: var(--surface-2); font-size: .92rem; }
.reply-chip.show { display: flex; }
.composer-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.picker { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border: 2px dashed var(--line); border-radius: 10px; color: var(--ink-soft); font-weight: 700; font-size: .92rem; cursor: pointer; margin: 0; }
.picker:hover { border-color: var(--pine); color: var(--ink); }
.picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.picker:has(input:focus-visible) { outline: 3px solid var(--ember); outline-offset: 2px; }
.previews { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.format-help { font-size: .9rem; color: var(--ink-soft); margin-top: 6px; }
.format-help summary { cursor: pointer; font-weight: 700; }
.mod-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px 8px; margin-bottom: 14px; border-radius: 10px; background: var(--surface-2); }
.mod-bar > strong { padding: 0 6px; font-size: .9rem; display: inline-flex; gap: 5px; align-items: center; }
.locked-note { display: flex; gap: 8px; align-items: center; padding: 12px; margin-top: 14px; border-radius: var(--radius-m); background: var(--surface-2); }

/* Lists: members, files, events, polls -------------------------------------- */
.list { margin: 0 0 18px; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.list > li { display: flex; gap: 12px; padding: 12px 14px; align-items: flex-start; }
.list > li + li { border-top: 1px solid var(--line); }
.list-main { flex: 1; min-width: 0; }
.list-main strong a, .list-title { color: var(--ink); font-weight: 700; text-decoration: none; }
.list-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; margin-left: -8px; }
.file-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--sun-wash); color: var(--ember-ink); flex: none; }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 58px; flex: none; border-radius: 10px; background: var(--pine); color: var(--on-pine); line-height: 1; font-weight: 700; }
.date-tile b { font: 800 1.5rem/1 var(--display); }
.date-tile span { font-size: .75rem; margin-bottom: 2px; }
.section-title { margin: 22px 0 10px; }
.poll { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px; margin-bottom: 14px; }
.poll h2 { font-size: 1.2rem; margin-bottom: 10px; }
.poll-option { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; padding: 8px 10px; margin-bottom: 6px; border: 2px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; }
button.poll-option { cursor: pointer; }
button.poll-option:hover { border-color: var(--pine); }
.poll-option.mine { border-color: var(--pine); }
.poll-option .pct { font-weight: 700; }
.poll-option progress { grid-column: 1 / -1; width: 100%; height: 8px; appearance: none; border: 0; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.poll-option progress::-webkit-progress-bar { background: var(--surface-2); }
.poll-option progress::-webkit-progress-value { background: var(--ember); }
.poll-option progress::-moz-progress-bar { background: var(--ember); }
.code-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.code-grid li { padding: 9px 10px; background: var(--surface-2); border-radius: 8px; text-align: center; font: 700 1.02rem ui-monospace, Consolas, monospace; letter-spacing: .03em; }
.invite-link { display: flex; gap: 8px; margin-top: 6px; }
.invite-link input { flex: 1; min-width: 0; font-size: .9rem; }
mark { background: var(--sun); color: #271300; border-radius: 3px; padding: 0 2px; }
.menu-list { list-style: none; margin: 0 0 18px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.menu-list li + li { border-top: 1px solid var(--line); }
.menu-list a, .menu-list button { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 56px; padding: 8px 14px; background: none; border: 0; color: var(--ink); font: 700 1rem var(--body); text-align: left; text-decoration: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }
.menu-list .chev { margin-left: auto; color: var(--ink-soft); }
.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; }
.stat b { display: block; font: 800 1.6rem/1.1 var(--display); }
.article h2 { margin: 1.3em 0 .4em; }
.article li { margin-bottom: .3em; }
.auth-art { width: 58px; margin-bottom: 12px; }
.pager { display: flex; justify-content: space-between; margin-top: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .flash { animation: drop .25s ease-out; }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
}
@media print { .topbar, .bottomnav, .siderail, .composer { display: none; } }

/* Small helpers ------------------------------------------------------------ */
.center { justify-content: center; }
.grow { flex: 1 1 200px; width: auto; }
.empty .row { justify-content: center; }
.main-wrap { min-width: 0; }
.notify-menu { position: relative; }
.notify-menu summary { list-style: none; }
.notify-menu summary::-webkit-details-marker { display: none; }
.notify-form { position: absolute; z-index: 15; top: calc(100% + 6px); left: 0; width: min(300px, calc(100vw - 32px)); margin: 0; display: grid; gap: 8px; box-shadow: 0 10px 30px rgb(10 40 34 / .2); }
.steps-plain { grid-template-columns: 1fr !important; margin-bottom: 1em; }
.steps-plain li { grid-template-columns: 44px 1fr !important; align-items: center; margin: 0; }
.list .list-main > label { margin-bottom: 6px; }
form.list-actions { margin-top: 2px; }
[hidden] { display: none !important; }

/* Settings ----------------------------------------------------------------- */
.site-banner { padding: 10px 16px; background: var(--sun-wash); font-weight: 700; text-align: center; }
.site-banner-warn { background: var(--rose-wash); }
input[type=number], input[type=url] { width: 100%; min-height: 46px; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); font: 400 1.0625rem/1.4 var(--body); }
.admin-tabs { display: flex; gap: 2px; overflow-x: auto; margin: 0 -16px 18px; padding: 0 8px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.admin-tabs a { flex: none; min-height: 46px; padding: 11px 12px; color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.admin-tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px var(--ember); }
.rule-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rule-row .check { margin: 0; }
.rule-row .hint { margin-top: 1px; }
.rule-row input[type=number] { min-height: 40px; padding: 6px 8px; }
.two-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.avatar-edit { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.avatar-edit .previews { margin: 0; }
.avatar-edit .previews img { width: 72px; height: 72px; border-radius: 16px; }
.menu-heading { margin: 18px 0 8px; font-size: 1rem; color: var(--ink-soft); }
.rules-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 14px; margin-bottom: 14px; }
.rules-box summary { font-weight: 700; cursor: pointer; }
.meter-line { height: 8px; width: 100%; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: var(--surface-2); }
.meter-line::-webkit-progress-bar { background: var(--surface-2); }
.meter-line::-webkit-progress-value { background: var(--pine); }
.meter-line::-moz-progress-bar { background: var(--pine); }
.table-scroll { overflow-x: auto; }
.avatar-edit:has(.previews:not(:empty)) .avatar-current { display: none; }
input[type=password] { width: 100%; min-height: 46px; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); font: 400 1.0625rem/1.4 var(--body); }
.login-password { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.login-password h2 { font-size: 1.05rem; margin-bottom: 10px; }
.section-gap { margin-top: 14px; }
