/* starter: colours and fonts are the custom properties in tokens.css (a media file of the site); the site settings
   `accent` and `tokens` override single ones. */
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.6 var(--sans); color: var(--fg); background: var(--bg); }
a { color: var(--accent); }
.site-header, main, .site-footer { max-width: 44rem; margin: 0 auto; padding: 1rem; }
.site-header { display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.brand { font-weight: 700; text-decoration: none; color: var(--fg); }
.meta, time, .site-footer { color: var(--muted); font-size: 0.9rem; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 0 0.5rem; }
.posts ul { list-style: none; padding: 0; }
.posts li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.25rem 0; border-bottom: 1px solid var(--line); }
img { max-width: 100%; height: auto; }
.skip { position: absolute; top: 0.5rem; inset-inline-start: 0.5rem; transform: translateY(-200%); background: var(--fg); color: var(--bg); padding: 0.5rem 0.75rem; border-radius: 0.5rem; z-index: 40; }
.skip:focus { transform: none; }
table { border-collapse: collapse; } td, th { border: 1px solid var(--line); padding: 0.25rem 0.5rem; }
.langs { display: flex; gap: 0.5rem; font-size: 0.9rem; }
.langs a[aria-current="true"] { font-weight: 700; color: var(--fg); text-decoration: none; }

/* mobile menu: the nav, languages and buttons move into a drawer from the reading-end side. Without script the
   header simply wraps (the menu button stays hidden and .menu is display: contents). */
.menu-btn, .menu-head, .menu-backdrop { display: none; }
.menu { display: contents; }
@media (max-width: 640px) {
  .has-menu .menu-btn, .has-menu .menu-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); cursor: pointer; }
  .has-menu .menu-btn { margin-inline-start: auto; }
  .has-menu .menu { display: flex; flex-direction: column; gap: 24px; position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 30;
    width: var(--drawer-width); padding: 12px 20px 24px; overflow-y: auto; background: var(--bg); border-inline-start: 1px solid var(--line);
    transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .has-menu[dir="rtl"] .menu { transform: translateX(-100%); }
  .has-menu.menu-open .menu { transform: none; visibility: visible; transition: transform .25s ease; }
  .has-menu .menu-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
  .menu-title { font-weight: 600; }
  .has-menu.menu-open .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 29; background: var(--backdrop); }
  .menu-open { overflow: hidden; }
  .has-menu .site-header { flex-wrap: nowrap; align-items: center; }
  .has-menu .menu .nav, .has-menu .menu .langs { flex-direction: column; gap: 0.25rem; }
  .has-menu .menu .nav a { padding: 0.5rem 0; }
}
@media (prefers-reduced-motion: reduce) { .menu { transition: none !important; } }
