/* ==========================================================================
   THE DIVINE WORKSHOP — SITE PATTERNS
   v1.0
   Layered on top of tdw-tokens.css. Tokens hold colours, type, spacing;
   this file holds the page-level structure (header, footer, card, ticker).
   Every site page links both files, in this order.
   ========================================================================== */

/* --------------------------------------------------------------------------
   PICTURE / IMG SAFETY
   Founder 2026-09-19: every <img> on every page must never render larger than
   its parent. Per the founder's review of services at 1280 viewport, the
   inherited width="1600" height="1067" attributes were letting pictures
   overflow the grid. Force them to scale to container.
   Picture itself stays display: block so it inherits width cleanly.
   Note: NO `height: auto` here. Cards rely on the parent media box
   (tdw-product-card__image, tdw-project-card__media, etc.) to set the
   height, and the img inside to fill it via object-fit:cover.
   Height: auto would beat the per-card height:100% and let the image
   collapse to its intrinsic ratio (founder-confirmed bug 2026-09-19).
   -------------------------------------------------------------------------- */
picture { display: block; max-width: 100%; }
picture > img { max-width: 100%; display: block; }

/* --------------------------------------------------------------------------
   MEDIA BOX FILL
   Founder 2026-09-19: every picture/img inside a media box must fill the
   box height so there is no blank space at the bottom. Each container
   sets its own height; the picture and img fill it with cover-crop.
   -------------------------------------------------------------------------- */
.tdw-product-card__image,
.tdw-product-card__image picture,
.tdw-product-card__image img,
.tdw-heritage__image,
.tdw-heritage__image picture,
.tdw-heritage__image img,
.tdw-project-featured__media,
.tdw-project-featured__media picture,
.tdw-project-featured__media img,
.tdw-project-card__media,
.tdw-project-card__media picture,
.tdw-project-card__media img,
.tdw-about-split__media,
.tdw-about-split__media picture,
.tdw-about-split__media img,
.tdw-service-row__media,
.tdw-service-row__media picture,
.tdw-service-row__media img,
.tdw-sector picture,
.tdw-sector img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   ABOUT LOGO BAND
   Founder 2026-09-19: behind the terracotta logo (the logo-320w block,
   section class tdw-wrap in about.php), a random-looking collage of the
   workshop view image plus 5-7 other founder images, toned down (dark
   duotone overlay) so the terracotta logo reads as a clear silhouette
   on top. Built as ONE pre-composited image (logo-collage-1600w.webp +
   jpg, 800w fallback).
   -------------------------------------------------------------------------- */
.tdw-mark-band {
  position: relative;
  overflow: hidden;
  padding: var(--space-9) 0;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1C1612; /* ink fallback while collage loads */
}
.tdw-mark-band__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  margin: 0;
  padding: 0;
}
.tdw-mark-band__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.tdw-mark-band__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.tdw-mark-band .tdw-brand-mark {
  display: block;
  margin: 0 auto;
  width: clamp(240px, 40vw, 480px);
  height: auto;
  /* No drop-shadow: silhouette logo is solid terracotta on dark collage; the
     silhouette shape itself provides all the contrast we need. */
}
.tdw-mark-band picture,
.tdw-mark-band picture img {
  display: block;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   SERVICE ROW
   Founder 2026-09-19: on phones the 3 service blocks must stack to one
   column (text above, image full-width 3:2 below) at <=720px. At desktop
   the image stays 4:5 to the right of the text (or left for the alt row).
   -------------------------------------------------------------------------- */
.tdw-service-row {
  display: grid;
  gap: var(--space-7);
  align-items: start;
}
.tdw-service-row--text-left {
  grid-template-columns: 1.4fr 1fr;
}
.tdw-service-row--text-right {
  grid-template-columns: 1fr 1.4fr;
}
.tdw-service-row__media {
  background: var(--bg-panel);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.tdw-service-row__media picture,
.tdw-service-row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 720px) {
  .tdw-service-row,
  .tdw-service-row--text-left,
  .tdw-service-row--text-right {
    grid-template-columns: 1fr;
  }
  .tdw-service-row__media {
    order: -1; /* image first on phone */
    aspect-ratio: 3 / 2;
    margin-bottom: var(--space-5);
  }
}

/* --------------------------------------------------------------------------
   WRAP
   -------------------------------------------------------------------------- */

.tdw-wrap {
  max-width: var(--measure-page);
  margin: 0 auto;
  padding-inline: var(--gutter);    /* single gutter token — 20–40px fluid. */
}

/* --------------------------------------------------------------------------
   LIVE RECORD STRIP
   A continuously-running typeline at the very top of every page. The
   signature device made kinetic. Set by the motion layer (tdw-motion.js).
   The strip itself is a thin, ruled row. The cursor blink is CSS.
   -------------------------------------------------------------------------- */

.tdw-live-record {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-bottom: var(--border-hair);
  padding: var(--space-2) 0;
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
  overflow: hidden;
  white-space: nowrap;
}
.tdw-live-record__label {
  flex: 0 0 auto;
  color: var(--accent);
}
.tdw-live-record__value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}
.tdw-live-record__cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: -0.15em;
  animation: tdw-cursor-blink 1.05s steps(1) infinite;
}
.tdw-section--dark .tdw-live-record {
  border-bottom-color: var(--rule-on-dark);
  color: var(--fg-muted-dark);
}
.tdw-section--dark .tdw-live-record__label { color: var(--accent); }
.tdw-section--dark .tdw-live-record__cursor { background: var(--accent); }
@keyframes tdw-cursor-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tdw-live-record__cursor { animation: none; opacity: 0; }
}

/* --------------------------------------------------------------------------
   TOP BAR
   -------------------------------------------------------------------------- */

.tdw-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) 0;
}
.tdw-top__mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  color: var(--fg);
}
.tdw-top__mark img {
  display: block;
  width: 48px;
  height: 48px;
  transform-style: preserve-3d;
  perspective: 600px;
}
.tdw-top__mark .tdw-wordmark {
  font-size: 0.95rem;
}
.tdw-top__nav {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.tdw-top__nav a {
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tdw-top__nav a:hover,
.tdw-top__nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
@media (max-width: 680px) {
  .tdw-top { flex-wrap: wrap; gap: var(--space-3); padding: var(--space-4) 0; }
  .tdw-top__nav { gap: var(--space-4); }
  .tdw-top__nav a { font-size: var(--size-mark-sm); }
}

/* --------------------------------------------------------------------------
   MASTHEAD
   The hero on the home page. The seal sits on the left, large. The
   statement sits in the prose measure, beneath it.
   -------------------------------------------------------------------------- */

.tdw-masthead {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: var(--space-8);
  align-items: start;
  padding: var(--space-9) 0 var(--space-8);
  border-bottom: var(--border-hair);
}
.tdw-masthead__seal-wrap {
  transform-style: preserve-3d;
  perspective: 800px;
}
.tdw-masthead__seal {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  transform-style: preserve-3d;
  will-change: transform;
}
.tdw-masthead__body {
  max-width: var(--measure-prose);
}
.tdw-masthead h1 {
  font-size: var(--size-display);
  line-height: var(--leading-tight);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-5);
  max-width: 18ch;
}
.tdw-masthead__lede {
  font-size: 1.125rem;
  line-height: var(--leading-body);
  color: var(--fg);
  margin: 0 0 var(--space-4);
}
.tdw-masthead__founders {
  font-size: 1rem;
  line-height: var(--leading-body);
  color: var(--fg-muted);
  margin: 0;
  font-style: italic;
}
@media (max-width: 720px) {
  .tdw-masthead {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding: var(--space-7) 0 var(--space-6);
  }
  .tdw-masthead__seal { max-width: 120px; }
}

/* --------------------------------------------------------------------------
   SECTION
   -------------------------------------------------------------------------- */

.tdw-section {
  /* vertical only — horizontal padding is owned by .tdw-wrap so the
     padding-inline cascade does not get clobbered. */
  padding-top: var(--space-9);
  padding-bottom: var(--space-9);
  border-bottom: var(--border-hair);
}
.tdw-section:last-child { border-bottom: 0; }
.tdw-section--no-rule { border-bottom: 0; }
.tdw-section--dark {
  /* Dark context used on index.html as a contained dark-CTA panel.
     Centering and padding are owned by .tdw-wrap. The old negative-margin
     bleed trick was breaking content alignment on smaller viewports.
     2026-09-18: the full-bleed dark page this comment used to reference
     (archive.html) was removed in tdw-5 PHASE C; the dark-variant CSS
     stays in place for the index CTA panel that still uses it. */
  background: var(--bg-dark);
  color: var(--fg-on-dark);
  border-bottom: 0;
}
.tdw-section--dark .tdw-mark    { color: var(--fg-muted-dark); }
.tdw-section--dark .tdw-record  { border-color: var(--rule-on-dark); }
.tdw-section--dark .tdw-button--quiet { color: var(--fg-on-dark); border-color: var(--rule-on-dark); }
.tdw-section--dark .tdw-button--quiet:hover {
  background: rgba(247, 241, 230, 0.08);
  border-color: var(--fg-on-dark);
}
@media (max-width: 680px) {
  .tdw-section { padding-block: var(--space-7); }
}

/* --------------------------------------------------------------------------
   SECTION HEAD
   Eyebrow is opt-in. Default = no eyebrow, headline only. The rationing
   rule from the design skill: max 1 eyebrow per 3 sections.
   -------------------------------------------------------------------------- */

.tdw-sec-head { margin-bottom: var(--space-7); }
.tdw-sec-head__eyebrow {
  display: flex;
  gap: var(--space-4);
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.tdw-sec-head h2 {
  font-size: var(--size-title);
  line-height: var(--leading-snug);
  font-weight: 400;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.005em;
  max-width: 22ch;
}
.tdw-sec-head__lede {
  max-width: var(--measure-prose);
  color: var(--fg-muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   THE RECORD LINE
   -------------------------------------------------------------------------- */

.tdw-record {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: var(--border-hair);
  border-bottom: var(--border-hair);
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
  line-height: 1.5;
}
.tdw-record > * + *::before {
  content: "·";
  margin-right: var(--space-3);
  color: var(--rule);
}
.tdw-record .accent { color: var(--accent); }
.tdw-record .strong { color: var(--fg); }

/* --------------------------------------------------------------------------
   EDITION CARD
   -------------------------------------------------------------------------- */

.tdw-editions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-7);
  max-width: 1080px;
  margin: 0 auto;
}
.tdw-card {
  border: 1px solid var(--rule);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.tdw-card__img {
  aspect-ratio: 4 / 5;
  background: var(--bg-panel);
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
  max-height: min(560px, 70vh);
}
.tdw-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* a tiny seal stamp in the corner of the card image — a maker's mark */
.tdw-card__img::after {
  content: "";
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  width: 44px;
  height: 44px;
  background-image: var(--tdw-stamp-url, none);
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.85;
}
.tdw-card--has-stamp .tdw-card__img { --tdw-stamp-url: url("../assets/wordmark.png"); }
.tdw-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.tdw-card__body p { margin: 0; color: var(--fg-muted); line-height: 1.55; }
.tdw-card h3 {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}
.tdw-card .tdw-record { margin: 0; }
.tdw-card .tdw-button { align-self: flex-start; margin-top: var(--space-3); }
.tdw-card--closed { opacity: 0.85; }
.tdw-card--closed .tdw-card__img img { filter: saturate(0.55) brightness(0.96); }

/* --------------------------------------------------------------------------
   ARCHIVE ITEM
   -------------------------------------------------------------------------- */

.tdw-archive-item {
  padding: var(--space-6) 0;
  border-bottom: var(--border-hair);
}
.tdw-archive-item:last-child { border-bottom: 0; }
.tdw-archive-item h3 {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 var(--space-4);
  line-height: 1.3;
}
.tdw-archive-item__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.tdw-archive-item__meta dt {
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 var(--space-1);
}
.tdw-archive-item__meta dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.tdw-section--dark .tdw-archive-item__meta dt { color: var(--fg-muted-dark); }
.tdw-section--dark .tdw-archive-item__meta dd { color: var(--fg-on-dark); }
.tdw-archive-item__note {
  margin: var(--space-4) 0 0;
  color: var(--fg-muted);
  line-height: 1.55;
  max-width: var(--measure-prose);
}
.tdw-section--dark .tdw-archive-item__note { color: var(--fg-muted-dark); }

/* --------------------------------------------------------------------------
   PROSE
   -------------------------------------------------------------------------- */

.tdw-prose {
  max-width: var(--measure-prose);
  font-size: var(--size-body);
  line-height: var(--leading-body);
}
.tdw-prose p { margin: 0 0 var(--space-5); }
.tdw-prose p:last-child { margin-bottom: 0; }
.tdw-prose--quiet { color: var(--fg-muted); }

/* --------------------------------------------------------------------------
   SPECS — 2-col card grid, not a 10-row table. The Marrow-cookware
   pattern the design skill explicitly bans; we do it the right way.
   -------------------------------------------------------------------------- */

.tdw-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
  max-width: var(--measure-page);
}
.tdw-spec-card {
  padding: var(--space-5);
  border: 1px solid var(--rule);
  background: var(--bg);
}
.tdw-spec-card__label {
  display: block;
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: var(--space-3);
}
.tdw-spec-card__value {
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--fg);
  margin: 0;
}

/* --------------------------------------------------------------------------
   PROCESS GRID
   -------------------------------------------------------------------------- */

.tdw-process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.tdw-process__frame {
  aspect-ratio: 1;
  background: var(--bg-panel);
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  text-align: center;
  padding: var(--space-3);
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}
.tdw-process__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tdw-process__frame:empty::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 1px solid var(--rule);
  display: block;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   PRICING
   -------------------------------------------------------------------------- */

.tdw-pricing {
  background: var(--bg-panel);
  border: 1px solid var(--rule);
  padding: var(--space-6);
  max-width: var(--measure-prose);
  position: relative;
  overflow: hidden;
}
.tdw-pricing p { margin: 0 0 var(--space-3); line-height: 1.55; }
.tdw-pricing__amount {
  display: block;
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.2;
  margin: var(--space-3) 0 var(--space-5);
  letter-spacing: -0.01em;
}
.tdw-pricing__note { color: var(--fg-muted); margin-top: var(--space-4); font-size: 0.98rem; }

/* --------------------------------------------------------------------------
   ARRIVAL LIST
   -------------------------------------------------------------------------- */

.tdw-arrival {
  max-width: var(--measure-prose);
  margin-top: var(--space-7);
}
.tdw-arrival h3 {
  font-size: var(--size-heading);
  font-weight: 500;
  margin: 0 0 var(--space-4);
}
.tdw-arrival ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tdw-arrival li {
  padding: var(--space-3) 0;
  border-bottom: var(--border-hair);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  line-height: 1.5;
}
.tdw-arrival li:last-child { border-bottom: 0; }
.tdw-arrival li::before {
  content: "·";
  color: var(--accent);
  font-weight: 700;
  flex: 0 0 auto;
  line-height: 1.5;
}
.tdw-arrival li > span {
  flex: 1 1 auto;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   EDITION HERO (number-as-protagonist)
   The 4:5 image on the left, the number and a single sentence on the right.
   On mobile: image on top, number below.
   -------------------------------------------------------------------------- */

.tdw-ed-hero {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--space-7);
  align-items: center;
  padding: var(--space-6) 0 var(--space-7);
}
.tdw-ed-hero__image {
  aspect-ratio: 4 / 5;
  background: var(--bg-panel);
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 460px;
  max-height: min(560px, 75vh);
  justify-self: start;
}
.tdw-ed-hero__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tdw-ed-hero__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.tdw-ed-hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 14ch;
}
.tdw-ed-hero__number {
  font-family: var(--font-mark);
  font-size: clamp(4rem, 11vw, 9rem);
  line-height: 0.95;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin: 0;
  font-weight: 400;
}
.tdw-ed-hero__number small {
  font-size: 0.32em;
  color: var(--fg-muted);
  letter-spacing: var(--track-mark);
  vertical-align: 0.6em;
  margin-left: 0.2em;
}
.tdw-ed-hero__lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--fg);
  margin: 0;
  max-width: var(--measure-prose);
}
@media (max-width: 820px) {
  .tdw-ed-hero {
    grid-template-columns: 1fr;
    gap: var(--space-5);
    padding: var(--space-5) 0 var(--space-7);
  }
}

/* --------------------------------------------------------------------------
   REMAINING COUNT
   -------------------------------------------------------------------------- */

.tdw-count {
  font-family: var(--font-mark);
  font-size: 0.95rem;
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--accent);
  margin: var(--space-6) 0;
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
/* A pulsing live dot only for AVAILABLE state. It is semantic, not decoration. */
.tdw-count::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex: 0 0 auto;
  animation: tdw-pulse 2.4s ease-in-out infinite;
}
@keyframes tdw-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.85); }
}
@media (prefers-reduced-motion: reduce) {
  .tdw-count::before { animation: none; }
}

/* --------------------------------------------------------------------------
   STATUS PILLS
   -------------------------------------------------------------------------- */

.tdw-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  padding: 4px var(--space-3);
  border: 1px solid currentColor;
}
.tdw-status--available { color: var(--accent); }
.tdw-status--kept      { color: var(--fg-muted); }
.tdw-status--closed    { color: var(--fg-muted); }
.tdw-section--dark .tdw-status--kept,
.tdw-section--dark .tdw-status--closed { color: var(--fg-muted-dark); border-color: var(--rule-on-dark); }

/* --------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */

.tdw-form { max-width: 480px; }
.tdw-form__group { margin-bottom: var(--space-5); }
.tdw-form__group label {
  display: block;
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: var(--space-2);
}
.tdw-form__group input,
.tdw-form__group textarea,
.tdw-form__group select {
  width: 100%;
  padding: var(--space-3);
  font-family: var(--font-text);
  font-size: var(--size-body);
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  transition: border-color var(--dur) var(--ease);
}
.tdw-form__group input:focus,
.tdw-form__group textarea:focus,
.tdw-form__group select:focus {
  outline: none;
  border-color: var(--accent);
}
.tdw-form__group textarea { resize: vertical; min-height: 140px; }
.tdw-form__help {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin: var(--space-2) 0 0;
}

/* --------------------------------------------------------------------------
   CHANNELS
   -------------------------------------------------------------------------- */

.tdw-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-7);
  padding-top: var(--space-7);
  border-top: var(--border-hair);
}
.tdw-channel__label {
  display: block;
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: var(--space-2);
}
.tdw-channel__value { font-size: 1.0625rem; line-height: 1.6; }
.tdw-channel a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.tdw-channel a:hover { border-bottom-color: var(--accent); }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */

.tdw-footer {
  padding: var(--space-8) 0 var(--space-9);
  border-top: var(--border-hair);
  color: var(--fg-muted);
}
.tdw-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.tdw-footer__nav {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
}
.tdw-footer__nav a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color var(--dur) var(--ease);
}
.tdw-footer__nav a:hover { border-bottom-color: var(--accent); }
.tdw-footer__note { font-size: 0.95rem; line-height: 1.55; max-width: var(--measure-prose); }
.tdw-section--dark .tdw-footer { background: var(--bg-dark); border-top-color: var(--rule-on-dark); color: var(--fg-muted-dark); }
.tdw-section--dark .tdw-footer__nav a { color: var(--fg-on-dark); }
.tdw-section--dark .tdw-footer__nav a:hover { border-bottom-color: var(--accent); }

/* --------------------------------------------------------------------------
   REGISTRY TICKER
   A horizontally-scrolling strip showing every piece in the archive.
   Pure CSS animation. Cloned once in JS to make the loop seamless.
   -------------------------------------------------------------------------- */

.tdw-ticker {
  border-top: 1px solid var(--rule-on-dark);
  border-bottom: 1px solid var(--rule-on-dark);
  padding: var(--space-5) 0;
  margin-top: var(--space-7);
}
/* Static ledger, not a scrolling marquee — every piece on file, at rest. */
.tdw-ticker__track {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted-dark);
}
.tdw-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.tdw-ticker__item .accent { color: var(--accent); }

/* --------------------------------------------------------------------------
   BUTTON PRESS — plain CSS feedback, no JS. Replaces the old anime.js
   spring effect: a small scale-down on press, released on pointerup.
   -------------------------------------------------------------------------- */

.tdw-button, .tdw-button--quiet {
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform 120ms ease-out;
}
.tdw-button:active, .tdw-button--quiet:active {
  transform: scale(0.97);
}
@media (prefers-reduced-motion: reduce) {
  .tdw-button:active, .tdw-button--quiet:active { transform: none; }
}

/* --------------------------------------------------------------------------
   DIVIDER
   -------------------------------------------------------------------------- */

.tdw-divider {
  border: 0;
  border-top: var(--border-hair);
  margin: var(--space-7) 0;
}
.tdw-section--dark .tdw-divider { border-top-color: var(--rule-on-dark); }


/* --------------------------------------------------------------------------
   FUTURE EDITIONS — 2x2 grid for forthcoming cards
   -------------------------------------------------------------------------- */
.tdw-editions--future {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  max-width: var(--measure-page);
  margin: 0 auto;
}
.tdw-editions--future .tdw-card { max-width: none; }
@media (max-width: 760px) {
  .tdw-editions--future { grid-template-columns: 1fr; }
}

/* FORTHCOMING CARD */
.tdw-card--forthcoming .tdw-card__img { filter: saturate(0.92) brightness(0.99); }
.tdw-card--forthcoming .tdw-card__img::after { display: none; }
.tdw-card--forthcoming .tdw-status--forthcoming {
  display: inline-block;
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
  border: 1px solid var(--rule);
  padding: 4px var(--space-3);
  align-self: flex-start;
  margin-top: var(--space-3);
}


/* --------------------------------------------------------------------------
   FEATURE SHOT — single wide photograph with optional caption
   Used for the in-room / lifestyle photograph on each edition page.
   -------------------------------------------------------------------------- */
.tdw-feature {
  max-width: var(--measure-page);
  margin: 0 auto;
}
.tdw-feature__frame {
  aspect-ratio: 16 / 10;
  background: var(--bg-panel);
  overflow: hidden;
}
.tdw-feature__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tdw-feature__caption {
  margin: var(--space-4) 0 0;
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.tdw-feature__caption-rule {
  display: inline-block;
  width: 28px;
  border-top: 1px solid var(--rule);
  margin-right: var(--space-3);
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   RELATED EDITIONS — strip of 2-3 small cards linking to other piece pages
   -------------------------------------------------------------------------- */
.tdw-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  max-width: var(--measure-page);
  margin: 0 auto;
}
.tdw-related__item {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.tdw-related__item:hover { border-color: var(--fg); background: var(--bg-panel); }
.tdw-related__item:hover .tdw-related__image { filter: saturate(1) brightness(1); }
.tdw-related__image {
  aspect-ratio: 4 / 5;
  background: var(--bg-panel);
  overflow: hidden;
  filter: saturate(0.92) brightness(0.99);
  transition: filter var(--dur) var(--ease);
}
.tdw-related__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tdw-related__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.tdw-related__title {
  font-size: 1.4rem;
  line-height: 1.25;
  font-weight: 500;
  margin: 0;
}
.tdw-related__meta {
  font-family: var(--font-mark);
  font-size: var(--size-mark-sm);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.tdw-related__cta {
  margin-top: var(--space-3);
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--accent);
}
.tdw-related__more {
  margin-top: var(--space-7);
  text-align: center;
}
@media (max-width: 880px) {
  .tdw-related { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   EDITION STATUS PILL — Forthcoming / Custom order
   Used in the edition hero when there is no number.
   -------------------------------------------------------------------------- */
.tdw-ed-pill {
  display: inline-block;
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--fg);
  border: 1px solid var(--fg);
  padding: 6px var(--space-4);
  align-self: flex-start;
}
.tdw-ed-pill--custom { color: var(--accent); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   COOKIE CONSENT BANNER
   The brand voice: a small, paper-cream panel bottom-left of the viewport.
   Only rendered when analytics is enabled (TDW_ANALYTICS_ENABLED === true).
   The script (tdw-consent.js) handles the DOM; this is the visible skin.
   -------------------------------------------------------------------------- */
.tdw-consent {
  position: fixed;
  left: var(--gutter);
  bottom: var(--gutter);
  z-index: 90;
  width: min(420px, calc(100vw - var(--gutter) * 2));
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--rule);
  padding: var(--space-4) var(--space-5);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.tdw-consent[hidden] { display: none; }
.tdw-consent:not([hidden]) { opacity: 1; transform: translateY(0); }
.tdw-consent__title {
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}
.tdw-consent__body  { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--fg); }
.tdw-consent__actions { display: flex; gap: var(--space-3); margin-top: var(--space-2); }
.tdw-consent__btn {
  font-family: var(--font-mark);
  font-size: var(--size-mark);
  letter-spacing: var(--track-mark);
  text-transform: uppercase;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--fg);
  padding: 10px var(--space-4);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tdw-consent__btn--accept  { background: var(--accent); color: var(--tdw-paper); border-color: var(--accent); }
.tdw-consent__btn--accept:hover  { background: var(--accent-pressed); border-color: var(--accent-pressed); }
.tdw-consent__btn--decline:hover { background: var(--bg-panel); border-color: var(--fg); }
@media (max-width: 540px) {
  .tdw-consent { left: var(--gutter); right: var(--gutter); width: auto; }
}
