/* TFA Lab calculator tools — shared theme (UTM, ROAS, budget, Meta, SEO ROI) */

.tfc-page {
    background: var(--site-bg, #fff);
}

.tfc-page .tfc-hero {
    background: linear-gradient(135deg, var(--site-navy) 0%, #1a0040 55%, var(--site-accent) 100%);
    padding: var(--site-section-pad, clamp(2.5rem, 5vw, 3.5rem)) 0;
    position: relative;
    overflow: hidden;
}

.tfc-page .tfc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 80% 70% at 70% 50%, #10002B 20%, transparent 75%);
    pointer-events: none;
}

.tfc-page .tfc-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: clamp(2rem, 4vw, 3rem);
    align-items: center;
}

.tfc-page .tfc-eyebrow {
    display: inline-block;
    background: rgba(235, 5, 85, .18);
    border: 1px solid rgba(235, 5, 85, .35);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .35rem .85rem;
    border-radius: var(--site-radius-pill, 999px);
    margin-bottom: 1rem;
}

.tfc-page .tfc-hero h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.12;
    letter-spacing: -.03em;
    margin: 0 0 1rem;
}

.tfc-page .tfc-hero h1 span {
    color: var(--site-accent);
}

.tfc-page .tfc-lead {
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    line-height: 1.7;
    max-width: 620px;
    color: rgba(255, 255, 255, .88);
    margin: 0;
}

.tfc-page .tfc-visual {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    padding: 1.5rem;
    border-radius: var(--site-radius, 16px);
    color: #fff;
    box-shadow: var(--site-shadow-lg);
}

.tfc-page .tfc-visual small {
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, .65);
}

.tfc-page .tfc-visual .rc-big {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin: .75rem 0;
    line-height: 1;
}

.tfc-page .tfc-visual .rc-big span {
    color: var(--site-accent);
}

.tfc-page .tfc-formula-card {
    background: rgba(43, 27, 66, .85);
    padding: 1rem;
    border-radius: var(--site-radius-sm, 10px);
    line-height: 1.65;
    font-size: .9rem;
}

.tfc-page .tfc-tool-shell {
    background: #F7F7FA;
    padding: var(--site-section-pad, clamp(2.5rem, 4vw, 3.5rem)) 0;
}

.tfc-page .tfc-tool {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.25rem;
}

.tfc-page .tfc-panel {
    background: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    box-shadow: var(--site-shadow);
}

.tfc-page .tfc-panel h2 {
    margin: 0 0 .5rem;
    color: var(--site-navy);
    font-size: 1.25rem;
    font-weight: 800;
}

.tfc-page .tfc-help {
    font-size: .88rem;
    color: var(--site-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.tfc-page .tfc-field {
    margin-bottom: 1rem;
}

.tfc-page .tfc-field label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: .4rem;
    color: var(--site-navy);
}

.tfc-page .tfc-input {
    display: flex;
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius-sm, 10px);
    overflow: hidden;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.tfc-page .tfc-input:focus-within {
    border-color: var(--site-accent);
    box-shadow: 0 0 0 3px rgba(235, 5, 85, .1);
}

.tfc-page .tfc-input span {
    background: #F7F7FA;
    padding: .75rem .85rem;
    font-weight: 700;
    color: var(--site-navy);
    flex-shrink: 0;
}

.tfc-page .tfc-input input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    outline: 0;
    padding: 0 .85rem;
    width: 100%;
    min-width: 0;
    height: 46px;
    font: inherit;
    color: var(--site-text);
    background: transparent;
}

.tfc-page .tfc-error {
    display: none;
    color: #b42318;
    font-size: .78rem;
    margin-top: .65rem;
}

.tfc-page .tfc-actions {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.tfc-page .tfc-actions .btn-tm-primary,
.tfc-page .tfc-actions .btn-tm-outline {
    border: none;
    cursor: pointer;
}

.tfc-page .tfc-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.tfc-page .tfc-result {
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius-sm, 10px);
    padding: 1rem;
    background: #fff;
}

.tfc-page .tfc-result.rc-result-main {
    grid-column: 1 / -1;
    background: var(--site-navy);
    color: #fff;
    border: none;
}

.tfc-page .tfc-result small {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--site-muted);
}

.tfc-page .tfc-result.rc-result-main small {
    color: rgba(255, 255, 255, .65);
}

.tfc-page .tfc-result b {
    display: block;
    margin-top: .4rem;
    font-size: 1.35rem;
    color: var(--site-navy);
    font-weight: 800;
}

.tfc-page .tfc-result.rc-result-main b {
    font-size: clamp(2rem, 5vw, 2.75rem);
    color: #fff;
}

.tfc-page .tfc-result.rc-result-main b span {
    color: var(--site-accent);
}

.tfc-page .tfc-check {
    display: flex;
    gap: .65rem;
    border-top: 1px solid var(--site-border);
    padding: .75rem 0;
    font-size: .86rem;
    line-height: 1.45;
    color: var(--site-muted);
}

.tfc-page .tfc-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-top: .35rem;
    flex: none;
}

.tfc-page .tfc-dot.good { background: #18794e; }
.tfc-page .tfc-dot.warn { background: #9a6700; }
.tfc-page .tfc-dot.info { background: var(--site-accent); }

.tfc-page .tfc-content {
    padding: var(--site-section-pad, clamp(2.5rem, 4vw, 3.5rem)) 0;
    background: var(--site-surface);
}

.tfc-page .tfc-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
    align-items: start;
}

.tfc-page .tfc-prose {
    color: var(--site-muted);
    line-height: 1.75;
    font-size: 1rem;
}

.tfc-page .tfc-prose h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    font-weight: 800;
    color: var(--site-navy);
    margin: 2.5rem 0 .85rem;
    letter-spacing: -.02em;
}

.tfc-page .tfc-prose h2:first-child {
    margin-top: 0;
}

.tfc-page .tfc-prose p,
.tfc-page .tfc-prose li {
    color: var(--site-muted);
}

.tfc-page .tfc-note {
    background: rgba(235, 5, 85, .06);
    border-left: 3px solid var(--site-accent);
    border-radius: 0 var(--site-radius-sm) var(--site-radius-sm) 0;
    padding: 1rem 1.15rem;
    margin: 1.25rem 0;
    line-height: 1.6;
    color: var(--site-text);
}

.tfc-page .tfc-formula {
    background: var(--site-navy);
    color: #fff;
    border-radius: var(--site-radius-sm);
    padding: 1.25rem;
    margin: 1.25rem 0;
    line-height: 1.7;
    font-size: .92rem;
}

.tfc-page .tfc-formula code {
    color: #ff8ab3;
    font-size: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.tfc-page .tfc-table-wrap {
    overflow: auto;
    margin: 1rem 0;
}

.tfc-page .tfc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.tfc-page .tfc-table th,
.tfc-page .tfc-table td {
    text-align: left;
    border-bottom: 1px solid var(--site-border);
    padding: .85rem;
    vertical-align: top;
}

.tfc-page .tfc-table th {
    background: #F7F7FA;
    color: var(--site-navy);
    font-weight: 700;
}

.tfc-page .tfc-faq {
    border-top: 1px solid var(--site-border);
    padding: 1.1rem 0;
}

.tfc-page .tfc-faq b {
    display: block;
    color: var(--site-navy);
    margin-bottom: .4rem;
    font-weight: 700;
}

.tfc-page .tfc-faq p {
    margin: 0;
}

.tfc-page .tfc-aside {
    position: sticky;
    top: 16px;
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    padding: 1.25rem;
    background: var(--site-surface);
    box-shadow: var(--site-shadow);
}

.tfc-page .tfc-aside h3 {
    margin: 0 0 .85rem;
    color: var(--site-navy);
    font-size: 1rem;
    font-weight: 800;
}

.tfc-page .tfc-aside a {
    display: block;
    padding: .55rem 0;
    border-top: 1px solid var(--site-border);
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--site-text);
}

.tfc-page .tfc-aside a:hover {
    color: var(--site-accent);
}

.tfc-page .tfc-final {
    background: linear-gradient(135deg, var(--site-navy) 0%, #1a0040 100%);
    color: #fff;
    padding: var(--site-section-pad, clamp(2.5rem, 4vw, 3.5rem)) 0;
    text-align: center;
}

.tfc-page .tfc-final h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -.03em;
    margin: 0 auto 1rem;
    max-width: 760px;
}

.tfc-page .tfc-final p {
    color: rgba(255, 255, 255, .82);
    line-height: 1.65;
    max-width: 620px;
    margin: 0 auto 1.5rem;
}

@media (max-width: 991px) {
    .tfc-page .tfc-hero-grid,
    .tfc-page .tfc-tool,
    .tfc-page .tfc-content-grid {
        grid-template-columns: 1fr;
    }

    .tfc-page .tfc-visual {
        display: none;
    }

    .tfc-page .tfc-aside {
        position: static;
    }
}

@media (max-width: 560px) {
    .tfc-page .tfc-results {
        grid-template-columns: 1fr;
    }

    .tfc-page .tfc-result.tfc-result-main {
        grid-column: auto;
    }

    .tfc-page .tfc-grid {
        grid-template-columns: 1fr;
    }

    .tfc-page .tfc-alloc-row {
        grid-template-columns: 100px 1fr;
    }

    .tfc-page .tfc-amt {
        grid-column: 2;
    }

    .tfc-page .tfc-stage-row {
        grid-template-columns: 90px 1fr;
    }
}

/* Shared extras — budget bars, funnel, allocation tracks */
.tfc-page .tfc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .875rem;
}

.tfc-page .tfc-field label.tfc-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.tfc-page .tfc-req {
    font-weight: 600;
    color: var(--site-muted);
    font-size: .75rem;
}

.tfc-page .tfc-bars {
    height: 180px;
    display: flex;
    align-items: flex-end;
    gap: .75rem;
    margin-top: 1.25rem;
    padding-bottom: 2rem;
}

.tfc-page .tfc-bar {
    flex: 1;
    background: rgba(255, 255, 255, .22);
    border-radius: 6px 6px 0 0;
    position: relative;
    min-height: 24px;
}

.tfc-page .tfc-bar.tfc-bar-accent {
    background: var(--site-accent);
}

.tfc-page .tfc-bar span {
    position: absolute;
    bottom: -1.65rem;
    left: 0;
    font-size: .6rem;
    font-weight: 800;
    white-space: nowrap;
    color: rgba(255, 255, 255, .72);
    letter-spacing: .02em;
}

.tfc-page .tfc-vnote {
    margin-top: .5rem;
    color: rgba(255, 255, 255, .65);
    font-size: .78rem;
    line-height: 1.5;
}

.tfc-page .tfc-funnel {
    margin-top: 1.25rem;
}

.tfc-page .tfc-funnel-step {
    margin: .45rem auto;
    padding: .55rem .85rem;
    background: rgba(42, 25, 63, .85);
    text-align: center;
    border-radius: 5px;
    font-weight: 800;
    font-size: .72rem;
    letter-spacing: .04em;
}

.tfc-page .tfc-funnel-step:nth-child(1) { width: 100%; }
.tfc-page .tfc-funnel-step:nth-child(2) { width: 87%; }
.tfc-page .tfc-funnel-step:nth-child(3) { width: 72%; }
.tfc-page .tfc-funnel-step:nth-child(4) { width: 57%; }
.tfc-page .tfc-funnel-step:nth-child(5) { width: 43%; background: var(--site-accent); }

.tfc-page .tfc-chart {
    height: 160px;
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    margin: 1.25rem 0 .65rem;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    padding-bottom: .25rem;
}

.tfc-page .tfc-chart div {
    flex: 1;
    background: rgba(64, 48, 82, .85);
    border-radius: 5px 5px 0 0;
    min-height: 8px;
}

.tfc-page .tfc-chart div.tfc-chart-accent {
    background: var(--site-accent);
}

.tfc-page .tfc-alloc,
.tfc-page .tfc-stage {
    margin-top: 1.25rem;
}

.tfc-page .tfc-alloc-row,
.tfc-page .tfc-stage-row {
    display: grid;
    grid-template-columns: 140px 1fr 110px;
    gap: .65rem;
    align-items: center;
    margin: .65rem 0;
    font-size: .78rem;
    font-weight: 700;
    color: var(--site-navy);
}

.tfc-page .tfc-stage-row {
    grid-template-columns: 115px 1fr 90px;
}

.tfc-page .tfc-track {
    height: 10px;
    background: #eee7ea;
    border-radius: 20px;
    overflow: hidden;
}

.tfc-page .tfc-fill {
    height: 100%;
    background: var(--site-accent);
    width: 0;
    transition: width .25s ease;
}

.tfc-page .tfc-amt {
    text-align: right;
    color: var(--site-navy);
}

.tfc-page .tfc-prose ol {
    padding-left: 1.35rem;
}

/* Website cost calculator — standalone selects/inputs only (not .tfc-input groups) */
.tfc-page .tfc-field > select,
.tfc-page .tfc-field > input[type=number] {
    width: 100%;
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius-sm, 10px);
    padding: .75rem .85rem;
    background: #fff;
    height: 46px;
    font: inherit;
}

.tfc-page .tfc-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
}

.tfc-page .tfc-option {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius-sm, 10px);
    padding: .7rem;
    font-size: .78rem;
    line-height: 1.4;
    background: #fff;
}

.tfc-page .tfc-option input {
    margin-top: .15rem;
    accent-color: var(--site-accent);
}

.tfc-page .tfc-breakdown .tfc-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--site-border);
    padding: .7rem 0;
    font-size: .86rem;
}

.tfc-page .tfc-breakdown .tfc-row strong {
    color: var(--site-navy);
}

.tfc-page .tfc-scope-box {
    margin-top: 1rem;
    background: rgba(235, 5, 85, .06);
    padding: 1rem;
    border-radius: var(--site-radius-sm, 10px);
    font-size: .86rem;
    line-height: 1.55;
}

.tfc-page .tfc-badge {
    display: inline-block;
    background: #eee7f0;
    color: var(--site-navy);
    font-size: .62rem;
    font-weight: 800;
    padding: .35rem .55rem;
    margin: .2rem;
    border-radius: 999px;
}

.tfc-page .tfc-wire {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
    margin: 1.25rem 0;
}

.tfc-page .tfc-wire div {
    height: 52px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    background: rgba(32, 19, 51, .85);
}

.tfc-page .tfc-wire .tfc-wire-hero {
    grid-column: 1 / -1;
    height: 88px;
    background: var(--site-accent);
    border: 0;
}

@media (max-width: 560px) {
    .tfc-page .tfc-checks {
        grid-template-columns: 1fr;
    }
}
