/* =============================================================================
   BillGrid public site: freelance payment laws (/freelance-payment-laws, its law pages) and the late fee
   calculator. Loads after outer/site.css and outer/pages.css and uses only their tokens.
   Design source: docs/mocks/site/payment-laws-spec.html (mock CSS: docs/mocks/site/payment-laws/payment-laws.css).
   ============================================================================= */

/* ---------- the three facts under the page head ---------- */
.pl-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 980px; margin-top: 36px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pl-facts li { padding: 18px 24px 0 0; }
.pl-facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.pl-facts b { display: block; font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: 600; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.pl-facts span { display: block; margin-top: 4px; font-size: var(--fs-sm); color: var(--text-muted); }
.pl-facts a { color: var(--caption); font-size: var(--fs-xs); text-underline-offset: 3px; }
@media (max-width: 720px) {
  .pl-facts { grid-template-columns: minmax(0, 1fr); }
  .pl-facts li, .pl-facts li + li { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- the checker: three questions in a row, the answer below ---------- */
.pl-check { margin-top: 8px; }
.pl-ask { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; align-items: end; }
.pl-ask .field select { width: 100%; padding: 12px 38px 12px 14px; border: 1px solid var(--field-border); border-radius: 10px; background: #fff; font: inherit; font-size: var(--fs-body); color: var(--ink); appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--caption) 50%), linear-gradient(135deg, var(--caption) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.pl-ask .field select:focus { outline: none; border-color: var(--ink); box-shadow: var(--field-focus); }
.pl-money { position: relative; }
.pl-money::before { content: "$"; position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--caption); pointer-events: none; }
.pl-ask .pl-money input { padding-left: 26px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .pl-ask { grid-template-columns: minmax(0, 1fr); } }

.pl-answer { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.pl-verdict { display: flex; gap: 14px; align-items: flex-start; }
.pl-verdict__icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--paid-bg); color: var(--paid-fg); }
.pl-verdict--muted .pl-verdict__icon { background: var(--paper); color: var(--caption); box-shadow: inset 0 0 0 1px var(--line); }
.pl-verdict h3 { font-size: var(--fs-lg); line-height: 1.25; letter-spacing: -.02em; }
.pl-verdict p { margin-top: 4px; color: var(--text-muted); }

/* one card per law; two laws (a city inside a state) sit side by side, so where they differ shows */
.pl-laws { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 22px; }
.pl-law { padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.pl-law.is-under { background: #fff; }
.pl-law__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pl-law__head h3 { margin: 0; font-size: var(--fs-md); letter-spacing: -.01em; color: var(--ink); }
.pl-law__meta { margin-top: 2px; font-size: var(--fs-sm); color: var(--caption); }
.pl-law dl { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 10px 14px; margin: 16px 0 0; }
.pl-law dt { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.pl-law dd { margin: 0; font-size: var(--fs-sm); color: var(--text); }
.pl-law dd ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-muted); }
.pl-law dd a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.pl-law__flag { display: inline-flex; align-items: center; gap: var(--icon-gap-xs); padding: 2px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; }
.pl-law__flag--on { background: var(--paid-bg); color: var(--paid-fg); }
.pl-law__flag--off { background: #fff; color: var(--caption); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 560px) { .pl-law dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .pl-law dd + dt { margin-top: 10px; } }

/* two laws for one place: aligned rows, so the differences show; on phones each row stacks, each value named */
.pl-pair { margin-top: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); overflow: hidden; }
.pl-pair table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.pl-pair :is(th, td) { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.pl-pair tbody tr:last-child > * { border-bottom: 0; }
.pl-pair thead th { width: 40%; border-bottom-color: var(--sand-300); }
.pl-pair__place { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: var(--fs-md); color: var(--ink); }
.pl-pair thead small { display: block; margin-top: 2px; font-weight: 400; color: var(--caption); }
.pl-pair tbody th { width: 20%; font-weight: 600; color: var(--ink); }
.pl-pair td { color: var(--text); }
.pl-pair td ul { margin: 0; padding-left: 18px; color: var(--text-muted); }
.pl-pair td a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
@media (max-width: 640px) {
  .pl-pair thead { display: none; }
  .pl-pair :is(table, tbody, tr, th, td) { display: block; width: auto; }
  .pl-pair tbody th { padding-bottom: 0; border: 0; }
  .pl-pair td { padding-top: 6px; border: 0; }
  .pl-pair td::before { content: attr(data-place); display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--gold-deep); }
  .pl-pair tbody tr { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
}

.pl-answer__tools { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: var(--fs-sm); }
.pl-link { display: inline-flex; align-items: center; gap: var(--icon-gap-sm); padding: 0; border: 0; background: none; color: var(--text-muted); font-size: var(--fs-sm); text-decoration: none; cursor: pointer; }
.pl-link:hover { color: var(--ink); }
.pl-note { margin-top: 14px; font-size: var(--fs-sm); color: var(--caption); }
.pl-note a { color: var(--ink); text-underline-offset: 3px; }

/* no law where you are: what still protects you */
.pl-still { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.pl-still li { display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.pl-still .bg-icon { flex: none; margin-top: 4px; color: var(--gold-deep); }
.pl-still a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ---------- "the law sets the deadline, BillGrid keeps it": the one sign-up offer on the page ---------- */
.pl-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; margin-top: 24px; padding: 22px 24px; border-left: 3px solid var(--gold); border-radius: 0 16px 16px 0; background: var(--paper); }
.pl-offer h3 { font-size: var(--fs-md); letter-spacing: -.01em; }
.pl-offer ul { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 8px 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--text-muted); }
.pl-offer li { display: inline-flex; align-items: center; gap: var(--icon-gap-sm); }
.pl-offer li .bg-icon { color: var(--paid-fg); }
.pl-offer__fine { grid-column: 1 / -1; margin: -6px 0 0; font-size: var(--fs-xs); color: var(--caption); }
@media (max-width: 720px) { .pl-offer { grid-template-columns: minmax(0, 1fr); } .pl-offer .btn { justify-self: start; } }

/* ---------- the table: every law at a glance; first column stays put while it scrolls on phones ---------- */
.pl-table { min-width: 980px; }
.pl-table th:first-child, .pl-table td:first-child { position: sticky; left: 0; background: #fff; }
.pl-table tbody th { width: auto; }
.pl-table td { width: auto; font-size: var(--fs-sm); }
.pl-table thead th, .pl-table td:nth-of-type(1) { white-space: nowrap; }
.pl-table td:first-of-type { color: var(--text-muted); }
.pl-table tbody th a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.pl-table small { display: block; color: var(--caption); font-size: var(--fs-xs); }
.pl-table tr:target > * { background: var(--gold-wash); }
.pl-table__tools { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; }

/* cite this: a quiet box that opens in place */
.pl-cite { max-width: 680px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: var(--fs-sm); }
.pl-cite code { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink); white-space: normal; word-break: break-word; }

/* ---------- method and watch list ---------- */
.pl-method { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; margin: 24px 0 0; padding: 0; list-style: none; }
.pl-method b { display: block; color: var(--ink); }
.pl-method span { display: block; margin-top: 4px; color: var(--text-muted); font-size: var(--fs-sm); }
@media (max-width: 860px) { .pl-method { grid-template-columns: minmax(0, 1fr); } }
.pl-watch { max-width: 780px; margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pl-watch li { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.pl-watch b { color: var(--ink); }
.pl-watch a { color: var(--text-muted); text-underline-offset: 3px; }
@media (max-width: 560px) { .pl-watch li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* "not legal advice": said once, plainly, near the top and again at the foot */
.pl-disclaimer { display: flex; gap: 10px; align-items: flex-start; max-width: 780px; margin-top: 22px; font-size: var(--fs-sm); color: var(--caption); }
.pl-disclaimer .bg-icon { flex: none; margin-top: 3px; }

/* ---------- a law's own page: timeline of what happens when ---------- */
.pl-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; max-width: 980px; margin: 26px 0 0; padding: 0; list-style: none; counter-reset: step; }
.pl-timeline li { position: relative; padding: 26px 18px 0 0; border-top: 2px solid var(--line); }
.pl-timeline li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--gold); }
.pl-timeline li.is-due::before { background: var(--gold); }
.pl-timeline li.is-late { border-top-color: var(--overdue-bg); }
.pl-timeline li.is-late::before { box-shadow: inset 0 0 0 2px var(--overdue-fg); }
.pl-timeline b { display: block; font-size: var(--fs-xs); font-family: var(--font-sans); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); }
.pl-timeline li.is-late b { color: var(--overdue-fg); }
.pl-timeline strong { display: block; margin-top: 6px; color: var(--ink); }
.pl-timeline span { display: block; margin-top: 4px; font-size: var(--fs-sm); color: var(--text-muted); }
@media (max-width: 720px) {
  .pl-timeline { grid-template-columns: minmax(0, 1fr); }
  .pl-timeline li { padding: 0 0 22px 26px; border-top: 0; border-left: 2px solid var(--line); }
  .pl-timeline li::before { top: 0; left: -7px; }
  .pl-timeline li.is-late { border-left-color: var(--overdue-bg); }
}

/* Calculator: a quiet input column and a distinct, readable answer. */
.lf-head { padding-block: 48px 32px; }
.lf-head h1 { font-size: clamp(36px, 4.5vw, 58px); }
.lf-head .lead { margin-top: 14px; }
.lf-panel { padding: 0; overflow: hidden; border-radius: var(--r-2xl); box-shadow: var(--shadow-sm); }
.lf { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: stretch; }
.lf__inputs { display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 3vw, 40px); }
.lf__intro h3 { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); }
.lf__intro p { margin-top: 8px; font-size: var(--fs-sm); color: var(--text-muted); }
.lf__step { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: var(--r-pill); background: var(--sand-100); color: var(--gold-deep); font-size: var(--fs-xs); font-weight: 600; vertical-align: middle; }
.lf__intro .lf__step { margin-right: 0; }
.lf__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lf__money { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 0; border: 1px solid var(--field-border); border-radius: var(--r-md); background: var(--bg-panel); }
.lf .lf__money :is(select,input) { border: 0; background: transparent; box-shadow: none; }
.lf .lf__money select { border-right: 1px solid var(--line); border-radius: var(--r-md) 0 0 var(--r-md); }
.lf .lf__money input { font-size: var(--fs-lg); padding-left: 16px; }
.lf__money:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
.lf select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--field-border); border-radius: var(--r-md); background: var(--bg-panel); font: inherit; color: var(--ink); }
.lf .field input { min-height: 48px; min-width: 0; font-variant-numeric: tabular-nums; }
.lf .field input[type=date] { width: 100%; }
.lf__money input { font-weight: 600; }
.lf__hint { font-size: var(--fs-sm); color: var(--text-muted); }
.lf__row + .lf__hint { margin-top: -14px; }
.lf__hint a { color: var(--ink); text-underline-offset: 3px; }
.lf__presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 0; padding: 0; border: 0; min-width: 0; }
.lf__presets legend { width: 100%; margin-bottom: 14px; padding: 0; font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.lf__preset { position: relative; }
.lf__preset input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lf__preset span { display: block; height: 100%; padding: 13px 12px 13px 32px; border: 1px solid var(--field-border); border-radius: var(--r-md); background: var(--bg-panel); font-size: var(--fs-sm); color: var(--ink); }
.lf__preset span::before { content: ''; position: absolute; width: 12px; height: 12px; top: 17px; left: 12px; border: 1px solid var(--sand-400); border-radius: var(--r-pill); }
.lf__preset b { display: block; font-size: var(--fs-sm); line-height: 1.4; font-weight: 600; }
.lf__preset small { display: block; margin-top: 5px; color: var(--text-muted); font-size: var(--fs-xs); }
.lf__preset input:checked + span { border-color: var(--gold); background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold); }
.lf__preset input:checked + span::before { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 3px var(--bg-panel); }
.lf__preset:hover span { border-color: var(--gold); }
.lf__preset input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 3px; }
.lf__preset-note { grid-column: 1 / -1; padding-top: 4px; font-size: var(--fs-sm); color: var(--text-muted); }
.lf__own { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; padding: 20px; margin-top: -10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.lf__charge, .lf__limit { grid-column: 1 / -1; }
.lf__charge-fields { display: grid; grid-template-columns: minmax(60px, .45fr) minmax(0, 1.55fr); gap: 8px; }
.lf__unit { display: flex; align-items: center; border: 1px solid var(--field-border); border-radius: var(--r-md); background: var(--bg-panel); }
.lf .lf__unit input { width: 100%; border: 0; background: transparent; box-shadow: none; padding-inline: 12px 4px; }
.lf__unit span { flex: none; padding-right: 12px; color: var(--text-muted); font-size: var(--fs-sm); }
.lf__unit:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
.lf__limit { border-top: 1px solid var(--line); padding-top: 12px; font-size: var(--fs-sm); }
.lf__limit summary { cursor: pointer; color: var(--ink); }
.lf__limit summary span { margin-left: 6px; font-size: var(--fs-xs); color: var(--text-muted); }
.lf__limit .field { max-width: 280px; margin-top: 12px; }
.lf:not(:has(input[name=terms][value=own]:checked)) .lf__own { display: none; }
.lf__result { padding: clamp(24px, 3vw, 40px); background: var(--paper); border-left: 1px solid var(--line); scroll-margin-top: 90px; min-width: 0; }
.lf__eyebrow { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.lf__total b { display: block; margin-top: 10px; font-family: var(--font-serif); font-size: clamp(48px, 5vw, 68px); font-weight: 400; line-height: 1.1; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lf__asof { margin-top: 10px; font-size: var(--fs-sm); color: var(--text-muted); }
.lf__balance { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 0; margin-top: 14px; border-bottom: 1px solid var(--field-border); }
.lf__balance span { font-size: var(--fs-sm); color: var(--ink); }
.lf__balance small { display: block; color: var(--text-muted); }
.lf__balance b { font-size: var(--fs-xl); font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lf__zero { margin-top: 14px; font-size: var(--fs-sm); color: var(--text-muted); }
.lf__detail { border-bottom: 1px solid var(--field-border); font-size: var(--fs-sm); }
.lf__detail summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 18px 0; list-style: none; font-weight: 600; color: var(--ink); cursor: pointer; }
.lf__detail summary::-webkit-details-marker { display: none; }
.lf__detail summary span { font-weight: 400; color: var(--text-muted); }
.lf__detail summary::after { content: '+'; margin-left: auto; font-size: var(--fs-lg); font-weight: 400; }
.lf__detail[open] summary::after { content: '\2212'; }
.lf__detail[open] { padding-bottom: 18px; }
.lf__yearly, .lf__law { color: var(--text-muted); font-size: var(--fs-sm); }
.lf__schedule { padding-block: 24px 18px; border-bottom: 1px solid var(--field-border); }
.lf__schedule h3 { font-size: var(--fs-sm); margin-bottom: 10px; }
.lf__fees { margin: 14px 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.lf__fees li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.lf__fees time, .lf__fees li.is-later { color: var(--text-muted); }
.lf__fees li.is-later b { font-weight: 400; }
.lf__fees em { font-style: normal; }
.lf__more, .lf__law { margin-top: 12px; }
.lf__warn { display: flex; gap: var(--icon-gap-sm); margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--overdue-bg); color: var(--overdue-fg); font-size: var(--fs-sm); }
.lf__warn .bg-icon { flex: none; margin-top: 3px; }
.lf__terms #lfSentence { font-size: var(--fs-body); color: var(--ink); line-height: 1.7; }
.lf__terms .pl-link { margin-block: 12px; font-weight: 600; }
.lf__terms-note { color: var(--text-muted); font-size: var(--fs-sm); }
.lf__actions { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; }
.lf__actions .pl-link { min-height: 44px; color: var(--ink); }
/* BillGrid as the schedule's last line, and after Copy wording; neither goes on the printed statement */
.lf__handoff { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 20px; margin-top: 12px;
               padding-top: 12px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-muted); }
.lf__handoff p { flex: 1 1 22em; }
.lf__handoff small { display: block; font-size: var(--fs-xs); color: var(--caption); }
.lf__go { display: inline-flex; align-items: center; gap: var(--icon-gap-xs); min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: none; }
.lf__go:hover { color: var(--gold-deep); }
.lf__go .bg-icon { color: var(--gold-deep); transition: translate .2s var(--ease-out); }
.lf__go:hover .bg-icon { translate: 2px 0; }
.lf__terms .lf__next { padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-muted); }
.lf__next a { display: inline-flex; align-items: center; gap: var(--icon-gap-xs); font-weight: 600; color: var(--ink); text-decoration-color: var(--gold);
              text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .lf__go .bg-icon { transition: none; } }
.lf__print-head, .lf__print-foot { display: none; }
.lf__peek { display: none; }
.lf-offer { margin-top: 24px; padding: 32px 36px; gap: 28px 36px; background: var(--ink); border: 1px solid var(--ink); border-radius: var(--r-xl); color: var(--on-accent); }
.lf-offer .kicker { color: var(--hl); }
.lf-offer h3 { margin-top: 12px; font-family: var(--font-serif); font-size: clamp(28px, 3vw, 38px); font-weight: 400; color: var(--on-accent); }
.lf-offer h3 + p { margin-top: 12px; color: var(--sand-200); max-width: 38em; }
.lf-offer__action { text-align: center; }
.lf-offer__action .btn { background: var(--gold-soft); color: var(--ink); border-color: var(--gold-soft); }
.lf-offer__action .btn:hover { background: var(--on-accent); border-color: var(--on-accent); }
.lf-offer__action p { margin-top: 10px; font-size: var(--fs-xs); color: var(--sand-200); }
.lf-offer__action a[aria-disabled=true] { opacity: .55; cursor: wait; }
.lf-offer__body { min-width: 0; }
.lf-offer__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 24px 0 0; padding: 24px 0 0; border-top: 1px solid var(--sand-600); }
.lf-offer__steps li { display: flex; gap: 12px; align-items: baseline; }
.lf-offer__steps > li > span { color: var(--hl); font-size: var(--fs-xs); }
.lf-offer__steps b { font-size: var(--fs-sm); font-weight: 600; }
.lf-offer__steps p { margin-top: 4px; font-size: var(--fs-sm); color: var(--sand-200); }
/* BillGrid's run of this invoice: a quiet timeline, its fees in gold */
.lf-offer__run { max-width: 40em; margin: 20px 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.lf-offer__run li { position: relative; display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 12px; padding: 6px 0 6px 22px; color: var(--sand-200); }
.lf-offer__run li::before { content: ""; position: absolute; left: 3px; top: 12px; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--sand-400); }
.lf-offer__run li:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 22px; bottom: -10px; width: 1px; background: var(--sand-600); }
.lf-offer__run li.is-fee::before { background: var(--hl); box-shadow: none; }
.lf-offer__run li.is-fee span { color: var(--on-accent); font-weight: 600; }
.lf-offer__run time { color: var(--sand-400); }
.lf-offer__note { margin-top: 14px; max-width: 40em; font-size: var(--fs-sm); color: var(--sand-200); }
.lf-offer__note b { font-weight: 600; color: var(--on-accent); }

/* The guide under the calculator: a contents list beside answer-first topics */
.lf-guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-block: 64px 40px; }
.lf-guide__toc { position: sticky; top: 96px; align-self: start; }
.lf-guide__toc ol { margin: 14px 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.lf-guide__toc li + li { margin-top: 10px; }
.lf-guide__toc a { color: var(--text-muted); text-decoration: none; }
.lf-guide__toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.lf-guide__body { max-width: 760px; }
.lf-topic + .lf-topic { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.lf-topic h2 { font-family: var(--font-serif); font-size: clamp(26px, 2.6vw, 32px); font-weight: 400; line-height: 1.15; scroll-margin-top: 96px; }
.lf-topic > p { margin-top: 16px; color: var(--text-muted); }
.lf-topic > p b { color: var(--ink); font-weight: 600; }
.lf-topic a { text-underline-offset: 3px; }
.lf-formula { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin: 28px 0 8px; }
.lf-formula div { padding-top: 14px; border-top: 2px solid var(--ink); }
.lf-formula dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); }
.lf-formula dd { margin: 8px 0 0; font-family: var(--font-serif); font-size: var(--fs-md); line-height: 1.4; color: var(--ink); }
.lf-countries { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-panel); overflow: hidden; }
.lf-countries table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.lf-countries :is(th, td) { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.lf-countries thead th { background: var(--paper); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--caption); white-space: nowrap; }
.lf-countries tbody tr:last-child > * { border-bottom: 0; }
.lf-countries tbody th { width: 22%; font-weight: 600; color: var(--ink); }
.lf-countries td { width: 39%; color: var(--text-muted); }
.lf-countries td b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.lf-countries a { color: var(--text-muted); text-decoration-color: var(--gold); }
.lf-topic .pl-note { margin-top: 16px; font-size: var(--fs-sm); }
.lf-steps { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: lf-step; }
.lf-steps li { position: relative; padding-left: 44px; color: var(--text-muted); counter-increment: lf-step; }
.lf-steps li + li { margin-top: 18px; }
.lf-steps li::before { content: counter(lf-step); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--sand-100); color: var(--gold-deep); font-size: var(--fs-xs); font-weight: 600; }
.lf-steps b { color: var(--ink); font-weight: 600; }
.lf-topic .faq { margin-top: 20px; }
.lf-topic .faq__answer p + p { margin-top: 12px; }
.lf-more { padding-block: 16px 48px; }
.lf-more h2 { font-size: var(--fs-md); }
.lf-more ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.lf-more a { display: block; height: 100%; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-panel); color: var(--text-muted); font-size: var(--fs-sm); text-decoration: none; transition: border-color .15s var(--ease-out); }
.lf-more a:hover { border-color: var(--gold); }
.lf-more b { display: block; margin-bottom: 6px; font-size: var(--fs-body); font-weight: 600; color: var(--ink); }
.lf-sources { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: var(--fs-xs); }
.lf-sources p { max-width: 60em; }
.lf-sources a { text-underline-offset: 3px; }
#lfTerms { scroll-margin-top: 96px; }
.lf__result[aria-busy=true] [data-result] { opacity: .55; }
.lf__result[data-invalid=true] [data-result] { display: none; }
.lf__result[data-invalid=true]::before { content: 'Check your invoice details and late-fee terms.'; color: var(--text-muted); }
@media (max-width: 800px) {
  .lf { grid-template-columns: minmax(0, 1fr); }
  .lf__result { border-left: 0; border-top: 1px solid var(--line); }
  .lf-guide { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 48px 32px; }
  .lf-guide__toc { position: static; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
  .lf-offer { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .lf-offer__action { justify-self: start; text-align: left; }
  .lf-offer__steps { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .lf-formula { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lf-more ul { grid-template-columns: minmax(0, 1fr); }
  .lf__peek { position: fixed; z-index: var(--z-sticky); left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: var(--icon-gap-sm); padding: 12px 18px; border-radius: var(--r-pill); background: var(--ink); color: var(--on-accent); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; transform: translateX(-50%); visibility: hidden; }
  .lf__peek.is-shown { visibility: visible; }
}
@media (max-width: 560px) {
  .lf__own > .field:not(.lf__charge) { grid-column: 1 / -1; }
  .lf-countries thead { display: none; }
  .lf-countries :is(table, tbody, tr, th, td) { display: block; width: auto; }
  .lf-countries tbody tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .lf-countries tbody tr:last-child { border-bottom: 0; }
  .lf-countries :is(tbody th, td) { width: auto; padding: 0; border: 0; }
  .lf-countries td { margin-top: 10px; }
  .lf-countries td::before { content: attr(data-label); display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--gold-deep); }
  .lf-offer__run li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 420px) {
  .lf__inputs, .lf__result { padding: 22px 18px; }
  .lf__row { gap: 10px; }
  .lf__own { padding: 16px 12px; column-gap: 10px; }
  .lf__preset span { padding-inline: 26px 8px; }
  .lf__preset span::before { left: 8px; }
  .lf .field input[type=date] { padding-inline: 8px; font-size: var(--fs-sm); }
  .lf__detail summary span { display: none; }
  .lf__fees li { grid-template-columns: 6.5em minmax(0, 1fr) auto; gap: 6px; }
}
@media print {
  .site-header, .site-footer, .pl-offer, .pl-answer__tools, .pl-ask, .skip-link { display: none !important; }
  .panel { box-shadow: none; border: 0; padding: 0; }
  .lf__detail::details-content { content-visibility: visible; display: block; }
  body:has(#lfCalc) :is(.site-header, .site-footer, .page-head, .page-section, .lf-guide, .lf-more, .lf-sources, .lf-offer, .lf__inputs, .lf__actions, .lf__peek, .lf__warn, [data-copy-terms], .lf__terms-note, .lf__handoff, .lf__next) { display: none !important; }
  .lf, .lf__result { display: block; padding: 0; background: var(--bg-panel); border: 0; }
  .lf__result[aria-busy=true] [data-result], .lf__result[data-invalid=true] [data-result] { display: none; }
  .lf__result[aria-busy=true]::before { content: 'The estimate is still updating. Wait for it to finish before printing.'; }
  .lf__result[data-invalid=true]::before { content: 'Check your entries before printing an estimate.'; }
  .lf-panel { border: 0; box-shadow: none; overflow: visible; }
  .lf__print-head, .lf__print-foot { display: block; margin-block: 24px; }
  .lf__print-head h2 { margin-top: 8px; font-size: var(--fs-xl); }
  .lf__print-foot { font-size: var(--fs-xs); overflow-wrap: anywhere; }
  .lf__fees li.is-later { display: none; }
  .lf__detail summary::after, .lf__detail summary span { display: none; }
}

/* ---------- the invoice due date calculator (/invoice-due-date-calculator): the late fee calculator's frame ---------- */
.dd__optional { font-weight: 400; color: var(--caption); }
.dd__money { position: relative; }
.dd__money::before { content: "$"; position: absolute; left: var(--space-3); top: 50%; translate: 0 -50%; color: var(--caption); pointer-events: none; }
.field .dd__money input { padding-left: var(--space-7); font-variant-numeric: tabular-nums; }
.dd__date { margin-top: var(--space-1); font-family: var(--font-serif); font-size: clamp(34px, 4vw, 48px); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.dd__closed { display: flex; gap: var(--icon-gap-md); margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--r-xl); background: var(--gold-wash); color: var(--text); font-size: var(--fs-sm); }
.dd__closed .bg-icon { flex: none; margin-top: 3px; color: var(--gold-deep); }
.dd__stops li { grid-template-columns: 6.5em minmax(0, 1fr) auto; }
.dd__stops li.is-due { font-weight: 600; color: var(--ink); }
.dd__stops li.is-due time { color: var(--ink); }
/* each kind of terms shows its own fields only while picked (no script needed) */
.lf:not(:has(input[name="terms"][value="net-eom"]:checked)) .dd__more[data-terms="net-eom"],
.lf:not(:has(input[name="terms"][value="discount"]:checked)) .dd__more[data-terms="discount"],
.lf:not(:has(input[name="terms"][value="business"]:checked)) .dd__more[data-terms="business"] { display: none; }

/* ---------- the UK interest calculator: several invoices in, one claim out ---------- */
.ukc__invoices { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ukc__invoices legend { margin-bottom: 6px; padding: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.ukc__inv { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--paper); }
.ukc__inv .field input { min-width: 0; padding: 10px 12px; background: var(--bg-panel); }
.ukc__inv .field input[type="date"] { min-height: 44px; }
.ukc__inv .field__label { justify-content: flex-start; gap: var(--icon-gap-sm); }
.ukc__pounds { position: relative; display: block; }
.ukc__pounds::before { content: "\00a3"; position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--caption); pointer-events: none; }
.ukc__inv .ukc__pounds input { padding-left: 24px; font-variant-numeric: tabular-nums; }
.ukc__remove { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-md); background: none; color: var(--caption); cursor: pointer; }
.ukc__remove:hover { background: var(--bg-panel); color: var(--ink); }
.ukc__inv:only-of-type .ukc__remove { display: none; }
.ukc__add { justify-self: start; }
.ukc__on { max-width: 15em; }
@media (max-width: 420px) { .ukc__inv { padding: 14px; gap: 10px; } .ukc__inv .field input[type="date"] { padding-inline: 8px; } }

.ukc-claims { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.ukc-claims :is(th, td) { padding: 9px 0 9px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.ukc-claims :is(th, td):first-child { padding-left: 0; text-align: left; }
.ukc-claims thead th { font-size: var(--fs-xs); font-weight: 600; color: var(--caption); white-space: nowrap; border-top: 1px solid var(--line); }
.ukc-claims tbody th { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ukc-claims tbody th small { display: block; font-weight: 400; color: var(--text-muted); }
.ukc-claims td { color: var(--ink); white-space: nowrap; }
.ukc-claims tr.is-idle td { color: var(--caption); }
.ukc-claims__note { font-style: normal; }
@media (max-width: 560px) {
  .ukc-claims thead { display: none; }
  .ukc-claims tbody tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ukc-claims tbody :is(th, td) { padding: 0; border: 0; text-align: left; }
  .ukc-claims tbody th, .ukc-claims tr.is-idle td { grid-column: 1 / -1; }
  .ukc-claims td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-xs); color: var(--caption); }
  .ukc-claims td { white-space: normal; }
}
.ukc-sums { display: grid; gap: 0; margin: 14px 0 0; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.ukc-sums div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; color: var(--text-muted); }
.ukc-sums dd { margin: 0; color: var(--ink); }
.ukc-sums .is-total { border-top: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.ukc-daily { margin-top: 8px; font-size: var(--fs-sm); color: var(--text-muted); }
.ukc-daily b { font-weight: 600; color: var(--ink); }
.ukc-close { display: none; }

.ukc-rates tbody th { width: 34%; white-space: nowrap; }
.ukc-rates td { width: 33%; }
@media (max-width: 640px) { .ukc-rates tbody th { white-space: normal; } }

/* the UK calculator prints as a claim letter: names and signature left blank to fill in, the claim, a link back */
@media print {
  body:has(#ukcCalc) :is(.page-head, .page-section, .lf__inputs, .lf__actions, .lf__peek) { display: none !important; }
  #ukcCalc, #ukcCalc .lf__result { display: block; position: static; padding: 0; border: 0; background: var(--bg-panel); }
  #ukcCalc .lf__print-head, #ukcCalc .lf__print-foot { display: block; margin-block: var(--space-6); }
  #ukcCalc :is(.lf__total, .lf__yearly) { display: none !important; }
  .ukc-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 22px 0 0; font-size: var(--fs-sm); }
  .ukc-parties dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--caption); }
  .ukc-parties dd { min-height: 28px; margin: 4px 0 0; border-bottom: 1px solid var(--ink); color: var(--ink); }
  .ukc-parties div:last-child dd { border-bottom: 0; }
  .lf__print-head .ukc-letter { margin-top: 22px; font-size: var(--fs-body); color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 400; }
  .ukc-claims tbody tr { break-inside: avoid; }
  .ukc-close { display: block; margin-top: 24px; color: var(--ink); }
  .ukc-sign { width: 50%; margin-top: 44px; padding-top: 6px; border-top: 1px solid var(--ink); font-size: var(--fs-sm); color: var(--caption); }
}

.dd__more { padding: var(--space-4); border: 1px dashed var(--field-border); border-radius: var(--r-xl); line-height: 2.6; }
.dd__more input, .dd__more select { display: inline-block; width: auto; padding: var(--space-2); border: 1px solid var(--field-border); border-radius: var(--r-md); background: var(--bg-panel); font: inherit; color: var(--ink); }
.dd__more input { width: 5em; text-align: right; font-variant-numeric: tabular-nums; }
.dd__more select { max-width: 100%; }
.lf__result[aria-busy=true] [data-result], .lf__result[data-invalid=true] [data-result] { opacity: .45; pointer-events: none; }