:root {
  --page-bg: linear-gradient(180deg, #f5efe3 0%, #efe7d9 42%, #fcfaf6 100%);
  --surface: rgba(255, 252, 247, 0.86);
  --surface-strong: rgba(255, 252, 247, 0.96);
  --stroke: rgba(107, 86, 56, 0.14);
  --text: #271c11;
  --muted: #76624d;
  --accent: #c4572d;
  --accent-dark: #983f1d;
  --accent-soft: rgba(196, 87, 45, 0.12);
  --success: #20634d;
  --shadow: 0 18px 60px rgba(76, 47, 18, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page-bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
}

.page-shell {
  min-height: 100vh;
  padding: 24px 16px 40px;
}

.hero {
  max-width: 980px;
  margin: 0 auto 18px;
  padding: 22px 22px 10px;
}

.hero__eyebrow {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(39, 28, 17, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__title {
  margin: 16px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 54px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero__subtitle {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.layout {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(196, 87, 45, 0.08), transparent 36%),
    radial-gradient(circle at bottom left, rgba(32, 99, 77, 0.08), transparent 36%);
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.post-card,
.composer-card,
.comments-card {
  padding: 20px;
}

.card__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-card__title,
.comments-card__title {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.post-card__body {
  margin: 0 0 18px;
  white-space: pre-wrap;
  color: var(--text);
  line-height: 1.55;
}

.post-card__meta {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.post-card__link {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.composer {
  display: grid;
  gap: 14px;
}

.composer__input {
  width: 100%;
  border: 1px solid rgba(118, 98, 77, 0.24);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  padding: 16px 18px;
  color: var(--text);
  font: inherit;
  resize: vertical;
  min-height: 130px;
  outline: none;
}

.composer__input:focus {
  border-color: rgba(196, 87, 45, 0.5);
  box-shadow: 0 0 0 4px rgba(196, 87, 45, 0.12);
}

.composer__actions,
.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.composer__hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 620px;
}

.action-button,
.ghost-button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.action-button {
  background: var(--accent);
  color: #fff8f2;
  box-shadow: 0 14px 24px rgba(196, 87, 45, 0.24);
}

.ghost-button {
  background: rgba(39, 28, 17, 0.06);
  color: var(--text);
}

.action-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.action-button:disabled,
.ghost-button:disabled {
  opacity: 0.56;
  cursor: default;
  transform: none;
}

.state-banner {
  margin-top: 14px;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: rgba(39, 28, 17, 0.05);
  color: var(--muted);
  font-size: 14px;
}

.state-banner[data-tone="error"] {
  background: rgba(196, 87, 45, 0.12);
  color: var(--accent-dark);
}

.state-banner[data-tone="success"] {
  background: rgba(32, 99, 77, 0.12);
  color: var(--success);
}

.comments-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.comment {
  padding: 16px 16px 14px;
  border: 1px solid rgba(118, 98, 77, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
}

.comment__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.comment__author {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.comment__time {
  color: var(--muted);
  font-size: 13px;
}

.comment__text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--text);
}

@media (max-width: 720px) {
  .page-shell {
    padding: 14px 12px 28px;
  }

  .hero {
    padding: 10px 6px 6px;
  }

  .post-card,
  .composer-card,
  .comments-card {
    padding: 16px;
    border-radius: 22px;
  }

  .post-card__meta,
  .composer__actions,
  .card__header,
  .comment__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-button,
  .ghost-button {
    width: 100%;
    justify-content: center;
  }
}
