/* PICNYM v3 — anonymous post desk */
:root {
  --paper: #f4f0e7;
  --paper-2: #fbf8f1;
  --surface: #fffdf8;
  --field: #fffefa;
  --ink: #111318;
  --muted: #5b5e63;
  --line: #c8c2b8;
  --line-strong: #111318;
  --orange: #ff5c35;
  --orange-dark: #c93617;
  --blue: #2457f5;
  --blue-dark: #173bb2;
  --green: #147a51;
  --danger: #a51f38;
  --ph: var(--ink);
  --sfc: var(--orange);
  --bg: var(--paper);
  --card: var(--surface);
  --radius-xs: 2px;
  --radius-sm: 5px;
  --radius-md: 9px;
  --shadow-print: 6px 6px 0 var(--ink);
  --shadow-soft: 0 10px 30px rgb(17 19 24 / 8%);
  --content: 1180px;
  --reading: 760px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #0f1115;
  --paper-2: #15181d;
  --surface: #191c22;
  --field: #111419;
  --ink: #f3efe6;
  --muted: #afb0b3;
  --line: #393b40;
  --line-strong: #f3efe6;
  --orange: #ff704c;
  --orange-dark: #ff8b70;
  --blue: #6f8fff;
  --blue-dark: #9bafff;
  --green: #56c48e;
  --danger: #ff8fa3;
  --ph: var(--ink);
  --sfc: var(--orange);
  --bg: var(--paper);
  --card: var(--surface);
  --shadow-print: 6px 6px 0 #f3efe6;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 11px 14px;
  transform: translateY(-150%);
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .08em;
}

.brand-copy span {
  margin-top: 6px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 76px;
  height: auto;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(20px, calc((100% - 980px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.top-action {
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.top-action:hover { border-color: var(--line); }

.page,
.public-card,
.poll-page {
  width: min(980px, 100%);
  max-width: 980px;
  margin: 0 auto;
  padding: 38px 24px 90px;
}

.page h1,
.poll-page h1,
.home h1 {
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: -.055em;
}

.page h1,
.poll-page h1 {
  max-width: 780px;
  margin: 0 0 30px;
  font-size: clamp(36px, 7vw, 62px);
  line-height: .98;
}

.label,
.section-kicker,
.anon {
  color: var(--orange-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-kicker { margin: 34px 0 18px; }

.card,
.link-card {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: none;
}

.link-card {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--blue) !important;
  color: #fff;
  box-shadow: var(--shadow-print);
}

.link-card .label,
.link-card .big-link { color: #fff; }

.big-link {
  margin: 10px 0 24px;
  color: var(--ink);
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.btn,
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.btn:hover:not(:disabled),
.button:hover:not(:disabled) { transform: translate(-2px, -2px); }

.btn:active:not(:disabled),
.button:active:not(:disabled) { transform: translate(0, 0); }

.btn.primary,
.button.primary {
  border-color: var(--ink);
  background: var(--orange);
  color: #111318;
  box-shadow: 4px 4px 0 var(--ink);
}

.btn.primary:hover:not(:disabled),
.button.primary:hover:not(:disabled) { background: #ff7759; }

.btn.sage { border-color: var(--ink); background: #9cdfbd; color: #111318; }
.btn.inverse { border-color: var(--paper); background: var(--paper); color: #111318; }
.btn.small { min-height: 38px; padding: 9px 13px; }
.btn.icon { margin-left: auto; }

.btn:disabled,
.tab:disabled,
.tool:disabled,
.poll-option:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select,
.slug-field,
.poll-options input,
.friend-search input,
.message-filters input[type="search"],
.message-filters select {
  width: 100%;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-xs) !important;
  background: var(--field) !important;
  color: var(--ink) !important;
}

.field input,
.field textarea,
.field select { padding: 13px 14px; }

.field input:focus,
.field textarea:focus,
.field select:focus,
.friend-search input:focus,
.message-filters input:focus,
.message-filters select:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 24%, transparent) !important;
  outline: none;
}

.field textarea { min-height: 120px; resize: vertical; }

.slug-field {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.slug-field span {
  padding-left: 13px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
}

.slug-field input { border: 0 !important; background: transparent !important; }

.tabs,
.auth-tabs,
.account-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--paper-2);
  overflow-x: auto;
}

.tabs { display: grid; grid-template-columns: 1fr 1fr; }

.tab,
.auth-tab,
.account-tab {
  min-height: 48px;
  flex: 1 0 auto;
  padding: 11px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.tab:last-child,
.auth-tab:last-child,
.account-tab:last-child { border-right: 0; }

.tab.active,
.auth-tab.active,
.account-tab.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

/* Landing */
.market-home {
  display: block;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
}

.market-nav {
  display: flex;
  width: min(var(--content), calc(100% - 48px));
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line-strong);
}

.market-nav nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.market-nav nav a {
  padding: 10px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.market-nav nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

.market-nav .nav-cta {
  padding: 11px 15px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.market-hero {
  display: grid;
  width: min(var(--content), calc(100% - 48px));
  min-height: 690px;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: clamp(42px, 7vw, 100px);
  align-items: center;
  margin: 0 auto;
  padding: 72px 0 82px;
}

.hero-copy { min-width: 0; }

.home-kicker,
.section-heading > span,
.format-intro > span,
.control-copy > span,
.closing-section > p {
  margin: 0 0 24px;
  color: var(--orange-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.market-hero h1 {
  margin: 0;
  font-size: clamp(54px, 7vw, 92px);
  line-height: .88;
}

.market-hero h1 em {
  color: var(--orange);
  font-style: normal;
}

.hero-lede {
  max-width: 660px;
  margin: 30px 0 0 !important;
  color: var(--muted) !important;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  text-align: left !important;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.text-link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-underline-offset: 4px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 52px 0 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.hero-facts div {
  min-width: 0;
  padding: 15px 13px 16px 0;
  border-right: 1px solid var(--line);
}

.hero-facts div + div { padding-left: 13px; }
.hero-facts div:last-child { border-right: 0; }
.hero-facts dt { color: var(--orange-dark); font-family: ui-monospace, monospace; font-size: 10px; font-weight: 900; }
.hero-facts dd { margin: 8px 0 0; color: var(--ink); font-size: 12px; font-weight: 800; }

.hero-panel { scroll-margin-top: 24px; }

.auth-card,
.creator-card {
  margin: 0;
  padding: 28px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: var(--shadow-print);
}

.auth-intro { margin-bottom: 20px; }
.auth-badge { color: var(--orange-dark); font-family: ui-monospace, monospace; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.auth-intro h2 { margin: 12px 0 8px; color: var(--ink); font-size: 28px; letter-spacing: -.035em; }
.auth-intro p { margin: 0 !important; color: var(--muted) !important; font-size: 14px; line-height: 1.5; text-align: left !important; }
.auth-tabs { margin-bottom: 16px; }
.google-btn { width: 100%; }
.google-g { display: inline-grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 11px; }
.auth-or::before,
.auth-or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-submit { width: 100%; }
.eligibility-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.5; cursor: pointer; }
.eligibility-check input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--blue); }
.auth-trust { margin: 18px 0 0 !important; color: var(--green) !important; font-size: 11px; font-weight: 800; text-align: left !important; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.account-welcome strong { display: block; margin-top: 8px; color: var(--ink); font-size: 24px; }
.saved-inbox-btn { width: 100%; margin-top: 10px; }

.fallback-note {
  display: grid;
  padding: 24px;
  border: 2px solid var(--ink);
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-print);
}

.fallback-note span { margin-bottom: 20px; font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: .12em; }
.fallback-note strong { padding: 13px 0; border-top: 1px solid rgb(255 255 255 / 45%); font-size: 24px; }

.process-section,
.format-ledger,
.control-section,
.closing-section,
.market-footer {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
}

.process-section {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: clamp(40px, 8vw, 110px);
  padding: 96px 0 110px;
  border-top: 1px solid var(--line-strong);
}

.section-heading h2,
.format-intro h2,
.control-copy h2,
.closing-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(40px, 5.5vw, 70px);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.055em;
}

.process-list { margin: 0; padding: 0; border-top: 1px solid var(--line-strong); list-style: none; }
.process-list li { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 27px 0; border-bottom: 1px solid var(--line); }
.process-list li > span { color: var(--orange-dark); font-family: ui-monospace, monospace; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.process-list h3 { margin: 0 0 7px; color: var(--ink); font-size: 22px; }
.process-list p { margin: 0; color: var(--muted); line-height: 1.55; }

.format-ledger {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: clamp(42px, 7vw, 92px);
  padding: 86px 70px;
  background: var(--blue);
  color: #fff;
}

.format-intro > span { color: #fff; opacity: .78; }
.format-intro h2 { color: #fff; }
.format-intro p { max-width: 430px; margin: 24px 0 0; color: rgb(255 255 255 / 78%); line-height: 1.6; }
.format-rows { border-top: 1px solid rgb(255 255 255 / 65%); }
.format-rows article { display: grid; grid-template-columns: 48px 110px 1fr; gap: 12px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid rgb(255 255 255 / 38%); }
.format-rows b { font-family: ui-monospace, monospace; font-size: 11px; }
.format-rows h3 { margin: 0; font-size: 22px; }
.format-rows p { margin: 0; color: rgb(255 255 255 / 75%); line-height: 1.4; }

.control-section {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  min-height: 620px;
  margin-top: 112px;
  background: #111318;
  color: #f4f0e7;
}

.control-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  border-right: 1px solid #55575b;
  background: #191c22;
}

.control-visual span { margin-bottom: 45px; color: #a9aaad; font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: .13em; }
.control-visual i { display: block; width: 84%; height: 15px; margin-bottom: 18px; background: #f4f0e7; }
.control-visual i:nth-of-type(2) { width: 61%; background: var(--orange); }
.control-visual i:nth-of-type(3) { width: 72%; }
.control-visual strong { margin-top: 46px; font-size: clamp(30px, 4vw, 50px); line-height: .94; }

.control-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 64px; }
.control-copy > span { color: var(--orange); }
.control-copy h2 { color: #f4f0e7; }
.control-copy > p { margin: 26px 0 10px; color: #c6c4bf; font-size: 18px; line-height: 1.55; }
.control-copy ul { margin: 18px 0 30px; padding: 0; list-style: none; }
.control-copy li { padding: 9px 0; color: #f4f0e7; font-size: 13px; font-weight: 800; }
.control-copy li::before { content: "—"; margin-right: 10px; color: var(--orange); }

.closing-section { padding: 120px 0; text-align: center; }
.closing-section > p { margin-bottom: 20px; }
.closing-section h2 { max-width: 800px; margin: 0 auto 34px; }

.market-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line-strong);
}

.market-footer-links { display: flex; justify-content: flex-end; gap: 22px; }
.market-footer-links a,
.market-footer p { color: var(--muted); font-size: 12px; }
.market-footer p { grid-column: 1 / -1; margin: 0; text-align: right; }

/* Product surfaces */
.public-profile { padding: 30px 0 22px; text-align: center; }
.public-profile .brand-mark { margin: auto; }
.public-profile strong { display: block; margin-top: 14px; color: var(--ink); font-size: 26px; }
.public-profile p { color: var(--muted); }
.composer-head { padding: 25px 25px 15px; }
.composer-title { margin: 0; color: var(--ink); }
.composer-sub { margin: 5px 0 0; color: var(--muted); }
.tool-row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tool { min-height: 48px; padding: 13px 4px; border: 0; border-right: 1px solid var(--line); background: var(--paper-2); color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.tool:last-child { border-right: 0; }
.tool.active { background: var(--ink); color: var(--paper); }
.tool-panel { padding: 24px; }
.file-zone,
.record-box { display: block; padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius-xs); color: var(--muted); text-align: center; }
.file-zone input { display: block; max-width: 100%; margin: 15px auto 0; }
.file-name { margin-top: 10px; font-size: 13px; overflow-wrap: anywhere; }
.record-actions,
.send-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.send-row .btn.primary { flex: 1; }
.hidden { display: none !important; }
.poll-options { display: grid; gap: 9px; }
.poll-box,
.voice-box { margin: 20px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--paper-2); }
.poll-question { margin-bottom: 14px; font-size: 19px; font-weight: 900; overflow-wrap: anywhere; }
.poll-option { position: relative; display: flex; width: 100%; gap: 12px; justify-content: space-between; margin: 8px 0; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.poll-option .fill { position: absolute; z-index: 0; inset: 0 auto 0 0; background: color-mix(in srgb, var(--blue) 18%, transparent); }
.poll-option span:not(.fill) { position: relative; z-index: 1; }
.poll-meta { display: flex; gap: 12px; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 13px; }
.wave { display: flex; height: 45px; align-items: center; justify-content: center; gap: 4px; overflow: hidden; }
.wave i { width: 3px; height: 18px; border-radius: 0; background: var(--orange); }
.wave i:nth-child(3n) { height: 34px; }
.wave i:nth-child(4n) { height: 27px; }
.voice-box audio,
.record-box audio { width: 100%; }
.reply-preview { margin-top: 15px; padding: 14px; border-left: 4px solid var(--green); background: color-mix(in srgb, var(--green) 12%, var(--surface)); overflow-wrap: anywhere; }
.message-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.time { color: var(--muted); font-size: 13px; }
.message-text { margin: 26px 0; font-size: clamp(20px, 3vw, 27px); font-weight: 750; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-image { width: 100%; max-height: 520px; margin: 22px 0; border-radius: var(--radius-xs); background: var(--paper-2); object-fit: contain; }
.card-divider { height: 1px; margin: 24px 0 20px; background: var(--line); }
.actions,
.link-actions,
.inline-actions,
.inbox-card-actions,
.friend-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.link-actions .btn:last-child { flex: 1; }
.more-wrap { position: relative; margin-left: auto; }
.menu { position: absolute; z-index: 20; right: 0; bottom: 52px; min-width: 160px; overflow: hidden; border: 1px solid var(--ink); border-radius: var(--radius-xs); background: var(--surface); box-shadow: 4px 4px 0 var(--ink); }
.menu button { display: block; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.menu .danger { color: var(--danger); }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: rgb(17 19 24 / 70%); }
.modal { width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 24px; border: 2px solid var(--ink); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); }
.modal h2 { margin-top: 0; color: var(--ink); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }
.empty { padding: 28px; color: var(--muted); text-align: center; }
.meta { margin: -18px 0 24px; color: var(--muted); }
.toast { position: fixed; z-index: 150; left: 50%; bottom: max(25px, env(safe-area-inset-bottom)); max-width: min(90vw, 520px); padding: 12px 18px; transform: translate(-50%, 20px); border: 1px solid #f4f0e7; border-radius: var(--radius-xs); background: #111318; color: #fff; opacity: 0; pointer-events: none; text-align: center; transition: opacity .18s ease, transform .18s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.theme-toggle { position: fixed; z-index: 80; right: max(16px, env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top)); display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--ink); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }

/* Account expansion */
.premium-home-teaser,
.premium-plan { background: var(--surface) !important; }
.premium-home-teaser { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.premium-badge,
.status-pill { border: 1px solid var(--line-strong); border-radius: var(--radius-xs); font-family: ui-monospace, monospace; letter-spacing: .08em; }
.premium-badge { background: var(--ink); color: var(--paper); }
.status-pill { background: var(--surface); color: var(--ink); }
.status-pill.live { border-color: var(--green); color: var(--green); }
.status-pill.paused { border-color: var(--orange-dark); background: transparent; color: var(--orange-dark); }
.profile-avatar { border: 1px solid var(--ink); border-radius: var(--radius-xs); background: var(--orange); color: #111318; box-shadow: none; }
.profile-avatar.fallback { font-family: Arial, sans-serif; }
.profile-main h1,
.professional-inbox-main strong,
.friend-copy strong,
.card h2,
.section-heading-row h2,
section > h2 { color: var(--ink); }
.profile-handle,
.friend-copy > a { color: var(--blue); }
.account-stat-grid { border-color: var(--line); }
.professional-inbox,
.friend-card,
.setting-row { border-color: var(--line); }
.setting-row i { border-radius: 999px; }
.theme-option { border-radius: var(--radius-xs); background: var(--surface); color: var(--muted); }
.theme-option.active { background: var(--ink); color: var(--paper); }
.danger-btn { border-color: var(--danger) !important; background: transparent !important; color: var(--danger) !important; }
.inbox-notice { border-radius: var(--radius-xs); }
.message-filters input[type="search"],
.message-filters select { padding: 11px; }

html[data-theme="dark"] body,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .card,
html[data-theme="dark"] .link-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .menu,
html[data-theme="dark"] .menu button,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .poll-option,
html[data-theme="dark"] .friend-search input,
html[data-theme="dark"] .message-filters input,
html[data-theme="dark"] .message-filters select {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .topbar { background: var(--paper); }
html[data-theme="dark"] .home h1,
html[data-theme="dark"] .page h1,
html[data-theme="dark"] .poll-page h1,
html[data-theme="dark"] .composer-title,
html[data-theme="dark"] .public-profile strong,
html[data-theme="dark"] .account-welcome strong,
html[data-theme="dark"] .account-inbox strong { color: var(--ink); }
html[data-theme="dark"] .market-hero h1 em { color: var(--orange); }
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .auth-tab.active,
html[data-theme="dark"] .account-tab.active,
html[data-theme="dark"] .tool.active { background: var(--ink); color: var(--paper); }
html[data-theme="dark"] .btn.primary { border-color: var(--ink); background: var(--orange); color: #111318; }
html[data-theme="dark"] .btn.sage { border-color: var(--ink); background: #9cdfbd; color: #111318; }
html[data-theme="dark"] .brand-mark { background: #111318; }

@media (max-width: 980px) {
  .market-hero { grid-template-columns: 1fr 390px; gap: 42px; }
  .market-hero h1 { font-size: clamp(52px, 7vw, 72px); }
  .format-ledger { padding: 70px 48px; }
  .control-visual,
  .control-copy { padding: 48px; }
}

@media (max-width: 820px) {
  .market-hero { grid-template-columns: 1fr; padding: 60px 0 78px; }
  .hero-copy { max-width: 700px; }
  .hero-panel { width: min(560px, 100%); }
  .process-section { grid-template-columns: 1fr; padding: 76px 0 88px; }
  .section-heading { max-width: 600px; }
  .format-ledger { grid-template-columns: 1fr; }
  .control-section { grid-template-columns: 1fr; margin-top: 80px; }
  .control-visual { min-height: 420px; border-right: 0; border-bottom: 1px solid #55575b; }
  .market-footer { grid-template-columns: 1fr; }
  .market-footer-links { justify-content: flex-start; flex-wrap: wrap; }
  .market-footer p { grid-column: auto; text-align: left; }
}

@media (max-width: 640px) {
  .market-nav,
  .market-hero,
  .process-section,
  .format-ledger,
  .control-section,
  .closing-section,
  .market-footer { width: min(100% - 32px, var(--content)); }
  .market-nav { min-height: 78px; }
  .market-nav nav { gap: 14px; }
  .market-nav nav a:not(.nav-cta) { display: none; }
  .market-hero { gap: 48px; padding: 48px 0 64px; }
  .market-hero h1 { font-size: clamp(47px, 15vw, 66px); }
  .hero-lede { font-size: 17px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts div,
  .hero-facts div + div { display: grid; grid-template-columns: 42px 1fr; padding: 12px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-facts div:last-child { border-bottom: 0; }
  .hero-facts dd { margin: 0; }
  .auth-card,
  .creator-card { padding: 22px; box-shadow: 4px 4px 0 var(--ink); }
  .process-list li { grid-template-columns: 1fr; gap: 10px; }
  .format-ledger { padding: 54px 24px; }
  .format-rows article { grid-template-columns: 38px 1fr; }
  .format-rows p { grid-column: 2; }
  .control-visual,
  .control-copy { padding: 40px 24px; }
  .closing-section { padding: 88px 0; }
  .page,
  .public-card,
  .poll-page { padding: 28px 16px 80px; }
  .topbar { padding: 12px 16px; }
  .card,
  .link-card { padding: 20px; }
  .actions .btn { flex: 1 1 120px; }
  .tool { font-size: 11px; }
  .account-row { align-items: flex-start; flex-direction: column; }
  .account-row .btn { width: 100%; }
  .theme-toggle { top: auto; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .market-nav,
  .market-hero,
  .process-section,
  .format-ledger,
  .control-section,
  .closing-section,
  .market-footer { width: calc(100% - 24px); }
  .brand-copy span { display: none; }
  .market-hero h1 { font-size: 45px; }
  .auth-tabs { flex-direction: column; }
  .auth-tab { border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-tab:last-child { border-bottom: 0; }
  .tool-row { grid-template-columns: repeat(2, 1fr); }
  .tool { border-bottom: 1px solid var(--line); }
  .format-rows article { grid-template-columns: 32px 1fr; }
}

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

@media (forced-colors: active) {
  .brand-mark { forced-color-adjust: none; }
  .btn,
  .card,
  .link-card,
  .auth-card,
  .creator-card { border: 2px solid ButtonText; }
}
