/* LSL return check: the tool parts only. The fonts, colours, header, footer and buttons are ClearLevy's shared
   look (../assets/base.css, loaded first), so the check looks like the rest of the site (redesign, 30 Oct 2026).
   The DEX file check's tool parts (dex/styles.css) are styled the same way. LSL-only rules are at the end. */

main.wrap, .tool-band { max-width: calc(980px + 2 * var(--gutter)); }
main.wrap { padding-bottom: clamp(32px, 5vw, 56px); }

/* Under the header: the not-affiliated line */
.tool-band { padding-top: 12px; }
.tool-band p { margin: 0; font-size: .85rem; line-height: 1.45; color: var(--muted); }
.tag { font-size: .74rem; font-weight: 600; color: var(--ink-2); border: 1px solid var(--control); border-radius: 99px; padding: 1px 8px; margin-right: 6px; vertical-align: 1px; white-space: nowrap; }

main > .eyebrow { margin: 18px 0 6px; }
h1 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 10px; }
main > h1:first-child { margin-top: 24px; }
.lead { font-size: 1.05rem; line-height: 1.5; color: var(--ink-2); margin-top: 0; max-width: 46em; }
.lead strong { color: var(--ink); }
h2 { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); letter-spacing: -.02em; margin: 0 0 10px; display: flex; gap: 10px; align-items: center; }
h3 { font-size: 1.08rem; margin: 0 0 8px; }
h4 { font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--cream); font-family: var(--font-display); font-size: .95rem; flex: none; }

.promise { background: var(--ok-bg); border-left: 4px solid var(--ok); padding: 12px 16px; border-radius: var(--radius-sm); margin: 14px 0 20px; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin: 0 0 16px; }
.small { font-size: .9rem; color: var(--muted); }
.hidden-field { display: none; }
textarea.plain, select { font: inherit; }
label .opt { font-weight: 400; color: var(--muted); }

.row { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 12px 0; }
.row > label { flex: 1 1 260px; }
label { display: block; font-weight: 600; font-size: .95rem; }
input, select {
  display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 8px 12px;
  font: inherit; font-weight: 400; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--control); border-radius: var(--radius-sm);
}
input:hover, select:hover { border-color: var(--ink); }
input[type="file"] { padding: 8px; background: var(--cream); border-style: dashed; }
input[type="file"]::file-selector-button {
  margin-right: 12px; border: 0; border-radius: 999px; background: var(--ink); color: var(--cream);
  padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer;
}
input[type="checkbox"] { display: inline; width: 20px; height: 20px; min-height: 0; margin: 0 10px 0 0; accent-color: var(--ink); flex: none; }
label.check { font-weight: 400; display: flex; align-items: flex-start; }
label.check input { margin-top: 3px; }
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  font: inherit; font-weight: 600; line-height: 1.2; padding: 8px 20px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
}
button:hover { background: var(--cream-2); }
button.primary { background: var(--ink); color: var(--cream); }
button.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
details { margin-top: 12px; }
/* Fold-out rows and text-style buttons are easy to tap on a phone: at least 44px tall (first-time buyer review, 28 Oct 2026). */
summary { cursor: pointer; color: var(--ink); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
summary::before { content: "\25B8"; margin-right: .45em; transition: transform .15s ease; }
details[open] > summary::before { transform: rotate(90deg); }
summary::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: reduce) { summary::before { transition: none; } }

.status:empty { display: none; }
.status { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--cream); border: 1px solid var(--line); }
.status.bad { background: var(--err-bg); border-color: var(--err); color: var(--err); }
.status.good { background: var(--ok-bg); border-color: var(--ok); }
.status.warn { background: var(--warn-bg); border-color: var(--warn); }
textarea { display: block; width: 100%; margin: 8px 0; padding: 8px 10px; font: 0.85rem/1.4 ui-monospace, Menlo, Consolas, monospace; color: var(--ink); background: var(--paper); border: 1.5px solid var(--control); border-radius: var(--radius-sm); }
button.link { border: 0; background: none; padding: 0; min-height: 44px; border-radius: 0; font-weight: 400; color: inherit; text-decoration: underline; font-size: inherit; }
button.link:hover { background: none; text-decoration-thickness: .14em; }

a.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-weight: 600; padding: 8px 22px; border-radius: 999px; text-decoration: none; border: 2px solid var(--ink); color: var(--ink); }
a.button.primary { background: var(--ink); color: var(--cream); }
a.button.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.done-note { margin: 0; color: var(--muted); }

.map-row { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.summary { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.summary.good { background: var(--ok-bg); border: 1px solid var(--ok); }
.summary.bad { background: var(--err-bg); border: 1px solid var(--err); color: var(--err); }

.table-scroll { overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; color: var(--muted); font-weight: 700; }
tr.error td:first-child { border-left: 4px solid var(--err); }
tr.warning td:first-child { border-left: 4px solid var(--warn); }
.level { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tr.error .level { color: var(--err); }
tr.warning .level { color: var(--warn); }

@media (max-width: 600px) {
  .step { padding: 16px; }
  /* The problem list becomes one card per problem on a phone. */
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { padding: 8px 0 8px 12px; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 2px 0; }
  tr.error, tr.warning { border-left: 4px solid; }
  tr.error { border-left-color: var(--err); }
  tr.warning { border-left-color: var(--warn); }
  tr.error td:first-child, tr.warning td:first-child { border-left: 0; }
}

/* ---- LSL check only ---- */
.clients { margin: 0 0 14px; }
.clients > summary { width: fit-content; }
.clients .step { margin: 8px 0 0; padding: 14px 20px; }
.client-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.client-bar label { flex: none; }
.client-bar select { width: auto; min-width: 200px; flex: 1 1 200px; margin-top: 0; }
.clients .small { margin: 8px 0 0; }
.calendar { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); }
.calendar p { margin: 0 0 4px; }
details.more label { margin-top: 8px; max-width: 320px; }

.items-list { display: grid; gap: 0; margin: 12px 0; }
.item-row { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(220px, 2fr) auto; gap: 6px 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.item-row .what { font-weight: 600; overflow-wrap: anywhere; }
.item-row .what small { display: block; font-weight: 400; color: var(--muted); }
.item-row select { margin-top: 0; }
.chip { font-size: .8rem; font-weight: 600; border-radius: 99px; padding: 2px 10px; white-space: nowrap; justify-self: start; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.todo { background: var(--warn-bg); color: var(--warn); }
.chip.none { background: var(--err-bg); color: var(--err); }

.bulk { margin: 12px 0; max-width: 360px; }
.people { margin: 12px 0 20px; }
.person { display: grid; grid-template-columns: minmax(150px, 1.3fr) repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: end; }
.person .who { align-self: center; font-weight: 600; overflow-wrap: anywhere; }
.person .who small { display: block; font-weight: 400; color: var(--muted); }
.person label { font-size: .85rem; font-weight: 600; }
.person input, .person select { padding: 6px 8px; font-size: .95rem; }
.person.unsure .who::after { content: "Covered? Say yes or no"; display: block; font-size: .8rem; color: var(--err); font-weight: 600; }

td.amt, th.amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.figures tfoot td { font-weight: 700; border-top: 2px solid var(--ink); }
.working { margin: 4px 0 12px; }
.working table { font-size: .85rem; }
.working td.rule { color: var(--muted); min-width: 220px; }
.working-note { margin: 8px 0 0; }
.list-block { margin: 16px 0; }
.list-block h3 { margin-bottom: 6px; }
.list-block ul { margin: 0; padding-left: 1.2em; }
.list-block li { margin: 0 0 6px; }
.list-block.fix li::marker { color: var(--err); }
.list-block.check li::marker { color: var(--warn); }
/* The free preview: hidden workers' placeholders are blurred and read out as hidden. */
.blurred { filter: blur(4px); user-select: none; color: var(--muted); }
.preview-box { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--radius-sm); background: var(--cream); }
.preview-box p { margin: 0 0 8px; }
.preview-box p:last-child { margin-bottom: 0; }
.unlock { margin: 16px 0; padding: 16px 18px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); }
.pay-jump { margin: 12px 0 16px; }
.pay-jump a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.unlock .row { margin-top: 4px; }
.unlock h4 { margin: 14px 0 4px; font-size: 1rem; }
.ready-action { margin-top: 10px; }
#file-locked { margin: 12px 0; }
#file-panel { margin-top: 16px; }
#file-panel h3 { margin-top: 20px; }
.match { margin: 12px 0; }
.match ul { margin: 4px 0 8px; padding-left: 1.2em; }
#keep { margin-top: 16px; }
.fix-confirm { margin: 0 0 10px; }

/* Phones: a note that the check is best done on a computer, and a tighter first screen. */
.phone-note { display: none; }
@media (max-width: 700px) {
  .phone-note { display: block; margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--warn-bg); border: 1px solid var(--warn); font-weight: 600; font-size: .95rem; line-height: 1.45; }
  main > .eyebrow { margin-top: 16px; }
  .lead { font-size: 1rem; }
  .promise { font-size: .95rem; line-height: 1.5; padding: 10px 14px; margin: 10px 0 14px; }
}

@media (max-width: 600px) {
  .item-row { grid-template-columns: 1fr; }
  /* Two columns that can shrink: a date field's own minimum width mustn't push the row past a 320px screen. */
  .person { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .person > *, .person input, .person select { min-width: 0; max-width: 100%; }
  .person .who { grid-column: 1 / -1; }
  .person input[type="date"] { padding-inline: 6px 4px; font-size: .9rem; }
  .client-bar select { min-width: 0; }
  .figures table, .figures tbody, .figures tr, .figures td, .figures tfoot { display: block; width: 100%; }
  .figures thead { display: none; }
  .figures tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .figures td { border: 0; padding: 2px 0; text-align: left; }
  .figures td.amt, .working td.amt { text-align: left; }
  .figures tfoot tr { border-top: 2px solid var(--ink); }
  .figures tfoot td { border-top: 0; }
  .figures tfoot td:empty { display: none; }
  .figures td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; }
  /* A worker hidden in the free preview is one short line on a phone (name only), not a card of blurred
     placeholders, so the pay box isn't screens away (first-time buyer review, 30 Oct 2026). Same rows, nothing more shown. */
  .figures tbody tr.hidden-row td:has(.blurred) { display: none; }
  .figures tbody tr.hidden-row::after { content: "Figures in the full return"; display: block; font-size: .85rem; color: var(--muted); }
  .working table, .working tbody, .working tr, .working td { display: block; width: 100%; }
  .working thead { display: none; }
  .working td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}

@media print { .skip, .phone-note { display: none !important; } }
