:root {
  color-scheme: light;
  --paper: oklch(96.5% 0.012 91);
  --paper-2: oklch(92.8% 0.017 91);
  --panel: oklch(98.4% 0.006 91);
  --panel-quiet: oklch(94.4% 0.011 91);
  --ink: oklch(22% 0.018 176);
  --ink-soft: oklch(42% 0.02 176);
  --muted: oklch(56% 0.018 176);
  --rule: oklch(83.5% 0.017 91);
  --rule-strong: oklch(74% 0.03 176);
  --accent: oklch(43% 0.09 176);
  --accent-hover: oklch(36% 0.095 176);
  --warm: oklch(60% 0.105 51);
  --night: oklch(17% 0.018 176);
  --night-soft: oklch(24% 0.018 176);
  --white-tint: oklch(99% 0.004 91);
  --font-sans: "Hanken Grotesk", "Trebuchet MS", system-ui, sans-serif;
  --font-display: "Literata", Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: min(100% - 32px, 1190px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

button:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 180ms var(--ease);
}

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

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 21px;
  font-weight: 520;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    transform 180ms var(--ease);
}

.button:focus-visible,
.hero-links a:focus-visible,
.topic-link:focus-visible,
.discussion-row:focus-visible,
.state-btn:focus-visible,
.composer-submit:focus-visible,
.composer-signin:focus-visible,
.sort-btn:focus-visible,
.filter-chip:focus-visible,
.category-select:focus-visible,
.state-select:focus-visible,
.composer-textarea:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid oklch(63% 0.09 176 / 0.38);
  outline-offset: 3px;
}

.button-primary {
  background: var(--accent);
  color: var(--white-tint);
}

.button-primary:hover {
  background: var(--accent-hover);
  color: var(--white-tint);
  transform: translateY(-1px);
}

.button-secondary {
  background: oklch(96% 0.009 91);
  border-color: var(--rule);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--rule-strong);
  color: var(--accent-hover);
}

.discussion-hero {
  width: var(--container);
  margin: 0 auto;
  padding: clamp(126px, 9vw, 156px) 0 clamp(42px, 6vw, 82px);
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(360px, 0.55fr);
  align-items: end;
  gap: clamp(38px, 7vw, 96px);
}

.discussion-copy {
  max-width: 710px;
}

.intro-label {
  margin: 0 0 14px;
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 620;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 10.7ch;
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 6.2vw, 6.15rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.96;
  text-wrap: balance;
}

.hero-lede {
  max-width: 56ch;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.75vw, 1.28rem);
  line-height: 1.55;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.hero-links a {
  color: var(--accent-hover);
  font-weight: 620;
  text-decoration: none;
}

.hero-links a:hover {
  color: var(--ink);
}

.discussion-stage {
  position: relative;
  min-height: clamp(420px, 44vw, 620px);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--panel-quiet);
}

.discussion-stage img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.96);
}

.discussion-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, oklch(17% 0.018 176 / 0.56), transparent 58%),
    linear-gradient(90deg, oklch(17% 0.018 176 / 0.18), transparent 44%);
  pointer-events: none;
}

.stage-card {
  position: absolute;
  left: clamp(18px, 4vw, 42px);
  right: clamp(18px, 4vw, 42px);
  bottom: clamp(18px, 4vw, 42px);
  z-index: 1;
  max-width: 410px;
  padding: 22px 24px;
  border: 1px solid oklch(91% 0.01 91 / 0.72);
  background: oklch(98.4% 0.006 91 / 0.94);
  color: var(--ink);
}

.stage-card span,
.posting-copy strong {
  display: block;
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stage-card strong {
  display: block;
  margin: 9px 0 8px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 620;
  letter-spacing: 0;
  text-transform: none;
}

.stage-card p {
  margin: 0;
  color: var(--ink-soft);
}

.discussion-principles {
  width: var(--container);
  margin: 0 auto clamp(64px, 8vw, 108px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.discussion-principles div {
  min-height: 118px;
  padding: 22px clamp(18px, 3vw, 36px);
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.discussion-principles div + div {
  border-left: 1px solid var(--rule);
}

.discussion-principles span {
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.1em;
}

.discussion-principles p {
  max-width: 28ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
}

.discussion-workspace {
  width: var(--container);
  margin: 0 auto clamp(74px, 9vw, 126px);
  display: grid;
  grid-template-columns: minmax(310px, 0.46fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 66px);
}

.discussion-sidebar {
  display: grid;
  gap: 22px;
}

.composer-section,
.topic-section,
.state-jump,
.feed-column {
  border: 1px solid var(--rule);
  background: var(--panel);
}

.composer-section {
  position: sticky;
  top: 90px;
  overflow: hidden;
}

.composer-heading,
.topic-section,
.state-jump,
.feed-heading,
.feed-filters,
.feed-note {
  padding: 24px;
}

.composer-heading {
  padding-bottom: 18px;
}

.composer-heading h2,
.state-jump h2,
.feed-heading h2,
.posting-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.composer-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.composer-tab {
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--rule);
  background: var(--panel-quiet);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 620;
  transition:
    background 180ms var(--ease),
    color 180ms var(--ease);
}

.composer-tab:last-child {
  border-right: 0;
}

.composer-tab.active {
  background: var(--accent);
  color: var(--white-tint);
}

.composer-body {
  padding: 22px 24px 18px;
}

.tab-panel[hidden] {
  display: none;
}

.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.prompt-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid oklch(86% 0.018 176);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.field-label,
.composer-tools label {
  display: block;
  margin-bottom: 9px;
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.composer-textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px;
  background: oklch(99% 0.004 91);
  color: var(--ink);
  line-height: 1.5;
  outline: none;
  transition:
    border-color 180ms var(--ease),
    background 180ms var(--ease);
}

.composer-textarea::placeholder {
  color: oklch(53% 0.014 176 / 0.78);
}

.composer-textarea:focus {
  border-color: var(--rule-strong);
  background: var(--white-tint);
}

.composer-textarea:disabled,
.category-select:disabled,
.state-select:disabled {
  background: oklch(93.5% 0.009 91);
  color: var(--muted);
}

.composer-tools {
  padding: 0 24px 20px;
}

.category-select,
.state-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0 14px;
  background: oklch(99% 0.004 91);
  color: var(--ink);
  outline: none;
}

.composer-footer {
  min-height: 68px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--rule);
}

.composer-footer p {
  max-width: 29ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.composer-submit,
.state-btn,
.composer-signin {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 19px;
  background: var(--accent);
  color: var(--white-tint);
  font-weight: 620;
  transition:
    background 180ms var(--ease),
    color 180ms var(--ease),
    transform 180ms var(--ease);
}

.composer-submit:hover,
.state-btn:hover,
.composer-signin:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.composer-submit:disabled {
  background: oklch(72% 0.02 176);
  color: oklch(96% 0.004 91);
  transform: none;
}

.post-status {
  min-height: 1.3em;
  margin: 0;
  padding: 0 24px 18px;
  color: var(--accent-hover);
  font-size: 0.94rem;
}

.composer-auth {
  border-top: 1px solid var(--rule);
  padding: 22px 24px 24px;
  background: var(--panel-quiet);
}

.composer-auth-content h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.composer-auth-content p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.topic-section {
  display: grid;
  gap: 2px;
}

.topic-section .intro-label,
.state-jump .intro-label,
.feed-heading .intro-label {
  margin-bottom: 12px;
}

.topic-link {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}

.topic-link span {
  color: var(--ink);
  font-weight: 620;
}

.topic-link em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.95rem;
}

.topic-link:hover span {
  color: var(--accent-hover);
}

.state-jump {
  display: grid;
  gap: 18px;
}

.state-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.state-btn {
  min-width: 72px;
  border-radius: 12px;
}

.feed-column {
  overflow: hidden;
}

.feed-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}

.feed-sort {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel-quiet);
  padding: 4px;
}

.sort-btn,
.filter-chip {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 620;
}

.sort-btn.active,
.filter-chip.active {
  background: var(--accent);
  color: var(--white-tint);
}

.feed-filters {
  padding-top: 18px;
  padding-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  border-bottom: 1px solid var(--rule);
}

.filter-chip {
  border: 1px solid var(--rule);
  background: oklch(99% 0.004 91);
}

.feed-note {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.93rem;
}

.discussions-feed {
  display: grid;
}

.discussion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  padding: 24px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition:
    background 180ms var(--ease),
    color 180ms var(--ease);
}

.discussion-row:last-child {
  border-bottom: 0;
}

.discussion-row:hover {
  background: oklch(95% 0.014 91);
}

.discussion-title {
  max-width: 34ch;
  margin: 8px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.88rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.discussion-excerpt {
  max-width: 65ch;
  margin: 0;
  color: var(--ink-soft);
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid oklch(80% 0.04 176);
  border-radius: 999px;
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discussion-meta {
  min-width: 124px;
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.feed-empty {
  padding: 42px 24px;
}

.feed-empty h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.feed-empty p {
  margin: 0;
  color: var(--muted);
}

.posting-guide {
  width: var(--container);
  margin: 0 auto clamp(78px, 10vw, 138px);
  display: grid;
  grid-template-columns: minmax(260px, 0.46fr) minmax(0, 0.54fr);
  align-items: stretch;
  border: 1px solid oklch(29% 0.018 176);
  background: var(--night);
  color: var(--white-tint);
}

.posting-guide figure {
  min-height: 520px;
  margin: 0;
  overflow: hidden;
}

.posting-guide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(0.94);
}

.posting-copy {
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  align-content: center;
}

.posting-copy .intro-label,
.posting-copy strong {
  color: oklch(76% 0.08 176);
}

.posting-copy h2 {
  max-width: 12ch;
  margin-bottom: clamp(28px, 4vw, 42px);
  color: var(--white-tint);
}

.posting-copy ul {
  display: grid;
  gap: 22px;
  max-width: 58ch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.posting-copy li {
  color: oklch(88% 0.008 91);
}

.posting-copy strong {
  margin-bottom: 6px;
}

.site-footer {
  padding: 34px max(16px, calc((100vw - 1190px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--night);
  color: var(--white-tint);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 620;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-footer p {
  margin: 10px 0 0;
  color: oklch(82% 0.007 91);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer nav a {
  color: oklch(86% 0.007 91);
}

.site-footer a:hover {
  color: oklch(78% 0.08 176);
}

@media (max-width: 1020px) {
  .discussion-hero,
  .discussion-workspace,
  .posting-guide {
    grid-template-columns: 1fr;
  }

  .discussion-stage {
    min-height: 460px;
  }

  h1 {
    max-width: 12ch;
  }

  .composer-section {
    position: static;
  }

  .posting-guide figure {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  :root {
    --container: min(100% - 28px, 1190px);
  }

  .discussion-hero {
    padding-top: 108px;
  }

  h1 {
    font-size: clamp(2.88rem, 16vw, 4.35rem);
  }

  .discussion-stage {
    min-height: 390px;
    border-radius: 14px;
  }

  .discussion-principles {
    grid-template-columns: 1fr;
  }

  .discussion-principles div + div {
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .composer-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .composer-tab:nth-child(2) {
    border-right: 0;
  }

  .composer-tab:nth-child(-n + 2) {
    border-bottom: 1px solid var(--rule);
  }

  .feed-heading {
    display: grid;
    align-items: start;
  }

  .feed-sort {
    width: 100%;
    justify-content: space-between;
  }

  .sort-btn {
    flex: 1;
  }

  .discussion-row {
    grid-template-columns: 1fr;
  }

  .discussion-meta {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    text-align: left;
  }

  .composer-footer,
  .state-picker-row {
    grid-template-columns: 1fr;
  }

  .composer-footer {
    display: grid;
  }

  .state-btn {
    width: 100%;
  }

  .posting-copy {
    padding: 28px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 500px) {
  .composer-heading,
  .topic-section,
  .state-jump,
  .feed-heading,
  .feed-filters,
  .feed-note,
  .discussion-row,
  .composer-body,
  .composer-tools,
  .composer-footer,
  .composer-auth {
    padding-left: 18px;
    padding-right: 18px;
  }

  .stage-card {
    padding: 18px;
  }

  .prompt-row span {
    width: 100%;
    justify-content: center;
  }
}

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