/*
 * The blog: an index of article cards and the article page itself.
 * Loaded after styles.css and built only from its tokens, so the blog reads as
 * the same site. Article bodies are plain semantic HTML written by hand, so
 * everything here targets elements inside .post-body rather than classes.
 */

.masthead nav a[aria-current="page"] {
  color: var(--green-deep);
}

/* ------------------------------------------------------------ header band */

.post-head {
  background: var(--char);
  color: #fff;
  padding-block: clamp(2.75rem, 7vw, 4.5rem);
}

.post-head h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
}

.post-head .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.crumbs {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.62);
}

.crumbs a {
  color: rgba(255, 255, 255, 0.82);
}

.post-meta {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.62);
}

.blog-intro {
  margin-top: 1rem;
  max-width: 60ch;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

/* ------------------------------------------------------------ hero photo */

.post-hero {
  margin: 0;
  background: var(--char);
}

.post-hero img {
  display: block;
  width: 100%;
  max-width: 1120px;
  max-height: 560px;
  margin-inline: auto;
  object-fit: cover;
  height: auto;
}

.post-hero figcaption {
  padding-block: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}

.post-hero figcaption a {
  color: rgba(255, 255, 255, 0.78);
}

/* ------------------------------------------------------------ article body */

.post-body {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.post-body > * + * {
  margin-top: 1.125rem;
}

.post-body h2 {
  margin-top: 2.75rem;
  font-size: clamp(1.5rem, 3.2vw, 1.875rem);
}

.post-body h3 {
  margin-top: 2rem;
  font-size: 1.1875rem;
}

.post-body p,
.post-body li {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
}

.post-body .lede {
  max-width: none;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  color: var(--ink-soft);
}

.post-body ul,
.post-body ol {
  padding-left: 1.375rem;
  display: grid;
  gap: 0.5rem;
}

.post-body a {
  color: var(--green-deep);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

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

/* The answer up front, which is what both readers and AI answer engines quote. */
.key-points {
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-card);
  background: var(--green-wash);
  border: 1px solid #d5e7db;
}

.key-points h2 {
  margin-top: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.key-points ul {
  margin-top: 0.75rem;
}

/* Tables scroll sideways on a phone rather than squashing. */
.post-body table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.post-body th,
.post-body td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--cream-line);
  text-align: left;
  vertical-align: top;
}

.post-body th {
  background: var(--sky);
  font-weight: 650;
}

.post-body caption {
  caption-side: bottom;
  padding-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-align: left;
}

.post-body .faq {
  margin-top: 3rem;
}

.post-body details {
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--cream-line);
  border-radius: var(--radius-control);
  background: var(--cream);
}

.post-body summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.0625rem;
}

.post-body details p {
  margin-top: 0.75rem;
}

.post-body .references {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--cream-line);
}

.post-body .references li {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.post-cta {
  margin-top: 3rem;
  padding: 1.75rem;
  border-radius: var(--radius-card);
  background: var(--char);
  color: #fff;
}

.post-cta h2 {
  margin-top: 0;
  color: #fff;
  font-size: 1.375rem;
}

.post-cta p {
  margin: 0.75rem 0 1.25rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ------------------------------------------------------------ blog index */

.blog-list {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.post-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.post-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--cream-line);
  border-radius: var(--radius-card);
  background: var(--cream);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.post-card a:hover {
  box-shadow: 0 10px 30px rgba(18, 23, 20, 0.1);
  transform: translateY(-2px);
}

.post-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}

.post-card-text {
  padding: 1.25rem 1.375rem 1.5rem;
}

.post-card .post-meta {
  margin: 0 0 0.5rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.post-card h2 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}

.post-card p:last-child {
  margin-top: 0.625rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Sibling articles under the call to action. */
.post-body .related {
  margin-top: 2.5rem;
}

.post-body .related h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.post-body .related ul {
  margin-top: 0.75rem;
}
