/* ==================================================
   BASE
================================================== */

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


:root {

    --background: #fafbfc;
    --surface: #ffffff;

    --text: #101318;
    --muted: #707784;

    --border: #e2e6ea;

    --green: #07983b;
    --green-hover: #078532;
    --green-light: #eff9f2;

    --negative: #d84f4f;

    --radius: 14px;
}


html {
    scroll-behavior: smooth;
}


body {

    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);

    -webkit-font-smoothing: antialiased;
}



/* ==================================================
   NAVBAR
================================================== */

.navbar {

    height: 88px;

    display: flex;
    align-items: center;

    background: var(--surface);

    border-bottom: 1px solid var(--border);
}


.navbar-inner {

    width: min(1400px, calc(100% - 40px));

    margin: 0 auto;
}


.brand-logo {

    display: block;

    width: auto;
    height: 48px;

    object-fit: contain;
}



/* ==================================================
   MAIN
================================================== */

.container {

    width: min(1400px, calc(100% - 40px));

    margin: 0 auto;

    padding: 48px 0 90px;

    display: grid;

    grid-template-columns:
        minmax(300px, 0.75fr)
        minmax(650px, 1.75fr);

    gap: 24px;

    align-items: start;
}



/* ==================================================
   SEARCH CARD
================================================== */

.search-card {

    padding: 40px 32px 32px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.015);
}


.search-label {

    margin-bottom: 8px;
}


.search-row {

    display: grid;

    grid-template-columns: 1fr;

    gap: 12px;
}


.search-row input {

    width: 100%;
    height: 56px;

    padding: 0 18px;

    border: 1px solid #d9dee4;
    border-radius: 10px;

    outline: none;

    background: #ffffff;

    color: var(--text);

    font-family: inherit;

    font-size: 15px;
    font-weight: 500;

    text-transform: uppercase;

    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}


.search-row input::placeholder {

    color: #9aa1ab;

    text-transform: none;

    font-weight: 400;
}


.search-row input:focus {

    border-color: #77be8e;

    box-shadow:
        0 0 0 3px rgba(7, 152, 59, 0.08);
}


.search-row button {

    width: 100%;
    height: 56px;

    border: none;
    border-radius: 10px;

    background: var(--green);

    color: white;

    font-family: inherit;

    font-size: 15px;
    font-weight: 650;

    cursor: pointer;

    transition:
        background 0.15s,
        transform 0.15s;
}


.search-row button:hover {

    background: var(--green-hover);

    transform: translateY(-1px);
}


.search-row button:active {

    transform: translateY(0);
}


.input-help {

    margin-top: 16px;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.5;
}



/* ==================================================
   ERROR MESSAGE
================================================== */

.error-message {
    min-height: 20px;

    margin-top: 14px;
    margin-bottom: 22px;

    color: var(--negative);

    font-size: 13px;
    font-weight: 500;

    line-height: 1.5;

    visibility: hidden;
}


.error-message.show {
    visibility: visible;
}



/* ==================================================
   EXAMPLES
================================================== */

.examples {

    display: flex;
    align-items: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 14px;

    color: #9298a1;

    font-size: 11px;
}


.examples button {

    padding: 4px 8px;

    border: none;
    border-radius: 5px;

    background: #f0f2f4;

    color: #656c76;

    font-family: inherit;

    font-size: 10px;
    font-weight: 650;

    cursor: pointer;
}


.examples button:hover {

    background: #e7e9ec;
}



/* ==================================================
   RESULTS CARD
================================================== */

.results-card {

    padding: 40px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.015);
}



/* ==================================================
   CURRENT SIGNAL
================================================== */

.signal-header {

    display: grid;

    grid-template-columns:
        minmax(190px, 1.5fr)
        1fr
        1fr;

    align-items: center;

    padding-bottom: 32px;

    border-bottom: 1px solid var(--border);
}


.signal-item {

    text-align: center;
}


.ticker-item {

    text-align: left;
}

.signal-label.mobile-ticker-label {
    display: none;
}

.signal-label {

    margin-bottom: 8px;

    color: #9299a3;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.1px;

    text-transform: uppercase;
}


.ticker-name {

    font-size: 22px;
    font-weight: 650;

    letter-spacing: -0.6px;
}


.signal-value {

    font-size: 22px;
    font-weight: 650;

    letter-spacing: -0.6px;

    font-variant-numeric: tabular-nums;
}


.signal-value.positive {
    color: var(--green);
}


.signal-value.negative {
    color: var(--negative);
}


.strength-value {

    font-size: 22px;
    font-weight: 650;

    letter-spacing: -0.5px;
}


.strength-value.positive {
    color: var(--green);
}


.strength-value.negative {
    color: var(--negative);
}



/* ==================================================
   TABLE
================================================== */

.backtest-section {

    padding-top: 24px;
}


.comparison-table {

    width: 100%;
}


.comparison-row {

    display: grid;

    grid-template-columns:
        minmax(190px, 1.5fr)
        1fr
        1fr;

    align-items: center;

    min-height: 49px;

    border-top: 1px solid var(--border);

    font-size: 13px;

    font-variant-numeric: tabular-nums;
}


/* BUY & HOLD and BLUEPRINT columns */

.comparison-row > div:nth-child(2),
.comparison-row > div:nth-child(3) {

    text-align: center;
}


.table-header {

    min-height: 38px;

    border-top: none;

    color: #949ba5;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.8px;

    text-transform: uppercase;
}


.data-history {

    color: var(--muted);

    font-size: 12px;

    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}


.metric-name {

    color: #626a75;
}


.ordinal {

    display: inline-block;

    font-size: 0.7em;

    vertical-align: top;
}


.blueprint-header {

    color: var(--green);
}


.blueprint-value {

    color: #12161a;

    font-weight: 400;
}


/* ==================================================
   POSITION CHANGES AVERAGE
================================================== */

#blueprint-position-changes {
    position: relative;
}


.position-changes-average {
    position: absolute;

    top: calc(50% + 10px);
    left: 0;
    right: 0;

    color: var(--muted);

    font-size: 10px;
    font-weight: 400;
    line-height: 1.25;

    white-space: nowrap;
}



/* ==================================================
   BLUEPRINT CTA
================================================== */

.blueprint-cta {

    margin-top: 22px;
    padding-top: 20px;

    border-top: 1px solid var(--border);

    font-size: 12px;
    line-height: 1.5;
}


.blueprint-cta-title {

    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--text);
    font-weight: 600;
}


.blueprint-cta a {

    display: inline-block;

    margin-top: 7px;
    margin-left: 0px;

    color: var(--green);

    font-weight: 650;
    text-decoration: none;
}


.blueprint-cta a:hover {

    text-decoration: underline;
}



/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 1000px) {

    .container {

        grid-template-columns: 1fr;

        width: calc(100% - 40px);
    }


    .navbar-inner {

        width: calc(100% - 40px);
    }
}



@media (max-width: 700px) {

    .navbar {

        height: 72px;
    }


    .navbar-inner,
    .container {

        width: calc(100% - 32px);
    }


    .brand-logo {

        height: 40px;
    }


    .container {

        padding-top: 32px;

        gap: 24px;
    }


    .search-card,
    .results-card {

        padding: 24px;
    }


    .signal-header {

        grid-template-columns:
            minmax(125px, 1.4fr)
            1fr
            1fr;
    }


    .signal-label.mobile-ticker-label {
        display: block;
    }

    .ticker-symbol {
        margin-bottom: 0;

        color: var(--text);

        font-size: 20px;
        font-weight: 650;

        letter-spacing: -0.6px;

        text-transform: none;
    }

    
    .ticker-name {

        display: none;
    }


    .signal-value,
    .strength-value {

        font-size: 20px;
    }


    .comparison-row {

        grid-template-columns:
            minmax(125px, 1.4fr)
            1fr
            1fr;

        font-size: 12px;
    }

    .position-changes-average {
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }    

}