/* FTJ documentation landing page only. General documentation styling stays in custom.css. */

body:has(.ftj-manual-meta) .wy-nav-content {
    padding-top: 40px;
}

body:has(.ftj-manual-meta) .rst-content h1 {
    margin-bottom: 10px;
    font-size: 2.3rem;
    letter-spacing: -0.025em;
}

body:has(.ftj-manual-meta) .ftj-manual-meta {
    margin-bottom: 24px;
}

.ftj-home-intro {
    position: relative;
    margin: 0 0 36px;
    padding: 20px 22px 18px 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 72%);
    border: 1px solid #dbeafe;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(16, 24, 40, 0.045);
}

.ftj-home-intro::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    content: "";
    background: var(--ftj-accent);
}

.ftj-home-intro p {
    max-width: 820px !important;
    margin: 0;
    color: #344054;
    font-size: 15px;
    line-height: 1.65;
}

.ftj-home-intro p:first-child {
    color: #1d2939;
    font-size: 16px;
    font-weight: 600;
}

.ftj-home-intro p + p {
    margin-top: 7px;
    color: #667085;
    font-size: 15px;
}

body:has(.ftj-manual-meta) .rst-content .rubric {
    position: relative;
    margin: 34px 0 15px;
    padding-left: 13px;
    color: #1d2939;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.012em;
}

body:has(.ftj-manual-meta) .rst-content .rubric::before {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 4px;
    content: "";
    background: var(--ftj-accent);
    border-radius: 999px;
}

/* ---------- Start here ---------- */

.ftj-home-start-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

.ftj-home-start-card {
    position: relative;
    min-height: 188px;
    padding: 48px 20px 18px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.055);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.ftj-home-start-card::after {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    content: "";
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 55%, #bfdbfe 100%);
}

.ftj-home-start-card::before {
    position: absolute;
    top: 16px;
    left: 20px;
    display: grid;
    width: 26px;
    height: 22px;
    place-items: center;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.ftj-home-start-card-setup::before {
    content: "01";
}

.ftj-home-start-card-trade::before {
    content: "02";
}

.ftj-home-start-card-data::before {
    content: "03";
}

.ftj-home-start-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.09);
    transform: translateY(-2px);
}

.ftj-home-start-card > p {
    margin: 0;
}

.ftj-home-start-card > p:first-child a {
    color: #101828;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.ftj-home-start-card > p:first-child a:hover {
    color: #1d4ed8;
    text-decoration: none;
}

.ftj-home-start-card > p:nth-child(2) {
    margin-top: 9px;
    color: #667085;
    font-size: 14px;
    line-height: 1.55;
}

.ftj-home-start-card > p:last-child {
    margin-top: 18px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 650;
}

.ftj-home-start-card > p:last-child a {
    color: #2563eb;
    text-decoration: none;
}

.ftj-home-start-card > p:last-child a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ---------- Explore FTJ ---------- */

.ftj-home-explore-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.ftj-home-feature {
    position: relative;
    min-height: 92px;
    padding: 14px 16px 13px 42px;
    background: #fbfcfe;
    border: 1px solid #edf0f4;
    border-radius: 11px;
    transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.ftj-home-feature::before {
    position: absolute;
    top: 18px;
    left: 17px;
    width: 10px;
    height: 10px;
    content: "";
    background: #dbeafe;
    border: 3px solid #3b82f6;
    border-radius: 4px;
    box-sizing: border-box;
}

.ftj-home-feature:hover {
    background: #f8fbff;
    border-color: #cfe1fb;
    transform: translateY(-1px);
}

.ftj-home-feature > p {
    margin: 0;
}

.ftj-home-feature > p:first-child a {
    color: #1d2939;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.ftj-home-feature > p:first-child a:hover {
    color: #1d4ed8;
}

.ftj-home-feature > p:last-child {
    margin-top: 4px;
    color: #667085;
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Reference ---------- */

.ftj-home-reference-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
}

.ftj-home-reference-item {
    min-height: 96px;
    padding: 16px 17px;
}

.ftj-home-reference-item + .ftj-home-reference-item {
    border-left: 1px solid #e4e7ec;
}

.ftj-home-reference-item > p {
    margin: 0;
}

.ftj-home-reference-item > p:first-child a {
    color: #344054;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ftj-home-reference-item > p:first-child a:hover {
    color: #1d4ed8;
}

.ftj-home-reference-item > p:last-child {
    margin-top: 5px;
    color: #7b8494;
    font-size: 13px;
    line-height: 1.5;
}

body:has(.ftj-manual-meta) footer {
    margin-top: 42px;
}

@media screen and (max-width: 1050px) and (min-width: 769px) {
    .ftj-home-start-grid {
        grid-template-columns: 1fr;
    }

    .ftj-home-start-card {
        min-height: 0;
    }

    .ftj-home-explore-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    body:has(.ftj-manual-meta) .rst-content h1 {
        font-size: 1.9rem;
    }

    .ftj-home-intro {
        padding: 17px 18px 16px 20px;
    }

    .ftj-home-start-grid,
    .ftj-home-explore-grid,
    .ftj-home-reference-grid {
        grid-template-columns: 1fr;
    }

    .ftj-home-start-card {
        min-height: 0;
    }

    .ftj-home-reference-item + .ftj-home-reference-item {
        border-top: 1px solid #e4e7ec;
        border-left: 0;
    }
}
