/* ESGTrack — Free tools (update 113): the hub, the calculator, the factor finder, the checklist, the template page, the mapping
   explorer and the glossary. Loaded after site.css and content.css on free-tools/ pages only. */

/* ---------- shared ---------- */
/* parts that only work with the script are laid out from the first paint (html.js is set in <head>), so nothing shifts when it runs */
html:not(.js) .ft-gl-filter, html:not(.js) .ft-cl-actions { display: none; }
.ft-hero { padding: 48px 0 52px; }
.ft-hero .pg-hero-copy { max-width: 880px; }
.ft-hero h1 { max-width: 18em; }
.ft-facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--on-dark-2); font-size: 14.5px; }
.ft-facts li { display: inline-flex; align-items: center; gap: 7px; }
.ft-facts svg { color: var(--mint); flex-shrink: 0; }
.ft-hero .pg-actions { margin-top: 26px; }
.ft-tool { padding-top: 56px; }
.ft-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; margin-top: 36px; align-items: start; }
.ft-limits { border: 1px solid var(--line); border-inline-start: 4px solid #d39b2a; background: var(--warn-50); border-radius: 0 14px 14px 0; padding: 18px 22px; }
.ft-limits .pg-h3 { margin-bottom: 8px; }
.ft-limits ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 8px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.ft-limits a { color: var(--brand-600); }
.ft-refs { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-2); max-width: 80ch; }
.ft-refs a { color: var(--brand-600); overflow-wrap: anywhere; }
.ft-form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ft-fs { display: grid; gap: 10px; }
.ft-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fm-summary h3 { font-size: 16px; margin: 0 0 8px; color: var(--danger); }
.pg-section :focus-visible { outline-color: var(--brand); }
@media (max-width: 900px) { .ft-two { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
@media (max-width: 760px) { .ft-grid3 { grid-template-columns: minmax(0, 1fr); } }

/* the other tools, at the foot of each tool page */
.ft-others { padding-top: 56px; padding-bottom: 56px; }
.ft-others-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.ft-others-list a { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--white); transition: border-color .15s, box-shadow .15s; }
.ft-others-list a:hover { border-color: #b7dfc8; box-shadow: var(--shadow); }
.ft-others-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ft-others-list b { display: block; font-size: 15px; }
.ft-others-list small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }

/* ---------- the hub ---------- */
.ft-hub { padding-top: 56px; }
.ft-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.ft-card a { display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px; gap: 16px; align-items: start; padding: 24px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); background: var(--white); height: 100%; transition: border-color .15s, box-shadow .15s; }
.ft-card a:hover { border-color: #b7dfc8; box-shadow: var(--shadow); }
.ft-card-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.ft-card-tx { display: grid; gap: 6px; min-width: 0; }
.ft-card-tx b { font-size: 1.15rem; letter-spacing: -.012em; line-height: 1.25; }
.ft-card-tx span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.ft-card-go { font-size: 22px; color: var(--brand); transition: transform .15s; align-self: center; }
.ft-card a:hover .ft-card-go { transform: translateX(3px); }
[dir="rtl"] .ft-card-go { transform: scaleX(-1); }

/* ---------- the calculator ---------- */
.ft-calc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.ft-form .pg-h3 { margin-bottom: 4px; }
.ft-result { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; background: var(--white); box-shadow: var(--shadow); }
.ft-empty { margin: 0; color: var(--muted); font-size: 15px; }
.ft-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ft-total { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.ft-total small { color: var(--muted); font-size: 12.5px; }
.ft-total b { font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ft-total span { font-size: 12.5px; color: var(--muted); }
.ft-total.is-sum { background: var(--brand-50); border-color: #bfe0cd; }
.ft-total.is-sum b { color: var(--brand-600); }
.ft-lines { font-size: 14px; }
.ft-lines td { padding: 10px 12px; }
.ft-lines small, .ft-scope { display: block; color: var(--muted); font-size: 12.5px; }
.ft-lines b { font-variant-numeric: tabular-nums; }
.ft-share { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }
@media (max-width: 960px) { .ft-calc { grid-template-columns: minmax(0, 1fr); } .ft-result { position: static; } }
@media (max-width: 520px) { .ft-totals { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the factor finder ---------- */
.ft-search { margin-top: 26px; max-width: 760px; }
.ft-search-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; color: var(--on-dark-2); font-size: 14px; }
.ft-search-filters label { font-weight: 600; }
.ft-search-filters select { height: 40px; border-radius: 10px; border: 1px solid rgba(167,243,208,.3); background: #fff; color: var(--ink); font: 14.5px var(--font); padding: 0 10px; max-width: 100%; }
.ft-search-filters select:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.ft-factors { font-size: 13.5px; }
.ft-factors td { padding: 10px 12px; }
.ft-factors small, .ft-cat, .ft-note { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ft-factors b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ft-factors-wrap .pg-table { min-width: 960px; }
.ft-examples { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ft-examples a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; background: var(--white); }
.ft-examples a:hover { border-color: var(--brand); color: var(--brand-600); }
@media (max-width: 600px) { .ft-factors-wrap .pg-table { min-width: 0; } }

/* ---------- the checklist ---------- */
.ft-cl-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; }
.ft-cl-side { position: sticky; top: 92px; display: grid; gap: 12px; }
.ft-cl-count { margin: 0; font-size: 15px; color: var(--muted); }
.ft-cl-count b { font-size: 28px; color: var(--ink); letter-spacing: -.02em; margin-inline-end: 4px; }
.ft-cl-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ft-cl-bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .3s; }
.ft-cl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ft-cl-nav ol { margin: 6px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 14.5px; }
.ft-cl-nav a { color: var(--ink-2); text-decoration: none; }
.ft-cl-nav a:hover { color: var(--brand-600); text-decoration: underline; }
.ft-cl-nav span { color: var(--muted); font-size: 13px; }
.ft-cl-group { border: 1px solid var(--line); border-radius: 18px; padding: 0 0 8px; margin: 0 0 18px; background: var(--white); }
.ft-cl-group legend { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 720; letter-spacing: -.012em; padding: 0 8px; margin-inline-start: 16px; }
.ft-cl-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.ft-cl-items { list-style: none; margin: 8px 0 0; padding: 0; }
.ft-cl-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 24px; border-top: 1px solid var(--line); }
.ft-cl-item input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }
.ft-cl-item label { font-size: 15.5px; line-height: 1.5; color: var(--ink); cursor: pointer; }
.ft-cl-item:has(input:checked) label { color: var(--muted); text-decoration: line-through; text-decoration-color: #b7c0cb; }
.ft-cl-link { font-size: 13.5px; font-weight: 650; color: var(--brand-600); text-decoration: none; white-space: nowrap; margin-top: 3px; }
.ft-cl-link:hover { text-decoration: underline; }
@media (max-width: 900px) { .ft-cl-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } .ft-cl-side { position: static; } .ft-cl-nav { display: none; } }
@media (max-width: 600px) { .ft-cl-item { grid-template-columns: 24px minmax(0, 1fr); } .ft-cl-link { grid-column: 2; margin-top: 0; } }

/* ---------- the mapping explorer ---------- */
.ft-map-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 48px; align-items: start; }
.ft-map-side { position: sticky; top: 92px; display: grid; gap: 18px; max-height: calc(100vh - 110px); overflow-y: auto; padding-inline-end: 4px; }
.ft-map-form { gap: 12px; }
.ft-map-g { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 10px 0 4px; letter-spacing: 0; }
.ft-map-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ft-map-nav a { display: block; padding: 5px 8px; border-radius: 8px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.ft-map-nav a:hover { background: var(--soft); color: var(--brand-600); }
.ft-rel-legend { margin: 0; display: grid; gap: 6px; }
.ft-rel-legend dt { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ft-rel-legend dd { margin: 0; }
.ft-map-main .cm-count { margin-bottom: 18px; }
.ft-map-main .pg-cw + .pg-cw { margin-top: 18px; }
.ft-map-main caption small { font-weight: 500; color: var(--muted); }
@media (max-width: 960px) { .ft-map-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } .ft-map-side { position: static; max-height: none; overflow: visible; } .ft-map-nav { display: none; } }

/* ---------- the glossary ---------- */
.ft-gl-filter { margin-top: 24px; max-width: 560px; }
.ft-gl-filter label { display: block; color: var(--on-dark-2); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.ft-gl-filter input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(167,243,208,.3); background: #fff; color: var(--ink); font: 16px var(--font); }
.ft-gl-filter input:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.ft-gl-count { margin: 8px 0 0; font-size: 13.5px; color: var(--on-dark-2); min-height: 1.4em; }
.ft-letters ul { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ft-letters a, .ft-letters span { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 9px; font-weight: 650; font-size: 14.5px; text-decoration: none; }
.ft-letters a { color: var(--brand-600); background: var(--brand-50); }
.ft-letters a:hover { background: var(--brand-600); color: #fff; }
.ft-letters span { color: #b7c0cb; }
.ft-gl { max-width: 860px; }
.ft-gl-letter { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0 24px; padding: 18px 0 8px; border-top: 1px solid var(--line); }
.ft-gl-letter dl { margin: 0; }
.ft-gl-h { font-size: 2rem; font-weight: 780; color: var(--brand); margin: 0; line-height: 1; letter-spacing: -.03em; }
.ft-gl-term { padding: 0 0 18px; }
.ft-gl-term dt { font-weight: 720; font-size: 17px; letter-spacing: -.01em; margin-bottom: 4px; }
.ft-gl-term dd { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; max-width: 68ch; }
.ft-gl-anchor { color: #b7c0cb; text-decoration: none; font-weight: 500; margin-inline-start: 4px; }
.ft-gl-anchor:hover, .ft-gl-term:target .ft-gl-anchor { color: var(--brand); }
.ft-gl-term:target dt { color: var(--brand-600); }
.ft-gl-more { color: var(--brand-600); font-weight: 650; text-decoration: none; white-space: nowrap; }
.ft-gl-more:hover { text-decoration: underline; }
@media (max-width: 600px) { .ft-gl-letter { grid-template-columns: minmax(0, 1fr); } .ft-gl-h { margin-bottom: 10px; } }

/* ---------- print: the checklist and a result on paper ---------- */
@media print {
  .lp-header, .lp-footer, .pg-cta, .ft-others, .pg-faq, .ft-cl-actions, .ft-cl-nav, .ft-form-actions, .lp-skip { display: none !important; }
  .pg-hero, .ft-hero { background: none !important; color: #000 !important; padding: 0 0 12px; }
  .pg-hero h1, .pg-lead, .ft-facts, .pg-crumbs a, .pg-crumbs li { color: #000 !important; }
  .pg-hero::before, .pg-hero::after { display: none; }
  .ft-cl-layout, .ft-calc, .ft-map-layout { grid-template-columns: minmax(0, 1fr); }
  .ft-cl-side, .ft-result, .ft-map-side { position: static; box-shadow: none; }
  .ft-cl-group { break-inside: avoid; }
  .pg-section { padding: 16px 0; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) { .ft-cl-bar i, .ft-card-go, .ft-card a, .ft-others-list a { transition: none; } }
