* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background-color: #f7f7f7;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo h1 {
    font-size: 28px;
    margin: 0;
}

.logo a {
    color: white;
    text-decoration: none;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 500px;
}

#searchInput {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-name {
    font-weight: 600;
    color: #2c3e50;
    display: block;
}

.search-result-desc {
    font-size: 14px;
    color: #666;
    display: block;
    margin-top: 2px;
}

.main-nav {
    background-color: #34495e;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background-color: #2c3e50;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    list-style: none;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa;
}

.menu-toggle {
  display: none;
  font-size: 26px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

/* When viewport <= 768px */
@media (max-width: 768px) {
  .nav-menu {
    display: none; /* hide the menu */
    flex-direction: column;
    width: 100%;
    background-color: #34495e;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu > li > a {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .menu-toggle {
    display: block;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
  }

  /* Dropdowns behave stacked on mobile */
  .dropdown-menu {
    position: static;
    background-color: #2c3e50;
    box-shadow: none;
    display: none;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }

  .nav-menu.active {
    display: flex;
  }
}

.main-content {
    min-height: calc(100vh - 400px);
    padding: 40px 0;
}

.hero-calculator-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 0;
}

.hero-section h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 20px;
    opacity: 0.95;
}

.featured-calculators h2,
.categories-section h2,
.all-calculators-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #2c3e50;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.calculator-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.calculator-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.calculator-card h3 {
    font-size: 18px;
    color: #2c3e50;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.category-card p {
    color: #666;
}

.calculators-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.calculator-category {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calculator-category h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.calculator-category ul {
    list-style: none;
}

.calculator-category ul li {
    margin-bottom: 10px;
}

.calculator-category ul li a {
    color: #2c3e50;
    text-decoration: none;
    display: block;
    padding: 8px 0;
    transition: color 0.2s;
}

.calculator-category ul li a:hover {
    color: #667eea;
}

.calc-desc {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 3px;
}

.calculator-page {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.calculator-page h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.calculator-page .description {
    color: #666;
    margin-bottom: 30px;
    font-size: 18px;
}

.calculator-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.result-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.result-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.result-item {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
}

.result-item strong {
    color: #667eea;
    display: inline-block;
    min-width: 180px;
}

.site-footer {
    background-color: #2c3e50;
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

.simple-calculator {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 0;
    width: 100%;
}

.simple-calculator h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
}

.calc-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.calc-display {
    width: 100%;
    padding: 20px;
    font-size: 28px;
    text-align: right;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-buttons button {
    padding: 20px;
    font-size: 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.btn-number {
    background: white;
    color: #2c3e50;
    border: 2px solid #ddd;
}

.btn-number:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-operator {
    background: #3498db;
    color: white;
}

.btn-operator:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-equals {
    background: #27ae60;
    color: white;
}

.btn-equals:hover {
    background: #229954;
    transform: translateY(-2px);
}

.calc-buttons button:active {
    transform: translateY(0);
}

.matrix-input {
    margin-bottom: 20px;
}

.matrix-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.matrix-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.matrix-row input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.matrix-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-family: 'Courier New', monospace;
}

.matrix-display div {
    margin: 5px 0;
}

.fraction-group {
    margin-bottom: 20px;
}

.fraction-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.fraction-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fraction-input input {
    width: 100px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.fraction-input span {
    font-size: 24px;
    font-weight: bold;
}

.info-section {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.info-section h2, .info-section h3 {
    color: #1976d2;
    margin-top: 20px;
}

.info-section h2:first-child {
    margin-top: 0;
}

.info-section ul {
    margin-left: 20px;
}

.info-section li {
    margin-bottom: 8px;
}

.result-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 20px;
}

.result-item.highlight strong {
    color: white;
}

.result-item.error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #d32f2f;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .search-bar {
        max-width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background-color: #2c3e50;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .hero-calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hero-section {
        padding: 40px 20px;
    }
    
    .hero-section h1 {
        font-size: 32px;
    }
    
    .calculator-grid,
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .calculator-page {
        padding: 20px;
    }
    
    .simple-calculator {
        padding: 20px;
    }
    
    .calc-buttons button {
        padding: 15px;
        font-size: 18px;
    }
    
    .hero-search {
    margin: 20px auto;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-search input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: 0.3s;
}

.hero-search input:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 6px rgba(26, 188, 156, 0.3);
}

}

/* ============================================================
   CLUSTER CALCULATOR PAGES
   Shared styles for loan-calculators/, real-estate/, business/
   ============================================================ */

/* ── Hero ── */
.calc-hero {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 3px solid #1abc9c;
    margin-bottom: 2rem;
}
.calc-hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: #1a2a3a;
    margin-bottom: 0.6rem;
    line-height: 1.25;
}
.calc-lead {
    font-size: 1.1rem;
    color: #4a5568;
    max-width: 780px;
    line-height: 1.7;
}

/* ── Calculator Card ── */
.calculator-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2rem 2.5rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 600px) {
    .calculator-card { padding: 1.4rem 1.2rem; }
}

/* ── Form ── */
.calculator-form {
    display: grid;
    gap: 1.25rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.form-group label {
    font-weight: 600;
    color: #1a2a3a;
    font-size: 0.95rem;
}
.form-group input {
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 3px rgba(26,188,156,0.15);
}
.form-group small {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ── Errors ── */
.calc-errors {
    background: #fff5f5;
    border: 1.5px solid #fc8181;
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.2rem;
    color: #c53030;
    font-size: 0.9rem;
}
.calc-errors ul { margin-left: 1.2rem; }

/* ── Primary Button ── */
.btn-primary {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    width: fit-content;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26,188,156,0.35);
}
.btn-primary:active { transform: translateY(0); }

/* ── Results Grid ── */
.result-section {
    margin-top: 2rem;
    border-top: 2px solid #e5e7eb;
    padding-top: 1.5rem;
}
.result-section h2 {
    font-size: 1.25rem;
    color: #1a2a3a;
    margin-bottom: 1rem;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}
.result-card {
    background: #f8fafc;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.result-card.highlight {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    border-color: transparent;
}
.result-card.highlight .result-label,
.result-card.highlight .result-value { color: #fff; }
.result-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}
.result-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a2a3a;
}
.result-note {
    margin-top: 1rem;
    font-size: 0.83rem;
    color: #6b7280;
}

/* ── Content Sections ── */
.content-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 600px) {
    .content-section { padding: 1.4rem 1.2rem; }
}
.content-section h2 {
    font-size: 1.4rem;
    color: #1a2a3a;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}
.content-section h3 {
    font-size: 1.1rem;
    color: #1a2a3a;
    margin: 1.2rem 0 0.5rem;
}
.content-section p { margin-bottom: 0.8rem; color: #374151; line-height: 1.75; }
.content-section ul,
.content-section ol {
    margin: 0.5rem 0 1rem 1.5rem;
    color: #374151;
    line-height: 1.8;
}

/* ── How-to steps ── */
.howto-steps { counter-reset: step; list-style: none; margin-left: 0; }
.howto-steps li {
    position: relative;
    padding: 1rem 1rem 1rem 3.2rem;
    margin-bottom: 0.8rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #1abc9c;
    counter-increment: step;
}
.howto-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    background: #1abc9c;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Formula Box ── */
.formula-box {
    background: #1a2a3a;
    color: #7ee8d4;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    overflow-x: auto;
}
.formula-legend {
    list-style: none;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.4rem 1.5rem;
    margin-top: 0.5rem;
}
.formula-legend li { font-size: 0.93rem; color: #374151; }

/* ── Example Table ── */
.example-table-wrap { overflow-x: auto; }
.example-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.example-table th {
    background: #1a2a3a;
    color: #fff;
    padding: 0.7rem 1rem;
    text-align: left;
}
.example-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}
.example-table tr:last-child td { border-bottom: none; }
.example-table tr:nth-child(even) td { background: #f8fafc; }

/* ── Related Calculators ── */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.related-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.2rem;
    background: #f8fafc;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.related-card:hover {
    border-color: #1abc9c;
    box-shadow: 0 4px 16px rgba(26,188,156,0.15);
    transform: translateY(-2px);
}
.related-icon { font-size: 1.6rem; }
.related-name {
    font-weight: 700;
    color: #1a2a3a;
    font-size: 0.97rem;
}
.related-desc { font-size: 0.83rem; color: #6b7280; line-height: 1.5; }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
    padding: 1.2rem 1.5rem;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid #1abc9c;
}
.faq-item h3 {
    font-size: 1rem;
    color: #1a2a3a;
    margin: 0 0 0.5rem;
}
.faq-item p { font-size: 0.93rem; color: #374151; margin: 0; line-height: 1.7; }

/* ============================================================
   CLUSTER HUB PAGES
   Shared styles for loan-calculators/index.php,
   real-estate/index.php, business/index.php
   ============================================================ */

/* ── Hub Hero ── */
.hub-hero {
    padding: 2.5rem 0 2rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid #1abc9c;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.hub-hero-icon {
    font-size: 2.8rem;
    line-height: 1;
}
.hub-hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    color: #1a2a3a;
    line-height: 1.25;
    margin: 0;
}
.hub-lead {
    font-size: 1.08rem;
    color: #4a5568;
    max-width: 760px;
    line-height: 1.75;
    margin: 0;
}

/* Cluster accent colours (override hub-hero border) */
.hub-hero--realestate { border-bottom-color: #e67e22; }
.hub-hero--business   { border-bottom-color: #8e44ad; }

/* ── Hub Grid ── */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

/* ── Hub Card (base) ── */
.hub-card {
    position: relative;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.hub-card h3 {
    font-size: 1.05rem;
    color: #1a2a3a;
    margin: 0.3rem 0 0;
}
.hub-card p {
    font-size: 0.88rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}
.hub-card-icon {
    font-size: 1.8rem;
    line-height: 1;
}

/* ── Live card ── */
.hub-card--live {
    cursor: pointer;
    border-color: #d1fae5;
    background: #f0fdf4;
}
.hub-card--live:hover {
    border-color: #1abc9c;
    box-shadow: 0 6px 20px rgba(26,188,156,0.18);
    transform: translateY(-3px);
}
.hub-card-cta {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #16a085;
}

/* ── Coming-soon card ── */
.hub-card--soon {
    cursor: default;
    background: #f9fafb;
    border-style: dashed;
    border-color: #d1d5db;
    opacity: 0.82;
}

/* ── Badge ── */
.hub-card-badge {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
}
.hub-card-badge--live {
    background: #d1fae5;
    color: #065f46;
}
.hub-card-badge--soon {
    background: #f3f4f6;
    color: #6b7280;
}

/* ── Hub Checklist ── */
.hub-checklist {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    counter-reset: check;
}
.hub-checklist li {
    position: relative;
    padding: 1rem 1rem 1rem 3.4rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #1abc9c;
    font-size: 0.93rem;
    color: #374151;
    line-height: 1.7;
    counter-increment: check;
}
.hub-checklist li::before {
    content: counter(check);
    position: absolute;
    left: 0.9rem;
    top: 1rem;
    background: #1abc9c;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hub-checklist li strong { color: #1a2a3a; }

/* Accent colours for real-estate and business checklists */
.hub-hero--realestate ~ .content-section .hub-checklist li { border-left-color: #e67e22; }
.hub-hero--realestate ~ .content-section .hub-checklist li::before { background: #e67e22; }
.hub-hero--business   ~ .content-section .hub-checklist li { border-left-color: #8e44ad; }
.hub-hero--business   ~ .content-section .hub-checklist li::before { background: #8e44ad; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .hub-grid { grid-template-columns: 1fr; }
    .hub-hero h1 { font-size: 1.5rem; }
}

/* ============================================================
   FINANCE MEGA-MENU
   Triggered by .dropdown--mega in the main nav.
   Desktop: 3-column panel; Mobile: stacked under toggle.
   ============================================================ */

/* ── Container ── */
.dropdown--mega {
    position: static; /* let mega-menu stretch full nav width */
}

/* ── Panel (hidden by default) ── */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 3px solid #1abc9c;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    z-index: 200;
    padding: 1.5rem 2rem;
    gap: 0;
    box-sizing: border-box;
}

/* Show on desktop hover */
@media (min-width: 769px) {
    .dropdown--mega:hover .mega-menu {
        display: flex;
        flex-direction: row;
        gap: 0;
    }
}

/* ── Columns ── */
.mega-col {
    flex: 1;
    padding: 0 1.5rem;
    border-right: 1px solid #f0f0f0;
}
.mega-col:first-child { padding-left: 0; }
.mega-col:last-child  { padding-right: 0; border-right: none; }

/* ── Column heading (also a hub link) ── */
.mega-col-heading {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #1a2a3a;
    text-decoration: none;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    transition: color 0.15s;
}
.mega-col-heading:hover { color: #1abc9c; }

/* ── Links ── */
.mega-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.mega-col ul li a {
    display: block;
    padding: 0.35rem 0.5rem;
    font-size: 0.88rem;
    color: #374151;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.15s, color 0.15s;
}
.mega-col ul li a:hover {
    background: #f0fdf4;
    color: #16a085;
}

/* ── Coming-soon items ── */
.mega-soon {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    color: #9ca3af;
    cursor: default;
}
.mega-soon-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    flex-shrink: 0;
}

/* ── Mobile: stacked inside the nav ── */
@media (max-width: 768px) {
    .dropdown--mega {
        position: relative;
    }

    /* Panel replaces dropdown-menu on mobile */
    .mega-menu {
        position: static;
        border-top: none;
        border-left: 4px solid #1abc9c;
        box-shadow: none;
        padding: 0.75rem 0 0.75rem 1rem;
        background: #2c3e50;
        flex-direction: column;
        gap: 1rem;
    }

    /* Show when parent has .open (existing mobile JS handles this) */
    .dropdown--mega.open .mega-menu {
        display: flex;
    }

    .mega-col {
        padding: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        padding-bottom: 0.75rem;
    }
    .mega-col:last-child { border-bottom: none; padding-bottom: 0; }

    .mega-col-heading {
        color: #fff;
        border-bottom-color: rgba(255,255,255,0.15);
        font-size: 0.75rem;
    }
    .mega-col-heading:hover { color: #1abc9c; }

    .mega-col ul li a {
        color: #cbd5e0;
        font-size: 0.85rem;
        padding: 0.3rem 0.4rem;
    }
    .mega-col ul li a:hover {
        background: rgba(26,188,156,0.12);
        color: #1abc9c;
    }

    .mega-soon {
        color: rgba(255,255,255,0.35);
        font-size: 0.82rem;
    }
    .mega-soon-badge {
        background: rgba(255,255,255,0.1);
        color: rgba(255,255,255,0.4);
    }
}

/* ── Ensure .main-nav is position:relative so panel anchors to it ── */
.main-nav { position: relative; }

/* ============================================================
   SBA LOAN PAYMENT CALCULATOR — AMORTIZATION PAGE STYLES
   ============================================================ */

/* ── 2-column form row ── */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 640px) {
    .form-row-2 { grid-template-columns: 1fr; }
}

/* ── Optional label tag ── */
.optional-tag {
    font-size: 0.72rem;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 0.3rem;
    font-style: normal;
}

/* ── Wide results grid (6 cards) ── */
.results-grid--wide {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

/* ── Highlight-alt card (effective monthly with extra) ── */
.result-card.highlight-alt {
    background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%);
    border-color: transparent;
}
.result-card.highlight-alt .result-label,
.result-card.highlight-alt .result-value { color: #fff; }

/* ── Principal / Interest split bar ── */
.split-bar-wrap { margin-top: 1.25rem; }
.split-bar {
    display: flex;
    height: 2.2rem;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 700;
}
.split-bar__principal {
    background: #1abc9c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    min-width: 80px;
    transition: width 0.4s;
}
.split-bar__interest {
    background: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    min-width: 80px;
    transition: width 0.4s;
}

/* ── Savings callout ── */
.savings-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: #f0fdf4;
    border: 1.5px solid #6ee7b7;
    border-radius: 10px;
    font-size: 0.93rem;
    color: #065f46;
    line-height: 1.6;
}
.savings-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ── Amortization section wrapper ── */
.amort-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}
.amort-section h2 {
    font-size: 1.2rem;
    color: #1a2a3a;
    margin-bottom: 1rem;
}
.amort-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.amort-header h2 { margin-bottom: 0; }

/* ── Toggle button ── */
.btn-toggle-table {
    background: #f1f5f9;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-toggle-table:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* ── Table wrapper ── */
.table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.monthly-hidden {
    display: none;
}

/* ── Amortization table ── */
.amort-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.amort-table thead th {
    background: #1a2a3a;
    color: #fff;
    padding: 0.65rem 0.9rem;
    text-align: right;
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.amort-table thead th:first-child { text-align: left; }
.amort-table tbody td {
    padding: 0.55rem 0.9rem;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
    color: #374151;
}
.amort-table tbody td:first-child { text-align: left; font-weight: 600; }
.amort-table tbody tr:last-child td { border-bottom: none; }
.amort-table tbody tr:nth-child(even) td { background: #f8fafc; }
.col-principal { color: #065f46 !important; font-weight: 600 !important; }
.col-interest  { color: #991b1b !important; }

/* ── Month-hidden rows ── */
tr.month-hidden { display: none; }

/* ── Table note ── */
.table-note {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 0.5rem;
    text-align: right;
}

/* ============================================================
   BUSINESS LOAN COMPARISON CALCULATOR
   ============================================================ */

/* ── Loan amount row (full width) ── */
.blc-amount-group { max-width: 380px; }

/* ── Two-scenario grid ── */
.scenario-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    margin: 0.5rem 0 1.25rem;
}
@media (max-width: 680px) {
    .scenario-grid { grid-template-columns: 1fr; }
    .scenario-vs { margin: 0.5rem auto; }
}

/* ── Scenario box ── */
.scenario-box {
    border-radius: 10px;
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.scenario-box--a { background: #f0fdf4; border: 2px solid #6ee7b7; }
.scenario-box--b { background: #eff6ff; border: 2px solid #93c5fd; }
.scenario-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    margin-bottom: -0.4rem;
}

/* ── VS divider ── */
.scenario-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem 0;
    font-size: 0.85rem;
    font-weight: 900;
    color: #9ca3af;
}

/* ── Results subtitle ── */
.result-subtitle {
    font-size: 0.93rem;
    color: #6b7280;
    margin-top: -0.5rem;
    margin-bottom: 1.25rem;
}

/* ── Compare grid ── */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 580px) { .compare-grid { grid-template-columns: 1fr; } }

/* ── Compare card ── */
.compare-card {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.4rem 1.5rem 1.2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.compare-card--winner {
    border-color: #1abc9c;
    background: #f0fdf4;
    box-shadow: 0 4px 20px rgba(26,188,156,0.13);
}

/* ── Winner badge ── */
.winner-badge {
    position: absolute;
    top: -1px;
    right: 1rem;
    background: #1abc9c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.75rem;
    border-radius: 0 0 8px 8px;
}

/* ── Card label & stats ── */
.compare-card-label {
    font-size: 1rem;
    color: #1a2a3a;
    margin: 0 0 0.3rem;
    padding-right: 80px;
}
.compare-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}
.compare-stat-label { font-size: 0.8rem; color: #6b7280; }
.compare-stat-value { font-size: 1rem; font-weight: 700; color: #1a2a3a; text-align: right; }
.compare-stat--primary .compare-stat-value { font-size: 1.35rem; color: #16a085; }
.compare-stat--total  .compare-stat-value { font-size: 1.05rem; }
.interest-val { color: #991b1b !important; }
.compare-divider { border-top: 1px solid #e5e7eb; margin: 0.2rem 0; }

/* ── Mini cost bar ── */
.mini-bar-wrap {
    background: #e5e7eb;
    border-radius: 4px;
    height: 6px;
    margin-top: 0.6rem;
    overflow: hidden;
}
.mini-bar {
    height: 100%;
    background: linear-gradient(90deg, #1abc9c, #16a085);
    border-radius: 4px;
}
.compare-card:not(.compare-card--winner) .mini-bar {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

/* ============================================================
   AUTO LOAN CALCULATOR
   ============================================================ */

/* ── Select input ── */
.form-select {
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: #374151;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25em;
    padding-right: 2.5rem;
}
.form-select:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 3px rgba(26,188,156,0.15);
}

/* ── Financing breakdown panel ── */
.breakdown-panel {
    margin-top: 1.5rem;
    background: #f8fafc;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
}
.breakdown-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2a3a;
    margin: 0 0 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.breakdown-rows { display: flex; flex-direction: column; gap: 0.35rem; }
.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-label { color: #6b7280; }
.breakdown-val   { font-weight: 600; color: #1a2a3a; }
.breakdown-row--add .breakdown-label { color: #991b1b; }
.breakdown-row--add .breakdown-val   { color: #991b1b; }
.breakdown-row--sub .breakdown-label { color: #065f46; }
.breakdown-row--sub .breakdown-val   { color: #065f46; }
.breakdown-row--total {
    border-top: 2px solid #1a2a3a;
    margin-top: 0.3rem;
    padding-top: 0.5rem;
}
.breakdown-row--total .breakdown-label,
.breakdown-row--total .breakdown-val {
    font-weight: 800;
    font-size: 1rem;
    color: #1a2a3a;
}

/* ── Affordability bar ── */
.afford-bar-wrap { margin-top: 1.25rem; }
.afford-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #9ca3af;
    margin-bottom: 0.3rem;
}
.afford-rule-label { color: #6b7280; font-weight: 600; }
.afford-track {
    position: relative;
    background: #e5e7eb;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
}
.afford-rule-line {
    position: absolute;
    top: 0;
    height: 100%;
    width: 2px;
    background: #1a2a3a;
    z-index: 1;
}
.afford-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s;
}
.afford-fill--good    { background: linear-gradient(90deg, #1abc9c, #16a085); }
.afford-fill--caution { background: linear-gradient(90deg, #f39c12, #e67e22); }
.afford-fill--high    { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.afford-verdict {
    font-size: 0.88rem;
    color: #374151;
    margin-top: 0.6rem;
    line-height: 1.6;
}

/* ── Caution / High result cards ── */
.result-card.card--caution {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-color: transparent;
}
.result-card.card--high {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: transparent;
}
.result-card.card--caution .result-label,
.result-card.card--caution .result-value,
.result-card.card--high    .result-label,
.result-card.card--high    .result-value { color: #fff; }

/* ── 20/4/10 Rule cards ── */
.rule-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 1.25rem 0 0.5rem;
}
.rule-card {
    background: #f8fafc;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.4rem 1.25rem 1.2rem;
    text-align: center;
}
.rule-card-number {
    font-size: 2rem;
    font-weight: 900;
    color: #1abc9c;
    line-height: 1;
    margin-bottom: 0.3rem;
}
.rule-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1a2a3a;
    margin-bottom: 0.75rem;
}
.rule-card p {
    font-size: 0.84rem;
    color: #6b7280;
    line-height: 1.65;
    margin: 0;
    text-align: left;
}

/* ============================================================
   PERSONAL LOAN CALCULATOR
   ============================================================ */

/* ── Mode tabs ── */
.plc-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}
.plc-tab {
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    border-radius: 0;
}
.plc-tab:hover { color: #1a2a3a; }
.plc-tab--active {
    color: #1abc9c;
    border-bottom-color: #1abc9c;
}

/* ── Panel visibility ── */
.plc-panel--hidden { display: none; }
.panel-intro {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* ── Debt input table ── */
.debt-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    margin-bottom: 1.25rem;
}
.debt-input-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.debt-input-table thead th {
    background: #f1f5f9;
    color: #374151;
    font-weight: 700;
    padding: 0.6rem 0.9rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.debt-input-table tbody td {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid #f0f0f0;
    vertical-align: middle;
}
.debt-input-table tbody td input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}
.debt-input-table tbody td input:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 2px rgba(26,188,156,0.15);
}
.debt-num {
    color: #9ca3af;
    font-weight: 700;
    width: 28px;
}
.debt-placeholder {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* ── Consolidation loan box ── */
.dc-loan-box {
    background: #f0fdf4;
    border: 1.5px solid #6ee7b7;
    border-radius: 10px;
    padding: 1.2rem 1.25rem;
    margin-bottom: 1rem;
}
.dc-loan-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #065f46;
    margin-bottom: 1rem;
}

/* ── Before vs After layout ── */
.dc-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.25rem;
}
@media (max-width: 560px) {
    .dc-compare { grid-template-columns: 1fr; }
    .dc-arrow { text-align: center; transform: rotate(90deg); }
}
.dc-side {
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    text-align: center;
}
.dc-side--before {
    background: #fff5f5;
    border: 2px solid #fc8181;
}
.dc-side--after {
    background: #f0fdf4;
    border: 2px solid #6ee7b7;
}
.dc-side-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
    margin-bottom: 0.4rem;
}
.dc-side-amount {
    font-size: 2rem;
    font-weight: 900;
    color: #1a2a3a;
    line-height: 1;
}
.dc-side-sub {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}
.dc-side-detail {
    font-size: 0.8rem;
    color: #374151;
}
.dc-arrow {
    font-size: 1.75rem;
    color: #1abc9c;
    font-weight: 900;
    text-align: center;
}

/* ── Formula box ── */
.formula-box {
    background: #1a2a3a;
    color: #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.4rem;
    margin: 1rem 0;
    font-size: 0.88rem;
    line-height: 1.9;
}
.formula-box code {
    color: #6ee7b7;
    font-family: 'Courier New', monospace;
    display: block;
}

/* ============================================================
   PROFIT MARGIN CALCULATOR
   ============================================================ */

/* ── Three-tier margin cards ── */
.margin-tiers {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}
.margin-tier {
    border-radius: 10px;
    padding: 1.1rem 1.4rem;
    border-left: 5px solid transparent;
}
.margin-tier--gross {
    background: #f0fdf4;
    border-left-color: #1abc9c;
}
.margin-tier--op {
    background: #fffbeb;
    border-left-color: #f59e0b;
}
.margin-tier--net {
    background: #eff6ff;
    border-left-color: #3b82f6;
}
.margin-tier-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}
.margin-tier-label {
    font-weight: 800;
    font-size: 0.9rem;
    color: #1a2a3a;
}
.margin-tier-label small {
    font-weight: 400;
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 0.3rem;
}
.margin-tier-formula {
    font-size: 0.75rem;
    color: #9ca3af;
}
.margin-tier-body {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}
.margin-tier-amount {
    font-size: 1.7rem;
    font-weight: 900;
    color: #1a2a3a;
    line-height: 1;
}
.margin-tier-amount.negative { color: #dc2626; }
.margin-tier-pct {
    font-size: 1rem;
    font-weight: 700;
    color: #6b7280;
}
.margin-tier-note {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* ── Revenue ladder bar ── */
.revenue-ladder {
    margin-top: 1.5rem;
}
.revenue-ladder-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}
.revenue-ladder-bar {
    display: flex;
    height: 2.4rem;
    border-radius: 8px;
    overflow: hidden;
}
.rl-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    overflow: hidden;
    transition: width 0.4s;
}
.rl-seg--cogs  { background: #e74c3c; }
.rl-seg--opex  { background: #f59e0b; }
.rl-seg--tax   { background: #8b5cf6; }
.rl-seg--net   { background: #1abc9c; }
.rl-seg--other { background: #e5e7eb; }

/* ── Legend ── */
.revenue-ladder-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.6rem;
    font-size: 0.76rem;
    color: #6b7280;
    flex-wrap: wrap;
}
.rl-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 0.2rem;
    vertical-align: middle;
}
.rl-dot--cogs  { background: #e74c3c; }
.rl-dot--opex  { background: #f59e0b; }
.rl-dot--tax   { background: #8b5cf6; }
.rl-dot--net   { background: #1abc9c; }

/* ── Radio Pill Selector ── */
.land-type-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.radio-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.radio-pill:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}
.radio-pill input[type="radio"] {
    display: none;
}
.radio-pill--active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e3a8a;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}
