/* The rent calculator: inputs on the left, the plan on the right; on a phone the order is
   rent, the picture, the people, then the slices, so the picture is in view while you type. */
.calc{display:grid;gap:14px;align-items:start}
.calc-l,.calc-r{display:contents}
.calc-in{order:1} .calc-pic{order:2} .calc-who{order:3} .calc-res{order:4}
.calc-card{background:var(--card);border:1px solid var(--hair);border-radius:20px;box-shadow:var(--shadow);padding:18px;min-width:0}
.calc-pic{display:grid;gap:14px;box-shadow:var(--shadow-up)}
.calc-res{display:grid;gap:14px}
.calc .lbl{font-size:13.5px;font-weight:650;color:var(--dim)}
.calc .bigamt{font-weight:780;font-size:clamp(22px,6vw,28px);letter-spacing:-.02em}
.calc .sect.tight{margin:0}
.calc .empty{border:0;padding:26px 10px}
@media (min-width:880px){
  .calc{grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:28px}
  .calc-l,.calc-r{display:grid;gap:14px;align-content:start}
  .calc-r{position:sticky;top:16px}
  .calc-in,.calc-pic,.calc-who,.calc-res{order:0}
}
.person{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px;border-radius:14px;background:var(--pill)}
.person .name{min-height:44px;padding:0 12px;border:1px solid transparent;border-radius:10px;background:var(--card);font-weight:650;min-width:0}
.person .name:focus{outline:2px solid var(--green);outline-offset:1px}
.person .seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.person .seg button{min-height:44px;min-width:0;padding:0 6px;font-size:13.5px;line-height:1.15;background:var(--card)}
.person .seg button[aria-pressed=true]{background:var(--ink);color:var(--bg)}
.payday{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:650;color:var(--dim)}
.payday input{flex:1;min-width:0;min-height:44px;padding:0 10px;border:1px solid var(--hair-strong);border-radius:10px;background:var(--card);font-size:16px}
.calc-who>.stack:last-child .seg button{display:inline-flex;align-items:center;gap:7px}
.calc-who>.stack:last-child .seg svg{width:17px;height:17px}
.calc-who>.stack:last-child .seg button[aria-pressed=true] .av{background:var(--bg);color:var(--ink)}
@media (min-width:1180px){.person .seg{grid-template-columns:repeat(4,minmax(0,1fr))}}
.calc-res .row.wrap>.btn.primary{flex:2 1 190px}
.calc-res .row.wrap>.btn:not(.primary){flex:1 1 150px}
/* one card per person: their slices as chips, where it goes as an arrow */
.item.slice{align-items:flex-start;gap:12px}
.item.slice .t{white-space:normal;overflow-wrap:break-word;word-break:normal}
.item.slice .chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.item.slice .chip{gap:6px;min-height:28px;padding:0 10px;font-size:12.5px;color:var(--dim)}
.item.slice .chip b{color:var(--ink);font-weight:700}
.item.slice .chip.warn{color:var(--amber-ink)} .item.slice .chip.warn b{color:inherit}
.item.slice .dest{flex:none;align-self:center;display:inline-flex;align-items:center;gap:6px;max-width:36%;padding:7px 11px;border-radius:999px;background:var(--wash);color:var(--green-ink);font-size:13px;font-weight:650;line-height:1.2;overflow-wrap:break-word}
.item.slice .dest svg{width:15px;height:15px;flex:none}
/* narrow phones: the destination drops under the chips, in line with the name, and never overlaps them */
@media (max-width:379px){
  .item.slice{flex-wrap:wrap;row-gap:8px}
  .item.slice .grow{flex:1 1 calc(100% - 48px)}
  .item.slice .dest{align-self:flex-start;margin-left:46px;max-width:calc(100% - 46px)}
}
.why summary{min-height:44px;display:flex;align-items:center;gap:8px;font-weight:650;font-size:14.5px;color:var(--green-ink);cursor:pointer;list-style:none}
.why summary::-webkit-details-marker{display:none}
.why summary svg{width:17px;height:17px;transition:transform 200ms var(--ease-out)}
.why[open] summary svg{transform:rotate(180deg)}
.why ul{margin:0;padding:0 0 6px 18px;display:grid;gap:8px;font-size:14.5px;color:var(--dim)}
.why ul .warn{color:var(--clay)}
