/* dibz.ca/land-transfer-tax-calculator/ (build.mjs, assets/ltt.mjs). On top of site.css and blog.css;
   follows the visitor's light / dark theme through site.css's tokens, like the lead forms (lead-form.css). */
.ltt-page { --ltt-field: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ltt-page { --ltt-field: #0b1729; } }
:root[data-theme="dark"] .ltt-page { --ltt-field: #0b1729; }

.ltt-page .post-head { max-width: 1080px; }
.ltt-page .post-head h1, .ltt-page .post-head .answer { max-width: 820px; }
.ltt-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1080px; margin-top: 28px; }
@media (max-width: 900px) { .ltt-wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 20px; } }

.ltt-form, .ltt-out { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
@media (max-width: 600px) { .ltt-form, .ltt-out { padding: 20px 16px; border-radius: 18px; } }
.ltt-title { font-size: 24px; margin-bottom: 18px; }

.ltt-field { display: flex; flex-direction: column; gap: 6px; }
.ltt-field > span:first-child, .ltt-choice legend { font-size: 15px; font-weight: 650; color: var(--text); }
.ltt-field small { color: var(--muted); font-size: 13.5px; }
.ltt-money { display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 14px; background: var(--ltt-field); border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s; }
.ltt-money > span { color: var(--muted); font-size: 22px; font-weight: 700; }
.ltt-money input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 700 22px/1 var(--font); font-variant-numeric: tabular-nums; }
.ltt-money:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.ltt-money:has(input[aria-invalid="true"]) { border-color: #be123c; }

.ltt-choice { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.ltt-choice legend { padding: 0; margin-bottom: 8px; }
.ltt-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.ltt-seg label { position: relative; }
.ltt-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ltt-seg span { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--ltt-field); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .15s, border-color .15s; }
.ltt-seg input:checked + span { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--navy); }
.ltt-seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }

.ltt-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 15px; line-height: 1.45; color: var(--text); cursor: pointer; }
.ltt-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.ltt-note { margin-top: 14px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.ltt-note a { text-decoration: underline; }

.ltt-total { display: flex; flex-direction: column; gap: 2px; }
.ltt-total span { color: var(--muted); font-size: 15px; font-weight: 650; }
.ltt-total b { font-size: 44px; line-height: 1.1; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.ltt-total small { color: var(--muted); font-size: 14px; }
.ltt-lines { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.ltt-lines li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.ltt-lines b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ltt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ltt-actions .btn-line { padding: 14px 20px; }
.ltt-how { margin-top: 18px; }
.ltt-how summary { cursor: pointer; font-weight: 650; color: var(--accent); }
.ltt-how table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ltt-how caption { text-align: left; font-weight: 650; padding: 6px 0; color: var(--text); }
.ltt-how th, .ltt-how td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.ltt-how th:first-child, .ltt-how td:first-child { text-align: left; }
.ltt-how tfoot th, .ltt-how tfoot td { font-weight: 700; border-bottom: 0; }
