/* Global rules. Everything else lives in the inline styles that
   came from the design files, which are the source of truth for the layout. */

body { margin: 0; background: #FFFFFF; color: #17181A; -webkit-font-smoothing: antialiased; }
html { -webkit-text-size-adjust: 100%; }
/* #work and #mural would otherwise land under the sticky header */
html { scroll-padding-top: 96px; }
a { color: #1F3A5F; text-decoration: none; border-bottom: 1px solid rgba(31, 58, 95, .3); }
a:hover { color: #17181A; border-bottom-color: #17181A; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #1F3A5F; outline-offset: 2px; }

/* Header. The design assumes one line; below ~400px the wordmark and the nav
   collide, so let the row wrap and tighten the nav gap as the screen narrows. */
.site-header { gap: 10px clamp(14px, 4vw, 24px); flex-wrap: wrap; }
.site-nav { gap: clamp(15px, 3.5vw, 22px) !important; flex-wrap: wrap; }

/* Language toggle. Replaces the prototype's two buttons; same drawing. */
.lang { display: flex; border: 1px solid #D8D8D4; border-radius: 2px; }
.lang a { position: relative; display: block; padding: 6px 10px; border: none; background: transparent; color: #55585E; }
.lang a:hover { color: #17181A; }
.lang a:first-child { border-radius: 1px 0 0 1px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .08em; }
.lang a:last-child { border-radius: 0 1px 1px 0; font-family: 'Noto Serif SC', serif; font-size: 12px; }
.lang a[aria-current] { background: #17181A; color: #fff; }
@media (pointer: coarse) {
  /* 44px of touch target without changing the visible size */
  .lang a::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 44px; }
}

/* The 200px label column squeezes the prose on a phone: stack it instead.
   !important because the grid is declared inline, per the design. */
@media (max-width: 640px) {
  .lbl-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 10px 0 !important; }
  .lbl-grid > :nth-child(odd):not(:first-child) { margin-top: 32px; }
  .aside-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

@media print {
  a { color: inherit; border: none; }
  .lang, [style*="position:sticky"] { display: none !important; }
}
