/* Dealsmaster Editorial v7: user-led motion, editorial depth and living page rhythm. */

:root {
  --dm-motion-ease: cubic-bezier(.2,.72,.22,1);
  --dm-motion-soft: cubic-bezier(.22,.61,.28,1);
}

/* The edition opens as one image-led editorial spread. */
.dm-home-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: 0;
  padding: clamp(3rem, 5vw, 5.7rem) 0 clamp(4.6rem, 7vw, 7rem);
}

.dm-home-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.6rem, 3vw, 3rem);
  align-items: center;
}

.dm-home-hero__copy {
  grid-column: 1 / span 6;
  padding-right: clamp(0rem, 2vw, 1.5rem);
}

.dm-home-hero__copy > p:not(.dm-kicker) {
  max-width: 47ch;
  margin: 1.25rem 0 0;
  color: #5f574d;
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.56;
}

.dm-edition-title { text-wrap: balance; }

.dm-home-hero__feature {
  position: relative;
  grid-column: 7 / -1;
  min-width: 0;
  padding: 0 0 clamp(3rem, 5vw, 4.5rem);
}

.dm-home-hero__feature .dm-story-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  box-shadow: 0 30px 76px rgba(52,37,25,0.17), 0 7px 18px rgba(52,37,25,0.09);
}

.dm-home-hero__feature .dm-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dm-home-hero__feature .dm-image-note { z-index: 4; }

.dm-home-hero__slip {
  position: absolute;
  z-index: 5;
  right: clamp(1rem, 3vw, 3rem);
  bottom: 0;
  left: clamp(-2.5rem, -3vw, -1rem);
  width: auto;
  margin: 0;
  padding: clamp(1.05rem, 2vw, 1.45rem);
  border-bottom: 4px solid var(--dm-rust);
  background: #e6cc72;
  box-shadow: 0 18px 42px rgba(61,43,25,0.18);
}

.dm-home-hero__slip .dm-story-meta { margin-bottom: 0.45rem; }
.dm-home-hero__slip h2 { margin: 0; font-size: clamp(1.75rem, 2.65vw, 2.75rem); line-height: 0.98; }
.dm-home-hero__slip > p:not(.dm-story-meta) { max-width: 54ch; margin: 0.65rem 0 0.75rem; font-size: 0.88rem; line-height: 1.45; }

.dm-hero-cue {
  display: inline-flex;
  width: auto;
  min-height: 44px;
  gap: 0.8rem;
  align-items: center;
  margin-top: clamp(1.4rem, 3vw, 2.6rem);
  color: #4f473d;
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

.dm-hero-cue i {
  position: relative;
  width: 52px;
  height: 1px;
  overflow: hidden;
  background: rgba(79,71,61,0.28);
}

.dm-hero-cue i::after {
  position: absolute;
  inset: 0;
  background: var(--dm-rust);
  content: "";
  transform: translateX(-105%);
}

.dm-motion-v7:not(.dm-reduced-motion) .dm-home-hero .dm-kicker,
.dm-motion-v7:not(.dm-reduced-motion) .dm-edition-title,
.dm-motion-v7:not(.dm-reduced-motion) .dm-home-hero__copy > p,
.dm-motion-v7:not(.dm-reduced-motion) .dm-hero-cue,
.dm-motion-v7:not(.dm-reduced-motion) .dm-home-hero__slip {
  opacity: 0;
  transform: translateY(14px);
}

.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-home-hero .dm-kicker,
.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-edition-title,
.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-home-hero__copy > p,
.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-hero-cue,
.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-home-hero__slip {
  opacity: 1;
  transform: none;
  transition: opacity 500ms var(--dm-motion-ease), transform 540ms var(--dm-motion-ease);
}

.dm-motion-v7.dm-page-ready .dm-edition-title { transition-delay: 40ms; }
.dm-motion-v7.dm-page-ready .dm-home-hero__copy > p { transition-delay: 95ms; }
.dm-motion-v7.dm-page-ready .dm-hero-cue { transition-delay: 145ms; }
.dm-motion-v7.dm-page-ready .dm-home-hero__slip { transition-delay: 125ms; }
.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-hero-cue i::after { animation: dm-cue-line 1.25s var(--dm-motion-ease) 300ms 3; }

.dm-motion-v7:not(.dm-reduced-motion) .dm-home-hero__feature .dm-story-image::after,
.dm-motion-v7:not(.dm-reduced-motion) .dm-article-opening > .dm-article-hero::before {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: #e9dfd0;
  content: "";
  pointer-events: none;
  transform: translateX(0);
  transition: transform 620ms var(--dm-motion-ease) 20ms;
}

.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-home-hero__feature .dm-story-image::after,
.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-article-opening > .dm-article-hero::before {
  transform: translateX(102%);
}

@keyframes dm-cue-line {
  0% { transform: translateX(-105%); }
  58%, 100% { transform: translateX(105%); }
}

.dm-lead-section {
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding-top: clamp(2.4rem, 4vw, 4.2rem);
}

.dm-lead-side--opening {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 3rem);
}

.dm-lead-side--opening .dm-side-story {
  display: grid;
  grid-template-columns: minmax(170px, .76fr) minmax(0, 1.24fr);
  gap: clamp(1rem, 2vw, 1.7rem);
  align-items: center;
  padding-bottom: 1.2rem;
}

.dm-lead-side--opening .dm-side-story .dm-side-image { aspect-ratio: 4 / 3; }
.dm-lead-side--opening .dm-side-story > div { padding-top: 0; }
.dm-lead-side--opening .dm-side-story h2 { font-size: clamp(1.55rem, 2.2vw, 2.25rem); }
.dm-lead-side--opening .dm-side-story > div > p:not(.dm-story-meta) { font-size: 0.88rem; line-height: 1.45; }

/* Article titles and lead images share the opening viewport. */
.dm-article-opening {
  width: min(1280px, calc(100% - 64px));
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 3rem);
  align-items: end;
  margin: clamp(2.5rem, 5vw, 5rem) auto 0 !important;
}

.dm-article-opening .dm-article-title-group {
  grid-column: 1 / span 6;
  align-self: end;
  max-width: none !important;
  margin: 0 !important;
}

.dm-article-opening .dm-article-title-group h1 {
  max-width: 12ch;
  font-size: clamp(3.2rem, 5.4vw, 6rem);
}

.dm-article-opening > .dm-article-hero {
  position: relative;
  grid-column: 7 / -1;
  grid-row: 1 / span 2;
  width: 100% !important;
  align-self: stretch;
  overflow: hidden;
  margin: 0 !important;
}

.dm-article-opening > .dm-article-hero picture { display: block; height: 100%; }
.dm-article-opening > .dm-article-hero img {
  display: block;
  width: 100%;
  height: clamp(500px, 53vw, 720px);
  object-fit: cover;
}

.dm-article-opening > .dm-article-hero figcaption { position: relative; z-index: 4; }
.dm-article-opening > .dm-article-hero .dm-image-study { z-index: 5; }

.dm-article-intro {
  grid-column: 1 / span 6;
  align-self: start;
  margin: 0 !important;
  padding-bottom: 1rem;
}

.dm-article-intro .dm-article-deck { max-width: 43ch; }

.dm-motion-v7:not(.dm-reduced-motion) .dm-article-title-group,
.dm-motion-v7:not(.dm-reduced-motion) .dm-article-intro {
  opacity: 1;
  transform: translateY(7px);
}

.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-article-title-group,
.dm-motion-v7.dm-page-ready:not(.dm-reduced-motion) .dm-article-intro {
  opacity: 1;
  transform: none;
  transition: transform 360ms var(--dm-motion-ease);
}

.dm-motion-v7.dm-page-ready .dm-article-intro { transition-delay: 60ms; }

/* Sections and their contents enter in a paced sequence, never all at once. */
.dm-motion-v7:not(.dm-reduced-motion) [data-dm-motion-section] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms var(--dm-motion-ease), transform 660ms var(--dm-motion-ease);
}

.dm-motion-v7:not(.dm-reduced-motion) [data-dm-motion-section].is-in-view {
  opacity: 1;
  transform: none;
}

[data-dm-motion-section][id] { scroll-margin-top: calc(var(--dm-nav-height, 72px) + 1rem); }

.dm-motion-v7:not(.dm-reduced-motion) [data-dm-motion-section]:target {
  opacity: 1;
  transform: none;
}

.dm-motion-v7:not(.dm-reduced-motion) [data-dm-motion-item] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms var(--dm-motion-ease), transform 560ms var(--dm-motion-ease);
}

.dm-motion-v7:not(.dm-reduced-motion) .is-in-view [data-dm-motion-item],
.dm-motion-v7:not(.dm-reduced-motion) [data-dm-motion-item].is-in-view {
  opacity: 1;
  transform: none;
  transition-delay: var(--dm-motion-delay, 0ms);
}

.dm-section-head { position: relative; }
.dm-section-head::after {
  display: block;
  width: clamp(54px, 8vw, 110px);
  height: 2px;
  margin-top: 1.1rem;
  background: currentColor;
  content: "";
  opacity: 0.26;
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 780ms var(--dm-motion-ease), opacity 780ms ease;
}

.is-in-view .dm-section-head::after { opacity: 0.48; transform: scaleX(1); }

/* A small rail meter makes sideways movement visible before the visitor swipes. */
.dm-rail-meter {
  position: relative;
  width: min(210px, 42vw);
  height: 2px;
  overflow: hidden;
  margin-top: 0.7rem;
  color: var(--dm-rust);
  background: rgba(32,29,24,0.16);
  pointer-events: none;
}

.dm-rail-meter::after {
  position: absolute;
  inset: 0;
  background: currentColor;
  content: "";
  opacity: 1;
  transform: scaleX(var(--dm-rail-progress, .12));
  transform-origin: left;
  transition: transform 180ms linear;
}

.dm-field-notes .dm-rail-meter { color: #1e211b; background: rgba(30,33,27,0.16); }

.dm-life-strip.is-viewport-paused .dm-life-track,
.dm-life-strip.is-page-hidden .dm-life-track,
.dm-life-strip:hover .dm-life-track,
.dm-life-strip:focus-within .dm-life-track { animation-play-state: paused; }

/* The Useful Edit becomes a compact scroll story on larger screens. */
.dm-useful-edit { --dm-edit-progress: 25%; }
.dm-edit-scene { position: relative; }
.dm-edit-scene::after {
  position: absolute;
  top: 0;
  right: -11px;
  width: 3px;
  height: min(610px, 100%);
  background: linear-gradient(to bottom, var(--dm-gold) 0 var(--dm-edit-progress), rgba(255,255,255,0.18) var(--dm-edit-progress) 100%);
  content: "";
  transition: background 360ms ease;
}

.dm-edit-list > li {
  opacity: 0.52;
  transform: translateX(8px);
  transition: opacity 420ms ease, transform 520ms var(--dm-motion-ease), border-color 420ms ease;
}

.dm-edit-list > li.is-active {
  border-color: rgba(255,255,255,0.42);
  opacity: 1;
  transform: none;
}

/* Article motion is reserved for visual evidence and tools, not reading copy. */
.dm-single .dm-article-content h2[data-dm-reading-heading] {
  position: relative;
  transition: color 320ms ease;
}

.dm-single .dm-article-content h2[data-dm-reading-heading]::before {
  position: absolute;
  top: 0.12em;
  bottom: 0.12em;
  left: -1.3rem;
  width: 3px;
  border-radius: 999px;
  background: var(--dm-rust);
  content: "";
  opacity: 0.2;
  transform: scaleY(0.18);
  transform-origin: top;
  transition: opacity 360ms ease, transform 520ms var(--dm-motion-ease);
}

.dm-single .dm-article-content h2[data-dm-reading-heading].is-current::before {
  opacity: 0.9;
  transform: scaleY(1);
}

.dm-guide-nav a[aria-current="location"] {
  position: relative;
  color: var(--dm-rust);
  font-weight: 760;
}

.dm-guide-nav a[aria-current="location"]::before {
  position: absolute;
  top: 0.72em;
  left: -0.78rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

/* A slim docked navigation keeps the page connected while the body moves. */
.dm-nav-docked .dm-site-header { padding-bottom: var(--dm-nav-height, 52px); }
.dm-nav-docked .dm-nav-bar {
  position: fixed !important;
  z-index: 900;
  top: var(--wp-admin--admin-bar--height, 0px);
  right: 0;
  left: 0;
  margin: 0 !important;
  background-color: rgba(252,249,243,0.9);
  box-shadow: 0 10px 30px rgba(48,35,25,0.1), inset 0 -1px rgba(153,65,44,0.35);
  backdrop-filter: blur(12px) saturate(1.08);
}

.dm-motion-v7.dm-nav-docked:not(.dm-reduced-motion) .dm-nav-bar { animation: dm-nav-settle 360ms var(--dm-motion-ease) both; }

@keyframes dm-nav-settle {
  from { opacity: 0.65; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* Hover and keyboard focus both receive the same tactile response. */
@media (hover: hover) and (pointer: fine) {
  .dm-reading-path,
  .dm-weekend-grid > a,
  .dm-field-note-card,
  .dm-experience-card,
  .dm-library-card {
    transition: transform 440ms var(--dm-motion-ease), box-shadow 440ms ease;
  }

  .dm-reading-path:hover,
  .dm-reading-path:focus-within,
  .dm-weekend-grid > a:hover,
  .dm-weekend-grid > a:focus-visible,
  .dm-field-note-card:hover,
  .dm-field-note-card:focus-visible,
  .dm-experience-card:hover,
  .dm-experience-card:focus-within,
  .dm-library-card:hover,
  .dm-library-card:focus-visible { transform: translateY(-3px); }

  .dm-story-image:hover img,
  .dm-side-image:hover img,
  .dm-room-card:hover img,
  .dm-field-note-card:hover img,
  .dm-experience-card__media:hover img,
  .dm-library-card:hover img { transform: scale(1.018); }

  .dm-field-note-card:focus-visible img,
  .dm-room-card:focus-visible img,
  .dm-library-card:focus-visible img { transform: scale(1.018); }

  .dm-experience-card:focus-within .dm-experience-card__open { opacity: 1; transform: none; }
  .dm-reading-path:hover { box-shadow: 0 8px 18px rgba(52,37,25,0.08), 0 30px 62px rgba(52,37,25,0.12); }
  .dm-room-card:hover > i,
  .dm-room-card:focus-visible > i { transform: translateX(7px); }
}

.dm-room-card > i { transition: transform 360ms var(--dm-motion-ease); }
.dm-reset-lab button:active,
.dm-article-lab__options button:active,
.dm-guide-wall__filters button:active,
.dm-rail-controls button:active { transform: scale(0.97); }

@media (min-width: 981px) {
  .dm-useful-grid { align-items: stretch; }
  .dm-edit-scene {
    position: sticky;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 78px);
    align-self: start;
  }
  .dm-edit-list > li { min-height: clamp(8.2rem, 12vw, 10.5rem); align-items: center; }
}

@media (max-width: 980px) {
  .dm-edit-scene::after { display: none; }
  .dm-edit-list > li { opacity: 1; transform: none; }
}

@media (max-width: 782px) {
  .dm-home-hero { padding: 2.2rem 0 3rem; }
  .dm-home-hero__grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .dm-home-hero__copy,
  .dm-home-hero__feature { grid-column: auto; }
  .dm-home-hero__feature { padding-bottom: 3.4rem; }
  .dm-home-hero__feature .dm-story-image {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: clamp(280px, 38svh, 320px);
    max-height: none;
    aspect-ratio: auto;
  }
  .dm-home-hero__slip { right: 0; left: 1rem; }
  .dm-home-hero__slip > p:not(.dm-story-meta) { display: none; }
  .dm-hero-cue { margin-top: 1rem; }
  .dm-lead-section { margin-top: 0; }
  .dm-lead-side--opening {
    display: grid;
    grid-auto-columns: min(82vw, 430px);
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-template-rows: 1fr;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .dm-lead-side--opening .dm-side-story { display: block; scroll-snap-align: start; }
  .dm-lead-side--opening .dm-side-story > div { padding-top: 0.85rem; }
  .dm-article-opening {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 2.4rem !important;
  }
  .dm-article-opening .dm-article-title-group,
  .dm-article-opening > .dm-article-hero,
  .dm-article-intro { grid-column: auto; grid-row: auto; }
  .dm-article-opening .dm-article-title-group h1 { max-width: none; font-size: clamp(3rem, 12.5vw, 4.5rem); }
  .dm-article-opening > .dm-article-hero img { height: auto; max-height: 52svh; aspect-ratio: 4 / 3; object-fit: cover; }
  .dm-article-intro { padding-bottom: 0; }
  .dm-motion-v7:not(.dm-reduced-motion) [data-dm-motion-section] { transform: translateY(14px); }
  .dm-motion-v7:not(.dm-reduced-motion) [data-dm-motion-item] { transform: translateY(12px); }
  .dm-single .dm-article-content h2[data-dm-reading-heading]::before { left: -0.72rem; width: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .dm-home-hero .dm-kicker,
  .dm-edition-title,
  .dm-home-hero__copy > p,
  .dm-home-hero__slip,
  .dm-home-hero__feature .dm-story-image::after,
  .dm-article-title-group,
  .dm-article-intro,
  .dm-article-opening > .dm-article-hero::before,
  .dm-hero-cue,
  [data-dm-motion-section],
  [data-dm-motion-item],
  .dm-edit-list > li,
  .dm-nav-bar,
  .dm-rail-meter::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

}

@media (forced-colors: active) {
  .dm-home-hero__feature .dm-story-image::after,
  .dm-article-opening > .dm-article-hero::before,
  .dm-edit-scene::after,
  .dm-rail-meter { display: none; }
  .dm-single .dm-article-content h2[data-dm-reading-heading].is-current { outline: 2px solid Highlight; outline-offset: 5px; }
}

@media print {
  .dm-hero-cue,
  .dm-rail-meter { display: none !important; }
  .dm-nav-docked .dm-nav-bar { position: static !important; }
  [data-dm-motion-section],
  [data-dm-motion-item] { opacity: 1 !important; transform: none !important; }
}

/* v4.7: a living publication rhythm, built from Dealsmaster's own editorial system. */
.dm-topline-story > a {
  display: flex;
  min-width: 0;
  gap: 0.55rem;
  align-items: center;
}

.dm-topline-story > a > span {
  flex: 0 0 auto;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dm-topline-story > a > strong {
  overflow: hidden;
  max-width: 52ch;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-topline-story > a > time {
  flex: 0 0 auto;
  opacity: 0.72;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.dm-topline-story > a > i { flex: 0 0 auto; font-style: normal; }

.dm-desk-stream {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(4.5rem, 8vw, 8rem) 0 clamp(4.25rem, 7vw, 7.2rem);
  color: #f7efe3;
  background:
    radial-gradient(circle at 11% 15%, rgba(199,143,82,0.22), transparent 28rem),
    radial-gradient(circle at 92% 88%, rgba(99,122,140,0.24), transparent 32rem),
    linear-gradient(135deg, #1f3129 0%, #2d4136 52%, #22362e 100%);
}

.dm-desk-stream::before {
  position: absolute;
  z-index: -1;
  top: clamp(2rem, 7vw, 6rem);
  right: -9rem;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(247,239,227,0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(247,239,227,0.018), 0 0 0 8rem rgba(247,239,227,0.012);
  content: "";
}

.dm-desk-stream__header {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 4fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.8rem);
}

.dm-desk-stream__header .dm-kicker { color: #e9bc69; }

.dm-desk-stream__header h2 {
  max-width: 9ch;
  margin: 0;
  color: #fff8ee;
  font-size: clamp(3.25rem, 7.3vw, 7rem);
  font-weight: 510;
  letter-spacing: -0.055em;
  line-height: 0.85;
  text-wrap: balance;
}

.dm-desk-stream__header > p {
  max-width: 44ch;
  margin: 0 0 0.3rem;
  color: rgba(247,239,227,0.76);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.56;
}

.dm-desk-stream__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.55rem);
  align-items: stretch;
}

.dm-desk-story {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--dm-ink);
  background: #faf3e8;
  box-shadow: 0 19px 48px rgba(8,17,13,0.18);
}

.dm-desk-story--lead {
  grid-column: span 7;
  grid-row: span 2;
}

.dm-desk-story--brief {
  display: grid;
  grid-column: span 5;
  grid-template-columns: minmax(130px, 0.86fr) minmax(0, 1.14fr);
}

.dm-desk-story--brief:nth-child(n+4) {
  display: block;
  grid-column: span 4;
}

.dm-desk-story__media {
  position: relative;
  display: block;
  min-height: 100%;
  overflow: hidden;
  background: #d9cfc0;
}

.dm-desk-story--lead .dm-desk-story__media { min-height: clamp(390px, 48vw, 610px); }
.dm-desk-story--brief:nth-child(-n+3) .dm-desk-story__media { min-height: 100%; }
.dm-desk-story--brief:nth-child(n+4) .dm-desk-story__media { min-height: 0; aspect-ratio: 4 / 3; }

.dm-desk-story__image,
.dm-desk-story__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dm-desk-story__placeholder {
  display: grid;
  min-height: 16rem;
  place-items: center;
  color: #f7efe3;
  background: linear-gradient(135deg, var(--dm-rust), var(--dm-blue));
}

.dm-desk-story__placeholder i { font-family: var(--dm-serif); font-size: 4rem; font-style: normal; }

.dm-desk-story__number {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.54);
  border-radius: 50%;
  color: #fff;
  background: rgba(24,31,27,0.72);
  backdrop-filter: blur(9px);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.dm-desk-story__body { padding: clamp(1.05rem, 2vw, 1.55rem); }
.dm-desk-story--lead .dm-desk-story__body { padding: clamp(1.35rem, 2.5vw, 2.15rem); }

.dm-desk-story .dm-story-meta {
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  margin: 0 0 0.7rem;
}

.dm-desk-story .dm-story-meta time { color: #6b6258; font-variant-numeric: tabular-nums; }

.dm-desk-story h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.35vw, 2.3rem);
  font-weight: 540;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.dm-desk-story--lead h3 { max-width: 18ch; font-size: clamp(2.4rem, 4.4vw, 4.6rem); }
.dm-desk-story h3 a { color: var(--dm-ink); text-decoration: none; }

.dm-desk-story__excerpt {
  max-width: 54ch;
  margin: 0.8rem 0 1rem;
  color: #5d554c;
  font-size: 0.9rem;
  line-height: 1.5;
}

.dm-desk-story--brief:nth-child(-n+3) .dm-desk-story__excerpt { display: none; }

.dm-desk-story__byline {
  display: flex;
  gap: 0.55rem 0.8rem;
  flex-wrap: wrap;
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(32,29,24,0.16);
  color: #625a51;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.dm-desk-story__byline span + span::before { margin-right: 0.8rem; content: "\00b7"; }

.dm-desk-stream__footer {
  display: flex;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(247,239,227,0.18);
  color: rgba(247,239,227,0.78);
  font-size: 0.84rem;
}

.dm-desk-stream__footer a { color: #fff8ee; font-weight: 700; text-underline-offset: 0.2em; }

.dm-next-moves {
  position: relative;
  padding: clamp(4rem, 8vw, 7.5rem) 0;
  background:
    radial-gradient(circle at 8% 90%, rgba(198,99,73,0.12), transparent 26rem),
    linear-gradient(180deg, #f7efe3 0%, #f2e8d8 100%);
}

.dm-next-moves__header {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.dm-next-moves__header h2 {
  max-width: 19ch;
  margin: -0.05em 0 0;
  font-size: clamp(2.6rem, 5vw, 5.1rem);
  font-weight: 520;
  letter-spacing: -0.05em;
  line-height: 0.92;
  text-wrap: balance;
}

.dm-next-moves__rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.6vw, 1.3rem);
}

.dm-next-move {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: clamp(300px, 26vw, 390px);
  overflow: hidden;
  padding: clamp(1.25rem, 2.1vw, 1.8rem);
  flex-direction: column;
  color: var(--dm-ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(32,29,24,0.12), 0 16px 38px rgba(73,50,32,0.07);
}

.dm-next-move::before {
  position: absolute;
  z-index: -1;
  right: -4.5rem;
  bottom: -5rem;
  width: 13rem;
  height: 13rem;
  border: 1px solid rgba(32,29,24,0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 2.5rem rgba(255,255,255,0.08), 0 0 0 5rem rgba(255,255,255,0.05);
  content: "";
}

.dm-next-move--butter { background: #e2c76f; }
.dm-next-move--sage { background: #b8c5ad; }
.dm-next-move--blush { background: #e6c6bc; }
.dm-next-move--blue { background: #aebdcd; }

.dm-next-move__number {
  align-self: flex-end;
  color: rgba(32,29,24,0.46);
  font-family: var(--dm-serif);
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  line-height: 0.78;
}

.dm-next-move > p {
  margin: auto 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dm-next-move h3 {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2.25rem);
  font-weight: 560;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.dm-next-move > span:not(.dm-next-move__number) { margin: 0.85rem 0 1.2rem; font-size: 0.87rem; line-height: 1.48; }
.dm-next-move > strong { margin-top: auto; font-size: 0.8rem; }
.dm-next-move > strong i { display: inline-block; margin-left: 0.25rem; font-style: normal; }

/* Archive pages inherit the magazine hierarchy without inventing popularity. */
.dm-query-grid .wp-block-post-template {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2.4rem, 5vw, 5rem) clamp(1.1rem, 2vw, 1.8rem);
}

.dm-query-grid .wp-block-post { grid-column: span 4; }
.dm-query-grid .wp-block-post:nth-child(1) { grid-column: span 7; }
.dm-query-grid .wp-block-post:nth-child(2) { grid-column: span 5; }
.dm-query-grid .wp-block-post:nth-child(1) .wp-block-post-title { max-width: 17ch; font-size: clamp(2.5rem, 4.5vw, 4.8rem); }
.dm-query-grid .wp-block-post:nth-child(1) .wp-block-post-featured-image { aspect-ratio: 16 / 10 !important; }
.dm-query-grid .wp-block-post:nth-child(2) .wp-block-post-featured-image { aspect-ratio: 4 / 5 !important; }

.dm-query-grid .wp-block-post-date {
  margin: 0 0 0.55rem;
  color: #6a6259;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dm-experience-card__placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-content: center;
  gap: 0.35rem;
  color: #fff8ee;
  text-align: center;
  background: linear-gradient(135deg, var(--dm-forest), var(--dm-blue));
}

.dm-experience-card__placeholder i { font-family: var(--dm-serif); font-size: clamp(2.8rem, 6vw, 5rem); font-style: normal; line-height: 0.8; }
.dm-experience-card__placeholder small { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

/* Existing article story types now enter with visibly different editorial voices. */
.dm-story-opening--after-dark-diary,
.dm-story-opening--style-at-two-times,
.dm-story-opening--seven-day-diary,
.dm-story-opening--night-route {
  max-width: 940px;
  color: #f7efe3;
  border-color: rgba(247,239,227,0.26);
  background:
    radial-gradient(circle at 82% 14%, rgba(198,166,104,0.24), transparent 18rem),
    linear-gradient(135deg, #263644, #1f2e2a);
  box-shadow: 0 24px 60px rgba(26,31,33,0.17);
}

.dm-story-opening--after-dark-diary h2,
.dm-story-opening--style-at-two-times h2,
.dm-story-opening--seven-day-diary h2,
.dm-story-opening--night-route h2,
.dm-story-opening--after-dark-diary .dm-story-opening__scene,
.dm-story-opening--style-at-two-times .dm-story-opening__scene,
.dm-story-opening--seven-day-diary .dm-story-opening__scene,
.dm-story-opening--night-route .dm-story-opening__scene { color: #fff8ee; }

.dm-story-opening--after-dark-diary .dm-kicker,
.dm-story-opening--style-at-two-times .dm-kicker,
.dm-story-opening--seven-day-diary .dm-kicker,
.dm-story-opening--night-route .dm-kicker { color: #e7bb6d; }

.dm-story-opening--after-dark-diary .dm-story-opening__question,
.dm-story-opening--style-at-two-times .dm-story-opening__question,
.dm-story-opening--seven-day-diary .dm-story-opening__question,
.dm-story-opening--night-route .dm-story-opening__question { color: #e9dfd1; border-left-color: #e7bb6d; }

.dm-story-opening--after-dark-diary .dm-story-opening__disclosure,
.dm-story-opening--style-at-two-times .dm-story-opening__disclosure,
.dm-story-opening--seven-day-diary .dm-story-opening__disclosure,
.dm-story-opening--night-route .dm-story-opening__disclosure { color: rgba(247,239,227,0.67); }

.dm-story-opening--measurement-near-miss,
.dm-story-opening--tape-test,
.dm-story-opening--awkward-room-study {
  max-width: 900px;
  border-top-color: var(--dm-forest);
  border-right: 1px solid rgba(36,55,46,0.22);
  border-bottom-color: rgba(36,55,46,0.32);
  border-left: clamp(0.8rem, 2vw, 1.45rem) solid var(--dm-forest);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.8), rgba(242,236,224,0.72)),
    url("../images/texture-eggshell-v1.webp");
  box-shadow: 12px 18px 0 rgba(36,55,46,0.07);
}

.dm-story-opening--case-file,
.dm-story-opening--arrival-replay,
.dm-story-opening--room-archaeology,
.dm-story-opening--meal-trace {
  max-width: 940px;
  padding-left: clamp(2rem, 7vw, 6rem);
  border-top: 1px solid rgba(126,48,34,0.28);
  border-bottom-color: rgba(126,48,34,0.28);
  background:
    linear-gradient(90deg, rgba(126,48,34,0.09) 0, rgba(126,48,34,0.09) 3.2rem, transparent 3.2rem),
    linear-gradient(125deg, #f4e8d8, #fbf5ea);
  box-shadow: 0 18px 44px rgba(73,50,32,0.1);
}

.dm-story-opening--object-story,
.dm-story-opening--weekend-field-note {
  max-width: 860px;
  border-top-color: var(--dm-gold);
  border-bottom: 0;
  border-radius: 48% 52% 1.5rem 1.5rem / 2.2rem 2.2rem 1.5rem 1.5rem;
  background:
    radial-gradient(circle at 86% 18%, rgba(179,138,77,0.22), transparent 14rem),
    linear-gradient(135deg, #f3e5d2, #fbf6ed);
  box-shadow: 0 20px 48px rgba(73,50,32,0.1);
}

@media (hover: hover) and (pointer: fine) {
  .dm-desk-story,
  .dm-next-move { transition: transform 420ms var(--dm-motion-ease), box-shadow 420ms var(--dm-motion-ease); }

  .dm-desk-story__image { transition: transform 760ms var(--dm-motion-soft), filter 520ms var(--dm-motion-ease); }

  .dm-desk-story:hover,
  .dm-desk-story:focus-within { transform: translateY(-5px); box-shadow: 0 28px 66px rgba(8,17,13,0.25); }

  .dm-desk-story:hover .dm-desk-story__image,
  .dm-desk-story:focus-within .dm-desk-story__image { transform: scale(1.025); filter: saturate(1.035); }

  .dm-next-move:hover,
  .dm-next-move:focus-visible { transform: translateY(-6px) rotate(-0.18deg); box-shadow: inset 0 0 0 1px rgba(32,29,24,0.16), 0 25px 54px rgba(73,50,32,0.13); }
  .dm-next-move:hover > strong i,
  .dm-next-move:focus-visible > strong i { transform: translateX(0.28rem); }
  .dm-next-move > strong i { transition: transform 300ms var(--dm-motion-ease); }
}

@media (max-width: 1100px) {
  .dm-desk-story--lead { grid-column: span 8; }
  .dm-desk-story--brief { grid-column: span 4; display: block; }
  .dm-desk-story--brief:nth-child(n+4) { grid-column: span 4; }
  .dm-desk-story--brief .dm-desk-story__media { min-height: 0; aspect-ratio: 4 / 3; }
  .dm-desk-story--brief:nth-child(-n+3) .dm-desk-story__excerpt { display: block; }
  .dm-next-moves__rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-query-grid .wp-block-post:nth-child(1),
  .dm-query-grid .wp-block-post:nth-child(2),
  .dm-query-grid .wp-block-post { grid-column: span 6; }
}

@media (max-width: 782px) {
  .dm-topline-story > a > strong { max-width: 28ch; }
  .dm-topline-story > a > time { display: none; }
  .dm-desk-stream { padding: 4rem 0; }
  .dm-desk-stream__header,
  .dm-next-moves__header { grid-template-columns: 1fr; gap: 1.1rem; }
  .dm-desk-stream__header h2 { max-width: 8ch; font-size: clamp(3.7rem, 18vw, 5.8rem); }
  .dm-desk-stream__grid,
  .dm-next-moves__rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(84vw, 430px);
    grid-template-columns: none;
    gap: 0.85rem;
    overflow-x: auto;
    padding: 0 0.1rem 0.8rem;
    scroll-padding-left: 0.1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .dm-desk-stream__grid::-webkit-scrollbar,
  .dm-next-moves__rail::-webkit-scrollbar { display: none; }
  .dm-desk-story--lead,
  .dm-desk-story--brief,
  .dm-desk-story--brief:nth-child(n+4),
  .dm-next-move { display: block; grid-column: auto; grid-row: auto; scroll-snap-align: start; }
  .dm-desk-story--lead .dm-desk-story__media,
  .dm-desk-story--brief .dm-desk-story__media,
  .dm-desk-story--brief:nth-child(-n+3) .dm-desk-story__media,
  .dm-desk-story--brief:nth-child(n+4) .dm-desk-story__media { min-height: 0; aspect-ratio: 4 / 3; }
  .dm-desk-story--lead h3 { font-size: clamp(2.25rem, 10vw, 3.2rem); }
  .dm-desk-story__excerpt,
  .dm-desk-story--brief:nth-child(-n+3) .dm-desk-story__excerpt { display: block; }
  .dm-desk-stream__footer { align-items: flex-start; flex-direction: column; }
  .dm-next-moves__header h2 { font-size: clamp(2.75rem, 12vw, 4.3rem); }
  .dm-next-move { display: flex; min-height: 330px; }
  .dm-query-grid .wp-block-post-template { display: block; }
  .dm-query-grid .wp-block-post + .wp-block-post { margin-top: 3.2rem; }
  .dm-query-grid .wp-block-post:nth-child(1) .wp-block-post-title { font-size: clamp(2.35rem, 11vw, 3.4rem); }
  .dm-query-grid .wp-block-post:nth-child(1) .wp-block-post-featured-image,
  .dm-query-grid .wp-block-post:nth-child(2) .wp-block-post-featured-image { aspect-ratio: 4 / 3 !important; }
  .dm-story-opening--case-file,
  .dm-story-opening--arrival-replay,
  .dm-story-opening--room-archaeology,
  .dm-story-opening--meal-trace { padding-left: clamp(1.6rem, 8vw, 2.5rem); background: linear-gradient(125deg, #f4e8d8, #fbf5ea); }
}

@media (max-width: 560px) {
  .dm-topline-tagline { display: none; }
  .dm-topline-story { width: 100%; }
  .dm-topline-story > a { width: 100%; justify-content: space-between; }
  .dm-topline-story > a > strong { max-width: 48vw; }
}

@media (prefers-reduced-motion: reduce) {
  .dm-desk-story,
  .dm-desk-story__image,
  .dm-next-move,
  .dm-next-move > strong i { transform: none !important; transition: none !important; }
}

@media (forced-colors: active) {
  .dm-desk-stream,
  .dm-next-move,
  .dm-story-opening { color: CanvasText; background: Canvas; box-shadow: none; }
  .dm-desk-stream__header h2,
  .dm-desk-stream__header .dm-kicker,
  .dm-desk-stream__header > p,
  .dm-desk-stream__footer,
  .dm-desk-stream__footer a { color: CanvasText; }
  .dm-next-move,
  .dm-desk-story { border: 1px solid CanvasText; }
}

@media print {
  .dm-desk-stream { color: #000; background: #fff; }
  .dm-desk-stream__grid,
  .dm-next-moves__rail { display: grid; grid-template-columns: repeat(2, 1fr); }
  .dm-desk-story,
  .dm-next-move { break-inside: avoid; color: #000; background: #fff; box-shadow: none; }
}
