/* Shared rich-content blocks (sections, formula box, tables, feature grid, FAQ accordion)
   Used on index.html and guide.html */

.guide-section, .content-section { background: #fff; border: 1px solid #eee; border-radius: 14px; padding: 30px 32px; margin-bottom: 26px; box-shadow: 0 2px 10px rgba(15, 23, 42, .06); scroll-margin-top: 20px; transition: box-shadow .25s ease; }
.guide-section:hover, .content-section:hover { box-shadow: 0 10px 28px rgba(245, 158, 11, .12); }
.guide-section h2, .content-section h2 { font-size: 1.4em; font-weight: 700; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; }
.guide-section h2 .icon-badge, .content-section h2 .icon-badge { width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px; background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8em; }
.guide-section p, .content-section p, .guide-section li, .content-section li { color: #3d4148; line-height: 1.75; }
.guide-section ul, .content-section ul, .guide-section ol, .content-section ol { padding-left: 20px; }
.guide-section ul li, .content-section ul li, .guide-section ol li, .content-section ol li { margin-bottom: 8px; }

/* ===== Formula / code box ===== */
.formula-box { background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; border-radius: 12px; padding: 22px 24px; margin: 18px 0; text-align: center; }
.formula-box .formula { font-family: "Courier New", monospace; font-size: 1.25em; font-weight: 700; color: #0f172a; letter-spacing: .02em; }
.formula-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; text-align: left; }
.formula-legend div { background: #fff; border-radius: 8px; padding: 10px 14px; font-size: .88em; border: 1px solid #f5e6bf; }
.formula-legend strong { color: var(--json-accent, #f59e0b); }

/* ===== Data table (common errors, comparisons, etc.) ===== */
.loan-table-wrap { overflow-x: auto; margin: 16px 0; }
table.loan-table { width: 100%; border-collapse: collapse; font-size: .92em; }
table.loan-table th { background: #0f172a; color: #fff; text-align: left; padding: 12px 16px; font-weight: 600; }
table.loan-table th:first-child { border-top-left-radius: 8px; }
table.loan-table th:last-child { border-top-right-radius: 8px; }
table.loan-table td { padding: 12px 16px; border-bottom: 1px solid #eee; }
table.loan-table tr:nth-child(even) td { background: #f7f8fa; }
table.loan-table tr:hover td { background: #fef3c7; }
table.loan-table td i { color: var(--json-accent, #f59e0b); }

/* ===== Benefit / feature grid ===== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 8px; }
.feature-card { background: #f7f8fa; border-radius: 10px; padding: 18px; border: 1px solid #eee; }
.feature-card i { color: var(--json-accent, #f59e0b); font-size: 1.3em; margin-bottom: 8px; display: block; }
.feature-card strong { display: block; margin-bottom: 4px; color: #23272f; }
.feature-card span { font-size: .88em; color: #6b7280; }

/* ===== FAQ accordion ===== */
.faq-acc-item { border: 1px solid #eee; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.faq-acc-q { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; cursor: pointer; font-weight: 600; color: #23272f; background: #fff; transition: background .2s ease; }
.faq-acc-q:hover { background: #f7f8fa; }
.faq-acc-q i { color: var(--json-accent, #f59e0b); transition: transform .25s ease; }
.faq-acc-item.open .faq-acc-q i { transform: rotate(180deg); }
.faq-acc-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; background: #f7f8fa; }
.faq-acc-item.open .faq-acc-a { max-height: 300px; }
.faq-acc-a p { padding: 4px 18px 16px; margin: 0; color: #3d4148; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .guide-section, .content-section { padding: 24px 22px; }
    .formula-box { padding: 18px 16px; }
    .formula-box .formula { font-size: 1.05em; }
}

@media (max-width: 600px) {
    .guide-section, .content-section { padding: 20px 16px; border-radius: 12px; }
    .guide-section h2, .content-section h2 { font-size: 1.15em; gap: 10px; }
    .guide-section h2 .icon-badge, .content-section h2 .icon-badge { width: 36px; height: 36px; }
    .formula-box .formula { font-size: .92em; }
    .formula-legend { grid-template-columns: 1fr; }
    table.loan-table { font-size: .82em; }
    table.loan-table th, table.loan-table td { padding: 9px 10px; }
    .faq-acc-q { padding: 13px 14px; font-size: .95em; }
}
