/* =========================================================================
   HOMEPAGE — the hero, the tools, and the newest tests and exercises.
   Every rule starts with .toeic-home: the theme styles headings, lists and
   links inside page content (.entry-content h2 and so on), and those would
   beat a single class.
   ========================================================================= */
.toeic-home {
    padding: 8px 0 48px;
    color: #1f2937;
}

.toeic-home h1,
.toeic-home h2,
.toeic-home h3,
.toeic-home p,
.toeic-home ul,
.toeic-home ol {
    margin: 0;
    padding: 0;
}

.toeic-home ul,
.toeic-home ol {
    list-style: none;
}

/* Hero: what the site is for and where to start; beside it, what every test has. */
.toeic-home .toeic-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    padding: 44px 40px;
    border: 1px solid #dde5ef;
    border-radius: 16px;
    background: #f1f5fa;
}

.toeic-home .toeic-home-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    color: #1f2937;
}

.toeic-home .toeic-home-intro {
    margin-top: 14px;
    font-size: 18px;
    line-height: 1.6;
    color: #1f2937;
}

.toeic-home .toeic-home-actions {
    display: flex;
    margin-top: 24px;
}

/* The theme colours focused and hovered links, so each base rule lists :focus and each
   :hover rule sets every colour. Links are named through their parent: the theme underlines
   links in page content with .ast-single-post .entry-content a, which beats two classes. */
.toeic-home .toeic-home-actions .toeic-home-button,
.toeic-home .toeic-home-actions .toeic-home-button:focus {
    display: inline-block;
    padding: 13px 22px;
    border: 1px solid #1a3a5c;
    border-radius: 10px;
    background: #1a3a5c;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}

.toeic-home .toeic-home-actions .toeic-home-button:hover {
    border-color: #24507d;
    background: #24507d;
    color: #ffffff;
}

.toeic-home a:focus-visible {
    outline: 2px solid #2b65a5;
    outline-offset: 2px;
}

.toeic-home .toeic-home-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 24px;
    font-size: 15px;
    color: #4b5563;
}

.toeic-home .toeic-home-stats strong {
    font-size: 17px;
    color: #1f2937;
}

.toeic-home .toeic-home-hero-card {
    padding: 22px 24px;
    border: 1px solid #dde5ef;
    border-radius: 14px;
    background: #ffffff;
}

.toeic-home .toeic-home-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #1f2937;
}

.toeic-home .toeic-home-checklist {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.toeic-home .toeic-home-checklist li {
    display: flex;
    gap: 10px;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
}

/* A fixed box, so the text doesn't move when the icon font arrives. */
.toeic-home .toeic-home-checklist i {
    flex: none;
    width: 16px;
    margin-top: 4px;
    color: #1a7f4b;
}

/* Sections */
.toeic-home .toeic-home-section {
    margin-top: 48px;
}

.toeic-home .toeic-home-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
}

.toeic-home .toeic-home-section-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: #1f2937;
}

.toeic-home .toeic-home-section-head .toeic-home-more,
.toeic-home .toeic-home-section-head .toeic-home-more:focus {
    font-size: 16px;
    font-weight: 600;
    color: #1a3a5c;
    text-decoration: none;
}

.toeic-home .toeic-home-section-head .toeic-home-more:hover {
    color: #24507d;
    text-decoration: underline;
}

/* Tools: four cards. */
.toeic-home .toeic-home-tools {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.toeic-home .toeic-home-tool {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 24px;
    border: 1px solid #d9e1ea;
    border-radius: 14px;
    background: #ffffff;
}

.toeic-home .toeic-home-tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e6effa;
    color: #1a3a5c;
    font-size: 19px;
}

.toeic-home .toeic-home-tool-title {
    margin-top: 16px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: #1f2937;
}

.toeic-home .toeic-home-tool-text {
    flex-grow: 1;
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
}

.toeic-home .toeic-home-tool .toeic-home-tool-link,
.toeic-home .toeic-home-tool .toeic-home-tool-link:focus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1a3a5c;
    text-decoration: none;
}

.toeic-home .toeic-home-tool .toeic-home-tool-link:hover {
    color: #24507d;
    text-decoration: underline;
}

/* Newest tests: tiles of five, like a book's ten tests in two rows. */
.toeic-home .toeic-home-tests {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

/* Newest exercises: four a row, a test's four parts side by side, in the same tiles. */
.toeic-home .toeic-home-exercises {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.toeic-home .toeic-home-test {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 16px;
    border: 1px solid #d9e1ea;
    border-radius: 12px;
    background: #ffffff;
}

.toeic-home .toeic-home-test-title {
    flex-grow: 1;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
    overflow-wrap: break-word;
    text-wrap: balance;
}

.toeic-home .toeic-home-test .toeic-home-test-start,
.toeic-home .toeic-home-test .toeic-home-test-start:focus {
    padding: 8px 12px;
    border: 1px solid #1a3a5c;
    border-radius: 8px;
    background: #1a3a5c;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}

.toeic-home .toeic-home-test .toeic-home-test-start:hover {
    border-color: #24507d;
    background: #24507d;
    color: #ffffff;
}

/* Narrower screens: the hero card below the text, two tools and two tiles a row. */
@media (max-width: 1000px) {
    .toeic-home .toeic-home-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .toeic-home .toeic-home-tools,
    .toeic-home .toeic-home-tests,
    .toeic-home .toeic-home-exercises {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phones: one tool a row and a smaller hero. */
@media (max-width: 600px) {
    .toeic-home .toeic-home-tools {
        grid-template-columns: minmax(0, 1fr);
    }

    .toeic-home .toeic-home-hero {
        padding: 26px 18px;
    }

    .toeic-home .toeic-home-title {
        font-size: 30px;
    }

    .toeic-home .toeic-home-intro {
        font-size: 16px;
    }

    .toeic-home .toeic-home-actions .toeic-home-button {
        flex: 1 1 auto;
        text-align: center;
    }

    .toeic-home .toeic-home-section {
        margin-top: 36px;
    }

    .toeic-home .toeic-home-section-title {
        font-size: 24px;
    }

    .toeic-home .toeic-home-tests,
    .toeic-home .toeic-home-exercises {
        gap: 10px;
    }

    .toeic-home .toeic-home-test {
        padding: 12px;
    }
}
