:root {
  --black: #171717;
  --white: #ffffff;
  --surface: #f5f4f1;
  --surface-accent: #fff8f4;
  --text: #1c1c1c;
  --muted: #696969;
  --accent: rgb(218, 94, 42);
  --accent-dark: rgb(180, 69, 25);
  --accent-soft: rgba(218, 94, 42, 0.09);
  --border: #d8d4cd;
  --danger: #a82d2d;
  --page-width: 900px;
  --font: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: var(--font);
  line-height: 1.55;
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

.page {
  width: min(calc(100% - 40px), var(--page-width));
  margin-inline: auto;
  padding: 72px 0 95px;
}

.intro {
  max-width: 750px;
  margin-bottom: 42px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  font-weight: 400;
  line-height: 1.15;
}

.intro-text {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.composer {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}

.composer-heading,
.feed-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
}

.character-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

textarea {
  width: 100%;
  min-height: 160px;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: var(--white);
  resize: vertical;
}

textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(218, 94, 42, 0.17);
}

.form-actions {
  min-height: 48px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.form-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-message.error {
  color: var(--danger);
}

.primary-button,
.secondary-button,
.delete-button {
  border: 0;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.primary-button {
  padding: 12px 20px;
  border-radius: 999px;
  color: var(--white);
  background: var(--accent);
}

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

.primary-button:disabled,
.secondary-button:disabled,
.delete-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.feed-section {
  margin-top: 58px;
}

.secondary-button {
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--white);
}

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

.notice {
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface);
}

.notice-error {
  border-color: rgba(168, 45, 45, 0.35);
  color: var(--danger);
  background: rgba(168, 45, 45, 0.06);
}

.post-list {
  display: grid;
  gap: 13px;
}

.post {
  padding: 19px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
}

.post.own-post {
  border-color: rgba(218, 94, 42, 0.58);
  background: var(--accent-soft);
}

.post-content {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-footer {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.post-time {
  color: var(--muted);
  font-size: 0.82rem;
}

.delete-button {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--danger);
  background: transparent;
}

.delete-button:hover {
  background: rgba(168, 45, 45, 0.08);
}

.site-footer {
  min-height: 145px;
  padding: 30px 20px;
  color: var(--white);
  background: var(--black);
  display: grid;
  place-items: center;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 620px) {
  .page {
    width: min(calc(100% - 24px), var(--page-width));
    padding-top: 50px;
  }

  .composer-heading,
  .feed-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }
}
