/* ==========================================================================
   Layout system C — EDITORIAL
   --------------------------------------------------------------------------
   Used by: tidewalk ($1,850)
   Reference: a technical magazine. A left gutter that carries the section
   number, an asymmetric body, rules instead of cards, and photography that
   runs off the edge.

   WHAT MAKES THIS DIFFERENT FROM THE OTHER FOUR
     · a numbered LEFT GUTTER down every section, not a centred heading
     · an asymmetric 12-column body — text sits in columns 4 to 11, never 1 to 12
     · horizontal RULES between blocks, instead of cards and shadows
     · a full-bleed image that breaks the grid on purpose
     · a sidebar that carries specs beside the article, magazine-style
     · NO card grid on the homepage. NO equal columns.

   Requires core.css.
   ========================================================================== */

.ed-shell {
  width: min(1240px, 100% - 48px);
  margin-inline: auto;
  display: grid;
  gap: 0 clamp(20px, 3vw, 40px);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .ed-shell {
    grid-template-columns: 82px minmax(0, 1fr) 300px;
    align-items: start;
  }
}

/* the section number in the gutter */
.ed-num {
  font-family: var(--d-font);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--d-accent);
  padding-top: 6px;
  grid-column: 1;
}

.ed-body { grid-column: 1; }

@media (min-width: 900px) {
  .ed-body { grid-column: 2; max-width: 62ch; }
  .ed-aside { grid-column: 3; }
  .ed-full { grid-column: 1 / -1; }
}

/* a section is a rule and a gutter number, not a floating container */
.ed-sec {
  border-top: 1px solid var(--d-line);
  padding: clamp(30px, 4.6vw, 58px) 0;
}

.ed-sec:first-of-type { border-top: 0; }

.ed-sec h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  letter-spacing: -0.028em;
  margin-bottom: 0.4em;
}

.ed-lede {
  font-size: clamp(1.05rem, 1.9vw, 1.28rem);
  line-height: 1.55;
  color: var(--d-ink);
  max-width: 46ch;
}

.ed-p { color: var(--d-muted); max-width: 58ch; }

/* --------------------------------------------------------------- big open */
.ed-open {
  padding: clamp(48px, 8vw, 104px) 0 clamp(30px, 4vw, 50px);
}

.ed-open h1 {
  font-size: clamp(2.3rem, 6.2vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 18ch;
  margin-bottom: 0.45em;
}

.ed-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--d-muted);
  margin-bottom: 20px;
}

.ed-kicker b { color: var(--d-accent); font-weight: 700; }

/* -------------------------------------------------- spec sidebar (magazine) */
.ed-aside {
  border-left: 1px solid var(--d-line);
  padding-left: clamp(16px, 2vw, 26px);
}

@media (max-width: 899px) {
  .ed-aside {
    border-left: 0;
    border-top: 1px solid var(--d-line);
    padding-left: 0;
    padding-top: 20px;
    margin-top: 24px;
  }
}

.ed-spec {
  display: grid;
  gap: 0;
  font-size: 0.86rem;
}

.ed-spec div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--d-line);
}

.ed-spec dt { color: var(--d-muted); }
.ed-spec dd { margin: 0; font-weight: 600; text-align: right; }

.ed-aside h4 {
  font-family: var(--d-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--d-muted);
  margin: 0 0 10px;
}

/* ------------------------------------------------------------- full bleed */
.ed-bleed {
  grid-column: 1 / -1;
  margin: clamp(34px, 5vw, 66px) 0;
}

.ed-bleed-img {
  aspect-ratio: 24 / 9;
  background:
    linear-gradient(120deg,
      color-mix(in srgb, var(--d-accent) 22%, var(--d-surface)),
      color-mix(in srgb, var(--d-ink) 12%, var(--d-surface)) 60%,
      var(--d-surface));
  display: grid;
  place-items: center;
  font-family: var(--d-font);
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  color: color-mix(in srgb, var(--d-ink) 40%, transparent);
  border-radius: 0;
}

.ed-bleed figcaption {
  font-size: 0.8rem;
  color: var(--d-muted);
  padding-top: 10px;
}

/* ------------------------------------------------------------------ steps */
.ed-steps {
  counter-reset: ed;
  display: grid;
  gap: 0;
}

.ed-step {
  counter-increment: ed;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--d-line);
}

.ed-step::before {
  content: counter(ed, decimal-leading-zero);
  font-family: var(--d-font);
  font-size: 1.15rem;
  color: var(--d-accent);
  line-height: 1.3;
}

.ed-step h3 { font-size: 1.08rem; margin-bottom: 0.25em; }
.ed-step p { margin: 0; font-size: 0.92rem; color: var(--d-muted); }

/* ------------------------------------------------------- article furniture */
.ed-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--d-line);
}

.ed-item {
  display: grid;
  gap: 6px 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--d-line);
  text-decoration: none;
  transition: padding-left 0.24s cubic-bezier(0.16, 0.84, 0.28, 1),
              color 0.24s ease;
}

@media (min-width: 640px) {
  .ed-item { grid-template-columns: 130px minmax(0, 1fr) 96px; align-items: baseline; }
}

.ed-item:hover { padding-left: 10px; color: var(--d-accent); }

.ed-item .ed-cat {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--d-accent);
}

.ed-item .ed-title {
  font-family: var(--d-font);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  letter-spacing: -0.015em;
}

.ed-item .ed-date {
  font-size: 0.8rem;
  color: var(--d-muted);
  white-space: nowrap;
}

@media (min-width: 640px) {
  .ed-item .ed-date { text-align: right; }
}

/* -------------------------------------------------------------- pull quote */
.ed-pull {
  border-left: 2px solid var(--d-accent);
  padding-left: clamp(18px, 2.4vw, 30px);
  margin: clamp(28px, 4vw, 44px) 0;
}

.ed-pull p {
  font-family: var(--d-font);
  font-size: clamp(1.24rem, 2.6vw, 1.8rem);
  line-height: 1.32;
  letter-spacing: -0.022em;
  margin: 0 0 12px;
}

.ed-pull cite {
  font-style: normal;
  font-size: 0.84rem;
  color: var(--d-muted);
}

@media (max-width: 899px) {
  .ed-shell { grid-template-columns: 1fr; }
  .ed-num { padding-top: 0; }
}
