/* Guide articles: costs, grants, and later costs-/grants- detail pages. */

.post-wrap {
  width: min(1120px, calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
}

.post-masthead {
  padding: 42px 0 8px;
}

.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--ink-faint);
}

.post-breadcrumb a {
  color: var(--ink-muted);
}

.post-breadcrumb a:hover {
  color: var(--ink);
}

.post-breadcrumb-sep {
  color: var(--ink-faint);
}

.post-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--chip-hot);
  color: var(--chip-hot-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-date-inline {
  font-size: 13px;
  color: var(--ink-faint);
}

.post-masthead h1 {
  max-width: 18ch;
  font-size: clamp(2.4rem, 5vw, 3.55rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.post-lead {
  max-width: 62ch;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.post-lead + .post-lead {
  margin-top: 12px;
}

.post-meta-bar {
  max-width: 68ch;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.post-meta-bar a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body-section {
  padding: 36px 0 96px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
}

#articleContent {
  min-width: 0;
}

#articleContent > h2 {
  margin: 42px 0 14px;
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

#articleContent > h2:first-child {
  margin-top: 0;
}

#articleContent > h3 {
  margin: 26px 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

#articleContent p,
#articleContent li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}

#articleContent p + p {
  margin-top: 14px;
}

#articleContent ul,
#articleContent ol {
  margin: 14px 0 0;
  padding-left: 1.2em;
}

#articleContent li + li {
  margin-top: 8px;
}

#articleContent a:not(.btn-dark) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

#articleContent a:hover:not(.btn-dark) {
  color: var(--ink);
}

.post-aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-toc,
.post-aside-cta {
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.post-toc h2,
.post-aside-cta h2 {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.post-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-toc li + li {
  margin-top: 8px;
}

.post-toc a {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.post-toc a:hover {
  color: var(--ink);
}

.post-aside-cta p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.post-aside-cta .btn-dark {
  margin-top: 14px;
  width: 100%;
}

.callout {
  margin: 20px 0 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
}

.callout.tip {
  background: var(--chip-ok);
  border-color: transparent;
}

.callout.warning {
  background: var(--chip-hot);
  border-color: transparent;
}

.callout p {
  color: var(--ink-soft);
}

.callout strong {
  color: var(--ink);
}

.table-scroll {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

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

.data-table th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--bg-deep);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table td {
  color: var(--ink-soft);
}

.step-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: post-step;
}

.step-list li {
  position: relative;
  padding: 14px 0 14px 52px;
  border-bottom: 1px solid var(--line);
}

.step-list li:last-child {
  border-bottom: 0;
}

.step-list li::before {
  counter-increment: post-step;
  content: counter(post-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.post-cta {
  margin-top: 40px;
  padding: 26px 24px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.post-cta h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.post-cta p {
  max-width: 54ch;
  color: var(--ink-muted);
}

.post-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.post-faq {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.post-faq article {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.post-faq h3 {
  margin: 0 0 8px;
}

.post-related {
  margin-top: 36px;
}

.post-related h2 {
  margin: 0 0 14px;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

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

.post-related a {
  display: block;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.post-related a:hover {
  color: var(--ink);
}

.post-related strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.post-related span {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}

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

  .post-aside {
    position: static;
    order: -1;
  }

  .post-masthead h1 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .post-masthead {
    padding-top: 28px;
  }

  .post-cta,
  .post-faq article,
  .callout {
    padding-left: 16px;
    padding-right: 16px;
  }
}
