/* Take-home pay (tools/take-home-pay.html). Frame: tool-frame.css + tools/kit.css. */

/* Huge answer number (WOW-SPEC steep scale) */
.th-figure { font-size: clamp(64px, 8vw, 112px); letter-spacing: -0.04em; margin-top: 14px; }
.th-summary { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }

/* The waterfall (hero visual, real data, on the stage) */
.th-fall { margin: 56px 0 0; padding: clamp(24px, 3vw, 36px); background: var(--stage-2); border: 1px solid var(--hair-stage); border-radius: var(--r-panel); }
.th-fall-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 20px; }
.th-fall-title { font: 400 clamp(22px, 2vw, 28px)/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--parchment); }
.th-fall-key { display: inline-flex; align-items: center; gap: 8px; font: 400 13px/1 var(--font-sans); color: var(--parchment-2); }
.th-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.th-key + .th-key, .th-fall-key .th-key--maaser { margin-left: 10px; }
.th-key--net { background: var(--kesef); }
.th-key--maaser { background: repeating-linear-gradient(135deg, var(--kesef) 0 2px, var(--stage-2) 2px 5px); box-shadow: inset 0 0 0 1px var(--kesef); }

.th-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.th-row { display: grid; grid-template-columns: minmax(150px, 15em) 1fr minmax(84px, auto); align-items: center; gap: 0 24px; padding: 12px 0; border-top: 1px solid var(--hair-stage); }
.th-row:first-child { border-top: 0; }
.th-row-label { grid-column: 1; font: 400 15px/1.3 var(--font-sans); color: var(--parchment-2); }
.th-row-val { grid-column: 3; grid-row: 1; text-align: right; font: 400 17px/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--parchment); }
.th-track { grid-column: 2; grid-row: 1; position: relative; height: 28px; }
.th-bar { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: rgba(236, 230, 216, .3); overflow: hidden; }
.th-row--gross .th-bar { background: rgba(236, 230, 216, .82); }
.th-row--net .th-row-label { color: var(--parchment); font-weight: 500; }
.th-row--net .th-row-val { font: 300 26px/1 var(--font-sans); letter-spacing: -0.02em; }
.th-row--net .th-bar { background: var(--kesef); }
.th-slice { position: absolute; top: 0; right: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(13, 12, 10, .55) 0 2px, transparent 2px 6px); border-left: 2px solid var(--stage-2); }
.th-fall-note { font: 400 14px/1.5 var(--font-sans); color: var(--parchment-2); margin: 16px 0 0; }
.th-hero-note { margin-top: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .th-bar { transition: left .5s var(--ease), width .5s var(--ease); }
  .th-slice { transition: width .5s var(--ease); }
}

@media (max-width: 760px) {
  .th-fall { margin-top: 40px; padding: 20px; }
  .th-row { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 12px 0 14px; }
  .th-row-label { grid-column: 1; grid-row: 1; font-size: 14px; }
  .th-row-val { grid-column: 2; grid-row: 1; font-size: 16px; }
  .th-track { grid-column: 1 / -1; grid-row: 2; height: 14px; }
  .th-row--net .th-row-val { font-size: 22px; }
  .th-row--net .th-track { height: 20px; }
}

/* Work area */
.th-hint { margin-top: 16px; }
.th-seg-row .tk-field { margin-top: 0; }
.tf-panel-title + .th-seg-row { margin-top: 0; }
.tf-work select { width: 100%; padding: 0 40px 0 14px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312110E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.th-rates { margin-top: 16px; }
.th-status:empty { display: none; }
.th-status { margin-top: 12px; }
.th-sources a { color: var(--ink); text-underline-offset: 3px; }
.tk-rows dt .tk-hint { font-size: 12.5px; }
[hidden] { display: none !important; }
.th-summary .tf-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .th-figure { font-size: clamp(56px, 18vw, 96px); } }

/* State and local (v3 state tax) */
.th-state-field { margin-top: 20px; }
.th-local { display: grid; gap: 10px; margin-top: 14px; }
.tk-field.th-local { gap: 8px; }
.tf-work .th-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; cursor: pointer; font: 400 15px/1.35 var(--font-sans); color: var(--ink); }
.tf-work .th-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.tf-work .th-check small { display: block; margin-top: 2px; font: 400 13px/1.4 var(--font-sans); color: var(--ink-2); }
.th-state-note { margin-top: 10px; }
.th-state-note:empty { display: none; }
.th-override { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--hair); }
.th-override .tk-field { margin-top: 8px; }
.tf-work .th-check > span { font: 400 15px/1.35 var(--font-sans); color: var(--ink); }
