/* Webfonts are injected by the server (base_head → webfont_links) for ONLY
   the brand/body/ui families actually selected in the admin. Do not add a
   blanket @import here — it would load fonts the live site isn't using. */

:root {
  --paper: #ffffff;
  --ink: #282522;
  --muted: #77716b;
  --line: #ebe7e1;
  --soft: #f6f3ee;
  --overlay: rgba(0, 0, 0, 0.42);
  --brand-serif: Didot, "Bodoni 72", "Bodoni 72 Smallcaps", "Times New Roman", serif;
  --body-serif: "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-serif);
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
}

body[data-protection="1"] img {
  -webkit-user-drag: none;
  user-select: none;
}

.session-watermark {
  bottom: 1rem;
  color: rgba(40, 37, 34, 0.34);
  font-family: var(--sans);
  font-size: var(--badge-text-size);
  letter-spacing: 0.08em;
  line-height: 1;
  pointer-events: none;
  position: fixed;
  right: 1rem;
  text-transform: uppercase;
  z-index: 9999;
}

.photo-credit-badge {
  bottom: 1.35rem;
  font-family: var(--sans);
  font-size: var(--badge-text-size);
  left: 1.35rem;
  letter-spacing: 0.08em;
  opacity: 0;
  position: fixed;
  text-transform: lowercase;
  transition: opacity 220ms ease-out;
  z-index: 9998;
}

.photo-credit-badge::before {
  background: transparent;
  bottom: -0.6rem;
  content: "";
  left: -0.6rem;
  position: absolute;
  right: -0.6rem;
  top: -0.6rem;
}

.photo-credit-badge:hover,
.photo-credit-badge:focus-within {
  opacity: 0.88;
}

body[data-protection="1"] .gallery-figure::after,
body[data-protection="1"] .thumb-card::after {
  color: rgba(255, 255, 255, 0.28);
  content: attr(data-watermark);
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 0.7rem;
  text-transform: uppercase;
  top: 0.7rem;
  transition: opacity 160ms ease-out;
  z-index: 2;
}

body[data-protection="1"] .gallery-figure:hover::after,
body[data-protection="1"] .thumb-card:hover::after {
  opacity: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  gap: var(--header-gap);
  justify-content: space-between;
  left: 0;
  padding: var(--header-pad-top) var(--header-pad-right) var(--header-pad-bottom) var(--header-pad-left);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand-stack {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.brand-stack .utility-link {
  font-family: var(--brand-serif);
  font-size: clamp(var(--utility-size-min), 1.6vw, var(--utility-size-max));
  font-style: italic;
  letter-spacing: 0;
  line-height: 1;
  margin-left: 0.1rem;
  opacity: 0.78;
  transition: opacity 140ms ease-out;
}

.brand-stack .utility-link:hover { opacity: 1; }

/* ---------- Search: magnifying-glass trigger + drop-down overlay ---------- */
.search-trigger {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Breathing room below the wordmark — not crammed against it. */
  margin-top: clamp(0.7rem, 1.6vw, 1.4rem);
  margin-left: 0.1rem;
  padding: 0.1rem;
  line-height: 0;
  transition: color 160ms ease-out;
}

.search-trigger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.search-trigger:hover,
.search-trigger:focus-visible {
  color: var(--ink);
  outline: 0;
}

/* Hide the header trigger while the overlay is open — the panel has its
   own glass in the field. `visibility:hidden` (not display:none) keeps its
   box so the header height is unchanged and the gallery doesn't jump up. */
body.search-open .search-trigger { visibility: hidden; }

/* The overlay sits BELOW the sticky header (--ahs-top = header bottom, set
   by search.js on open) so the wordmark + contact stay crisp above it.
   pointer-events:none on the container keeps the header clickable; the
   backdrop/panel re-enable it. */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease-out;
}

.search-overlay.is-open { opacity: 1; }

/* Light scrim only — the page behind stays crisp, NOT frosted. */
.search-backdrop {
  position: absolute;
  inset: var(--ahs-top, 0) 0 0 0;
  pointer-events: auto;
  background: rgba(20, 18, 16, 0.14);
}

/* A clean, near-solid drop-down panel (no heavy glass blur). */
.search-panel {
  position: absolute;
  inset: var(--ahs-top, 0) 0 auto 0;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 60px -30px rgba(20, 18, 16, 0.35);
  padding: 0.55rem clamp(1.15rem, 5vw, 4rem) clamp(0.9rem, 2vw, 1.5rem);
  max-height: calc(94vh - var(--ahs-top, 0px));
  overflow-y: auto;
  transform: translateY(-16px);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay.is-open .search-panel { transform: translateY(0); }

.search-field {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 60rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.7rem;
}

.search-field-glass {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--brand-serif);
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  line-height: 1.15;
  padding: 0.15rem 0;
}

.search-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.search-input::-webkit-search-cancel-button { display: none; }

.search-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color 160ms ease-out, border-color 160ms ease-out;
}

.search-close svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-close:hover,
.search-close:focus-visible {
  color: var(--ink);
  border-color: var(--muted);
  outline: 0;
}

.search-results {
  max-width: 72rem;
  margin: 1.25rem auto 0;
}

/* No recents/results yet → no gap, so the panel hugs the search bar
   and barely covers the gallery. */
.search-results:empty { margin: 0; }

.search-section + .search-section { margin-top: 2.1rem; }

.search-section-head {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  margin: 0 0 0.85rem;
  text-transform: uppercase;
}

/* Empty state: two plain-text term groups, 50/50 (curated · the visitor's
   own). No thumbnails, no tag/publication chrome — just the words. */
.search-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.search-terms {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.search-term {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-family: var(--brand-serif);
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  gap: 0.7rem;
  line-height: 1.2;
  padding: 0.1rem 0;
  text-align: left;
  transition: opacity 140ms ease-out;
}

.search-term-thumb {
  background: var(--soft);
  display: block;
  flex: 0 0 auto;
  height: 44px;
  object-fit: cover;
  width: 44px;
  opacity: 0;
  transition: opacity 200ms ease-out;
}
.search-term-thumb.is-loaded { opacity: 1; }

/* Full gallery name; truncate only if absurdly long so the 2-col layout
   never breaks. */
.search-term { min-width: 0; }
.search-term-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-term:hover,
.search-term:focus-visible {
  opacity: 0.55;
  outline: 0;
}

@media (max-width: 640px) {
  .search-cols { grid-template-columns: 1fr; gap: 1.8rem; }
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: clamp(0.7rem, 1.6vw, 1.15rem);
}

.search-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.search-card img {
  display: block;
  width: 100%;
  height: clamp(150px, 17vw, 230px);
  object-fit: cover;
  background: var(--soft);
  transition: opacity 200ms ease-out;
}

.search-card:hover img,
.search-card:focus-visible img { opacity: 0.78; }

.search-card-cap {
  display: block;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  margin-top: 0.45rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-card:hover .search-card-cap,
.search-card:focus-visible .search-card-cap { color: var(--ink); }

.search-empty {
  color: var(--muted);
  font-style: italic;
  padding: 2.4rem 0;
  text-align: center;
}

body.search-open { overflow: hidden; }

@media (max-width: 720px) {
  .search-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .search-card img { height: 38vw; }
}

@media (prefers-reduced-motion: reduce) {
  .search-overlay,
  .search-panel { transition: none; }
  .search-panel { transform: none; }
}

.brand {
  font-family: var(--brand-serif);
  font-size: var(--brand-size-max);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.82;
  text-transform: var(--brand-text-transform, none);
  white-space: nowrap;
}

.contact-link {
  font-family: var(--brand-serif);
  font-size: clamp(var(--contact-size-min), 4.5vw, var(--contact-size-max));
  font-style: italic;
  line-height: 0.88;
  padding-top: 0.28rem;
}

.header-links {
  align-items: flex-start;
  display: flex;
  gap: clamp(0.8rem, 2vw, 2rem);
}

.utility-link {
  color: var(--muted);
  font-family: var(--brand-serif);
  font-size: clamp(var(--utility-size-min), 2.5vw, var(--utility-size-max));
  font-style: italic;
  line-height: 0.95;
  padding-top: 0.56rem;
}

.home-shell {
  padding: var(--home-pad-top) var(--home-pad-x) var(--home-pad-bottom);
}

.home-intro {
  margin: 0 0 1.2rem;
  max-width: 58rem;
}

.home-intro h1 {
  font-family: var(--body-serif);
  font-size: clamp(var(--home-intro-size-min), 4vw, var(--home-intro-size-max));
  font-weight: 400;
  line-height: 0.98;
  margin: 0 0 0.6rem;
}

.home-intro p {
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--body-text-size);
  line-height: 1.45;
  margin: 0;
  max-width: 40rem;
}

.tag-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tag-gap-y) var(--tag-gap-x);
  margin: -0.35rem 0 1.1rem;
}

.tag-nav a {
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--tag-text-size);
}

.tag-nav a:hover {
  color: var(--ink);
}

/* Search box + an exit ✕ that returns to the home thumbnail index. */
.public-search-row {
  align-items: flex-end;
  display: flex;
  gap: 1.25rem;
  margin: 0 0 2.4rem;
}

.search-exit {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.85rem;
  height: 34px;
  justify-content: center;
  margin-bottom: 0.3rem;
  text-decoration: none;
  transition: color 140ms ease-out, border-color 140ms ease-out;
  width: 34px;
}

.search-exit:hover,
.search-exit:focus-visible {
  border-color: var(--muted);
  color: var(--ink);
  outline: 0;
}

.public-search {
  border-bottom: 1px solid var(--line);
  display: flex;
  margin: 0;
  max-width: 22rem;
  position: relative;
  transition: border-color 160ms ease-out;
}

.public-search:focus-within {
  border-bottom-color: var(--ink);
}

.public-search input {
  background: transparent;
  border: 0;
  color: var(--ink);
  flex: 1;
  font-family: var(--brand-serif);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
  min-width: 0;
  outline: none;
  padding: 0.5rem 0;
}

.public-search input::placeholder {
  color: var(--muted);
  font-style: italic;
  opacity: 0.55;
}

.public-search button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  padding: 0 0.4rem;
  text-transform: uppercase;
  transition: color 140ms ease-out;
}

.public-search button:hover { color: var(--ink); }

.image-results {
  border-top: 1px solid var(--line);
  margin: 1.4rem 0 2rem;
  padding-top: var(--section-rule-gap);
}

.image-results h1 {
  font-family: var(--body-serif);
  font-size: clamp(var(--page-title-size-min), 2.1vw, var(--page-title-size-max));
  font-weight: 400;
  margin: 0 0 1rem;
}

.image-result-grid {
  display: grid;
  gap: clamp(0.7rem, 1.6vw, 1.15rem);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.image-result-card {
  color: var(--ink);
  display: block;
  text-decoration: none;
}

/* Fixed-height cover tiles (NOT aspect-ratio). The <img> carries width/
   height attributes, which makes Safari ignore CSS `aspect-ratio` and
   render the photo at its intrinsic size — the tall narrow strips. An
   explicit height + object-fit is the robust pattern (same as the
   overlay's .search-card). */
.image-result-card img {
  background: var(--soft);
  display: block;
  height: clamp(220px, 26vw, 380px);
  object-fit: cover;
  width: 100%;
}

.image-result-card span,
.image-result-card small,
.image-result-card em {
  display: block;
  font-family: var(--sans);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-result-card span {
  font-size: var(--body-text-size);
  margin-top: 0.5rem;
}

.image-result-card small,
.image-result-card em {
  color: var(--muted);
  font-size: var(--tag-text-size);
  font-style: normal;
  margin-top: 0.18rem;
}

.collection-shell h1 {
  font-family: var(--body-serif);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1;
  margin: 0 0 1rem;
}

.thumbnail-index {
  column-count: var(--columns);
  column-gap: var(--gutter);
  column-width: 7rem;
}

.thumb-card {
  break-inside: avoid;
  display: block;
  margin: 0 0 var(--gutter);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.thumb-card img {
  background: var(--soft);
  height: auto;
  width: 100%;
}

/* Portrait/Landscape balance — scales the actual thumbnail footprint by
   orientation (not a crop). At centre both scales are 1 (no change). The
   shrunk card is centred in its column slot so the masonry stays tidy. */
.thumb-card[data-orient="portrait"] {
  margin-inline: auto;
  width: calc(100% * var(--thumb-portrait-scale, 1));
}

.thumb-card[data-orient="landscape"] {
  margin-inline: auto;
  width: calc(100% * var(--thumb-landscape-scale, 1));
}

.thumb-overlay {
  align-items: center;
  background: var(--overlay);
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  flex-direction: column;
  font-family: var(--body-serif);
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 1rem;
  position: absolute;
  text-align: center;
  transition: opacity 180ms ease-out;
}

.thumb-overlay span {
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  font-size: clamp(1.35rem, 2.1vw, 2.4rem);
  line-height: 1.05;
  padding-bottom: 0.7rem;
}

.thumb-overlay em {
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  font-style: normal;
  font-weight: 700;
  margin-top: 1rem;
}

.thumb-card:hover .thumb-overlay,
.thumb-card:focus-visible .thumb-overlay {
  opacity: 1;
}

.thumb-card small {
  color: var(--muted);
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  margin-top: 0.4rem;
}

.placeholder-card {
  align-items: center;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(135deg, rgba(40, 37, 34, 0.08), rgba(40, 37, 34, 0.02)),
    var(--soft);
  display: flex;
  justify-content: center;
}

.placeholder-mark {
  color: rgba(40, 37, 34, 0.24);
  font-family: var(--brand-serif);
  font-size: clamp(3rem, 9vw, 8rem);
}

.gallery-shell {
  padding: 0.55rem 0 var(--gallery-bottom-space);
}

.gallery-shell h1 {
  font-family: var(--body-serif);
  font-size: clamp(var(--page-title-size-min), 2.3vw, var(--page-title-size-max));
  font-weight: 400;
  line-height: 1.15;
  margin: 0 auto 1.2rem;
  max-width: min(var(--gallery-width-vw), var(--gallery-width-max));
}

.gallery-shell .dek {
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--body-text-size);
  line-height: 1.55;
  margin: 0 auto 2.2rem;
  max-width: min(80vw, 760px);
}

.gallery-figure {
  margin: 0 auto var(--gallery-image-gap);
  max-width: 100%;
  position: relative;
  width: fit-content;
}

.gallery-figure img {
  display: block;
  margin: 0;
}

.gallery-figure.fit-page,
.gallery-figure.original-ratio {
  max-width: min(var(--gallery-width-vw), var(--gallery-width-max));
}

.gallery-figure.fit-page img,
.gallery-figure.original-ratio img {
  max-height: min(var(--gallery-max-vh, 84vh), 1400px);
  /* Cap by the viewport, NOT 100% of the fit-content figure. The latter is
     a circular constraint (figure width ← image width ← figure width) that
     latches small on shrink and never grows back to full height. */
  max-width: min(var(--gallery-width-vw), var(--gallery-width-max));
  height: auto;
  width: auto;
}

/* Orientation-aware sizing. One global max-height can't balance both:
   landscapes hit the WIDTH cap (end up short/small), portraits hit the
   HEIGHT cap (tower over the page). So: give landscapes more width, and
   rein portraits in to a shorter height. (data-orient set server-side
   from the image's real w/h.) */
.gallery-figure.fit-page[data-orient="landscape"],
.gallery-figure.original-ratio[data-orient="landscape"] {
  max-width: min(var(--gallery-landscape-vw, 94vw), 1600px);
}
.gallery-figure[data-orient="landscape"] img {
  max-width: min(var(--gallery-landscape-vw, 94vw), 1600px);
  max-height: min(var(--gallery-landscape-vh, 88vh), 1400px);
}
.gallery-figure[data-orient="portrait"] img {
  max-height: min(var(--gallery-portrait-vh, 74vh), 1040px);
}

.gallery-figure.full-width {
  max-width: 100%;
}

.gallery-figure.full-width img {
  width: 100%;
}

.gallery-figure.crop-fill {
  aspect-ratio: 16 / 10;
  max-width: min(92vw, 1500px);
  overflow: hidden;
}

.gallery-figure.crop-fill img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.gallery-figure figcaption {
  color: var(--muted);
  display: block;
  font-size: clamp(var(--caption-size-min), 1.7vw, var(--caption-size-max));
  line-height: 1.2;
  margin: var(--caption-gap) 0 0;
  padding: 0;
  text-align: left;
}

/* Image is block-level so there's no inline descender gap before the caption. */
.gallery-figure img { display: block; }

/* On the public site, an empty caption stays out of the layout. */
.gallery-figure figcaption:empty {
  display: none;
}

.gallery-shell > .thumbnail-index {
  border-top: 1px solid var(--line);
  margin: 2rem 1.35rem 0;
  padding-top: var(--section-rule-gap);
}

/* Portfolio loop at the bottom of the contact page (gated by the same
   "Thumbnail Index on every page" setting). Aligns with the text column
   edges — the contact-shell already supplies the side padding. */
.contact-shell > .thumbnail-index {
  border-top: 1px solid var(--line);
  margin: 3rem 0 0;
  padding-top: var(--section-rule-gap);
}

.empty-gallery {
  color: var(--muted);
  font-family: var(--sans);
  margin: 8rem auto;
  max-width: 36rem;
  text-align: center;
}

.contact-shell {
  /* Was 10vh → trimmed repeatedly; keep the top band tight. */
  margin: clamp(0.75rem, 2.5vh, 2rem) auto 0;
  /* --rt-width / --rt-pad come from the page's text_design (Layout panel).
     Defaults preserve the previous look exactly. */
  max-width: var(--rt-width, 54rem);
  /* --rt-pad = side padding; --rt-pad-top/-bottom = top/bottom padding
     (Layout panel). Defaults preserve the previous look (top 0, bottom 6rem). */
  padding: var(--rt-pad-top, 0) var(--rt-pad, 1.35rem) var(--rt-pad-bottom, 6rem);
}

/* Keep a little breathing room off the screen edge on small screens (incl.
   single-column-on-mobile / stacked explicit columns), even if side padding
   was tuned down. */
@media (max-width: 700px) {
  .contact-shell {
    padding-left: max(var(--rt-pad, 1.35rem), 1.15rem);
    padding-right: max(var(--rt-pad, 1.35rem), 1.15rem);
  }
}

/* Contact page only — wider default measure for the bio. Galleries use their
   own width tokens and are unaffected; other text pages keep the 54rem default.
   A per-page Width override (--rt-width) still wins over this. */
body[data-page-type="contact"] .contact-shell {
  max-width: var(--rt-width, 72rem);
}

.contact-shell h1 {
  font-family: var(--brand-serif);
  font-size: clamp(4rem, 10vw, 9rem);
  font-style: italic;
  font-weight: 400;
  line-height: 0.9;
  margin: 0 0 2rem;
}

.contact-shell p {
  font-family: var(--body-serif);
  font-size: clamp(var(--page-title-size-min), 2vw, var(--page-title-size-max));
  line-height: 1.35;
}

/* Intro/subtitle: no top margin, modest controlled gap to the body (UA <p>
   margin at this large clamp font was creating a big dead band above the
   text). When there is no intro it collapses entirely on the public site;
   editor.js's injected `[data-edit-key]:empty` rule (equal specificity, but
   injected after site.css) still reveals the "Add intro" target in the admin. */
/* Intro/subtitle is a restrained small line — NOT title-sized (the
   `.contact-shell p` clamp made it huge and a tall dead band, also blowing
   up the admin "Add intro" placeholder). */
.contact-shell .dek {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.4;
  margin: 0 0 1rem;
  opacity: 0.75;
}
/* Empty intro: collapses on the public site (display:none). In the admin
   editor.js re-reveals it (injected `[data-edit-key]:empty{display:inline-block}`,
   later in cascade) as the "Add intro" target — keep that affordance SMALL
   (the big display clamp size made it a tall dead block). A real (non-empty)
   intro keeps its designed size/margin. */
.dek:empty {
  display: none;
  font-size: 1rem;
  margin-bottom: 0.6rem;
  opacity: 0.55;
}

.rich-text {
  font-family: var(--body-serif);
}

/* Body paragraph size. This selector must be more specific than
   `.contact-shell p` (which otherwise wins and ignores the slider). Default
   keeps the previous look exactly; the admin slider sets --rt-size in rem to
   override. h2.rt-block / p.rt-lead have their own size rules (left alone). */
.rich-text .rt-block {
  color: var(--rt-color, inherit);
  font-size: var(--rt-size, clamp(var(--page-title-size-min), 2vw, var(--page-title-size-max)));
  font-weight: var(--rt-weight, inherit);
  line-height: var(--rt-leading, 1.35);
  margin-block: 1.5rem;
  text-align: var(--rt-align, inherit);
}

.rich-text .rt-tight     { margin-block: 0.35rem; }
.rich-text .rt-default   { margin-block: 1.5rem; }
.rich-text .rt-generous  { margin-block: 4rem; }
.rich-text .rt-dramatic  { margin-block: 8rem; }

/* Section groups: each `.rt-group` is its own column context, stacked with a
   generous gap so a section break starts a visually fresh area. */
.rich-text { display: flow-root; }
.rich-text .rt-group + .rt-group { margin-top: 3.25rem; }

/* First block of a group/column has no leading margin (column tops flush). */
.rich-text .rt-group > .rt-block:first-child,
.rich-text .rt-col > .rt-block:first-child { margin-top: 0; }

/* An empty line is a real one-line spacer (was collapsing to ~0), so blank
   lines can be used for vertical rhythm / to offset a column. `1lh` = exactly
   one text line, so N blank lines = N lines of offset. */
.rich-text p.rt-block:empty { min-height: 1lh; }

/* Explicit columns (a section with column breaks): a real grid of independent
   stacks — NOT newspaper auto-flow. Each .rt-col is filled directly; columns
   stack on mobile. The :not(.rt-cols-explicit) guard on the flow rules below
   keeps multicol off these. */
.rich-text .rt-group.rt-cols-explicit {
  align-items: start;
  display: grid;
  gap: var(--rt-gutter, 2.6rem);
  grid-template-columns: repeat(var(--rt-explicit-cols, 2), minmax(0, 1fr));
}
@media (max-width: 700px) {
  .rich-text .rt-group.rt-cols-explicit { grid-template-columns: 1fr; gap: 2rem; }
}

.rich-text h2.rt-block {
  color: var(--rt-h-color, inherit);
  font-family: var(--brand-serif);
  font-size: var(--rt-h-size, clamp(1.6rem, 3.5vw, 2.6rem));
  font-style: italic;
  font-weight: var(--rt-h-weight, 400);
  letter-spacing: -0.01em;
  line-height: var(--rt-h-leading, 1.05);
}

/* Small / label style (fixed) — for things like "Los Angeles", captions. */
.rich-text p.rt-small {
  font-size: 0.82em;
  font-style: italic;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.rich-text p.rt-lead {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.3;
}

.rich-text hr.rt-block {
  background: currentColor;
  border: 0;
  height: 1px;
  margin-inline: auto;
  opacity: 0.18;
  width: 100%;
}

/* Email / phone / link blocks read as plain body text on the live site:
   no underline, no hover dim, no icon. They inherit the generic `a` reset
   (color:inherit; text-decoration:none) above and stay clickable via their
   mailto:/tel:/href. The gold dashed affordance is admin-only — it's
   injected by editor.js ([data-edit-key] a) and never ships to the public
   site. */

/* Multi-column applies to the WHOLE body, not per paragraph: `columns` lives
   on the .rich-text container (via :has on the per-block rt-cols marker), and
   each paragraph is kept intact across the column break. This is the fix for
   single paragraphs getting chopped in half across the column boundary. */
/* Multi-column applies per SECTION GROUP (not the whole body), so each section
   is its own balanced column context and a section break starts fresh. */
.rich-text .rt-group:not(.rt-cols-explicit):has(.rt-cols-2) {
  columns: 16em 2;
  column-gap: var(--rt-gutter, 2.6rem);
}

.rich-text .rt-group:not(.rt-cols-explicit):has(.rt-cols-3) {
  columns: 12em 3;
  column-gap: var(--rt-gutter, 2rem);
}

/* "Single column on mobile" toggle (text_design.mobileSingle). */
@media (max-width: 700px) {
  .rich-text.rt-mobile-1col .rt-group { columns: auto !important; }
}

/* Natural newspaper flow within a group; no forced break-inside:avoid. */
.rich-text .rt-group:has(.rt-cols-2) .rt-block,
.rich-text .rt-group:has(.rt-cols-3) .rt-block {
  orphans: 3;
  widows: 3;
}


@media (max-width: 720px) {
  .site-header {
    align-items: baseline;
    padding: 0.55rem 0.75rem 1rem 0;
  }

  .brand {
    font-size: clamp(var(--brand-size-min), 11vw, var(--brand-size-max));
    max-width: 72vw;
    white-space: normal;
  }

  .contact-link {
    font-size: clamp(1.8rem, 9vw, 2.7rem);
  }

  .utility-link {
    display: none;
  }

  .public-search {
    max-width: 100%;
  }

  .home-shell {
    padding: 0.2rem 0.75rem 3rem;
  }

  .thumbnail-index {
    column-gap: 0.7rem;
  }

  .thumb-card {
    margin-bottom: 0.7rem;
  }

  .gallery-shell h1,
  .gallery-shell .dek,
  .gallery-figure.fit-page,
  .gallery-figure.original-ratio {
    max-width: 94vw;
  }

  .gallery-figure {
    margin-bottom: 2.4rem;
  }

  .gallery-figure.fit-page img,
  .gallery-figure.original-ratio img {
    max-height: none;
    width: 100%;
  }

  .gallery-shell > .thumbnail-index {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
}

@media print {
  body[data-print-protection="1"] * {
    visibility: hidden !important;
  }

  body[data-print-protection="1"]::before {
    color: #111;
    content: "Print output disabled for Austin Hargrave Studio portfolio previews.";
    display: block;
    font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    padding: 2rem;
    visibility: visible !important;
  }
}
