/* Cravings app landing page (cravings-app.html). Builds on main.css and calculator.css. */

.cr-hero-note {
    margin-top: 16px;
    font-size: 14px;
    color: var(--gray-small-text);
}

.cr-hero-shot {
    max-width: 100%;
    max-height: 560px;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

/* App screenshots inside feature cards: show the whole screen instead of cropping it */
.feature-card-img.cr-shot {
    object-fit: contain;
    background: var(--white);
    padding: 32px;
}

.cr-section {
    padding: 80px 0;
}

.cr-section-tint {
    background: var(--white);
}

.cr-container {
    max-width: 880px;
}

.cr-section .section-header {
    margin-bottom: 40px;
}

.cr-subtitle {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #020817;
    margin: 40px 0 16px;
}

.cr-prose p,
.cr-prose li {
    font-size: 17px;
    line-height: 1.7;
    color: var(--gray-text);
}

.cr-prose p {
    margin-bottom: 16px;
}

.cr-prose ul {
    padding-left: 22px;
    margin-bottom: 16px;
}

.cr-prose li {
    margin-bottom: 10px;
}

.cr-prose a,
.cr-faq a {
    color: var(--dark-green);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Formula table */
.cr-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 32px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--card-shadow);
}

.cr-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.5;
    color: var(--gray-text);
}

.cr-table th,
.cr-table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-border);
    vertical-align: top;
}

.cr-table th {
    font-weight: 700;
    color: var(--off-black);
    background: var(--light-green);
}

.cr-table tr:last-child td {
    border-bottom: none;
}

.cr-table td:nth-child(2) {
    font-weight: 700;
    color: var(--off-black);
    white-space: nowrap;
}

/* Score tool */
.cr-calc {
    margin-bottom: 32px;
}

@container (min-width: 520px) {
    .cr-row-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .cr-cards-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@container (min-width: 680px) {
    .cr-cards-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.cr-optional {
    font-weight: 400;
    color: var(--gray-small-text);
    font-size: 13px;
}

.calc-hint.cr-hint-tight {
    margin-top: -16px;
}

.cr-result {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-border);
}

.cr-result-empty {
    font-size: 15px;
    color: var(--gray-small-text);
}

.cr-score-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.cr-score {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 34px;
    font-weight: 700;
    text-align: center;
    line-height: 1;
}

.cr-score.cr-high {
    background: var(--light-green);
    color: var(--dark-green);
}

.cr-score.cr-mid {
    background: #FDEBD8;
    color: #D9730D;
}

.cr-score.cr-low {
    background: var(--red-low-opacity);
    color: var(--red);
}

.cr-score-label {
    font-size: 19px;
    font-weight: 700;
    color: var(--off-black);
    margin-bottom: 4px;
}

.cr-score-tip {
    font-size: 15px;
    line-height: 1.5;
    color: var(--gray-text);
}

.cr-breakdown {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

@container (min-width: 520px) {
    .cr-breakdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cr-breakdown li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #FAFAFA;
    font-size: 15px;
    color: var(--off-black);
}

.cr-breakdown li span:last-child {
    font-weight: 700;
    white-space: nowrap;
}

.cr-breakdown li.cr-na span:last-child {
    font-weight: 400;
    color: var(--gray-small-text);
}

.cr-cta-inline {
    text-align: center;
}

.cr-cta-inline p {
    font-size: 17px;
    color: var(--gray-text);
    margin-bottom: 16px;
}

.cr-cta-inline .hero-app-buttons {
    justify-content: center;
}

/* FAQ */
.cr-faq .faq-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-border);
}

.cr-faq .faq-item:last-child {
    border-bottom: none;
}

.cr-faq h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--off-black);
    margin-bottom: 8px;
}

.cr-faq p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--gray-text);
}

.cr-medical {
    margin-top: 32px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-small-text);
}

@media (max-width: 767px) {
    .cr-section {
        padding: 56px 0;
    }

    .cr-subtitle {
        font-size: 22px;
    }

    /* main.css widens feature images to 550px on phones; keep screenshots whole */
    .feature-card-img.cr-shot {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        padding: 24px 24px 32px;
    }

    .cr-hero-shot {
        max-height: 480px;
    }
}
