/* /learn-recovery-timeline: its own sheet, loaded after site.css.
   One idea runs the page: the year after treatment, drawn to scale. The hero
   lays it out as a ruler with five stretches, the phases section walks down
   the same ruler, and the smaller drawings (52 weeks, 14 days) use the same
   cells. Nothing here draws a result: there is no vertical axis anywhere.
   Script: scripts/learn-recovery-timeline.js. With that script absent every
   part is visible, every fold is open and every link still jumps. */

html:has(body.rt-page) {
  --hc-nav-h: 64px;            /* fallback; the script sets the real header height */
  --hc-bar-h: 52px;
  /* every jump, anchor and Tab stop lands below the header and the bar */
  scroll-padding-top: calc(var(--hc-nav-h) + var(--hc-bar-h) + 12px);
}
.rt-page {
  --rt-ease: cubic-bezier(.16, 1, .3, 1);
  --rt-gut: clamp(20px, 4vw, 56px);
  --rt-empty: rgba(11, 29, 58, .13);   /* a week, a day or a stretch not being talked about */
  --rt-run: 2400ms;                    /* the hero's year, start to end */
}

/* ============ GROUND RULES ============ */
/* a part sliding in from the side must not widen the page */
.rt-page main { overflow-x: clip; }
.rt-nb { white-space: nowrap; }
.rt-wrap { max-width: calc(1240px + 2 * var(--rt-gut)); margin-inline: auto; padding-inline: var(--rt-gut); }
/* text fills its column; the column sets the measure */
.rt-page main p { max-width: none; margin: 0; }
.rt-page main a:not(.btn) { border-bottom: 0; }
.rt-page main :is(ol, ul, dl, dd, figure) { margin: 0; padding: 0; list-style: none; }
.rt-page main h2 {
  font-family: var(--font-display); font-weight: 300; color: var(--ink);
  font-size: clamp(1.85rem, 3.1vw, 2.8rem); line-height: 1.12; letter-spacing: -.01em;
  margin: 0; max-width: none; text-wrap: wrap;
}
.rt-page main h3 { font-family: var(--font-display); font-weight: 400; color: var(--ink); margin: 0; max-width: none; text-wrap: wrap; }
.rt-page main :is(a, summary):focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; border-radius: 4px; }
.rt-page :is(.rt-flags, .rt-line) :is(a, summary):focus-visible { outline-color: var(--accent-ice); }
/* a part that receives focus after a jump is not itself a control */
.rt-page main :is(h1, h2, h3, section)[tabindex="-1"]:focus { outline: none; }

/* a term the glossary defines */
.rt-term { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--accent-blue); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color 200ms, text-decoration-color 200ms; }
.rt-term:hover { color: var(--accent-blue-hover); text-decoration-style: solid; }
/* a link in running text */
.rt-link { color: var(--accent-blue-hover); text-decoration: underline; text-decoration-color: rgba(45, 110, 177, .45); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color 200ms, text-decoration-color 200ms; }
.rt-link:hover { color: var(--accent-blue); text-decoration-color: currentColor; }
/* the onward link: the arrow leans the way it points */
.rt-go { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; font-weight: 600; color: var(--accent-blue-hover); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; transition: color 200ms, text-decoration-color 200ms; }
.rt-go span { display: inline-block; transition: transform 360ms var(--rt-ease); }
.rt-go:hover { color: var(--accent-blue); text-decoration-color: currentColor; }
.rt-go:hover span { transform: translateX(6px); }
.rt-go[href^="#"]:hover span { transform: translateY(4px) rotate(90deg); }
.rt-next__up .rt-go:hover span { transform: translateX(-6px); }

/* ============ REVEALS ============
   Hidden only once the script has said it is running (rt-js on <html>), so
   with no script nothing is ever hidden. Each part comes in its own way;
   the drawings keep their box and animate what is inside it. */
.rt-js [data-r] { transition: opacity 620ms ease, transform 820ms var(--rt-ease); }
.rt-js [data-r]:not(.is-in) { opacity: 0; transform: translateY(18px); }
.rt-js [data-r="left"]:not(.is-in) { transform: translateX(-32px); }
.rt-js [data-r="right"]:not(.is-in) { transform: translateX(32px); }
.rt-js :is([data-r="weeks"], [data-r="days"], [data-r="dots"], [data-r="vary"], [data-r="line"]):not(.is-in) { opacity: 1; transform: none; }
.rt-js .rt-limits__list li:nth-child(2) { transition-delay: 90ms; }
.rt-js .rt-limits__list li:nth-child(3) { transition-delay: 180ms; }
.rt-js .rt-limits__list li:nth-child(4) { transition-delay: 270ms; }

/* translate, not transform: the labels and checks are already placed with a transform */
@keyframes rt-up { from { opacity: 0; translate: 0 22px; } }
@keyframes rt-rise { from { opacity: 0; translate: 0 10px; } }
@keyframes rt-fill-x { from { transform: scaleX(0); } }
@keyframes rt-fill-y { from { transform: scaleY(0); } }
@keyframes rt-run-x { from { transform: translateX(-100%); } }
@keyframes rt-run-y { from { transform: translateY(-100%); } }
@keyframes rt-runner { 0% { opacity: 0; } 6%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rt-tick { from { opacity: 0; transform: scaleY(.2); } }
@keyframes rt-mark { from { background-color: var(--rt-empty); } }
@keyframes rt-pop { from { transform: scale(0); opacity: 0; } 70% { transform: scale(1.18); opacity: 1; } }
@keyframes rt-hand-iv { to { transform: rotate(480deg); } }
@keyframes rt-hand-inj { to { transform: rotate(400deg); } }
@keyframes rt-drop { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(15px); opacity: 0; } }
@keyframes rt-sore { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes rt-unfold { from { opacity: 0; transform: translateY(-6px); } }

/* ============ HERO ============ */
.rt-hero { padding-block: clamp(28px, 4vw, 56px) clamp(48px, 6vw, 88px); }
.rt-hero__h1 { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.1rem, 4.1vw, 3.7rem); line-height: 1.06; letter-spacing: -.015em; color: var(--ink); margin: 0 0 clamp(24px, 3.4vw, 44px); max-width: none; text-wrap: wrap; }
/* a heading that has to wrap breaks where the styling changes */
.rt-hero__h1 > .h-lead, .rt-hero__h1 > em { display: inline-block; }
.rt-hero__h1 > em { color: var(--accent-blue); }
.rt-hero__row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.rt-hero__answer { font-size: clamp(1.12rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--ink); }
.rt-hero__side { border-left: 2px solid var(--accent-blue); padding-left: clamp(16px, 2vw, 24px); }
.rt-hero__side p { font-size: 17px; line-height: 1.55; color: var(--ink-soft); margin-bottom: 4px !important; }

/* the year, to scale: five stretches left to right, the checks hung under it */
.rt-year { position: relative; margin: clamp(40px, 5vw, 68px) 44px 0 0 !important; }
.rt-year__phases { position: relative; height: 136px; }
.rt-year__phases li { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 1%); width: calc((var(--b) - var(--a)) * 1%); }
.rt-year__phases li::after { content: ""; position: absolute; left: 0; right: 3px; bottom: 0; height: 18px; border-radius: 3px; background: var(--accent-blue); transform-origin: left; }
.rt-year__phases li:nth-child(even)::after { background: var(--ink); }
/* each stretch is a link to its phase: the whole column above it takes the tap */
.rt-year__phases a { position: absolute; inset: 0; z-index: 1; color: inherit; border-radius: 4px; }
.rt-page .rt-year__phases a:focus-visible { outline-offset: 5px; }
.rt-year__phases li::after { transition: filter 260ms, translate 360ms var(--rt-ease); }
.rt-year__phases li:has(a:hover)::after { filter: brightness(1.35); translate: 0 -3px; }
.rt-year__lab b { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color 200ms, color 200ms; }
.rt-year__phases a:hover .rt-year__lab b { color: var(--accent-blue-hover); text-decoration-color: currentColor; }
.rt-year__lab { position: absolute; left: 0; bottom: 30px; white-space: nowrap; font-size: 15px; line-height: 1.35; color: var(--ink-muted); }
.rt-year__lab b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
/* week one is a sliver at this scale, so its name stands on a stem above the rest */
.rt-year__phases li:first-child .rt-year__lab { bottom: 86px; }
.rt-year__phases li:first-child::before { content: ""; position: absolute; left: 0; bottom: 22px; width: 1.5px; height: 58px; background: var(--border-strong); transform-origin: bottom; }
/* twelve months under the ruler, and the year running on past its end */
.rt-year__phases::before { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 6px; border-right: 1.5px solid var(--border-strong); background: repeating-linear-gradient(90deg, var(--border-strong) 0 1.5px, transparent 1.5px calc(100% / 12)); }
.rt-year__phases::after { content: ""; position: absolute; left: 100%; bottom: 8px; width: 38px; border-top: 2px dashed var(--accent-blue); }
.rt-year__run { position: absolute; left: 0; right: 0; top: 127px; height: 0; pointer-events: none; }
.rt-year__run i { position: absolute; right: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3.5px solid var(--accent-blue); box-shadow: 0 0 0 3px #fff; opacity: 0; }
.rt-year__checks { position: relative; height: 62px; margin-top: 12px !important; }
.rt-year__checks li { position: absolute; top: 0; left: calc(var(--at) * 1%); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 12px; font-size: 14px; line-height: 1.3; color: var(--ink-muted); white-space: nowrap; }
.rt-year__checks li::before { content: ""; position: absolute; top: 0; left: 50%; width: 1.5px; height: 9px; margin-left: -.75px; background: var(--ink-muted); }
.rt-year__checks li:last-child { transform: translateX(-100%); align-items: flex-end; margin-left: 11px; }
.rt-year__checks li:last-child::before { left: auto; right: 10px; }
.rt-year__checks svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rt-year__checks svg path:last-child { stroke: var(--accent-blue); }

/* first paint: the heading, the answer, then one pass along the year at an
   even pace, each stretch filling for exactly as long as it lasts */
.rt-js .rt-hero__h1 > * { animation: rt-up 900ms var(--rt-ease) both; }
.rt-js .rt-hero__h1 > em { animation-delay: 110ms; }
.rt-js .rt-hero__row > * { animation: rt-up 900ms var(--rt-ease) 240ms both; }
.rt-js .rt-hero__row > :last-child { animation-delay: 360ms; }
.rt-js .rt-year__phases::before, .rt-js .rt-year__phases::after { animation: rt-rise 600ms ease 400ms both; }
.rt-js .rt-year__phases::after { animation-delay: calc(700ms + var(--rt-run)); }
.rt-js .rt-year__phases li::after { animation: rt-fill-x calc((var(--b) - var(--a)) / 100 * var(--rt-run)) linear calc(700ms + var(--a) / 100 * var(--rt-run)) both; }
.rt-js .rt-year__lab { animation: rt-rise 600ms var(--rt-ease) calc(700ms + var(--a) / 100 * var(--rt-run)) both; }
.rt-js .rt-year__phases li:first-child::before { animation: rt-fill-y 400ms ease 700ms both; }
.rt-js .rt-year__run { animation: rt-run-x var(--rt-run) linear 700ms both; }
.rt-js .rt-year__run i { animation: rt-runner calc(var(--rt-run) + 500ms) linear 700ms both; }
.rt-js .rt-year__checks li { animation: rt-rise 600ms var(--rt-ease) calc(700ms + var(--at) / 100 * var(--rt-run)) both; }

/* ============ CONTENTS BAR (follows the reader) ============ */
.rt-page .hc-bar {
  /* under the phone menu's sheet (55) and backdrop (50), over the page */
  position: fixed; left: 0; right: 0; top: var(--hc-nav-h); z-index: 49;
  height: var(--hc-bar-h);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity 260ms, transform 360ms var(--rt-ease), visibility 0s 360ms;
}
.rt-page .hc-bar.is-on { transform: none; opacity: 1; visibility: visible; transition: opacity 260ms, transform 360ms var(--rt-ease); }
body.rt-page.nav-open .hc-bar { opacity: 0; visibility: hidden; }
.rt-page .hc-bar__track {
  max-width: calc(1240px + 2 * var(--rt-gut)); margin: 0 auto; padding: 0 var(--rt-gut);
  height: 100%; display: flex; align-items: stretch; gap: clamp(18px, 2.4vw, 32px);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 28px;
}
.rt-page .hc-bar__track::-webkit-scrollbar { display: none; }
.rt-page .hc-bar__track a {
  position: relative; flex: none; display: flex; align-items: center;
  font-size: 14px; font-weight: 500; color: var(--ink-muted); white-space: nowrap;
  transition: color 200ms;
}
.rt-page .hc-bar__track a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent-blue); transform: scaleX(0); transform-origin: left;
  transition: transform 360ms var(--rt-ease);
}
.rt-page .hc-bar__track a:hover, .rt-page .hc-bar__track a[aria-current] { color: var(--ink); }
.rt-page .hc-bar__track a:hover::after { transform: scaleX(.35); }
.rt-page .hc-bar__track a[aria-current]::after { transform: scaleX(1); }
.rt-page .hc-bar__track a:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: -4px; border-radius: 4px; }
.rt-page .hc-bar__progress {
  position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: var(--accent-ice); transform-origin: left; transform: scaleX(var(--hc-p, 0));
}
/* the track can overflow on a phone: its edges fade where there is more */
.rt-page .hc-bar::before, .rt-page .hc-bar::after { content: ""; position: absolute; top: 2px; bottom: 0; width: 28px; pointer-events: none; opacity: 0; transition: opacity 200ms; z-index: 1; }
.rt-page .hc-bar::before { left: 0; background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); }
.rt-page .hc-bar::after { right: 0; background: linear-gradient(270deg, #fff, rgba(255, 255, 255, 0)); }
.rt-page .hc-bar.has-left::before, .rt-page .hc-bar.has-right::after { opacity: 1; }

/* ============ FOLDS (native details) ============
   Open in the markup, so they are open without the script, on a desktop and
   in print. On a phone the script closes the ones a reader can skip. */
.rt-fold > summary { display: none; list-style: none; }
.rt-fold > summary::-webkit-details-marker { display: none; }
.rt-fold__less, .rt-fold[open] > summary .rt-fold__more { display: none; }
.rt-fold[open] > summary .rt-fold__less { display: inline; }
.rt-chev { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 300ms var(--rt-ease); }
.rt-fold[open] > summary .rt-chev { transform: rotate(180deg); }

/* ============ HOW LONG IT TAKES ============ */
.rt-when { padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--border); }
.rt-page .rt-when h2 { margin-bottom: clamp(24px, 3.4vw, 48px); }
.rt-when__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.rt-when__text p { font-size: 18px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 18px !important; }
.rt-when__text p:last-child { margin-bottom: 0 !important; }
/* 8 to 16 of 52 weeks, at the size they are */
.rt-window { position: sticky; top: calc(var(--hc-nav-h) + var(--hc-bar-h) + 40px); }
.rt-window__n { font-family: var(--font-display); font-weight: 300; font-size: clamp(4rem, 8vw, 7rem); line-height: .95; letter-spacing: -.03em; color: var(--ink); }
.rt-window__n span { font-size: .32em; letter-spacing: 0; color: var(--ink-muted); }
.rt-window figcaption { margin: 14px 0 26px; font-size: 18px; line-height: 1.5; color: var(--ink-soft); }
.rt-window figcaption em { color: var(--accent-blue-hover); }
.rt-window__strip { display: grid; grid-template-columns: repeat(52, minmax(0, 1fr)); gap: 2px; height: 56px; }
.rt-window__strip i { border-radius: 2px; background: var(--rt-empty); transform-origin: bottom; }
.rt-window__strip i:nth-child(n+8):nth-child(-n+16) { background: var(--accent-blue); }
.rt-window__ends { display: flex; justify-content: space-between; margin-top: 8px !important; font-size: 14px; color: var(--ink-muted); }
.rt-js [data-r="weeks"]:not(.is-in) :is(.rt-window__n, figcaption, .rt-window__ends) { opacity: 0; }
.rt-js [data-r="weeks"] :is(.rt-window__n, figcaption, .rt-window__ends) { transition: opacity 600ms ease; }
.rt-js [data-r="weeks"]:not(.is-in) .rt-window__strip i { opacity: 0; }
.rt-js [data-r="weeks"].is-in .rt-window__strip i { animation: rt-tick 320ms var(--rt-ease) calc(var(--n, 0) * 14ms) both; }
.rt-js [data-r="weeks"].is-in .rt-window__strip i:nth-child(n+8):nth-child(-n+16) { animation: rt-tick 320ms var(--rt-ease) calc(var(--n, 0) * 14ms) both, rt-mark 420ms ease calc(820ms + (var(--n, 0) - 7) * 70ms) both; }

.rt-shape { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 88px); align-items: start; margin-top: clamp(40px, 5vw, 72px); padding-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--border); }
.rt-shape__say { font-family: var(--font-display); font-size: clamp(1.45rem, 2.2vw, 1.95rem); line-height: 1.3; color: var(--ink); }
.rt-shape__say em { color: var(--accent-blue); }
.rt-shape__why p { font-size: 18px; line-height: 1.7; color: var(--ink-soft); }

/* ============ TWO ROUTES, TWO CLOCKS ============ */
.rt-routes { padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--border); }
.rt-page .rt-routes h2 { margin-bottom: clamp(24px, 3.4vw, 48px); }
.rt-routes__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.rt-routes__text p, .rt-after > p { font-size: 18px; line-height: 1.7; color: var(--ink-soft); }
.rt-routes__text .rt-fold { margin-top: 18px; }
.rt-routes strong, .rt-when strong, .rt-phases strong { color: var(--ink); font-weight: 600; }
.rt-clocks__svg { display: block; width: 100%; height: auto; overflow: visible; }
.rt-clocks__svg :is(path, rect, circle) { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rt-clocks__svg .rt-clocks__split { stroke: var(--border-strong); stroke-dasharray: 2 8; }
.rt-clocks__svg .rt-clocks__thin { stroke: var(--border-strong); stroke-width: 1.4; }
.rt-clocks__svg .rt-clocks__face { fill: #fff; }
.rt-clocks__svg .rt-clocks__pin { fill: var(--ink); stroke: none; }
.rt-clocks__svg .rt-clocks__hand { stroke: var(--accent-blue); stroke-width: 2.4; }
.rt-clocks__svg .rt-clocks__hand--iv { transform-origin: 182px 118px; transform: rotate(120deg); }
.rt-clocks__svg .rt-clocks__hand--inj { transform-origin: 442px 118px; transform: rotate(40deg); }
.rt-clocks__svg .rt-clocks__drop { fill: var(--accent-blue); stroke: none; }
.rt-clocks__svg .rt-clocks__syr path { stroke-width: .5; }
.rt-clocks__svg .rt-clocks__sore { stroke: var(--accent-blue); stroke-width: 1.4; transform-box: fill-box; transform-origin: center; }
.rt-clocks__svg .rt-clocks__sore--2 { opacity: .45; }
/* while it is on screen: the bag drips, the site is sore, and one clock runs slower than the other */
.rt-clocks.is-live .rt-clocks__hand--iv { animation: rt-hand-iv 6s linear infinite; }
.rt-clocks.is-live .rt-clocks__hand--inj { animation: rt-hand-inj 15s linear infinite; }
.rt-clocks.is-live .rt-clocks__drop { animation: rt-drop 1.5s ease-in infinite; }
.rt-clocks.is-live .rt-clocks__sore { animation: rt-sore 2.6s ease-out infinite; }
.rt-clocks.is-live .rt-clocks__sore--2 { animation-delay: -1.3s; }
.rt-clocks__key { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin-top: 18px; }
.rt-clocks__key span { font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.rt-clocks__key b { display: block; font-weight: 600; color: var(--ink); }
.rt-clocks__key .rt-clocks__both { grid-column: 1 / -1; text-align: center; padding-top: 12px; border-top: 1px solid var(--border); }
.rt-clocks__key .rt-clocks__both b { display: inline; margin-right: 6px; }

.rt-after { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 88px); align-items: center; margin-top: clamp(40px, 5vw, 72px); padding-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--border); }
/* fourteen days: how long each site keeps you careful */
.rt-days { display: grid; gap: 22px; }
.rt-days__lane p { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 8px !important; }
.rt-days__lane p span { font-weight: 400; color: var(--ink-muted); }
.rt-days__row { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; height: 26px; }
.rt-days__row i { border-radius: 3px; background: var(--rt-empty); }
.rt-days__row i.is-on { background: var(--ink); }
.rt-days__row i.is-maybe { background: repeating-linear-gradient(135deg, var(--ink) 0 2.5px, rgba(11, 29, 58, .2) 2.5px 5.5px); }
.rt-js [data-r="days"]:not(.is-in) .rt-days__row i { opacity: 0; }
.rt-js [data-r="days"].is-in .rt-days__row i { animation: rt-pop 420ms var(--rt-ease) calc(var(--n, 0) * 55ms) both; }
.rt-js [data-r="days"]:not(.is-in) p { opacity: 0; }
.rt-js [data-r="days"] p { transition: opacity 500ms ease; }

/* ============ THE FIVE PHASES ============ */
.rt-phases { padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--border); }
.rt-phases__head { margin-bottom: clamp(20px, 3vw, 36px); }
.rt-phases__head p { margin-top: 16px !important; font-size: 18px; line-height: 1.65; color: var(--ink-soft); }
.rt-phases__grid { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
/* the same year, stood on end: it stays beside the reader and says where they are in it */
.rt-rail { position: sticky; top: calc(var(--hc-nav-h) + var(--hc-bar-h) + 44px); height: min(58vh, 480px); margin-top: 44px; }
.rt-rail__track { position: absolute; left: 0; top: 0; bottom: 0; width: 12px; }
.rt-rail__track i { position: absolute; left: 0; right: 0; top: calc(var(--a) * 1%); height: calc((var(--b) - var(--a)) * 1% - 3px); min-height: 5px; border-radius: 3px; background: var(--rt-empty); transition: background-color 420ms ease; }
.rt-rail__track i.is-on { background: var(--accent-blue); }
.rt-rail__dot { position: absolute; left: -5px; top: calc(var(--m, 1) * 1%); width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: #fff; border: 4px solid var(--accent-blue); box-shadow: 0 2px 8px rgba(11, 29, 58, .18); transition: top 700ms var(--rt-ease); }
.rt-rail__ticks { position: absolute; left: 28px; top: 0; bottom: 0; }
.rt-rail__ticks li { position: absolute; top: calc(var(--at) * 1%); transform: translateY(-50%); font-size: 14px; color: var(--ink-muted); white-space: nowrap; }
.rt-rail__ticks li:first-child { transform: none; }
.rt-rail__ticks li:last-child { transform: translateY(-100%); }

.rt-ph { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); column-gap: clamp(24px, 4vw, 72px); align-items: start; padding-block: clamp(28px, 3.4vw, 44px); border-top: 1px solid var(--border); }
.rt-ph:last-child { padding-bottom: 0; }
.rt-ph__when { grid-column: 1; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 15px; color: var(--ink-muted); margin-bottom: 12px !important; }
.rt-ph__when b { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 2.4vw, 2.2rem); line-height: 1.1; color: var(--ink); transition: color 420ms ease; }
.rt-ph.is-here .rt-ph__when b { color: var(--accent-blue); }
.rt-ph__strip { display: none; }
.rt-page .rt-ph h3 { grid-column: 2; font-size: clamp(1.3rem, 1.7vw, 1.5rem); line-height: 1.28; margin-bottom: 14px; }
.rt-ph .rt-fold { grid-column: 2; }
.rt-ph .rt-fold p { font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.rt-ph .rt-fold p + p { margin-top: 16px !important; padding: 16px 0 0 18px; border-left: 0; position: relative; }
/* what to do: set off from what you feel */
.rt-ph .rt-fold p + p::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 6px; width: 2px; background: var(--accent-blue); }

/* ============ WEEK BY WEEK ============ (the page's one tinted band) */
.rt-weeks { background: var(--accent-wash); padding-block: clamp(48px, 6vw, 96px); }
.rt-weeks__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.rt-weeks__text p { margin-top: 20px !important; font-size: 18px; line-height: 1.7; color: var(--ink-soft); }
.rt-matrix { min-width: 0; }
.rt-matrix table { width: 100%; border-collapse: collapse; }
.rt-matrix caption { caption-side: top; text-align: left; font-size: 15px; color: var(--ink-muted); padding-bottom: 14px; }
.rt-matrix thead th { font-size: 14px; font-weight: 600; color: var(--ink); text-align: center; padding: 0 4px 12px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.rt-matrix thead th:first-child { text-align: left; }
.rt-matrix tbody th { text-align: left; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; line-height: 1.3; color: var(--ink); padding: 16px 12px 16px 0; width: 36%; }
.rt-matrix tbody td { text-align: center; padding: 16px 4px; }
.rt-matrix tbody tr + tr :is(th, td) { border-top: 1px solid var(--border-strong); }
/* open (none) to filled (significant): the fill grows, so it reads without colour */
.rt-dot { display: inline-block; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--accent-blue); vertical-align: middle; }
.rt-dot--none { border-color: rgba(11, 29, 58, .34); }
.rt-dot--low { background: radial-gradient(circle, var(--accent-blue) 0 30%, transparent 33%); }
.rt-dot--med { background: radial-gradient(circle, var(--accent-blue) 0 52%, transparent 55%); }
.rt-dot--high { background: var(--accent-blue); }
.rt-matrix__key { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 18px !important; font-size: 14px; color: var(--ink-muted); }
.rt-matrix__key .rt-dot { width: 16px; height: 16px; }
/* the weeks arrive left to right, the way they pass */
.rt-js [data-r="dots"]:not(.is-in) tbody .rt-dot { transform: scale(0); opacity: 0; }
.rt-js [data-r="dots"] tbody .rt-dot { transition: transform 460ms var(--rt-ease) calc(var(--c) * 120ms + 120ms), opacity 300ms ease calc(var(--c) * 120ms + 120ms); }

/* ============ WHEN TO CALL ============ (navy) */
.rt-flags { background: var(--ink); color: #fff; padding-block: clamp(56px, 7vw, 104px); }
.rt-page .rt-flags h2 { color: #fff; }
.rt-flags__head p { margin-top: 18px !important; font-size: 18px; line-height: 1.7; color: rgba(255, 255, 255, .82); }
.rt-page .rt-flags .rt-flags__h3 { color: var(--accent-ice); font-size: clamp(1.3rem, 1.8vw, 1.6rem); margin: clamp(32px, 4vw, 56px) 0 clamp(16px, 2vw, 24px); }
.rt-flags__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 3.4vw, 56px); }
/* the icon sits inside the <dt> (a dl's group may hold only dt and dd) and is set out to its left */
.rt-flag { position: relative; min-height: 109px; padding: 26px 0 26px 74px; border-top: 1px solid rgba(255, 255, 255, .18); }
.rt-flag__icon { position: absolute; left: 0; top: 26px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--accent-ice); }
.rt-flag__icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rt-flag dt { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25; color: #fff; margin-bottom: 6px; }
.rt-flag dd { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .8); }
.rt-js .rt-flag__icon path { stroke-dasharray: 1; transition: stroke-dashoffset 1100ms var(--rt-ease) 260ms; }
.rt-js .rt-flag:not(.is-in) .rt-flag__icon path { stroke-dashoffset: 1; }
.rt-js .rt-flag:nth-child(3n+2) { transition-delay: 100ms; }
.rt-js .rt-flag:nth-child(3n) { transition-delay: 200ms; }

/* ============ WHAT THIS TIMELINE IS NOT ============ */
.rt-limits { padding-block: clamp(48px, 6vw, 96px); }
.rt-limits__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.rt-limits__head { position: sticky; top: calc(var(--hc-nav-h) + var(--hc-bar-h) + 40px); }
/* the same five stretches for three people: they do not fall in the same weeks */
.rt-vary { display: grid; gap: 18px; margin-top: clamp(24px, 3vw, 40px) !important; }
.rt-vary__row { display: flex; gap: 3px; height: 16px; }
.rt-vary__row i { flex: 1 1 0; min-width: 4px; border-radius: 3px; background: var(--accent-blue); transition: flex-grow 1100ms var(--rt-ease) 200ms; }
.rt-vary__row i:nth-child(even) { background: var(--ink); }
.rt-vary__row i:nth-child(1) { flex-grow: var(--p1); }
.rt-vary__row i:nth-child(2) { flex-grow: var(--p2); }
.rt-vary__row i:nth-child(3) { flex-grow: var(--p3); }
.rt-vary__row i:nth-child(4) { flex-grow: var(--p4); }
.rt-vary__row i:nth-child(5) { flex-grow: var(--p5); }
.rt-js .rt-vary:not(.is-in) .rt-vary__row { --p1: 1.9 !important; --p2: 14.8 !important; --p3: 16.6 !important; --p4: 41.7 !important; --p5: 25 !important; }
.rt-limits__list li { padding-block: 24px; border-top: 1px solid var(--border); font-size: 18px; line-height: 1.7; color: var(--ink-soft); }
.rt-limits__list li:first-child { border-top: 0; padding-top: 0; }
.rt-limits__list strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.25; color: var(--ink); margin-bottom: 6px; }

/* ============ THE BOTTOM LINE ============ (navy) */
.rt-line { background: var(--ink); color: #fff; padding-block: clamp(56px, 7vw, 104px); }
.rt-line__bar { position: relative; height: 10px; margin-bottom: clamp(24px, 3vw, 40px); }
.rt-line__bar i { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 1%); width: calc((var(--b) - var(--a)) * 1% - 3px); min-width: 4px; border-radius: 3px; background: var(--accent-ice); transform-origin: left; }
.rt-line__bar i:nth-child(even) { background: #fff; }
.rt-page .rt-line h2 { color: #fff; }
.rt-line h2 em { color: var(--accent-ice); }
.rt-line h2 > * { display: inline-block; }
.rt-line .rt-fold { margin-top: clamp(20px, 2.6vw, 32px); }
.rt-line .rt-fold > summary { color: var(--accent-ice); }
.rt-line p { font-size: 18px; line-height: 1.75; color: rgba(255, 255, 255, .84); column-count: 2; column-gap: clamp(32px, 5vw, 88px); }
/* the five words light in the order the year runs */
.rt-js [data-r="line"] :is(.rt-line__w, em) { transition: opacity 520ms ease; }
.rt-js [data-r="line"] .rt-line__bar i { transition: transform 520ms var(--rt-ease); }
.rt-js [data-r="line"]:not(.is-in) :is(.rt-line__w, em) { opacity: .28; }
.rt-js [data-r="line"]:not(.is-in) .rt-line__bar i { transform: scaleX(0); }
.rt-js [data-r="line"] :is(.rt-line__w, .rt-line__bar i):nth-child(2) { transition-delay: 260ms; }
.rt-js [data-r="line"] :is(.rt-line__w, .rt-line__bar i):nth-child(3) { transition-delay: 520ms; }
.rt-js [data-r="line"] :is(.rt-line__w, .rt-line__bar i):nth-child(4) { transition-delay: 780ms; }
.rt-js [data-r="line"] :is(.rt-line__w, .rt-line__bar i):nth-child(5) { transition-delay: 1040ms; }
.rt-js [data-r="line"] em { transition-delay: 1400ms; }

/* ============ READ ON ============ */
.rt-next { padding-block: clamp(48px, 6vw, 96px); }
.rt-page .rt-next h2 { margin-bottom: clamp(24px, 3.4vw, 44px); }
.rt-next__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto 1fr auto; gap: 0 clamp(16px, 2vw, 28px); }
.rt-card { position: relative; z-index: 0; grid-row: span 4; display: grid; grid-template-rows: subgrid; padding: clamp(22px, 2.4vw, 32px); transition: opacity 620ms ease, transform 520ms var(--rt-ease); }
@supports not (grid-template-rows: subgrid) { .rt-card { display: flex; flex-direction: column; } .rt-card p { flex: 1; } }
.rt-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 1px solid var(--border); border-radius: 8px; background: #fff; transition: border-color 260ms, box-shadow 420ms var(--rt-ease); }
.rt-js .rt-card:not(.is-in) { transition-delay: calc(var(--i) * 110ms); }
.rt-card:hover, .rt-card:focus-within { transform: translateY(-3px); }
.rt-card:hover::before, .rt-card:focus-within::before { border-color: var(--accent-blue); box-shadow: 0 18px 40px -26px rgba(11, 29, 58, .4); }
.rt-card__badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--ink); margin-bottom: 20px; color: var(--ink); transition: border-color 260ms, color 260ms; }
.rt-card__badge svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rt-card:hover .rt-card__badge { border-color: var(--accent-blue); color: var(--accent-blue); }
.rt-page .rt-card h3 { font-size: 1.5rem; line-height: 1.2; margin-bottom: 10px; }
.rt-card p { align-self: start; font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 14px !important; }
.rt-card a { align-self: end; justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--accent-blue-hover); }
.rt-card a span { transition: transform 360ms var(--rt-ease); }
.rt-card:hover a span { transform: translateX(6px); }
/* the whole card is the one link */
.rt-card a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.rt-card a:focus-visible { outline: none; }
.rt-card a:focus-visible::after { outline: 2px solid var(--accent-blue); outline-offset: 3px; }
.rt-next__up { display: flex; flex-wrap: wrap; gap: 4px 36px; margin-top: clamp(24px, 3vw, 40px); }

/* ============ NARROWER ============ */
@media (max-width: 1023px) {
  .rt-hero__row, .rt-when__grid, .rt-shape, .rt-routes__grid, .rt-after, .rt-weeks__grid, .rt-limits__grid { grid-template-columns: minmax(0, 1fr); }
  .rt-limits__head, .rt-window { position: static; }
  .rt-clocks { max-width: 560px; }
  .rt-flags__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-js .rt-flag:nth-child(n) { transition-delay: 0ms; }
  /* no room for the standing ruler: each phase carries its own stretch of the year */
  .rt-phases__grid { grid-template-columns: minmax(0, 1fr); }
  .rt-rail { display: none; }
  .rt-ph { grid-template-columns: minmax(0, 1fr); }
  .rt-ph__when { grid-row: auto; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
  .rt-ph__when b { font-size: 1.7rem; }
  .rt-page .rt-ph h3, .rt-ph .rt-fold { grid-column: 1; }
  .rt-page .rt-ph h3 { margin-bottom: 4px; }
  .rt-ph__strip { display: block; position: relative; height: 10px; margin-bottom: 16px; border-radius: 3px; background: var(--rt-empty); }
  .rt-ph__strip i { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 1%); width: calc((var(--b) - var(--a)) * 1%); min-width: 6px; border-radius: 3px; background: var(--accent-blue); }
  .rt-line p { column-count: 1; }
}
@media (max-width: 760px) {
  .rt-flags__grid, .rt-next__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .rt-next__grid { gap: 16px; }
  /* on a phone a card is a row: its mark on the left, the words beside it */
  .rt-card { grid-row: auto; display: grid; grid-template-rows: none; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; padding: 18px; }
  .rt-card__badge { grid-row: 1 / span 3; margin-bottom: 0; }
  .rt-card :is(h3, p, a) { grid-column: 2; }
  .rt-page .rt-card h3 { font-size: 1.3rem; margin-bottom: 6px; }
  .rt-card p { margin-bottom: 4px !important; }
  .rt-card a { align-self: start; }
  .rt-card:hover, .rt-card:focus-within { transform: none; }
  /* a phone reads the head of each part; the rest opens on a tap */
  .rt-fold > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--accent-blue-hover); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .rt-fold[open] > summary { margin-bottom: 4px; }
  .rt-fold[open] > p { animation: rt-unfold 360ms var(--rt-ease) both; }
  .rt-fold > summary:hover .rt-chev { transform: translateY(2px); }
  .rt-fold[open] > summary:hover .rt-chev { transform: rotate(180deg) translateY(2px); }
  .rt-when__text p, .rt-shape__why p, .rt-routes__text p, .rt-after > p, .rt-phases__head p, .rt-weeks__text p, .rt-flags__head p, .rt-limits__list li, .rt-line p { font-size: 17px; }
  .rt-matrix thead th span { display: block; }
  .rt-matrix thead th { vertical-align: bottom; padding-inline: 1px; }
  .rt-matrix thead th:first-child { vertical-align: bottom; }
  .rt-matrix tbody th { font-size: 1.02rem; width: 34%; padding-right: 6px; }
  .rt-matrix tbody td { padding-inline: 1px; }
  .rt-dot { width: 20px; height: 20px; }
  .rt-clocks__key { grid-template-columns: 1fr; }
  .rt-clocks__key .rt-clocks__both { text-align: left; }
  .rt-days__lane p { flex-direction: column; gap: 0; }
}
@media (max-width: 640px) {
  /* the year stands on end: still to scale, the checks on its left */
  .rt-year { display: grid; grid-template-columns: 116px minmax(0, 1fr); column-gap: 20px; height: 500px; margin: 72px 0 34px !important; }
  .rt-year__phases { grid-column: 2; grid-row: 1; height: 100%; }
  .rt-year__phases li { top: calc(var(--a) * 1%); bottom: auto; height: calc((var(--b) - var(--a)) * 1%); left: 0; right: 0; width: auto; }
  .rt-year__phases li::after { left: 0; right: auto; top: 0; bottom: 3px; width: 18px; height: auto; transform-origin: top; }
  .rt-year__lab { left: 32px; top: -2px; bottom: auto; white-space: normal; }
  .rt-year__phases li:first-child .rt-year__lab { left: 0; top: auto; bottom: calc(100% + 8px); white-space: nowrap; }
  .rt-year__phases li:first-child::before { display: none; }
  .rt-year__phases li:has(a:hover)::after { translate: -3px 0; }
  .rt-year__phases::before { left: -10px; right: auto; top: 0; bottom: 0; width: 6px; height: auto; border-right: 0; border-bottom: 1.5px solid var(--border-strong); background: repeating-linear-gradient(180deg, var(--border-strong) 0 1.5px, transparent 1.5px calc(100% / 12)); }
  .rt-year__phases::after { left: 8px; top: 100%; bottom: auto; width: 0; height: 30px; border-top: 0; border-left: 2px dashed var(--accent-blue); }
  .rt-year__run { left: 145px; right: auto; top: 0; bottom: 0; width: 0; height: auto; }
  .rt-year__run i { right: auto; left: -8px; top: auto; bottom: -8px; }
  .rt-year__checks { grid-column: 1; grid-row: 1; height: 100%; margin-top: 0 !important; }
  .rt-year__checks li { left: auto; right: 0; top: calc(var(--at) * 1%); transform: translateY(-50%); flex-direction: row-reverse; align-items: center; gap: 6px; padding: 0 12px 0 0; white-space: normal; text-align: right; }
  .rt-year__checks li::before { left: auto; right: 0; top: 50%; width: 8px; height: 1.5px; margin: 0; }
  .rt-year__checks li:last-child { transform: translateY(-100%); margin-left: 0; align-items: flex-end; }
  .rt-year__checks li:last-child::before { right: 0; top: auto; bottom: 0; }
  .rt-year__checks svg { flex: none; }
  .rt-js .rt-year__phases li::after { animation-name: rt-fill-y; }
  .rt-js .rt-year__run { animation-name: rt-run-y; }
  .rt-window__strip { gap: 1.5px; height: 48px; }
}

/* ============ QUIETER ============ */
@media (prefers-reduced-motion: reduce) {
  .rt-page main *, .rt-page main *::before, .rt-page main *::after, .rt-page .hc-bar, .rt-page .hc-bar * { animation: none !important; transition: none !important; }
}
@media print {
  .rt-page .hc-bar { display: none; }
  /* paper is captured at once: nothing may still be on its way in */
  .rt-page main *, .rt-page main *::before, .rt-page main *::after { animation: none !important; transition: none !important; }
  .rt-page [data-r] { opacity: 1 !important; transform: none !important; }
  .rt-js .rt-flag__icon path { stroke-dashoffset: 0 !important; }
  /* the drawings are made of filled boxes, which a printer drops unless told to keep them */
  :is(.rt-year__phases, .rt-year__phases li, .rt-window__strip i, .rt-days__row i, .rt-dot, .rt-vary__row i, .rt-line__bar i), :is(.rt-year__phases, .rt-year__phases li)::before, :is(.rt-year__phases, .rt-year__phases li)::after { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rt-line__bar i:nth-child(n) { background: var(--ink); }
  .rt-line__bar i:nth-child(odd) { background: var(--accent-blue); }
  .rt-rail, .rt-year__run { display: none; }
  .rt-phases__grid { grid-template-columns: minmax(0, 1fr); }
  .rt-flags, .rt-line { background: #fff; color: var(--ink); }
  /* the list a reader keeps by the phone: whole, on one sheet */
  .rt-flags { break-before: page; }
  .rt-flag, .rt-ph, .rt-limits__list li, .rt-matrix { break-inside: avoid; }
  .rt-flag__icon { border-color: var(--ink); }
  .rt-flag__icon svg { stroke: var(--ink); }
  .rt-fold > summary, .rt-next { display: none !important; }
  .rt-page :is(.rt-flags, .rt-line) :is(h2, h3, p, dt, dd) { color: var(--ink) !important; }
}
