/* No palette, typefaces or type scale here: colour and type belong to each page; this file is layout only. */
/* The overlay lives in zone-overlay.css: the homepage loads it WITHOUT this file. */
@import url("zone-overlay.css");

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;          /* never 100vh alone on a phone: it is the tall state, too tall while the address bar shows */
}

/* On BOTH html and body (body alone still scrolls sideways); clip, not hidden, so sticky descendants keep working. */
html, body { overflow-x: hidden; overflow-x: clip; }

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.safe-bottom { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.safe-top    { padding-top: max(16px, env(safe-area-inset-top)); }

img, video, canvas, svg, iframe { max-width: 100%; height: auto; display: block; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

a, button, [role="button"], input, select, textarea, summary { touch-action: manipulation; }
.tap { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

.back {
  position: fixed; top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left));
  z-index: 50; min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  color: inherit; text-decoration: none; opacity: .55;
  font: inherit; font-size: 13px; letter-spacing: .14em; text-transform: lowercase;
  transition: opacity .18s ease;
}
.back:hover, .back:focus-visible { opacity: 1; }
.back:active { opacity: 1; scale: 0.92; }
.back + main { padding-top: 34px; }
.back { -webkit-tap-highlight-color: transparent; }
.back::before { content: "←"; font-size: 15px; letter-spacing: 0; }

.prose { max-width: 65ch; line-height: 1.65; }
.prose :is(h1,h2,h3) { text-wrap: balance; line-height: 1.2; }

/* Selection is off sitewide: any email or text a visitor must copy needs a copy button or .is-selectable. */
html { -webkit-user-select: none; -moz-user-select: none; user-select: none; }

.is-selectable, .is-selectable *,
input, textarea, [contenteditable] {
  -webkit-user-select: text; -moz-user-select: text; user-select: text;
}

img, video {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none; -webkit-user-select: none;
}

html, body { overscroll-behavior: none; }
