/* ==========================================================================
   VentPlus — content layer (ADDITIVE ONLY)
   Blog, calculator tools, reviews, applications hub.

   This file never redefines a selector that exists in style.css or
   co2-widget.css, so the look and feel of every pre-existing page is
   untouched. It reuses the same tokens (--paper, --ink, --leaf, --font-*)
   so new pages are visually indistinguishable from the old ones.
   ========================================================================== */

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

.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 4.5rem) var(--gutter) clamp(3rem, 9vh, 5rem);
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.article-meta span + span::before { content: "·"; margin-right: 0.75rem; opacity: 0.5; }

.article-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-top: 1.1rem;
}

.article-standfirst {
  margin-top: 1.4rem;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.article-body { margin-top: 2.75rem; }

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.55rem, 3.6vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem;
}
.article-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 2rem 0 0.6rem;
}
.article-body p { margin-bottom: 1.15rem; color: var(--ink-soft); font-size: 1.06rem; }
.article-body p strong,
.article-body li strong { color: var(--ink); font-weight: 600; }
.article-body a { color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--leaf-bright); }
.article-body a:hover { color: var(--leaf); }

/* A .btn inside .article-body is still an <a>, so the two rules above used to
   win on specificity (0,1,1 beats .btn-solid's 0,1,0). That painted dark ink
   text onto the dark ink button -- unreadable -- and drew an underline under
   every button. Buttons are not body links; restore their own colours. */
.article-body .btn { border-bottom: none; }
.article-body a.btn-solid,
.article-body a.btn-solid:hover        { color: var(--paper); }
.article-body a.btn-ghost,
.article-body a.btn-ghost:hover        { color: var(--ink); }
.article-body a.btn-ghost-light,
.article-body a.btn-ghost-light:hover  { color: var(--paper); }
.article-body a.btn-ghost-light:hover  { color: var(--ink); }
.article-body ul,
.article-body ol { margin: 0 0 1.4rem 1.2rem; color: var(--ink-soft); font-size: 1.06rem; }
.article-body li { margin-bottom: 0.55rem; padding-left: 0.25rem; }
.article-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--leaf);
  background: rgba(79, 157, 105, 0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.06rem;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

.key-facts {
  margin: 2rem 0 2.5rem;
  padding: 1.5rem 1.75rem;
  border: 1.5px solid rgba(22, 53, 42, 0.18);
  border-radius: var(--radius);
  background: var(--paper-deep);
}
.key-facts h2 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.9rem;
}
.key-facts ul { margin: 0 0 0 1.1rem; }
.key-facts li:last-child { margin-bottom: 0; }

/* data table inside articles */
.data-table-wrap { overflow-x: auto; margin: 1.75rem 0 2rem; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; min-width: 460px; font-size: 0.97rem; }
.data-table th,
.data-table td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid rgba(22, 53, 42, 0.12); }
.data-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1.5px solid rgba(22, 53, 42, 0.25);
}
/* First column is the label column. It must wrap: several tables use a phrase
   ("Pinning / primordia initiation") rather than a short value, and nowrap
   pushed those past the viewport. Short values still sit on one line naturally. */
.data-table td:first-child { font-family: var(--font-mono); }
.data-table--nowrap td:first-child { white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td { color: var(--ink-soft); }

/* variant: first column is a sentence, not a short value. The mono/nowrap
   treatment above assumes a label like "1,000-1,500 ppm" and forces prose
   onto one unbroken line. */
.data-table--prose td:first-child {
  font-family: inherit;
  font-weight: 500;
}
.data-table--prose th:first-child,
.data-table--prose td:first-child { width: 38%; }

@media (max-width: 640px) {
  .data-table { font-size: 0.9rem; }
  .data-table th,
  .data-table td { padding: 0.6rem 0.55rem; }
}
.dt-good  td:first-child { color: var(--leaf); }
.dt-warn  td:first-child { color: var(--amber-deep); }
.dt-bad   td:first-child { color: var(--danger); }

.article-sources {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(22, 53, 42, 0.15);
}
.article-sources h2 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
}
.article-sources ol { font-size: 0.9rem; color: var(--ink-soft); margin-left: 1.1rem; }
.article-sources a { word-break: break-word; }

/* inline product callout inside an article */
.article-cta {
  margin: 2.75rem 0;
  padding: 1.75rem 2rem;
  border: 1.5px solid var(--leaf);
  border-radius: var(--radius);
  background: rgba(79, 157, 105, 0.06);
}
.article-cta h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; margin-bottom: 0.5rem; }
.article-cta p { color: var(--ink-soft); margin-bottom: 1.1rem; }
.article-cta .btn { margin-top: 0.25rem; }

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

.post-list { display: grid; gap: 1.25rem; margin-top: 2.75rem; }
.post-card {
  display: block;
  padding: 1.6rem 1.75rem;
  border: 1px solid rgba(22, 53, 42, 0.12);
  border-radius: var(--radius);
  background: var(--paper-deep);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--leaf); }
.post-card .pc-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf);
}
.post-card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0.5rem 0 0.5rem;
}
.post-card p { color: var(--ink-soft); font-size: 0.98rem; }

.cluster-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 3.25rem 0 -0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(22, 53, 42, 0.15);
}
.cluster-title:first-of-type { margin-top: 2.5rem; border-top: none; padding-top: 0; }

/* --------------------------------------------------------------- tools */

.tool-wrap { max-width: 900px; margin: 0 auto; padding: clamp(2rem, 6vh, 3.5rem) var(--gutter) 1rem; }

.calc {
  margin-top: 2.25rem;
  border: 1.5px solid rgba(22, 53, 42, 0.18);
  border-radius: var(--radius);
  background: var(--paper-deep);
  overflow: hidden;
}
.calc-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.1rem 1.5rem;
  padding: 1.75rem 1.9rem;
}
.calc-field { display: flex; flex-direction: column; gap: 0.35rem; }
.calc-field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.02em; }
.calc-field input,
.calc-field select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid rgba(22, 53, 42, 0.2);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.calc-field input:focus,
.calc-field select:focus { outline: none; border-color: var(--leaf); }
.calc-hint { font-size: 0.75rem; color: var(--ink-soft); opacity: 0.85; }

.calc-out {
  padding: 1.75rem 1.9rem 2rem;
  border-top: 1.5px solid rgba(22, 53, 42, 0.15);
  background: var(--ink);
  color: var(--paper);
}
.calc-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.25rem;
}
.calc-big {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 1;
  color: var(--leaf-bright);
}
.calc-big.is-warn { color: var(--amber); }
.calc-big.is-bad  { color: #e07a5f; }
.calc-big-unit { font-family: var(--font-mono); font-size: 1rem; opacity: 0.7; }
.calc-verdict {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: 99px;
  background: var(--leaf-bright);
  color: var(--ink);
  white-space: nowrap;
}
.calc-verdict.is-warn { background: var(--amber); }
.calc-verdict.is-bad  { background: var(--danger); color: var(--paper); }
.calc-note { margin-top: 0.9rem; font-size: 0.95rem; color: rgba(246, 243, 234, 0.8); max-width: 46rem; }
.calc-note strong { color: var(--paper); }

.calc-chart { margin-top: 1.6rem; }
.calc-chart svg { width: 100%; height: auto; display: block; overflow: visible; }

.calc-rows { margin-top: 1.6rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.calc-row {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(246, 243, 234, 0.2);
  border-radius: 12px;
}
.calc-row i {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 243, 234, 0.6);
  margin-bottom: 0.35rem;
}
.calc-row b { font-family: var(--font-mono); font-weight: 500; font-size: 1.25rem; color: var(--paper); }

.calc-method {
  margin-top: 2.5rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.calc-method h2 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.calc-method p { margin-bottom: 0.8rem; }
.calc-method code {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  background: var(--paper-deep);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
}

/* ------------------------------------------------------------- reviews */

.reviews-section {
  padding: clamp(4rem, 11vh, 7rem) var(--gutter);
  border-top: 1px solid rgba(22, 53, 42, 0.12);
}
.reviews-inner { max-width: 1100px; margin: 0 auto; }
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.review-card {
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.75rem;
  border: 1px solid rgba(22, 53, 42, 0.12);
  border-radius: var(--radius);
  background: var(--paper-deep);
}
.review-stars { color: var(--amber-deep); font-size: 1rem; letter-spacing: 0.1em; }
.review-card blockquote { margin: 0.75rem 0 1.1rem; font-size: 1rem; color: var(--ink); flex-grow: 1; }
.review-who { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.review-empty {
  margin-top: 2.25rem;
  padding: 1.75rem 2rem;
  border: 1.5px dashed rgba(22, 53, 42, 0.28);
  border-radius: var(--radius);
  color: var(--ink-soft);
}
.review-empty strong { color: var(--ink); }

/* -------------------------------------------------- applications hub */

.apps-hub-group { margin-top: 3rem; }
.apps-hub-group > h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(22, 53, 42, 0.15);
}
.app-card .app-more {
  display: inline-block;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--leaf);
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 157, 105, 0.45);
}
.app-card .app-more:hover { color: var(--ink); }

/* ----------------------------------------------------- related links */

.related-links { max-width: 1100px; margin: 0 auto; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.related-grid a {
  display: block;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(22, 53, 42, 0.14);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
  background: var(--paper);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.related-grid a:hover { border-color: var(--leaf); transform: translateY(-2px); }
.related-grid a span { display: block; margin-top: 0.3rem; font-weight: 400; font-size: 0.86rem; color: var(--ink-soft); }

/* ----------------------------------------------------------- responsive */

@media (max-width: 700px) {
  .article-body p,
  .article-body ul,
  .article-body ol { font-size: 1.02rem; }
  .calc-inputs { padding: 1.35rem; }
  .calc-out { padding: 1.35rem 1.35rem 1.6rem; }
}
