/* =========================
   CALCULATORS: SHARED LAYOUT
========================= */
.calc-breadcrumb {
    font-size: 0.82rem;
    color: #9ca3af;
    margin: 20px 0;
}

.calc-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.calc-breadcrumb span {
    margin: 0 6px;
}

.calc-breadcrumb .current {
    color: #111;
    margin: 0;
}

.calc-hero {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 32px;
    color: #fff;
    margin-bottom: 28px;
}

.calc-hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #34d399;
    margin-bottom: 10px;
}

.calc-hero h1 {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.calc-hero p {
    color: #cbd5e1;
    font-size: 0.95rem;
    max-width: 640px;
}

.calc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 32px;
}

.calc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
}

.calc-card h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.calc-field {
    margin-bottom: 16px;
}

.calc-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.calc-field .calc-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

.calc-field input[type="text"],
.calc-field input[type="number"],
.calc-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
}

.calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.calc-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.calc-chip {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.calc-chip.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.calc-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 6px;
}

.calc-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.calc-radio-group input {
    width: auto;
}

.calc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}

.calc-tab {
    padding: 10px 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #9ca3af;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-right: 16px;
}

.calc-tab.active {
    color: #0f172a;
    border-bottom-color: #0f172a;
}

.calc-tabpanel {
    display: none;
}

.calc-tabpanel.active {
    display: block;
}

/* Result card */
.calc-result-card {
    background: linear-gradient(160deg, #0f172a 0%, #111827 100%);
    border-radius: 12px;
    padding: 22px;
    color: #fff;
}

.calc-result-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 8px;
}

.calc-result-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.calc-result-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calc-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
}

.calc-result-row .label {
    color: #9ca3af;
}

.calc-result-row .value {
    font-weight: 700;
}

.calc-result-note {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 16px;
    line-height: 1.5;
}

.calc-dir-up { color: #34d399; }
.calc-dir-down { color: #f87171; }
.calc-dir-same { color: #9ca3af; }

/* How it works + table sections */
.calc-section {
    margin-bottom: 32px;
}

.calc-section h2 {
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.calc-explain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.calc-explain-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px;
}

.calc-explain-item h3 {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.calc-explain-item p {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.55;
}

.calc-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #1f2937;
}

.calc-content h3 {
    font-size: 1.02rem;
    margin-top: 20px;
    margin-bottom: 8px;
}

.calc-content h3:first-child {
    margin-top: 0;
}

.calc-content p {
    margin-bottom: 10px;
}

.calc-content ul,
.calc-content ol {
    margin: 0 0 10px 1.2em;
}

.calc-table-wrap {
    overflow-x: auto;
}

.calc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.calc-table th,
.calc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.calc-table th {
    background: #f4f6fb;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.calc-tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* FAQ accordion (shared with blog) */
.calc-faqs .calc-faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.calc-faqs .calc-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: #111;
}

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

.calc-faqs .calc-faq-chevron {
    transition: transform 0.15s ease;
    color: #9ca3af;
}

.calc-faqs .calc-faq-item[open] .calc-faq-chevron {
    transform: rotate(180deg);
}

.calc-faqs .calc-faq-item p {
    font-size: 0.9rem;
    color: #4b5563;
    margin: 10px 0 0;
}

/* Latest blogs / news (shared with calc_more.html) */
.calc-more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.calc-more-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.calc-more-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
}

.calc-more-card span {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.35;
}

.calc-more-card:hover span {
    color: #2563eb;
}

/* Calculators index page */
.calc-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.calc-index-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-index-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.calc-index-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #047857;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-index-card h3 {
    font-size: 1.02rem;
    color: #111;
}

.calc-index-card p {
    font-size: 0.85rem;
    color: #6b7280;
}

@media (max-width: 880px) {
    .calc-layout,
    .calc-row,
    .calc-tables-grid {
        grid-template-columns: 1fr;
    }
}
