/* Guides and calculator (#134, #135). Loaded after site.css. */
.site-nav a[aria-current="true"] { color: var(--white); }

/* Home page cards */
.guide-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-card {
  display: flex; flex-direction: column; overflow: hidden; background: var(--white); color: var(--text); text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow 0.15s;
}
.guide-card:hover { box-shadow: 0 10px 26px rgba(18, 32, 49, 0.14); }
.guide-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.guide-card img { display: block; width: 100%; height: 200px; object-fit: contain; padding: 14px; border-bottom: 1px solid var(--border); }
.guide-card div { padding: 20px 24px 24px; }
.guide-card h3 { margin: 0 0 8px; color: var(--navy); font-size: 1.2rem; }
.guide-card p { margin: 0 0 12px; color: var(--muted); }
.guide-card span { color: var(--primary); font-weight: 700; text-decoration: underline; }

/* Article */
main .article { padding: 40px 0 64px; background: var(--white); }
.article .container { max-width: 780px; font-size: 1.08rem; line-height: 1.7; }
.article h1 { font-size: clamp(2rem, 4.5vw, 2.7rem); }
.article h2 { margin: 52px 0 12px; line-height: 1.25; scroll-margin-top: 16px; }
.article h3 { margin: 28px 0 6px; color: var(--navy); font-size: 1.2rem; }
.article p { margin: 0 0 18px; }
.article li { margin: 0 0 8px; }
.breadcrumb, .updated { color: var(--muted); font-size: 0.95rem; }
.article .intro { font-size: 1.2rem; }
.article figure { margin: 28px 0; }
.article figure img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.article figcaption { margin-top: 8px; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

.answer { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin: 24px 0; padding: 0; list-style: none; }
.article .answer li {
  margin: 0; padding: 18px; background: var(--canvas); border: 1px solid var(--border); border-top: 3px solid var(--gold);
  border-radius: var(--radius); line-height: 1.4;
}
.answer strong { display: block; color: var(--navy); font-size: 1.55rem; }

.contents { margin: 28px 0; padding: 18px 22px; background: var(--canvas); border-radius: var(--radius); }
.article .contents p { margin: 0 0 6px; font-weight: 700; color: var(--navy); }
.contents ul { margin: 0; padding-left: 20px; }
.article .contents li { margin: 2px 0; }

.data-table { width: 100%; margin: 12px 0 28px; border-collapse: collapse; font-size: 1rem; line-height: 1.4; }
.data-table caption { padding: 0 0 8px; text-align: left; font-weight: 700; color: var(--navy); }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table thead th { background: var(--navy); color: var(--white); }
.data-table tbody th { font-weight: 600; color: var(--navy); }
.data-table small { display: block; font-weight: 400; color: var(--muted); }
.data-table tbody th, .data-table.text td { white-space: normal; }
.data-table.text th, .data-table.text td { text-align: left; vertical-align: top; }
.data-table.text th:first-child { width: 36%; }

.app-note { margin: 44px 0 0; padding: 28px; background: var(--navy); color: #d3dce6; border-radius: var(--radius); }
.article .app-note h2 { margin: 0 0 8px; color: var(--white); font-size: 1.45rem; }
.app-note .button { margin: 4px 12px 8px 0; }
.sources { margin-top: 40px; color: var(--muted); font-size: 0.95rem; }
.article .sources h2 { margin: 0 0 8px; font-size: 1.15rem; }

/* Calculator */
.calc { padding: 24px; margin: 20px 0 28px; background: var(--canvas); border: 1px solid var(--border); border-radius: var(--radius); }
.calc-fields { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: end; }
.calc label { display: block; font-weight: 600; color: var(--navy); font-size: 1rem; }
.calc input, .calc select {
  display: block; width: 100%; height: 46px; margin-top: 4px; padding: 8px 12px; font: inherit; font-weight: 400; color: var(--text);
  background: var(--white); border: 1px solid #8496a9; border-radius: 6px;
}
.calc input:focus-visible, .calc select:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.calc [hidden] { display: none; }
.calc-total { margin-top: 20px; padding: 18px 20px; background: var(--navy); color: #d3dce6; border-radius: var(--radius); line-height: 1.4; }
.calc-total output { display: block; color: var(--white); font-size: 2.1rem; font-weight: 700; }
.calc .data-table { margin: 0 0 20px; background: var(--white); }
.calc .data-table caption { background: var(--canvas); }
.calc .data-table input { width: 84px; height: 38px; margin: 0 0 0 auto; padding: 4px 8px; text-align: right; }

@media (max-width: 600px) {
  .answer, .calc-fields { grid-template-columns: 1fr; }
  .article .answer li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; }
  .calc { padding: 16px; }
  .data-table { font-size: 0.95rem; }
  .data-table th, .data-table td { padding: 9px 6px; }
  .app-note { padding: 22px; }
}
