
:root {
  --max-width: 1180px;
  --text: #111;
  --muted: #555;
  --border: #e5e5e5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, serif;
  color: var(--text);
  background: #fff;
}

.header {
  border-bottom: 1px solid var(--border);
}

.header .container {
  max-width: 1200px;
  margin: auto;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo { flex: 1; font-size: 20px; }

.header__inner {
  max-width: 1200px;
  margin: auto;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav a,
nav a {
  margin-right: 16px;
  text-decoration: none;
  color: var(--text);
}

.cta {
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 16px;
}

.header__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  border: 1px solid #000;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: #000;
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: #000;
}

.link-muted {
  color: var(--muted);
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: auto;
  padding: 24px 16px;
}

.hero h2 {
  font-size: 40px;
}

.header__inner-page {
  max-width: 1180px;
}

.comunidade-page {
  max-width: 1180px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 32px;
  align-items: start;
}

.open-posts {
  margin-top: 48px;
  padding: 24px;
  background: #f7f1ea;
  border: 1px solid var(--border);
  border-radius: 16px;
  position: sticky;
  top: 24px;
}

.open-posts h3 {
  margin: 0 0 20px 0;
  font-size: 24px;
}

.open-posts__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.open-posts__item {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.open-posts__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.open-posts__title {
  font-weight: 600;
  line-height: 1.4;
}

.open-posts__link {
  color: #000;
  font-weight: 600;
  text-decoration: none;
}

.open-posts__empty {
  margin: 0;
  color: var(--muted);
}

.subscribe {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}

.subscribe input {
  flex: 1;
  padding: 8px;
}

.subscribe button {
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 16px;
}

.posts {
  margin-top: 48px;
}

.post {
  margin-bottom: 32px;
}

.post__link {
  display: flex;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.post__thumb {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f6f6f6;
}

.post__content h3 {
  margin: 0 0 8px 0;
  font-size: 22px;
}

.post__content p {
  margin: 0 0 8px 0;
  color: var(--muted);
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

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

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

.page {
  padding: 24px 0;
}

.article {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ARTICLE HEADER */
.article__header { padding-top: 10px; }

.article__title {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 10px 0;
  letter-spacing: -0.2px;
}

.article__deck {
  margin: 0 0 18px 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.article__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 0 10px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f6f6f6;
}

.author__name { font-weight: 600; }
.author__date { color: var(--muted); font-size: 14px; margin-top: 2px; }

.article__stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}

.article__share {
  justify-self: end;
}

/* FEATURE IMAGE */
.article__figure {
  margin: 22px 0 26px 0;
}

.figure__img {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f6f6f6;
  object-fit: cover;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal--open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal__content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: min(520px, 90%);
  z-index: 1;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.modal__body h2 {
  margin-top: 0;
}

.modal__text {
  color: var(--muted);
}

.modal__form {
  display: grid;
  gap: 12px;
}

.modal__label {
  font-size: 14px;
  font-weight: 600;
}

.modal__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.modal__checkbox {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.modal__actions {
  margin-top: 8px;
}

.modal__feedback {
  margin: 0;
  font-size: 14px;
}

.modal__feedback--success {
  color: #0a7a2f;
}

.modal__feedback--error {
  color: #b00020;
}

.figure__caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* PROSE */
.prose {
  font-size: 18px;
  line-height: 1.7;
  --paywall-line-height: 1.7;
}

.prose p { margin: 0 0 22px 0; }
.prose__paywall-text { margin: 0 0 22px 0; }
.prose--paywall {
  position: relative;
  --paywall-fade-lines: 3;
  --paywall-fade-height: calc(var(--paywall-fade-lines) * var(--paywall-line-height) * 1em);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - var(--paywall-fade-height)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - var(--paywall-fade-height)), transparent 100%);
}
.prose h2 {
  font-size: 26px;
  line-height: 1.25;
  margin: 42px 0 16px 0;
}
.prose ul, .prose ol {
  margin: 0 0 22px 22px;
  padding: 0;
}
.prose li { margin: 10px 0; }

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.prose blockquote {
  margin: 10px 0 22px 0;
  padding: 16px 18px;
  border-left: 3px solid var(--border);
  background: #fafafa;
  color: var(--text);
}

.dash-break {
  text-align: center;
  color: var(--muted);
  margin: 10px 0 22px 0;
}

/* SUBSCRIBE BLOCK */
.subscribe-block {
  margin-top: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: #fbfbfb;
}

.subscribe-block__title {
  margin: 0 0 8px 0;
  font-size: 20px;
  line-height: 1.3;
}

.subscribe-block__text {
  margin: 0 0 14px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.subscribe-block__form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.subscribe-block__form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}

.subscribe-block__fineprint {
  margin: 12px 0 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.subscribe-block__fineprint a {
  color: inherit;
}

/* ARTICLE FOOTER */
.article__footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
  }

  .header__inner {
    flex-wrap: wrap;
  }

  .hero h2 {
    font-size: 28px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .open-posts {
    margin-top: 0;
    position: static;
  }

  .subscribe {
    flex-direction: column;
  }

  .cta {
    width: 100%;
  }

  .post__link {
    flex-direction: column;
  }

  .post__thumb {
    width: 100%;
    height: 200px;
  }
}
