/* LingoDesk work screens (phase 1): lists, forms, tabs, pills, dialog, diary. Uses the tokens in lingodesk.css. */
:root { --ld-info: #1d5fa8; --ld-info-soft: #e8f0fb; --ld-danger-soft: #fdecea; --ld-row-hover: #faf9f6; --ld-head: #faf9f6;
  --ld-backdrop: rgba(20, 28, 26, .38);
  --ld-svc-onsite: #156b5b; --ld-svc-phone: #6941c6; --ld-svc-video: #1d5fa8; --ld-svc-translation: #b7791f; --ld-svc-transcription: #a6286a; --ld-svc-proofreading: #4f7a0f; --ld-svc-other: #667085; }
:root[data-skin="evergreen"] { --ld-row-hover: #f4f7f6; --ld-head: #f7f9f8; }
:root[data-skin="midnight"] { --ld-info: #8ab8ee; --ld-info-soft: #172739; --ld-danger-soft: #3a1d1a; --ld-row-hover: #1a2422; --ld-head: #121a18;
  --ld-backdrop: rgba(0, 0, 0, .6);
  --ld-svc-onsite: #5cc2b1; --ld-svc-phone: #b39cf0; --ld-svc-video: #8ab8ee; --ld-svc-translation: #f0b75c; --ld-svc-transcription: #ef8cc0; --ld-svc-proofreading: #a6d36b; --ld-svc-other: #98a2b3; }
@media (prefers-color-scheme: dark) {
  :root[data-skin="system"] { --ld-info: #8ab8ee; --ld-info-soft: #172739; --ld-danger-soft: #3a1d1a; --ld-row-hover: #1a2422; --ld-head: #121a18;
    --ld-backdrop: rgba(0, 0, 0, .6);
    --ld-svc-onsite: #5cc2b1; --ld-svc-phone: #b39cf0; --ld-svc-video: #8ab8ee; --ld-svc-translation: #f0b75c; --ld-svc-transcription: #ef8cc0; --ld-svc-proofreading: #a6d36b; --ld-svc-other: #98a2b3; }
}
.ld-main a { color: var(--ld-accent); }
.ld-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.ld-toolbar .ld-grow { flex: 1 1 auto; }
.ld-toolbar input[type=search], .ld-toolbar select, .ld-toolbar input[type=date] { min-height: 38px; border: 1px solid var(--ld-line-strong); border-radius: 8px; padding: 0 12px;
  background: var(--ld-surface); color: var(--ld-fg); font: 14px var(--ld-font); }
.ld-toolbar input[type=search] { width: min(320px, 100%); }

.ld-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--ld-line); margin: 0 0 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.ld-tabs a, .ld-tabs button { padding: 9px 14px; color: var(--ld-muted) !important; text-decoration: none; border: 0; background: none; font: 500 14px var(--ld-font);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.ld-tabs a.is-on, .ld-tabs button.is-on { color: var(--ld-fg) !important; border-bottom-color: var(--ld-accent); font-weight: 600; }
.ld-tabs a:hover, .ld-tabs button:hover { color: var(--ld-fg) !important; }
.ld-count { font: 500 11px/1.6 var(--ld-mono); background: var(--ld-line); color: var(--ld-fg); border-radius: 999px; padding: 0 6px; margin-left: 4px; }

.ld-table-wrap { overflow-x: auto; background: var(--ld-surface); border: 1px solid var(--ld-line); border-radius: var(--ld-radius); box-shadow: var(--ld-shadow); }
.ld-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ld-table th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ld-muted);
  padding: 10px 14px; border-bottom: 1px solid var(--ld-line); white-space: nowrap; background: var(--ld-head); }
.ld-table td { padding: 11px 14px; border-bottom: 1px solid var(--ld-line); vertical-align: top; }
.ld-table tbody tr:last-child td { border-bottom: 0; }
.ld-table tbody tr:hover { background: var(--ld-row-hover); }
.ld-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ld-table .nowrap { white-space: nowrap; }
.ld-docno { white-space: nowrap; }
/* Jobs list on a narrow laptop (review 5): the job's name keeps room; the languages go between 901 and 1100px (the
   cards below 900px show them again); the two dates wrap together */
.ld-table .col-job { min-width: 170px; }
@media (min-width: 901px) and (max-width: 1100px) { .ld-table .col-lang { display: none; } }
.ld-daterange { display: inline-flex; flex-wrap: nowrap; gap: 8px; align-items: center; }   /* INV-0004 never splits into "INV-" / "0004" */
.ld-table .sub { display: block; color: var(--ld-muted); font-size: 12px; margin-top: 2px; }
.ld-table tfoot td { font-weight: 600; border-top: 1px solid var(--ld-line); }
.ld-table td input, .ld-table td select { width: 100%; min-height: 34px; border: 1px solid var(--ld-line); border-radius: 6px; padding: 4px 8px;
  background: var(--ld-surface); color: var(--ld-fg); font: 14px var(--ld-font); }
.ld-table td input.num { text-align: right; }

.ld-pill { display: inline-block; font: 500 12px/1.75 var(--ld-font); padding: 0 8px; border-radius: 999px; white-space: nowrap;
  background: var(--ld-line); color: var(--ld-fg); }
.ld-pill.is-ok { background: var(--ld-accent-soft); color: var(--ld-accent); }
.ld-pill.is-warn { background: var(--ld-warn-soft); color: var(--ld-warn); }
.ld-pill.is-danger { background: var(--ld-danger-soft); color: var(--ld-danger); }
.ld-pill.is-info { background: var(--ld-info-soft); color: var(--ld-info); }
.ld-pill.is-muted { background: transparent; box-shadow: inset 0 0 0 1px var(--ld-line); color: var(--ld-muted); }

.ld-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ld-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.ld-form-grid .is-wide { grid-column: 1 / -1; }
.ld-field label, .ld-label { display: block; font-size: 13px; font-weight: 500; margin: 0 0 4px; }
.ld-help { display: block; font-size: 12px; color: var(--ld-muted); margin-top: 3px; }
.ld-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .ld-field select, .ld-field textarea {
  width: 100%; min-height: 38px; border: 1px solid var(--ld-line); border-radius: 6px; padding: 6px 10px; background: var(--ld-surface);
  color: var(--ld-fg); font: 14px var(--ld-font); }
.ld-field textarea { min-height: 80px; resize: vertical; }
.ld-field input:focus, .ld-field select:focus, .ld-field textarea:focus, .ld-table td input:focus { outline: 2px solid var(--ld-accent); outline-offset: 0; border-color: var(--ld-accent); }
.ld-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.ld-check input { margin-top: 3px; accent-color: var(--ld-accent); }
.ld-section { margin: 22px 0 10px; font-size: 15px; font-weight: 600; }
.ld-section:first-child { margin-top: 0; }
.ld-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ld-btn.is-danger { color: var(--ld-danger); }
.ld-btn.is-danger:hover { border-color: var(--ld-danger); }
.ld-btn.is-small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.ld-btn.is-link { border: 0; background: none; padding: 0 4px; color: var(--ld-accent); min-height: 0; }
.ld-note.is-error { background: var(--ld-danger-soft); border-left-color: var(--ld-danger); }
.ld-note.is-info { background: var(--ld-info-soft); border-left-color: var(--ld-info); }
.ld-note { margin: 0 0 12px; }

.ld-two { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.ld-two > * { min-width: 0; }   /* a wide table scrolls inside its own box instead of widening the page */
.ld-stack { display: grid; gap: 16px; align-content: start; }
.ld-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ld-stat { background: var(--ld-surface); border: 1px solid var(--ld-line); border-radius: var(--ld-radius); padding: 14px 18px; text-decoration: none;
  color: inherit !important; box-shadow: var(--ld-shadow); transition: border-color .12s, box-shadow .12s; }
.ld-stat span { display: block; font-size: 12.5px; color: var(--ld-muted); }
.ld-stat strong { display: block; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; color: var(--ld-fg); letter-spacing: -.02em; }
.ld-stat.is-warn strong { color: var(--ld-warn); }
a.ld-stat:hover { border-color: var(--ld-accent); box-shadow: var(--ld-shadow-lg); }
.ld-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.ld-dl dt { color: var(--ld-muted); font-weight: 400; }
.ld-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.ld-mono { font-family: var(--ld-mono); font-size: 13px; }
.ld-copy { display: flex; gap: 6px; align-items: center; }
.ld-copy input { flex: 1; min-width: 0; font: 13px var(--ld-mono); min-height: 34px; border: 1px solid var(--ld-line); border-radius: 6px; padding: 0 8px; background: var(--ld-bg); color: var(--ld-fg); }
.ld-list { list-style: none; margin: 0; padding: 0; }
.ld-list li { padding: 8px 0; border-bottom: 1px solid var(--ld-line); font-size: 14px; }
.ld-list li:last-child { border-bottom: 0; }
.ld-muted { color: var(--ld-muted); }
.ld-pre { white-space: pre-wrap; font: 13px/1.5 var(--ld-font); background: var(--ld-bg); border: 1px solid var(--ld-line); border-radius: 6px; padding: 10px 12px; max-height: 420px; overflow: auto; margin: 0; }

.ld-dialog-backdrop { position: fixed; inset: 0; background: var(--ld-backdrop); display: grid; place-items: center; z-index: 50; padding: 16px; }
.ld-dialog { background: var(--ld-surface); color: var(--ld-fg); border-radius: 10px; width: min(560px, 100%); max-height: calc(100vh - 32px);
  overflow: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.ld-dialog.is-wide { width: min(760px, 100%); }
.ld-dialog > header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--ld-line); }
.ld-dialog > header h2 { margin: 0; font-size: 17px; font-weight: 600; }
.ld-dialog > header button { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ld-muted); cursor: pointer; }
.ld-dialog-body { padding: 16px 18px; }
.ld-dialog > footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--ld-line); }

/* diary */
.ld-diary-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.ld-diary-head h2 { margin: 0 8px 0 0; font-size: 18px; font-weight: 600; min-width: 190px; }
.ld-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--ld-line); border-radius: var(--ld-radius); background: var(--ld-surface); overflow: hidden; }
.ld-week.is-day { grid-template-columns: 1fr; }
.ld-day { min-height: 380px; border-right: 1px solid var(--ld-line); display: flex; flex-direction: column; min-width: 0; }
.ld-day:last-child { border-right: 0; }
.ld-week.is-day .ld-day { min-height: 240px; }
.ld-day-head { padding: 8px 10px; border-bottom: 1px solid var(--ld-line); font-size: 13px; display: flex; justify-content: space-between; gap: 6px; }
.ld-day-head a { color: var(--ld-fg) !important; text-decoration: none; font-weight: 500; }
.ld-day-count { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ld-day-badge { font-size: 10.5px; padding: 0 5px; border-radius: 8px; background: var(--ld-line); color: var(--ld-muted); line-height: 16px; }
.ld-item-tag { font-style: italic; }
.ld-day.is-today .ld-day-head { background: var(--ld-accent-soft); }
.ld-day.is-today .ld-day-head a { color: var(--ld-accent) !important; }
/* one track no wider than the day: an implicit auto track grows to the longest one-line client name and spills into the next day */
.ld-day-items { padding: 6px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
.ld-item { display: block; text-align: left; width: 100%; border: 1px solid var(--ld-line); border-left: 4px solid var(--svc, var(--ld-accent)); border-radius: 6px; padding: 6px 8px;
  background: var(--ld-bg); color: var(--ld-fg) !important; text-decoration: none; font-size: 12.5px; line-height: 1.35; cursor: pointer; min-width: 0; overflow-wrap: break-word; hyphens: manual; }
.ld-item strong { display: block; font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.ld-item .ld-item-sub { color: var(--ld-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.ld-item .ld-item-sub.is-clash-note { color: var(--ld-danger); white-space: normal; }
.ld-item.is-enquiry { border-left-style: dashed; }
.ld-item.is-cancelled { opacity: .55; text-decoration: line-through !important; }
/* service colours: the card's left stripe and the key under the diary; a clash stays red whatever the service */
.svc-onsite { --svc: var(--ld-svc-onsite); } .svc-phone { --svc: var(--ld-svc-phone); } .svc-video { --svc: var(--ld-svc-video); }
.svc-translation { --svc: var(--ld-svc-translation); } .svc-transcription { --svc: var(--ld-svc-transcription); }
.svc-proofreading { --svc: var(--ld-svc-proofreading); } .svc-other { --svc: var(--ld-svc-other); }
.ld-item.is-clash { border-left-color: var(--ld-danger); background: var(--ld-danger-soft); }
.ld-diary-key { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; color: var(--ld-muted); }
.ld-diary-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--svc); }
.ld-diary-key i.is-clash { background: var(--ld-danger); }
.ld-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--ld-line); border-radius: var(--ld-radius); background: var(--ld-surface); overflow: hidden; }
.ld-month .ld-dow { padding: 6px 8px; font-size: 12px; color: var(--ld-muted); border-bottom: 1px solid var(--ld-line); }
.ld-month .ld-cell { min-height: 96px; border-right: 1px solid var(--ld-line); border-bottom: 1px solid var(--ld-line); padding: 4px; min-width: 0; }
.ld-month .ld-cell:nth-child(7n) { border-right: 0; }
.ld-month .ld-cell.is-other { background: var(--ld-bg); }
.ld-month .ld-cell.is-today { box-shadow: inset 0 0 0 2px var(--ld-accent); }
.ld-month .ld-num { font-size: 12px; font-weight: 500; padding: 2px 4px; color: var(--ld-fg) !important; text-decoration: none; }
.ld-month .ld-item { padding: 2px 6px; margin-top: 3px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-month .ld-more { font-size: 11px; color: var(--ld-muted); padding: 2px 4px; }

@media (max-width: 1100px) { .ld-two { grid-template-columns: 1fr; } }
/* an invoice or quote: its line table needs the room, so the side column goes underneath on a laptop too */
@media (max-width: 1280px) { .ld-two.is-doc { grid-template-columns: 1fr; } }

/* sortable list headings, a date range in a toolbar */
a.ld-sort { color: inherit !important; text-decoration: none; }
a.ld-sort:hover, a.ld-sort.is-on { color: var(--ld-accent) !important; }
.ld-inline-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ld-muted); }
.ld-inline-label input { width: auto; }

/* the inbox's own tabs (booking emails / agency offers / my mailbox), above each page's smaller filters */
.ld-inbox-tabs { margin-bottom: 10px; }
.ld-inbox-tabs a { font-size: 15px; font-weight: 600; }

/* the days of a multi-day booking (job page) */
.ld-series { margin-top: 22px; }
.ld-series-days { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.ld-series-days li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ld-series-days li.is-this { font-weight: 600; }

/* moving to another page (js/account-menu.js): a bar at the very top and the old page dimmed after a moment */
html.is-navigating::before { content: ""; position: fixed; top: 0; left: 0; z-index: 2000; height: 3px; width: 40%; background: var(--ld-accent);
  animation: ld-nav-bar 1.1s ease-in-out infinite; }
html.is-navigating .ld-main { opacity: .4; transition: opacity .15s ease .2s; pointer-events: none; }
/* and, if it takes a moment, a "Loading" label under the banner (review B16: the old page looked like the new one) */
html.is-navigating body::after { content: "Loading\2026"; position: fixed; top: calc(var(--ld-banner-h, 0px) + 14px); left: 50%; z-index: 2000;
  transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: var(--ld-surface); color: var(--ld-fg); border: 1px solid var(--ld-line);
  box-shadow: var(--ld-shadow-lg); font: 500 13px var(--ld-font); opacity: 0; animation: ld-nav-label .2s ease .45s forwards; pointer-events: none; }
@keyframes ld-nav-label { to { opacity: 1; } }
@keyframes ld-nav-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { html.is-navigating::before { animation: none; width: 100%; opacity: .7; } }

/* cancel / delete, apart from Save */
.ld-danger-zone { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--ld-line); }
.ld-card.ld-danger-zone, .ld-card.ld-series { margin-top: 0; padding-top: 20px; border-top: 1px solid var(--ld-line); }

/* forms in sections (SectionHead / FormSection - job, quote, invoice, client, business pages): an icon, a title and one
   line per section; inside .ld-sections.is-cards each section is a card, otherwise sections are parted by a line */
.ld-sections { display: grid; }
.ld-jsec { padding: 18px 0; border-top: 1px solid var(--ld-line); min-width: 0; }
.ld-jsec:first-child { padding-top: 0; border-top: 0; }
.ld-jsec:last-child { padding-bottom: 0; }
.ld-sections.is-cards { gap: 14px; }
.ld-sections.is-cards .ld-jsec { padding: 18px 22px 20px; background: var(--ld-surface); border: 1px solid var(--ld-line); border-radius: var(--ld-radius); }
.ld-jsec-head { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.ld-jsec-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  background: var(--ld-accent-soft); color: var(--ld-accent); }
.ld-jsec-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ld-jsec-title { flex: 1 1 auto; min-width: 0; }
.ld-jsec-title h2, .ld-jsec-title h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.ld-jsec-title p { margin: 2px 0 0; font-size: 12.5px; color: var(--ld-muted); }
.ld-jsec-amount { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ld-jsec .ld-field textarea { width: 100%; }
/* Save in reach while scrolling the sections */
.ld-savebar, .ld-job-savebar { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 8px; align-items: center; padding: 10px 14px;
  background: var(--ld-surface); border: 1px solid var(--ld-line); border-radius: var(--ld-radius); box-shadow: var(--ld-shadow-lg); }
/* the job in one line under its title */
.ld-job-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 16px; }
.ld-job-summary span { display: inline-flex; align-items: center; padding: 4px 11px; border: 1px solid var(--ld-line); border-radius: 999px;
  background: var(--ld-surface); font-size: 13px; color: var(--ld-fg); }
.ld-job-summary b { font-weight: 600; }
.ld-danger-zone .ld-help { margin: 0; }

/* rates (settings, a client): fixed columns, the service takes the rest; one card per rate on a phone */
.ld-rates { table-layout: fixed; width: 100%; }
.ld-rates .c-per { width: 100px; } .ld-rates .c-num { width: 78px; } .ld-rates .c-x { width: 40px; }
/* no spinner arrows here: they ate the room the amount needs ("35.0") */
.ld-rates input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.ld-rates input[type=number]::-webkit-inner-spin-button, .ld-rates input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ld-rates thead th { font-size: 10.5px; letter-spacing: .02em; }
.ld-rates td, .ld-rates th { padding-left: 6px; padding-right: 6px; vertical-align: middle; }
.ld-rates th { white-space: normal; line-height: 1.25; }
.ld-rates select, .ld-rates input { width: 100%; min-width: 0; }
.ld-rates .ld-x { margin-top: 0; }
.ld-rates .ld-rate-extra td { padding-top: 0; }
@media (max-width: 760px) {
  .ld-rates, .ld-rates tbody { display: block; }
  .ld-rates thead, .ld-rates colgroup { display: none; }
  .ld-rates tbody tr { display: grid; grid-template-columns: 1fr 1fr 1fr 36px; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--ld-line); }
  .ld-rates tbody tr.ld-rate-extra { display: block; padding-top: 0; }
  .ld-rates tbody td { padding: 0; border: 0; }
  .ld-rates tbody td:first-child { grid-column: 1 / -1; }
}

/* editable invoice / quote lines: fixed columns, the description takes the rest; one card per line on a phone */
.ld-lines { table-layout: fixed; width: 100%; }
.ld-lines .c-qty { width: 96px; } .ld-lines .c-price { width: 104px; } .ld-lines .c-amt { width: 104px; } .ld-lines .c-x { width: 48px; }
.ld-lines td, .ld-lines th { vertical-align: top; padding-left: 8px; padding-right: 8px; }
.ld-lines td:first-child, .ld-lines th:first-child { padding-left: 14px; }
.ld-lines input { width: 100%; min-width: 0; }
.ld-lines .ld-line-sub { margin-top: 4px; font-size: 12px; min-height: 30px; }
.ld-lines td.num { padding-top: 14px; white-space: nowrap; }
.ld-x { width: 30px; height: 30px; padding: 0; border-radius: 6px; border: 1px solid var(--ld-line); background: var(--ld-surface); color: var(--ld-muted);
  font-size: 18px; line-height: 1; cursor: pointer; margin-top: 6px; }
.ld-x:hover { color: var(--ld-danger); border-color: var(--ld-danger); }
.ld-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .ld-lines, .ld-lines tbody, .ld-lines tfoot { display: block; }
  .ld-lines thead { display: none; }
  .ld-lines tbody tr { display: grid; grid-template-columns: 1fr 1fr 1fr 36px; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--ld-line); }
  .ld-lines tbody td { padding: 0; border: 0; }
  .ld-lines tbody td:first-child { grid-column: 1 / -1; }
  .ld-lines tbody td.num { padding-top: 10px; }
  .ld-lines tfoot tr { display: flex; justify-content: space-between; }
  .ld-lines tfoot td { border: 0; padding: 4px 0; }
  .ld-lines tfoot td:empty { display: none; }
}
@media (min-width: 821px) and (max-width: 1280px) {
  .ld-week:not(.is-day) .ld-day-items { padding: 4px; gap: 4px; }
  .ld-week:not(.is-day) .ld-item { padding: 5px 6px; }
}
@media (max-width: 820px) {
  .ld-week { grid-template-columns: 1fr; }
  .ld-day { min-height: 0; border-right: 0; border-bottom: 1px solid var(--ld-line); }
  .ld-month .ld-cell { min-height: 58px; }
  .ld-month .ld-item { display: none; }
  .ld-month .ld-cell.has-items .ld-num { color: var(--ld-accent) !important; font-weight: 700; }
  .ld-page-header h1 { font-size: 22px; }
}

.ld-input { min-height: 34px; border: 1px solid var(--ld-line); border-radius: 6px; padding: 4px 8px; background: var(--ld-surface); color: var(--ld-fg); font: 14px var(--ld-font); }
.ld-input:focus { outline: 2px solid var(--ld-accent); border-color: var(--ld-accent); }
.ld-tabs.is-plain { overflow: visible; }

/* phase 2: translation editor (source | translation side by side), progress, signatures, public link pages, availability */
.ld-segs { display: grid; gap: 0; background: var(--ld-surface); border: 1px solid var(--ld-line); border-radius: var(--ld-radius); }
.ld-seg { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 150px; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--ld-line); align-items: start; }
.ld-seg:last-child { border-bottom: 0; }
.ld-seg.is-head { font-size: 12px; font-weight: 600; color: var(--ld-muted); padding-top: 8px; padding-bottom: 8px; }
.ld-seg.is-confirmed { background: var(--ld-accent-soft); }
.ld-seg .ld-seq { font: 12px var(--ld-mono); color: var(--ld-muted); padding-top: 6px; }
.ld-seg .ld-src { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 6px; }
.ld-seg textarea { width: 100%; min-height: 60px; border: 1px solid var(--ld-line); border-radius: 6px; padding: 6px 8px; font: 14px var(--ld-font); background: var(--ld-surface); color: var(--ld-fg); resize: vertical; }
.ld-seg .ld-seg-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.ld-alt { margin-top: 6px; padding: 8px; border: 1px dashed var(--ld-accent); border-radius: 6px; font-size: 13px; white-space: pre-wrap; }
.ld-progress { height: 8px; background: var(--ld-line); border-radius: 999px; overflow: hidden; }
.ld-progress > span { display: block; height: 100%; background: var(--ld-accent); transition: width .4s; }
.ld-sign { display: block; width: 100%; max-width: 560px; height: 200px; border: 1px solid var(--ld-line); border-radius: var(--ld-radius); background: #fff; touch-action: none; cursor: crosshair; }
.ld-picture { max-width: 180px; max-height: 120px; border: 1px solid var(--ld-line); border-radius: 6px; background: #fff; padding: 4px; }
.ld-public { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.ld-public-brand { font-size: 13px; color: var(--ld-muted); margin: 0 0 16px; }
.ld-public h1 { font-size: 24px; margin: 0 0 6px; }
.ld-avail { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ld-avail-day { background: var(--ld-surface); border: 1px solid var(--ld-line); border-radius: 6px; padding: 8px; font-size: 13px; min-height: 84px; }
.ld-avail-day.is-off { background: var(--ld-bg); color: var(--ld-muted); }
.ld-avail-day b { display: block; font-size: 12px; margin-bottom: 4px; }
.ld-busy { display: block; background: var(--ld-warn-soft); color: var(--ld-warn); border-radius: 4px; padding: 1px 6px; margin-top: 3px; font: 12px var(--ld-mono); }
@media (max-width: 820px) {
  .ld-seg { grid-template-columns: 1fr; }
  .ld-seg.is-head { display: none; }
  .ld-seg .ld-seg-actions { flex-direction: row; flex-wrap: wrap; }
  .ld-avail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the connected inbox: one email beside its actions */
.ld-two.is-wide-side { grid-template-columns: minmax(0, 1fr) 400px; }
@media (max-width: 1100px) { .ld-two.is-wide-side { grid-template-columns: 1fr; } }
.ld-mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; max-height: 70vh; overflow: auto; }

/* ---------- every device: phones, tablets, laptops ----------
   Phones and tablets (up to 900px): tables become one card per row with the column name beside each value (ld-device.js
   copies the headings into data-label; review N12: a jobs table scrolled sideways at tablet width). Phones (up to 640px): tabs wrap instead of scrolling; buttons and inputs are thumb-sized and inputs use
   16px text so iPhones do not zoom in; dialogs fill the screen width. A table that must stay a grid (an editing grid
   with many inputs) takes the class is-grid and keeps scrolling inside its box. */
.ld-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ld-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.ld-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ld-line); }
.ld-steps li:last-child { border-bottom: 0; }
.ld-steps .sub { display: block; color: var(--ld-muted); font-size: 13px; margin-top: 2px; }
.ld-step-mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ld-line); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.ld-steps li.is-done .ld-step-mark { background: var(--ld-accent); border-color: var(--ld-accent); color: #0b1514; }
.ld-steps li.is-done strong { color: var(--ld-muted); }

@media (hover: none) and (pointer: coarse) {
  .ld-btn { min-height: 44px; }
  .ld-btn.is-small { min-height: 38px; }
  .ld-tabs a, .ld-tabs button { min-height: 44px; }
}

/* narrow screens: one column that never grows past the screen (a file input or a long option cannot widen it) */
@media (max-width: 1100px) { .ld-two, .ld-two.is-wide-side { grid-template-columns: minmax(0, 1fr); } }
input[type=file] { max-width: 100%; }

@media (max-width: 640px) {
  /* 16px text in every box: iPhones zoom into anything smaller */
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea { font-size: 16px !important; }
  .ld-tabs { flex-wrap: wrap; overflow: visible; row-gap: 0; }
  .ld-tabs a, .ld-tabs button { padding: 9px 10px; }

  .ld-field input, .ld-field select, .ld-field textarea, .ld-toolbar input, .ld-toolbar select, .ld-input,
  .ld-table td input, .ld-table td select, .ld-seg textarea { font-size: 16px; }
  .ld-toolbar input[type=search] { width: 100%; }
  .ld-toolbar input[type=search] { flex: 1 1 100%; }
  .ld-page-header .ld-actions, .ld-page-header > div:last-child { width: 100%; }

  .ld-dialog-backdrop { place-items: end stretch; padding: 0; }
  .ld-dialog, .ld-dialog.is-wide { width: 100%; border-radius: 12px 12px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .ld-dialog > footer .ld-btn { flex: 1 1 auto; }
}

@media (max-width: 900px) {
  /* tables -> one card per row */
  .ld-table-wrap:has(> table.ld-table.is-labelled:not(.is-grid)) { background: none; border: 0; overflow: visible; }
  table.ld-table.is-labelled:not(.is-grid), table.ld-table.is-labelled:not(.is-grid) tbody,
  table.ld-table.is-labelled:not(.is-grid) tfoot { display: block; width: 100%; }
  table.ld-table.is-labelled:not(.is-grid) thead { display: none; }
  table.ld-table.is-labelled:not(.is-grid) tr { display: block; background: var(--ld-surface); border: 1px solid var(--ld-line); border-radius: var(--ld-radius); padding: 6px 12px; margin-bottom: 10px; }
  table.ld-table.is-labelled:not(.is-grid) tbody tr:hover { background: var(--ld-surface); }
  table.ld-table.is-labelled:not(.is-grid) td { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--ld-line); text-align: right; white-space: normal; }
  table.ld-table.is-labelled:not(.is-grid) td:last-child { border-bottom: 0; }
  table.ld-table.is-labelled:not(.is-grid) td::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; text-align: left; color: var(--ld-muted); font-size: 12px; font-weight: 500; }
  table.ld-table.is-labelled:not(.is-grid) td[data-label=""]::before { display: none; }
  table.ld-table.is-labelled:not(.is-grid) td[data-label=""] { justify-content: flex-end; }
  table.ld-table.is-labelled:not(.is-grid) td > * { min-width: 0; }
  /* a cell's second line (2 hours x 35.00, the service and ref) under its value, not floating between */
  table.ld-table.is-labelled:not(.is-grid) td:has(> .sub) { flex-wrap: wrap; row-gap: 0; }
  table.ld-table.is-labelled:not(.is-grid) td .sub { text-align: right; }
  table.ld-table.is-labelled:not(.is-grid) td:not(:first-child) > .sub { flex: 1 0 100%; }
  /* the first cell is the row's title: full width, bold, no label */
  table.ld-table.is-labelled:not(.is-grid) td:first-child { display: block; text-align: left; font-weight: 600; }
  table.ld-table.is-labelled:not(.is-grid) td:first-child::before { display: none; }
  table.ld-table.is-labelled:not(.is-grid) td:first-child .sub { text-align: left; font-weight: 400; }
  table.ld-table.is-labelled:not(.is-grid) td:empty { display: none; }
  table.ld-table.is-labelled:not(.is-grid) tfoot tr { background: none; border-style: dashed; }
}

@media (max-width: 640px) {
  .ld-steps li { grid-template-columns: 24px minmax(0, 1fr); }
  .ld-steps li > .ld-btn { grid-column: 2; justify-self: start; }
}

/* "Continue with Google" / Microsoft on sign-in and sign-up */
.ld-social { display: grid; gap: 10px; margin: 0 0 18px; }
.ld-social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 16px;
  border: 1px solid var(--ld-line); border-radius: 8px; background: var(--ld-surface); color: var(--ld-fg); font: 500 15px var(--ld-font); cursor: pointer; }
.ld-social-btn:hover { border-color: var(--ld-accent); }
.ld-social-btn:focus-visible { outline: 2px solid var(--ld-accent); outline-offset: 2px; }
.ld-social-or { display: flex; align-items: center; gap: 10px; color: var(--ld-muted); font-size: 13px; margin-top: 6px; }
.ld-social-or::before, .ld-social-or::after { content: ""; flex: 1; border-top: 1px solid var(--ld-line); }

/* the Settings page: groups of cards, one line each */
.ld-settings-group { margin: 0 0 22px; max-width: 1100px; }
.ld-settings-group h2 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ld-muted); margin: 0 0 8px; }
.ld-settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
/* CAT analyses (job / quote card) and the match-discount grid */
.ld-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
label.ld-btn { position: relative; cursor: pointer; }
label.ld-btn:focus-within { outline: 2px solid var(--ld-accent); outline-offset: 2px; }
label.ld-btn.is-disabled { opacity: .55; pointer-events: none; }
.ld-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ld-cat-item { border: 1px solid var(--ld-line); border-radius: var(--ld-radius); padding: 10px; margin: 0 0 12px; background: var(--ld-surface-2, var(--ld-surface)); }
.ld-cat-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.ld-cat-title strong { overflow-wrap: anywhere; }
.ld-cat-item .ld-table-wrap { box-shadow: none; }
.ld-cat-table { font-size: 13px; }
.ld-cat-table td, .ld-cat-table th { padding: 5px 6px; }
.ld-cat-table th { letter-spacing: 0; font-size: 11px; }
.ld-cat-table td:first-child { white-space: normal; min-width: 0; }
.ld-cat-table tfoot td { background: var(--ld-head); }
.ld-cat-sum { margin: 8px 0 4px; font-size: 13px; color: var(--ld-fg); }
.ld-cat-sum span { color: var(--ld-muted); }
.ld-cat-files { margin: 6px 0; font-size: 13px; }
.ld-cat-files summary { cursor: pointer; color: var(--ld-accent); }
.ld-cat-warn { margin: 8px 0; padding: 8px 10px 8px 26px; border-radius: 6px; background: var(--ld-warn-soft); color: var(--ld-fg); font-size: 12.5px; }
.ld-cat-item .ld-actions { margin-top: 10px; }
.ld-cat-add { margin-top: 4px; }
.ld-cat-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; margin-bottom: 6px; }
.ld-cat-words label { font-size: 12.5px; }
.ld-grid-editor { max-width: 620px; }
.ld-grid-editor td { vertical-align: middle; }
.ld-pct { display: inline-flex; align-items: center; gap: 6px; }
.ld-pct input { width: 84px !important; }

.ld-pay-rules { margin-top: 10px; }
.ld-cost { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.ld-cost > span:first-child { min-width: 0; overflow-wrap: anywhere; flex: 1; }
.ld-pay-rules summary { cursor: pointer; color: var(--ld-accent); font-size: 14px; }

/* Rates: an interpreting rate's evening / weekend / holiday / travel pay, under its row */
.ld-rate-extra td { padding-top: 0; border-top: 0; }
.ld-rate-rules { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; margin-bottom: 4px; }
.ld-rate-rules label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ld-rate-rules input { width: 86px; }
.ld-rate-rules input[type=time] { width: 104px; }

/* Job page: timesheets, one block per day */
.ld-ts { border: 1px solid var(--ld-line); border-radius: var(--ld-radius); padding: 12px 14px; margin-top: 12px; }
.ld-ts-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; }
.ld-ts-step { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
/* the step's words at the card's size and inside it (step 1 ran past the card's edge at the page's 16px) */
.ld-ts-body { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ld-ts .ld-check { font-size: 14px; }
.ld-ts-actions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ld-line); }
.ld-ts-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--ld-accent-soft); color: var(--ld-accent); }
.ld-ts-file { position: relative; overflow: hidden; cursor: pointer; }
/* settings pages (SettingsLayout): the side menu of every setting beside the page */
.ld-settings-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 26px; align-items: start; }
.ld-settings-nav { position: sticky; top: calc(var(--ld-banner-h, 56px) + 16px); display: grid; gap: 1px; max-height: calc(100vh - var(--ld-banner-h, 56px) - 32px);
  overflow-y: auto; padding: 0 4px 12px 0; }
.ld-settings-nav .ld-settings-nav-all { padding: 2px 10px 8px; font-size: 13px; color: var(--ld-muted); text-decoration: none; }
.ld-settings-nav .ld-settings-nav-all:hover { color: var(--ld-accent); }
.ld-settings-nav-group { padding: 12px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ld-muted); }
.ld-settings-nav a:not(.ld-settings-nav-all) { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 8px; color: var(--ld-fg);
  font-size: 13.5px; text-decoration: none; }
.ld-settings-nav a:not(.ld-settings-nav-all):hover { background: var(--ld-surface); color: var(--ld-accent); }
.ld-settings-nav a.active { background: var(--ld-accent-soft); color: var(--ld-accent); font-weight: 600; }
.ld-settings-nav a:focus-visible { outline: 2px solid var(--ld-accent); outline-offset: 1px; }
.ld-settings-nav svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ld-settings-main { min-width: 0; }
.ld-settings-back { display: none; margin: 0 0 8px; font-size: 13px; }
/* beside the menu a settings page has less room: its side cards go under the form until the screen is wide */
@media (max-width: 1500px) { .ld-settings-main .ld-two, .ld-settings-main .ld-two.is-wide-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) {
  .ld-settings-shell { grid-template-columns: minmax(0, 1fr); }
  .ld-settings-nav { display: none; }
  .ld-settings-back { display: inline-block; }
}

/* Settings > Public profile */
.ld-choice-list { display: grid; gap: 8px; }
.ld-choice-list .ld-check { align-items: flex-start; }
.ld-prefix { display: flex; align-items: stretch; border: 1px solid var(--ld-line-strong); border-radius: 8px; overflow: hidden; background: var(--ld-surface); }
.ld-prefix span { display: flex; align-items: center; padding: 0 8px 0 12px; color: var(--ld-muted); font-size: 13px; background: var(--ld-surface-2, var(--ld-surface)); white-space: nowrap; }
.ld-prefix input { border: 0 !important; border-radius: 0 !important; min-width: 0; flex: 1; }
.ld-show-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 6px 22px; }
.ld-show-grid h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ld-muted); }
.ld-show-grid .ld-check { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 6px; }
.ld-show-grid .ld-check .ld-help, .ld-choice-list .ld-check .ld-help { flex-basis: 100%; margin: 0 0 0 26px; }
@media (max-width: 1100px) { .ld-show-grid { grid-template-columns: minmax(0, 1fr); } }

/* an empty list (EmptyState) */
.ld-emptystate { display: grid; justify-items: center; gap: 6px; padding: 36px 24px 32px; text-align: center; }
.ld-emptystate-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 14px;
  background: var(--ld-accent-soft); color: var(--ld-accent); }
.ld-emptystate-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ld-emptystate h2 { margin: 0; font-size: 17px; font-weight: 600; }
.ld-emptystate p { margin: 0 0 10px; max-width: 46ch; color: var(--ld-muted); font-size: 14px; }

/* while a page loads (Skeleton): grey shapes where the content will be, with a soft sweep */
.ld-skel { display: grid; gap: 10px; }
.ld-skel-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .ld-skel-cols { grid-template-columns: minmax(0, 1fr); } .ld-skel-card.is-side { display: none; } }
.ld-skel-card { display: grid; gap: 12px; padding: 20px 22px; background: var(--ld-surface); border: 1px solid var(--ld-line); border-radius: var(--ld-radius); }
.ld-skel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ld-skel-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 160px; gap: 14px; padding: 6px 0; border-top: 1px solid var(--ld-line); }
.ld-skel-bar, .ld-skel-field { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--ld-line) 25%, var(--ld-surface-2, var(--ld-line)) 50%, var(--ld-line) 75%);
  background-size: 400% 100%; animation: ld-skel 1.4s ease-in-out infinite; }
.ld-skel-bar.is-head { width: 40%; height: 16px; }
.ld-skel-bar.is-mid { width: 70%; }
.ld-skel-bar.is-short { width: 45%; }
.ld-skel-field { height: 38px; border-radius: 8px; }
@keyframes ld-skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .ld-skel-bar, .ld-skel-field { animation: none; } }

/* choosing files (FileButton): a button, or a dashed area to drop files on - the invisible file input lies over it */
.ld-file-btn, .ld-file-zone { position: relative; overflow: hidden; cursor: pointer; }
.ld-file-btn input[type=file], .ld-file-zone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ld-file-btn svg, .ld-file-zone svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ld-file-btn:focus-within, .ld-file-zone:focus-within { outline: 2px solid var(--ld-accent); outline-offset: 2px; }
.ld-file-btn.is-disabled, .ld-file-zone.is-disabled { opacity: .55; pointer-events: none; }
.ld-file-zone { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 14px; border: 1.5px dashed var(--ld-line-strong);
  border-radius: var(--ld-radius); background: var(--ld-surface-2, var(--ld-surface)); color: var(--ld-muted); font-size: 13.5px; text-align: left;
  transition: border-color .15s, background-color .15s; }
.ld-file-zone svg { width: 22px; height: 22px; flex-basis: 22px; color: var(--ld-accent); }
.ld-file-zone b { color: var(--ld-accent); font-weight: 600; }
.ld-file-zone:hover, .ld-file-zone:focus-within { border-color: var(--ld-accent); background: var(--ld-accent-soft); color: var(--ld-fg); }
.ld-ts-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ld-ts-pages { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; }
.ld-ts-pages li span { overflow-wrap: anywhere; }
.ld-ts-paper { margin-top: 10px; }
.ld-ts-paper summary { cursor: pointer; color: var(--ld-accent); font-size: 14px; }
.ld-ts-send { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ld-line); }
.ld-ts-send-row { display: flex; gap: 8px; margin: 4px 0 6px; }
.ld-ts-send-row input { flex: 1; min-width: 0; }

/* The agency's form on screen: the page picture with boxes on it (placing them on the job page; filled in on the
   signing page) */
.ld-form-page { position: relative; width: 100%; margin: 0 0 12px; border: 1px solid var(--ld-line); background: #fff; box-shadow: var(--ld-shadow); }
.ld-form-page img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.ld-ff-layer { position: absolute; inset: 0; }
.ld-ff-dialog { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 20, 17, .55); overflow-y: auto; padding: 16px; }
.ld-ff-sheet { max-width: 920px; margin: 0 auto; background: var(--ld-surface); border-radius: var(--ld-radius); padding: 0 18px; box-shadow: var(--ld-shadow-lg); outline: none; }
.ld-ff-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0 8px; }
@media (max-width: 640px) { .ld-ff-dialog { padding: 0; } .ld-ff-sheet { border-radius: 0; padding: 0 10px; min-height: 100%; } }
.ld-ff.is-armed .ld-ff-layer { cursor: crosshair; outline: 2px dashed var(--ld-accent); outline-offset: -2px; }
.ld-ff-palette { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; position: sticky; top: 0; z-index: 3; background: var(--ld-surface); padding: 6px 0; }
.ld-ff-palette .ld-btn.is-on { background: var(--ld-accent); color: var(--ld-accent-fg, #fff); border-color: var(--ld-accent); }
.ld-ff-box { position: absolute; display: flex; align-items: center; padding: 0 3px; border: 1.5px dashed var(--ld-accent); background: rgba(21, 107, 91, .12);
  color: #0b4a3f; font: 600 11px/1.1 var(--ld-font); overflow: hidden; white-space: nowrap; touch-action: none; cursor: move; border-radius: 3px; }
.ld-ff-box.is-sig { background: rgba(242, 181, 68, .22); border-color: #c98a12; color: #6b4a07; }
.ld-ff-box.is-sel { border-style: solid; box-shadow: 0 0 0 2px rgba(21, 107, 91, .35); z-index: 2; }
.ld-ff-handle { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; background: var(--ld-accent); cursor: nwse-resize; border-radius: 2px 0 2px 0; }
.ld-ff-save { position: sticky; bottom: 0; background: var(--ld-surface); padding: 8px 0; z-index: 3; }
.ld-ts-screen { margin-top: 12px; padding: 10px 12px; border-radius: var(--ld-radius); background: var(--ld-accent-soft); }
.ld-form-box { position: absolute; display: flex; align-items: center; padding: 0 2px; overflow: hidden; white-space: nowrap; color: #0b2a6b;
  font: 600 clamp(8px, 1.5vw, 14px)/1 var(--ld-font); }
.ld-form-box.is-signer { background: rgba(242, 181, 68, .35); outline: 2px solid #f2b544; color: #6b4a07; font-weight: 500; }
.ld-form-sig { width: 100%; height: 100%; object-fit: contain; }
.ld-form-box.is-mine { background: rgba(21, 107, 91, .1); color: #0b4a3f; font-weight: 500; }

/* Settings > Payment chasers */
.ld-chase-line { display: flex; flex-wrap: wrap; gap: 6px 4px; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ld-chase-line li { padding: 3px 10px; border-radius: 999px; background: var(--ld-accent-soft); color: var(--ld-accent); }
.ld-chase-line li:not(:last-child)::after { content: " \2192"; color: var(--ld-muted); }
.ld-chase-line li.is-final { background: var(--ld-danger-soft); color: var(--ld-danger); }
.ld-chase-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 12px; font-size: 14px; }
.ld-chase-when input { width: 80px; min-height: 36px; border: 1px solid var(--ld-line); border-radius: 6px; padding: 4px 8px; background: var(--ld-surface); color: var(--ld-fg); font: 14px var(--ld-font); }
.ld-chase-when select { min-height: 36px; border: 1px solid var(--ld-line); border-radius: 6px; padding: 4px 8px; background: var(--ld-surface); color: var(--ld-fg); font: 14px var(--ld-font); }
.ld-card.is-off { opacity: .7; }

/* Settings > Email */
.ld-mail-from { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--ld-line); border-radius: var(--ld-radius); background: var(--ld-surface-2, var(--ld-surface)); margin-bottom: 12px; }
.ld-mail-from strong { display: block; overflow-wrap: anywhere; }
.ld-mail-providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ld-mail-provider { display: flex; flex-direction: column; align-items: flex-start; padding: 12px; border: 1px solid var(--ld-line); border-radius: var(--ld-radius); }
.ld-guide { padding-top: 10px; }
.ld-guide ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.ld-fwd { display: grid; gap: 4px; }
.ld-senders { columns: 2; column-gap: 16px; font-size: 13px; }

/* Settings: a card per page - an icon, the name, what is in it */
.ld-settings-card { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; row-gap: 3px; align-content: start;
  padding: 14px 16px; background: var(--ld-surface); border: 1px solid var(--ld-line); border-radius: var(--ld-radius);
  color: var(--ld-fg); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.ld-settings-card:hover { border-color: var(--ld-accent); box-shadow: var(--ld-shadow); }
.ld-settings-card:focus-visible { outline: 3px solid var(--ld-accent-soft); outline-offset: 1px; border-color: var(--ld-accent); }
.ld-settings-card strong { grid-column: 2; font-weight: 600; align-self: center; }
.ld-settings-card .ld-settings-what { grid-column: 2; color: var(--ld-muted); font-size: 13px; line-height: 1.45; }
.ld-settings-icon { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 10px; background: var(--ld-accent-soft); color: var(--ld-accent); }
.ld-settings-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ld-settings-find { position: relative; max-width: 460px; margin: 0 0 20px; }
.ld-settings-find svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none;
  stroke: var(--ld-muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.ld-settings-find input { width: 100%; min-height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--ld-line-strong); border-radius: 8px;
  background: var(--ld-surface); color: var(--ld-fg); font-size: 14px; }
.ld-settings-find input:focus { outline: 3px solid var(--ld-accent-soft); border-color: var(--ld-accent); }
@media (prefers-reduced-motion: reduce) { .ld-settings-card { transition: none; } }

/* Settings > Appearance: one card per skin with a small picture of it */
.ld-skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; max-width: 1100px; margin: 0 0 14px; }
.ld-skin { display: grid; gap: 12px; padding: 12px; text-align: left; background: var(--ld-surface); color: var(--ld-fg); border: 1px solid var(--ld-line);
  border-radius: 12px; box-shadow: var(--ld-shadow); cursor: pointer; font: inherit; transition: border-color .12s, box-shadow .12s; }
.ld-skin:hover { border-color: var(--ld-accent); box-shadow: var(--ld-shadow-lg); }
.ld-skin.is-on { border-color: var(--ld-accent); box-shadow: 0 0 0 2px var(--ld-accent-soft), var(--ld-shadow); }
.ld-skin:focus-visible { outline: 2px solid var(--ld-accent); outline-offset: 2px; }
.ld-skin-preview { position: relative; display: flex; height: 132px; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.ld-skin-rail { width: 30%; display: grid; align-content: start; gap: 7px; padding: 12px 10px; }
.ld-skin-rail i { display: block; height: 6px; border-radius: 3px; }
.ld-skin-rail i:first-child { width: 60%; height: 8px; margin-bottom: 4px; }
.ld-skin-body { flex: 1; display: grid; align-content: start; gap: 10px; padding: 14px 12px; }
.ld-skin-body > b { display: block; width: 55%; height: 9px; border-radius: 3px; }
.ld-skin-cardrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ld-skin-card { display: grid; gap: 6px; padding: 9px 8px; border-radius: 6px; }
.ld-skin-card i { display: block; width: 70%; height: 5px; border-radius: 3px; }
.ld-skin-card b { display: block; width: 45%; height: 8px; border-radius: 3px; }
.ld-skin-btn { display: block; width: 38%; height: 14px; border-radius: 5px; }
.ld-skin-night { position: absolute; inset: 0 0 0 50%; clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%); opacity: .92; }
.ld-skin-text { display: grid; gap: 3px; padding: 0 4px 2px; }
.ld-skin-text strong { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.ld-skin-text em { font-style: normal; font: 600 11px/1.7 var(--ld-font); padding: 0 8px; border-radius: 999px; background: var(--ld-accent-soft); color: var(--ld-accent); }
.ld-skin-text > span { color: var(--ld-muted); font-size: 13px; line-height: 1.45; }

/* the rich text box for emails (HtmlEditor): Quill in the app's colours */
.ld-html-editor-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ld-html-editor-bar label { font-weight: 600; }
.ld-html-editor .ql-toolbar.ql-snow { border: 1px solid var(--ld-line-strong); border-radius: 8px 8px 0 0; background: var(--ld-surface-2, var(--ld-surface)); }
.ld-html-editor .ql-container.ql-snow { border: 1px solid var(--ld-line-strong); border-top: 0; border-radius: 0 0 8px 8px; font: inherit; }
.ld-html-editor .ql-editor { min-height: 180px; background: var(--ld-surface); color: inherit; font-size: 14px; line-height: 1.5; }
.ld-html-editor .ql-editor.ql-blank::before { color: var(--ld-muted); font-style: normal; }
.ld-html-editor .ql-snow .ql-stroke { stroke: currentColor; }
.ld-html-editor .ql-snow .ql-fill { fill: currentColor; }
.ld-html-editor .ql-snow .ql-picker { color: inherit; }
.ld-html-source { width: 100%; font: 13px/1.5 var(--ld-mono, ui-monospace, monospace); padding: 10px 12px; border: 1px solid var(--ld-line-strong); border-radius: 8px; background: var(--ld-surface); color: inherit; }
.ld-mail-preview { padding: 12px 14px; border: 1px solid var(--ld-line-strong); border-radius: 8px; background: var(--ld-surface); max-height: 50vh; overflow: auto; font-size: 14px; line-height: 1.5; }
.ld-mail-preview p { margin: 0 0 10px; }

/* the AI's rating of its draft, in the translation editor: chips to filter by band, a badge per segment */
.ld-score-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ld-filter-chip { border: 1px solid var(--ld-line-strong); background: var(--ld-surface); color: inherit; border-radius: 999px; padding: 4px 12px; font: 13px var(--ld-font); cursor: pointer; }
.ld-filter-chip b { margin-left: 4px; }
.ld-filter-chip.is-on { border-color: var(--ld-accent); background: var(--ld-accent-soft); }
.ld-filter-chip.is-bad.is-on { border-color: #c0392b; background: #fbe3e0; }
.ld-filter-chip.is-mid.is-on { border-color: #b7950b; background: #f7f1c9; }
.ld-filter-chip.is-ok.is-on { border-color: #1f8a4c; background: #dff3e7; }
.ld-seg .ld-seq { display: grid; gap: 4px; justify-items: start; }
.ld-score { display: inline-block; min-width: 30px; text-align: center; font: 600 11px var(--ld-mono); padding: 2px 5px; border-radius: 6px; }
.ld-score.is-bad { background: #fbe3e0; color: #8a2f1f; }
.ld-score.is-low { background: #fdebd2; color: #8a5a12; }
.ld-score.is-mid { background: #f7f1c9; color: #6b5d0e; }
.ld-score.is-ok { background: #dff3e7; color: #1f5f3b; }
.ld-seg.is-bad { background: #fff7f6; }
.ld-score-note { color: #8a2f1f; }
