/* VG Tak: fixes the compiled header's layout (there is no source code; see CLAUDE.md).
   Loaded on every page with <link rel="stylesheet" href="/header-fix.css"/> before </head>.

   The desktop header (logo, "10+ ÅRS HANTVERK", six links, phone, button) needs about
   1,100 px, so between 768 and 1279 px the links ran into the tagline, the phone number and
   the button. There the six links move into the menu button (the same menu as on mobile),
   and at 1280-1439 px the tagline is hidden so the links have room.

   These rules are not in a cascade layer, so they win over the site's Tailwind utilities
   (which are in @layer utilities) without !important. */

@media (min-width: 768px) and (max-width: 1279.98px) {
  header nav > ul { display: none; }
  header nav > div { margin-left: auto; margin-right: 1rem; }
  header nav > button[aria-expanded] { display: flex; }
  [aria-modal="true"][aria-label="Huvudmeny"] { display: flex; }
}

@media (min-width: 1280px) and (max-width: 1439.98px) {
  header nav > a[href="/"] > span { display: none; }
}

/* Blog tables (.prose-vg table) can be wider than a phone screen, which made the whole page
   scroll sideways. Below 768 px each table scrolls sideways on its own instead. Only on phones,
   because a display:block table no longer stretches to the full column width. */
@media (max-width: 767.98px) {
  .prose-vg table { display: block; overflow-x: auto; }
}
