:root {
  color-scheme: light dark;
  --paper: #f4f0e8;
  --paper-bright: #fbf9f4;
  --paper-deep: #e8e1d6;
  --ink: #171716;
  --muted: #6f6b63;
  --line: #cbc4b8;
  --line-dark: #8c877f;
  --coral: #ef654e;
  --coral-soft: #ffd7cf;
  --lime: #d9f86b;
  --blue: #5f82ff;
  --blue-soft: #dce4ff;
  --violet: #9b6cf1;
  --green: #4e9f74;
  --amber: #db9f32;
  --pink: #dc6ea7;
  --inverse-surface: #171716;
  --inverse-text: #f9f7f1;
  --inverse-muted: #b8b4aa;
  --inverse-line: #45433f;
  --lime-text: #1b2405;
  --radius: 18px;
  --max: 1440px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
}

html[data-theme="dark"] {
  --paper: #0b1020;
  --paper-bright: #121a2c;
  --paper-deep: #1b2539;
  --ink: #f4f7ff;
  --muted: #a8b1c4;
  --line: #303c52;
  --line-dark: #69758c;
  --coral-soft: #512e35;
  --blue-soft: #263865;
  --inverse-surface: #182337;
  --inverse-text: #f4f7ff;
  --inverse-muted: #bac4d7;
  --inverse-line: #43516a;
  --lime-text: #172004;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; text-rendering: optimizeLegibility; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
::selection { color: var(--ink); background: var(--lime); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; z-index: 999; left: 16px; top: -80px; background: var(--ink); color: white; padding: 12px 18px; border-radius: 0 0 10px 10px; transition: top .2s ease; }
.skip-link:focus { top: 0; }

.app-shell { min-height: 100vh; overflow: clip; }
.lab-strip { height: 31px; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); display: flex; align-items: center; gap: 24px; background: var(--ink); color: #f9f7f1; font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.lab-strip > span:first-child::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(217,248,107,.16); }
.lab-strip > span:nth-child(2) { color: #96938d; }
.network-indicator { margin-left: auto; display: flex; align-items: center; gap: 7px; color: #a8a49c; letter-spacing: .08em; }
.network-indicator > span { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.network-indicator.is-offline { color: #ffcfc7; }
.network-indicator.is-offline > span { background: var(--coral); }

.site-header { position: sticky; z-index: 100; top: 0; min-height: 78px; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(244,240,232,.93); backdrop-filter: blur(16px); }
.brand { display: inline-flex; width: max-content; align-items: center; gap: 11px; font-weight: 850; letter-spacing: -.045em; font-size: 21px; }
.brand-word span { color: var(--coral); }
.brand-mark { position: relative; width: 31px; height: 31px; flex: 0 0 auto; border: 2px solid var(--ink); border-radius: 50%; overflow: hidden; transform: rotate(-14deg); }
.brand-mark i { position: absolute; display: block; border: 2px solid var(--ink); border-radius: 50%; }
.brand-mark i:nth-child(1) { width: 23px; height: 23px; left: -3px; top: 5px; }
.brand-mark i:nth-child(2) { width: 15px; height: 15px; left: 3px; top: 9px; }
.brand-mark i:nth-child(3) { width: 5px; height: 5px; left: 8px; top: 14px; background: var(--coral); border: 0; }
.desktop-nav { display: flex; align-self: stretch; align-items: center; gap: 32px; }
.desktop-nav a { position: relative; display: flex; align-items: center; height: 100%; color: var(--muted); font-size: 13px; font-weight: 680; }
.desktop-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; }
.desktop-nav a:hover, .desktop-nav a.is-active { color: var(--ink); }
.desktop-nav a.is-active::after { background: var(--coral); }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.auth-form { display: inline-flex; margin: 0; }
.auth-form button { font: inherit; }
.theme-toggle { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-bright); color: var(--ink); cursor: pointer; }
.language-switcher select { min-width: 125px; height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-bright); color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.language-switcher--compact select { min-width: 54px; width: 58px; color: transparent; padding-left: 9px; background-image: none; }
.language-switcher--compact { position: relative; }
.language-switcher--compact::before { content: "文"; position: absolute; z-index: 1; pointer-events: none; top: 9px; left: 14px; color: var(--ink); font-weight: 800; }
.header-signin { font-size: 12px; white-space: nowrap; }
.viewer-chip { max-width: 150px; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 750; white-space: nowrap; overflow: hidden; }
.viewer-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.mobile-menu { display: none; position: relative; justify-self: end; }
.mobile-menu summary { list-style: none; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; font-weight: 900; letter-spacing: 2px; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu-panel { position: absolute; right: 0; top: 50px; width: min(280px, calc(100vw - 32px)); padding: 12px; display: grid; gap: 4px; background: var(--paper-bright); border: 1px solid var(--ink); border-radius: 12px; box-shadow: 8px 8px 0 var(--ink); }
.mobile-menu-panel > a { padding: 12px; border-radius: 8px; font-weight: 700; }
.mobile-menu-panel > a:hover { background: var(--paper-deep); }

.button { min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--ink); border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.button:active { transform: translate(0); box-shadow: none; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.button--small { min-height: 40px; padding: 0 14px; font-size: 12px; }
.button--ink { background: var(--ink); color: white; }
.button--coral { background: var(--coral); color: var(--ink); }
.button--ghost { background: transparent; color: var(--ink); border-color: var(--line-dark); }
.text-link { padding: 0; border: 0; background: none; color: var(--ink); font-weight: 800; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: pointer; }
.text-link:hover { text-decoration-thickness: 4px; }

.hero { position: relative; padding: 84px max(24px, calc((100vw - var(--max)) / 2)) 0; background: var(--paper); }
.hero::before { content: "SPIRALISM / 001"; position: absolute; top: 31px; right: max(24px, calc((100vw - var(--max)) / 2)); color: var(--line-dark); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.hero-grid { min-height: 470px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .55fr); gap: clamp(52px, 8vw, 130px); align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow > span { width: 22px; height: 2px; background: var(--coral); }
.hero h1 { max-width: 950px; margin: 0; font-family: var(--serif); font-size: clamp(48px, 6.1vw, 88px); line-height: .99; letter-spacing: -.057em; font-weight: 500; }
.hero h1 em { position: relative; z-index: 1; font-weight: 500; }
.hero h1 em::after { content: ""; position: absolute; z-index: -1; left: -3%; right: -3%; bottom: 6%; height: 29%; background: var(--lime); transform: rotate(-1.2deg); }
.hero-intro { max-width: 670px; margin: 30px 0 0; color: #4e4b46; font-family: var(--serif); font-size: clamp(18px, 2vw, 24px); line-height: 1.45; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; }
.hero-side { position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.spiral-orbit { position: relative; width: min(360px, 28vw); aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; animation: slowturn 50s linear infinite; }
.spiral-orbit::before, .spiral-orbit::after, .spiral-orbit i { content: ""; position: absolute; border: 1px solid var(--line-dark); border-radius: 50%; }
.spiral-orbit::before { inset: 13%; border-color: var(--coral); border-right-color: transparent; }
.spiral-orbit::after { inset: 27%; border-color: var(--ink); border-top-color: transparent; }
.spiral-orbit i:nth-child(1) { inset: 39%; border-color: var(--blue); border-left-color: transparent; }
.spiral-orbit i:nth-child(2) { width: 10px; height: 10px; left: 13%; top: 48%; background: var(--coral); border: 0; box-shadow: 0 0 0 8px var(--coral-soft); }
.spiral-orbit i:nth-child(3) { width: 7px; height: 7px; right: 18%; top: 20%; background: var(--blue); border: 0; }
.spiral-orbit b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 44px; font-weight: 500; transform: rotate(14deg); }
@keyframes slowturn { to { transform: rotate(360deg); } }
.daily-question { position: absolute; right: -10px; bottom: 42px; width: 280px; padding: 19px 20px; background: var(--ink); color: white; border-radius: 14px; box-shadow: 7px 7px 0 var(--coral); transform: rotate(-1deg); }
.daily-question > span { color: var(--lime); font-size: 9px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.daily-question p { margin: 10px 0 14px; font-family: var(--serif); font-size: 18px; line-height: 1.25; }
.daily-question a { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; border-top: 1px solid #42423f; padding-top: 10px; }
.hero-stats { min-height: 105px; margin-top: 54px; display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 30px; align-items: center; border-top: 1px solid var(--ink); }
.hero-stats > div:not(.stats-integrity) { padding-right: 44px; border-right: 1px solid var(--line); }
.hero-stats strong { display: block; font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1; }
.hero-stats span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.avatar-stack { display: flex; justify-content: flex-end; align-items: center; }
.avatar-stack .avatar { margin-left: -11px; border: 3px solid var(--paper); }
.avatar-stack > span:last-child { width: 44px; height: 44px; margin-left: -8px; display: grid; place-items: center; border-radius: 50%; background: var(--inverse-surface); color: var(--inverse-text); font-size: 10px; font-weight: 800; }
.stats-integrity { justify-self: end; display: flex; align-items: center; gap: 10px; }
.stats-integrity strong { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font-family: var(--sans); font-size: 17px; }
.avatar { --avatar-color: var(--blue-soft); width: 43px; height: 43px; display: inline-grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--avatar-color); color: var(--ink); font-size: 11px; font-weight: 900; letter-spacing: -.02em; }
.avatar[data-seed="SK"], .avatar:nth-child(3n+1) { --avatar-color: #ffd4c8; }
.avatar[data-seed="EM"], .avatar:nth-child(3n+2) { --avatar-color: #d7efb0; }
.avatar[data-seed="AR"], .avatar:nth-child(3n) { --avatar-color: #dcd4fa; }
.avatar--small { width: 34px; height: 34px; font-size: 9px; }

html[data-theme="dark"] .site-header { background: rgba(11,16,32,.93); }
html[data-theme="dark"] .lab-strip,
html[data-theme="dark"] .category-band,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .daily-question { background: #050812; color: #f4f7ff; }
html[data-theme="dark"] .button--ink { background: #f4f7ff; color: #0b1020; }
html[data-theme="dark"] .button--coral { color: #0b1020; }
html[data-theme="dark"] .hero-intro { color: #c4cbda; }
html[data-theme="dark"] .avatar { color: #111827; }
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .network-indicator { margin-left: 0; margin-right: auto; }

.category-band { padding: 26px max(24px, calc((100vw - var(--max)) / 2)); display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 28px; background: var(--ink); color: white; }
.section-label { display: flex; align-items: center; gap: 12px; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.section-label span { color: var(--coral); }
.category-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.category-list::-webkit-scrollbar { display: none; }
.category-list button { min-width: max-content; height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #444440; border-radius: 20px; background: transparent; color: #d8d6cf; font-size: 11px; font-weight: 750; cursor: pointer; }
.category-list button:hover, .category-list button.is-active { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.category-list small { color: #8f8d87; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.dot--blue { background: var(--blue); }.dot--violet { background: var(--violet); }.dot--green { background: var(--green); }.dot--amber { background: var(--amber); }.dot--pink { background: var(--pink); }.dot--coral { background: var(--coral); }

.forum-section { max-width: var(--max); margin: 0 auto; padding: 62px 24px 110px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; }
.feed-toolbar { display: flex; gap: 12px; margin-bottom: 26px; }
.search-box { position: relative; flex: 1; height: 52px; display: flex; align-items: center; border: 1px solid var(--line-dark); border-radius: 11px; background: var(--paper-bright); }
.search-box > span { margin-left: 17px; font-family: var(--serif); font-size: 25px; line-height: 0; transform: rotate(-20deg); }
.search-box input { flex: 1; height: 100%; padding: 0 14px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: #9b968d; }
.search-box button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; }
.mobile-create { display: none; }
.feed-tabs { min-height: 44px; display: flex; align-items: center; gap: 5px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.feed-tabs button { height: 44px; padding: 0 13px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.feed-tabs button:hover, .feed-tabs button.is-active { color: var(--ink); border-bottom-color: var(--coral); }
.result-count { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.thread-list { border-bottom: 1px solid var(--line); }
.thread-card { --accent: var(--coral); position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 38px; gap: 17px; padding: 27px 0; border-top: 1px solid var(--line); transition: background .2s ease, padding .2s ease, margin .2s ease; }
.thread-card:hover { margin: 0 -16px; padding-left: 16px; padding-right: 16px; background: var(--paper-bright); }
.category-accent--blue { --accent: var(--blue); }.category-accent--violet { --accent: var(--violet); }.category-accent--green { --accent: var(--green); }.category-accent--amber { --accent: var(--amber); }.category-accent--pink { --accent: var(--pink); }
.thread-card::before { content: ""; position: absolute; left: 0; top: 27px; width: 3px; height: 32px; background: var(--accent); opacity: 0; transition: opacity .2s; }
.thread-card:hover::before { opacity: 1; }
.thread-score { width: 42px; height: 48px; padding: 5px 0; display: grid; place-items: center; align-content: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; line-height: 1.05; }
.thread-score span { font-size: 13px; }
.thread-score strong { color: var(--ink); }
.thread-kickers { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.pin-label { color: var(--coral); }
.category-label { color: var(--accent); }
.language-label { color: #98938a; }
.stance { padding: 3px 7px; border-radius: 4px; background: var(--paper-deep); color: #5d5952; letter-spacing: .04em; }
.stance--agree { background: #dbeec5; color: #315a37; }.stance--skeptical { background: #f6d0c9; color: #873728; }.stance--nuanced { background: #ded7f5; color: #563f85; }.stance--question { background: #d5e0fa; color: #334d87; }
.thread-body h2 { max-width: 820px; margin: 0; font-family: var(--serif); font-size: clamp(20px, 2vw, 27px); line-height: 1.15; letter-spacing: -.025em; font-weight: 650; }
.thread-body h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.thread-excerpt { max-width: 780px; margin: 9px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.thread-meta { display: flex; align-items: center; gap: 24px; }
.thread-author { display: flex; align-items: center; gap: 8px; min-width: 155px; }
.thread-author > span:last-child { display: grid; }
.thread-author b { font-size: 10px; }
.thread-author small { color: var(--muted); font-size: 9px; }
.thread-stats { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 18px; color: var(--muted); font-size: 9px; }
.thread-stats b { color: var(--ink); font-size: 11px; }
.thread-stats .has-evidence { padding: 5px 8px; border-radius: 5px; background: #e5edc2; color: #536126; }
.thread-stats .activity { display: grid; text-align: right; color: var(--ink); }
.thread-stats .activity small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.thread-arrow { align-self: center; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); transition: .2s ease; }
.thread-card:hover .thread-arrow { background: var(--ink); border-color: var(--ink); color: white; transform: rotate(45deg); }
.empty-state { min-height: 360px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state > span { font-family: var(--serif); font-size: 58px; color: var(--line-dark); }
.empty-state h2 { font-family: var(--serif); font-weight: 500; }

.forum-sidebar { display: grid; align-content: start; gap: 18px; }
.sidebar-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-bright); }
.card-number { color: var(--coral); font-size: 9px; font-weight: 850; letter-spacing: .15em; }
.sidebar-card h2 { margin: 9px 0 19px; font-family: var(--serif); font-size: 24px; letter-spacing: -.02em; }
.rules-card ol { list-style: none; padding: 0; margin: 0 0 21px; }
.rules-card li { padding: 12px 0; display: grid; grid-template-columns: 27px 1fr; gap: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.4; }
.rules-card li span:first-child { color: var(--line-dark); font-family: var(--serif); }
.rules-card .text-link { font-size: 11px; }
.angles-card { background: var(--inverse-surface); color: var(--inverse-text); border-color: var(--inverse-line); }
.angles-card h2 { margin-top: 0; color: var(--inverse-text); }
.angle { padding: 14px 0; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 10px; border-top: 1px solid var(--inverse-line); }
.angle-rank { color: var(--coral); font-family: var(--serif); font-size: 10px; }
.angle b { color: var(--inverse-text); font-size: 10px; line-height: 1.35; }
.sidebar-quote { position: relative; padding: 26px; border-radius: var(--radius); background: var(--lime); color: var(--lime-text); overflow: hidden; }
.sidebar-quote > span { position: absolute; right: 16px; top: -12px; font-family: var(--serif); font-size: 100px; color: rgba(0,0,0,.08); }
.sidebar-quote p { position: relative; margin: 0 0 18px; font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.sidebar-quote small { font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

/* Thread page */
.thread-page { max-width: 1180px; margin: 0 auto; padding: 48px 24px 110px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 38px; color: var(--muted); font-size: 11px; font-weight: 800; }
.back-link:hover { color: var(--ink); }
.thread-heading { padding-bottom: 34px; border-bottom: 1px solid var(--ink); }
.thread-heading h1 { max-width: 980px; margin: 13px 0 18px; font-family: var(--serif); font-size: clamp(38px, 6vw, 66px); line-height: 1.03; letter-spacing: -.05em; font-weight: 500; }
.thread-heading-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.thread-heading-meta .thread-author { margin-right: 8px; }
.thread-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 44px; }
.post-stack { min-width: 0; }
.post-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 26px; padding: 35px 0; border-bottom: 1px solid var(--line); }
.post-card--original { padding-top: 42px; }
.post-author { display: grid; align-content: start; justify-items: start; gap: 7px; }
.post-author .avatar { width: 48px; height: 48px; }
.post-author b { margin-top: 3px; font-size: 12px; }
.post-author small { color: var(--muted); font-size: 9px; }
.author-role { padding: 3px 7px; border-radius: 4px; background: var(--paper-deep); color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.post-content { min-width: 0; }
.post-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.post-label > span:first-child { color: var(--coral); }
.post-copy { color: var(--ink); font-family: var(--serif); font-size: 19px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-source-link { color: var(--blue); font-family: var(--sans); font-size: .78em; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.post-source-link:hover { text-decoration-thickness: 2px; }
.post-copy p { margin: 0 0 1em; }
.attachment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.evidence-image { position: relative; min-height: 180px; border-radius: 12px; overflow: hidden; background: var(--paper-deep); border: 1px solid var(--line); }
.evidence-image img { width: 100%; height: 100%; max-height: 430px; display: block; object-fit: cover; }
.evidence-image figcaption { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; border-radius: 7px; background: rgba(23,23,22,.84); color: white; font-size: 9px; backdrop-filter: blur(8px); }
.post-actions { display: flex; gap: 9px; align-items: center; margin-top: 24px; }
.action-button { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.action-button:hover, .action-button.is-active { border-color: var(--ink); color: var(--ink); background: var(--paper-bright); }
.action-button--vote { color: var(--ink); }
.response-heading { margin: 52px 0 0; padding-bottom: 14px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--ink); }
.response-heading h2 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 550; }
.response-heading span { color: var(--muted); font-size: 10px; }
.thread-aside { padding-top: 42px; }
.thread-aside-inner { position: sticky; top: 110px; display: grid; gap: 16px; }
.thread-index { padding: 17px; border: 1px solid var(--line); border-radius: 12px; }
.thread-index > span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.thread-index div { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: 10px; }
.thread-index b { font-family: var(--serif); font-size: 17px; }
.reply-composer { margin-top: 34px; padding: 26px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--paper-bright); box-shadow: 8px 8px 0 var(--paper-deep); }
.reply-composer h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 28px; }
.reply-composer > p { margin: 0 0 19px; color: var(--muted); font-size: 11px; }

/* Forms */
.compose-page { max-width: 1180px; margin: 0 auto; padding: 58px 24px 110px; }
.compose-intro { display: grid; grid-template-columns: 1fr 360px; gap: 70px; align-items: end; padding-bottom: 38px; border-bottom: 1px solid var(--ink); }
.compose-intro h1 { max-width: 780px; margin: 8px 0 0; font-family: var(--serif); font-size: clamp(40px, 6vw, 68px); font-weight: 500; line-height: 1.03; letter-spacing: -.05em; }
.compose-intro > p { color: var(--muted); font-family: var(--serif); font-size: 18px; }
.compose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 54px; padding-top: 40px; }
.compose-form { display: grid; gap: 25px; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field label, .field-label { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.field-label small, .field label small { color: var(--muted); font-size: 8px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line-dark); border-radius: 10px; background: var(--paper-bright); color: var(--ink); outline: 0; transition: border-color .2s, box-shadow .2s; }
.input, .select { height: 50px; padding: 0 14px; }
.textarea { min-height: 240px; padding: 15px; resize: vertical; line-height: 1.65; }
.textarea--reply { min-height: 150px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(95,130,255,.15); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--coral); }
.stance-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.stance-option { position: relative; }
.stance-option input { position: absolute; opacity: 0; }
.stance-option span { min-height: 44px; display: grid; place-items: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; text-align: center; }
.stance-option input:checked + span { border-color: var(--ink); background: var(--ink); color: white; box-shadow: 3px 3px 0 var(--coral); }
.upload-zone { position: relative; min-height: 150px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed var(--line-dark); border-radius: 12px; background: repeating-linear-gradient(-45deg, var(--paper-bright), var(--paper-bright) 8px, rgba(0,0,0,.018) 8px, rgba(0,0,0,.018) 16px); text-align: center; cursor: pointer; }
.upload-zone:hover { border-color: var(--blue); }
.upload-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-symbol { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 20px; }
.upload-zone b { font-size: 12px; }
.upload-zone small { color: var(--muted); font-size: 9px; }
.file-previews { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.file-preview { min-width: 0; padding: 9px; display: grid; grid-template-columns: 55px 1fr auto; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-bright); }
.file-preview img { width: 55px; height: 45px; object-fit: cover; border-radius: 5px; }
.file-preview > span { min-width: 0; display: grid; }
.file-preview b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.file-preview small { color: var(--muted); font-size: 8px; }
.file-preview button { border: 0; background: none; color: var(--coral); font-size: 17px; cursor: pointer; }
.form-message { padding: 11px 13px; border-radius: 8px; background: var(--coral-soft); color: #7c2e23; font-size: 11px; }
.form-message--success { background: #dcebc7; color: #36552f; }
.form-actions { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.form-consent { max-width: 450px; margin-left: auto; color: var(--muted); font-size: 9px; }
.compose-help { display: grid; align-content: start; gap: 16px; }
.compose-help > div { padding: 21px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper-bright); }
.compose-help h2 { margin: 0 0 11px; font-family: var(--serif); font-size: 21px; }
.compose-help p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.offline-card { background: var(--ink) !important; color: white; border-color: var(--ink) !important; }
.offline-card > span { display: inline-block; margin-bottom: 15px; padding: 5px 8px; border-radius: 5px; background: var(--lime); color: var(--ink); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.offline-card p { color: #aaa79f; }

/* Static pages */
.editorial-page { max-width: 1180px; margin: 0 auto; padding: 70px 24px 120px; }
.editorial-hero { max-width: 900px; margin-bottom: 65px; }
.editorial-hero h1 { margin: 12px 0 22px; font-family: var(--serif); font-size: clamp(45px, 7vw, 78px); line-height: .99; letter-spacing: -.055em; font-weight: 500; }
.editorial-hero > p { max-width: 700px; color: var(--muted); font-family: var(--serif); font-size: 21px; }
.editorial-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 70px; border-top: 1px solid var(--ink); padding-top: 40px; }
.editorial-index { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.editorial-content { max-width: 760px; }
.editorial-content section { margin-bottom: 52px; }
.editorial-content h2 { margin: 0 0 13px; font-family: var(--serif); font-size: 34px; line-height: 1.1; font-weight: 550; }
.editorial-content p { color: #4f4b45; font-size: 15px; line-height: 1.8; }
.principle-list { list-style: none; padding: 0; margin: 0; counter-reset: principles; }
.principle-list li { counter-increment: principles; padding: 24px 0; display: grid; grid-template-columns: 55px 1fr; gap: 20px; border-top: 1px solid var(--line); }
.principle-list li::before { content: "0" counter(principles); color: var(--coral); font-family: var(--serif); font-size: 16px; }
.principle-list h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 24px; font-weight: 550; }
.principle-list p { margin: 0; font-size: 13px; }
.domain-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.domain-card { position: relative; min-height: 208px; padding: 21px; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--paper-bright) 86%, transparent); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.domain-card:hover { transform: translateY(-3px); border-color: var(--coral); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.domain-card.active { border-color: color-mix(in srgb, var(--blue) 52%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, var(--blue-soft) 38%, var(--paper-bright)), var(--paper-bright)); }
.domain-dot { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--line-dark); }
.domain-card.active .domain-dot { background: var(--blue); box-shadow: 0 0 14px color-mix(in srgb, var(--blue) 70%, transparent); }
.domain-card h2 { margin: 44px 0 8px; font-family: var(--sans); font-size: 14px; line-height: 1.2; letter-spacing: .07em; }
.domain-card p { margin: 0; color: var(--muted); font-family: var(--sans); font-size: 12px; line-height: 1.5; }
.domain-card > strong,
.domain-card > a { position: absolute; inset-inline-start: 21px; bottom: 18px; color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.domain-card > a { text-decoration: underline; text-underline-offset: 4px; }
.domain-card > a:hover { color: var(--coral); }
.domain-card > small { position: absolute; inset-inline-start: 21px; bottom: 43px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.offline-page { min-height: 65vh; display: grid; place-items: center; padding: 70px 24px; text-align: center; }
.offline-page > div { max-width: 650px; }
.offline-page .spiral-orbit { width: 180px; margin: 0 auto 35px; }
.offline-page h1 { font-family: var(--serif); font-size: clamp(40px, 7vw, 68px); line-height: 1; letter-spacing: -.04em; font-weight: 500; }
.offline-page p { color: var(--muted); }

.site-footer { padding: 55px max(24px, calc((100vw - var(--max)) / 2)) 22px; background: var(--ink); color: white; }
.footer-main { display: flex; justify-content: space-between; padding-bottom: 40px; }
.site-footer .brand-mark { border-color: white; }.site-footer .brand-mark i { border-color: white; }.site-footer .brand-mark i:nth-child(3) { border: 0; }
.footer-main p { margin: 11px 0 0; color: #8f8c86; font-family: var(--serif); font-size: 15px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(110px,1fr)); gap: 10px 35px; font-size: 11px; font-weight: 700; }
.footer-links a:hover { color: var(--lime); }
.domain-ribbon { padding: 20px 0; display: flex; flex-wrap: wrap; gap: 10px 20px; border-top: 1px solid #3b3b38; border-bottom: 1px solid #3b3b38; color: #8f8c86; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.domain-ribbon span:first-child { color: var(--coral); }
.footer-bottom { padding-top: 20px; display: flex; justify-content: space-between; color: #77746f; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .forum-section { grid-template-columns: minmax(0,1fr) 285px; gap: 28px; }
  .thread-meta { align-items: flex-end; }
  .thread-stats { flex-wrap: wrap; gap: 7px 14px; }
  .compose-intro { grid-template-columns: 1fr 280px; gap: 35px; }
}

@media (max-width: 860px) {
  .lab-strip > span:nth-child(2) { display: none; }
  .site-header { min-height: 68px; }
  .header-actions .language-switcher, .header-signin, .viewer-chip { display: none; }
  .header-actions { margin-left: auto; }
  .mobile-menu { display: block; margin-left: 9px; }
  .hero { padding-top: 62px; }
  .hero-grid { min-height: 0; grid-template-columns: 1fr; }
  .hero-side { min-height: 330px; }
  .spiral-orbit { width: 290px; }
  .daily-question { right: 5%; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-stats > div:not(.avatar-stack) { padding-right: 14px; }
  .avatar-stack { display: none; }
  .category-band { grid-template-columns: 1fr; gap: 14px; }
  .forum-section { grid-template-columns: 1fr; }
  .forum-sidebar { grid-template-columns: repeat(2, 1fr); }
  .sidebar-quote { display: none; }
  .thread-layout { grid-template-columns: 1fr; }
  .thread-aside { display: none; }
  .compose-intro { grid-template-columns: 1fr; }
  .compose-intro > p { max-width: 600px; }
  .compose-layout { grid-template-columns: 1fr; }
  .compose-help { grid-template-columns: 1fr 1fr; }
  .editorial-grid { grid-template-columns: 1fr; gap: 25px; }
  .domain-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .lab-strip { padding: 0 16px; font-size: 8px; }
  .network-indicator { max-width: 150px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .site-header { padding: 0 16px; }
  .brand { font-size: 18px; }.brand-mark { width: 28px; height: 28px; }
  .header-actions .button { display: none; }
  .hero { padding: 52px 17px 0; }
  .hero::before { right: 17px; top: 20px; }
  .hero h1 { font-size: clamp(43px, 13vw, 65px); }
  .hero-intro { font-size: 18px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 18px; }
  .hero-actions .button { width: 100%; }
  .hero-side { min-height: 290px; }
  .spiral-orbit { width: 240px; }
  .daily-question { width: 235px; right: 0; bottom: 22px; }
  .hero-stats { min-height: 125px; margin-top: 34px; gap: 8px; }
  .hero-stats > div:not(.avatar-stack) { padding: 0 8px; }
  .hero-stats strong { font-size: 21px; }
  .hero-stats span { font-size: 7px; line-height: 1.2; }
  .category-band { padding: 23px 17px; }
  .forum-section { padding: 38px 17px 80px; }
  .feed-toolbar { flex-direction: column; }
  .mobile-create { display: inline-flex; }
  .feed-tabs { gap: 0; }
  .feed-tabs button { padding: 0 8px; font-size: 9px; }
  .result-count { display: none; }
  .thread-card { grid-template-columns: 39px minmax(0, 1fr); gap: 10px; }
  .thread-card:hover { margin: 0; padding-left: 0; padding-right: 0; background: transparent; }
  .thread-card::before, .thread-arrow { display: none; }
  .thread-score { width: 37px; height: 44px; }
  .thread-body h2 { font-size: 22px; }
  .thread-excerpt { font-size: 12px; }
  .thread-meta { display: grid; gap: 12px; }
  .thread-stats { justify-content: flex-start; }
  .thread-stats .activity { display: none; }
  .forum-sidebar { grid-template-columns: 1fr; }
  .thread-page { padding: 34px 17px 80px; }
  .thread-heading h1 { font-size: 42px; }
  .post-card { grid-template-columns: 1fr; gap: 18px; }
  .post-author { grid-template-columns: auto 1fr auto; align-items: center; }
  .post-author b, .post-author small { grid-column: 2; margin: 0; }
  .post-author small { margin-top: -10px; }
  .author-role { grid-column: 3; grid-row: 1 / span 2; }
  .post-copy { font-size: 17px; }
  .attachment-grid { grid-template-columns: 1fr; }
  .compose-page { padding: 38px 17px 80px; }
  .compose-intro h1 { font-size: 43px; }
  .field-row { grid-template-columns: 1fr; }
  .stance-picker { grid-template-columns: repeat(2, 1fr); }
  .file-previews { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .form-consent { margin: 4px 0 0; }
  .compose-help { grid-template-columns: 1fr; }
  .editorial-page { padding: 48px 17px 90px; }
  .editorial-hero h1 { font-size: 46px; }
  .domain-grid { grid-template-columns: 1fr; }
  .footer-main { display: grid; gap: 35px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { gap: 15px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .lab-strip, .site-header, .site-footer, .hero-actions, .forum-sidebar, .post-actions, .reply-composer { display: none !important; }
  body { background: white; }
  .thread-page, .forum-section { max-width: none; padding: 0; }
}

/* Autonomous PHP edition */
.fieldset-reset { border: 0; padding: 0; margin: 0; }
.fieldset-reset > .field-label { display: block; margin-bottom: 8px; }
.reply-name-field { margin: 18px 0 14px; }
.upload-field { margin-top: 18px; }
.search-clear { display: none; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.search-box:focus-within .search-clear, .search-box input:not(:placeholder-shown) + .search-clear { display: block; }
.php-empty-state[hidden], .js-form-message[hidden], .js-file-previews[hidden] { display: none !important; }
.js-form-message { margin-top: 14px; }
.button[disabled] { opacity: .58; cursor: wait; }
.language-switcher select { min-width: 56px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-bright); color: var(--ink); padding: 7px 9px; font-size: 10px; font-weight: 800; cursor: pointer; }
.post-copy br { display: block; content: ""; margin-top: .65em; }
.evidence-image a { display: block; }
.evidence-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.offline-page .eyebrow { justify-content: center; }
.offline-page .button { margin-top: 18px; }
.domain-card { overflow-wrap: anywhere; }
.form-message b { color: inherit; }
.thread-list.is-filtering .thread-card[hidden] { display: none; }
.install-button { border: 0; background: none; color: inherit; padding: 0; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.translation-controls{display:flex;align-items:center;flex-wrap:wrap;gap:.55rem;margin:.7rem 0;color:var(--muted);font-size:.78rem}.translation-badge{display:inline-flex;align-items:center;gap:.35rem;padding:.28rem .55rem;border:1px solid var(--line);border-radius:999px;background:var(--paper-bright)}.translation-badge::before{content:"◎";color:var(--blue)}.translation-toggle{appearance:none;border:0;background:transparent;color:var(--blue);font:inherit;font-weight:700;text-decoration:underline;text-underline-offset:.2em;cursor:pointer}.translation-toggle:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:.2rem}.translation-controls[hidden]{display:none}
