/* Tuotu Astro-projektista: src/styles/mobile/guide.css (bin/sync-astro.py). */
/* Mobile round (Tapio, 2026-09-25): The beginner's guide (/hakukoneoptimointiopas-aloittelijalle/) on phones: type sizes, clearly separated sections.
   Loaded after wp.css (src/layouts/Site.astro). Phone and tablet rules only: desktop stays as it is. */

/* Phones only (<=767 px), the beginner's guide only (body.is-opas). Presentation: its
   text, headings, heading levels and address stay as they are (the site's most-read page,
   #1 on Google). Tapio: "Optimize the font size. Make sure the sections are clearly
   separated in mobile." */
@media (max-width: 767px) {
  /* Reading size: 17 px with more line spacing (the site's phone body text is 16 px,
     wp.css). The demos, logos and Google-result mocks keep their own sizes. */
  html body.is-opas main :is(p:not(.eyebrow, .lede, .icon-card-label), li):not(.gd *, .ai-demo *, .opt *, .aic *, .quiz *, .ref-show *, .logo-wall *, .est-ui *, .opas-hero-figures *):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
    font-size: 17px !important;
    line-height: 1.62 !important;
  }

  /* The subtitle under a heading stays a step above the text. */
  html body.is-opas main .feature-row-copy > .lede:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
  html body.is-opas main .section-intro > .lede:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
    font-size: 19px !important;
    line-height: 1.5 !important;
  }

  /* Main sections (a row headed by an h2) open with an accent bar, a bigger heading
     and more room above; their sub-sections (1.1, 1.2 ... rows headed by an h3) stay
     tighter under them, so the reader sees where a new part begins. */
  html body.is-opas main > section.feature-row--rails:has(.feature-row-copy > h2) > .wrap > .feature-row-copy:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
    padding-top: 4.5rem;
  }

  html body.is-opas main > section.feature-row--rails:has(.feature-row-copy > h2) .feature-row-copy > h2:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *))::before,
  html body.is-opas main > section.landing-section--rails .section-intro > h2:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *))::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 3px;
    margin-bottom: 1.25rem;
    border-radius: 2px;
    background: var(--gh-accent);
  }

  html body.is-opas main > section.feature-row--rails .feature-row-copy > h2.feature-row-title:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
    font-size: 1.625rem !important;
    line-height: 1.2 !important;
  }

  html body.is-opas main > section.feature-row--rails:has(.feature-row-copy > h3) > .wrap > .feature-row-copy:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
    padding-block: 2.75rem 2.5rem;
  }

  /* The line above a main section, brighter than the line between its sub-sections. */
  html body.is-opas main > section.feature-row--rails:has(+ section.feature-row--rails .feature-row-copy > h2):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
    border-bottom-color: color-mix(in srgb, var(--gh-text) 24%, transparent);
  }

  /* Cut-out portraits and tall pictures no longer fill a whole screen. */
  html body.is-opas main .feature-row--rails .feature-row-media.wp-media img:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
    width: auto;
    max-height: 24rem;
    margin-inline: auto;
  }
}
