/* moving-timeline.html — page-only composition. Components come from ../system.css.
   The planner (hero aside), the seven-milestone plan with a scroll-drawn rail, and the next-steps band. */

/* ---------- hero: planner card ---------- */
.mt-hero .page-hero-grid { align-items: center; }
.mt-hero .page-hero-note { margin-top: 28px; }
.planner { padding: clamp(22px, 2.2vw, 30px); }
.planner form { gap: 18px; }
.planner-title { font-size: var(--t-h4); font-weight: 500; letter-spacing: -.02em; color: #fff; }
.planner-fields { display: grid; gap: 16px; }
.planner .input[type="date"] { color-scheme: dark; font-variant-numeric: tabular-nums; }
.planner .input[type="date"]::-webkit-calendar-picker-indicator { opacity: .75; cursor: pointer; }
.planner .input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.planner .form-error { margin-top: -6px; }
.planner-status { min-height: 3em; font-size: var(--t-small); line-height: 1.5; color: var(--d-text) !important; }
.planner-noscript { font-size: var(--t-small); }
.planner-noscript a { color: var(--mint); }

/* the nine-week ruler: where today sits against the plan (decorative; the status line carries the words) */
.ruler { padding: 20px 6px 0; border-top: 1px solid var(--d-line); }
.ruler-track { position: relative; height: 24px; container-type: inline-size; }
.ruler-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--d-line-2); }
.ruler-fill { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: linear-gradient(90deg, var(--pine-bright), var(--mint)); transform-origin: 0 50%; transform: scaleX(0); transition: transform .8s var(--ease-out); }
.ruler-tick { position: absolute; top: 50%; left: calc(var(--x) * 1%); width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--c1); box-shadow: inset 0 0 0 1.5px var(--mint); transition: background-color .4s; }
.ruler-tick.is-past { background: var(--mint); }
.ruler-tick.is-move { width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; background: var(--brass-hi); box-shadow: 0 0 0 4px rgba(226, 182, 97, .2); }
.ruler-today { position: absolute; left: 0; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--mint-hi); box-shadow: 0 0 14px rgba(184, 240, 226, .75); opacity: 0; transform: translateX(calc(var(--p, 0) * 1cqw)); transition: transform .8s var(--ease-out), opacity .3s; }
.ruler-today.is-on { opacity: 1; }
.ruler-scale { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: var(--t-micro); color: var(--d-faint); }
.ruler-legend { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--d-line); }
.sw-today { width: 2px; height: 12px; border-radius: 2px; background: var(--mint-hi); }
.sw-move { border-radius: 50%; background: var(--brass-hi); }
.sw-step { border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--mint); }

/* ---------- the plan ---------- */
.plan-grid { align-items: start; }
.plan-photo { position: relative; margin: 0; border-radius: var(--r-panel); overflow: hidden; aspect-ratio: 16 / 10; background: var(--soft); }
.plan-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 32% 50%; }
.plan-card { margin-top: 12px; padding: clamp(20px, 2vw, 26px); }
.plan-facts { display: grid; }
.plan-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: var(--t-small); }
.plan-facts > div:first-child { border-top: 0; padding-top: 0; }
.plan-facts dt { color: var(--l-muted); flex: none; }
.plan-facts dd { color: var(--l-text); font-weight: 500; text-align: right; }
.plan-progress { margin-top: 16px; }
.plan-meter { display: block; height: 4px; border-radius: 4px; background: rgba(15, 42, 36, .1); overflow: hidden; }
.plan-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--pine-bright), var(--pine)); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-out); }
.plan-count-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.plan-count { font-size: var(--t-small); color: var(--l-muted); font-variant-numeric: tabular-nums; }
.plan-clear { min-height: 36px; padding: 0 2px; border: 0; background: none; font-size: 14px; font-weight: 500; color: var(--pine); cursor: pointer; }
.plan-clear:hover { color: var(--pine-deep); text-decoration: underline; }
.plan-clear[disabled] { color: var(--l-faint); opacity: .7; cursor: default; text-decoration: none; }
.plan-count b { font-weight: 600; color: var(--l-text); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.plan-card .fine { margin-top: 14px; font-size: 14px; }

.plan-main { min-width: 0; }
.plan-note { max-width: 62ch; margin: 0 0 8px; padding-left: 48px; font-size: var(--t-small); color: var(--l-muted); }
.plan-note a { color: var(--pine); font-weight: 500; }
.plan-note a:hover { color: var(--pine-deep); }
.plan-note strong { color: var(--l-text); font-weight: 500; }

.mtl-wrap { position: relative; }
.mtl-rail { position: absolute; left: 7px; top: 44px; bottom: 56px; width: 1px; background: var(--line); }
.mtl-fill { position: absolute; inset: 0; background: linear-gradient(180deg, var(--pine-bright), var(--mint)); transform-origin: 50% 0; }
.mtl { list-style: none; margin: 0; padding: 0; }
.mtl:focus-visible { outline-offset: 10px; }
.mstep { position: relative; z-index: 0; display: grid; grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr); gap: 12px 32px; padding: 34px 0 34px 48px; }
.mstep + .mstep::after { content: ""; position: absolute; left: 48px; right: 0; top: 0; height: 1px; background: var(--line); }
.mwhen { position: relative; padding-top: 6px; }
.mnode { position: absolute; left: -48px; top: 11px; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--pine-bright); }
.mnode::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--pine-bright); transition: transform .45s var(--ease-out), opacity .3s; }
.mtl-wrap.is-scrubbing .mstep:not(.is-lit) .mnode::before { transform: scale(.4); opacity: 0; }
.mrel { font-size: var(--t-h4); font-weight: 500; letter-spacing: -.02em; line-height: 1.25; color: var(--l-text); }
.mdate { margin-top: 6px; font-size: var(--t-small); line-height: 1.4; color: var(--l-muted); font-variant-numeric: tabular-nums; }
.mdate time:empty::before { content: "No date yet"; color: var(--l-faint); }
.mcatch { margin-top: 12px; }
.mbody { min-width: 0; }
.mbody h3 { font-size: var(--t-h3); font-weight: 300; letter-spacing: -.035em; line-height: 1.1; text-wrap: balance; }

/* tasks the visitor ticks off */
.mtasks { list-style: none; margin: 16px 0 0; padding: 0; }
.mtask { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; align-items: start; padding: 9px 0; font-size: var(--t-text); line-height: 1.5; color: var(--l-muted); cursor: pointer; transition: color var(--dur-fast); }
.mtask:hover { color: var(--l-text); }
.mtask input { position: absolute; left: 0; top: 10px; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.mbox { position: relative; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 1.5px #7D8D86; transition: box-shadow var(--dur-fast); }
.mtask:hover .mbox { box-shadow: inset 0 0 0 1.5px var(--pine-bright); }
.mbox::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--pine); transform: scale(.4); opacity: 0; transition: transform .4s var(--ease-out), opacity .25s; }
.mbox::after { content: ""; position: absolute; left: 6px; top: 6.5px; width: 10px; height: 5.5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(.6); opacity: 0; transition: transform .4s var(--ease-out), opacity .25s; }
.mtask input:checked + .mbox::before { transform: scale(1); opacity: 1; }
.mtask input:checked + .mbox::after { transform: rotate(-45deg) scale(1); opacity: 1; }
.mtask input:focus-visible + .mbox { outline: 2px solid var(--focus); outline-offset: 3px; }
.mtask input:checked ~ span:last-child { color: var(--l-text); }

/* moving day: the anchor of the plan, set dark */
.mstep.is-move { padding: 42px 28px 42px 72px; }
.mstep.is-move::before { content: ""; position: absolute; z-index: -1; inset: 8px 0 8px 32px; border-radius: var(--r-panel); background: linear-gradient(180deg, var(--c2), #08160F); box-shadow: 0 30px 60px -36px rgba(5, 15, 12, .7); }
.mstep.is-move::after, .mstep.is-move + .mstep::after { display: none; }
.is-move .mnode { left: -72px; background: var(--brass-hi); box-shadow: 0 0 0 5px rgba(176, 129, 47, .2); }
.is-move .mnode::before { display: none; }
.is-move .mrel { color: var(--brass-hi); }
.is-move .mdate { color: var(--d-muted); }
.is-move .mdate time:empty::before { color: var(--d-faint); }
.is-move .mbody h3 { color: #fff; }
.is-move .mtask { color: var(--d-muted); }
.is-move .mtask:hover, .is-move .mtask input:checked ~ span:last-child { color: var(--d-text); }
.is-move .mbox { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1.5px var(--d-line-2); }
.is-move .mtask:hover .mbox { box-shadow: inset 0 0 0 1.5px var(--mint); }
.is-move .mbox::before { background: var(--mint); }
.is-move .mbox::after { border-color: var(--c0); }
.is-move .mcatch { color: var(--brass-hi); background: rgba(226, 182, 97, .14); box-shadow: inset 0 0 0 1px rgba(226, 182, 97, .35); }

/* steps whose suggested date has passed */
.mstep.is-past .mnode { box-shadow: inset 0 0 0 1.5px var(--brass); }
.mstep.is-past .mnode::before { background: var(--brass); }
.mstep.is-past:not(.is-move) .mrel { color: var(--l-muted); }

/* today: a marked line between the steps already behind you and the next one */
.mtoday { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: -10px 0 14px -48px; font-size: var(--t-small); font-weight: 500; color: var(--pine); font-variant-numeric: tabular-nums; }
.mtoday::before { content: ""; width: 15px; height: 15px; flex: none; border-radius: 50%; background: var(--pine-bright); box-shadow: 0 0 0 5px rgba(20, 135, 111, .16); }
.mtoday::after { content: ""; flex: 1 1 40px; height: 1px; background: linear-gradient(90deg, var(--pine-bright), transparent); }
.is-move .mtoday { margin-left: -72px; color: var(--mint); }
.mtoday-end { margin: 18px 0 0; }

/* ---------- next steps ---------- */
.next-section { isolation: isolate; overflow: clip; border-top: 1px solid var(--d-line); }
.next-grid { align-items: center; }
.next-photo { position: relative; margin: 0; border-radius: var(--r-panel); overflow: hidden; aspect-ratio: 4 / 5; background: var(--c2); }
.next-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 74% 40%; }
.next-photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); pointer-events: none; }
.next-copy h2 { max-width: 12ch; }
.next-copy .link-rows { margin-top: clamp(32px, 4vw, 48px); }

/* ---------- responsive ---------- */
@media (pointer: coarse) { .plan-clear { min-height: 44px; } }
@media (max-width: 1000px) {
  .plan-aside { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px; align-items: stretch; }
  .plan-photo { aspect-ratio: auto; min-height: 100%; }
  .plan-card { margin-top: 0; }
  .next-photo { aspect-ratio: 16 / 10; }
  .next-photo img { object-position: 70% 40%; }
}
@media (max-width: 760px) {
  .plan-aside { grid-template-columns: minmax(0, 1fr); }
  .plan-photo { aspect-ratio: 16 / 10; min-height: 0; }
  .plan-note { padding-left: 0; }
  .mtl-rail { top: 36px; }
  .mstep { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 28px 0 28px 36px; }
  .mstep + .mstep::after { left: 36px; }
  .mnode { left: -36px; }
  .mtoday { margin-left: -36px; }
  .mtoday-end { margin-left: 0; }
  .mbody h3 { margin-top: 8px; font-size: 24px; }
  .mstep.is-move { padding: 36px 20px 36px 56px; }
  .mstep.is-move::before { left: 24px; }
  .is-move .mnode, .is-move .mtoday { margin-left: 0; left: -56px; }
  .is-move .mtoday { margin-left: -56px; }
}

/* ---------- print: the plan, not the chrome ---------- */
@media print {
  .page-hero .backdrop, .page-hero-aside, .page-hero-note, .breadcrumb, .plan-aside, .plan-note a, .next-section, .footer, .skip-link, .mtl-rail { display: none !important; }
  .page-hero { padding: 0 0 8px; }
  .page-hero-grid { margin-top: 0; display: block; }
  .page-hero h1, .page-hero .lede { color: #000 !important; }
  .page-hero h1 .wi { transform: none !important; }
  .section { padding: 8px 0; }
  .split-head, .plan-grid { display: block; }
  .split-head p { margin-top: 8px; color: #000 !important; }
  [data-reveal], [data-reveal] > * { opacity: 1 !important; transform: none !important; }
  .plan-note { padding-left: 0; color: #000; }
  .mstep { break-inside: avoid; padding: 12px 0; grid-template-columns: 11rem 1fr; }
  .mstep.is-move { padding: 12px 0; }
  .mstep.is-move::before, .mstep + .mstep::after, .mnode, .mtoday { display: none !important; }
  .mstep *, .is-move * { color: #000 !important; }
  .mbody h3 { font-size: 18px; }
  .mtask { padding: 2px 0; font-size: 12px; }
  .mbox { box-shadow: inset 0 0 0 1px #000 !important; background: #fff !important; width: 14px; height: 14px; border-radius: 3px; }
  .mbox::after { left: 3.5px; top: 3.5px; width: 7px; height: 4px; border-color: #000; }
  .mbox::before { display: none; }
  .mtask { grid-template-columns: 14px 1fr; gap: 8px; }
}
