/* Centurion build planner page: the planner as the opener (controls on the desk, the programme as a drawing sheet),
   what can move the dates, closing band. Square corners throughout (see _work/design-plan.md). */

/* ---------- Opener: the planner itself ---------- */
.plan { position: relative; background: var(--porph-deep); color: var(--lime); overflow: clip; padding-bottom: clamp(36px, 5vh, 64px); }
.plan__bg { position: absolute; inset: 0; overflow: hidden; }
.plan__bg img { position: absolute; inset: -4%; width: 108%; height: 108%; max-width: none; object-fit: cover; object-position: 50% 40%; opacity: .7; }
.plan__bg::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(34, 9, 15, .5) 0%, rgba(34, 9, 15, .66) 30%, rgba(34, 9, 15, .86) 62%, var(--porph-deep) 100%),
  linear-gradient(90deg, rgba(34, 9, 15, .72), rgba(34, 9, 15, .05) 75%); }
.plan .coursing { z-index: 0; }
.plan__in { position: relative; z-index: 1; padding-top: calc(var(--head-h) + 6px); }
.plan__head { display: grid; gap: 6px; margin-bottom: clamp(14px, 2vh, 22px); }
.plan__crumb { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 0; font-size: .9rem; color: var(--lime-dim); }
.plan__crumb a { display: inline-flex; align-items: center; color: var(--lime); text-decoration: underline; text-decoration-color: rgba(211, 165, 78, .7); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.plan__title { font-family: var(--f-display); font-size: clamp(2.1rem, min(3.5vw, 6.2vh), 3.4rem); line-height: 1.06; letter-spacing: -.01em; display: flow-root; }
.plan__intro { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 0; color: var(--lime-dim); }
.xflag { display: inline-block; flex: none; padding: 4px 10px; background: var(--stock); color: var(--soot); font-size: .875rem; font-weight: 700; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }

.plan__tool { display: grid; grid-template-columns: minmax(320px, 392px) minmax(0, 1fr); gap: clamp(16px, 1.6vw, 24px); align-items: stretch; }

/* Controls: on the dark desk */
.pl-ctl { position: relative; display: flex; flex-direction: column; padding: 18px 20px 20px; background: rgba(34, 9, 15, .8); border: 1px solid rgba(211, 165, 78, .34); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pl-ctl::before { content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 3px; background: var(--stock); }
.pl-ctl__fields { display: flex; flex: 1; flex-direction: column; justify-content: space-between; gap: clamp(10px, 1.7vh, 16px); min-width: 0; margin: 0; padding: 0; border: 0; }
.pl-ctl__fields[disabled] { opacity: .6; }
.pl-ctl__nojs { display: none; }
.no-js .pl-ctl__nojs { display: block; margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--stock); background: rgba(247, 245, 240, .06); font-size: .92rem; line-height: 1.45; color: var(--lime); }
.pl-grp { min-width: 0; margin: 0; padding: 0; border: 0; }
.pl-grp__lg { display: block; float: none; width: auto; margin: 0 0 7px; padding: 0; font-size: .875rem; font-weight: 600; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--stock); }
.pl-grp__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pl-grp__row .pl-grp__lg { margin: 0; }

.pl-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.pl-tiles--type { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pl-tile { position: relative; display: flex; min-width: 0; }
.pl-tile[hidden] { display: none; }
.pl-tile input, .pl-seg__opt input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pl-tile span { position: relative; display: flex; align-items: center; justify-content: center; flex: 1; min-height: 44px; padding: 6px 10px; border: 1.5px solid rgba(247, 245, 240, .26); color: var(--lime); font-size: .93rem; font-weight: 600; line-height: 1.2; text-align: center; overflow: hidden; isolation: isolate; transition: color .35s var(--ease), border-color .35s var(--ease); }
.pl-tile span::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--stock); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .45s var(--ease); }
.pl-tiles--opt .pl-tile span, .pl-tiles--route .pl-tile span { min-height: 50px; padding: 4px 6px; font-size: .875rem; }
.pl-tile:hover span { border-color: var(--stock); }
.pl-tile input:checked + span { color: var(--soot); border-color: var(--stock); }
.pl-tile input:checked + span::before { transform: scaleY(1); }
.pl-tile input:focus-visible + span, .pl-seg__opt input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; z-index: 2; }
.pl-hint { margin: 7px 0 0; font-size: .875rem; line-height: 1.4; color: var(--lime-dim); min-height: 2.8em; }

/* Size slider: square thumb, stock fill */
.pl-size__val { font-family: var(--f-display); font-size: 1.55rem; line-height: 1.1; color: var(--lime); }
.pl-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: -4px 0 -6px; background: transparent; cursor: pointer; --p: 50%; }
.pl-range:focus { outline: none; }
.pl-range::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg, var(--stock) var(--p), rgba(247, 245, 240, .22) var(--p)); }
.pl-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -9px; border: 3px solid var(--porph-deep); border-radius: 0; background: var(--stock); box-shadow: 0 0 0 1.5px var(--stock); transition: transform .3s var(--ease); }
.pl-range:active::-webkit-slider-thumb { transform: scale(1.18); }
.pl-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1.5px var(--stock), 0 0 0 5px rgba(247, 245, 240, .5); }
.pl-range::-moz-range-track { height: 4px; background: rgba(247, 245, 240, .22); border: 0; }
.pl-range::-moz-range-progress { height: 4px; background: var(--stock); }
.pl-range::-moz-range-thumb { width: 16px; height: 16px; border: 3px solid var(--porph-deep); border-radius: 0; background: var(--stock); box-shadow: 0 0 0 1.5px var(--stock); }
.pl-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1.5px var(--stock), 0 0 0 5px rgba(247, 245, 240, .5); }
.pl-range__ends { display: flex; justify-content: space-between; font-size: .875rem; color: var(--lime-dim); }

/* Party wall (segmented yes/no) and start month */
.pl-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: end; gap: 12px; }
.pl-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 46px; border: 1.5px solid rgba(247, 245, 240, .26); }
.pl-seg__opt { position: relative; z-index: 1; display: flex; min-width: 0; }
.pl-seg__opt span { display: flex; flex: 1; align-items: center; justify-content: center; padding: 0 4px; font-size: .88rem; font-weight: 600; line-height: 1.15; text-align: center; color: var(--lime); transition: color .4s var(--ease); }
.pl-seg__opt input:checked + span { color: var(--soot); }
.pl-seg__thumb { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; background: var(--stock); transition: transform .55s var(--ease); }
.pl-seg.is-yes .pl-seg__thumb, .pl-seg:has(input[value="1"]:checked) .pl-seg__thumb { transform: translateX(100%); }
.pl-select { display: block; width: 100%; height: 46px; padding: 0 48px 0 12px; border: 1.5px solid rgba(247, 245, 240, .26); border-radius: 0; -webkit-appearance: none; appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3.5 6.5l5.5 5.5 5.5-5.5' fill='none' stroke='%23D3A54E' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 18px center / 18px; color: var(--lime); font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer; transition: border-color .3s; }
.pl-select:hover { border-color: var(--stock); }
.pl-select:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.pl-select option { color: var(--soot); background: var(--lime); }
.pl-peek { display: none; }

/* The programme: a drawing sheet laid on the desk */
.pl-sheet { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 14px 22px 16px; color: var(--soot); background-color: var(--lime);
  background-image: linear-gradient(rgba(58, 19, 32, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(58, 19, 32, .04) 1px, transparent 1px); background-size: 24px 24px;
  box-shadow: 0 34px 70px rgba(8, 1, 4, .5); }
.pl-sheet::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(58, 19, 32, .2); pointer-events: none; }
.pl-sheet__reg { position: absolute; width: 18px; height: 18px; pointer-events: none; }
.pl-sheet__reg::before, .pl-sheet__reg::after { content: ""; position: absolute; background: var(--stock); }
.pl-sheet__reg::before { left: 8px; top: 0; width: 2px; height: 18px; }
.pl-sheet__reg::after { top: 8px; left: 0; width: 18px; height: 2px; }
.pl-sheet__reg--tl { left: -9px; top: -9px; } .pl-sheet__reg--tr { right: -9px; top: -9px; }
.pl-sheet__reg--bl { left: -9px; bottom: -9px; } .pl-sheet__reg--br { right: -9px; bottom: -9px; }
.pl-sheet__head { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 8px; }
.pl-sheet__title { font-family: var(--f-display); font-size: 1.65rem; line-height: 1.15; color: var(--porph); }
.pl-key { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .875rem; font-weight: 500; color: var(--soot-dim); }
.pl-key li { display: flex; align-items: center; gap: 8px; }
.pl-key__sw { display: block; width: 20px; height: 10px; }
.pl-key__sw--pre, .pl-row--pre .pl-bar, .pl-row__dot { background: repeating-linear-gradient(-45deg, var(--stock-deep) 0 2px, rgba(211, 165, 78, .6) 2px 5px); }
.pl-key__sw--site { background: var(--porph); }
.pl-key__sw--now { width: 2px; height: 14px; margin: 0 9px; background: var(--stock-deep); box-shadow: 0 0 0 3px rgba(211, 165, 78, .3); }

.pl-chart { --lab: 31%; --cg: 12px; position: relative; }
.pl-axis { position: relative; height: 22px; margin-left: calc(var(--lab) + var(--cg)); font-size: .875rem; font-weight: 600; color: var(--soot-dim); }
.pl-m { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; line-height: 1.4; }
.pl-rows { position: relative; }
.pl-plot { position: absolute; top: -4px; bottom: 0; left: calc(var(--lab) + var(--cg)); right: 0; pointer-events: none; z-index: 1; }
.pl-gl { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(58, 19, 32, .1); }
.pl-band { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(211, 165, 78, .14); }
.pl-go { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed var(--porph); }
.pl-go__tag { position: absolute; top: 4px; left: 6px; padding: 1px 6px; background: var(--porph); color: var(--lime); font-size: .875rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.pl-go.is-flip .pl-go__tag { left: auto; right: 6px; }
.pl-go.is-zero .pl-go__tag { opacity: 0; }
.pl-go__tag { transition: opacity .4s; }
.pl-m--start { transform: none; left: 0; color: var(--porph); }
.pl-now { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--stock-deep); box-shadow: 0 0 0 3px rgba(211, 165, 78, .22); will-change: transform; }
.pl-now::before { content: ""; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px; background: var(--stock-deep); transform: rotate(45deg); }
.pl-now__tag { position: absolute; top: 100%; left: 50%; margin-top: 3px; transform: translateX(-50%); padding: 0 5px; background: var(--stock); color: var(--soot); font-size: .875rem; font-weight: 700; line-height: 1.45; white-space: nowrap; }
.pl-row { position: relative; display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); column-gap: var(--cg); align-items: center; min-height: clamp(25px, 3.25vh, 30px); border-top: 1px solid rgba(58, 19, 32, .12); }
.pl-row:last-child { border-bottom: 1px solid rgba(58, 19, 32, .12); }
.pl-row--pre + .pl-row:not(.pl-row--pre) { border-top: 1.5px solid rgba(58, 19, 32, .4); }
.pl-row__lab { display: flex; align-items: center; min-width: 0; font-size: .88rem; font-weight: 500; line-height: 1.2; color: var(--soot-dim); }
.pl-row__n { flex: none; width: 34px; font-family: var(--f-display); font-weight: 400; font-size: .95rem; color: var(--stock-deep); }
.pl-row__dot { flex: none; width: 16px; height: 8px; margin-right: 18px; }
.pl-row__txt { display: block; min-width: 0; padding: 2px 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: color .35s, opacity .35s; }
.pl-row__track { position: relative; height: 13px; }
.pl-bar { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--porph) repeating-linear-gradient(90deg, transparent 0 11px, rgba(247, 245, 240, .16) 11px 12px); transition: background-color .35s; }
.pl-row:last-child .pl-bar::after { content: ""; position: absolute; right: -6px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; background: var(--stock); box-shadow: 0 0 0 2px var(--porph); transform: rotate(45deg); }
.pl-row__status { position: absolute; left: calc(var(--go, 0%) + 8px); top: 50%; transform: translateY(-50%); font-style: normal; font-size: .875rem; font-weight: 600; color: var(--soot-dim); opacity: 0; transition: opacity .4s; white-space: nowrap; }
.pl-row.is-zero .pl-row__status { opacity: 1; }
.pl-row.is-zero .pl-row__txt { opacity: .6; }
.pl-row.is-now .pl-row__txt, .pl-row.is-hot .pl-row__txt { color: var(--soot); }
.pl-row.is-now:not(.pl-row--pre) .pl-bar, .pl-row.is-hot:not(.pl-row--pre) .pl-bar { background: var(--stock); }
.pl-row.is-hot { background: rgba(211, 165, 78, .12); }
.pl-read { margin: 22px 0 0; padding-right: 200px; min-height: 1.5em; font-size: .9rem; line-height: 1.5; color: var(--soot-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-read b { color: var(--porph); font-weight: 600; }

/* Title block: the summary, like the box in the corner of a drawing */
.pl-block { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.6fr); margin-top: 12px; border: 1.5px solid var(--porph); background: rgba(247, 245, 240, .85); }
.pl-cell { position: relative; min-width: 0; padding: 9px 14px 10px; border-left: 1px solid rgba(58, 19, 32, .3); }
.pl-cell:first-child { border-left: 0; }
.pl-cell__k { display: block; margin: 0; font-size: .875rem; font-weight: 700; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; color: var(--stock-deep); }
.pl-cell__v { margin: 4px 0 1px; font-family: var(--f-display); font-size: clamp(1.7rem, 2.3vw, 2.15rem); line-height: 1.12; color: var(--porph); white-space: nowrap; }
.pl-cell__v small { font-family: var(--f-body); font-size: .9rem; font-weight: 600; color: var(--soot-dim); }
.pl-cell__v--month { overflow: clip; padding-bottom: .08em; }
.pl-swap { display: inline-block; }
.pl-cell__v--money { font-size: clamp(1.3rem, 1.62vw, 1.6rem); padding-top: .16em; }
.pl-cell__s { margin: 0; font-size: .875rem; line-height: 1.35; color: var(--soot-dim); }
.pl-cell--money { background: rgba(211, 165, 78, .2); }
.xflag--stamp { position: absolute; top: -25px; right: 6px; z-index: 2; padding: 2px 8px; font-size: .875rem; letter-spacing: .08em; box-shadow: 0 0 0 1.5px var(--porph-deep), 0 6px 14px rgba(34, 9, 15, .25); transform: rotate(-2deg); }
.pl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 12px; }
.pl-foot__note { flex: 1 1 300px; margin: 0; font-size: .92rem; line-height: 1.45; color: var(--soot-dim); }
.pl-foot__note strong { color: var(--porph); font-weight: 700; }
.pl-send { flex: none; }

/* Load: the controls rise, the sheet is laid in courses (JS plays it; reduced motion and no-JS never hide anything) */
@media (prefers-reduced-motion: no-preference) {
  .js .plan.is-live [data-pl-in] { opacity: 0; }
  .js .plan.is-live .pl-sheet { clip-path: inset(100% 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .pl-now, .pl-key li:last-child { display: none; }
}
.no-js .pl-now, .no-js .pl-key li:last-child { display: none; }
.pl-ctl input, .pl-ctl select { scroll-margin-bottom: 90px; }

/* ---------- What can move the dates ---------- */
.moves { padding: clamp(56px, 6.5vh, 92px) 0; overflow: clip; }
.moves .sec-head { gap: 14px; margin-bottom: clamp(26px, 3.6vh, 40px); }
.moves__grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(36px, 5vw, 84px); align-items: start; }
.moves__list { border-bottom: 1px solid rgba(211, 165, 78, .3); }
.mv { position: relative; border-top: 1px solid rgba(211, 165, 78, .3); }
.mv__h { margin: 0; }
.mv__btn { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 11px 34px 11px 0; background: none; border: 0; color: var(--lime); font-family: var(--f-display); font-size: clamp(1.3rem, 1.65vw, 1.6rem); line-height: 1.2; text-align: left; cursor: pointer; transition: color .35s; }
.mv__btn:hover, .mv.is-on .mv__btn { color: var(--stock); }
.mv__btn > span { flex: 1 1 auto; }
.mv__btn:focus-visible { outline-offset: -2px; }
.mv__mark { flex: none; width: 12px; height: 12px; border: 1.5px solid var(--stock); transition: background-color .4s, transform .6s var(--ease); }
.mv.is-on .mv__mark { background: var(--stock); transform: rotate(45deg); }
.mv__chev { position: absolute; right: 6px; top: 50%; margin-top: -4.5px; flex: none; width: 13px; height: 9px; color: var(--lime-dim); transition: transform .5s var(--ease); }
.mv.is-on .mv__chev { transform: rotate(180deg); }
.mv__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.mv.is-on .mv__panel, .no-js .mv__panel { grid-template-rows: 1fr; }
.mv__in { min-height: 0; overflow: hidden; }
.mv__in p { margin: 0 0 16px 28px; color: var(--lime-dim); font-size: 1.04rem; line-height: 1.6; }
.moves__try { margin: 24px 0 0; }
.moves__try .link-arrow { min-height: 44px; color: var(--stock); }
.mv__timer { position: absolute; left: 0; right: 0; top: -1px; height: 2px; pointer-events: none; }
.mv__timer b { display: block; height: 100%; background: var(--stock); transform: scaleX(0); transform-origin: 0 50%; }

.moves__pane { position: relative; padding: 0 0 84px 0; }
.moves__photo { height: min(48vh, 470px); margin-left: 6%; }
.moves__photo .frame__img { height: 100%; }
.moves__photo .frame__img img { position: absolute; top: -6%; left: 0; width: 100%; height: 112%; object-fit: cover; clip-path: inset(100% 0 0 0); }
.moves__photo .frame__img img:not(.is-on) { visibility: hidden; }
.moves__photo .frame__img img.is-on { clip-path: inset(0 0 0 0); animation: pl-breathe 10s ease-in-out infinite alternate; }
@keyframes pl-breathe { from { scale: 1.02; } to { scale: 1.09; } }
.no-js .moves__photo .frame__img img:not(.is-on) { display: none; }
.slip { position: absolute; left: 0; bottom: 0; z-index: 3; width: min(80%, 580px); padding: 16px 20px 28px; background: var(--lime); color: var(--soot); box-shadow: 0 26px 56px rgba(8, 1, 4, .55); }
.slip::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(58, 19, 32, .18); pointer-events: none; }
.slip__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 8px; }
.slip__title { margin: 0; font-family: var(--f-display); font-size: 1.3rem; line-height: 1.2; color: var(--porph); }
.slip__key { display: flex; align-items: center; gap: 7px; margin: 0; font-size: .875rem; font-weight: 600; color: var(--soot-dim); }
.slip__key i, .slip__add { background: repeating-linear-gradient(-45deg, var(--stock-deep) 0 2px, var(--stock) 2px 5px); }
.slip__key i { display: block; width: 18px; height: 9px; }
.slip__rows { --lab: 36%; position: relative; }
.slip__row { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); gap: 10px; align-items: center; min-height: 26px; border-top: 1px solid rgba(58, 19, 32, .1); }
.slip__lab { font-size: .875rem; font-weight: 500; line-height: 1.2; color: var(--soot-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slip__track { position: relative; height: 11px; }
.slip__bar { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--porph); }
.slip__add { position: absolute; top: -2px; bottom: -2px; left: 0; width: 0; }
.slip__plot { position: absolute; top: 0; bottom: 0; left: calc(var(--lab) + 10px); right: 0; pointer-events: none; }
.slip__plan, .slip__end { position: absolute; top: -4px; bottom: -4px; width: 0; }
.slip__plan { border-left: 1.5px dashed rgba(58, 19, 32, .55); }
.slip__end { border-left: 2px solid var(--stock-deep); }
.slip__plan span, .slip__end span { position: absolute; top: 100%; margin-top: 3px; font-style: normal; font-size: .875rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.slip__plan span { right: 5px; color: var(--soot-dim); }
.slip__end span { left: 5px; color: var(--stock-deep); }

/* ---------- Closing band: a year of weeks along its foot ---------- */
.pl-cta { padding-bottom: clamp(130px, 15vw, 210px); }
.pl-cta .cta-band__media::after { background: linear-gradient(90deg, rgba(34, 9, 15, .93), rgba(34, 9, 15, .78) 55%, rgba(34, 9, 15, .55)), linear-gradient(0deg, rgba(34, 9, 15, .7), rgba(34, 9, 15, 0) 30%); }
.pl-ruler { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 30px; overflow: clip; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(247, 245, 240, .55) 0 1px, transparent 1px calc(100% / 12)) 0 100% / 100% 18px no-repeat,
    repeating-linear-gradient(90deg, rgba(247, 245, 240, .28) 0 1px, transparent 1px calc(100% / 52)) 0 100% / 100% 9px no-repeat; }
.pl-ruler__fill { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--stock); transform-origin: 0 50%; }
.pl-ruler__mark { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; }
.pl-ruler__mark::before { content: ""; position: absolute; left: -6px; bottom: 9px; width: 12px; height: 12px; background: var(--stock); transform: rotate(45deg); }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1180px) {
  .plan__tool { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
  .pl-block { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pl-cell--money { grid-column: 1 / -1; border-left: 0; border-top: 1px solid rgba(58, 19, 32, .3); }
}
@media (max-width: 980px) {
  .plan__bg { bottom: auto; height: min(100svh, 820px); }
  .plan__bg img { object-position: 62% 50%; opacity: .8; }
  .plan__bg::after { background: linear-gradient(180deg, rgba(34, 9, 15, .55) 0%, rgba(34, 9, 15, .62) 40%, rgba(34, 9, 15, .9) 75%, var(--porph-deep) 100%); }
  .plan__tool { grid-template-columns: minmax(0, 1fr); }
  .pl-ctl { padding-bottom: 20px; }
  .pl-peek { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px; min-height: 64px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--porph); border-top: 2px solid var(--stock); color: var(--lime); font-weight: 600; font-size: .95rem; text-decoration: none; box-shadow: 0 -14px 30px rgba(8, 1, 4, .35); transform: translateY(110%); visibility: hidden; transition: transform .5s var(--ease), visibility 0s linear .5s; }
  .pl-peek.is-shown { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
  .no-js .pl-peek { display: none; }
  .pl-peek__run { position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: 0 50%; }
  .pl-peek__go { display: inline-flex; align-items: center; gap: 8px; color: var(--stock); font-size: .9rem; }
  .pl-peek__go svg { width: 10px; height: 15px; }
  .moves__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .moves__pane { order: -1; padding: 0; }
  .moves__photo { height: min(44vh, 360px); margin: 0 16px 0 0; }
  .slip { position: relative; width: auto; margin: -36px 0 0 16px; }
}
@media (max-width: 640px) {
  .plan__title { font-size: clamp(1.95rem, 8.4vw, 2.4rem); }
  .plan__intro { font-size: .98rem; }
  .pl-sheet { padding: 14px 14px 16px; }
  .pl-sheet__title { font-size: 1.45rem; }
  .pl-key { font-size: .875rem; gap: 4px 14px; }
  .pl-chart { --lab: 39%; --cg: 8px; }
  .pl-row { min-height: 32px; }
  .pl-row__lab { font-size: .875rem; }
  .pl-row__n { width: 26px; font-size: .875rem; }
  .pl-row__dot { width: 12px; margin-right: 14px; }
  .pl-row__txt { white-space: normal; text-overflow: clip; }
  .pl-row__status { font-size: .875rem; }
  .pl-axis { font-size: .875rem; }
  .pl-read { padding-right: 0; white-space: normal; font-size: .875rem; min-height: 3em; margin-bottom: 30px; }
  .xflag--stamp { top: -27px; }
  .pl-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-cell:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid rgba(58, 19, 32, .3); }
  .pl-cell__v { font-size: 1.7rem; }
  .pl-cell__v--money { font-size: 1.42rem; }
  .pl-send { width: 100%; padding: 0 14px; font-size: .97rem; }
  .pl-pair { grid-template-columns: minmax(0, 112px) minmax(0, 1fr); }
  .mv__btn { font-size: 1.25rem; gap: 14px; }
  .mv__in p { margin-left: 0; }
  .slip { margin: -28px 0 0 10px; padding: 12px 14px 26px; }
  .slip__rows { --lab: 40%; }
}

/* ---------- Short desktop screens (1366x768, 1280x720): the whole tool stays on the first screen ---------- */
@media (min-width: 981px) and (max-height: 820px) {
  .plan__in { padding-top: calc(var(--head-h) + 2px); }
  .plan__head { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 28px; margin-bottom: 12px; }
  .plan__crumb { grid-column: 1 / -1; }
  .plan__title { font-size: clamp(1.85rem, 2.5vw, 2.3rem); white-space: nowrap; }
  .plan__intro { margin: 0; font-size: .9rem; line-height: 1.4; gap: 3px 10px; }
  .plan__intro .xflag { padding: 2px 8px; }
  .pl-ctl { padding: 12px 16px 14px; }
  .pl-ctl__fields { gap: 8px; }
  .pl-grp__lg { margin-bottom: 5px; }
  .pl-tile span { min-height: 40px; padding: 3px 8px; }
  .pl-tiles--opt .pl-tile span, .pl-tiles--route .pl-tile span { min-height: 44px; padding: 3px 5px; }
  .pl-size__val { font-size: 1.35rem; }
  .pl-range { height: 38px; margin: -6px 0 -8px; }
  .pl-hint { margin-top: 5px; min-height: 0; line-height: 1.35; }
  .pl-seg, .pl-select { height: 42px; }
  .pl-sheet { padding: 10px 18px 12px; }
  .pl-sheet__head { margin-bottom: 2px; }
  .pl-sheet__title { font-size: 1.35rem; }
  .pl-axis { height: 20px; }
  .pl-row { min-height: 22px; }
  .pl-row__txt { padding: 0; }
  .pl-row__track { height: 11px; }
  .pl-read { margin-top: 20px; }
  .pl-block { margin-top: 12px; }
  .pl-grp__lg { letter-spacing: .06em; }
  .pl-cell { padding: 5px 12px 6px; }
  .pl-cell__v { margin: 1px 0 0; font-size: 1.55rem; }
  .pl-cell__v--money { font-size: 1.25rem; padding-top: .12em; }
  .pl-foot { margin-top: 8px; gap: 8px 20px; }
  .pl-foot__note { font-size: .875rem; line-height: 1.4; }
  .pl-send { min-height: 44px; }
}
@media (min-width: 981px) and (max-height: 740px) {
  .plan__in { padding-top: var(--head-h); }
  .plan__head { margin-bottom: 10px; }
  .pl-row { min-height: 21px; }
  .pl-read { margin-top: 19px; }
  .pl-ctl__fields { gap: 6px; }
}
