:root {
  /* Half of a crossfade: the visible image fades out, the new src swaps in
     (already warmed by prefetchImg, so effectively instant), then it fades
     back in. app.js reads this value so JS timing can't drift from the CSS.
     Keep the unit in ms — app.js parses the number directly. */
  --fade: 180ms;
  /* Desktop: the column holding the name and the links, and the column of
     work beside it, centred together in the window so the links sit close to
     the images rather than out at the window's edge. A painting's size is set
     by the window's height, so the work column follows the height too: about
     as wide as the window is tall is just room for a typical landscape beside
     the thumbnails, and no wider, which keeps the links near the work.
     js/app.js mirrors these in SIZES_SERIES; change one, change the other. */
  --side: 14rem;
  --work: max(46rem, 100vh - 3rem);
  /* Desktop: the tallest a painting is drawn (about 71% of the window
     less 10rem: 80% of the space, enlarged 15%, then trimmed 10%, 5% and
     10% more), and the line every painting hangs from, which centres that
     tallest painting in the window. The name sits near the top, at
     --name-top; the links come down so the first of them is on the art
     line, and every view's content starts there. Never higher than 9.5rem,
     so a short window still leaves room between the name and the links. */
  --art-height: calc((100vh - 10rem) * 0.8 * 1.15 * 0.9 * 0.95 * 0.9);
  --art-top: max(9.5rem, (100vh - var(--art-height)) / 2);
  /* The name's top: a fifth of the way down from 5rem to the art line, so
     it stays near the top but keeps its distance from the links in step
     with the window. */
  --name-top: calc(5rem + (var(--art-top) - 5rem) * 0.2);
  /* The name, a word to a line, and the desktop links. The nav's top padding
     is worked out from these, so changing one keeps the links on the art
     line. */
  --name-size: 1.44rem;
  --name-leading: 1.25;
  --link-size: 0.86rem;
  /* The one highlight colour: the open page and series in the menu, and
     links under the pointer. Lapis lazuli, the deep blue of Afghan lapis
     with a touch of green in it, dark enough to read as text on white. */
  --accent: #1c5594;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.hp {
  position: absolute;
  left: -9999px;
}

.skip-nav {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: #222;
  color: #fff;
  font-size: 0.85rem;
  text-decoration: none;
}

.skip-nav:focus { left: 0; }

:focus-visible {
  outline: 2px solid #222;
  outline-offset: 2px;
}

/* The series view is a tabindex="-1" landing spot, not a control: app.js moves
   focus here when a series opens so a keyboard or screen-reader user lands in
   the new content instead of back at the top of the document. Nothing can Tab
   to it, so the ring marks no reachable target — it just draws a 1400px box
   around the whole view, which is what a visitor sees on any deep link, since
   Chrome treats programmatic focus with no prior interaction as keyboard
   focus. Controls inside it keep their rings. */
.series-view:focus,
.series-view:focus-visible { outline: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #fff;
  color: #222;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ---- Masthead: the name and the links ----
   The name sits at the top left with the links beneath it, set apart from
   the work so the images have a space of their own. Above 900px the two form
   a column that stays in place beside the work, the pair centred in the
   window (see the media query below); narrower screens stack them at the
   top, left-aligned, with a wide margin before the work. */
header {
  padding: 2.5rem 2rem 1rem;
}

header h1 {
  font-size: var(--name-size);
  font-weight: 400;
  line-height: var(--name-leading);
  letter-spacing: 0.2em;
}

/* The name is the way home. It stacks a word to a line: as narrow as its
   longest word, so each breaks onto its own line. It takes the highlight
   only under the pointer, and is dark the rest of the time, Home included. */
header h1 a {
  display: inline-block;
  width: min-content;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

header h1 a:hover { color: var(--accent); }

/* Wraps rather than overflows: the links plus their letter-spacing exceed a
   320px viewport, which is what body { overflow-x: hidden } used to mask.
   Wrapping keeps it contained regardless of how many links or how long a
   name the header carries. */
nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  padding: 0 2rem 3.5rem;
  font-size: 0.925rem;
  letter-spacing: 0.12em;
}

nav a {
  color: #777;
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover, nav a.active { color: var(--accent); }

nav a.ig { display: inline-flex; align-items: center; }
/* Deliberately quieter than the text links: the contact page is the way in.
   #949494 is about as light as it can go and still meet the 3:1 contrast a
   meaningful icon needs on white. */
nav a.ig svg { width: 13px; height: 13px; fill: #949494; transition: fill 0.2s; }
nav a.ig:hover svg { fill: var(--accent); }

/* A category's own series, listed while it is open: the only way between
   its series. Built by app.js. In the desktop column they sit under their
   category (see below); on a phone or tablet, where the links run in a row,
   they take a row of their own beneath. */
nav .subnav { display: none; }

@media (width <= 900px) {
  nav .subnav:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100%;
    order: 1;
    gap: 0.5rem 1.2rem;
    padding-top: 0.2rem;
    font-size: 0.85em;
    letter-spacing: 0.06em;
  }
}

/* The page is a grid of two columns, centred: the masthead down the first,
   sticky so it stays put as the page scrolls, and main above the footer in
   the second. Everything else in <body> is positioned or hidden, so takes no
   cell. */
@media (width > 900px) {
  body {
    display: grid;
    grid-template-columns: var(--side) minmax(0, var(--work));
    grid-template-rows: 1fr auto;
    justify-content: center;
    min-height: 100vh;
    padding: 0 3rem;
  }

  .masthead {
    grid-area: 1 / 1 / 3 / 2;
    align-self: start;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: var(--name-top) 1.5rem 2rem 0;
  }

  header { padding: 0; }

  /* The first link's letters sit on --art-top: what is left after the
     name's top, its two lines, and the space above a link's capitals (about
     a third of its size). */
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: calc(var(--art-top) - var(--name-top) - 2 * var(--name-size) * var(--name-leading) - 0.33 * var(--link-size)) 0 0;
    font-size: var(--link-size);
  }

  /* A category's series, indented under it, with room above, between and
     below them. */
  nav .subnav:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0.15rem 0 0.45rem 0.9rem;
    font-size: 0.79rem;
    letter-spacing: 0.06em;
  }

  nav a.ig { margin-top: 0.4rem; }

  /* Every view sits to the right of the column, starting level with the
     first link: a painting's top edge, or a text page's first line (see the
     end of the Contact rules for those pages). */
  main {
    grid-area: 1 / 2;
    min-width: 0;
    padding-top: var(--art-top);
  }

  footer { grid-area: 2 / 2; }
}

/* Thumbnails are real <button>s so Enter/Space, focus order, and AT role
   come from the platform instead of a tabindex/keydown shim. These strip the
   UA button chrome without touching the semantics. */
.thumb-rail .thumb {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  display: block;
  cursor: pointer;
}

/* View fade-in */
.fade-view {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.fade-view.in { opacity: 1; }

/* ---- Home slideshow ---- */
.home {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 3rem;
}

.home-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-slide .img-wrap {
  width: 100%;
  height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The home painting: at most 72% of the window's height, less 10% and then
   8% more, and 92% of the width on a phone, where the width limits it. */
.home-slide img {
  max-width: 92%;
  max-height: calc(72vh * 0.9 * 0.92);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border: 2px solid #e0e0e0;
}

/* The hero is a single static work, so it is visible from first paint — no
   JavaScript involved. These are the crossfade states the slideshow drove; they
   pair with the commented-out markup in index.html and slideshow in js/app.js.
.home-slide img { opacity: 0; transition: opacity var(--fade) ease; }
.home-slide img.visible { opacity: 1; }
.home-slide img.fading { opacity: 0; } */

.home-nav {
  position: absolute;
  top: 40%;
  background: none;
  border: none;
  color: #767676;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
  user-select: none;
}

.home-nav:hover { color: var(--accent); }
.home-prev { left: 0.5rem; }
.home-next { right: 0.5rem; }

/* ---- Series: one at a time ----
   app.js builds a section per series of the open category, and marks the one
   chosen in the menu as current. Only that one shows. */
.series-view {
  display: flex;
  gap: 1.5rem;
  height: calc(100vh - 160px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.series-view:not(.current) { display: none; }


/* Main image area */
.main-image {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: calc(100vh - 280px);
}

.main-image img {
  max-width: 100%;
  max-height: calc((100vh - 280px) * 0.9);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border: 2px solid #e0e0e0;
  transition: opacity var(--fade) ease;
}

.main-image img.swapping { opacity: 0; }

/* The desktop series, beside the masthead column. The painting hangs from
   --art-top, level with the first link beside it, whatever its shape, and is
   at most --art-height tall, so the tallest sit centred in the window; the
   thumbnails start on the same line. It may span the work column, which the
   page's own margins keep clear of the window's edge. */
@media (width > 900px) {
  .series-view {
    height: calc(100vh - var(--art-top) - 3rem);
    padding: 0;
    gap: 2.5rem;
  }

  /* The rail keeps 4px above its first thumbnail for the focus ring; pulling
     it up by as much starts the thumbnails on the painting's top line. */
  .thumb-rail { margin-top: -4px; }

  .main-image {
    justify-content: flex-start;
    min-height: 0;
  }

  .main-image img {
    max-width: 100%;
    max-height: var(--art-height);
  }

  .home-slide .img-wrap { align-items: flex-start; }
}

/* Mobile carousel (built in JS, shown only at <=600px; see media query) */
.carousel { display: none; }
/* Home thumbnail footer is mobile-only (desktop home stays a clean hero) */
#home-thumb-rail { display: none; }

/* Flush with the painting's left edge: app.js sizes this box to the
   painting's width, and the text starts where the painting does. */
.main-image-info {
  text-align: left;
  padding-top: 1rem;
}

/* Title, year, medium and size read as one evenly spaced block: the same
   line height throughout and no gap after the title. */
.main-image-info .title {
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: #777;
}

.main-image-info .meta {
  font-size: 0.8rem;
  color: #8c8c8c;
  letter-spacing: 0.03em;
  line-height: 1.45;
  white-space: pre-line;
}

/* Beside the links, the caption is a touch smaller than they are (0.82rem),
   and no darker, so the work leads. After the rules above, which it
   overrides: before them, it lost to them and the caption showed full size. */
@media (width > 600px) {
  .main-image-info .title { font-size: 0.76rem; }
  .main-image-info .meta { font-size: 0.7rem; }
}

/* Thumbnail rail (right side, vertical) */
.thumb-rail {
  width: 80px;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
  scrollbar-width: none;
}

.thumb-rail::-webkit-scrollbar { display: none; }

.thumb-rail .thumb {
  width: 100%;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.4;
  transition: opacity 0.25s;
  flex-shrink: 0;
}

.thumb-rail .thumb:hover { opacity: 0.75; }
.thumb-rail .thumb.active { opacity: 1; }

.thumb-rail .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- About ---- */
.about {
  display: none;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  line-height: 1.8;
  font-size: 0.95rem;
  color: #444;
}

.about.visible { display: block; }
.about p { max-width: 600px; margin-left: auto; margin-right: auto; }
.about p + p { margin-top: 1rem; }

.cv {
  margin-top: 2.5rem;
  padding-left: calc((100% - 600px) / 2);
}

/* A fine rule between the bio and the CV, the width of the bio above it,
   like the one between the contact form and the mailing list. */
.cv::before {
  content: '';
  display: block;
  max-width: 600px;
  border-top: 1px solid #eee;
}

.cv h3 {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: #333;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.cv ul {
  list-style: none;
  font-size: 0.88rem;
  color: #555;
  line-height: 1.8;
}

.cv .cv-year {
  display: inline-block;
  width: 4.5rem;
  flex-shrink: 0;
  color: #767676;
}

.cv li {
  display: flex;
}

.cv a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
  transition: border-color 0.2s;
}

.cv a:hover { border-color: var(--accent); }

/* ---- Blog ---- */
.blog {
  display: none;
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.blog.visible { display: block; }

.blog-posts { list-style: none; }
.blog-posts p { font-size: 0.95rem; color: #444; }

.blog-post {
  padding: 1.5rem 0;
  border-bottom: 1px solid #eee;
}

.blog-post:first-child { padding-top: 0; }

.blog-post .post-title {
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #333;
}

.blog-post .post-title a {
  color: inherit;
  text-decoration: none;
}

.blog-post .post-title a:hover { color: var(--accent); }

.blog-post .post-date {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.25rem;
  letter-spacing: 0.03em;
}

.blog-post .post-excerpt {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ---- Contact ---- */
.contact {
  display: none;
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.contact.visible { display: block; }

.contact-intro {
  text-align: center;
  margin-bottom: 1.25rem;
}

/* The two invitations on the page, the form's and the mailing list's, read
   as one voice: same size, same colour, both centred. */
.contact-intro,
.mailing-list p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
}

.contact form { display: flex; flex-direction: column; gap: 1rem; }

.contact input,
.contact textarea,
.ml-row input {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #222;
  outline: none;
  transition: border-color 0.2s;
}

.contact input:focus,
.contact textarea:focus,
.ml-row input:focus { border-color: #999; }

.contact textarea { resize: vertical; min-height: 120px; }

.contact button,
.ml-row button {
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.75rem 1.3rem;
  border: 1px solid #222;
  background: #222;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.contact button { align-self: flex-start; }

.contact button:hover,
.ml-row button:hover { background: #fff; color: #222; }

.contact .or-email {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
  color: #767676;
}

.contact .email-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
  padding-bottom: 1px;
  transition: border-color 0.2s;
}

.contact .email-link:hover { border-color: #222; }

.contact .form-sent {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.6;
}

.mailing-list {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.mailing-list p {
  text-align: center;
  margin-bottom: 0.75rem;
}

.ml-row {
  display: flex;
  gap: 0.5rem;
}

.ml-row input { flex: 1; }

.ml-msg {
  font-size: 0.82rem;
  margin-top: 0.5rem;
  color: #767676;
}

.ml-msg.error { color: #c44; }
.ml-msg.success { color: var(--accent); }

/* Beside the masthead, a text page's first letters sit level with the
   first link's, as a painting's top edge does: no padding above, and the
   page pulled up by the space above its first line's capitals (more for
   About's taller lines). After the rules above, which this overrides. */
@media (width > 900px) {
  .about,
  .blog,
  .contact { padding-top: 0; }

  .about { margin-top: -0.5rem; }

  .blog,
  .contact { margin-top: -0.375rem; }
}

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 3rem 2rem;
  font-size: 0.7rem;
  color: #767676;
  letter-spacing: 0.05em;
}

footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #d6d6d6;
  padding-bottom: 1px;
}

footer a:hover { color: #222; border-bottom-color: #222; }

/* Out of sight until wanted: invisible until the pointer is over it, or a
   keyboard user tabs into it. A touch screen has no hover, so there it
   stays visible, or the privacy link would be out of reach. */
@media (hover: hover) {
  footer {
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  footer:hover,
  footer:focus-within { opacity: 1; }
}

/* ---- Privacy modal ----
   The policy is a dialog rather than its own page: a standalone route would
   need its own stylesheet and its own SRI hashes (integrity.py only rewrites
   index.html), so it drifted out of the site's type and colour the moment the
   stylesheet moved. Living in the shell it is styled by the same rules as
   everything else, for free. The footer link keeps a real /privacy href —
   app.js intercepts the click, and the rewrite resolves it for anyone who
   opens it in a new tab. */
.legal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1500;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgb(255 255 255 / 92%);
}

.legal-overlay.open { display: flex; }

.legal-modal {
  position: relative;
  width: min(100%, 34rem);
  max-height: 100%;
  overflow-y: auto;
  padding: 2.5rem;
  background: #fff;
  border: 1px solid #e6e6e6;
  color: #444;
  font-size: 0.82rem;
  line-height: 1.75;
}

.legal-modal h2 {
  margin: 0 0 1.25rem;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #767676;
}

.legal-modal p + p { margin-top: 0.9rem; }

.legal-modal a {
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #d6d6d6;
}

.legal-modal a:hover { border-bottom-color: #222; }

.legal-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  color: #767676;
  cursor: pointer;
}

.legal-close:hover { color: #222; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .thumb-rail { width: 60px; }
}

@media (max-width: 600px) {
  header { padding: 2rem 1.5rem 0.75rem; }
  header h1 { font-size: 1.32rem; }
  nav { gap: 0.6rem 1.2rem; font-size: 0.735rem; padding: 0 1.5rem 2.5rem; }

  /* Home shows the same single work on mobile as on desktop, so the hero stays
     visible here — only the page padding tightens. */
  .home { padding: 0 1rem; }
  .home-slide .img-wrap { height: auto; }

  /* Home as a swipe carousel with a thumbnail footer — see the commented-out
     markup in index.html and slideshow in js/app.js. Uncomment all three to
     bring it back for an artist with more work to show.
  .home-nav { display: none; }
  .home-slide .img-wrap { display: none; }
  #home-thumb-rail { display: flex; margin-top: 1.5rem; } */

  .series-view {
    flex-direction: column;
    height: auto;
    gap: 1rem;
    padding: 0 1rem;
  }

  /* Remove the desktop min-height so the image isn't framed by empty space. */
  .main-image { min-height: auto; }
  /* The caption starts where a slide's image does, 1rem in. */
  .main-image-info { align-self: stretch; padding: 1rem 1rem 0; }

  /* Swap the single crossfading image for a native scroll-snap carousel. */
  .main-image .main-img { display: none; }
  .carousel {
    display: flex;
    width: 100%;
    /* Fixed height, deliberately. Sizing the box to each artwork's own ratio
       does remove the empty space under a landscape, but it moves the layout
       mid-gesture: the height animates while the scroll is still settling, the
       snap loses its footing, and paging through a series stops feeling like
       one surface. A steady box that each painting slides into is worth more
       than a tight one that shifts under your thumb. */
    height: 60vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .carousel::-webkit-scrollbar { display: none; }
  .carousel .slide {
    flex: 0 0 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .carousel .slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 2px solid #e0e0e0;
    opacity: 1; /* override .home-slide img { opacity: 0 } from the crossfade */
  }
  .thumb-rail {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 3px;
    padding: 0;
  }
  .thumb-rail .thumb {
    width: 52px;
    aspect-ratio: 1;
  }
  /* Centre the strip under the carousel. Auto margins rather than
     justify-content: center, which pushes the first thumbnails past the left
     edge, out of reach, once a long series overflows and has to scroll; auto
     margins centre when there's room and collapse to nothing when there isn't. */
  .thumb-rail .thumb:first-child { margin-left: auto; }
  .thumb-rail .thumb:last-child { margin-right: auto; }
}

/* ---- Form states ---- */
button:disabled { opacity: 0.5; cursor: default; }

.form-error {
  font-size: 0.85rem;
  color: #c44;
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* ---- Degraded state (app.js failed) ---- */
/* Every view starts hidden and only JS reveals it, so a broken app.js would
   otherwise render a blank page. boot.js sets .js-failed on <html> when app.js
   fails to load, parse, or finish its synchronous init; these rules fall back
   to the same reveal-everything state as css/noscript.css. The home hero has a
   real src in the HTML, and About/Contact are full content, so the degraded
   page is still usable. */
.js-failed .fade-view,
.js-failed .about,
.js-failed .contact {
  opacity: 1 !important;
  display: block !important;
}

.js-failed .home { display: block !important; }
/* The hero is a single static work now, so it paints without help. This stays
   as a belt-and-braces guard for whoever uncomments the crossfade slideshow. */
.js-failed .home-slide img { opacity: 1 !important; }
/* The contact form needs app.js to send, so the address takes its place */
.js-failed .email-fallback { display: block !important; }
/* Nothing can open or close the dialog, so it stops being one and becomes a
   section at the foot of the page. Without this the policy is unreachable:
   the footer link resolves to this same document. */
.js-failed .legal-overlay {
  display: block !important;
  position: static;
  padding: 0 2rem 3rem;
  background: none;
}

@media (width > 900px) {
  .js-failed .legal-overlay { grid-column: 2; }
}

.js-failed .legal-modal { width: auto; margin: 0 auto; }
.js-failed .legal-close { display: none; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
