/* Sumin — design tokens + components
   Fonts: Bricolage Grotesque (display), Instrument Sans (text) */

:root {
  --bg: #F7F8F8; --surface: #FFFFFF; --subtle: #EFF1F1; --line: #E2E6E5;
  --ink: #101413; --ink2: #4E5654; --ink3: #6E7573;
  --accent: #0F766E; --accent-ink: #0B5C56; --accent-soft: #E3F3F0; --on-accent: #FFFFFF;
  --ok: #1E6B4F; --ok-soft: #E6F2EC; --info: #2563EB; --info-soft: #E8EFFD;
  --danger: #B42318; --danger-soft: #FDECEA;
  --shadow: 0 1px 2px rgba(16,20,19,.05), 0 4px 16px rgba(16,20,19,.05);
  --shadow-lg: 0 24px 60px rgba(16,20,19,.12);
  --radius: 14px; --radius-sm: 10px;
  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --sidebar: 248px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0C1110; --surface: #141A19; --subtle: #1D2524; --line: #2A3433;
  --ink: #EDF1F0; --ink2: #AFB8B6; --ink3: #97A09E;
  --accent: #2DD4BF; --accent-ink: #5EEAD4; --accent-soft: #123330; --on-accent: #06211F;
  --ok: #5CC39A; --ok-soft: #16302A; --info: #93B4FB; --info-soft: #16224A;
  --danger: #F97066; --danger-soft: #3B1715;
  --shadow: none; --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1110; --surface: #141A19; --subtle: #1D2524; --line: #2A3433;
    --ink: #EDF1F0; --ink2: #AFB8B6; --ink3: #97A09E;
    --accent: #2DD4BF; --accent-ink: #5EEAD4; --accent-soft: #123330; --on-accent: #06211F;
    --ok: #5CC39A; --ok-soft: #16302A; --info: #93B4FB; --info-soft: #16224A;
    --danger: #F97066; --danger-soft: #3B1715;
    --shadow: none; --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { 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; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: var(--bg); }
.icon { flex-shrink: 0; }
[hidden] { display: none !important; }

.disp { font-family: var(--display); letter-spacing: -0.02em; font-weight: 700; }
.h-hero { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; font-size: clamp(42px, 6vw, 72px); line-height: 1.02; }
.h1 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: 26px; }
.h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; }
.h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; font-size: 20px; }
.h4 { font-size: 16px; font-weight: 600; }
.muted { color: var(--ink2); }
.faint { color: var(--ink3); font-size: 13px; }
.lead { font-size: 18px; color: var(--ink2); line-height: 1.55; }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-sm { display: flex; align-items: center; gap: 6px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.ml-auto { margin-left: auto; }
.between { justify-content: space-between; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: filter .12s, background-color .12s, border-color .12s; background: none; }
.btn:hover { filter: brightness(.96); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .6; cursor: default; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { color: var(--on-accent); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover { color: var(--bg); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { color: var(--ink); border-color: var(--ink3); filter: none; }
.btn-ghost { color: var(--ink2); }
.btn-ghost:hover { background: var(--subtle); color: var(--ink); filter: none; }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn-soft:hover { color: var(--accent-ink); }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-ok:hover { color: var(--ok); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { color: var(--danger); }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; width: 40px; height: 40px; padding: 0; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink2); }
.btn-icon:hover { color: var(--ink); filter: none; border-color: var(--ink3); }
.btn-icon.sm { width: 36px; height: 36px; }
.mobile-head .btn-icon { width: 44px; height: 44px; }
.btn-plain { width: 32px; height: 32px; padding: 0; border: 0; background: none; color: var(--ink3); border-radius: 8px; }
.btn-plain:hover { background: var(--subtle); color: var(--ink); filter: none; }
.inline-form { display: inline; margin: 0; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 13px; font-weight: 600; color: var(--ink2); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; }
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--ink3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236B6B74' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink3); pointer-events: none; }
.input-icon .input { padding-left: 40px; }
.input-affix { position: relative; }
.input-affix .input { padding-right: 48px; }
.input-affix .affix { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; background: none; color: var(--ink3); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.hint { font-size: 13px; color: var(--ink3); }
.error-text { font-size: 13px; color: var(--danger); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.file-drop { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.file-drop input { font-size: 14px; max-width: 100%; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-flat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-link { transition: border-color .12s; }
.card-link:hover { border-color: var(--ink3); }
.card-dark { background: var(--ink); color: var(--bg); border-radius: 16px; padding: 24px; }
.card-dark p { color: var(--line); }
.card-accent { background: var(--accent-soft); border-radius: 16px; padding: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head h2, .section-head h3 { font-size: 16px; font-weight: 600; font-family: var(--font); letter-spacing: 0; }
.section-head a { font-size: 14px; font-weight: 600; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.empty { text-align: center; padding: 48px 24px; color: var(--ink2); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .icon-wrap { width: 56px; height: 56px; border-radius: 16px; background: var(--subtle); color: var(--ink3); display: flex; align-items: center; justify-content: center; }
.empty h3 { color: var(--ink); font-size: 18px; }

/* ---------- Chips, pills, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--subtle); color: var(--ink2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip-accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.pill:hover { color: var(--ink); border-color: var(--ink3); }
.pill[aria-current="page"], .pill.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill .count { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.pill[aria-current="page"] .count { background: var(--accent); color: var(--on-accent); }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); }
.badge-muted { background: var(--subtle); color: var(--ink2); }
.dot { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); flex-shrink: 0; }
.verified { color: var(--info); display: inline-flex; }

/* ---------- Avatars & logos ---------- */
.avatar { border-radius: 999px; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; background: var(--subtle); }
.avatar-xs { width: 28px; height: 28px; font-size: 11px; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.avatar-md { width: 44px; height: 44px; font-size: 15px; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-xl { width: 96px; height: 96px; font-size: 32px; }
.logo-mark { border-radius: 12px; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; }
.logo-sm { width: 40px; height: 40px; font-size: 15px; border-radius: 10px; }
.logo-md { width: 56px; height: 56px; font-size: 18px; }
.logo-lg { width: 88px; height: 88px; font-size: 28px; border-radius: 18px; }
.tone-0 { background: #E3F3F0; color: #0B5C56; }
.tone-1 { background: #E6F2EC; color: #1E6B4F; }
.tone-2 { background: #EAF0FD; color: #2A5BD7; }
.tone-3 { background: #F4ECFB; color: #6B3FA0; }
.tone-4 { background: #FCF3DC; color: #8A5A00; }
.tone-5 { background: #EDEDEA; color: #3F3F46; }

.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: auto; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }

/* ---------- Flash messages ---------- */
.flashes { display: flex; flex-direction: column; gap: 8px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; }
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: var(--info-soft); color: var(--info); }
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); pointer-events: auto; }
.toast.is-error { background: var(--danger); color: #fff; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex-shrink: 0; position: sticky; top: 0; height: 100vh; padding: 20px 16px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 20px; overflow-y: auto; }
.sidebar .brand { padding: 4px 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; color: var(--ink2); }
.nav-link:hover { background: var(--subtle); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--subtle); color: var(--ink); font-weight: 600; }
.nav-link[aria-current="page"] .icon { color: var(--accent); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.prefs { display: flex; gap: 6px; align-items: center; padding: 0 4px; }
.seg { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent; font-size: 13px; font-weight: 500; color: var(--ink2); display: inline-flex; align-items: center; }
.seg.is-active { border-color: var(--line); background: var(--subtle); color: var(--ink); font-weight: 600; }
.theme-toggle { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--ink2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); }
.me-card:hover { color: var(--ink); background: var(--subtle); }
.me-menu { position: relative; }
.me-menu summary { list-style: none; cursor: pointer; }
.me-menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; z-index: 30; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 14px; cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--subtle); color: var(--ink); }
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown .menu-pop { top: calc(100% + 6px); bottom: auto; left: auto; right: 0; min-width: 180px; }

.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 20px 32px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.topbar .titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar .actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .search { width: 300px; }
.content { display: flex; gap: 24px; padding: 24px 32px 64px; align-items: flex-start; }
.content > main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rail { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 104px; }
.narrow { max-width: 760px; }

.mobile-head { display: none; }
.tabbar { display: none; }

/* ---------- Posts ---------- */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 10px; display: flex; gap: 14px; }
.post-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.post-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.post-head .who { font-weight: 600; color: var(--ink); }
.post-text { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.post-text a { font-weight: 500; }
.post-image { border-radius: 12px; border: 1px solid var(--line); max-height: 460px; width: 100%; object-fit: cover; }
.link-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink2); font-size: 14px; overflow: hidden; }
.link-card:hover { border-color: var(--ink3); color: var(--ink); }
.actions-row { display: flex; gap: 4px; margin-left: -10px; }
.act { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 8px; border: 0; background: none; color: var(--ink3); font-size: 14px; cursor: pointer; }
.act:hover { background: var(--subtle); color: var(--ink); }
.act[aria-pressed="true"].is-like { color: var(--accent); }
.act[aria-pressed="true"].is-like svg { fill: currentColor; }
.act[aria-pressed="true"].is-repost { color: var(--ok); }
.act.static { cursor: default; }
.act.static:hover { background: none; color: var(--ink3); }
.replies { border-top: 1px solid var(--line); margin-top: 4px; padding: 12px 0 8px; display: flex; flex-direction: column; gap: 12px; }
.reply { display: flex; gap: 10px; }
.reply-bubble { background: var(--subtle); border-radius: 12px; padding: 8px 12px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.reply-form { display: flex; gap: 8px; }
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.composer textarea { border: 0; resize: none; background: transparent; width: 100%; font-size: 16px; padding: 10px 0; min-height: 52px; }
.composer textarea:focus { outline: none; }
.composer-tools { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); padding-top: 12px; margin-left: 58px; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink2); font-size: 14px; cursor: pointer; }
.tool:hover { background: var(--subtle); color: var(--ink); }
.tool input[type=file] { display: none; }
.preview-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); background: var(--subtle); border-radius: 999px; padding: 4px 10px; }

/* ---------- Launch rows ---------- */
.launch { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.launch.compact { padding: 12px; gap: 14px; }
.launch .rank { width: 20px; font-size: 14px; font-weight: 600; color: var(--ink3); text-align: right; flex-shrink: 0; }
.launch .info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.launch .name { font-size: 16px; font-weight: 600; color: var(--ink); }
.launch.compact .name { font-size: 15px; }
.launch .tagline { font-size: 14px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upvote { width: 60px; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; font-size: 14px; cursor: pointer; flex-shrink: 0; }
.launch.compact .upvote { width: 48px; height: 48px; }
.upvote:hover { border-color: var(--accent); }
.upvote[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.upvote:disabled { cursor: default; }

/* ---------- People ---------- */
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.person .who { font-size: 16px; font-weight: 600; color: var(--ink); }
.person .bio { font-size: 14px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.person-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters .field { flex: 1 1 160px; }
.filters .field.wide { flex: 2 1 240px; }
.save-btn[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.save-btn[aria-pressed="true"] svg { fill: currentColor; }

/* ---------- Events ---------- */
.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.event { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.event-top { display: flex; gap: 14px; align-items: flex-start; }
.datebox { width: 56px; height: 60px; border-radius: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; background: var(--bg); }
.datebox .m { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--accent-ink); }
.datebox .d { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.1; }
.datebox.sm { width: 44px; height: 48px; border-radius: 10px; }
.datebox.sm .d { font-size: 17px; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.event-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; flex-wrap: wrap; }
.event-flyer { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.progress { height: 8px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 600; color: var(--ink2); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- Messages ---------- */
.chat { display: flex; height: 100vh; min-width: 0; flex: 1 1 auto; }
.convos { width: 360px; flex-shrink: 0; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.convos-head { padding: 20px 20px 12px; display: flex; flex-direction: column; gap: 14px; }
.convo-list { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.convo { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; color: var(--ink); }
.convo:hover, .convo[aria-current="page"] { background: var(--subtle); color: var(--ink); }
.convo .preview { font-size: 13px; color: var(--ink3); }
.convo.unread .preview { color: var(--ink); font-weight: 600; }
.thread { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.thread-body { flex: 1 1 auto; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.day-sep { align-self: center; font-size: 12px; font-weight: 600; color: var(--ink3); padding: 4px 10px; border-radius: 999px; background: var(--subtle); margin: 10px 0; }
.bubble-wrap { display: flex; flex-direction: column; max-width: min(520px, 80%); gap: 2px; }
.bubble-wrap.mine { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 10px 14px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; }
.mine .bubble { background: var(--ink); color: var(--bg); border-color: var(--ink); border-radius: 16px 16px 4px 16px; }
.bubble-meta { font-size: 12px; color: var(--ink3); display: flex; gap: 6px; align-items: center; }
.bubble-meta button { border: 0; background: none; color: var(--ink3); font-size: 12px; cursor: pointer; padding: 0 2px; }
.bubble-meta button:hover { color: var(--ink); text-decoration: underline; }
.thread-form { padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: 10px; align-items: flex-end; }
.thread-form textarea { min-height: 44px; max-height: 160px; height: 44px; padding: 11px 14px; resize: none; }
.send-btn { width: 44px; height: 44px; padding: 0; flex-shrink: 0; }

/* ---------- Profile ---------- */
.profile-head { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cover { height: 120px; background: var(--accent-soft); position: relative; }
.cover img { position: absolute; right: 24px; top: 18px; width: 64px; opacity: .9; }
.profile-body { padding: 0 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.profile-top { position: relative; display: flex; align-items: flex-end; gap: 16px; margin-top: -44px; flex-wrap: wrap; }
.profile-top .avatar { border: 4px solid var(--surface); box-sizing: content-box; }
.stats { display: flex; gap: 40px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.stat b { display: block; font-family: var(--display); font-size: 22px; }
.stat span { font-size: 13px; color: var(--ink3); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.check-item { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check-item .tick { width: 28px; height: 28px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.portfolio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.portfolio-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
.portfolio-item img { height: 120px; width: 100%; object-fit: cover; }
.portfolio-item .pi-body { padding: 10px 12px; display: flex; align-items: center; gap: 8px; }

/* ---------- Notifications ---------- */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.notice:hover { border-color: var(--ink3); color: var(--ink); }
.notice.unread { background: var(--accent-soft); border-color: transparent; }
.notice .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--subtle); color: var(--ink2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- Dialog ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink); width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10,10,12,.45); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); }

/* ---------- Public pages ---------- */
.site-header { display: flex; align-items: center; gap: 40px; padding: 18px 80px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { font-size: 15px; font-weight: 500; color: var(--ink2); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; color: var(--ink2); font-size: 14px; font-weight: 500; }
.menu-toggle { display: none; }
.section { padding: 96px 80px; }
.section-tight { padding: 0 80px 96px; }
.container { max-width: 1280px; margin: 0 auto; width: 100%; }
.hero { display: flex; align-items: center; gap: 72px; padding: 88px 80px 104px; max-width: 1440px; margin: 0 auto; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; flex: 1 1 auto; min-width: 0; }
.eyebrow { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.eyebrow img { width: 20px; }
.hero-visual { position: relative; width: 560px; flex-shrink: 0; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hero-float { position: absolute; left: -48px; bottom: -36px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.stat-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stat-strip .container { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 32px 80px; max-width: 1440px; }
.stat-strip .s { display: flex; flex-direction: column; gap: 4px; padding: 0 24px; border-left: 1px solid var(--line); }
.stat-strip .s b { font-family: var(--display); font-size: 40px; letter-spacing: -0.02em; }
.stat-strip .s span { font-size: 14px; color: var(--ink2); }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.feature { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.step { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 2px solid var(--line); }
.step:first-child { border-top-color: var(--accent); }
.step .n { font-family: var(--display); font-size: 14px; font-weight: 700; color: var(--accent-ink); }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band .container { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; padding: 80px; max-width: 1440px; }
.cta { background: var(--ink); border-radius: 28px; padding: 72px; display: flex; align-items: center; gap: 48px; }
.cta h2 { color: var(--bg); }
.cta p { color: var(--line); font-size: 17px; }
.site-footer { padding: 56px 80px 40px; border-top: 1px solid var(--line); }
.footer-top { display: flex; gap: 80px; flex-wrap: wrap; }
.footer-cols { margin-left: auto; display: flex; gap: 72px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col b { font-size: 13px; }
.footer-col a { font-size: 14px; color: var(--ink2); }
.footer-bottom { display: flex; align-items: center; gap: 16px; padding-top: 24px; margin-top: 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink3); flex-wrap: wrap; }
.footer-bottom a { color: var(--ink2); }
.page-hero { padding: 72px 80px 40px; max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.prose { max-width: 760px; margin: 0 auto; padding: 0 80px 96px; display: flex; flex-direction: column; gap: 28px; }
.prose h2 { font-family: var(--display); font-size: 22px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--ink2); font-size: 16px; line-height: 1.65; }
.prose section { display: flex; flex-direction: column; gap: 8px; }
.faq { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.faq summary { cursor: pointer; padding: 18px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .15s; color: var(--ink3); }
.faq[open] summary .icon { transform: rotate(180deg); }
.faq .answer { padding: 0 20px 18px; color: var(--ink2); line-height: 1.6; }

/* Auth */
.auth { display: flex; min-height: 100vh; }
.auth-form-side { width: 50%; padding: 40px 64px; display: flex; flex-direction: column; }
.auth-form { margin: auto 0; width: 100%; max-width: 420px; align-self: center; display: flex; flex-direction: column; gap: 20px; padding: 32px 0; }
.auth-art { width: 50%; background: #101413; padding: 64px; display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; position: relative; overflow: hidden; }
.auth-art h2 { color: #F7F8F8; font-size: 44px; max-width: 520px; }
.auth-art p { color: #C3CBC9; font-size: 17px; max-width: 480px; }
.auth-art .art-stack { position: absolute; top: 72px; right: -60px; width: 520px; display: flex; flex-direction: column; gap: 12px; }
.seg-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--subtle); }
.seg-tabs a { flex: 1 1 0; height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: 14px; color: var(--ink2); border: 1px solid transparent; }
.seg-tabs a[aria-current="page"] { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 600; }
.strength { height: 6px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* Pagination */
.load-more { display: flex; justify-content: center; padding: 8px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .rail { width: 300px; }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { gap: 48px; padding: 64px 48px 96px; }
  .hero-visual { width: 460px; }
  .site-header, .section, .site-footer { padding-left: 48px; padding-right: 48px; }
  .section-tight { padding-left: 48px; padding-right: 48px; }
  .band .container, .stat-strip .container { padding-left: 48px; padding-right: 48px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .rail { display: none; }
  .content > main { max-width: 100%; }
  .topbar .search { width: 220px; }
  .hero { flex-direction: column; align-items: stretch; }
  .hero-visual { width: 100%; max-width: 560px; }
  .hero-float { left: 16px; }
  .band .container { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; padding: 48px; }
  .auth-art { display: none; }
  .auth-form-side { width: 100%; }
}
@media (max-width: 860px) {
  body { font-size: 15px; }
  .sidebar { display: none; }
  .mobile-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 25; }
  .mobile-head .actions { margin-left: auto; display: flex; gap: 8px; }
  .topbar { position: static; padding: 16px; flex-wrap: wrap; }
  .topbar .search { display: none; }
  .content { padding: 16px 12px 110px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(68px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--surface); }
  .tabbar a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--ink3); position: relative; }
  .tabbar a[aria-current="page"] { color: var(--accent-ink); font-weight: 600; }
  .tabbar .badge { position: absolute; top: 8px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: 11px; }
  .people-grid, .event-grid, .two-col, .portfolio { grid-template-columns: 1fr; }
  .post { padding: 14px 14px 6px; gap: 10px; }
  .post .avatar-md { width: 36px; height: 36px; font-size: 13px; }
  .actions-row .act.views { display: none; }
  .composer-tools { margin-left: 0; }
  .launch { padding: 12px; gap: 12px; }
  .launch .rank { display: none; }
  .launch .logo-md { width: 44px; height: 44px; font-size: 16px; }
  .upvote { width: 52px; height: 56px; }
  .chat { height: calc(100vh - 60px - 68px); }
  .convos { width: 100%; border-right: 0; }
  .chat.has-thread .convos { display: none; }
  .chat:not(.has-thread) .thread { display: none; }
  .thread-head, .thread-body, .thread-form { padding-left: 12px; padding-right: 12px; }
  .profile-body { padding: 0 16px 20px; }
  .stats { gap: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }

  .site-header { padding: 14px 16px; gap: 12px; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .site-nav.open a { padding: 12px 0; }
  .menu-toggle { display: inline-flex; }
  .site-actions .hide-sm { display: none; }
  .site-actions { gap: 6px; }
  .site-actions .btn { height: 40px; padding: 0 12px; font-size: 14px; }
  .lang-switch { padding: 0 6px; }
  .site-header .brand span { font-size: 20px; }
  .hero { padding: 32px 16px 72px; gap: 40px; }
  .stat-strip .container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; padding: 24px 16px; }
  .stat-strip .s b { font-size: 30px; }
  .section { padding: 56px 16px; }
  .section-tight { padding: 0 16px 56px; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .band .container { padding: 48px 16px; gap: 40px; }
  .cta { padding: 32px 24px; border-radius: 20px; }
  .site-footer { padding: 40px 16px 32px; }
  .footer-cols { margin-left: 0; gap: 40px; }
  .page-hero { padding: 40px 16px 24px; }
  .prose { padding: 0 16px 56px; }
  .auth-form-side { padding: 24px 16px; }
  .hero-float { position: static; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
