/* Dressing Standard — article template
   ARTICLE_TEMPLATE_SPEC.md > Header zone, Lead zone, Body zone, End zone. */

/* ---------- Header zone ---------- */

.ds-article__header {
  /* Was var(--section-gap) (3.5-6rem) — cut ~70% per 2026-09-12 feedback,
     that much air above the breadcrumb read as a layout mistake, not a
     design choice. */
  padding-block: 1.25rem 0.5rem;
}

/* Side-by-side split matching the approved article-module-library comp —
   text left, hero image right, both starting at the same vertical
   position. Previously built as a stacked column (text, then a
   full-width image below) by working from ARTICLE_TEMPLATE_SPEC.md's
   prose list instead of the actual comp image; fixed 2026-09-11. */
.ds-article__header-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) 1fr;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: start;
  max-width: var(--content-max-width);
}

.ds-article__header-text {
  max-width: var(--article-measure);
}

@media (max-width: 800px) {
  .ds-article__header-grid { grid-template-columns: 1fr; }
}

.ds-breadcrumbs {
  font-family: var(--font-utility);
  font-size: 0.78rem;
  color: var(--color-muted-text);
  margin-bottom: 1.25rem;
}

.ds-breadcrumbs a { color: var(--color-muted-text); }
.ds-breadcrumbs a:hover { color: var(--color-ink); }
.ds-breadcrumbs [aria-current="page"] { color: var(--color-ink); }

.ds-article__eyebrow {
  display: block;
  margin-bottom: 0.9rem;
}

.ds-article__title {
  font-family: var(--font-headline);
  font-weight: 500;
  font-size: var(--text-h1);
  line-height: 1.08;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}

.ds-article__dek {
  font-size: 1.1rem;
  color: var(--color-muted-text);
  margin: 0 0 0.85rem;
  max-width: 60ch;
}

.ds-article__byline {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-utility);
  font-size: 0.85rem;
  color: var(--color-muted-text);
  margin-bottom: 1rem;
}

/* Hero position spec (side-by-side, next to the title block): landscape
   4:3 — round two on this. 16:10 read as too short/squeezed; 4:5
   (portrait) overcorrected and read as too tall, both visually (looked
   near-square, not landscape) and structurally (made the image column
   taller than the text column, which pushed the body copy down with a
   dead gap beneath the byline/share block, per 2026-09-12 feedback).
   4:3 is the new spec for this slot going forward — landscape, closer
   in height to the text column. Minimum 1600x1200px. The current hero
   photo is 16:10 and will center-crop into this ratio until replaced. */
.ds-article__hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

@media (max-width: 800px) {
  .ds-article__hero { margin-top: 1.75rem; }
  .ds-article__hero img { aspect-ratio: 16 / 10; }
}

.ds-article__share {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-utility);
  font-size: 0.8rem;
  padding-top: 0.85rem;
  border-top: var(--rule-width) solid #E7E4DE;
}

.ds-article__share a,
.ds-article__share button {
  color: var(--color-ink);
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ds-article__share a:hover,
.ds-article__share button:hover { opacity: 0.6; }

/* ---------- Lead + body zone ---------- */

.ds-article__body-wrap {
  padding-bottom: var(--section-gap);
}

.ds-article__layout {
  display: grid;
  grid-template-columns: var(--article-measure) 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

@media (max-width: 960px) {
  .ds-article__layout { grid-template-columns: 1fr; }
}

.ds-article__body {
  max-width: var(--article-measure);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

/* Right rail — desktop only per ARTICLE_TEMPLATE_SPEC.md > Right rail modules.
   "More From Dressing Standard" — real cross-links to other posts (same
   WP_Query pattern as end-zone Related Reading), replacing an earlier
   same-page "On This Page" TOC per 2026-09-11 feedback: the rail should
   point outward (discovery/cross-nav, also future ad inventory), not back
   into the article the reader is already on. A contextual commerce
   module slot is still deferred until there's real product data — see
   wordpress-theme/README.md. */

.ds-article__rail {
  display: none;
}

@media (min-width: 961px) {
  .ds-article__rail { display: block; }
}

/* Rail rebuild per 2026-09-17 reference (In This Article / Related Reading /
   Explore Dressing Standard, stacked). Sticky positioning now lives on the
   whole stack, not per-block — three independently-sticky blocks would
   overlap as the page scrolls. */
.ds-rail-stack {
  position: sticky;
  top: 2rem;
  padding-left: clamp(1.5rem, 1rem + 1.5vw, 2rem);
  border-left: 1px solid #E7E4DE;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.ds-rail-block__heading {
  display: block;
  font-family: var(--font-utility);
  font-weight: 700;
  font-size: var(--text-utility-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-red);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-ink);
}

/* Plain text links, no thumbnails — per 2026-09-12 feedback: this rail
   should read as a quiet "more reading" list, not a second image-led
   module competing with the article's own visuals. */
.ds-rail-block__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ds-rail-block__list li {
  padding-top: 1rem;
  border-top: 1px solid #E7E4DE;
}

.ds-rail-block__list li:first-child {
  padding-top: 0;
  border-top: none;
}

.ds-rail-block__list a {
  display: block;
  font-family: var(--font-headline);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--color-ink);
}

.ds-rail-block__list a:hover {
  color: var(--color-red);
}

/* Explore nav — tighter, no dividers, arrow suffix per reference. */
.ds-rail-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ds-rail-nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--font-headline);
  font-size: 1rem;
  color: var(--color-ink);
}

.ds-rail-nav a:hover {
  color: var(--color-red);
}

.ds-rail-nav__arrow {
  font-size: 0.8em;
}

.ds-article__body > * + * {
  margin-top: 1.4em;
}

.ds-article__body h2 {
  font-family: var(--font-headline);
  font-size: var(--text-h2);
  line-height: 1.2;
  margin-top: 2em;
}

.ds-article__body h3 {
  font-family: var(--font-utility);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: 1.75em;
}

.ds-article__body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ds-article__body blockquote {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.4;
  border-left: 2px solid var(--color-red);
  padding-left: 1.25rem;
  margin: 2em 0;
}

/* Real table treatment — bold header row, thick top/bottom rules,
   alternating row tint — per 2026-09-12 feedback ("should be more of a
   table than what it looks like right now"). */
.ds-article__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  border-top: 2px solid var(--color-ink);
  border-bottom: 2px solid var(--color-ink);
}

.ds-article__body th {
  text-align: left;
  padding: 0.75em 0.9em;
  font-family: var(--font-utility);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-ink);
}

.ds-article__body td {
  text-align: left;
  padding: 0.7em 0.9em;
  border-bottom: 1px solid #E7E4DE;
}

.ds-article__body tbody tr:last-child td { border-bottom: none; }
.ds-article__body tbody tr:nth-child(even) { background: var(--color-stone); }

/* ---------- Split block: text + image side by side ---------- */
/* For single-topic Q&A moments (shoes, long dress, black) that were
   previously a plain single column with a small centered photo below —
   per 2026-09-12 feedback, these read as a real two-column moment
   instead, alternating which side the image sits on down the article. */

.ds-split-block {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  align-items: center;
}

.ds-split-block--reverse .ds-split-block__text { order: 2; }
.ds-split-block--reverse .ds-split-block__media { order: 1; }

@media (max-width: 700px) {
  .ds-split-block { grid-template-columns: 1fr; }
  .ds-split-block--reverse .ds-split-block__text,
  .ds-split-block--reverse .ds-split-block__media { order: 0; }
}

.ds-split-block__text h2 { margin-top: 0; }
.ds-split-block__text p { margin: 0; }

.ds-split-block__media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.ds-article__body figure { margin: 0; }
.ds-article__body img { width: 100%; height: auto; }
.ds-article__body figcaption {
  font-size: 0.78rem;
  color: var(--color-muted-text);
  margin-top: 0.5rem;
}

/* ---------- In 30 Seconds — refined per module-comps review, 2026-09-11 ---------- */

.ds-i30 {
  max-width: var(--article-measure);
  background: var(--color-stone);
  padding: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  margin-block: 2.5em;
}

.ds-i30__eyebrow {
  /* Second pass on this gap, going much further — 0.4rem clearly wasn't
     enough per 2026-09-12 feedback ("80-90% of that white space, get
     rid of it"). Verified this time via computed pixel gap, not just
     eyeballed. */
  display: inline-block;
  font-family: var(--font-utility);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-red);
  border-bottom: 2px solid var(--color-red);
  padding-bottom: 0.2rem;
  margin-bottom: 0.1rem;
}

.ds-article__body .ds-i30__heading {
  font-family: var(--font-headline);
  font-size: var(--text-h2);
  line-height: 1.15;
  margin: 0 0 0.9rem;
}

.ds-i30__items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid #DCD7CC;
}

.ds-i30__item {
  padding: 1.1rem 1.25rem 0 1.25rem;
  border-left: 1px solid #DCD7CC;
}

/* 4-up: only the true first item sits flush-left. */
.ds-i30__item:nth-child(4n+1) { border-left: none; padding-left: 0; }

@media (max-width: 700px) {
  .ds-i30__items { grid-template-columns: repeat(2, 1fr); }
  /* 2-up: every odd item starts a new row, so it needs to sit flush-left too. */
  .ds-i30__item:nth-child(4n+1) { border-left: 1px solid #DCD7CC; padding-left: 1.25rem; }
  .ds-i30__item:nth-child(odd) { border-left: none; padding-left: 0; }
}

@media (max-width: 420px) {
  .ds-i30__items { grid-template-columns: 1fr; }
  .ds-i30__item { border-left: none; padding-left: 0; padding-top: 1.1rem; border-top: 1px solid #DCD7CC; }
  .ds-i30__item:first-child { border-top: none; padding-top: 0; }
}

.ds-i30__label {
  font-family: var(--font-utility);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.4rem;
}

.ds-i30__description {
  font-family: var(--font-utility);
  font-size: 0.85rem;
  color: var(--color-muted-text);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Checklist — refined per module-comps review, 2026-09-11 ---------- */
/* Empty checkbox marks instead of numerals — reads as "run through this,"
   not "here's a sequence," which is what the module actually is. */

.ds-checklist {
  max-width: var(--article-measure);
  background: var(--color-stone);
  padding: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  margin-block: 2.5em;
}

.ds-checklist__heading {
  font-family: var(--font-headline);
  font-size: var(--text-h2);
  margin: 0 0 0.5rem;
}

.ds-checklist__intro {
  color: var(--color-muted-text);
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.ds-checklist__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ds-checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-top: 1px solid #DCD7CC;
}

.ds-checklist__items .ds-checklist__item:first-child {
  border-top: none;
}

.ds-checklist__box {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--color-ink);
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-red);
  font-size: 0.7rem;
  line-height: 1;
}

.ds-checklist__text {
  font-family: var(--font-utility);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* ---------- TDS Framework — refined per module-comps review, 2026-09-11 ---------- */
/* Inverted to black — the one module meant to stop the scroll. Reserved
   for genuine named frameworks (docx > 8), not every article. Equation
   terms as distinct chips rather than a run-on sentence; the result is
   pulled out in red. */

.ds-framework {
  max-width: var(--article-measure);
  background: var(--color-ink);
  color: var(--color-paper);
  padding: clamp(1.75rem, 1.3rem + 2vw, 3rem);
  margin-block: 2.5em;
}

.ds-framework__eyebrow {
  display: block;
  font-family: var(--font-utility);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #B9B2A0;
  margin-bottom: 0.4rem;
}

.ds-framework__heading {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: var(--text-h2);
  margin: 0 0 1.25rem;
  color: var(--color-paper);
}

.ds-framework__equation {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  margin-bottom: 1.75rem;
}

.ds-framework__term {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ds-framework__term-label {
  font-family: var(--font-utility);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8A8578;
}

.ds-framework__term-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem);
  color: var(--color-paper);
}

.ds-framework__operator {
  /* Was #6B6659 — a dark grey on #0A0A0A that's effectively invisible.
     This is almost certainly why the equation read as "just five words
     in a row" with no visible × or = — a contrast bug, not a missing
     formula. Fixed 2026-09-12. */
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: 1.4rem;
  color: #D6D1C4;
  align-self: center;
  padding-bottom: 0.3rem;
}

.ds-framework__result .ds-framework__term-value { color: var(--color-red); }
.ds-framework__result .ds-framework__term-label { color: #C77E8A; }

.ds-framework__interpretation {
  font-family: var(--font-utility);
  font-size: 0.9rem;
  line-height: 1.65;
  color: #C9C4B8;
  margin: 0;
  max-width: 56ch;
  border-top: 1px solid #2A2822;
  padding-top: 1.5rem;
}

/* ---------- Outfit Formula — rebuilt 2026-09-11 to match the approved
   "Outfit Grid" pattern from the article-module-library comp: images in
   a row with a short numeral+name caption underneath, not a vertical
   stacked list. The fuller formula sentences (which the comp's bare
   "LOOK 01" captions don't have room for) move to a compact list below
   the row instead of being dropped. ---------- */

.ds-formula-list__intro {
  color: var(--color-muted-text);
  margin: 0 0 1.5rem;
}

.ds-formula-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.85rem;
  margin-bottom: 2rem;
}

@media (max-width: 700px) {
  .ds-formula-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 460px) {
  .ds-formula-grid { grid-template-columns: repeat(2, 1fr); }
}


/* Each formula is a real button — click/tap reveals its text in the
   shared detail panel below, per 2026-09-12 feedback. Grid + a duplicate
   always-visible list read as repetitive; this makes the grid the whole
   interaction instead of a preview for a list underneath it. */
.ds-formula-grid__item {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ds-formula-grid__item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: var(--color-stone);
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color var(--transition-fast, 150ms ease);
}

.ds-formula-grid__item.is-active img,
.ds-formula-grid__item:hover img {
  outline-color: var(--color-red);
}

.ds-formula-grid__caption {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ds-formula-grid__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-optical-sizing: auto;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--color-red);
  text-transform: uppercase;
}

.ds-formula-grid__name {
  font-family: var(--font-utility);
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.25;
}

/* Shared detail panel — populated by article.js on click, hidden until
   the first tap. */
.ds-formula-detail {
  border-top: 1px solid var(--color-ink);
  padding-top: 1.1rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.ds-formula-detail[hidden] { display: none; }

.ds-formula-detail__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-optical-sizing: auto;
  font-size: 1.5rem;
  color: var(--color-red);
  line-height: 1;
  flex: 0 0 auto;
}

.ds-formula-detail__name {
  font-family: var(--font-utility);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.3rem;
}

.ds-formula-detail__text {
  margin: 0;
  color: var(--color-body-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Venue-matrix photo grid & inline supporting photo ---------- */
/* No dedicated module for these yet — a simple, reusable pattern for
   "a few portrait editorial photos alongside body copy," used for the
   venue matrix and single supporting images (shoes, long dress, black
   dress questions). Revisit as a real module if this shape recurs often
   enough to earn one. */

.ds-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.75em 0;
}

/* Two-image variant — occasion/dress-code posts pairing exactly two looks
   (e.g. daytime vs. evening), not a four-item venue grid. */
.ds-photo-grid--two {
  grid-template-columns: repeat(2, 1fr);
}

/* Three-image variant — for five-item sets, wraps 3+2 instead of the
   default 4-column grid's unbalanced 4+1. */
.ds-photo-grid--three {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 700px) {
  .ds-photo-grid--three { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .ds-photo-grid { grid-template-columns: repeat(2, 1fr); }
}

.ds-photo-grid figure {
  margin: 0;
}

.ds-photo-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.ds-photo-grid figcaption {
  font-family: var(--font-utility);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted-text);
  margin-top: 0.5rem;
}

.ds-inline-photo {
  max-width: 280px;
  margin: 1.5em 0;
}

.ds-inline-photo img {
  width: 100%;
  height: auto;
  display: block;
}

/* Optional drop-cap — apply the class to the lead paragraph manually per
   ARTICLE_TEMPLATE_SPEC.md ("use only on selected feature stories, not
   required on every article"). Not applied automatically by this template. */
.ds-dropcap::first-letter {
  font-family: var(--font-headline);
  font-weight: 600;
  float: left;
  font-size: 3.6rem;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.3rem;
}

/* ---------- End zone ---------- */

.ds-article__end {
  padding-bottom: var(--section-gap);
  border-top: var(--rule-width) solid #E7E4DE;
  padding-top: var(--section-gap);
}

.ds-article__author-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: var(--section-gap);
  max-width: var(--article-measure);
}

.ds-article__author-card img { border-radius: 50%; }

.ds-article__author-name {
  font-family: var(--font-utility);
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.ds-article__author-bio {
  color: var(--color-muted-text);
  font-size: 0.9rem;
  margin: 0;
}
