/* How it works (/how-it-works), direction B. Loaded by how-it-works.html only.
   Holds: the photo hero's scrim, breadcrumb and buttons; the "who" facts row; the four-stop spine
   (big times down a ruled line, a dot on each stop); the cream four-week band with the annotated
   strip (weekly dose marks, the care-team line, the check-in, the loop back, the legend); and the
   change list's link. Everything else comes from css/b.css and css/site.css. */

/* ── Hero: a bright sunset sky, so the scrim works harder than the shared one ── */
.hw-hero > img { object-position: 60% 8%; }
.hw-hero::after {
  background: linear-gradient(180deg, rgba(20, 18, 16, .5) 0%, rgba(20, 18, 16, .12) 28%, rgba(20, 18, 16, .3) 55%, rgba(20, 18, 16, .8) 100%),
    linear-gradient(90deg, rgba(20, 18, 16, .55) 0%, rgba(20, 18, 16, .1) 62%); }
.ph .breadcrumb { color: rgba(255, 255, 255, .86); margin-bottom: 22px; }
.ph .breadcrumb a { color: #fff; padding: 12px 0; margin: -12px 0; border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.ph .breadcrumb a:hover { border-bottom-color: rgba(255, 255, 255, .7); }
.ph .breadcrumb a:focus-visible { outline-color: #fff; }
.hw-hero-side { display: grid; gap: 26px; }
.hw-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hw-hero-cta a { gap: 10px; min-height: 52px; }
.hw-hero :focus-visible { outline-color: #fff; }
@media (max-width: 767px) {
  .hw-hero > img { object-position: 42% 6%; } /* her face sits right of the stacked copy on a phone */
  .hw-hero::after { background: linear-gradient(180deg, rgba(20, 18, 16, .55) 0%, rgba(20, 18, 16, .25) 30%, rgba(20, 18, 16, .55) 58%, rgba(20, 18, 16, .85) 100%); }
}

/* ── Section heads: the title left, the lede bottom-aligned on the right ── */
.hw-split { display: grid; gap: 0 64px; }
@media (min-width: 900px) {
  .hw-split { grid-template-columns: 1fr 1fr; align-items: end; }
  .hw-split .b-lede { margin-top: 0; }
  .hw-split > .b-lede, .hw-split > div { padding-bottom: 8px; }
}

/* ── Who's on the other side ── */
.hw-who { padding-top: clamp(72px, 8vw, 112px); }
.hw-split-link { margin-top: 6px; }
@media (min-width: 900px) {
  .hw-who-facts { grid-template-columns: repeat(4, 1fr); column-gap: 32px; }
  .hw-who-facts div { border-bottom: 0; padding-top: 22px; }
}

/* ── The path: four stops down one ruled line ── */
.hw-stops { list-style: none; margin: 56px 0 0; padding: 0; }
.hw-stop { position: relative; display: grid; gap: 16px; padding: 34px 0 48px; border-top: 1px solid rgba(22, 26, 34, .22); }
.hw-stop:first-child { border-top-color: var(--ink); }
.hw-stop::before { content: ""; position: absolute; left: 0; top: -5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink); }
.hw-when { font-size: clamp(44px, 5.4vw, 80px); line-height: 1; letter-spacing: -0.035em; color: var(--ember-dark); max-width: 9ch; }
.hw-stop-title { font-size: 21px; font-weight: 600; line-height: 1.3; }
.hw-stop-body > p { margin-top: 10px; color: #3E4148; max-width: 54ch; }
.hw-facts { margin: 26px 0 0; border-top: 1px solid var(--ink); max-width: 640px; }
.hw-facts div { display: grid; gap: 2px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.hw-facts dt { font-size: 14px; font-weight: 600; color: var(--stone); }
.hw-facts dd { margin: 0; font-size: 16.5px; line-height: 1.55; }
@media (min-width: 640px) { .hw-facts div { grid-template-columns: 140px 1fr; gap: 20px; } .hw-facts dt { padding-top: 2px; } }
@media (min-width: 1024px) {
  .hw-stop { grid-template-columns: 5fr 7fr; column-gap: clamp(56px, 7vw, 112px); padding: 46px 0 72px; }
  .hw-when { position: sticky; top: calc(var(--hdr) + 32px); align-self: start; }
  .hw-stop-body { padding-top: 6px; }
}

/* ── What four weeks looks like: the annotated strip on cream ── */
.hw-cycle { margin-top: clamp(64px, 8vw, 112px); background: var(--cream); padding: clamp(72px, 9vw, 128px) 0; }
.hw-strip { margin: 60px 0 0; }
.hw-weeks { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.hw-wk { font-size: 14px; font-weight: 600; color: var(--stone); }
.hw-days { position: relative; margin-top: 12px; height: 38px; display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--ink); }
.hw-days::before { /* the care-team line: a message away on any day */
  content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 1px dashed rgba(154, 84, 36, .7); }
.hw-days i { position: relative; }
.hw-days i::after { /* a tick for every day */
  content: ""; position: absolute; left: 0; bottom: 0; width: 1px; height: 11px; background: rgba(22, 26, 34, .32); }
.hw-days i.is-dose::before { /* the weekly dose */
  content: ""; position: absolute; left: -5px; bottom: -5px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); z-index: 1; }
.hw-check { position: absolute; right: -7px; bottom: -7px; width: 15px; height: 15px; border-radius: 50%; background: var(--ember); }
.hw-weeks h3 { margin-top: 24px; font-size: clamp(25px, 2.2vw, 30px); line-height: 1.12; letter-spacing: -0.02em; }
.hw-weeks li > p:last-child { margin-top: 8px; color: #4A4E56; font-size: 16px; line-height: 1.6; max-width: 34ch; }
.hw-loop { margin-top: 40px; display: flex; align-items: center; gap: 12px; }
.hw-loop::before { /* a return arrow on phones */ display: none;
  content: ""; flex: none; width: 22px; height: 22px; border: 1.5px solid var(--ink); border-left-color: transparent; border-radius: 50%; }
.hw-loop p { font-family: Newsreader, Georgia, serif; font-weight: 300; font-size: clamp(22px, 2vw, 27px); line-height: 1.25; letter-spacing: -0.015em; }
.hw-legend { list-style: none; margin: 34px 0 0; padding: 22px 0 0; border-top: 1px solid rgba(22, 26, 34, .14);
  display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 16px; color: #4A4E56; }
.hw-legend li { display: inline-flex; align-items: center; gap: 10px; }
.hw-key { flex: none; display: inline-block; }
.hw-key-dose { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); }
.hw-key-msg { width: 26px; border-top: 1px dashed rgba(154, 84, 36, .9); }
.hw-key-check { width: 11px; height: 11px; border-radius: 50%; background: var(--ember); }
@media (min-width: 900px) {
  /* one continuous strip: the weeks sit edge to edge so the line, ticks and dashes run unbroken */
  .hw-weeks { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .hw-weeks li { padding-right: 32px; }
  .hw-weeks li:last-child { padding-right: 0; }
  .hw-weeks li .hw-days { margin-right: -32px; }
  .hw-weeks li:last-child .hw-days { margin-right: 0; }
  .hw-wk { padding-left: 2px; }
  /* the loop: from the end of week 4 back under the weeks to the start of week 1 */
  .hw-loop { position: relative; display: block; height: 44px; margin-top: 36px; border: 1px solid var(--ink); border-top: 0; border-radius: 0 0 24px 24px; }
  .hw-loop::before { display: block; position: absolute; left: -5px; top: 0; width: 9px; height: 9px; border: 0; border-radius: 0;
    border-left: 1px solid var(--ink); border-top: 1px solid var(--ink); transform: rotate(45deg); transform-origin: center; }
  .hw-loop p { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); background: var(--cream); padding: 0 22px; white-space: nowrap; }
  .hw-legend { margin-top: 56px; }
}

/* ── Change course, or stop ── */
.hw-change-more { margin-top: 18px; }
/* The hero photo's subject sits right of center, so all the copy stacks on the left */
@media (min-width: 1024px) {
  .hw-hero .ph-inner { grid-template-columns: minmax(0, 620px); row-gap: 26px; }
  .hw-hero > img { object-position: 60% 8%; }
}
