/* Free tools (/tools/, page-tools.php). Uses the theme's tokens; phone-first; prints cleanly. */
.ee-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Hub */
.ee-tools-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--spacing-lg); }
.ee-tools-card { background: #fff; border: 1px solid var(--color-slate-200); border-radius: var(--radius-xl); padding: var(--spacing-lg); display: grid; gap: 8px; align-content: start; min-width: 0; }
.ee-tools-card h2 { font-size: 1.125rem; line-height: 1.35; margin: 0; }
.ee-tools-card h2 a { color: var(--color-slate-900); text-decoration: none; }
.ee-tools-card h2 a:hover, .ee-tools-card h2 a:focus-visible { color: var(--color-primary-700); text-decoration: underline; }
.ee-tools-card p { margin: 0; color: var(--color-slate-600); font-size: .9375rem; line-height: 1.55; }
.ee-tools-kind { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-primary-700); }
.ee-tools-after-hub { padding-top: 0; }

/* Tool block */
.ee-tool-section { padding-bottom: 0; }
.ee-tool { background: var(--color-slate-50); border: 1px solid var(--color-slate-200); border-radius: var(--radius-xl); padding: var(--spacing-lg); max-width: 1040px; margin: 0 auto; min-width: 0; }
.ee-tool-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: var(--spacing-md); }
.ee-tool-caption { margin: var(--spacing-md) 0 0; font-size: .875rem; color: var(--color-slate-600); }
.ee-tool-product { margin: var(--spacing-lg) 0; font-weight: 600; }
.ee-tool-product a { color: var(--color-primary-700); }
.ee-small { font-size: .875rem; color: var(--color-slate-600); }
.ee-checklist-progress { margin: 0; font-weight: 600; color: var(--color-slate-700); }

/* Printable sheet */
.ee-sheet { background: #fff; border: 1px solid var(--color-slate-200); border-radius: var(--radius-lg); padding: var(--spacing-lg); min-width: 0; }
.ee-sheet-title { font-size: 1.375rem; margin: 0 0 var(--spacing-md); color: var(--color-slate-900); }
.ee-sheet-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0 0 var(--spacing-md); }
.ee-sheet-head div { border-bottom: 1px solid var(--color-slate-300, #cbd5e1); padding-bottom: 18px; min-width: 0; }
.ee-sheet-head .ee-wide { grid-column: 1 / -1; }
.ee-sheet-head dt { font-size: .8125rem; font-weight: 600; color: var(--color-slate-600); }
.ee-sheet-head dd { margin: 0; }
.ee-sheet-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ee-sheet-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .875rem; }
.ee-sheet-table th { text-align: left; background: var(--color-slate-100, #f1f5f9); color: var(--color-slate-700); padding: 8px; border: 1px solid var(--color-slate-300, #cbd5e1); }
.ee-sheet-table td { height: 34px; border: 1px solid var(--color-slate-300, #cbd5e1); padding: 4px 8px; }
.ee-letter-outline { margin: 0; padding-left: 1.25em; display: grid; gap: 8px; color: var(--color-slate-700); }

/* Checklists */
.ee-checklist-items { list-style: none; padding: 0; margin: var(--spacing-md) 0 0; display: grid; gap: 8px; }
.ee-checklist-items label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 10px 12px; border: 1px solid var(--color-slate-200); border-radius: var(--radius-lg); background: #fff; line-height: 1.5; }
.ee-checklist-items input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--color-primary-600); }
.ee-checklist-items input:checked + span { color: var(--color-slate-500); text-decoration: line-through; text-decoration-color: var(--color-slate-400, #94a3b8); }

/* Calculators */
.ee-calc { background: #fff; border: 1px solid var(--color-slate-200); border-radius: var(--radius-lg); padding: var(--spacing-lg); }
.ee-calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.ee-calc-grid-1 { grid-template-columns: minmax(0, 320px); margin-top: var(--spacing-md); }
.ee-calc-field { display: grid; gap: 6px; min-width: 0; }
.ee-calc-field label { font-weight: 600; font-size: .9375rem; color: var(--color-slate-700); }
.ee-calc-input { display: flex; align-items: center; border: 1px solid var(--color-slate-300, #cbd5e1); border-radius: var(--radius-md, 8px); background: #fff; min-height: 44px; }
.ee-calc-input:focus-within { outline: 2px solid var(--color-primary-600); outline-offset: 1px; }
.ee-calc-input input, .ee-calc-input select { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; font: inherit; font-size: 1rem; color: var(--color-slate-900); outline: none; }
.ee-calc-suffix { padding: 0 12px; color: var(--color-slate-500); font-size: .9375rem; }
.ee-calc-result { margin-top: var(--spacing-lg); padding: var(--spacing-md) var(--spacing-lg); background: var(--color-primary-50); border: 1px solid var(--color-primary-100); border-radius: var(--radius-lg); }
.ee-calc-total { margin: 0 0 6px; font-size: 1.125rem; color: var(--color-slate-900); }
.ee-calc-total strong { font-size: 1.5rem; color: var(--color-primary-700); }
.ee-calc-result .ee-small { margin: 0; }
.ee-legs { display: grid; gap: 12px; margin-bottom: var(--spacing-md); }
.ee-leg { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; gap: 10px 14px; align-items: end; border: 1px solid var(--color-slate-200); border-radius: var(--radius-lg); padding: 12px; margin: 0; }
.ee-check { display: flex; gap: 8px; align-items: center; min-height: 44px; font-size: .9375rem; }
.ee-check input { width: 18px; height: 18px; accent-color: var(--color-primary-600); }
.ee-link-btn { background: none; border: 0; color: var(--color-primary-700); text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 4px; font: inherit; }

@media (max-width: 1024px) { .ee-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) {
    .ee-tools-grid, .ee-calc-grid, .ee-sheet-head { grid-template-columns: 1fr; }
    .ee-tool, .ee-sheet, .ee-calc { padding: var(--spacing-md); }
    .ee-leg { grid-template-columns: 1fr 1fr; }
    .ee-leg .ee-calc-field:first-of-type { grid-column: 1 / -1; }
    /* No sideways scroll: the blank table fits the phone (printing is unchanged) */
    .ee-sheet-table-wrap { overflow: visible; }
    .ee-sheet-table { min-width: 0; table-layout: fixed; font-size: .75rem; }
    .ee-sheet-table th { padding: 6px 4px; overflow-wrap: anywhere; vertical-align: bottom; }
    .ee-sheet-table td { padding: 2px 4px; }
}

/* Print: the browser's Print prints the page without navigation; the page's Print button prints only the sheet. */
@media print {
    .site-header, .site-footer, .mobile-nav, .ee-mobile-cta, .cta-section, .ee-related, .hero-cta, .ee-tool-actions, .ee-tool-caption, .ee-skip-link { display: none !important; }
    .ee-tool { border: 0; background: #fff; padding: 0; }
    .ee-sheet, .ee-calc { border: 0; padding: 0; }
    .ee-sheet-table { min-width: 0; font-size: 10pt; }
    .ee-sheet-table td { height: 28px; }
    .ee-checklist-items label { border: 0; padding: 2px 0; }
    .ee-prose-wrap { display: block; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; word-break: break-all; }
    html.ee-printing-sheet main > *:not(.ee-tool-section) { display: none !important; }
    html.ee-printing-sheet .ee-tool-section { padding: 0; }
}
