/* subpages-light.css — 2026-11-20, audit groups 2 and 3.
   Linked ONLY from subpages and 404 (body.is-subpage). The landing (body.is-home) does not load this file,
   and every rule is scoped to body.is-subpage, so the landing cannot change.
   Rule from Alisa: no button on a subpage is taller than 40px (desktop and 390px). */

/* One source of the button height for the whole .btn family (styles.css:50 clamps it to 40–44px). */
body.is-subpage { --btn-h: 40px; }

@layer gw-rhythm {

  /* B1 · /brands/ and every brand page: white text on brand copper #8A4F30 (6.5:1) instead of #B8734E (3.8:1) */
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .prose-card-item a > p:last-child {
    background: #8A4F30 !important;
    color: #fff !important;
  }

  /* B4 · focus ring in the brand colour */
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid #8A4F30 !important;
    outline-offset: 3px !important;
    border-radius: 4px;
  }

  /* B9 · current page in the menu */
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-nav-link[aria-current] {
    color: #111 !important;
    font-weight: 700 !important;
    text-decoration: underline 2px #B8734E;
    text-underline-offset: 8px;
  }
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-dropdown-link[aria-current="page"],
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .mobile-menu-nav a[aria-current="page"] {
    font-weight: 700 !important;
  }

  /* Phone number in running text → tel: link */
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage a.gw-tel {
    color: #8A4F30 !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
  }

  /* Table row headers (first column) look like the old cells */
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .prose-content .md-table tbody th[scope="row"] {
    font-weight: 400 !important;
    color: var(--ink) !important;
    text-align: left !important;
  }
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .prose-content .md-table tbody th[scope="row"] strong {
    font-weight: 700 !important;
  }

  /* 404: links to popular pages */
  body.is-subpage .gw-404-links { margin-top: 28px; text-align: left; }
  body.is-subpage .gw-404-links__title { font-weight: 700; margin: 0 0 8px; }
  body.is-subpage .gw-404-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-404-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(59, 36, 24, .45);
    border-radius: 12px;
    color: #111;
    text-decoration: none !important;
    font-weight: 600;
    background: #fff;
  }

  /* ---- Heights ≤ 40px (Alisa: «knopky ne vysche 40») ---- */
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage a.skip-link,
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .skip-link {
    padding-block: 8px !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 22px !important;
  }
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage a.gw-back-btn,
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .header-menu-btn,
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage button.header-menu-btn {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    min-width: 40px !important;
  }
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage a.gw-back-btn { width: 40px !important; }
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .btn,
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage a.btn,
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage button.btn,
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-header-cta,
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage a.mobile-menu-cta {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }
  :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage :is(.aside-jump-list, .footer-col ul) a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    max-height: 40px;
  }
}

@layer gw-rhythm {
  @media (max-width: 767px) {
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-m-chip,
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-m-more-btn {
      height: 40px !important;
      min-height: 40px !important;
      max-height: 40px !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage a.gw-m-tap {
      min-height: 40px !important;
      max-height: 40px !important;
      padding-block: 9px !important;
      line-height: 22px !important;
      box-sizing: border-box !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage h3.gw-m-fold-h {
      min-height: 40px !important;
      max-height: 40px !important;
      box-sizing: border-box !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage a.mobile-menu-phone,
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .footer-col a[href^="tel:"],
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .footer-col a[href^="mailto:"] {
      min-height: 40px !important;
      max-height: 40px !important;
      line-height: 40px !important;
      padding-block: 0 !important;
    }
    /* phone buttons and rail arrows: 40px, same look */
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage a.gw-m-telbtn {
      min-height: 40px !important;
      height: 40px !important;
      max-height: 40px !important;
      margin-block: 0 !important;
      box-sizing: border-box !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage button.gw-m-railbtn {
      width: 40px !important;
      height: 40px !important;
      min-height: 40px !important;
      max-height: 40px !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-m-acc-h {
      min-height: 40px !important;
      line-height: 24px !important;
      padding-block: 7px !important;
      box-sizing: border-box !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-m-acc-h::after {
      top: 20px !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage button.gw-m-sheet-x {
      width: 40px !important;
      height: 40px !important;
      min-height: 40px !important;
      max-height: 40px !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage :is(p, li, dd) > a:is(.to-link-underline, .from-link-underline):not(.gw-m-tap):not(.gw-m-telbtn) {
      padding-block: 10px !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage :is(p, li, dd) > a:is(.to-link-underline, .from-link-underline):not(.gw-m-tap):not(.gw-m-telbtn)::after {
      bottom: 11px !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage :is(p, li, dd) > a.from-link-underline.tabular-nums:not(.gw-m-telbtn) {
      padding-block: 9px !important;
      line-height: 22px !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage :is(p, li, dd) > a.from-link-underline.tabular-nums:not(.gw-m-telbtn)::after {
      bottom: 10px !important;
    }
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-m-bar .gw-m-call,
    :root:root:root:root:root:root:root:root:root:root:root:root body.is-subpage .gw-m-bar .gw-m-req {
      min-height: 40px !important;
      height: 40px !important;
      max-height: 40px !important;
    }
  }
}
