/* Plan finder: budget + goals → a bundle of ITFLIX squad, Prototie PM and ProtoTycoon.
   Left: four questions as numbered steps. Right: a sticky receipt with the budget meter. */
.planner .sec-head h2 .h-on { color: var(--on); }
.hero-plan { display: inline-flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 2px; width: fit-content; }
.hero-plan:hover { color: var(--on); border-color: var(--on); }
.hero-plan i { font-style: normal; transition: transform .15s; }
.hero-plan:hover i { transform: translateX(3px); }

.pl { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.pl-q { display: grid; gap: var(--s-4); }
.pl-step { margin: 0; padding: var(--s-5); border: 0; border-radius: var(--r); background: var(--paper); display: grid; gap: var(--s-4); min-width: 0; }
.pl-step legend { float: left; width: 100%; padding: 0; display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-lg); font-weight: 800; letter-spacing: -0.02em; }
.pl-step legend + * { clear: both; }
.pl-step legend i { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--r-sm); background: var(--ink); color: #fff; font: 800 14px/1 var(--display); font-style: normal; }
.pl-step legend small { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* budget */
.pl-money { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.pl-money label { display: flex; align-items: baseline; gap: var(--s-2); border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.pl-money input { width: 6.2ch; border: 0; padding: 0; background: transparent; font: 800 clamp(36px, 5vw, 52px)/1.05 var(--display); font-stretch: 112%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.pl-money input:focus { outline: none; }
.pl-money label:focus-within { border-color: var(--on); }
.pl-money b { font-size: var(--t-xl); font-weight: 800; }
.pl-money span { color: var(--muted); font-size: var(--t-sm); }
.pl-range { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 0; }
.pl-range::-webkit-slider-runnable-track { height: 6px; border-radius: var(--r-sm); background: linear-gradient(to right, var(--on) 0 var(--fill, 50%), var(--track) var(--fill, 50%) 100%); }
.pl-range::-moz-range-track { height: 6px; border-radius: var(--r-sm); background: var(--track); }
.pl-range::-moz-range-progress { height: 6px; background: var(--on); }
.pl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: var(--r-sm); background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow-1); cursor: grab; }
.pl-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: var(--r-sm); background: var(--surface); border: 2px solid var(--ink); cursor: grab; }
.pl-range:focus-visible { outline: none; }
.pl-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--on); outline-offset: 2px; }
.pl-presets { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pl-presets .chip { background: var(--surface); }
.pl-presets .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* goals: tiles with a square check, the switch block in miniature */
.pl-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.pl-goal { position: relative; display: block; }
.pl-goal input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.pl-goal span { display: grid; gap: 2px; height: 100%; padding: var(--s-3) var(--s-3) var(--s-3) 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.pl-goal span::before { content: ""; position: absolute; left: 12px; top: 14px; width: 18px; height: 18px; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--surface); transition: background .15s, border-color .15s; }
.pl-goal span::after { content: ""; position: absolute; left: 18px; top: 17px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; }
.pl-goal b { font-size: 15px; font-weight: 800; line-height: 1.35; }
.pl-goal small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.pl-goal:hover span { border-color: var(--ink-2); }
.pl-goal input:checked + span { border-color: var(--on); background: var(--on-soft); }
.pl-goal input:checked + span::before { background: var(--on); border-color: var(--on); }
.pl-goal input:checked + span::after { opacity: 1; }
.pl-goal input:focus-visible + span { outline: 2px solid var(--on); outline-offset: 2px; }
.pl-goal input:disabled + span { opacity: .45; cursor: not-allowed; }
.pl-hint { font-size: 13px; color: var(--muted); }

/* segmented choices on a light surface */
.pl-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.pl-seg label { position: relative; }
.pl-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.pl-seg span { display: grid; place-items: center; gap: 0; min-height: 44px; padding: 6px 4px; border-radius: var(--r-sm); font-size: 14px; font-weight: 700; color: var(--ink-2); text-align: center; cursor: pointer; line-height: 1.25; }
.pl-seg span small { font-size: 12px; font-weight: 500; color: var(--muted); }
.pl-seg input:checked + span { background: var(--ink); color: #fff; }
.pl-seg input:checked + span small { color: #c8ccd4; }
.pl-seg input:focus-visible + span { outline: 2px solid var(--on); outline-offset: 2px; }

/* the receipt */
.pl-r { position: sticky; top: 84px; display: grid; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r); background: var(--surface); border: 1px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); min-width: 0; }
.pl-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-1); border-bottom: 1px solid var(--line); }
.pl-tab { display: grid; gap: 2px; padding: 8px 6px 10px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: none; text-align: left; color: var(--muted); }
.pl-tab b { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.pl-tab b em { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 5px; border-radius: var(--r-sm); background: var(--on); color: #fff; }
.pl-tab span { font-size: 13px; font-variant-numeric: tabular-nums; }
.pl-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.pl-tab:hover { color: var(--ink); }
.pl-total { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-3); flex-wrap: wrap; }
.pl-total > div { display: grid; gap: 2px; }
.pl-total span { font-size: 13px; color: var(--muted); font-weight: 600; }
.pl-total b { font-size: clamp(30px, 3.6vw, 40px); font-weight: 800; line-height: 1.05; }
.pl-fit { font-size: 13px; font-weight: 800; padding: 4px 8px; border-radius: var(--r-sm); }
.pl-fit.in { background: var(--ok-soft); color: var(--ok); }
.pl-fit.over { background: var(--warn-soft); color: var(--warn); }

.pl-meter { display: grid; gap: var(--s-2); }
.pl-bar { position: relative; display: flex; height: 14px; border-radius: var(--r-sm); background: var(--track); overflow: visible; }
.pl-bar i { display: block; height: 100%; min-width: 3px; transition: width .35s cubic-bezier(.3, .7, .3, 1); }
.pl-bar i:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.pl-bar .squad { background: var(--prod-squad); }
.pl-bar .pm { background: var(--prod-pm); }
.pl-bar .tycoon { background: var(--prod-tycoon); }
.pl-bar .cap { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--crit); }
.pl-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.pl-items { display: grid; border-top: 1px solid var(--line-2); }
.pl-item { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 4px var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.pl-item::before { content: ""; width: 14px; height: 14px; border-radius: var(--r-sm); background: var(--c); align-self: start; margin-top: 4px; grid-row: span 2; }
.pl-item[data-p="squad"] { --c: var(--prod-squad); }
.pl-item[data-p="pm"] { --c: var(--prod-pm); }
.pl-item[data-p="tycoon"] { --c: var(--prod-tycoon); }
.pl-item h4 { margin: 0; font-size: 15px; font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pl-item h4 small { font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: var(--r-sm); background: var(--line-2); color: var(--ink-2); }
.pl-item em { font-style: normal; font-weight: 800; font-size: 15px; white-space: nowrap; }
.pl-item p { grid-column: 2 / 4; font-size: 13px; color: var(--muted); line-height: 1.5; }
.pl-item p b { color: var(--ink-2); font-weight: 700; }
.pl-empty { padding: var(--s-4); border: 1px dashed var(--line); border-radius: var(--r); font-size: 14px; color: var(--muted); }

.pl-cover { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-cover li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; background: var(--ok-soft); color: var(--ok); }
.pl-cover li::before { content: ""; width: 4px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.pl-cover li.no { background: var(--line-2); color: var(--muted); }
.pl-cover li.no::before { width: 8px; height: 2px; border: 0; background: currentColor; transform: none; }
.pl-notes { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.pl-notes li { position: relative; padding-left: 14px; line-height: 1.55; }
.pl-notes li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--warn); }
.pl-acts { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); }
.pl-fine { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* the contact form now has four kinds */
#contactForm .seg { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 620px) { #contactForm .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the phone bar: total always in reach while answering the questions */
.pl-dock { display: none; }

@media (max-width: 1020px) {
  .pl { grid-template-columns: minmax(0, 1fr); }
  .pl-r { position: static; box-shadow: 4px 4px 0 var(--ink); }
}
@media (max-width: 620px) {
  .pl-step { padding: var(--s-4); }
  .pl-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-goal span { padding: 10px 10px 10px 36px; }
  .pl-goal span::before { left: 10px; top: 12px; }
  .pl-goal span::after { left: 16px; top: 15px; }
  .pl-goal small { display: none; }
  .pl-seg span small { display: none; }
  .pl-r { padding: var(--s-4); }
  .pl-tab b em { display: none; }
  .pl-tab[data-k="best"] b::after { content: ""; width: 6px; height: 6px; background: var(--on); }
  .pl-acts { grid-template-columns: 1fr; }
  .pl-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--ink); color: #fff; transform: translateY(110%); transition: transform .2s; }
  .pl-dock.show { transform: none; }
  .pl-dock div { display: grid; line-height: 1.2; }
  .pl-dock span { font-size: 12px; color: #b3b8c3; }
  .pl-dock b { font-size: 18px; font-weight: 800; }
  .pl-dock .btn { min-height: 40px; }
  body.dock-on .chat-fab { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
