/* Blog section. Loaded after free-plugins.css, which has the header, menu, footer and buttons. */

/* Blog index */

.blog-head {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.blog-filters[hidden],
.post-list > li[hidden] {
  display: none;
}

.filter-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  border-color: rgba(255, 138, 42, 0.6);
  color: var(--text);
  outline: none;
}

.filter-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(255, 138, 42, 0.12);
  color: var(--text);
}

.post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 28px);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.post-card:hover,
.post-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 138, 42, 0.6);
  box-shadow: 0 18px 50px rgba(255, 138, 42, 0.14);
  outline: none;
}

.post-card h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.15;
  text-transform: none;
}

.post-card p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.post-card .post-meta {
  margin-top: auto;
  padding-top: 6px;
  color: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Article */

.article {
  max-width: 760px;
  margin: 0 auto;
}

.article h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.05;
  text-transform: none;
}

.article .dek {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.9vw, 1.3rem);
  line-height: 1.6;
}

.article-meta {
  margin: 18px 0 0;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--accent-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.article-body {
  margin-top: 28px;
  color: #dfe3ee;
  font-size: 1.07rem;
  line-height: 1.8;
}

.article-body h2 {
  margin: 46px 0 14px;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.2;
  text-transform: none;
}

.article-body h3 {
  margin: 28px 0 8px;
  font-size: 1.1rem;
  line-height: 1.3;
  text-transform: none;
}

.article-body p {
  margin: 0 0 18px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 1.3em;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body li::marker {
  color: var(--accent);
}

.article-body a {
  color: var(--accent-soft);
  text-underline-offset: 3px;
}

.article-body a:hover,
.article-body a:focus-visible {
  color: var(--text);
}

.article-body strong {
  color: var(--text);
}

.callout {
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 20px 24px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
}

.callout h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.callout ul {
  margin-bottom: 0;
}

.callout li:last-child {
  margin-bottom: 0;
}

.article-figure {
  margin: 30px 0 32px;
}

.article-figure a {
  display: block;
}

.article-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.article-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.table-wrap {
  margin: 0 0 22px;
  overflow-x: auto;
}

.budget-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.budget-table th,
.budget-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.budget-table th {
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.budget-table td:first-child {
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.table-note {
  margin-top: -10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.related {
  margin-top: 44px;
}

.related h2 {
  margin-top: 0;
}

.related ul {
  margin-bottom: 0;
}

.article .ad-slot {
  margin: 36px 0;
}

@media (max-width: 760px) {
  .post-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-card,
  .filter-btn { transition: none; }
}
