/* Plumbing only. Defaults every site needs, with no look of their own: no colours,
   no typefaces, no spacing. The look lives in site.css, the animations in motion.css.
   This file rarely changes. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first allow-end last;
  /* anchors land below a sticky bar; site.css sets --bar-height */
  scroll-padding-top: calc(var(--bar-height, 0px) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html:focus-within { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, address { margin: 0; }
address { font-style: normal; }

/* headings never leave one word alone on a line; paragraphs avoid it where they can */
h1, h2, h3, h4, h5, h6, caption, figcaption { text-wrap: balance; }
p, li, dd, blockquote { text-wrap: pretty; }

:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }

img, picture, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
/* a picture that fails shows its alt text, set apart, instead of a broken icon */
img { font-style: italic; }

input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: from-font; }

/* hours and prices line up in columns */
table { border-collapse: collapse; }
td, th, time, data { font-variant-numeric: tabular-nums; }
th { text-align: start; font-weight: inherit; }

[hidden] { display: none !important; }

/* focus is always visible from the keyboard, in the site's own colour */
:focus-visible { outline: 2px solid var(--focus, currentColor); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--selection, Highlight); color: var(--selection-ink, HighlightText); }

/* for screen readers only */
.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  z-index: 100;
  inset: 8px auto auto 8px;
  padding: 12px 16px;
  background: var(--paper, Canvas);
  color: var(--ink, CanvasText);
  translate: 0 -200%;
}
.skip:focus { translate: none; }

/* An empty status line takes no room: open-now.js fills it when scripts run. */
[data-open-now]:empty { display: none; }

/* ---------------------------------------------------------------- the menu --
   One menu that works with scripts off. On phones the button opens it as a popover
   (Escape and a tap outside close it). From 56em up it is an ordinary row of links.
   site.css styles both. If you move the breakpoint, move it in site.css too. */
.menu-button { display: none; }

@media (max-width: 55.99em) {
  @supports selector(:popover-open) {
    .menu-button { display: inline-block; }
  }
}

@media (min-width: 56em) {
  .menu:not(:popover-open),
  .menu {
    display: block;
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    overflow: visible;
  }
}

/* browsers without popovers get the links as they are */
@supports not selector(:popover-open) {
  .menu { display: block; }
}

@media print {
  .bar, .menu-button, .skip { display: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
