/* ===== Tools Directory — Page Styles ===== */

/* ===== Hero trust badges ===== */

.hero-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}
.hero-trust-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 5px 13px;
    white-space: nowrap;
}

/* ===== What is Net Worth ===== */

.home-networth-section {
    padding: 64px 0 48px;
    background: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
}

.home-formula-box {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: 12px;
    padding: 22px 28px;
    margin: 32px 0 40px;
}
.home-formula-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    display: block;
    margin-bottom: 8px;
}
.home-formula-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.home-formula-sub {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

.home-benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.home-benefit-card {
    background: var(--color-bg-main);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 24px 22px;
}
.home-benefit-icon {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1;
}
.home-benefit-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text-main);
}
.home-benefit-card p {
    font-size: 0.87rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    margin: 0;
}

/* ===== Step by step ===== */

.home-steps-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 20px;
}

.home-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 36px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
}
.home-step {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-white);
    align-items: flex-start;
}
.home-step:last-child {
    border-bottom: none;
}
.home-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.home-step-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 5px;
}
.home-step-body p {
    font-size: 0.87rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    margin: 0;
}

/* ===== Worked example ===== */

.home-example-box {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 40px;
}
.home-example-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 18px 0 0;
}
.home-example-col-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
}
.assets-title { color: #15803d; }
.liabs-title  { color: #c2410c; }
[data-theme="dark"] .assets-title { color: #4ade80; }
[data-theme="dark"] .liabs-title  { color: #fb923c; }

.home-example-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    gap: 12px;
}
.home-example-row:last-child { border-bottom: none; }
.home-example-row span:last-child {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.home-example-total {
    font-weight: 700;
    color: var(--color-text-main);
    border-top: 2px solid var(--color-border);
    border-bottom: none;
    margin-top: 4px;
    padding-top: 8px;
}
.home-example-spacer {
    border-bottom: none;
}
.home-example-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding: 14px 18px;
    background: var(--color-primary);
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}
.home-example-result-value {
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* ===== Assets vs Liabilities ===== */

.home-avl-section {
    padding: 64px 0;
}

.home-avl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}
.home-avl-card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 26px 24px;
}
.home-avl-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.home-avl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.assets-dot { background: #15803d; }
.liabs-dot  { background: #c2410c; }
[data-theme="dark"] .assets-dot { background: #4ade80; }
[data-theme="dark"] .liabs-dot  { background: #fb923c; }

.home-avl-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
}
.home-avl-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.home-avl-list li {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
    line-height: 1.5;
}
.home-avl-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.home-avl-list li::before {
    content: "– ";
    color: var(--color-primary);
    font-weight: 700;
}

/* ===== Tools section heading within page ===== */
.tools-section .section-header {
    margin-bottom: 40px;
}

/* ===== Responsive ===== */

.tools-section {
    padding: 48px 0 80px;
}

/* ===== Category block ===== */
.tools-category {
    margin-bottom: 64px;
}
.tools-category:last-child {
    margin-bottom: 0;
}

.tools-cat-header {
    margin-bottom: 24px;
}
.tools-cat-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.tools-cat-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.01em;
}
.tools-cat-desc {
    font-size: 0.93rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Category pip (coloured dot before title) */
.tools-cat-pip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tools-cat-pip.cat-wealth  { background: #1d4ed8; }
.tools-cat-pip.cat-loans   { background: #c2410c; }
.tools-cat-pip.cat-invest  { background: #15803d; }
[data-theme="dark"] .tools-cat-pip.cat-wealth  { background: #7cb3ff; }
[data-theme="dark"] .tools-cat-pip.cat-loans   { background: #fb923c; }
[data-theme="dark"] .tools-cat-pip.cat-invest  { background: #4ade80; }

/* Live count badge beside the title */
.tools-cat-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 3px 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ===== Tools grid ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ===== Tool item card ===== */
.tools-item {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 22px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    color: inherit;
}
a.tools-item.live:hover {
    border-color: var(--color-primary);
    box-shadow: 0 6px 24px rgba(29, 78, 216, 0.10);
    transform: translateY(-2px);
}
.tools-item.upcoming {
    opacity: 0.72;
}

/* Icon abbreviation box */
.tools-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    background: var(--color-bg-light);
    color: var(--color-text-muted);
}

/* Category-coloured icons for live tools */
.tools-item-icon.cat-wealth {
    background: rgba(29, 78, 216, 0.10);
    color: #1d4ed8;
}
.tools-item-icon.cat-loans {
    background: rgba(194, 65, 12, 0.10);
    color: #c2410c;
}
.tools-item-icon.cat-invest {
    background: rgba(21, 128, 61, 0.10);
    color: #15803d;
}
[data-theme="dark"] .tools-item-icon.cat-wealth {
    background: rgba(124, 179, 255, 0.14);
    color: #7cb3ff;
}
[data-theme="dark"] .tools-item-icon.cat-loans {
    background: rgba(251, 146, 60, 0.14);
    color: #fb923c;
}
[data-theme="dark"] .tools-item-icon.cat-invest {
    background: rgba(74, 222, 128, 0.14);
    color: #4ade80;
}

/* Content */
.tools-item-content {
    flex: 1;
}
.tools-item-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 6px;
    line-height: 1.3;
}
.tools-item.upcoming .tools-item-name {
    color: var(--color-text-muted);
}
.tools-item-desc {
    font-size: 0.84rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Footer row: badge + link */
.tools-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}

/* Status badge */
.tools-badge {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
}
.tools-badge.live {
    background: rgba(21, 128, 61, 0.10);
    color: #15803d;
    border: 1px solid rgba(21, 128, 61, 0.25);
}
.tools-badge.upcoming {
    background: var(--color-bg-light);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}
[data-theme="dark"] .tools-badge.live {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.25);
}

/* "Open Tool →" link text */
.tools-item-link {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}

/* ===== Responsive ===== */

@media (max-width: 1000px) {
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .home-benefit-grid   { grid-template-columns: 1fr; gap: 14px; }
    .home-avl-grid       { grid-template-columns: 1fr; }
    .home-networth-section { padding: 48px 0 36px; }
    .home-avl-section    { padding: 48px 0; }
    .home-example-grid   { grid-template-columns: 1fr; gap: 16px; }
    .hero-trust-badges   { gap: 8px; }
}

@media (max-width: 600px) {
    .tools-section  { padding: 32px 0 60px; }
    .tools-category { margin-bottom: 48px; }
    .tools-grid     { grid-template-columns: 1fr; }
    .tools-item     { padding: 18px 16px 14px; }
    .tools-cat-title { font-size: 1.15rem; }
    .home-formula-box { padding: 18px 20px; }
    .home-avl-card  { padding: 20px 18px; }
}
