/* FinanceToolkit AI — Calculator Engine styles */
.ftk-page-wrap { max-width: 860px; margin: 0 auto; padding: 0 4px; }
.ftk-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 28px; box-shadow: 0 1px 2px rgba(15,23,42,.04); font-family: Inter, system-ui, sans-serif; }
.ftk-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 22px; }
.ftk-field label { display: block; font-size: 14px; font-weight: 600; color: #0F172A; margin-bottom: 6px; }
.ftk-input-wrap { display: flex; align-items: center; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.ftk-input-wrap:focus-within { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.ftk-input-wrap input { flex: 1; min-width: 0; border: 0; outline: none; padding: 11px 12px; font: inherit; font-size: 16px; color: #0F172A; background: transparent; -moz-appearance: textfield; }
.ftk-input-wrap input::-webkit-outer-spin-button, .ftk-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ftk-affix { padding: 0 12px; font-size: 14px; color: #64748B; background: #F8FAFC; align-self: stretch; display: flex; align-items: center; border-radius: 9px 0 0 9px; border-right: 1px solid #E2E8F0; }
.ftk-input-wrap .ftk-affix:last-child { border-right: 0; border-left: 1px solid #E2E8F0; border-radius: 0 9px 9px 0; }
.ftk-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.ftk-result { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.ftk-result-hero { background: #EFF6FF; border-color: #BFDBFE; }
.ftk-result-label { font-size: 13px; font-weight: 500; color: #64748B; }
.ftk-result-value { font-size: 22px; font-weight: 700; color: #0F172A; letter-spacing: -0.01em; }
.ftk-result-hero .ftk-result-value { font-size: 30px; color: #2563EB; }
.ftk-error { color: #B91C1C; font-size: 14px; margin: 0 0 16px; }
.ftk-chart-wrap { margin-bottom: 18px; }
.ftk-chart { width: 100%; display: block; }
.ftk-legend { font-size: 13px; color: #475569; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ftk-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 10px; }
.ftk-dot:first-child { margin-left: 0; }
.ftk-dot-blue { background: #2563EB; } .ftk-dot-green { background: #059669; }
.ftk-schedule summary { cursor: pointer; font-weight: 600; font-size: 15px; color: #2563EB; padding: 10px 0; list-style: none; }
.ftk-schedule summary::before { content: '\25B8  '; }
.ftk-schedule[open] summary::before { content: '\25BE  '; }
.ftk-table-wrap { overflow-x: auto; }
.ftk-schedule table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ftk-schedule th, .ftk-schedule td { text-align: right; padding: 9px 12px; border-bottom: 1px solid #E2E8F0; white-space: nowrap; }
.ftk-schedule th:first-child, .ftk-schedule td:first-child { text-align: left; }
.ftk-schedule th { background: #F8FAFC; color: #0F172A; font-weight: 600; position: sticky; top: 0; }
.ftk-actions { margin-top: 18px; display: flex; gap: 12px; }
.ftk-print { background: #fff; color: #0F172A; border: 1px solid #CBD5E1; border-radius: 10px; padding: 10px 18px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
.ftk-print:hover { background: #F8FAFC; }
.ftk-print:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
/* Content sections below calculator */
.ftk-content h2 { font-size: 28px; margin-top: 44px; }
.ftk-formula { background: #0F172A; color: #E2E8F0; border-radius: 12px; padding: 18px 22px; font-family: 'SFMono-Regular', Consolas, monospace; font-size: 15px; overflow-x: auto; }
.ftk-faq details { border: 1px solid #E2E8F0; border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; background: #fff; }
.ftk-faq summary { cursor: pointer; font-weight: 600; color: #0F172A; padding: 12px 0; list-style: none; }
.ftk-faq summary::after { content: '+'; float: right; color: #2563EB; font-size: 18px; }
.ftk-faq details[open] summary::after { content: '\2212'; }
.ftk-faq p { color: #475569; margin: 0 0 14px; }
.ftk-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 0; list-style: none; }
.ftk-related a { display: block; background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 16px 18px; font-weight: 600; color: #0F172A; text-decoration: none; transition: border-color .15s, transform .15s; }
.ftk-related a:hover { border-color: #2563EB; color: #2563EB; }
.ftk-breadcrumbs { font-size: 13px; color: #64748B; margin-bottom: 14px; }
.ftk-breadcrumbs a { color: #64748B; text-decoration: none; }
.ftk-breadcrumbs a:hover { color: #2563EB; }
/* Calculator list grid (hub pages) */
.ftk-calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; padding: 0; list-style: none; margin: 0; }
.ftk-calc-grid a { display: block; background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 22px; text-decoration: none; transition: border-color .15s, box-shadow .15s; height: 100%; }
.ftk-calc-grid a:hover { border-color: #2563EB; box-shadow: 0 4px 14px rgba(37,99,235,.08); }
.ftk-calc-grid .ftk-calc-title { display: block; font-weight: 700; font-size: 17px; color: #0F172A; margin-bottom: 6px; }
.ftk-calc-grid .ftk-calc-desc { display: block; font-size: 14px; color: #64748B; line-height: 1.55; }
.ftk-calc-grid .ftk-calc-cat { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 600; color: #2563EB; background: #EFF6FF; border-radius: 20px; padding: 3px 10px; }
/* Glossary A-Z */
.ftk-gloss-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.ftk-gloss-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; font-weight: 600; font-size: 15px; color: #0F172A; text-decoration: none; transition: border-color .15s, color .15s; }
.ftk-gloss-nav a:hover { border-color: #2563EB; color: #2563EB; }
.ftk-gloss-group { margin-bottom: 36px; }
.ftk-gloss-group h2 { font-size: 24px; color: #2563EB; border-bottom: 1px solid #E2E8F0; padding-bottom: 8px; margin-bottom: 18px; scroll-margin-top: 90px; }
/* Template download card */
.ftk-download-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.ftk-dl-meta { display: block; font-size: 13px; color: #64748B; margin-top: 4px; }
.ftk-dl-btn { display: inline-block; background: #059669; color: #fff !important; text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 24px; border-radius: 10px; transition: background .15s; }
.ftk-dl-btn:hover { background: #047857; }
/* Forms library cards (screenshot-style: preview image + title + View form) */
.ftk-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; padding: 0; list-style: none; margin: 0; }
.ftk-form-grid a { display: flex; flex-direction: column; background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; overflow: hidden; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; height: 100%; }
.ftk-form-grid a:hover { border-color: #2563EB; box-shadow: 0 8px 20px rgba(37,99,235,.10); transform: translateY(-2px); }
.ftk-form-thumb { display: block; background: #fff; padding: 14px 14px 0; height: 250px; overflow: hidden; }
.ftk-form-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; border: 1px solid #EEF2F7; }
.ftk-form-body { display: block; background: #F8FAFC; padding: 14px 16px 16px; border-top: 1px solid #EEF2F7; }
.ftk-form-body .ftk-calc-title { margin-bottom: 4px; }
.ftk-form-view { display: inline-block; font-size: 14px; font-weight: 600; color: #2563EB; border-bottom: 2px solid #2563EB; padding-bottom: 1px; }
.ftk-form-preview { max-width: 420px; width: 100%; border: 1px solid #E2E8F0; border-radius: 12px; margin: 18px 0; display: block; }
.ftk-dl-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.ftk-dl-source { font-size: 13px; color: #64748B; text-decoration: none; }
.ftk-dl-source:hover { color: #2563EB; }
@media (max-width: 600px) { .ftk-form-thumb { height: 200px; } .ftk-dl-actions { align-items: flex-start; } }
/* Forms category sidebar (screenshot-style) */
.ftk-cat-sidebar { position: sticky; top: 84px; background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 18px 14px; font-family: Inter, system-ui, sans-serif; }
.ftk-cat-title { font-size: 19px; font-weight: 700; color: #0F172A; padding: 4px 10px 12px; }
.ftk-cat-all { display: flex; justify-content: space-between; align-items: center; background: #EFF6FF; color: #2563EB; font-weight: 600; font-size: 14.5px; padding: 10px 12px; border-radius: 10px; text-decoration: none; margin-bottom: 4px; }
.ftk-cat-item summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: #334155; }
.ftk-cat-item summary::-webkit-details-marker { display: none; }
.ftk-cat-item summary::after { content: '\25BE'; font-size: 11px; color: #94A3B8; margin-left: auto; transition: transform .15s; }
.ftk-cat-item summary span:first-child { flex: 0 1 auto; }
.ftk-cat-item[open] summary::after { transform: rotate(180deg); }
.ftk-cat-item summary:hover { background: #F8FAFC; color: #0F172A; }
.ftk-cat-item[open] summary { color: #0F172A; font-weight: 600; }
.ftk-cat-count { font-size: 12px; font-weight: 600; color: #94A3B8; background: #F1F5F9; border-radius: 20px; padding: 1px 8px; }
.ftk-cat-all .ftk-cat-count { background: #DBEAFE; color: #2563EB; }
.ftk-cat-item ul { list-style: none; margin: 0 0 6px; padding: 2px 0 4px 14px; }
.ftk-cat-item ul a { display: block; font-size: 13.5px; color: #64748B; text-decoration: none; padding: 5px 10px; border-radius: 8px; }
.ftk-cat-item ul a:hover { color: #2563EB; background: #F8FAFC; }
.ftk-cat-viewall { font-weight: 600; color: #2563EB !important; }
.ftk-anchor, [id^="cat-"], #all-forms { scroll-margin-top: 90px; }
@media (max-width: 1024px) { .ftk-cat-sidebar { position: static; } }
/* Homepage topic/feature card grids (tableau layout) */
.ftk-topic-grid { display: grid; gap: 20px; width: 100%; text-align: left; }
.ftk-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ftk-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ftk-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1024px) { .ftk-grid-4 { grid-template-columns: repeat(2, 1fr); } .ftk-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ftk-grid-4, .ftk-grid-3, .ftk-grid-2 { grid-template-columns: 1fr; } }
.ftk-topic-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 24px 22px; text-decoration: none; font-family: Inter, system-ui, sans-serif; transition: border-color .15s, box-shadow .15s, transform .15s; height: 100%; }
a.ftk-topic-card:hover { border-color: #2563EB; box-shadow: 0 8px 20px rgba(37,99,235,.10); transform: translateY(-2px); }
.ftk-topic-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: #EFF6FF; color: #2563EB; border-radius: 10px; font-size: 18px; margin-bottom: 4px; }
.ftk-topic-icon-green { background: #ECFDF5; color: #059669; }
.ftk-topic-title { font-size: 17px; font-weight: 700; color: #0F172A; }
a.ftk-topic-card:hover .ftk-topic-title { color: #2563EB; }
.ftk-topic-desc { font-size: 14px; line-height: 1.55; color: #64748B; }
/* AI assistant panel (appears on calculator pages when the AI is configured) */
.ftk-ai-panel { max-width: 860px; margin: 20px auto; padding: 0 4px; }
.ftk-ai-btn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%); color: #fff; border: 0; border-radius: 10px; padding: 12px 22px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: opacity .15s, transform .15s; font-family: Inter, sans-serif; }
.ftk-ai-btn:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
.ftk-ai-btn:disabled { opacity: 0.6; cursor: wait; }
.ftk-ai-out { margin-top: 14px; padding: 20px 22px; background: #FAF5FF; border: 1px solid #E9D5FF; border-radius: 12px; font-family: Inter, sans-serif; }
.ftk-ai-out p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: #334155; }
.ftk-ai-out p:last-child { margin-bottom: 0; }
@media print {
  header, footer, nav, .ftk-actions, .site-header, .wp-site-blocks > header, .wp-site-blocks > footer { display: none !important; }
  .ftk-card { border: 1px solid #ccc; box-shadow: none; }
}
@media (max-width: 600px) { .ftk-card { padding: 18px; } .ftk-result-hero .ftk-result-value { font-size: 26px; } .ftk-content h2 { font-size: 23px; margin-top: 34px; } .ftk-formula { font-size: 13.5px; padding: 14px 16px; } .ftk-results-grid { grid-template-columns: 1fr 1fr; } .ftk-form { grid-template-columns: 1fr; gap: 14px; } }
