:root {
    --background: #f7f8f7;
    --surface: #ffffff;
    --surface-soft: #f3f5f3;

    --text: #172018;
    --muted: #667085;

    --brand: #166534;
    --brand-dark: #14532d;
    --brand-soft: #eaf4ed;

    --border: #e5e7eb;

    --danger: #b42318;
    --danger-soft: #fff1f0;

    --warning: #9a6700;
    --warning-soft: #fff8e7;

    --shadow: 0 18px 45px rgba(16, 24, 40, 0.07);

    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 10px;
}


/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: var(--background);
    color: var(--text);

    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}


/* =========================
   CONTAINER
========================= */

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================
   HEADER
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);
}

.nav-wrap {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 28px;
}


/* EXACT PROFITLY LOGO */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    background: var(--brand);
    color: white;

    border-radius: 9px;

    font-size: 17px;
    font-weight: 800;
}


/* NAV */

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;

    margin-left: auto;
}

.main-nav a {
    color: var(--muted);

    font-size: 14px;
    font-weight: 600;

    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--brand);
}


/* NAV CTA */

.nav-cta {
    padding: 10px 16px;

    border-radius: 9px;

    background: var(--brand);
    color: white;

    font-size: 13px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.nav-cta:hover {
    background: var(--brand-dark);
}


/* =========================
   HERO
========================= */

.hero {
    padding: 78px 0 72px;

    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    align-items: center;

    gap: 70px;
}


/* HERO CONTENT */

.hero-content {
    max-width: 560px;
}

.eyebrow {
    display: inline-block;

    margin-bottom: 14px;

    color: var(--brand);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin-bottom: 20px;

    font-size: clamp(42px, 5vw, 64px);

    line-height: 1.05;

    letter-spacing: -0.045em;

    font-weight: 800;
}

.hero h1 span {
    color: var(--brand);
}

.hero-content > p {
    max-width: 540px;

    margin-bottom: 30px;

    color: var(--muted);

    font-size: 17px;

    line-height: 1.7;
}


/* HERO BUTTON */

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 13px 20px;

    background: var(--brand);
    color: white;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.hero-btn:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}


/* =========================
   HERO ANALYTICS CARD
========================= */

.hero-card {
    padding: 25px;

    background: #102117;
    color: white;

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow);

    overflow: hidden;
}

.hero-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}

.hero-card-top small,
.hero-stats small {
    display: block;

    margin-bottom: 5px;

    color: rgba(255, 255, 255, 0.58);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.1em;
}

.hero-card-top strong {
    display: block;

    font-size: 34px;
    line-height: 1.1;

    letter-spacing: -0.04em;
}

.hero-badge {
    padding: 7px 10px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;

    color: rgba(255, 255, 255, 0.75);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.08em;
}


/* CHART */

.hero-chart {
    height: 205px;

    margin: 24px -4px 18px;
}

.hero-chart svg {
    width: 100%;
    height: 100%;

    display: block;
}

.chart-area {
    fill: url(#chartFill);
}

.chart-line {
    fill: none;

    stroke: #ffffff;
    stroke-width: 3;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* HERO STATS */

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 14px;
}

.hero-stats > div {
    padding: 15px;

    background: rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 10px;
}

.hero-stats strong {
    font-size: 19px;
    line-height: 1.2;
}


/* =========================
   SECTION HEADINGS
========================= */

.section-heading {
    max-width: 700px;

    margin-bottom: 34px;
}

.section-heading h2 {
    margin-bottom: 10px;

    font-size: clamp(30px, 4vw, 42px);

    line-height: 1.12;

    letter-spacing: -0.035em;
}

.section-heading p {
    color: var(--muted);

    font-size: 16px;
}


/* =========================
   CALCULATOR SECTION
========================= */

.calculator-section {
    padding: 90px 0;
}

.calculator-layout {
    display: grid;

    grid-template-columns: 1.08fr 0.92fr;

    gap: 24px;

    align-items: start;
}


/* =========================
   PANELS
========================= */

.panel {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow);
}

.input-panel,
.results-panel {
    padding: 28px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 25px;
}

.panel-header h3 {
    font-size: 18px;
    font-weight: 800;

    letter-spacing: -0.02em;
}

.panel-header span {
    padding: 5px 9px;

    background: var(--surface-soft);

    border-radius: 7px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 700;
}


/* =========================
   INPUTS
========================= */

.input-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 18px;
}

.field {
    min-width: 0;
}

.field label {
    display: block;

    margin-bottom: 7px;

    color: var(--text);

    font-size: 13px;
    font-weight: 700;
}

.field input,
.field select {
    width: 100%;

    min-height: 46px;

    padding: 11px 13px;

    background: #fff;

    border: 1px solid var(--border);

    border-radius: var(--radius-sm);

    color: var(--text);

    outline: none;

    font-size: 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
    border-color: var(--brand);

    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.08);
}

.input-wrap {
    position: relative;

    display: flex;
    align-items: center;
}

.input-wrap input {
    padding-left: 42px;
}

.input-symbol {
    position: absolute;
    left: 13px;

    z-index: 2;

    color: var(--muted);

    font-size: 14px;

    pointer-events: none;
}

.input-suffix {
    position: absolute;
    right: 13px;

    color: var(--muted);

    font-size: 13px;

    pointer-events: none;
}

.input-wrap input:has(+ .input-suffix) {
    padding-right: 38px;
}


/* RESET */

.reset-btn {
    width: 100%;

    margin-top: 24px;

    min-height: 44px;

    background: var(--surface-soft);

    border: 1px solid var(--border);

    border-radius: var(--radius-sm);

    color: var(--text);

    cursor: pointer;

    font-size: 13px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.reset-btn:hover {
    background: #e9ece9;

    border-color: #d5d9d5;
}


/* =========================
   RESULTS
========================= */

.results-panel {
    position: sticky;
    top: 95px;
}

.main-result {
    padding: 24px;

    margin-bottom: 18px;

    background: var(--brand-soft);

    border: 1px solid #dcecdf;

    border-radius: var(--radius-md);
}

.main-result small {
    display: block;

    margin-bottom: 7px;

    color: var(--brand);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.1em;
}

.main-result strong {
    display: block;

    margin-bottom: 8px;

    color: var(--brand-dark);

    font-size: 44px;

    line-height: 1;

    letter-spacing: -0.04em;
}

.main-result p {
    color: var(--muted);

    font-size: 13px;
}


/* RESULT GRID */

.result-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;
}

.result-card {
    padding: 16px;

    background: var(--surface-soft);

    border: 1px solid var(--border);

    border-radius: var(--radius-md);
}

.result-card span {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 600;
}

.result-card strong {
    display: block;

    color: var(--text);

    font-size: 20px;

    line-height: 1.25;

    letter-spacing: -0.02em;
}


/* STATUS */

.status-box {
    margin-top: 18px;

    padding: 14px 16px;

    background: var(--surface-soft);

    border: 1px solid var(--border);

    border-radius: var(--radius-sm);

    color: var(--muted);

    font-size: 13px;
    font-weight: 600;
}

.status-box.good {
    background: var(--brand-soft);

    border-color: #d5ead9;

    color: var(--brand-dark);
}

.status-box.warning {
    background: var(--warning-soft);

    border-color: #f0dfae;

    color: var(--warning);
}

.status-box.danger {
    background: var(--danger-soft);

    border-color: #f0d1ce;

    color: var(--danger);
}


/* =========================
   SIMULATOR
========================= */

.simulator-section {
    padding: 90px 0;

    background: var(--surface);
}

.simulator-panel {
    overflow: hidden;
}

.table-wrap {
    width: 100%;

    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;

    min-width: 650px;
}

thead {
    background: var(--surface-soft);
}

th {
    padding: 15px 18px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 800;

    text-align: left;

    letter-spacing: 0.06em;

    text-transform: uppercase;

    border-bottom: 1px solid var(--border);
}

td {
    padding: 17px 18px;

    color: var(--text);

    font-size: 14px;
    font-weight: 600;

    border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #fafbfa;
}


/* TABLE STATUS */

.table-status {
    display: inline-flex;

    align-items: center;

    padding: 5px 9px;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 800;
}

.table-status.profit {
    background: var(--brand-soft);

    color: var(--brand-dark);
}

.table-status.break-even {
    background: var(--warning-soft);

    color: var(--warning);
}

.table-status.loss {
    background: var(--danger-soft);

    color: var(--danger);
}


/* =========================
   HOW IT WORKS
========================= */

.how-section {
    padding: 90px 0;
}

.steps {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 20px;
}

.step {
    padding: 25px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-md);
}

.step > span {
    display: inline-flex;

    margin-bottom: 20px;

    color: var(--brand);

    font-size: 13px;
    font-weight: 800;
}

.step h3 {
    margin-bottom: 8px;

    font-size: 18px;

    letter-spacing: -0.02em;
}

.step p {
    color: var(--muted);

    font-size: 14px;

    line-height: 1.65;
}


/* =========================
   FOOTER
========================= */

.site-footer {
    padding: 42px 0;

    background: #102117;

    color: white;
}

.footer-wrap {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.footer-logo {
    color: white;
}

.footer-logo .logo-mark {
    background: white;
    color: var(--brand);
}

.footer-wrap p {
    margin-top: 10px;

    color: rgba(255, 255, 255, 0.58);

    font-size: 13px;
}

.footer-wrap > span {
    color: rgba(255, 255, 255, 0.5);

    font-size: 12px;
}


/* =========================
   TABLET
========================= */

@media (max-width: 950px) {

    .hero-grid {
        grid-template-columns: 1fr;

        gap: 45px;
    }

    .hero-content {
        max-width: 720px;
    }

    .hero-card {
        max-width: 720px;
    }

    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .results-panel {
        position: static;
    }

    .steps {
        grid-template-columns: 1fr;
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .container {
        width: min(100% - 28px, 1160px);
    }


    /* EXACT TOOL #1 MOBILE NAV */

    .main-nav {
        display: none;
    }

    .nav-cta {
        padding: 9px 12px;

        font-size: 11px;
    }


    /* HERO */

    .hero {
        padding: 55px 0 50px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero-content > p {
        font-size: 15px;
    }

    .hero-chart {
        height: 165px;
    }


    /* SECTIONS */

    .calculator-section,
    .simulator-section,
    .how-section {
        padding: 65px 0;
    }

    .section-heading h2 {
        font-size: 31px;
    }


    /* INPUTS */

    .input-grid {
        grid-template-columns: 1fr;
    }

    .input-panel,
    .results-panel {
        padding: 20px;
    }


    /* RESULTS */

    .result-grid {
        grid-template-columns: 1fr 1fr;
    }


    /* FOOTER */

    .footer-wrap {
        flex-direction: column;

        align-items: flex-start;
    }

}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 430px) {

    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 29px;
        height: 29px;
    }

    .nav-cta {
        display: none;
    }


    .hero h1 {
        font-size: 34px;
    }

    .hero-card {
        padding: 20px;
    }

    .hero-card-top strong {
        font-size: 29px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .main-result strong {
        font-size: 38px;
    }

}