/* Tools › Director Income Planner (#dip). Colours come from styles.css's tokens, so light and dark both work. */
.dip-panel { margin-bottom: 16px; }
.dip-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); align-items: end; margin-bottom: 12px; }
.dip-form label, .dip-fill label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.dip-form input[type=number], .dip-fill input, .dip-dirs input[type=text] { font: 13px var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 36px; box-sizing: border-box; }
.dip-form input[type=number] { width: 100%; }
.dip-h { font-size: 15px; margin: 14px 0 6px; }
.dip-fill { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 8px; }
.dip-fill label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dip-fill input { width: 8rem; }
.dip-fill input[type=number] { width: 4.5rem; }
.dip-dirs td, .dip-dirs th { text-align: left; }
.dip-dirs td input { width: 100%; min-width: 8rem; }
.dip-dirs .dip-x { padding: 4px 10px; }
.dip-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); margin: 10px 0 14px; }
.dip-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.dip-card.dip-main { border-color: var(--green); background: var(--green-soft); }
.dip-card b { display: block; font: 700 22px var(--font); margin: 2px 0; }
.dip-card span { font-size: 12.5px; color: var(--muted); }
.dip-card small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.dip-table td, .dip-table th { text-align: right; white-space: nowrap; }
.dip-table td:first-child, .dip-table th:first-child { text-align: left; }
.dip-table tr.dip-total td { font-weight: 700; border-top: 2px solid var(--line); }
.dip-table tr.dip-best td { background: var(--green-soft); }
.dip-sub { font-size: 14px; margin: 16px 0 4px; }
.dip-panel .table-wrap + .dip-sub { margin-top: 30px; }
#dip-assume { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
#dip-params table td:nth-child(2) { text-align: right; }
.dip-unv { color: var(--amber); font-size: 12px; font-weight: 600; }
@media (max-width: 640px) {
  .dip-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dip-card { padding: 10px 12px; }
  .dip-card b { font-size: 18px; }
  /* Each director's inputs become a small card instead of a table that scrolls sideways. */
  .dip-panel .table-wrap:has(.dip-dirs) { margin: 0; overflow: visible; }
  .dip-dirs thead { display: none; }
  .dip-dirs, .dip-dirs tbody { display: block; width: 100%; }
  .dip-dirs tr { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px 10px; align-items: end; border-top: 1px solid var(--line); padding: 10px 0; }
  .dip-dirs td { display: block; padding: 0; border: 0; }
  .dip-dirs td:first-child { grid-column: 1 / 3; font-weight: 600; }
  .dip-dirs td:last-child { grid-row: 1; grid-column: 3; justify-self: end; }
  .dip-dirs td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
  .dip-dirs td input { min-width: 0; }
  .dip-table td:first-child, .dip-table th:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; min-width: 6rem; }
  .dip-dirs td input { min-width: 6rem; }
}
