/*
 * Site quality pass — 2026-08-17
 * Shared readability, spacing, mobile, footer and accessibility refinements.
 * Intentionally does not restyle brand marks / per-section 「木」 identities.
 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}
body {
  text-rendering: optimizeLegibility;
}
main :where(h1, h2, h3) {
  text-wrap: balance;
}
main :where(p, li, dd) {
  text-wrap: pretty;
}
img,
svg,
video,
canvas {
  max-inline-size: 100%;
}
.site-skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 10000;
  translate: 0 -180%;
  padding: 10px 14px;
  border-radius: 8px;
  background: #171713;
  color: #fff;
  font: 700 14px/1.2 Arial, "Noto Sans TC", sans-serif;
  text-decoration: none;
  box-shadow: 0 8px 30px rgb(0 0 0 / 18%);
}
.site-skip-link:focus {
  translate: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Main editorial / hub pages */
.lead {
  font-size: 15.5px;
  line-height: 1.95;
}
.card p,
.recent p,
.article p {
  font-size: 14px;
  line-height: 1.8;
}
.recent small,
.article-index {
  font-size: 12px;
  line-height: 1.6;
}
.page-head p:not(.eyebrow),
.site-paths > div > p:not(.eyebrow) {
  font-size: 14px;
  line-height: 1.9;
}
.controls input,
.controls select {
  font-size: 14px;
}
.year p,
.tool-card > p:not(.tool-number),
.tool-card ul {
  font-size: 14px;
  line-height: 1.9;
}
.policy p {
  font-size: 15px;
  line-height: 1.95;
}

/* Shared dark footer used by the main site and N2 pages */
.footer p {
  font-size: 12.5px;
  line-height: 1.75;
}
.footer-links {
  gap: 12px 22px;
  font-size: 13px;
}
.footer-links a {
  min-block-size: 40px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.copyright {
  font-size: 11px;
  line-height: 1.6;
}

/* Hub / category reading rhythm */
.section-intro {
  font-size: 14px;
  line-height: 1.9;
}
.hub-featured p {
  font-size: 14px;
  line-height: 1.8;
}
.hub-featured span {
  font-size: 12.5px;
}
.category-page .category-hero p:not(.category-kicker),
.category-page .category-section-heading > p {
  font-size: 14px;
  line-height: 1.85;
}
.category-page .category-article p {
  font-size: 14px;
  line-height: 1.8;
}
.category-page .category-date {
  font-size: 12px;
}


/* Learning articles */
.learning-imported-article :where(p, li, dd) {
  line-height: 1.85;
}
.learning-site-context {
  font-size: 12.5px;
  line-height: 1.65;
}
.learning-related a > span {
  font-size: 13px;
  line-height: 1.65;
}
.learning-site-footer p {
  font-size: 13.5px;
  line-height: 1.7;
}
.learning-site-footer .learning-site-footer__copyright {
  font-size: 12.5px;
}

/* Tool family */
.breadcrumb ol {
  font-size: 12px;
  line-height: 1.6;
}
.usage-guide ol,
.faq-section details p,
.faq-list p {
  font-size: 15px;
  line-height: 1.85;
}
.site-footer {
  font-size: 13px;
  line-height: 1.7;
}
.site-footer nav a {
  min-block-size: 40px;
  display: inline-flex;
  align-items: center;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ad-slot {
  font-size: 12px;
}

/* Bangkok is information-dense; raise only genuinely readable/supporting copy. */
.overview-mode .topnote,
.overview-mode .section-title p,
.overview-mode .field small,
.overview-mode .mini-help,
.overview-mode .location-status,
.overview-mode .map-note,
.overview-mode .distance-empty {
  font-size: 11.5px;
  line-height: 1.65;
}
.overview-mode .field > label,
.overview-mode fieldset legend,
.overview-mode .distance-row strong {
  font-size: 12px;
}
.overview-mode .distance-row small {
  font-size: 10.5px;
  line-height: 1.55;
}
.overview-mode .footer {
  font-size: 11.5px;
  line-height: 1.75;
}
.overview-mode .footer-links a {
  min-block-size: 40px;
  display: inline-flex;
  align-items: center;
}

/* Visa guide pages: long-form copy is easier to scan with a calmer line-height. */
body.bg-thai-silk main :where(p, li),
body.bg-malay-batik main :where(p, li) {
  line-height: 1.85;
}
body.bg-thai-silk footer,
body.bg-malay-batik footer {
  line-height: 1.7;
}

@media (max-width: 700px) {
  .shell {
    width: min(1120px, calc(100% - 32px));
  }
  .section {
    padding-block: 56px;
  }
  .page-head {
    padding-block: 64px 42px;
  }
  .list {
    padding-block: 48px;
  }
  .card p,
  .recent p,
  .article p,
  .category-page .category-article p {
    font-size: 14.5px;
    line-height: 1.82;
  }
  .site-footer,
  .learning-site-footer__inner {
    row-gap: 12px;
  }
  .footer-links a,
  .site-footer nav a,
  .learning-site-footer nav a {
    min-block-size: 44px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding-block-start: 38px;
  }
  .footer-links {
    gap: 4px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Keyboard focus and touch-target reinforcement for legacy travel guides. */
body.bg-thai-silk :where(a, button, input, select, textarea):focus-visible,
body.bg-malay-batik :where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid currentColor !important;
  outline-offset: 3px !important;
}
body.bg-thai-silk #mobile-menu-btn,
body.bg-malay-batik #mobile-menu-btn {
  min-inline-size: 44px;
  min-block-size: 44px;
  display: inline-grid;
  place-items: center;
}
