/* Calculator page (/calculator/), round 3. Aqua tokens only (style.css :root). Loaded on that page only.
   Wide: [title, chips, sliders | result (sticky)] then the disclosures under the sliders. <=1000px: one column. */
.calc-sec { padding-top: clamp(14px, 2.4vw, 40px); }
.calc { --calc-max: 1380px; max-width: var(--calc-max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-areas: "in out" "more out"; gap: clamp(18px, 2.6vw, 40px) clamp(24px, 3.6vw, 64px); align-items: start; }
.calc-in { grid-area: in; display: grid; gap: clamp(14px, 1.6vw, 22px); min-width: 0; }
.calc-out { grid-area: out; display: grid; gap: 12px; position: sticky; top: 92px; min-width: 0; }
.calc-more { grid-area: more; display: grid; gap: 12px; min-width: 0; }

.calc-crumbs { color: var(--muted); }
.calc-crumbs a { text-decoration-color: var(--line); }
.calc-title { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(32px, 3vw + 14px, 72px); line-height: .94; letter-spacing: -.025em; text-wrap: balance; }
.calc-lede { margin: -4px 0 0; max-width: 46ch; font-size: clamp(17px, .5vw + 14px, 21px); font-weight: 600; color: var(--ink-2); }
.calc-nojs { max-width: 70ch; margin: 0; padding: 14px 18px; border-radius: 16px; background: var(--grey); }
.calc-help { margin: 0; font-size: .9rem; color: var(--muted); }

/* business chips: one slim row (scrolls sideways on phones) */
.calc-chips { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.calc-chips-k { float: left; padding: 0; margin: 0; font-weight: 700; font-size: .88rem; color: var(--ink-2); }
.calc-chip-row { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.calc-chips-note { flex-basis: 100%; font-size: .85rem; }
.calc-preset { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 700 .82rem var(--sans); cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s, color .2s; }
.calc-preset:hover { border-color: var(--ink); }
.calc-preset[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* sliders: label left, value right, a big touch-friendly thumb */
.calc-sliders { display: grid; gap: clamp(10px, 1.2vw, 16px); padding: clamp(16px, 2vw, 28px); border-radius: calc(var(--r) - 6px); background: var(--grey); }
.calc-sl { display: grid; gap: 2px; }
.calc-sl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.calc-sl-top label { font-weight: 700; font-size: clamp(15px, .3vw + 14px, 18px); line-height: 1.3; }
.calc-sl-top output { flex: none; font-family: var(--display); font-size: clamp(22px, 1vw + 16px, 32px); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc input[type="range"] { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.calc input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--violet)) 0 / var(--p) 100% no-repeat, #d6d6de; }
.calc input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: #d6d6de; }
.calc input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--violet)); }
.calc input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 14px -4px rgba(20, 10, 60, .45); transition: transform .15s; }
.calc input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 14px -4px rgba(20, 10, 60, .45); }
.calc input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.calc input[type="range"]:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 12px; }

/* result */
.calc-result { color: #fff; padding: clamp(22px, 2.8vw, 40px); padding-right: clamp(64px, 5vw, 84px); display: grid; gap: 8px; }
.calc-result > * { position: relative; z-index: 1; margin: 0; }
.calc-k { font-weight: 700; font-size: clamp(17px, .4vw + 14px, 21px); }
.calc-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.calc-big b { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 4.6vw + 18px, 104px); line-height: .95; letter-spacing: -.03em; font-variant-numeric: tabular-nums; outline: none; }
.calc-big span { font-weight: 700; font-size: 1.15rem; }
.calc-sub { font-weight: 600; font-size: clamp(15px, .3vw + 14px, 18px); line-height: 1.45; opacity: .96; max-width: 44ch; }
.calc-share { position: absolute !important; top: clamp(14px, 1.6vw, 22px); right: clamp(14px, 1.6vw, 22px); width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6); cursor: pointer; transition: background .2s; }
.calc-share:hover, .calc-share.is-done { background: rgba(255, 255, 255, .34); }
.calc-share-msg:empty { display: none; }
.calc-context { margin: 0; font-size: clamp(15px, .3vw + 14px, 18px); font-weight: 600; line-height: 1.45; color: var(--ink-2); }
.calc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 2px; }
.calc-actions .pill { white-space: normal; text-align: center; }
.calc-book { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--violet); }
.calc-book:hover { color: var(--violet); }
.calc a:focus-visible, .calc button:focus-visible, .calc input:focus-visible, .calc summary:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

/* disclosures */
.calc-dis { border: 1px solid var(--line); border-radius: calc(var(--r) - 8px); background: #fff; }
.calc-dis > summary { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 60px; padding: 10px clamp(16px, 1.8vw, 24px); cursor: pointer; border-radius: inherit; }
.calc-dis > summary::-webkit-details-marker { display: none; }
.calc-dis-h { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(16px, .4vw + 13px, 20px); letter-spacing: -.01em; }
.calc-tag { font-family: var(--mono); font-size: .76rem; padding: 6px 10px; border-radius: 999px; background: var(--grey); color: var(--ink-2); white-space: nowrap; }
.calc-tag:empty { display: none; }
.calc-dis-ico { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; background: var(--grey); position: relative; flex: none; }
.calc-dis-ico::before, .calc-dis-ico::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease); }
.calc-dis-ico::after { transform: rotate(90deg); }
.calc-dis[open] .calc-dis-ico::after { transform: rotate(0deg); }
.calc-dis-body { padding: 0 clamp(16px, 1.8vw, 24px) clamp(16px, 1.8vw, 24px); display: grid; gap: 10px; }
.calc-h { margin: 10px 0 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1rem; letter-spacing: -.01em; }
.calc-dis-body p { margin: 0; }

/* task rows */
.calc-cols { display: grid; grid-template-columns: minmax(0, 1fr) 76px 92px 40px; gap: 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.calc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.calc-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 92px 40px; gap: 8px; align-items: center; }
.calc:not(.calc-js) .calc-row { grid-template-columns: minmax(0, 1fr) 76px 92px; }
.calc-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.calc input[type="text"], .calc input[type="number"] { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 600 1rem var(--sans); }
.calc-num { text-align: right; font-variant-numeric: tabular-nums; }
.calc-del { width: 40px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.calc-del:hover:not(:disabled) { background: var(--grey); color: var(--red, #d6204e); }
.calc-del:disabled { opacity: .3; cursor: default; }
.calc-add { justify-self: start; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px dashed var(--ink-2); background: transparent; font: 700 .9rem var(--sans); color: var(--ink); cursor: pointer; }
.calc-add:disabled { opacity: .4; cursor: default; }
.calc-stack { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--grey); gap: 2px; }
.calc-stack.is-empty { opacity: .5; }
.calc-seg { flex: 0 1 0; min-width: 0; transition: flex-grow .5s var(--ease); }
.calc-legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.calc-legend-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.calc-legend-list b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-legend-list li > span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-dot { width: 12px; height: 12px; border-radius: 4px; }
.calc-c0 { background: var(--blue); } .calc-c1 { background: var(--violet); } .calc-c2 { background: var(--pink); } .calc-c3 { background: var(--orange); }
.calc-c4 { background: #12b8c9; } .calc-c5 { background: #2b1fa8; } .calc-c6 { background: #ffb13d; } .calc-c7 { background: #0b0b10; }
.calc-first { padding: 12px 14px; border-radius: 12px; background: var(--grey); font-weight: 600; }

/* assumptions */
.calc-weeks { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc-weeks label, .calc-pcts label { font-weight: 700; font-size: .95rem; }
.calc .calc-weeks .calc-num { width: 110px; flex: none; }
.calc-pcts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-pcts label { display: block; margin-bottom: 6px; }
.calc-pct-in { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); }
.calc-reset { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink-2); font: 700 .9rem var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.calc-honest { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.calc-honest b { color: var(--ink-2); font-weight: 700; }
.calc:not(.calc-js) .calc-honest { display: none; }

@media (max-width: 1000px) {
  .calc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "in" "out" "more"; }
  .calc-out { position: static; }
}
@media (max-width: 640px) {
  .calc-chips { display: block; }
  .calc-chips-k { float: none; display: block; margin-bottom: 6px; }
  .calc-chips-note { margin-top: 2px; }
  .calc-chip-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gut)); padding: 2px var(--gut) 6px; scroll-padding: 0 var(--gut); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .calc-chip-row::-webkit-scrollbar { display: none; }
  .calc-sl-top label { font-size: 15px; }
  .calc-actions .pill { width: 100%; }
  .calc-cols { display: none; }
  .calc-row, .calc:not(.calc-js) .calc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; padding: 10px; border-radius: 14px; background: var(--grey); }
  .calc-row .calc-name { grid-column: 1 / -1; }
  .calc-row .calc-lab { position: static; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  .calc-row .calc-lab[data-for="name"], .calc-row .calc-lab[for$="-name"] { grid-column: 1 / -1; }
  .calc-row .calc-lab[data-for="people"], .calc-row .calc-lab[for$="-people"] { grid-column: 1; grid-row: 3; }
  .calc-row .calc-lab[data-for="hours"], .calc-row .calc-lab[for$="-hours"] { grid-column: 2; grid-row: 3; }
  .calc-row [data-f="people"], .calc-row [id$="-people"] { grid-column: 1; grid-row: 4; }
  .calc-row [data-f="hours"], .calc-row [id$="-hours"] { grid-column: 2; grid-row: 4; }
  .calc-row .calc-del { grid-column: 3; grid-row: 4; }
  .calc-pcts { gap: 8px; }
}
@media (min-width: 1800px) {
  .calc { --calc-max: 1560px; }
}
@media (prefers-reduced-motion: reduce) {
  .calc-seg, .calc-dis-ico::before, .calc-dis-ico::after, .calc input[type="range"]::-webkit-slider-thumb { transition: none; }
}
