/* The planner uses the site's measuring-sheet palette, type and button styles. */
#yard-planner { scroll-margin-top: 1rem; }
.yard-planner { background: var(--sheet); border: var(--hair) solid var(--ink); }
.yp-heading, .yp-origin, .yp-row, .yp-modes, .yp-steps { display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; }
.yp-heading { justify-content: space-between; padding: .8rem clamp(14px, 2.5vw, 32px); }
.yp-heading h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); }
.yp-origin, .yp-foot, .yp-hint, .yp-result figcaption, .yp-result small { font-size: .92rem; color: var(--muted); }
.yp-steps { gap: 0; padding-inline: clamp(6px, 2vw, 22px); border-block: 1px solid var(--rule); }
.yp-steps button, .yp-modes button { min-height: 44px; border: 0; background: var(--sheet); color: var(--ink); font: 600 1rem/1.2 var(--text); }
.yp-steps button { padding: .55rem .8rem; border-bottom: 3px solid transparent; }
.yp-steps button[aria-current="step"] { color: var(--pine); border-color: var(--mark); }
.yp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.yp-result { min-width: 0; padding: clamp(16px, 2.5vw, 32px); background: var(--paper); border-right: var(--hair) solid var(--ink); }
.yp-totals { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 16px; }
.yp-totals > div + div { border-left: 1px solid var(--rule); padding-left: 16px; }
.yp-totals span, .yp-totals small, .yp-number { display: block; }
.yp-totals span { font-weight: 600; }
.yp-number { margin: .25rem 0; color: var(--pine); font: 700 clamp(1.6rem, 2.7vw, 2.6rem)/1.04 var(--display); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.yp-result small { line-height: 1.4; }
.yp-breakdown { margin-top: .65rem; color: var(--muted); font-size: .92rem; }
.yp-result figure { margin-top: 1.3rem; }
.yp-result canvas { display: block; width: 100%; height: clamp(165px, 22vw, 270px); border: 1px solid var(--rule); }
.yp-result figcaption { margin-top: .4rem; }
.yp-controls { padding: clamp(16px, 2.5vw, 32px); min-width: 0; }
.yp-controls [data-panel], .yp-controls [data-editor] { display: grid; gap: .65rem; }
.yp-modes { gap: 4px; margin-bottom: .35rem; }
.yp-modes button { flex: 1 1 auto; border: 1px solid var(--rule); border-radius: 3px; padding: .35rem .55rem; }
.yp-modes [aria-pressed="true"] { color: var(--pine); border-color: var(--pine); background: var(--tint); }
.yp-row { justify-content: space-between; gap: .25rem .65rem; }
.yp-row label { flex: 1 1 105px; }
.yp-controls label { display: grid; min-width: 0; gap: .25rem; font-size: .95rem; font-weight: 600; }
.yp-controls input, .yp-controls select { width: 100%; min-width: 0; min-height: 44px; padding: .43rem .55rem; border: 1px solid var(--muted); border-radius: 3px; background: var(--sheet); }
.yp-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,100px),1fr)); gap: .55rem; }
.yp-cut { border-top: 1px solid var(--rule); padding-top: .35rem; }
.yp-hint { line-height: 1.4; }
.yp-controls .link-button { width: fit-content; color: var(--pine); font-size: .94rem; }
.yp-controls .link-button:disabled { opacity: .55; cursor: default; }
.yp-next { justify-self: start; margin-top: .3rem; }
.yp-controls ul { padding-left: 1.25rem; margin: 0; }
.yp-controls li + li { margin-top: .35rem; }
.yp-foot { padding: .65rem clamp(14px, 2.5vw, 32px); border-top: 1px solid var(--rule); }
.yp-foot a { color: var(--pine); font-weight: 600; }
@media (max-width: 800px) {
  .yp-body { grid-template-columns: 1fr; }
  .yp-result { border-right: 0; border-bottom: 1px solid var(--rule); }
  .yp-result canvas { height: 145px; }
}
@media (max-width: 480px) {
  .yp-heading { gap: .2rem .6rem; }
  .yp-origin { gap: .35rem; }
  .yp-steps button { flex: 1; padding-inline: .3rem; }
  .yp-totals { gap: .6rem; }
  .yp-totals > div + div { padding-left: .6rem; }
  .yp-modes button { font-size: .9rem; }
  .yp-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .yp-section-select { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: end; }
  [data-editor="sections"] > .yp-fields { grid-template-columns: 1fr 1fr; }
  [data-editor="sections"] > .yp-fields > :last-child { grid-column: 1 / -1; }
  .yp-next { width: 100%; }
}
