/* Stories, Story, Articles and Article (round 2026-11-19), drawn by js/ed-v8.js. On top of css/leica.css (the product page
   template: resets scoped to .lc, the hero, the final CTA). Design system v3 (design-system/project/README.md):
   Montserrat 400/500/600, paper ground, ink / ink-2 / ink-3, ember only for dots, focus, progress, numbers and small
   labels; square-cornered pictures; v1's dotted rule (.hs-rule) and heat line (.hs-heatline); hs-meta labels; pills by
   the CTA rule. No dark containers in the page body. Scoped to main.ed. */

.ed .ed-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Hubs ---------- */
/* Hero (leica d-01 via .lc-hero): long story questions sit at a smaller hero size than a product name (touch-up) */
.ed .lc-hero__text p.hs-meta { margin: 0; font-size: 13px; line-height: 1.3; color: rgba(252, 253, 253, 0.82); }
.ed .lc-hero__text h2 { margin-top: 14px; font-size: clamp(34px, 3.8vw, 58px); line-height: 1.06; max-width: 19ch; text-wrap: balance; }
.ed .lc-hero__text p:not(.hs-meta) { text-wrap: pretty; }

/* List head with the isotherm (as leica.css .lc-detail__iso) */
.ed-list .lc-head { position: relative; padding-top: 8px; padding-bottom: 8px; margin-bottom: clamp(28px, 3vw, 40px); }
.ed-list .ed-iso { left: 0; right: 0; top: -40px; bottom: -40px; opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, #000 20%, transparent 75%); }
.ed-list .v8-lead { min-height: 3em; }

/* Filter: a centred row of text tabs in the nav's small capitals; the current and hovered tab get the nav's 1px ember
   line growing from the centre (DS v3 nav "Current page and hover", v8.css #gn .gn-link::after); leica d-01 tabs */
.ed-tabs { display: flex; justify-content: safe center; gap: clamp(20px, 2.6vw, 36px); overflow-x: auto; scrollbar-width: none;
  padding: 0 var(--hs-edge); margin: 0 auto clamp(32px, 3.5vw, 48px); }
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tab { position: relative; flex: none; border: 0; background: none; cursor: pointer; padding: 14px 2px; white-space: nowrap;
  font: 500 13px/1 "Montserrat", sans-serif; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); transition: color 0.2s; }
.ed-tab::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 6px; height: 1px; background: var(--ember);
  transform: scaleX(0); transition: transform 0.35s var(--ease-spring); }
.ed-tab:hover { color: var(--ink); }
.ed-tab[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.ed-tab:hover::after, .ed-tab:focus-visible::after, .ed-tab[aria-pressed="true"]::after { transform: scaleX(1); }
.ed-tab:focus-visible { outline-offset: -2px; }

/* Grid of tiles: the template's tile captions (.lc-tile) on square pictures, 12px gaps */
.ed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 12px; width: var(--v8-wide); margin: 0 auto; }
.ed-grid > li[hidden] { display: none; }
.ed-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ed-tile { display: block; text-decoration: none; }
.ed-tile__pic { aspect-ratio: 1; overflow: hidden; background: #ecebe8; }
.ed-tile__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
@media (hover: hover) { .ed-tile:hover .ed-tile__pic img { transform: scale(1.035); } }
.ed-tile .hs-meta { padding: 16px 2px 0; font-size: 12px; }
.ed-tile b { display: block; padding: 8px 2px 0; font-size: 17px; line-height: 1.35; font-weight: 500; color: var(--ink); text-wrap: pretty; }
.ed-tile span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding: 6px 2px 0;
  font-size: 15px; line-height: 1.45; color: var(--ink-3); }
.ed-empty { text-align: center; font-size: 17px; color: var(--ink-2); padding: 24px var(--hs-edge); }
.ed .ed-note { font-size: 13px; line-height: 1.55; color: var(--ink-3); max-width: 72ch; }
.ed-list > .ed-note { width: var(--v8-wide); margin: clamp(40px, 4vw, 56px) auto 0; text-align: center; }
.ed-more-cta { text-align: center; margin-top: clamp(40px, 4vw, 56px); }

/* ---------- Singles: picture header (Mockup-v3 .story-hero / .post-head) ---------- */
.ed-ph { position: relative; min-height: min(72vh, 680px); display: flex; align-items: flex-end; overflow: hidden; background: var(--night); color: var(--on-night); }
.ed-ph__pic { position: absolute; inset: 0; }
.ed-ph__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.ed-ph::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(12, 14, 17, 0.78) 0%, rgba(12, 14, 17, 0.4) 38%, rgba(12, 14, 17, 0) 68%); }
.ed-ph__text { position: relative; z-index: 1; width: 100%; padding: 120px var(--hs-edge) clamp(40px, 4.5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: end; }
.ed-ph--side .ed-ph__text { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ed-ph__text > div { max-width: 900px; }
.ed-ph .hs-meta { color: rgba(252, 253, 253, 0.82); }
.ed-crumbs a { color: inherit; text-decoration: none; }
.ed-crumbs a:hover { color: var(--on-night); text-decoration: underline; text-underline-offset: 3px; }
.ed-crumbs span { margin: 0 6px; }
.ed-ph__meta { margin-top: 12px; }
.ed-ph h1 { margin-top: 16px; font-size: clamp(36px, 4.2vw, 60px); line-height: 1.06; font-weight: 400; letter-spacing: -0.035em; color: var(--on-night); max-width: 20ch; text-wrap: balance; }
.ed-ph__line { margin-top: 16px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--on-night); max-width: 52ch; }
.ed-ph__side { font-size: 17px; line-height: 1.55; color: var(--on-night); max-width: 40ch; justify-self: end; }
.ed-heat { width: 100%; }

/* Section titles on the singles (v3 .story-sec h2 in DS v3 type) */
.ed .ed-h2 { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.15; font-weight: 400; letter-spacing: -0.025em; color: var(--ink); }
.ed-sec { width: var(--v8-wide); margin: 0 auto; padding-top: clamp(56px, 6vw, 80px); }
.ed-sec > .hs-rule { margin-bottom: 28px; }

/* Quote (v3 .story-quote) */
.ed-quote { max-width: 980px; margin: 0 auto; padding: clamp(64px, 7vw, 96px) var(--hs-edge) 0; text-align: center; }
.ed-quote p { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.25; font-weight: 400; letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
.ed-quote figcaption { margin-top: 20px; font-size: 13px; justify-items: center; }

/* What happened (v3 .beats) */
.ed .ed-worry { margin-top: 12px; font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 640px; }
.ed-beats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; list-style: none; padding: 0; }
.ed-beats li { display: flex; flex-direction: column; }
.ed-beats__pic { aspect-ratio: 4 / 3; overflow: hidden; background: #ecebe8; }
.ed-beats__pic > img { width: 100%; height: 100%; object-fit: cover; }
.ed-beats__pic--app { display: flex; justify-content: center; align-items: flex-start; padding-top: 28px; }
.ed-beats__pic--app .lc-phone { --w: clamp(150px, 15vw, 210px); box-shadow: 0 16px 32px rgba(12, 14, 17, 0.16); }
.ed .ed-beats__time { margin-top: 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.ed-beats .is-alert .ed-beats__time { color: var(--ember); }
.ed .ed-beats li > p:last-child { margin-top: 8px; font-size: 17px; line-height: 1.5; color: var(--ink-2); padding-right: 12px; }

/* Who is told (v3 .told) */
.ed-told { display: flex; flex-wrap: wrap; gap: 20px 48px; margin-top: 24px; }
.ed-told li { display: grid; grid-template-columns: 52px auto; column-gap: 14px; align-items: center; }
.ed-told__i { grid-row: span 2; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 20px; font-weight: 500; color: var(--ink); }
.ed-told b { font-size: 18px; font-weight: 500; color: var(--ink); }
.ed-told li > span:last-child { font-size: 15px; color: var(--ink-3); }

/* What you can do (v3 .tips in the v1 look, v4.css) */
.ed-tips { max-width: 820px; padding-top: 32px; border-top: 2px solid var(--ink); }
.ed-tips ol { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: tip; }
.ed-tips li { position: relative; padding: 14px 0 14px 40px; font-size: 17px; line-height: 1.5; color: var(--ink); counter-increment: tip;
  background: radial-gradient(circle, var(--line) 0.75px, transparent 1px) 0 0 / 6px 1px repeat-x; }
.ed-tips li::before { content: counter(tip, decimal-leading-zero); position: absolute; left: 0; top: 17px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--ember); }
.ed-tips__more { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; padding: 20px 24px;
  border: 1px solid var(--line); text-decoration: none; transition: border-color 0.2s; }
.ed-tips__more > span:first-child { display: grid; gap: 6px; }
.ed-tips__more .hs-eyebrow { font-size: 12px; }
.ed-tips__more b { font-size: 17px; line-height: 1.4; font-weight: 500; color: var(--ink); }
.ed-tips__more .hs-round { flex: none; color: var(--ink); }
.ed-tips__more .hs-round svg { width: 14px; height: 14px; }
@media (hover: hover) { .ed-tips__more:hover { border-color: var(--ink); } .ed-tips__more:hover .hs-round { background: var(--ink); color: var(--paper); } }

/* The light in this story (v3 .story-end) */
.ed-end { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 4vw, 64px); align-items: center; }
.ed-end__pic { aspect-ratio: 16 / 10; overflow: hidden; background: #ecebe8; }
.ed-end__pic img { width: 100%; height: 100%; object-fit: cover; }
.ed-end .hs-eyebrow { font-size: 12px; }
.ed .ed-end__line { margin-top: 14px; font-size: clamp(22px, 2vw, 28px); line-height: 1.35; font-weight: 400; letter-spacing: -0.015em; color: var(--ink); max-width: 30ch; }
.ed-actions { margin-top: 24px; }
.ed-end .ed-note { margin-top: 24px; }

/* Keep reading (v3 .sec__head + card row) */
.ed-keep { padding-bottom: var(--v8-gap); }
.ed .ed-sec + .ed-keep, .ed .ed-post + .ed-keep { padding-top: var(--v8-gap); }
.ed-keep__head { width: var(--v8-wide); margin: 0 auto 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

/* ---------- Article: post layout (Mockup-v3 post-wrap, pages.css) ---------- */
.ed-post { display: grid; grid-template-columns: 1fr minmax(0, 760px) 1fr; gap: 24px; padding: clamp(64px, 7vw, 104px) var(--hs-edge) 0; }
.ed-toc { display: grid; gap: 16px; align-content: start; position: sticky; top: 112px; max-width: 220px; }
.ed-toc__list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ed-toc__list a { display: block; font-size: 13px; line-height: 1.4; color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.ed-toc__list a:hover { color: var(--ink); }
.ed-toc__list a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.ed-toc__toggle, .ed-toc__n, .ed-chip { display: none; }

.ed-body { font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.ed-body > * + * { margin-top: 1.1em; }
.ed-body .ed-lede { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); }
.ed-body h2 { margin-top: 2.2em; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; font-weight: 400; letter-spacing: -0.025em; color: var(--ink); scroll-margin-top: 96px; }
.ed-body h3 { margin-top: 1.8em; font-size: 22px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.ed-body p, .ed-body li { text-wrap: pretty; }
.ed-body strong, .ed-body b { font-weight: 600; color: var(--ink); }
.ed-body ul, .ed-body ol { padding-left: 22px; display: grid; gap: 8px; }
.ed-body ul { list-style: disc; }
.ed-body li::marker { color: var(--ember); }
.ed-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 3px; }
.ed-body a:hover { color: var(--ember); }
.ed-body sup { font-size: 0.7em; line-height: 0; }
.ed-body sup a { color: var(--ember); font-weight: 600; text-decoration: none; padding: 0 2px; }
.ed-body figure { margin: 1.8em 0; }
.ed-body figure img { width: 100%; height: auto; }
.ed-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--ember); color: var(--ink); font-size: 20px; line-height: 1.5; }
.ed-body blockquote p { margin: 0; }
.ed-refs { margin-top: 3em; font-size: 14px; line-height: 1.6; }
.ed-refs .hs-meta { margin-top: 24px; }
.ed-refs ol { margin: 16px 0 0; list-style: decimal; }
.ed-refs li::marker { color: var(--ink-3); }
.ed .ed-body .ed-refs a { color: var(--ink); }

/* Reduced motion: no zoom, no growing lines */
@media (prefers-reduced-motion: reduce) {
  .ed-tile__pic img, .ed-tab::after { transition: none !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .ed-grid { grid-template-columns: repeat(3, 1fr); }
  .ed-keep .ed-grid--4 > li:nth-child(4) { display: none; }
}
@media (max-width: 860px) {
  .ed-ph--side .ed-ph__text { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ed-ph__side { justify-self: start; }
  .ed-end { grid-template-columns: 1fr; }

  /* In this guide: a fold-out row at the top of the article, a floating pill naming the section (v3 / pages.css) */
  .ed-post { grid-template-columns: 1fr; gap: 0; }
  .ed-post > :last-child:not(.ed-body) { display: none; }
  .ed-toc { position: static; max-width: none; gap: 0; margin-bottom: 40px;
    background: radial-gradient(circle, var(--line) 0.75px, transparent 1px) 0 0 / 6px 1px repeat-x,
      radial-gradient(circle, var(--line) 0.75px, transparent 1px) 0 100% / 6px 1px repeat-x; }
  .ed-toc > .hs-meta { display: none; }
  .ed-toc__toggle { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 0; border: 0; background: none;
    font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
  .ed-toc__toggle .hs-meta { color: var(--ink); font-weight: 600; }
  .ed-toc__count { margin-left: auto; font-size: 13px; color: var(--ink-3); }
  .ed-toc__chev { width: 9px; height: 9px; margin: 0 4px 4px 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform 0.45s var(--ease-spring); }
  .ed-toc.is-open .ed-toc__chev, .ed-toc:not(.is-ready) .ed-toc__chev { transform: translateY(4px) rotate(-135deg); }
  .ed-toc__body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.45s var(--ease-spring); }
  .ed-toc.is-ready:not(.is-open) .ed-toc__body { grid-template-rows: 0fr; }
  .ed-toc__list { gap: 0; min-height: 0; overflow: hidden; }
  .ed-toc__list li:last-child { padding-bottom: 12px; }
  .ed-toc__list a { display: flex; align-items: baseline; gap: 14px; padding: 13px 0; font-size: 15px; color: var(--ink);
    background: radial-gradient(circle, var(--line) 0.75px, transparent 1px) 0 0 / 6px 1px repeat-x; }
  .ed-toc__n { display: inline; flex: none; min-width: 22px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--ember); }
  .ed-chip { position: fixed; left: var(--hs-edge); bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); z-index: 43; display: flex; align-items: center; gap: 10px;
    max-width: calc(100vw - var(--hs-edge) * 2); height: 44px; padding: 0 16px 0 14px; border: 1px solid var(--line); border-radius: 999px;
    background: rgba(252, 253, 253, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    font: 500 13px/1 "Montserrat", sans-serif; color: var(--ink); cursor: pointer;
    opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-spring); }
  .ed-chip.is-on { opacity: 1; transform: none; pointer-events: auto; }
  .ed-chip__n { flex: none; font-size: 12px; font-weight: 600; color: var(--ember); }
  .ed-chip__n:empty { display: none; }
  .ed-chip__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ed-chip__up { flex: none; width: 7px; height: 7px; margin: 3px 0 0 2px; border-left: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); }
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
  .ed .lc-hero__text h2 { font-size: 32px; }
  .ed .lc-hero__text p:not(.hs-meta) { font-size: 16px; }
  .ed-tabs { justify-content: flex-start; gap: 22px; }
  .ed-grid { grid-template-columns: 1fr 1fr; gap: 28px 10px; width: auto; padding-inline: var(--hs-edge); }
  .ed-tile .hs-meta { padding-top: 12px; font-size: 11px; }
  .ed-tile b { font-size: 15px; }
  .ed-tile span { font-size: 14px; -webkit-line-clamp: 2; }
  .ed-keep .ed-grid--4 > li:nth-child(4) { display: block; }

  /* Picture header: the picture, then the text on paper (v3's phone layout; no dark container in the body) */
  .ed-ph { display: block; min-height: 0; background: var(--paper); color: var(--ink); }
  .ed-ph::after { display: none; }
  .ed-ph__pic { position: static; aspect-ratio: 4 / 3; }
  .ed-ph__text { padding: 24px var(--hs-edge) 32px; }
  .ed-ph .hs-meta { color: var(--ink-3); }
  .ed-crumbs a:hover { color: var(--ink); }
  .ed-ph h1 { font-size: 30px; line-height: 1.12; color: var(--ink); }
  .ed-ph__line, .ed-ph__side { font-size: 17px; color: var(--ink-2); }

  .ed-quote { text-align: left; }
  .ed-quote p { font-size: 26px; }
  .ed-quote figcaption { justify-items: start; }
  .ed-beats { grid-template-columns: 1fr; gap: 28px; }
  .ed-beats li { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: auto 1fr; column-gap: 16px; }
  .ed-beats__pic { grid-row: span 2; aspect-ratio: 3 / 4; }
  .ed-beats__pic--app { padding-top: 14px; }
  .ed-beats__pic--app .lc-phone { --w: 88px; }
  .ed .ed-beats__time { margin-top: 0; }
  .ed .ed-beats li > p:last-child { padding-right: 0; }
  .ed-told { flex-direction: column; }
  .ed-tips li { font-size: 16px; }
  .ed-tips__more { padding: 16px 18px; }
  .ed-keep__head { width: auto; padding-inline: var(--hs-edge); }
  .ed-keep__head .hs-pill { flex: none; }

  .ed-post { padding-top: 32px; }
  .ed-body { font-size: 17px; }
  .ed-body figure { margin-left: calc(var(--hs-edge) * -1); margin-right: calc(var(--hs-edge) * -1); }
  .ed-body blockquote { font-size: 18px; padding-left: 18px; }
}

/* Round 2026-11-20h (Stanley). Story titles in two lines at most: a wider measure, a little smaller (touch-up). */
@media (min-width: 768px) {
  .ed-ph__text > div { max-width: 1120px; }
  .ed-ph h1 { font-size: clamp(34px, 3.4vw, 50px); max-width: 36ch; }
  .ed-ph--side .ed-ph h1, .ed-ph--side h1 { max-width: 28ch; }
}
/* Stories hub, "Read the articles": a bigger, longer button so it isn't missed (touch-up, button size) */
.ed-more-cta--big .hs-pill { min-width: min(420px, 100%); justify-content: center; padding: 20px 40px; font-size: 17px; }

/* Stories filter on phone (user, 2026-11-21): one select box replaces the sideways tabs and their arrows. Touch-up
   detail of the existing filter, drawn with the DS v3 form field (1px ink line, pill radius as the site's pills). */
.ed-select { display: none; }
@media (max-width: 767px) {
  .ed-tabs, .ed-tabs + .sl-ctl { display: none !important; }
  .ed-select { display: grid; gap: 8px; margin: 0 var(--hs-edge) 28px; }
  .ed-select .hs-meta { color: var(--ink-3); }
  .ed-select select { appearance: none; -webkit-appearance: none; width: 100%; height: 48px; padding: 0 44px 0 20px; border: 1px solid var(--ink); border-radius: 999px;
    background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 18px center / 16px;
    font: 500 14px/1 "Montserrat", sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
  .ed-select select:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
}
