/* ==========================================================================
   dustymccarty.com — layout and components
   All values come from tokens.css. Breakpoints: 900 / 680 / 560.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent; /* no grey box flashing over tapped buttons/links on iOS */
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-small);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--color-text); text-decoration: none; transition: color var(--dur-fast); }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--color-text-muted); } }
img, video { max-width: 100%; height: auto; }
svg { overflow: visible; }
::selection { background: var(--color-selection); }
/* <mark> is what the block editor's Highlight tool (and older text-colour
   formatting) wraps text in. Browsers paint it yellow by default; here it is
   invisible unless the editor set a colour or background on it (inline styles
   and has-*-color classes still win). */
mark { background-color: transparent; color: inherit; }
:focus-visible { outline: 1.5px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius); }
/* The ring is for people navigating with the Tab key. Until they press Tab, and
   again after any click or tap, html has .dm-pointer (set in the <head> script)
   and rings stay hidden — on desktop and mobile alike. */
html.dm-pointer :focus-visible { outline: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; }
hr { border: 0; height: 1px; background: var(--color-line); }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.dm-skip:focus {
  clip: auto; clip-path: none; width: auto; height: auto; margin: 0;
  top: 12px; left: 12px; z-index: 2000; padding: 10px 14px;
  background: var(--color-surface); color: var(--color-text);
  font-family: var(--font-utility); font-size: var(--text-nav);
}

body.dm-locked { overflow: hidden; }
/* While the search or menu sheet is open the page can't scroll (site.js also cancels touch drags,
   which iOS Safari doesn't stop on overflow alone). The page itself never moves. */
html.dm-scroll-lock, html.dm-scroll-lock body { overflow: hidden; }

/* --------------------------------------------------------------------------
   Shared type utilities
   -------------------------------------------------------------------------- */
.dm-label {
  margin: 0;
  font-family: var(--font-utility);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.dm-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  font-family: var(--font-utility);
  font-size: var(--text-utility);
  font-weight: 500;
  letter-spacing: var(--tracking-utility);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
/* "date // categories // read time" lines wrap like ordinary text. */
.dm-meta--flow { display: block; line-height: 1.8; }
.dm-meta--flow .dm-meta__sep { margin: 0 .3em; }
.dm-meta a { color: inherit; }
@media (hover: hover) and (pointer: fine) { .dm-meta a:hover { color: var(--color-link-hover); } }
.dm-caption {
  font-family: var(--font-utility);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-caption);
  color: var(--color-text-subtle);
}
.dm-display-l {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-display-l);
  font-weight: 400;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-l);
  text-wrap: pretty;
}
.dm-textlink {
  display: inline-block;
  font-family: var(--font-utility);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-line-strong);
  padding: 0 0 2px;
  background: none; border-top: 0; border-left: 0; border-right: 0;
}
@media (hover: hover) and (pointer: fine) { .dm-textlink:hover { color: var(--color-text); } }

/* --------------------------------------------------------------------------
   Containers
   -------------------------------------------------------------------------- */
.dm-container {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 var(--layout-pad);
}
.dm-main { padding-bottom: var(--space-8); }

@media (max-width: 680px) {
  .dm-container { padding: 0 var(--layout-pad-mobile); }
}

/* --------------------------------------------------------------------------
   The mark
   overflow: visible is required — the viewBox is tight to the artwork, so
   round caps sit on the boundary. Nothing that wraps the mark may clip it.
   -------------------------------------------------------------------------- */
.dm-mark { display: block; width: auto; overflow: visible; color: inherit; }
.dm-mark path { stroke: currentColor; fill: none; }
.dm-mark--header { height: var(--mark-header-height); }
.dm-mark--header path { stroke-width: var(--mark-header-stroke); }
.dm-mark--footer { height: var(--mark-footer-height); color: var(--color-text-muted); }
.dm-mark--footer path { stroke-width: var(--mark-footer-stroke); }
.dm-mark--hero { height: var(--mark-hero-height); }
.dm-mark--hero path { stroke-width: var(--mark-hero-stroke); }
/* A logo uploaded in the Customizer (Site Identity). SVGs are inlined and keep
   their own artwork; black fills follow the text colour so they work in dark mode. */
.dm-logo-svg { display: block; width: auto; overflow: visible; }
.dm-logo-svg--header { height: var(--mark-header-height); }
.dm-logo-svg--footer { height: var(--mark-footer-height); color: var(--color-text-muted); }
.dm-logo-svg [fill="#000"], .dm-logo-svg [fill="#000000"], .dm-logo-svg [fill="black"],
.dm-logo-svg path:not([fill]):not([style*="fill"]) { fill: currentColor; }
.dm-logo-img--header { height: var(--mark-header-height); width: auto; display: block; }
.dm-logo-img--footer { height: var(--mark-footer-height); width: auto; display: block; }

/* The header mark draws itself on the first home-page view of a visit and on
   any refresh (html.dm-draw-logo, decided in the <head> script) — not on every
   page. The subpaths are ordered as the writing gesture, so one dash animation
   walks them in order. True path length is 458.2; 470 gives headroom. */
.dm-draw-logo .dm-header .dm-header__logo .dm-mark--header path {
  stroke-dasharray: 470;
  stroke-dashoffset: 0;
  animation: dm-draw var(--dur-draw) cubic-bezier(.65, 0, .35, 1) both;
}
@keyframes dm-draw { from { stroke-dashoffset: 470; } to { stroke-dashoffset: 0; } }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.dm-header {
  position: relative;
  z-index: 30;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: calc(34px + env(safe-area-inset-top)) var(--layout-pad) 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  /* No overflow: hidden here — it would clip the mark's stroke caps. */
}
.dm-header__logo { display: block; flex: 0 0 auto; padding: 6px 8px 6px 0; color: var(--color-text); }
@media (hover: hover) and (pointer: fine) { .dm-header__logo:hover { color: var(--color-text); } }

.dm-nav {
  display: flex; align-items: center; gap: 30px;
  padding-bottom: 3px;
  font-family: var(--font-utility);
  font-size: var(--text-nav);
  font-weight: 500;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
}
.dm-nav ul { display: contents; list-style: none; margin: 0; padding: 0; }
.dm-nav li { display: contents; }
.dm-nav a {
  position: relative;
  color: var(--color-text-muted);
  padding-bottom: 4px;
}
.dm-nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .32s var(--ease);
}
.dm-nav a[aria-current="page"] { color: var(--color-text); }
@media (hover: hover) and (pointer: fine) {
  .dm-nav a:hover { color: var(--color-text); }
  .dm-nav a:hover::after { transform: scaleX(1); }
}
.dm-iconbtn {
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; padding: 4px; margin-left: 2px;
  color: var(--color-text-muted);
}
@media (hover: hover) and (pointer: fine) { .dm-iconbtn:hover { color: var(--color-text); } }

.dm-header__mobile { display: none; align-items: center; gap: 2px; }
.dm-header__mobile .dm-iconbtn { width: 44px; height: 44px; padding: 0; margin: 0; }
.dm-header__mobile .dm-iconbtn svg { width: 17px; height: 17px; }
.dm-burger {
  width: 44px; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: transparent; border: 0; padding: 0;
}
.dm-burger span {
  display: block; width: 22px; height: 1.3px; background: var(--color-text-muted);
  transition: transform .3s var(--ease);
}
.dm-burger[aria-expanded="true"] span:first-child { transform: translateY(3.65px) rotate(45deg); }
.dm-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.65px) rotate(-45deg); }
/* The menu sheet has its own close button, which appears already crossed. Play
   the same 0.3s turn from lines to X each time the sheet opens, so opening
   animates like closing does. (Showing the sheet restarts the animation.) */
@media (prefers-reduced-motion: no-preference) {
  .dm-menu__bar .dm-burger span:first-child { animation: dm-burger-top .3s var(--ease) both; }
  .dm-menu__bar .dm-burger span:last-child { animation: dm-burger-bottom .3s var(--ease) both; }
}
@keyframes dm-burger-top { from { transform: none; } to { transform: translateY(3.65px) rotate(45deg); } }
@keyframes dm-burger-bottom { from { transform: none; } to { transform: translateY(-3.65px) rotate(-45deg); } }

@media (max-width: 680px) {
  .dm-header { padding: calc(28px + env(safe-area-inset-top)) var(--layout-pad-mobile) 8px; }
  html.js .dm-nav { display: none; }
  html.js .dm-header__mobile { display: flex; }
  /* Without JS the menu sheet can't open, so the links stay visible and wrap. */
  html:not(.js) .dm-header { flex-wrap: wrap; }
  html:not(.js) .dm-nav { flex-wrap: wrap; gap: 14px 22px; }
}

/* --------------------------------------------------------------------------
   Portfolio grid
   Thumbnails keep native aspect ratios, so columns are ragged by design.
   CSS Grid (not `columns`) keeps date order reading left-to-right. With JS,
   each tile gets a row span from its rendered height on a 1px row track and
   dense flow packs tiles into the shortest column (assets/js/site.js).
   Without JS this is a plain grid with top-aligned rows.
   -------------------------------------------------------------------------- */
.dm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dm-grid.is-packed {
  grid-auto-rows: 1px;
  grid-auto-flow: row dense;
  row-gap: 0;
}
.dm-grid > * { min-width: 0; }
@media (max-width: 900px) { .dm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .dm-grid { gap: var(--grid-gap-mobile); } .dm-grid.is-packed { row-gap: 0; } }
@media (max-width: 560px) { .dm-grid { grid-template-columns: minmax(0, 1fr); } }

/* Tile */
.dm-tile { display: block; background: var(--color-surface); padding: var(--tile-pad); color: var(--color-text); }
@media (hover: hover) and (pointer: fine) { .dm-tile:hover { color: var(--color-text); } }
.dm-tile__media { position: relative; overflow: hidden; background: var(--color-media-bed); }
.dm-tile__media img {
  display: block; width: 100%; height: auto;
  transition: transform var(--dur-zoom) var(--ease-zoom), filter var(--dur-zoom) var(--ease-zoom);
  will-change: transform;
}
.dm-tile__veil {
  position: absolute; inset: 0;
  background: var(--tile-veil);
  opacity: 0;
  transition: opacity var(--dur-veil) ease;
  pointer-events: none;
}
.dm-tile__cta {
  position: absolute; left: 16px; bottom: 14px;
  display: flex; align-items: center; gap: 9px;
  color: var(--color-on-image);
  font-family: var(--font-utility);
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s ease, transform .6s var(--ease-zoom);
  pointer-events: none;
}
.dm-tile__cta svg { display: block; transition: transform .6s var(--ease-zoom); }
@media (hover: hover) and (pointer: fine) {
  .dm-tile:hover .dm-tile__media img { transform: scale(var(--tile-zoom)); filter: saturate(1.05); }
  .dm-tile:hover .dm-tile__veil { opacity: 1; }
  .dm-tile:hover .dm-tile__cta { opacity: 1; transform: none; }
  .dm-tile:hover .dm-tile__cta svg { transform: translateX(4px); }
}
.dm-tile:focus-visible .dm-tile__media img { transform: scale(var(--tile-zoom)); }
.dm-tile:focus-visible .dm-tile__veil { opacity: 1; }
.dm-tile:focus-visible .dm-tile__cta { opacity: 1; transform: none; }
@media (hover: none) { .dm-tile__veil, .dm-tile__cta { display: none; } }

.dm-tile__title {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: var(--text-title);
  font-weight: 400;
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-title);
}
.dm-tile .dm-meta { margin-top: 7px; }
.dm-tile .dm-meta__sep { opacity: .5; }
.dm-grid--home .dm-tile__title { margin-top: 12px; font-size: var(--text-title-s); letter-spacing: 0; line-height: 1.22; }
.dm-grid--home .dm-tile .dm-meta { margin-top: 5px; gap: 7px; font-size: var(--text-micro); }

/* --------------------------------------------------------------------------
   Index pages (All Works, categories, blog, archives, search)
   -------------------------------------------------------------------------- */
.dm-index { padding-top: 26px; }
.dm-standfirst {
  margin: 20px 0 0;
  max-width: 52ch;
  font-size: var(--text-standfirst);
  line-height: var(--leading-standfirst);
  color: var(--color-text-muted);
  text-wrap: pretty;
}
.dm-standfirst p { margin: 0; }
.dm-standfirst p + p { margin-top: .6em; }
.dm-standfirst a { color: inherit; font-weight: 600; border-bottom: 1px solid var(--color-line-strong); }
@media (hover: hover) and (pointer: fine) { .dm-standfirst a:hover { color: var(--color-link-hover); border-bottom-color: var(--color-link-hover); } }

.dm-filter {
  margin-top: var(--space-7);
  display: flex; flex-wrap: wrap; gap: 12px 26px;
  font-family: var(--font-utility);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-utility);
  text-transform: uppercase;
}
.dm-filter a { color: var(--color-text-muted); padding-bottom: 4px; border-bottom: 1px solid transparent; }
.dm-filter a[aria-current="page"] { color: var(--color-text); border-bottom-color: var(--color-text); }
@media (hover: hover) and (pointer: fine) { .dm-filter a:hover { color: var(--color-text); } }

.dm-works { padding-top: var(--space-7); transition: opacity var(--dur-open) ease; }
.dm-works.is-loading { opacity: .35; pointer-events: none; }

.dm-pagination {
  margin-top: var(--space-8);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 20px;
  font-family: var(--font-utility);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dm-pagination .page-numbers { color: var(--color-text-muted); padding-bottom: 3px; border-bottom: 1px solid transparent; }
.dm-pagination .current { color: var(--color-text); border-bottom-color: var(--color-text); }
.dm-pagination .dots { color: var(--color-text-subtle); }
@media (hover: hover) and (pointer: fine) { .dm-pagination a.page-numbers:hover { color: var(--color-text); } }

.dm-empty { padding: 120px 0 0; text-align: center; }
.dm-empty__title { margin: 0; font-size: 28px; line-height: 1.3; color: var(--color-text-muted); }
.dm-empty__text { margin: 14px auto 0; max-width: 38ch; font-size: var(--text-body-s); line-height: 1.6; color: var(--color-text-subtle); text-wrap: pretty; }
.dm-empty .dm-textlink { margin-top: 28px; }

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */
.dm-home-intro {
  margin-top: 26px;
  max-width: 52ch;
  font-size: var(--text-standfirst);
  line-height: var(--leading-standfirst);
  color: var(--color-text-muted);
}
.dm-home-intro > :first-child { margin-top: 0; }
.dm-home-intro > :last-child { margin-bottom: 0; }
.dm-home-grid { margin-top: 26px; }

.dm-band { margin-top: var(--space-8); }
.dm-band .dm-label { margin-bottom: 20px; }

/* Blog card (home band and blog index) */
.dm-postcard {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  align-items: stretch;
  background: var(--color-surface);
  overflow: hidden;
}
.dm-band .dm-postcard { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.dm-postcard--noimg { grid-template-columns: minmax(0, 1fr) !important; }
.dm-postcard__media { display: block; min-width: 0; padding: 0 16px 0 0; }
.dm-postcard__media .dm-tile__media { height: 100%; }
.dm-postcard__media img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.dm-postcard__body { min-width: 0; padding: 32px 40px 32px 24px; display: flex; flex-direction: column; }
.dm-postcard--noimg .dm-postcard__body { padding-left: 40px; }
.dm-postcard__title {
  margin: 0;
  max-width: 26ch;
  font-family: var(--font-display);
  font-size: var(--text-card-title);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: var(--tracking-heading);
  text-wrap: pretty;
}
.dm-band .dm-postcard__body { padding: 40px 44px 40px 24px; }
.dm-band .dm-postcard__title { font-size: var(--text-display-m); line-height: 1.1; }
.dm-postcard__excerpt {
  margin: 14px 0 0;
  max-width: 60ch;
  font-size: var(--text-body-s);
  line-height: 1.62;
  color: var(--color-text-muted);
  text-wrap: pretty;
}
.dm-band .dm-postcard__excerpt { margin-top: 18px; }
.dm-postcard__excerpt p { margin: 0; }
.dm-postcard .dm-meta { margin-top: auto; padding-top: 36px; }
.dm-postcard .dm-tile__media img { transition: transform var(--dur-zoom) var(--ease-zoom), filter var(--dur-zoom) var(--ease-zoom); }
@media (hover: hover) and (pointer: fine) {
  .dm-postcard__media:hover .dm-tile__media img { transform: scale(var(--tile-zoom)); filter: saturate(1.05); }
  .dm-postcard__media:hover .dm-tile__veil { opacity: 1; }
  .dm-postcard__media:hover .dm-tile__cta { opacity: 1; transform: none; }
  .dm-postcard__media:hover .dm-tile__cta svg { transform: translateX(4px); }
}
.dm-postcard__media:focus-visible .dm-tile__veil { opacity: 1; }
.dm-postcard__media:focus-visible .dm-tile__cta { opacity: 1; transform: none; }

.dm-bloglist { margin-top: var(--space-7); display: flex; flex-direction: column; gap: 24px; }
.dm-bloglist + .dm-pagination { margin-top: 36px; }

@media (max-width: 680px) {
  .dm-band .dm-postcard { grid-template-columns: minmax(0, 1fr); }
  .dm-band .dm-postcard__media { padding: 0; }
  .dm-band .dm-postcard__body { padding: 26px; }
}
@media (max-width: 560px) {
  .dm-postcard { grid-template-columns: minmax(0, 1fr); }
  .dm-postcard__media { padding: 0; }
  .dm-postcard__body, .dm-postcard--noimg .dm-postcard__body { padding: 26px; }
  .dm-bloglist { gap: 0; margin-left: calc(-1 * var(--layout-pad-mobile)); margin-right: calc(-1 * var(--layout-pad-mobile)); }
}

/* --------------------------------------------------------------------------
   Reading panel (single work, single post, page)
   -------------------------------------------------------------------------- */
.dm-panel { max-width: var(--layout-max); margin: 26px auto 0; padding: 0 var(--layout-pad); }
.dm-panel__card {
  container-type: inline-size;
  background: var(--color-surface);
  padding: 0 32px 64px;
}
.dm-panel__hero {
  display: block;
  width: calc(100% + 64px);
  max-width: none;
  margin: 0 -32px;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--color-media-bed);
}
.dm-panel__body { max-width: var(--measure-text); margin: 0 auto; padding-top: var(--space-9); }
.dm-panel__body--after-hero { padding-top: 60px; }
.dm-panel__body--narrow { max-width: var(--measure-page); }

@media (max-width: 680px) {
  .dm-panel { padding: 0; }
  .dm-panel__card { padding: 0 var(--layout-pad-mobile) 48px; }
  .dm-panel__body, .dm-panel__body--after-hero { padding-top: var(--space-8); }
  .dm-panel__hero { width: calc(100% + 52px); margin: 0 calc(-1 * var(--layout-pad-mobile)); }
}

/* --------------------------------------------------------------------------
   Single work
   -------------------------------------------------------------------------- */
.dm-work__title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: var(--text-display-work);
  font-weight: 400;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: pretty;
}
.dm-work .dm-meta { font-size: var(--text-label); letter-spacing: var(--tracking-label); }
.dm-work__body { margin-top: 30px; font-size: var(--text-body); line-height: 1.66; color: var(--color-text-muted); }
.dm-work__body > :first-child { margin-top: 0; }
.dm-work--nomedia .dm-work__body { font-size: var(--text-lede); line-height: var(--leading-lede); }

.dm-media { margin-top: var(--space-9); display: flex; flex-direction: column; gap: 64px; }
.dm-media__images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--media-gap); align-items: start; }
.dm-media__images.is-packed { grid-auto-rows: 1px; grid-auto-flow: row dense; row-gap: 0; }
.dm-media__images.is-single { grid-template-columns: minmax(0, 1fr); }
.dm-media__images > * { min-width: 0; }
@media (max-width: 560px) { .dm-media__images { grid-template-columns: minmax(0, 1fr); gap: var(--grid-gap); } }

.dm-figure { margin: 0; min-width: 0; }
.dm-figure__link { display: block; background: var(--color-media-bed); cursor: zoom-in; }
.dm-figure img { display: block; width: 100%; height: auto; }
.dm-figure figcaption, .dm-video-figure figcaption { margin-top: 12px; }

.dm-video-figure { margin: 0; width: 100%; }
.dm-video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-media-bed);
  overflow: hidden;
}
.dm-video iframe, .dm-video video, .dm-video embed, .dm-video object {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.dm-video__facade {
  position: absolute; inset: 0;
  display: block; width: 100%; padding: 0; border: 0;
  background: transparent;
  cursor: pointer;
}
.dm-video__facade img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dm-video__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 12, 14, .28);
  color: #EFEFEC;
  transition: background var(--dur-veil) ease;
}
.dm-video__play span {
  width: 74px; height: 74px;
  border: 1px solid rgba(239, 239, 236, .8);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.dm-video__play svg { margin-left: 3px; }
@media (hover: hover) and (pointer: fine) { .dm-video__facade:hover .dm-video__play { background: rgba(10, 12, 14, .4); } }
.dm-video__fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

.dm-worknav {
  max-width: var(--measure-text);
  margin: var(--space-10) auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--color-line);
  display: flex; justify-content: space-between; gap: 24px;
}
.dm-work--nomedia .dm-worknav { margin-top: var(--space-8); }
.dm-worknav a { display: flex; flex-direction: column; gap: 6px; max-width: 48%; }
.dm-worknav__next { margin-left: auto; text-align: right; align-items: flex-end; }
.dm-worknav .dm-meta { font-size: var(--text-micro); }
.dm-worknav__title { font-family: var(--font-display); font-size: 18px; line-height: 1.22; color: var(--color-text); }
@media (hover: hover) and (pointer: fine) { .dm-worknav a:hover .dm-worknav__title { color: var(--color-text-muted); } }

/* --------------------------------------------------------------------------
   Long-form prose (posts, pages, work body)
   -------------------------------------------------------------------------- */
.dm-post__title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: var(--text-display-l);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: var(--tracking-display);
  text-wrap: pretty;
}
.dm-post .dm-meta, .dm-page .dm-meta { font-size: var(--text-label); letter-spacing: var(--tracking-label); }
.dm-lede {
  margin: 32px 0 0;
  font-size: var(--text-lede);
  line-height: var(--leading-lede);
  color: var(--color-text-muted);
  text-wrap: pretty;
}
.dm-lede p { margin: 0; }
/* "Lede" paragraph style, chosen per paragraph in the editor (Styles → Lede). */
.dm-prose .is-style-lede {
  font-size: var(--text-lede);
  line-height: var(--leading-lede);
  color: var(--color-text-muted);
}
.dm-rule { margin: var(--space-7) 0 0; height: 1px; background: var(--color-line); border: 0; }

/* Body copy sits a step below full text colour; links, bold and headings use the
   full colour so they stand out. Portfolio intros stay at the softer muted grey. */
.dm-prose { font-size: var(--text-body); line-height: var(--leading-body); color: var(--color-text-body); }
.dm-prose.dm-work__body { color: var(--color-text-muted); }
.dm-rule + .dm-prose { margin-top: var(--space-7); }
.dm-prose::after { content: ''; display: table; clear: both; }
.dm-prose > * { margin-top: 0; margin-bottom: 0; }
.dm-prose > * + * { margin-top: 26px; }
.dm-prose p { text-wrap: pretty; }
/* Text links are semibold, as on the old site: Karla's hairline underline alone
   is too faint to spot a link by. Links inside headings keep the heading weight. */
.dm-prose a { color: var(--color-text); font-weight: 600; border-bottom: 1px solid var(--color-line-strong); transition: color var(--dur-fast), border-color var(--dur-fast); }
.dm-prose :is(h1, h2, h3, h4, h5, h6) a { font-weight: inherit; }
/* Text links turn the safelight red on hover (--color-link-hover in tokens.css). */
@media (hover: hover) and (pointer: fine) { .dm-prose a:hover { color: var(--color-link-hover); border-bottom-color: var(--color-link-hover); } }
.dm-prose a:has(> img) { border-bottom: 0; }
.dm-prose strong, .dm-prose b { font-weight: 600; color: var(--color-text); }

/* Some existing posts use H1 for in-content headings; style them as H2. */
.dm-prose h1, .dm-prose h2 {
  margin-top: 64px;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-heading);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}
.dm-prose h3 {
  margin-top: 52px;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-subheading);
  line-height: var(--leading-title);
}
.dm-prose h4, .dm-prose h5, .dm-prose h6 {
  margin-top: 44px;
  font-family: var(--font-utility);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.dm-prose h1 + *, .dm-prose h2 + *, .dm-prose h3 + * { margin-top: 22px; }

.dm-prose ul, .dm-prose ol { padding-left: 24px; }
.dm-prose li + li { margin-top: 10px; }
.dm-prose li > ul, .dm-prose li > ol { margin-top: 10px; }

.dm-prose blockquote, .dm-prose .wp-block-quote {
  margin: 52px 0 0;
  padding: 0;
  border: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-quote);
  line-height: var(--leading-quote);
  letter-spacing: -.01em;
  color: var(--color-text);
}
.dm-prose blockquote p { margin: 0; }
.dm-prose blockquote p + p { margin-top: .6em; }
.dm-prose blockquote cite, .dm-prose .wp-block-quote cite, .dm-prose .wp-block-pullquote cite {
  display: block;
  margin-top: 20px;
  font-family: var(--font-utility);
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.dm-prose .wp-block-pullquote { margin-top: 52px; padding: 0; border: 0; text-align: left; }
.dm-prose .wp-block-pullquote blockquote { margin: 0; }

.dm-prose figure { margin-top: var(--space-7); }
.dm-prose figure + * { margin-top: 44px; }
.dm-prose figure img { display: block; }
.dm-prose figcaption, .dm-prose .wp-caption-text, .dm-prose .wp-element-caption {
  margin-top: 12px;
  font-family: var(--font-utility);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-caption);
  line-height: 1.5;
  color: var(--color-text-subtle);
  text-align: left;
}
.dm-prose .wp-block-image img, .dm-prose .wp-caption img { background: var(--color-media-bed); }
.dm-prose .wp-caption { max-width: 100%; }

.dm-prose pre, .dm-prose .wp-block-code {
  margin-top: 36px;
  padding: 22px 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
}
.dm-prose code { font-family: var(--font-mono); font-size: .8em; }
.dm-prose pre code { font-size: inherit; }

.dm-prose hr, .dm-prose .wp-block-separator { margin-top: 44px; margin-bottom: 44px; border: 0; height: 1px; background: var(--color-line); }
.dm-prose hr + * { margin-top: 0; }
.dm-prose .wp-block-separator.is-style-dots { height: auto; background: none; text-align: center; color: var(--color-text-subtle); }
.dm-prose .wp-block-separator.is-style-dots::before { content: '···'; font-family: var(--font-display); font-size: 24px; letter-spacing: 1em; padding-left: 1em; }

.dm-prose table { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
.dm-prose th, .dm-prose td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--color-line); text-align: left; vertical-align: top; }
.dm-prose th { font-family: var(--font-utility); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-subtle); }

.dm-prose .wp-block-gallery { display: flex; flex-wrap: wrap; gap: 16px; }
.dm-prose .wp-block-embed__wrapper iframe { width: 100%; }
/* Music players fill the text column. Apple Music's and Spotify's copy-paste
   embed codes carry an inline max-width of 660px (sometimes only one of them
   does), so without this the two players on a page can end up different widths. */
.dm-prose iframe:is([src*="embed.music.apple.com"], [src*="open.spotify.com/embed"], [src*="w.soundcloud.com"], [src*="bandcamp.com/EmbeddedPlayer"]) {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
}
.dm-prose .wp-block-video video { width: 100%; background: var(--color-media-bed); }
.dm-prose .wp-block-spacer { margin-top: 0; }

/* Alignment. The panel card is the container, so "full" bleeds to its edges. */
.dm-prose .alignleft { float: left; max-width: 50%; margin: 8px 28px 16px 0; }
.dm-prose .alignright { float: right; max-width: 50%; margin: 8px 0 16px 28px; }
.dm-prose .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.dm-prose .aligncenter img { margin-left: auto; margin-right: auto; }
.dm-prose .alignwide {
  width: min(100cqw - 64px, 1040px);
  max-width: none;
  margin-left: calc(50% - min(100cqw - 64px, 1040px) / 2);
}
.dm-prose .alignfull {
  width: 100cqw;
  max-width: none;
  margin-left: calc(50% - 50cqw);
}
.dm-prose .alignwide img, .dm-prose .alignfull img { width: 100%; }
.dm-prose .alignfull figcaption { padding: 0 32px; }
@media (max-width: 680px) {
  .dm-prose .alignleft, .dm-prose .alignright { float: none; max-width: 100%; margin: 26px 0 0; }
  .dm-prose .alignwide { width: 100%; margin-left: 0; }
  .dm-prose .alignfull figcaption { padding: 0 var(--layout-pad-mobile); }
}

/* Buttons (block buttons, comment submit, CF7 submit) */
.dm-button,
.dm-prose .wp-block-button__link,
.wpcf7 .wpcf7-submit,
.comment-form .submit {
  display: inline-block;
  background: var(--color-text);
  color: var(--color-bg);
  border: 1px solid var(--color-text);
  border-radius: var(--radius) !important;
  padding: 15px 30px;
  font-family: var(--font-utility);
  font-size: var(--text-label) !important;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  line-height: 1.4;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity var(--dur-fast);
}
@media (hover: hover) and (pointer: fine) {
  .dm-button:hover, .dm-prose .wp-block-button__link:hover, .wpcf7 .wpcf7-submit:hover, .comment-form .submit:hover { color: var(--color-bg); opacity: .86; }
}
.dm-prose .wp-block-button__link { border-bottom: 1px solid var(--color-text); }
.dm-prose .is-style-outline .wp-block-button__link { background: transparent; color: var(--color-text); }
/* Editor buttons are links inside .dm-prose, so they'd otherwise pick up the
   text-link hover (a red underline). Keep them matching the comment button. */
@media (hover: hover) and (pointer: fine) {
  .dm-prose .wp-block-button__link:hover { border-color: var(--color-text); }
  .dm-prose .is-style-outline .wp-block-button__link:hover { color: var(--color-text); }
}
.dm-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* Pages: h2 as a section label (e.g. the Contact services list). */
.dm-page__title { margin: 0; }
.dm-prose--page { margin-top: 34px; }
.dm-prose--page h1, .dm-prose--page h2 {
  margin-top: 34px;
  font-family: var(--font-utility);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--color-text-subtle);
}
.dm-prose--page h2 + ul, .dm-prose--page h2 + ol { margin-top: 12px; }
.dm-prose--page ul, .dm-prose--page ol { padding-left: 20px; font-size: var(--text-small); line-height: 1.7; }
.dm-prose--page li + li { margin-top: 0; }

/* Post terms */
.dm-terms { margin-top: var(--space-8); }
.dm-terms__group + .dm-terms__group { margin-top: var(--space-8); }
.dm-terms__list {
  margin: 26px 0 0; padding: 26px 0 0;
  border-top: 1px solid var(--color-line);
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.dm-chip {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: var(--tracking-caption);
  color: var(--color-text-muted);
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
@media (hover: hover) and (pointer: fine) { .dm-chip:hover { border-color: var(--color-line-strong); color: var(--color-text); } }

.dm-page-links { margin-top: var(--space-7); display: flex; gap: 16px; font-family: var(--font-utility); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-subtle); }

/* --------------------------------------------------------------------------
   Comments
   -------------------------------------------------------------------------- */
.dm-comments { margin-top: var(--space-8); }
.dm-work .dm-comments { max-width: var(--measure-text); margin: var(--space-10) auto 0; }
.dm-comments__list, .dm-comments__list .children { list-style: none; margin: 0; padding: 0; }
.dm-comments__list { margin-top: 30px; border-top: 1px solid var(--color-line); }
.dm-comment__body { display: flex; gap: 16px; padding: 30px 0; border-bottom: 1px solid var(--color-line); }
.dm-comments__list .children .dm-comment__body { padding: 26px 0 26px 60px; }
.dm-comment__avatar {
  flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-surface-sunken);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-utility); font-size: 15px; font-weight: 500;
  color: var(--color-text-muted);
}
.dm-panel__card .dm-comment__avatar { background: var(--color-bg); }
.dm-comments__list .children .dm-comment__avatar { width: 40px; height: 40px; font-size: 14px; background: var(--color-media-bed); color: var(--color-text); }
.dm-comment__main { min-width: 0; }
.dm-comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.dm-comment__name { font-size: 17px; }
.dm-comment__badge {
  font-family: var(--font-utility); font-size: 9px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-text-subtle); border: 1px solid var(--color-line-strong); padding: 2px 7px;
}
.dm-comment__date, .dm-comment__reply a, .dm-comment__pending {
  font-family: var(--font-utility); font-size: var(--text-utility); font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--color-text-subtle);
}
.dm-comment__text { margin-top: 10px; font-size: var(--text-small); line-height: 1.6; color: var(--color-text-muted); max-width: 60ch; }
.dm-comment__text p { margin: 0; text-wrap: pretty; }
.dm-comment__text p + p { margin-top: .7em; }
.dm-comment__reply { margin-top: 12px; }
.dm-comment__pending { margin: 8px 0 0; }
@media (hover: hover) and (pointer: fine) { .dm-comment__reply a:hover, .dm-comment__date:hover { color: var(--color-link-hover); } }
@media (max-width: 560px) { .dm-comments__list .children .dm-comment__body { padding-left: 28px; } }

.dm-comment-form { margin-top: var(--space-8); }
.dm-comment-form__title { margin: 0 0 26px; font-family: var(--font-body); font-size: 22px; line-height: 1.3; }
.dm-comment-form__cancel a { margin-left: 12px; font-family: var(--font-utility); font-size: var(--text-utility); letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-subtle); }
.comment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.comment-form > * { grid-column: 1 / -1; margin: 0; }
.comment-form > .comment-form-author, .comment-form > .comment-form-email { grid-column: auto; }
.comment-form .logged-in-as { margin-bottom: 26px; font-size: 15px; color: var(--color-text-muted); }
.comment-form .logged-in-as a { color: var(--color-text-muted); border-bottom: 1px solid var(--color-line-strong); }
@media (hover: hover) and (pointer: fine) { .comment-form .logged-in-as a:hover { color: var(--color-link-hover); border-bottom-color: var(--color-link-hover); } }
@media (max-width: 560px) { .comment-form > .comment-form-author, .comment-form > .comment-form-email { grid-column: 1 / -1; } }

/* --------------------------------------------------------------------------
   Form fields (comments, contact form, search page)
   -------------------------------------------------------------------------- */
.dm-field { margin: 0 0 34px; }
.dm-field label, .wpcf7 label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-utility);
  font-size: var(--text-utility);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.dm-field input, .dm-field textarea,
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="url"],
.wpcf7 input[type="number"], .wpcf7 input[type="date"], .wpcf7 textarea, .wpcf7 select {
  display: block;
  width: 100%;
  margin-top: 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-line-strong);
  border-radius: 0;
  padding: 10px 0 11px;
  font-family: var(--font-body);
  font-size: var(--text-standfirst);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text);
  outline: none;
  transition: border-color var(--dur-fast);
  -webkit-appearance: none;
  appearance: none;
}
.dm-field textarea, .wpcf7 textarea { resize: vertical; min-height: 120px; }
.dm-field input::placeholder, .dm-field textarea::placeholder, .wpcf7 ::placeholder { color: var(--color-text-subtle); opacity: .7; }
.dm-field input:focus, .dm-field textarea:focus,
.wpcf7 input:focus, .wpcf7 textarea:focus, .wpcf7 select:focus { border-bottom-color: var(--color-text); outline: none; }
.dm-field input:focus-visible, .dm-field textarea:focus-visible,
.wpcf7 input:focus-visible, .wpcf7 textarea:focus-visible { outline: none; }

.comment-form-cookies-consent, .wpcf7-acceptance label, .wpcf7-checkbox label, .wpcf7-radio label, .mc4wp-checkbox label {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 28px;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
.comment-form-cookies-consent label { margin: 0; font-size: 15px; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--color-text); flex: 0 0 auto; }
.comment-form .mc4wp-checkbox { margin: 0 0 28px; }
.comment-form .mc4wp-checkbox label { margin: 0; }

/* Contact Form 7 — appearance only; its markup is left alone. */
.wpcf7 { margin-top: var(--space-8); }
.wpcf7 form { display: flex; flex-direction: column; }
.wpcf7 form > p { margin: 0 0 34px; }
.wpcf7 form > p:last-of-type { margin-bottom: 0; }
.wpcf7 .dm-optional { font-size: var(--text-label); letter-spacing: .02em; text-transform: none; }
/* Heading above a form on a page ("Send a message"): give it the class dm-form-title. */
.dm-prose .dm-form-title { margin-top: 52px; font-family: var(--font-body); font-size: 22px; line-height: 1.3; letter-spacing: 0; }
.dm-prose .dm-form-title + * { margin-top: 26px; }
.wpcf7-form-control-wrap { display: block; }
.wpcf7 .wpcf7-not-valid { border-bottom-color: var(--color-error) !important; }
.wpcf7-not-valid-tip {
  display: block;
  margin-top: 8px;
  font-family: var(--font-utility);
  font-size: var(--text-caption);
  font-weight: 400;
  letter-spacing: .03em;
  text-transform: none;
  color: var(--color-error);
}
/* CF7 prints its message after the button; the design shows it above the fields. */
.wpcf7 form .wpcf7-response-output {
  order: -1;
  margin: 0 0 30px;
  padding: 14px 16px;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-family: var(--font-utility);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--color-text);
}
/* CF7's own stylesheet colours this border yellow/red per state; the design keeps it a hairline. */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output { border-color: var(--color-line-strong); }
/* Sent: the fields step aside and the thank-you note takes their place. */
.wpcf7 form.sent > p { display: none; }
.wpcf7 form.sent .wpcf7-response-output {
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
  max-width: 44ch;
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -.01em;
  text-wrap: pretty;
  animation: dm-rise .5s ease both;
}
.wpcf7-spinner { margin: 0 0 0 16px; vertical-align: middle; }
@keyframes dm-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.dm-404 { margin-top: 26px; background: var(--color-surface); padding: 150px 40px; text-align: center; }
.dm-404__title {
  margin: 18px auto 0; max-width: 22ch;
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-404); line-height: 1.1; letter-spacing: -.016em;
}
.dm-404__text { margin: 18px auto 0; max-width: 40ch; font-size: 18px; line-height: 1.6; color: var(--color-text-muted); text-wrap: pretty; }
.dm-404__links { margin-top: 34px; display: flex; justify-content: center; flex-wrap: wrap; gap: 28px; }
@media (max-width: 680px) { .dm-404 { padding: 96px 26px; } }

/* --------------------------------------------------------------------------
   Search results (overlay and search.php share these cards)
   -------------------------------------------------------------------------- */
.dm-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.dm-disc { display: block; height: 100%; background: var(--color-surface); overflow: hidden; color: var(--color-text); }
@media (hover: hover) and (pointer: fine) { .dm-disc:hover { color: var(--color-text); } }
.dm-disc__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--color-surface-sunken); }
.dm-disc__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .dm-disc:hover .dm-disc__media img { transform: scale(1.04); } }
.dm-disc__body { padding: 16px 18px 20px; }
.dm-disc__kind {
  margin: 0;
  font-family: var(--font-utility); font-size: var(--text-micro); font-weight: 500;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--color-text-subtle);
}
.dm-disc__title { margin: 7px 0 0; font-family: var(--font-display); font-size: 20px; line-height: 1.22; letter-spacing: -.01em; text-wrap: pretty; }
@media (hover: hover) and (pointer: fine) { .dm-disc:hover .dm-disc__title { color: var(--color-focus); } }

.dm-searchfield {
  margin-top: 30px;
  display: flex; align-items: center; gap: 20px;
  padding: 26px 30px;
  background: var(--color-surface);
  color: var(--color-text-subtle);
}
.dm-searchfield svg { flex: 0 0 auto; }
.dm-searchfield input {
  flex: 1 1 auto; min-width: 0;
  background: transparent; border: 0; outline: none; padding: 2px 0;
  font-family: var(--font-body);
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.4;
  color: var(--color-text);
}
.dm-searchfield input::placeholder { color: var(--color-text-subtle); }
.dm-searchfield input:focus-visible { outline: none; } /* the caret marks focus, as in the design */
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.dm-searchfield .dm-searchfield__submit { background: none; border: 0; padding: 0; color: var(--color-text-muted); }
@media (max-width: 680px) {
  .dm-searchfield { gap: 12px; padding: 16px 18px; }
  .dm-searchfield svg { width: 20px; height: 20px; }
  .dm-searchfield input { font-size: 17px; }
}
.dm-search-section { padding-top: var(--space-7); }
.dm-search-section[hidden] { display: none; }
.dm-search__more { margin: 28px 0 0; }
.dm-search__more[hidden] { display: none; }
.dm-search-section .dm-label { margin-bottom: 18px; }
.dm-noresults__title { margin: 0; font-family: var(--font-display); font-size: 34px; line-height: 1.14; letter-spacing: var(--tracking-heading); }
.dm-noresults__text { margin: 14px 0 0; max-width: 40ch; font-size: var(--text-body-s); line-height: 1.6; color: var(--color-text-subtle); text-wrap: pretty; }

/* --------------------------------------------------------------------------
   Search view and menu sheet
   -------------------------------------------------------------------------- */
/* Search view. Not an overlay: while open, everything else on the page is
   hidden and the view scrolls as the page itself, so on iOS Safari 26 it flows
   under the floating toolbar like any other page (fixed overlays get cut off
   above it). The browser's own pull-to-refresh is switched off meanwhile so
   "pull down to close" doesn't reload the page. */
.dm-search-view { min-height: 100vh; background: var(--color-bg); color: var(--color-text); }
.dm-search-view[hidden] { display: none; }
.dm-search-view:not([hidden]) { animation: dm-fade .18s ease both; }
@keyframes dm-fade { from { opacity: 0; } to { opacity: 1; } }
html.dm-search-open { overscroll-behavior-y: none; }
html.dm-search-open body > :not(.dm-search-view):not(#wpadminbar):not(script):not(style):not(link):not(template) { display: none !important; }

.dm-sheet__top {
  max-width: var(--layout-max); margin: 0 auto;
  padding: calc(38px + env(safe-area-inset-top)) 48px 38px;
  display: flex; align-items: center; justify-content: flex-end;
}
.dm-sheet__close {
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: 0; padding: 10px 0;
  font-family: var(--font-utility); font-size: var(--text-label); font-weight: 500;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--color-text-subtle);
}
@media (hover: hover) and (pointer: fine) { .dm-sheet__close:hover { color: var(--color-text); } }
.dm-search__hint { padding-top: var(--space-8); padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
@media (max-width: 680px) {
  .dm-sheet__top { padding: calc(22px + env(safe-area-inset-top)) var(--layout-pad-mobile) 4px; }
  .dm-search__esc { display: none; }
}
@media (hover: hover) and (pointer: fine) { .dm-search__pull { display: none; } }
@media (hover: none) { .dm-search__esc { display: none; } }

/* Menu sheet (mobile).
   Opening it: the header bar stays put, a hairline draws across under it, and
   at the same moment the white panel is revealed as a circle growing from the
   top right (the menu button) down over the page.

   Built for iOS Safari 26 (tested on an iPhone 13 mini). Safari doesn't paint
   page content behind its status bar or floating toolbar; it tints them with
   the background-color of the ordinary fixed element touching each edge, and
   keeps the first colour it finds. So:
   - every layer is a plain position:fixed element with its own background
     colour (no <dialog>: the browser's top layer isn't reliably sampled);
   - the cream bar touches the top edge, and an unclipped white strip
     (.dm-menu__edge) touches the bottom edge from the first frame;
   - the page is never switched to position:fixed (that made it a full-screen
     cream fixed element Safari locked onto, and shifted the content). site.js
     stops it scrolling instead.
   Fixed content is clipped above the floating toolbar, so the links shrink to
   fit short screens and the footnote follows the links. */
.dm-menu { position: fixed; inset: 0; z-index: 900; }
.dm-menu[hidden] { display: none; }
.dm-menu__bar {
  position: fixed; left: 0; right: 0;
  top: var(--dm-menu-offset, 0px); /* clears the WordPress admin bar when it's in view (set in site.js) */
  z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between;
  /* Top matches the mobile header. The bottom puts the hairline (and the top of
     the white panel) exactly where page content starts: the header's own 8px
     bottom padding plus the 26px gutter every page leaves above its first card
     or tile. Change this together with the mobile .dm-header padding. */
  padding: calc(28px + env(safe-area-inset-top)) var(--layout-pad-mobile) calc(8px + var(--layout-pad-mobile));
  background-color: var(--color-bg);
}
.dm-menu__bar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--color-line-strong);
  transform-origin: right;
  animation: dm-line-draw .62s var(--ease) both;
}
@keyframes dm-line-draw { from { transform: scaleX(0); } to { transform: none; } }
.dm-menu__bar .dm-header__mobile { display: flex; }
.dm-menu__nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  top: var(--dm-menu-bar-bottom, 102px); /* measured in site.js */
  z-index: 2;
  display: flex; flex-direction: column;
  padding: 44px var(--layout-pad-mobile) 0;
  background-color: var(--color-surface);
  overflow-y: auto; /* only scrolls on very short screens, e.g. landscape */
  overscroll-behavior: contain;
  animation: dm-reveal .62s var(--ease) both;
}
@keyframes dm-reveal {
  from { clip-path: circle(0% at calc(100% - 46px) 0); }
  to   { clip-path: circle(150% at calc(100% - 46px) 0); }
}
.dm-menu__edge {
  position: fixed; left: 0; right: 0;
  bottom: -8px; height: 12px; /* Safari samples elements ≥3px tall within ~4px of the edge */
  z-index: 4;
  display: none; /* switched on by site.js the moment the reveal reaches the bottom edge, so the toolbar turns white with the panel */
  background-color: var(--color-surface);
}
.dm-menu.is-covered .dm-menu__edge { display: block; }
.dm-menu__item {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 22px;
  flex: 0 1 78px; /* 78px each where there's room; shrinks toward 52px on short screens */
  min-height: 52px;
  color: var(--color-text);
  transition: padding-left .55s var(--ease-out);
}
.dm-menu__index {
  font-family: var(--font-utility); font-size: 11px; font-weight: 600; letter-spacing: .22em;
  color: var(--color-text-subtle);
  transition: color .45s var(--ease);
}
.dm-menu__clip { display: block; overflow: hidden; padding: 2px 0 8px; }
.dm-menu__label {
  display: block;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(34px, 8.6vw, 48px); line-height: 1.16; letter-spacing: -.02em;
  animation: dm-menu-rise .66s var(--ease-out) both;
  animation-delay: calc(.22s + var(--i, 0) * .06s);
}
@keyframes dm-menu-rise { from { transform: translateY(115%); } to { transform: none; } }
.dm-menu__arrow {
  display: flex; color: var(--color-focus);
  opacity: 0; transform: translateX(-12px);
  transition: opacity .4s ease, transform .55s var(--ease-out);
}
.dm-menu__rule { grid-column: 1 / -1; height: 1px; background: var(--color-line); }
.dm-menu__item[aria-current="page"] .dm-menu__index { color: var(--color-focus); }
.dm-menu__item[aria-current="page"] .dm-menu__arrow { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .dm-menu__item:hover { padding-left: 16px; color: var(--color-text); }
  .dm-menu__item:hover .dm-menu__index { color: var(--color-focus); }
  .dm-menu__item:hover .dm-menu__arrow { opacity: 1; transform: none; }
}
.dm-menu__foot {
  flex: 0 0 auto;
  padding: 28px 0 24px; /* follows the links, clear of iOS Safari's floating toolbar */
  animation: dm-fade .6s ease both; animation-delay: .68s;
}
/* Short screens (e.g. iPhone mini/SE): tighter rhythm so everything fits above the toolbar. */
@media (max-height: 760px) {
  .dm-menu__nav { padding-top: 24px; }
  .dm-menu__item { flex-basis: 62px; }
  .dm-menu__label { font-size: clamp(30px, 8vw, 40px); }
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.dm-lb {
  position: fixed; inset: 0; z-index: 1100;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--color-lightbox-bg);
  color: var(--color-lightbox-text);
  display: flex; flex-direction: column;
}
.dm-lb:not([open]) { display: none; }
.dm-lb::backdrop { background: var(--color-lightbox-bg); }
.dm-lb[open] { animation: dm-fade var(--dur-open) ease both; }
.dm-lb__top { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: calc(20px + env(safe-area-inset-top)) 24px 20px; }
.dm-lb__count { font-family: var(--font-utility); font-size: var(--text-label); font-weight: 500; letter-spacing: var(--tracking-label); color: rgba(233, 231, 226, .6); }
.dm-lb__btn {
  width: 52px; height: 52px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; padding: 0;
  color: rgba(233, 231, 226, .6);
  transition: color var(--dur-fast), opacity .45s ease;
}
.dm-lb__btn--close { width: 44px; height: 44px; color: rgba(233, 231, 226, .75); }
@media (hover: hover) and (pointer: fine) { .dm-lb__btn:hover { color: var(--color-lightbox-text); } }
.dm-lb__stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 0 20px; overflow: hidden; }
.dm-lb__frame { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.dm-lb__img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.dm-lb__img.is-in { animation: dm-fade var(--dur-open) ease both; }
.dm-lb__cap { flex: 0 0 auto; padding: 24px 76px calc(32px + env(safe-area-inset-bottom)); text-align: center; min-height: 80px; }
.dm-lb__cap p { margin: 0; font-family: var(--font-utility); font-size: 12px; letter-spacing: var(--tracking-caption); color: rgba(233, 231, 226, .72); }
.dm-lb :focus-visible { outline-color: var(--color-lightbox-text); }
@media (max-width: 680px) {
  .dm-lb__top { padding-top: calc(14px + env(safe-area-inset-top)); }
  .dm-lb__stage { position: relative; padding: 0 8px; gap: 0; }
  .dm-lb__btn--prev, .dm-lb__btn--next {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(13, 15, 17, .55);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    color: rgba(233, 231, 226, .92);
  }
  .dm-lb__btn--prev { left: 6px; }
  .dm-lb__btn--next { right: 6px; }
  .dm-lb__cap { padding: 18px 24px calc(26px + env(safe-area-inset-bottom)); }
}
@media (hover: none) {
  .dm-lb__stage.is-idle .dm-lb__btn--prev, .dm-lb__stage.is-idle .dm-lb__btn--next { opacity: 0; pointer-events: none; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.dm-footer__cols {
  padding: var(--space-8) 0;
  display: grid;
  grid-template-columns: repeat(var(--footer-cols, 4), minmax(0, 1fr));
  gap: 44px 56px;
  align-items: start;
}
@media (max-width: 900px) { .dm-footer__cols { grid-template-columns: repeat(min(2, var(--footer-cols, 4)), minmax(0, 1fr)); } }
@media (max-width: 560px) { .dm-footer__cols { grid-template-columns: minmax(0, 1fr); } }
.dm-footer__col { max-width: 34ch; font-size: var(--text-small); line-height: 1.6; color: var(--color-text-muted); }
.dm-footer__col p { margin: 0; text-wrap: pretty; }
.dm-footer__col a { color: var(--color-text-muted); font-weight: 600; border-bottom: 1px solid var(--color-line-strong); }
@media (hover: hover) and (pointer: fine) { .dm-footer__col a:not(.dm-footer__home):hover { color: var(--color-link-hover); border-bottom-color: var(--color-link-hover); } }
.dm-footer__col .dm-footer__home { display: inline-block; border: 0; padding: 0 0 4px; }
.dm-footer__widget + .dm-footer__widget { margin-top: 16px; }
.dm-footer__bottom {
  padding: 0 0 64px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
}
.dm-footer__bottom:first-child { padding-top: var(--space-8); }
/* Phones: the four footer items stack, so desktop spacing adds up to a very tall
   footer. Tighter rhythm here; desktop is unchanged. */
@media (max-width: 680px) {
  .dm-main { padding-bottom: 40px; }
  .dm-footer__cols { padding: 36px 0; row-gap: 28px; }
  .dm-footer__bottom { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .dm-footer__bottom:first-child { padding-top: 36px; }
}
.dm-footer__copy { margin: 0; font-family: var(--font-utility); font-size: var(--text-utility); letter-spacing: var(--tracking-utility); text-transform: uppercase; color: var(--color-text-subtle); }
.dm-social { display: flex; align-items: center; gap: 16px; margin: 0; padding: 0; list-style: none; }
.dm-social a { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: var(--color-text-muted); }
@media (hover: hover) and (pointer: fine) { .dm-social a:hover { color: var(--color-text); } }

/* MC4WP newsletter. MC4WP generates the form and response containers, so
   this one component uses real classes. Paste the form markup from
   docs/mc4wp-newsletter-form.html into the plugin's form editor and turn off
   "Load form styles" in MC4WP settings. */
.mc4wp-form { max-width: 34ch; }
.mc4wp-form p { margin: 0; }
.dm-nl__row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.dm-nl__label { font-size: var(--text-small); line-height: 1.6; color: var(--color-text-muted); white-space: nowrap; }
.dm-nl__field { position: relative; flex: 1 1 120px; min-width: 0; }
.dm-nl__input {
  width: 100%;
  font: inherit; font-size: var(--text-small); line-height: 1.6;
  padding: 0 26px 1px 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--color-line-strong); border-radius: 0;
  color: var(--color-text);
  -webkit-appearance: none; appearance: none;
}
.dm-nl__input:focus { outline: 0; border-bottom-color: var(--color-text); }
.dm-nl__input::placeholder { color: var(--color-text-subtle); opacity: 1; }
.dm-nl__submit {
  position: absolute; right: 0; bottom: 5px;
  padding: 0; background: none; border: 0;
  color: var(--color-text-muted);
  transition: color var(--dur-fast);
}
.dm-nl__submit:hover { color: var(--color-text); }
.dm-nl__submit svg { display: block; }
.mc4wp-response { margin: 6px 0 0; }
.mc4wp-response p { margin: 0; font-size: var(--text-small); line-height: 1.6; color: var(--color-text-muted); }
.mc4wp-response .mc4wp-error p, .mc4wp-response .mc4wp-alert.mc4wp-error p {
  font-family: var(--font-utility); font-size: var(--text-caption); line-height: 1.5; letter-spacing: .03em;
  color: var(--color-error);
}
.mc4wp-form-success .dm-nl__row { display: none; }
@media (max-width: 680px) { .dm-nl__field { flex-basis: 100%; margin-top: 10px; } }

/* --------------------------------------------------------------------------
   Reduced motion: everything collapses to instant.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
