/* The calculators rendered by templates/tools/tool.html (Nov 24, 2026).
   Builds on calc.css (panels, inputs, the result card, "How it's
   calculated"); only what those don't cover is here. Mobile first: fields
   stack, the "half" fields pair up two to a row, and tables scroll inside
   their own wrapper rather than the page. Colours are tokens only. */

.ls-tt__intro { max-width: 760px; margin: 0 0 20px; }
.ls-tt__intro p { font-size: 16px; line-height: 1.6; color: var(--text-2); margin: 0 0 10px; }
.ls-tt__intro p:first-child { color: var(--ink); }
.ls-tt__guide--top { margin: 0 0 12px; font-size: 15px; }

/* Two columns at every width: the inputs share their row with the result
   on a desktop, so "half" fields pair up there as on a phone. */
.ls-tt__fields { display: grid; gap: 14px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ls-tt__field { grid-column: span 2; }
.ls-tt__field--half { grid-column: span 1; }
.ls-tt__field--half.ls-tt__field--solo { grid-column: span 2; }
.ls-tt__field--check { align-self: end; }
.ls-tt__field[hidden] { display: none; }
.ls-tt__checkline { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.ls-tt__select { padding-right: 28px; text-align: left; }
.ls-tt .ls-calc__input[type="date"] { padding-right: 6px; }

.ls-tt__alert {
  margin: 0 0 12px; padding: 12px 16px; border-radius: 10px; font-size: 14.5px; line-height: 1.5;
  background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--panel-border);
}
.ls-tt__alert[hidden], .ls-tt__tablepanel[hidden], .ls-tt__notice[hidden] { display: none; }

/* Tables scroll in their wrapper on a phone; the page never does. */
.ls-tt__tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ls-tt__table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ls-tt__table th, .ls-tt__table td { padding: 8px 10px; text-align: left; white-space: nowrap; }
.ls-tt__table th:first-child, .ls-tt__table td:first-child { padding-left: 20px; white-space: normal; }
.ls-tt__table th:last-child, .ls-tt__table td:last-child { padding-right: 20px; }
.ls-tt__table thead th {
  font-size: 12px; font-weight: 500; color: var(--muted);
  background: var(--surface-inset, var(--sidebar));
  border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider);
}
.ls-tt__table tbody tr + tr td { border-top: 1px solid var(--divider); }
.ls-tt__table tfoot td { border-top: 1px solid var(--border); font-weight: 600; }
.ls-tt__table .ls-num { text-align: right; }
/* Small phones: tighter cells so the result tables fit the card instead of
   scrolling sideways; headers may wrap, figures never do. */
@media (max-width: 479.98px) {
  .ls-tt__table { min-width: 0; font-size: 13px; }
  .ls-tt__table th, .ls-tt__table td { padding: 7px 5px; }
  .ls-tt__table th:first-child, .ls-tt__table td:first-child { padding-left: 14px; }
  .ls-tt__table th:last-child, .ls-tt__table td:last-child { padding-right: 14px; }
  .ls-tt__table thead th { white-space: normal; }
}
@media (max-width: 480px) {
  .ls-tt__table { min-width: 0; font-size: 13px; }
  .ls-tt__table th, .ls-tt__table td { padding: 8px 6px; }
}
@media (max-width: 759.98px) {
  .ls-tt__table th:first-child, .ls-tt__table td:first-child { padding-left: 16px; }
  .ls-tt__table th:last-child, .ls-tt__table td:last-child { padding-right: 16px; }
}

/* Bar per year above a schedule. */
.ls-tt__chart { margin: 0; padding: 4px 20px 16px; }
.ls-tt__chart[hidden] { display: none; }
.ls-tt__chartsvg { display: block; width: 100%; height: 120px; }
.ls-tt__chartsvg rect { fill: var(--primary); opacity: .85; }
.ls-tt__chartsvg rect:last-child { opacity: 1; }
.ls-tt__chartlabels { display: flex; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ls-tt__chartlabels span { flex: 1 1 0; text-align: center; white-space: nowrap; overflow: visible; }
@media (max-width: 759.98px) { .ls-tt__chart { padding: 4px 16px 14px; } }

.ls-tt__noticetext { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink); user-select: all; white-space: pre-line; overflow-wrap: anywhere; }

/* Email tools: the email sits beside the inputs as the result. */
.ls-tt__letter .ls-tt__noticetext { user-select: text; }
.ls-tt__copy { margin-top: 16px; width: 100%; }
@media (min-width: 560px) { .ls-tt__copy { width: auto; } }
.ls-tt__next { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.ls-tt__alert[data-blocked][hidden] { display: none; }

/* Text tables (the insurance checklist): words wrap and the table fits a phone. */
.ls-tt__table--wrap { min-width: 0; table-layout: fixed; }
.ls-tt__table--wrap th, .ls-tt__table--wrap td { white-space: normal; vertical-align: top; line-height: 1.5; }
.ls-tt__table--wrap th:first-child, .ls-tt__table--wrap td:first-child { width: 36%; font-weight: 500; }

/* /tools/ index, grouped. */
.ls-toolgroup + .ls-toolgroup { margin-top: 28px; }
.ls-toolgroup__h { font: 600 18px/1.3 var(--font-ui); letter-spacing: -.01em; color: var(--ink); margin: 0 0 12px; }
@media (min-width: 1000px) { .ls-toolcards--3 { grid-template-columns: repeat(3, 1fr); } }
.ls-toolcards--3 .ls-toolcard { display: flex; flex-direction: column; }
.ls-toolcard__name { margin: 0 0 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.ls-toolcards--3 .ls-toolcard__title { font-size: 17px; line-height: 1.35; margin-bottom: 14px; }
.ls-toolcards--3 .ls-toolcard__links { margin-top: auto; }

/* Free COI review (templates/tools/coi_review.html). Form styles come from marketing.css. */
.ls-coi { }
.ls-coi__row { display: grid; gap: 16px; }
@media (min-width: 760px) { .ls-coi__row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ls-coi .ls-file { height: auto; padding: 10px 12px; font-size: 15px; }
.ls-coi textarea.ls-input { height: auto; padding: 10px 14px; line-height: 1.5; resize: vertical; }
.ls-coi__note { margin: -6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.ls-coi__agree .ls-tt__checkline { align-items: flex-start; font-weight: 400; line-height: 1.5; }
.ls-coi__agree input { margin-top: 2px; flex: none; width: 22px; height: 22px; accent-color: var(--primary); }
.ls-coi__list { margin: 0 0 12px; padding-left: 20px; font-size: 16px; line-height: 1.6; color: var(--ink); }
.ls-coi__list li + li { margin-top: 6px; }

/* Paired fields line up even when only one has a hint: each field spans four
   rows of the fields grid (label, hint, box, error) and shares them. */
@supports (grid-template-rows: subgrid) {
  .ls-tt__fields { row-gap: 0; }
  .ls-tt .ls-adv { margin-top: 0; }
  .ls-tt__field { padding-bottom: 14px; display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .ls-tt__field > .ls-calc__label { grid-row: 1; align-self: end; }
  .ls-tt__field > .ls-calc__help--top { grid-row: 2; }
  .ls-tt__field > .ls-calc__input, .ls-tt__field > .ls-affix { grid-row: 3; }
  .ls-tt__field > .ls-calc__err { grid-row: 4; }
  .ls-tt__field > .ls-tt__checkline { grid-row: 1 / 4; align-self: end; }
}
.ls-toolinfo__tips { max-width: 760px; margin: 0; padding: 0 0 0 20px; display: grid; gap: 10px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.ls-toolinfo__tips strong { color: var(--ink); font-weight: 600; }

/* Desktop: the result card is as tall as the inputs card beside it (Dean,
   Nov 30 2026). The big figure stays at the top; the smaller figures sit at
   the bottom of the card. */
@media (min-width: 960px) {
  .ls-tt .ls-calc__grid { align-items: stretch; }
  .ls-tt .ls-calc__aside { display: flex; flex-direction: column; }
  .ls-tt .ls-calc__aside > .ls-panel:last-of-type { flex: 1 1 auto; }
  .ls-tt .ls-result { display: flex; flex-direction: column; }
  .ls-tt .ls-result__more { margin-top: auto; }
  .ls-tt .ls-result__hero { margin-bottom: 18px; }
}
