/*
 * P-SEO.5 — Free finance calculators (tools index + per-tool layout).
 * Served from /public so it works without a Vite rebuild.
 */

/* ── Tools index grid ────────────────────────────────────────────────── */
.mt-tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 16px;
}

@media (min-width: 640px)  { .mt-tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .mt-tools-grid { grid-template-columns: repeat(3, 1fr); } }

.mt-tool-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mt-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.mt-tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 16px;
}

.mt-tool-card-blue   .mt-tool-card-icon, .mt-tool-card-is-blue   .mt-tool-card-icon { background: #0071e3; }
.mt-tool-card-green  .mt-tool-card-icon, .mt-tool-card-is-green  .mt-tool-card-icon { background: #34C759; }
.mt-tool-card-pink   .mt-tool-card-icon, .mt-tool-card-is-pink   .mt-tool-card-icon { background: #FF2D55; }
.mt-tool-card-purple .mt-tool-card-icon, .mt-tool-card-is-purple .mt-tool-card-icon { background: #5E5CE6; }
.mt-tool-card-orange .mt-tool-card-icon, .mt-tool-card-is-orange .mt-tool-card-icon { background: #FF9F0A; }
.mt-tool-card-teal   .mt-tool-card-icon, .mt-tool-card-is-teal   .mt-tool-card-icon { background: #1ABC9C; }

.mt-tool-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.mt-tool-card-blurb {
    color: #6e6e73;
    margin: 0 0 20px;
    line-height: 1.55;
    flex-grow: 1;
}

.mt-tool-card-cta {
    color: #0071e3;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Calculator layout (per-tool) ───────────────────────────────────── */
.mt-calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 900px) {
    .mt-calc-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

.mt-calc-inputs,
.mt-calc-output {
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.mt-calc-h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 16px;
}

.mt-calc-h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: #6e6e73;
}

.mt-calc-row {
    margin-bottom: 20px;
}

.mt-calc-row label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.mt-calc-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    background: #fafafa;
    margin-bottom: 10px;
}

.mt-calc-input-wrap span {
    color: #6e6e73;
    font-weight: 600;
}

.mt-calc-input-wrap input {
    flex: 1;
    border: 0;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    color: #1d1d1f;
    min-width: 0;
}

.mt-calc-row input[type="range"] {
    width: 100%;
    margin: 0;
}

.mt-calc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
}

.mt-calc-result-row:last-of-type { border-bottom: 0; }

.mt-calc-result-row.is-primary {
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.08) 0%, rgba(94, 92, 230, 0.06) 100%);
    padding: 18px 16px;
    border-radius: 12px;
    border-bottom: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.mt-calc-result-row.is-primary strong {
    color: #0071e3;
    font-size: 1.4rem;
}

.mt-calc-result-row strong {
    font-weight: 700;
    color: #1d1d1f;
    font-family: 'JetBrains Mono', monospace;
}

.mt-calc-disclaimer {
    margin: 20px 0 0;
    font-size: 0.8rem;
    color: #6e6e73;
    line-height: 1.5;
}

/* ── Budget calc — stacked bar + dot legend ─────────────────────────── */
.mt-budget-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.mt-budget-bar {
    display: flex;
    height: 16px;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0 12px;
    background: #f5f5f7;
}

.mt-budget-bar span {
    height: 100%;
    transition: width 0.2s ease;
}

/* ── FAQ accordion (also used on tool pages) ────────────────────────── */
.mkt-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mkt-faq-item {
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 12px 16px;
}

.mkt-faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: #1d1d1f;
    padding: 6px 0;
    list-style: none;
}

.mkt-faq-item summary::-webkit-details-marker { display: none; }

.mkt-faq-item summary::before {
    content: '+';
    display: inline-block;
    margin-right: 10px;
    color: #0071e3;
    font-weight: 700;
    width: 14px;
    text-align: center;
}

.mkt-faq-item[open] summary::before { content: '−'; }

.mkt-faq-item[open] summary { color: #0071e3; }

.mkt-faq-item p {
    margin: 8px 0 6px;
    color: #4a4a4f;
    line-height: 1.6;
}
