/* ═══════════════════════════════════════════════════════════════
   EDITORIAL — "The Develop" long-form layer
   Guides read as the field manual: a sticky mono chapter rail,
   Fraunces chapter heads with counters, screenshots framed as
   film plates. Blog posts ride the same shell at lower intensity
   (their per-post inline styles are restyled by the legacy
   aliases in site.css). Loads after /site.css.
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout: rail + article ────────────────────────────────── */
.ed-wrap {
  display: grid; grid-template-columns: 15rem minmax(0, 46rem);
  gap: clamp(2.5rem, 5vw, 5rem);
  max-width: 76rem; margin: 0 auto;
  padding: clamp(7rem, 13vh, 9rem) var(--pad-x) clamp(4rem, 9vh, 7rem);
}
@media (max-width: 1199px) {
  .ed-wrap { grid-template-columns: minmax(0, 46rem); justify-content: center; }
  .ed-rail { display: none; }
}

/* ── Chapter rail ──────────────────────────────────────────── */
.ed-rail { position: relative; }
.ed-rail-inner { position: sticky; top: 6.5rem; }
.ed-rail-title {
  color: var(--dim); font-size: 0.56rem; letter-spacing: 0.3em;
  padding-bottom: 0.9rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}
.ed-rail a {
  display: flex; gap: 0.7rem; align-items: baseline;
  font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim); padding: 0.4rem 0;
  transition: color 0.25s;
}
.ed-rail a .ch { color: var(--amber-deep); font-size: 0.56rem; flex: none; width: 1.8rem; }
.ed-rail a:hover { color: var(--silver); }
.ed-rail a.is-active { color: var(--amber); }
.ed-rail a.is-active .ch { color: var(--amber); }

/* ── Article head ──────────────────────────────────────────── */
.ed-head { margin-bottom: clamp(2.5rem, 5vh, 4rem); }
.ed-head .eyebrow { margin-bottom: 1.1rem; }
.ed-title {
  font-family: var(--f-display); font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 500; font-variation-settings: 'opsz' 120;
  line-height: 1.04; letter-spacing: -0.012em; color: var(--highlight);
  margin-bottom: 1.1rem;
}
.ed-title em {
  font-style: italic; font-weight: 390;
  font-variation-settings: 'opsz' 144, 'SOFT' 55, 'WONK' 1;
  color: var(--amber);
}
.ed-meta { color: var(--dim); font-size: 0.62rem; letter-spacing: 0.2em; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.ed-lede { color: var(--silver); font-size: 1.08rem; max-width: 40rem; margin-top: 1.4rem; }

/* ── Prose ─────────────────────────────────────────────────── */
.ed-prose { counter-reset: chapter; }
.ed-prose h2 {
  font-family: var(--f-display); font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 500; font-variation-settings: 'opsz' 80;
  color: var(--highlight); line-height: 1.12; letter-spacing: -0.01em;
  margin: 3.2rem 0 1rem;
  padding-top: 2.4rem; border-top: 1px solid var(--line-soft);
  scroll-margin-top: 5.5rem;
}

/* mobile contents (rail is desktop-only) */
.ed-toc-mobile { display: none; }
@media (max-width: 1199px) {
  .ed-toc-mobile {
    display: block;
    border: 1px solid var(--line-soft); border-radius: 3px;
    background: var(--carbon-2); margin: 0 0 2rem;
  }
  .ed-toc-mobile summary {
    cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
    padding: 0.9rem 1.1rem;
    font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.26em;
    color: var(--dim);
  }
  .ed-toc-mobile summary::-webkit-details-marker { display: none; }
  .ed-toc-mobile summary::after { content: '+'; color: var(--amber); font-family: var(--f-mono); font-size: 0.9rem; }
  .ed-toc-mobile[open] summary::after { content: '−'; }
  .ed-toc-mobile ol { list-style: none; padding: 0 1.1rem 0.9rem; margin: 0; }
  .ed-toc-mobile li a {
    display: block; padding: 0.35rem 0;
    font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--silver);
  }
  .ed-toc-mobile li a:hover { color: var(--amber); }
}
.ed-prose h3 {
  font-family: var(--f-display); font-size: 1.3rem; font-weight: 520;
  font-variation-settings: 'opsz' 40;
  color: var(--highlight); margin: 2rem 0 0.6rem;
  scroll-margin-top: 5.5rem;
}
.ed-prose h4 {
  font-family: var(--f-body); font-size: 0.95rem; font-weight: 600;
  color: var(--highlight); margin: 1.5rem 0 0.5rem;
}
.ed-prose p { margin: 0 0 1.05rem; color: var(--silver); }
.ed-prose ul, .ed-prose ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.ed-prose ul { list-style: none; }
.ed-prose ul > li {
  position: relative; padding: 0.22rem 0;
  color: var(--silver); font-size: 0.97rem;
}
.ed-prose ul > li::before {
  content: '✦'; position: absolute; left: -1.4rem; top: 0.28rem;
  color: var(--amber); font-size: 0.66rem;
}
.ed-prose ol { list-style: none; counter-reset: item; }
.ed-prose ol > li {
  counter-increment: item;
  position: relative; padding: 0.22rem 0;
  color: var(--silver); font-size: 0.97rem;
}
.ed-prose ol > li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute; left: -1.65rem; top: 0.3rem;
  font-family: var(--f-mono); font-size: 0.62rem; color: var(--amber);
}
.ed-prose a { color: var(--amber); }
.ed-prose a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ed-prose strong { color: var(--highlight); font-weight: 600; }
.ed-prose code, .ed-prose kbd {
  font-family: var(--f-mono); font-size: 0.82em;
  background: var(--carbon-2); border: 1px solid var(--line-soft);
  border-radius: 3px; padding: 0.1em 0.4em; color: var(--highlight);
}
.ed-prose blockquote {
  border-left: 2px solid var(--amber); padding: 0.3rem 0 0.3rem 1.2rem;
  margin: 1.4rem 0; color: var(--dim); font-style: italic;
}
.ed-prose hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.5rem 0; }
.ed-prose table {
  width: 100%; border-collapse: collapse; margin: 1.4rem 0;
  font-size: 0.9rem;
}
.ed-prose th {
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim); text-align: left;
  padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line);
}
.ed-prose td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line-soft); color: var(--silver); }

/* ── Screenshots as film plates ────────────────────────────── */
.ed-prose img.guide-screenshot, .ed-prose .ed-plate img {
  width: 100%; height: auto; display: block; border-radius: 2px;
}
.ed-prose img.guide-screenshot {
  border: 1px solid var(--line);
  padding: 0.45rem;
  background:
    repeating-linear-gradient(to right, transparent 0 10px, var(--carbon-3) 10px 17px, transparent 17px 27px) top / 100% 5px no-repeat,
    repeating-linear-gradient(to right, transparent 0 10px, var(--carbon-3) 10px 17px, transparent 17px 27px) bottom / 100% 5px no-repeat,
    var(--carbon-2);
  margin: 1.4rem 0;
}

/* ── Details / disclosure (guide-details + faq-item) ───────── */
.ed-prose details {
  border: 1px solid var(--line-soft); border-radius: 3px;
  margin: 1rem 0; background: var(--carbon-2);
}
.ed-prose details summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.9rem 1.1rem;
  color: var(--highlight); font-weight: 500; font-size: 0.97rem;
}
.ed-prose details summary::-webkit-details-marker { display: none; }
.ed-prose details summary::after {
  content: '+'; font-family: var(--f-mono); color: var(--amber); flex: none;
  transition: transform 0.35s var(--ease-out);
}
.ed-prose details[open] summary::after { transform: rotate(45deg); }
.ed-prose details > *:not(summary) { padding: 0 1.1rem; }
.ed-prose details > :last-child { padding-bottom: 1rem; }

/* ── Note / tip boxes ──────────────────────────────────────── */
.ed-note, .ed-prose .tip {
  margin: 1.25rem 0; padding: 1rem 1.25rem;
  background: var(--carbon-2);
  border-left: 2px solid var(--amber); border-radius: 3px;
  font-size: 0.92rem; color: var(--silver);
}

.ed-note-label, .ed-prose .ed-note strong:first-child {
  display: block; font-family: var(--f-mono); font-size: 0.58rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--amber);
  margin-bottom: 0.6rem;
}
.ed-subhead { font-weight: 600; color: var(--highlight); margin-top: 1.5rem; }

/* ── Cross-link card to the product page ───────────────────── */
.ed-crosslink {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  border: 1px solid var(--line); border-radius: 3px;
  padding: 1.4rem 1.6rem; margin: 3rem 0 0;
  transition: background 0.35s, border-color 0.35s;
}
.ed-crosslink:hover { background: var(--carbon-2); border-color: var(--amber-deep); }
.ed-crosslink .xl-copy { display: grid; gap: 0.25rem; }
.ed-crosslink .xl-eyebrow { color: var(--amber); font-size: 0.56rem; letter-spacing: 0.26em; }
.ed-crosslink .xl-title {
  font-family: var(--f-display); font-size: 1.25rem; font-weight: 500;
  font-variation-settings: 'opsz' 40; color: var(--highlight);
}
.ed-crosslink .xl-arrow { color: var(--amber); font-size: 1.1rem; flex: none; }

/* ── Journal (blog) index — contact sheet reuse ────────────── */
.jr-index-list { border-top: 1px solid var(--line); }
.jr-index-list li { border-bottom: 1px solid var(--line); }
.jr-index-list a {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  align-items: baseline; gap: 1.6rem;
  padding: 1.35rem 0.4rem;
  position: relative;
  transition: padding-left 0.45s var(--ease-out);
}
.jr-index-list a::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(232 163 61 / 0.07), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.jr-index-list a:hover { padding-left: 1.2rem; }
.jr-index-list a:hover::before { opacity: 1; }
.jr-date { color: var(--dim); font-size: 0.62rem; }
.jr-name {
  font-family: var(--f-display); font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 470; font-variation-settings: 'opsz' 50;
  color: var(--highlight); letter-spacing: -0.01em; line-height: 1.25;
  transition: color 0.3s;
}
.jr-index-list a:hover .jr-name { color: var(--amber); }
.jr-read { color: var(--dim); font-size: 0.62rem; letter-spacing: 0.14em; white-space: nowrap; }
@media (max-width: 760px) {
  .jr-index-list a { grid-template-columns: 1fr auto; }
  .jr-date { grid-column: 1 / -1; }
}

/* ── Newsletter band (shared with product layer) ───────────── */
.p-newsletter {
  padding: clamp(4rem, 8vh, 6rem) var(--pad-x);
  border-top: 1px solid var(--line-soft);
  background: var(--carbon-2);
}
.p-newsletter-inner {
  max-width: 90rem; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.p-newsletter h2 {
  font-family: var(--f-display); font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 500;
  font-variation-settings: 'opsz' 60; color: var(--highlight); line-height: 1.1;
}
.p-newsletter .nl-copy p { color: var(--dim); font-size: 0.95rem; margin-top: 0.8rem; max-width: 28rem; }
@media (max-width: 1080px) { .p-newsletter-inner { grid-template-columns: 1fr; gap: 2rem; } }
