/* Content-batch articles (src/lib/articles.mjs): loaded only on pages with body.article-page, after
   redesign.css. Uses the redesign tokens (paper, green, apricot, trade colours, serif/mono). */

.article-hero .quick-answer { max-width: 60ch; border-left-color: var(--trade, var(--green)); box-shadow: var(--shadow-1); }
.article-hero .quick-answer p { font-size: 17px; }

/* Key facts box */
.article-keyfacts { margin: 26px 0; padding: 20px 22px 16px; background: #fff; border: 1px solid var(--rule); border-top: 4px solid var(--green); border-radius: var(--r-md); box-shadow: var(--shadow-1); max-width: 70ch; }
.article-keyfacts .kicker { margin: 0 0 8px; }
.article-keyfacts ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px 24px; }
@media (min-width: 760px) { .article-keyfacts ul { grid-template-columns: 1fr 1fr; } }
.guide-copy .article-keyfacts li { position: relative; padding: 6px 0 6px 28px; margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.article-keyfacts li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 14px; height: 8px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }

/* Step lists */
.guide-copy .article-steps { counter-reset: step; list-style: none; padding: 0; margin: 26px 0; max-width: 70ch; }
.guide-copy .article-steps li { counter-increment: step; position: relative; margin: 0 0 12px; padding: 16px 18px 16px 64px; background: #fff; border: 1px solid var(--rule); border-radius: var(--r-sm); font-size: 17px; line-height: 1.65; }
.article-steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font: 600 15px/1 var(--mono); }
.article-steps li strong { color: var(--ink); }
.guide-copy ol:not(.article-steps) { padding-left: 24px; margin: 22px 0; }
.guide-copy ol:not(.article-steps) li { padding-left: 6px; margin: 10px 0; font-size: 17px; line-height: 1.7; color: #40554b; }

/* Callouts: Tip (default apricot), Note (green), Warning and Safety (accent, stronger) */
.article-callout { margin: 24px 0; max-width: 70ch; }
.guide-copy .article-callout p { margin: 6px 0 0; font-size: 16px; line-height: 1.65; }
.article-callout[data-callout="note"] { background: var(--green-tint); border-left-color: var(--green); }
.article-callout[data-callout="warning"], .article-callout[data-callout="safety"] { background: #fff3ec; border-left-color: var(--accent-hover); }
.article-callout[data-callout="warning"] strong:first-child::before, .article-callout[data-callout="safety"] strong:first-child::before { content: "!"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--accent-hover); color: #fff; font: 700 14px/1 var(--sans); vertical-align: 2px; }

/* Tables */
.article-table { margin: 24px 0; }
.article-table caption { caption-side: top; text-align: left; padding: 12px 16px; font-weight: 600; color: var(--ink); background: var(--surface); border-bottom: 1px solid var(--rule); }
.article-table tbody tr:nth-child(even) { background: var(--surface); }
.article-table th[scope="row"] { font-weight: 600; color: var(--ink); }

/* FAQ accordion */
.article-faq { display: grid; gap: 10px; margin: 18px 0 8px; max-width: 72ch; }
.article-faq-item { background: #fff; border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; }
.article-faq-item[open] { border-color: var(--green-tint-2); box-shadow: var(--shadow-1); }
.article-faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; }
.article-faq-item summary::-webkit-details-marker { display: none; }
.article-faq-item summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--green-tint); color: var(--green); font: 600 18px/1 var(--mono); }
.article-faq-item[open] summary::after { content: "\2212"; }
.guide-copy .article-faq-item h3 { margin: 0; font-size: 18px; line-height: 1.45; }
.article-faq-item > div { padding: 0 18px 14px; }
.guide-copy .article-faq-item p { margin: 0 0 10px; font-size: 17px; }

/* Sources, related pages, in-article CTA */
.article-sources ul { margin: 10px 0 6px; padding-left: 20px; }
.article-sources li { margin: 6px 0; }
.article-related .guide-card-grid { margin-top: 18px; }
.article-related-links { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.article-related-links a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--rule); color: var(--green); font-weight: 600; text-decoration: none; }
.article-related-links a:hover { border-color: var(--green); background: var(--green-tint); }
.article-cta { margin: 28px 0; }
.article-tool { margin: 24px 0; padding: 20px; border: 1px dashed var(--rule-strong); border-radius: var(--r-md); background: #fff; min-height: 120px; }
.article-tool .tool-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.article-tool .tool-field { display: flex; flex-direction: column; gap: 6px; }
.article-tool .tool-field label, .article-tool .tool-checks legend { font-weight: 600; font-size: 15px; }
.article-tool .tool-input { display: flex; align-items: center; gap: 8px; }
.article-tool .tool-input input { width: 100%; max-width: 160px; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-md); font: inherit; background: #fff; }
.article-tool .tool-input select { width: 100%; max-width: 320px; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-md); font: inherit; background: #fff; }
.article-tool .tool-input input:focus, .article-tool .tool-input select:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.article-tool [hidden] { display: none; }
.article-tool .tool-unit { font-size: 14px; color: var(--muted); }
.article-tool .tool-hint { font-size: 14px; color: var(--muted); margin: 0; }
.article-tool .tool-checks { margin: 18px 0 0; padding: 0; border: 0; display: grid; gap: 8px; }
.article-tool .tool-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.article-tool .tool-check input { margin-top: 4px; width: 18px; height: 18px; }
.article-tool .tool-result { margin-top: 20px; padding: 16px 18px; border-radius: var(--r-md); background: var(--green-tint); }
.article-tool .tool-result .kicker { margin: 0 0 8px; }
.article-tool .tool-figures { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 10px; }
.article-tool .tool-figures dt { font-weight: 600; }
.article-tool .tool-figures dd { margin: 0; }
.article-tool .tool-figures strong { font-size: 18px; }
.article-tool .tool-error { margin: 0; font-weight: 600; }

@media (max-width: 700px) {
  .guide-copy .article-steps li { padding: 14px 14px 14px 56px; font-size: 16px; }
  .article-steps li::before { left: 12px; }
  .guide-copy .article-faq-item h3 { font-size: 17px; }
}
