/* ==========================================================================
   core.css: the core pages in the Exercise Book look (restyle ticket 08)
   Home, About, How it works, Pricing, Testimonials, Privacy, 404 and the 听写 reader name it in front matter
   (extra_css: [core]). Everything else comes from site.css; colours only through its tokens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page template (home, 404): the page's own sections sit in the reading column, or the wide one on the home page
   -------------------------------------------------------------------------- */
.page-main { display: block; }
.column-wide { max-width: calc(1040px + 2 * var(--gutter)); }
/* The header and footer line up with a wide page (the home page) instead of the reading column. */
body:has(.column-wide) .site-header-inner, body:has(.column-wide) .site-footer-inner { max-width: calc(1040px + 2 * var(--gutter)); }

/* --------------------------------------------------------------------------
   Home: the intro on the practice grid, the three tools, the reviews
   -------------------------------------------------------------------------- */
.home-intro { padding-top: 28px; padding-bottom: 28px; }
.home-intro h1 { margin-top: 0; }
.home-intro .sub { max-width: 34em; }

.home-section > h2 { margin-top: 44px; }
.home-section > .lede { max-width: 40em; color: var(--muted); }

/* The tools: a ruled list on a phone, three ruled columns on a laptop. */
.tools { list-style: none; margin: 0; padding: 0; }
.tool { margin: 0; padding: 18px 0 22px; border-bottom: 1px solid var(--soft); }
.tool:last-child { border-bottom: 0; }
.tool .kicker { margin-bottom: 6px; }
.tool h3 { margin: 0 0 8px; font-size: 23px; }
.tool-desc { margin: 0 0 12px; }
.tool-features { margin: 0 0 16px; padding-left: 1.1em; color: var(--muted); font-size: 15px; }
.tool-features li { margin: .2em 0; }
.tool-link { font-weight: 700; }
.tool-link::after { content: "\00a0\2192"; }

/* The reviews: three ruled lists of links. */
.resource-group h3 { margin: 28px 0 0; padding-bottom: 8px; font-size: 19px; border-bottom: 2px solid var(--ink); }
.resource-group .ruled-list { border-top: 0; }
.resource-group .ruled-title { font-size: 17px; }

@media (min-width: 900px) {
    .tools, .resource-groups { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 40px; }
    .tool { padding: 16px 0 0; border-bottom: 0; border-top: 1px solid var(--soft); }
    .tool:last-child { border-bottom: 0; }
    .home-section > h2 + .tools { margin-top: 4px; }
}

/* --------------------------------------------------------------------------
   Shared pieces of the article pages
   -------------------------------------------------------------------------- */
/* Two buttons side by side on a laptop, stacked on a phone (the ruled .note and the .cta-note under the buttons
   are site.css's). */
.cta-buttons { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
@media (min-width: 600px) {
    .cta-buttons { flex-direction: row; flex-wrap: wrap; }
    .cta-buttons .btn { min-width: 0; }
}

.contact-line { margin-top: 28px; }

/* --------------------------------------------------------------------------
   About: the six principles
   -------------------------------------------------------------------------- */
.principle { margin: 0; padding: 4px 0 10px; border-bottom: 1px solid var(--soft); }
.principle h3 { margin-top: 22px; margin-bottom: 4px; }
.principle .source { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

/* --------------------------------------------------------------------------
   How it works: what's in the deck, the three steps
   -------------------------------------------------------------------------- */
.features { list-style: none; margin: 8px 0 20px; padding: 0; }
.feature {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    align-items: start;
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--soft);
}
/* The character in a 田字格 practice box (the grid lines come from site.css .practice-grid-bg). */
.feature-mark {
    display: grid;
    place-items: center;
    width: 64px;
    aspect-ratio: 1;
    border: 1.5px solid var(--ink);
    font: 700 30px/1 var(--zh);
    color: var(--ink);
}
.feature-mark.small { font: 700 15px/1 var(--serif); white-space: nowrap; }
.feature-mark.two { font-size: 22px; }
.feature h3 { margin: 2px 0 4px; font-size: 18px; }
.feature p { margin: 0; font-size: 15px; color: var(--muted); }

.steps { list-style: none; margin: 8px 0 24px; padding: 0; }
.step {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    margin: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--soft);
}
.step-number { font: 700 34px/1 var(--serif); color: var(--red); }
.step h3 { margin: 2px 0 6px; }
.step p { margin: 0 0 8px; }

/* The three steps again, in one ruled strip. */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 24px 0; padding: 0; border: 1.5px solid var(--ink); }
.flow li { margin: 0; padding: 12px 10px; border-right: 1.5px solid var(--ink); font: 600 15px/1.3 var(--sans); color: var(--ink); }
.flow li:last-child { border-right: 0; }
.flow b { display: block; margin-bottom: 4px; font: 700 22px/1 var(--serif); color: var(--red); }

/* --------------------------------------------------------------------------
   Pricing: the two plans, the cost table, what's included, the questions
   -------------------------------------------------------------------------- */
.plan { padding-bottom: 8px; }
.plan > h2 { margin-bottom: 4px; }
.price { margin: 4px 0 2px; font: 700 40px/1.1 var(--serif); color: var(--ink); }
.plan-note { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.plan .check { margin-bottom: 18px; }
.plan .btn + .plan-note { margin-top: 18px; margin-bottom: 8px; }
.plan .practice-boxes { margin-bottom: 8px; }
.plan .practice-boxes > a { aspect-ratio: auto; min-height: 52px; font-size: 20px; }

.cost-table td:first-child { width: 62%; }
.cost-table td.good, .cost-table td.bad { font: 700 17px/1.3 var(--serif); white-space: nowrap; }
.cost-detail { display: block; font-size: 14px; color: var(--muted); }

@media (min-width: 600px) {
    .check.included { column-count: 2; column-gap: 28px; }
    .check.included > li { break-inside: avoid; }
}

.faq-item { padding: 2px 0 6px; border-bottom: 1px solid var(--soft); }
.faq-question { margin: 18px 0 6px; font-size: 18px; }

/* --------------------------------------------------------------------------
   Testimonials: each message a quote with the red margin rule
   -------------------------------------------------------------------------- */
.quote .kicker { margin: 0 0 6px; font-style: normal; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.page-404 .page-hero { padding-left: 0; padding-right: 0; }
.page-404 .page-hero .kicker { font-size: 14px; }
.page-404 > h2 { margin-top: 44px; }
