/* pages.css: main-site layer on landing.css (which stays identical to site/fallback.css). Layout scoped to body.site;
   404.html (no class, keeps the landing.css grid) also links it for the AA colour fixes.
   No URL functions, no imports: local, self-contained. @trace REQ-WEB-4 REQ-WEB-5 */
body.site { display: block; place-items: normal; padding: 0; overflow-wrap: break-word; }
.skip { position: absolute; left: -999px; top: 0.5rem; padding: 0.5rem 1rem; background: var(--main); color: var(--bg); }
.skip:focus { left: 0.5rem; z-index: 2; }
:focus-visible { outline: 3px solid var(--main); outline-offset: 3px; }
main[tabindex="-1"]:focus { outline: none; }                    /* skip target: no ring around all of <main> */
/* Header: static on phones (it wraps to 2-3 rows); sticky only where it fits one row (W-2). */
.site-header { background: var(--bg); border-bottom: 1px solid var(--note); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; max-width: 64rem; margin: 0 auto; padding: 0.25rem 1rem; }
.site-header a { color: var(--main); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-header a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.site-header .brand { font-weight: 800; margin-right: auto; }
@media (min-width: 48rem) {
  .site-header { position: sticky; top: 0; z-index: 1; }
  html { scroll-padding-top: 4.5rem; }                           /* one-row header = 44px + padding + border < 4.5rem */
}
/* Home: landing.css centred .layout via body grid; body.site is block, so centre and pad here (W-3). */
.home { padding: 1rem; }
.home .layout { margin: 1rem auto 2rem; }
.section { max-width: 44rem; margin: 0 auto; padding: 1.5rem 0.5rem; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.features li { padding: 1rem; border-radius: 1rem; background: var(--art-bg); color: var(--main); line-height: 1.5; }
.home .cta { max-width: 22rem; margin-inline: auto; }
.home > .note { max-width: 25rem; margin-inline: auto; }        /* top banner lines up with .layout (landing.css widths) */
@media (min-width: 40rem) { .home { padding: 2rem; } .features { grid-template-columns: 1fr 1fr; } .home > .note { max-width: 28rem; } }
@media (min-width: 56rem) { .section, .home > .note { max-width: 64rem; } }
/* Text on tinted backgrounds uses --main: --desc measured below 4.5:1 on --note / --art-bg (W-1). */
.page .note, .home .note, .steps li { color: var(--main); }
/* landing.css .lead-en (--desc at opacity 0.85) and .footer (--footer) measure 3.46:1 and 3.20:1 on light --bg. Same
   specificity, so these win by load order on every page that links pages.css after landing.css (main site, 404). */
.lead-en { opacity: 1; }
.footer { color: var(--desc); }
.page { max-width: 44rem; margin: 0 auto; padding: 2rem 1rem 3rem; line-height: 1.65; }
.page a, .site-footer a, .section a { color: var(--primary); text-decoration: underline; }
.toc ol, .toc ul { padding-left: 1.25rem; }                      /* privacy TOC: article list, sub-sections nested */
.page table { width: 100%; border-collapse: collapse; } .page th, .page td { border: 1px solid var(--note); padding: 0.5rem; text-align: left; vertical-align: top; }
/* Wide tables scroll inside their own focusable region, not the page (W-8: 559px table at a 375px viewport). */
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 36rem; }
.table-wrap:focus-visible { outline: 3px solid var(--main); outline-offset: 3px; }
.faq summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; } .faq details[open] summary::after { content: "\2212"; }
.site-footer { max-width: 64rem; margin: 0 auto; padding: 1.5rem 1rem 2rem; color: var(--desc); font-size: 0.875rem; text-align: center; }
@media (prefers-color-scheme: dark) { .page a, .site-footer a, .section a { color: var(--badge-fg); } }
/* A link inside a tinted note: light --primary on --note measured 4.39:1, so it keeps the note's --main text colour. */
.page .note a, .home .note a, .section .note a { color: inherit; }
/* A store button (<a class="install|cta">) keeps its landing.css look: (0,2,1), last, beats every .section link rule above. */
.section a.install, .section a.cta { color: var(--primary-fg); text-decoration: none; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* FAQ <details> ship with `open` (14/15): print shows every answer; CSS alone cannot open a closed one. */
@media print {
  .site-header, .skip, .cta, .faq summary::after { display: none; }
  body.site { background: #fff; color: #000; }
  .table-wrap { overflow-x: visible; } .table-wrap table { min-width: 0; }   /* paper does not scroll: fit, never clip */
  .page a[href^="/"]::after { content: " (https://www.dauroi.io.vn" attr(href) ")"; }
}
