/* Tools (/tools/): shared components, loaded on /tools/ pages only. Tool pages compose these; see pipeline/TOOLS-BRIEF.md. */
.narrow-wide { max-width: 900px; }
.tool-hero { background: linear-gradient(180deg, var(--color-bg) 0%, #fff 100%); padding: 40px 0 32px; }
.tool-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.tool-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; }
.tool-intro { font-size: 1.15rem; color: var(--color-muted); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2rem 0 .8rem; }
.tool-actions .btn { padding: 12px 20px; }
.tool-reviewed { font-size: .88rem; color: var(--color-muted); margin: 0; }
.tool-hero-photo { margin: 0; }
.tool-hero-photo img { border-radius: 12px; box-shadow: var(--shadow); width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tool-facts { list-style: none; margin: 32px 0 0; padding: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; background: var(--color-primary); border-radius: 10px; color: #fff; }
.tool-facts li { text-align: center; }
.tool-fact-num { display: block; font-family: var(--font-heading); font-weight: 800; font-size: 1.8rem; color: var(--color-accent); line-height: 1.1; }
.tool-fact-label { font-size: .9rem; }

/* Body sections: wrap each block in <section class="tool-section">; alternate with .tool-section.alt */
.tool-section { padding: 52px 0; }
.tool-section.alt { background: var(--color-bg); }
.tool-section h2 { margin-bottom: .4em; }
.tool-lede { font-size: 1.08rem; color: var(--color-muted); max-width: 760px; }

/* The interactive widget */
.tool-panel { background: #fff; border: 1px solid var(--color-border); border-top: 5px solid var(--color-water); border-radius: 12px; box-shadow: var(--shadow); padding: 28px; }
.tool-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 20px; align-items: end; }
.tool-form label, .tool-form legend { display: block; font-family: var(--font-heading); font-weight: 700; color: var(--color-primary); font-size: .95rem; margin-bottom: 6px; }
.tool-form input[type=text], .tool-form input[type=number], .tool-form select { width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }
.tool-form fieldset { border: 0; padding: 0; margin: 0; }
.tool-form .hint { display: block; font-size: .85rem; color: var(--color-muted); margin-top: 4px; font-weight: 400; }
.tool-form .full { grid-column: 1 / -1; }
.tool-result { margin-top: 24px; padding: 22px 24px; border-radius: 10px; background: #EAF5FC; border-left: 6px solid var(--color-water); }
.tool-result:empty { display: none; }
.tool-result h3 { margin-bottom: .3em; }
.tool-result .big { display: block; font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--color-primary); line-height: 1.15; }
.tool-result.warn { background: #FFF4E5; border-left-color: var(--color-accent); }
.tool-result.alert { background: #FDECEC; border-left-color: var(--color-cta); }

/* Stat tiles inside results or sections */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 16px 0 0; padding: 0; list-style: none; }
.stat-tiles li { background: #fff; border: 1px solid var(--color-border); border-radius: 10px; padding: 16px; text-align: center; }
.stat-tiles strong { display: block; font-family: var(--font-heading); font-size: 1.5rem; color: var(--color-primary); }
.stat-tiles span { font-size: .88rem; color: var(--color-muted); }

/* Photos through the page */
.photo-split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.photo-split.reverse > figure { order: 2; }
.photo-split figure, .tool-figure { margin: 0; }
.photo-split img, .tool-figure img { border-radius: 12px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; box-shadow: var(--shadow); }
.tool-figure { margin: 28px 0; }
.tool-page figcaption { font-size: .88rem; color: var(--color-muted); margin-top: .5rem; }
.photo-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; }
.photo-band img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Cards: steps, months, options */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.info-card { background: #fff; border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.info-card > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.info-card-body { padding: 20px 22px; flex: 1; }
.info-card h3 { margin-bottom: .35em; }
.info-card .tag { display: inline-block; font-family: var(--font-heading); font-weight: 700; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; background: var(--color-bg); color: var(--color-secondary); padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; }
.step-num { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; background: var(--color-cta); color: #fff; font-family: var(--font-heading); font-weight: 800; align-items: center; justify-content: center; margin-bottom: 10px; }
[data-month].is-current { outline: 3px solid var(--color-accent); box-shadow: 0 0 0 6px rgba(250,167,66,.18); }
[data-month].is-current .now-badge { display: inline-block; }
.now-badge { display: none; background: var(--color-accent); color: var(--color-primary); font-family: var(--font-heading); font-weight: 800; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }

/* Checklists (ticks saved in the browser by common.js) */
.checklist { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.checklist li { background: #fff; border: 1px solid var(--color-border); border-radius: 8px; padding: 12px 16px; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checklist input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--color-secondary); }
.checklist li.is-done { background: #F0F8F2; border-color: #B7DFC2; }
.checklist li.is-done label > span { text-decoration: line-through; color: var(--color-muted); }
.checklist-progress { position: relative; font-weight: 600; font-size: .92rem; color: var(--color-muted); padding-top: 14px; margin-bottom: 10px; }
.checklist-progress::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--color-border); }
.checklist-progress span { position: absolute; z-index: 1; top: 0; left: 0; height: 6px; border-radius: 3px; background: var(--color-water); transition: width .2s; }

/* Callouts and tables */
.callout { border-radius: 10px; padding: 18px 22px; background: var(--color-bg); border-left: 6px solid var(--color-secondary); margin: 20px 0; }
.callout.warn { background: #FFF4E5; border-left-color: var(--color-accent); }
.callout.danger { background: #FDECEC; border-left-color: var(--color-cta); }
.callout p:last-child { margin: 0; }
.tool-table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: 10px; margin: 18px 0; }
.tool-table { width: 100%; border-collapse: collapse; background: #fff; font-size: .96rem; }
.tool-table th, .tool-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.tool-table thead th { background: var(--color-primary); color: #fff; font-family: var(--font-heading); font-size: .85rem; letter-spacing: .04em; }
.tool-table tbody tr:nth-child(even) { background: var(--color-bg); }

/* Related links + sources */
.tool-related { background: var(--color-bg); padding: 48px 0; }
.tool-related-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tool-related-list a { display: block; background: #fff; border: 1px solid var(--color-border); border-radius: 10px; padding: 16px 18px; text-decoration: none; font-family: var(--font-heading); font-weight: 700; color: var(--color-primary); }
.tool-related-list a:hover { box-shadow: var(--shadow); }
.tool-related-list .eyebrow { display: block; font-size: .72rem; margin-bottom: 4px; }
.tool-sources { padding: 48px 0; font-size: .95rem; }
.tool-sources ul { padding-left: 1.2em; }
.tool-disclaimer { color: var(--color-muted); font-size: .88rem; }

@media (max-width: 1024px) {
  .card-grid, .card-grid.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .tool-hero-grid, .photo-split, .card-grid, .card-grid.two, .card-grid.four { grid-template-columns: 1fr; }
  .tool-hero-photo { order: -1; }
  .photo-split.reverse > figure { order: 0; }
  .photo-band { grid-template-columns: repeat(2, 1fr); }
  .tool-panel { padding: 20px; }
  .tool-actions .btn { flex: 1 1 auto; }
}
@media print {
  .utility-bar, .site-nav, .site-footer, .cta-strip, .tool-actions, .tool-related, .breadcrumbs, .mobile-call, .no-print, .tool-hero-photo, .photo-band, .skip-link { display: none !important; }
  body { font-size: 12pt; }
  .tool-section, .tool-hero { padding: 12px 0; background: none !important; }
  .tool-panel, .tool-facts, .info-card, .checklist li { box-shadow: none; break-inside: avoid; }
  .tool-facts { background: none; color: #000; border: 1px solid #999; }
  .tool-fact-num { color: #000; }
  .photo-split { grid-template-columns: 1fr; }
  .photo-split figure, .info-card > img, .tool-figure { display: none; }
  details { break-inside: avoid; }
  details:not([open]) > div { display: block; }
}
