/* Before it hurts (S07). The day runs straight down the page; each hour is a drawn scene with its load layer.
   Only the measurement moves: load lines, readings and the pen draw once. */

@media (min-width: 1024px) {
  .bih-head .page-head__words { max-width: 760px; }
  .bih-head .page-head__aside { width: 420px; }
}

/* ---------- Your day: seven scenes. ---------- */
.bih-day { padding: 0 var(--pad) 96px; background: var(--color-surface); }
.bih-scene { display: flex; gap: 48px; padding: 56px 0; border-top: 1px solid var(--color-border); }
.bih-scene--small { padding: 40px 0; }
.bih-scene:last-child { border-bottom: 1px solid var(--color-border); }

.bih-time { width: 176px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; padding-left: 20px; border-left: 2px solid var(--color-foreground); font-size: var(--text-body); font-weight: 400; }
.bih-time__clock { font-family: var(--font-mono); font-size: 44px; line-height: 46px; font-weight: 500; letter-spacing: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* The drawing, its load layer and the pen share one box, so the line never drifts. */
.bih-fig { position: relative; width: 420px; flex-shrink: 0; align-self: flex-start; }
.bih-fig__box { width: 100%; aspect-ratio: 1 / 1; background: #FFFFFF; container-type: inline-size; }
.bih-fig__box > img:first-child { width: 100%; height: 100%; }
.bih-fig--small { width: 220px; height: 220px; background: #FFFFFF; }
.bih-fig--small img { width: 100%; height: 100%; }
.bih-fig__meta { position: absolute; inset: 0; pointer-events: none; }
.bih-reading {
  position: absolute; padding: 0 4px; background: #FFFFFF;
  font-family: var(--font-mono); font-size: var(--text-body); line-height: 24px; font-weight: 500; white-space: nowrap;
  color: var(--color-primary); font-variant-numeric: tabular-nums;
}
.bih-fig__example { position: absolute; right: 12px; bottom: 12px; background: #FFFFFF; border: 1px solid var(--color-border); }
.bih-pen-words {
  position: absolute; left: 72.857%; top: 7.143%; white-space: nowrap;
  font-size: max(17px, calc(22 * 100cqw / 420)); line-height: 1.182;
}

.bih-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding-top: 6px; }
.bih-words__group { display: flex; flex-direction: column; gap: 6px; }
.bih-words__two { padding-top: 16px; border-top: 1px solid var(--color-foreground); }
.bih-words--pair { flex-direction: row; gap: 40px; }
.bih-words--pair > .bih-words__group { flex: 1; min-width: 0; }

/* 1024 to 1279: drawings scale to the column. */
@media (max-width: 1279px) {
  .bih-scene { gap: 32px; }
  .bih-time { width: 160px; }
  .bih-fig { width: min(420px, 36vw); }
  .bih-fig--small { width: 220px; }
  .bih-words--pair { flex-direction: column; gap: 20px; }
  .bih-words--pair > .bih-words__group { flex: none; }
}

/* 768 to 1023: the hour sits above its scene; drawings at 420. */
@media (max-width: 1023px) {
  .bih-day { padding-bottom: 64px; }
  .bih-scene { flex-wrap: wrap; gap: 24px 32px; padding: 40px 0; }
  .bih-scene--small { padding: 32px 0; }
  .bih-time { width: 100%; flex-direction: row; align-items: baseline; gap: 16px; padding-left: 16px; }
  .bih-fig { width: 420px; }
  .bih-fig--small { width: 220px; }
  .bih-words { flex: 1 1 280px; padding-top: 0; }
}

/* Below 768: one column, as the S95 phone. Drawings fill the column; the reading sits under its drawing. */
@media (max-width: 767px) {
  .bih-day { padding: 0 var(--gutter) 48px; }
  .bih-scene { flex-direction: column; flex-wrap: nowrap; gap: 10px; padding: 18px 0 28px; border-top-color: var(--color-foreground); }
  .bih-scene:last-child { border-bottom: 0; }
  .bih-time { flex-direction: row; align-items: baseline; gap: 14px; padding-left: 0; border-left: 0; }
  .bih-time__clock { font-size: 22px; line-height: 28px; font-weight: 400; }
  .bih-fig { width: 100%; }
  .bih-fig__meta { position: static; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; }
  .bih-reading { position: static; padding: 0; background: none; line-height: 22px; }
  .bih-fig__example { position: static; height: 24px; padding: 0 9px; font-size: 12px; background: var(--color-background); border: 0; margin-left: auto; }
  .bih-pen { display: none; }
  .bih-pen-words { left: 65.92%; top: 41.9%; font-size: 20px; line-height: 22px; }
  .bih-words { flex: none; gap: 10px; }
  .bih-words__group { gap: 4px; }
  .bih-words__two { margin-top: 4px; padding: 12px 14px; border-top: 0; border-radius: 12px; background: var(--color-background); }
  .bih-words__two .t-strong { font-weight: 400; }

  /* The short hours: a small drawing beside its words. */
  .bih-scene--small { display: grid; grid-template-columns: 110px 1fr; column-gap: 14px; row-gap: 6px; align-items: start; padding: 18px 0; border-top-color: var(--color-border); }
  .bih-scene--small:last-child { border-bottom: 1px solid var(--color-border); }
  .bih-scene--small .bih-time { grid-column: 2; grid-row: 1; gap: 10px; }
  .bih-scene--small .bih-time__clock { font-size: 17px; line-height: 22px; }
  .bih-scene--small .bih-fig--small { grid-column: 1; grid-row: 1 / span 2; width: 110px; height: 110px; }
  .bih-scene--small .bih-words { grid-column: 2; grid-row: 2; gap: 6px; }
  .bih-scene--small .bih-words__routine .t-strong { font-weight: 400; color: var(--color-muted-foreground); }
  .bih-words__k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Thirty years, two ways. ---------- */
.bih-decades { display: flex; flex-direction: column; gap: 56px; padding-top: 96px; }
.bih-decades .sec-head__words { max-width: 760px; }
.bih-decades .sec-head__aside { width: 420px; }
.bih-chart__wide { position: relative; }
.bih-chart__wide svg { width: 100%; height: auto; }
.bih-chart__wide .t-label { position: absolute; white-space: nowrap; }
.bih-chart__x { top: 92.5%; }
.bih-chart__phone, .bih-chart__key { display: none; }
.bih-chart__note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

@media (max-width: 1279px) {
  .bih-decades .sec-head__aside { width: 380px; }
}
@media (max-width: 1023px) {
  .bih-decades { gap: 32px; padding-top: 72px; }
  .bih-decades .sec-head__aside { width: auto; }
  .bih-chart__wide .bih-chart__in { display: none; }
  .bih-chart__wide .bih-chart__x { top: auto; bottom: -6px; }
  .bih-chart__key { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; }
  .bih-chart__key li { display: flex; align-items: center; gap: 10px; }
  .bih-key { width: 20px; height: 2px; flex-shrink: 0; }
  .bih-key--b { background: var(--color-primary); }
  .bih-key--a { background: var(--dark-muted); }
  .bih-key--keep { height: 10px; background: var(--color-sage); opacity: 0.6; }
  .bih-key--pain { width: 20px; height: 8px; background: radial-gradient(circle, transparent 2.2px, var(--color-foreground) 2.5px, var(--color-foreground) 3.9px, transparent 4.2px); }
}
@media (max-width: 767px) {
  .bih-decades { gap: 12px; padding-top: 48px; }
  .bih-chart { padding-top: 12px; }
  .bih-chart__wide { display: none; }
  .bih-chart__phone { display: block; }
  .bih-chart__phone svg { width: 100%; height: auto; }
  .bih-chart__axis { display: flex; justify-content: space-between; padding: 12px 0 0; }
  .bih-chart__key { padding-top: 20px; }
  .bih-chart__note { padding-top: 12px; }
}

/* ---------- A movement check: the button waits on decision 05. ---------- */
.bih-check { display: flex; justify-content: space-between; gap: 64px; padding-top: 96px; }
.bih-check__words { width: 640px; flex-shrink: 1; display: flex; flex-direction: column; gap: 16px; }
.bih-check__label { display: flex; align-items: center; gap: 12px; }
.bih-check .t-title { letter-spacing: var(--tracking-display); }
.bih-check__act { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 34px; }
.bih-check__wait { display: flex; flex-direction: column; gap: 10px; }
.bih-check__btn { background: var(--color-background); color: #A3A3A3; cursor: default; }
.bih-check__btn:active { transform: none; }
.bih-check__ask { margin-top: 8px; background: transparent; color: var(--color-foreground); }
@media (max-width: 1023px) {
  .bih-check { flex-direction: column; gap: 24px; padding-top: 72px; }
  .bih-check__words { width: auto; max-width: 640px; }
  .bih-check__act { width: 100%; max-width: 420px; padding-top: 0; }
}
@media (max-width: 767px) {
  .bih-check { gap: 12px; padding-top: 48px; }
  .bih-check__words { gap: 12px; }
  .bih-check__label { justify-content: space-between; }
  .bih-check__act { max-width: none; gap: 12px; padding-top: 8px; }
  .bih-check__btn { background: #E4E4E4; color: #9E9E9E; }
  .bih-check__ask { margin-top: 0; height: 44px; font-size: 15px; line-height: 18px; text-decoration: underline 1px; text-underline-position: from-font; }
}

/* ---------- The close: WORTH A CHECK WHILE NOTHING HURTS, white out of blue. ---------- */
.bih-close .bih-close__ribbon { right: calc(var(--pad) + 116px); width: 44.69px; height: 395.83px; }
@media (max-width: 1279px) { .bih-close .bih-close__ribbon { right: var(--pad); } }
@media (max-width: 1023px) { .bih-close .bih-close__ribbon { width: 35.75px; height: 316.66px; } }
@media (max-width: 767px) { .bih-close .bih-close__ribbon { right: 22px; width: 26.81px; height: 237.5px; } }
@media (min-width: 1024px) { .bih-decades .t-section { text-wrap: wrap; } }
