/* Locke Professional — layout on Warm Paper (locke-ui.css + sidebar-standard.css) */

:root {
  --lbc-context-w: 280px;
  --lbc-stack-gap: 20px;
  --lbc-grid-gap: 16px;
  --lbc-card-pad-y: 20px;
  --lbc-card-pad-x: 22px;
}

.lbc-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  overflow: hidden;
}

.lbc-limit-banner {
  flex-shrink: 0;
  padding: 11px 28px;
  font-family: var(--serif);
  font-size: 16px;
  background: var(--gold-soft);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  gap: var(--lbc-grid-gap);
}

.lbc-limit-banner:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lbc-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--lbc-context-w);
  grid-template-areas: "workspace context";
  overflow: hidden;
}

.lbc-workspace {
  grid-area: workspace;
  overflow-y: auto;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}

.lbc-context {
  grid-area: context;
  background: var(--surface);
  border-left: 1px solid var(--border);
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.lbc-context-scroll {
  padding: 24px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: var(--lbc-stack-gap);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface) 72%, var(--surface2) 100%);
}

.lbc-context-section h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--muted);
}

.lbc-context-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.4;
}

.lbc-context-item:last-child {
  border-bottom: none;
}

.lbc-context-item strong {
  font-weight: 700;
  color: var(--text);
}

.lbc-context-item span {
  color: var(--muted);
  text-align: right;
}

.lbc-usage-card h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.lbc-usage-meter + .lbc-usage-meter {
  margin-top: 16px;
}

.lbc-usage-meter-label {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--muted);
}

.lbc-usage-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface2);
  overflow: hidden;
  margin-bottom: 8px;
}

.lbc-usage-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ok);
  transition: width 0.2s ease;
}

.lbc-usage-bar-fill.warn { background: var(--warn); }
.lbc-usage-bar-fill.hot { background: var(--bad); }

.lbc-usage-stats {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--muted);
}

.lbc-usage-stats strong {
  color: var(--text);
  font-size: 18px;
}

.lbc-legal-footer {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.lbc-page-head,
.lbc-workspace .page-head {
  margin-bottom: 20px;
}

/* ── Contract search & filters ─────────────────────────────────────────── */

.lbc-contract-search {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: var(--lbc-stack-gap, 16px);
}

.lbc-contract-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lbc-cs-filters { margin-top: 10px; }
.lbc-cs-input { flex: 1 1 320px; min-width: 200px; }

.lbc-cs-field { display: flex; align-items: center; gap: 6px; }
.lbc-cs-field select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  font-family: var(--serif);
  color: var(--text);
}

.lbc-cs-count { margin-left: auto; }

/* Matching text in a result row, so a hit explains itself without opening it. */
.lbc-contract-snippet {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ── Document viewer + in-document search ──────────────────────────────── */

.lbc-doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding: 8px 0;
}

.lbc-doc-search { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; }
.lbc-doc-search input { flex: 1 1 auto; min-width: 160px; }
.lbc-doc-count { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 84px; }

/* The agreement itself. Monospace is wrong for prose, but the text arrives
   without layout, so preserving the extractor's line breaks is the only
   structure available — a proportional serif keeps it readable as a contract. */
.lbc-doc-text {
  font-family: var(--serif);
  font-size: var(--lp-content-font-size, 16px);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 68vh;
  overflow-y: auto;
  margin: 0;
  padding: 4px 2px;
}

.lbc-doc-hit { background: var(--gold-soft); color: inherit; border-radius: 2px; }

/* The current match must be findable at a glance while scrolling a long record. */
.lbc-doc-hit-active {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 0 0 2px var(--gold);
}

/* The match counter turns advisory when highlighting is capped, so "not every
   occurrence is reachable from these arrows" reads as a caution, not a stat. */
.lbc-find-capped { color: var(--warn, #a4671b); font-weight: 500; }

/* ── Renewal deadlines list ────────────────────────────────────────────── */

.lbc-renewals {
  border: 1px solid var(--hairline, rgba(128, 128, 128, 0.3));
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.lbc-renewals-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.lbc-renewals-title { font-weight: 600; }
.lbc-renewals-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid var(--hairline, rgba(128, 128, 128, 0.2));
}
.lbc-renewals-when { font-weight: 600; min-width: 90px; }
.lbc-renewals-title-link { font-weight: 500; }
.lbc-renewals-row .lbc-terms-warning { flex-basis: 100%; }

/* ── Term & renewal ────────────────────────────────────────────────────── */

.lbc-terms {
  border: 1px solid var(--hairline, rgba(128, 128, 128, 0.3));
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.lbc-terms-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lbc-terms-title { font-weight: 600; }
.lbc-terms-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px 16px;
  align-items: end;
}
.lbc-terms-form input,
.lbc-terms-form select { width: 100%; }
.lbc-terms-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lbc-terms-result { margin-top: 12px; }
.lbc-terms-deadline { font-size: 1.02em; }
.lbc-terms-ok { color: var(--success, #1f7a45); }
/* A missed non-renewal deadline is the expensive state, so it reads as an
   alarm rather than as one more grey line of metadata. */
.lbc-terms-missed { color: var(--danger, #b3261e); }
.lbc-terms-warning {
  margin: 6px 0 0;
  color: var(--warn, #a4671b);
  font-size: 0.92em;
}

/* ── Executed document ─────────────────────────────────────────────────── */

.lbc-executed {
  border: 1px solid var(--hairline, rgba(128, 128, 128, 0.3));
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.lbc-executed-head { display: flex; flex-direction: column; gap: 4px; }
.lbc-executed-title { font-weight: 600; }
.lbc-executed-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.lbc-executed-upload { cursor: pointer; }
.lbc-executed-list { margin-top: 12px; }
.lbc-executed-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 0;
  border-top: 1px solid var(--hairline, rgba(128, 128, 128, 0.2));
}
.lbc-executed-when { font-weight: 500; }
/* The hash is long by nature; let it wrap rather than push the row sideways. */
.lbc-executed-hash {
  flex-basis: 100%;
  font-size: 0.75em;
  opacity: 0.7;
  overflow-wrap: anywhere;
}

/* ── Approval gate ─────────────────────────────────────────────────────── */

.lbc-approval {
  border: 1px solid var(--hairline, rgba(128, 128, 128, 0.3));
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.lbc-approval-head { display: flex; flex-direction: column; gap: 4px; }
.lbc-approval-state { font-weight: 600; }
.lbc-approval-ok { color: var(--success, #1f7a45); }
.lbc-approval-blocked { color: var(--danger, #b3261e); }
/* Stale is its own colour on purpose: "approved but the text changed" is not a
   success and not a plain failure, and reading it as either is the mistake. */
.lbc-approval-stale { color: var(--warn, #a4671b); }
.lbc-approval-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.lbc-approval-history { margin-top: 14px; }
.lbc-approval-history-title { font-size: 0.9em; margin: 0 0 6px; opacity: 0.75; }
.lbc-approval-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 5px 0;
}
.lbc-approval-chip {
  font-size: 0.78em;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.lbc-approval-comment {
  flex-basis: 100%;
  margin: 2px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lbc-approval-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.lbc-approval-toggle input { margin-top: 3px; }

/* ── Intake ────────────────────────────────────────────────────────────── */

.lbc-intake-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 18px;
  align-items: end;
}
.lbc-intake-wide { grid-column: 1 / -1; }
.lbc-intake-form input,
.lbc-intake-form textarea,
.lbc-intake-form select { width: 100%; }
.lbc-intake-form textarea { resize: vertical; }
.lbc-req { color: var(--gold); }
.lbc-intake-count { font-size: 0.85em; }
.lbc-intake-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lbc-intake-status-error { color: var(--danger, #b3261e); }

.lbc-intake-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline, rgba(128, 128, 128, 0.25));
}
.lbc-intake-row:last-child { border-bottom: 0; }
.lbc-intake-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lbc-intake-row-title { font-weight: 600; }
.lbc-intake-row-meta { margin-top: 2px; font-size: 0.92em; }
/* Background is free text a person typed; preserve their line breaks. */
.lbc-intake-row-context {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lbc-intake-row-declined { margin: 8px 0 0; color: var(--danger, #b3261e); }
.lbc-intake-row-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lbc-intake-badge {
  font-size: 0.78em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.lbc-intake-pending { color: var(--gold); }
.lbc-intake-positive { color: var(--success, #1f7a45); }
.lbc-intake-negative { color: var(--danger, #b3261e); }
.lbc-intake-neutral { color: inherit; opacity: 0.7; }

/* ── Document upload ───────────────────────────────────────────────────── */

.lbc-dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 26px 20px;
  text-align: center;
  background: var(--surface2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.lbc-dropzone:hover,
.lbc-dropzone:focus-visible,
.lbc-dropzone-active {
  border-color: var(--gold);
  background: var(--gold-soft);
  outline: none;
}

.lbc-dropzone-main { font-size: 17px; margin-bottom: 4px; }
.lbc-dropzone-link { color: var(--gold); text-decoration: underline; }
.lbc-dropzone-sub { font-size: 15px; }

.lbc-file-status {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.lbc-file-status-main { font-weight: 600; }

/* Tone carries meaning here: an exact read from Word and a best-effort OCR of
   a scan must not look identical to an attorney deciding whether to trust it. */
.lbc-file-ok    { border-color: var(--ok);   background: var(--ok-soft); }
.lbc-file-warn  { border-color: var(--gold); background: var(--gold-soft); }
.lbc-file-error { border-color: var(--bad);  background: var(--bad-soft); }
.lbc-file-busy  { border-color: var(--ai); }

/* ── Admin console ─────────────────────────────────────────────────────── */

.lbc-admin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.lbc-admin-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.lbc-admin-kpi-num { font-size: 26px; font-weight: 700; }
.lbc-admin-kpi-label { font-size: 14px; color: var(--muted); }

.lbc-admin-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--lbc-stack-gap, 16px);
}

/* Activity chart. Bars are scaled to the window peak, which is printed beneath
   — an unlabelled bar invites reading "tall" as "a lot". */
.lbc-admin-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding: 8px 0;
}

.lbc-admin-bar-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; }

.lbc-admin-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--gold);
  opacity: 0.85;
}

.lbc-admin-bar:hover { opacity: 1; }

.lbc-admin-meter {
  display: grid;
  grid-template-columns: 140px 1fr 48px;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.lbc-admin-meter-label { color: var(--muted); text-transform: capitalize; }
.lbc-admin-meter-track { height: 8px; border-radius: 99px; background: var(--surface3); overflow: hidden; }
.lbc-admin-meter-fill { display: block; height: 100%; background: var(--navy); border-radius: 99px; }
.lbc-admin-meter-num { text-align: right; font-variant-numeric: tabular-nums; }

.lbc-admin-row,
.lbc-admin-result,
.lbc-admin-audit {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.lbc-admin-audit { align-items: center; }
.lbc-admin-row:last-child,
.lbc-admin-result:last-child,
.lbc-admin-audit:last-child { border-bottom: 0; }

.lbc-admin-row-label { color: var(--muted); }
.lbc-admin-row-value { font-variant-numeric: tabular-nums; text-align: right; }

.lbc-admin-search { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.lbc-admin-search input { flex: 1 1 260px; }

.lbc-admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; align-items: center; }
.lbc-admin-select { padding: 7px 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); font-family: var(--serif); }
.lbc-admin-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.lbc-admin-subhead { margin: 18px 0 8px; font-size: var(--card-title); }
.lbc-admin-facts { margin-top: 10px; }

/* Button that reads as a link — used for drill-through into an account. */
.lbc-linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--gold);
  cursor: pointer;
  text-align: left;
}
.lbc-linklike:hover { text-decoration: underline; }

/* Progress indicator for long AI calls (drafting, obligation extraction).
   The bar is intentionally indeterminate: the request is one opaque HTTP call,
   so a determinate bar would be showing a number nobody measured. Elapsed time
   next to it is the real signal. */
.lbc-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
}

.lbc-progress-track {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: var(--surface3);
  overflow: hidden;
}

.lbc-progress-bar {
  position: absolute;
  inset-block: 0;
  width: 35%;
  border-radius: 99px;
  background: var(--gold);
  animation: lbc-progress-slide 1.6s ease-in-out infinite;
}

@keyframes lbc-progress-slide {
  0%   { left: -35%; }
  100% { left: 100%; }
}

/* Respect users who ask for reduced motion: hold a steady bar instead. */
@media (prefers-reduced-motion: reduce) {
  .lbc-progress-bar {
    animation: none;
    left: 0;
    width: 100%;
    opacity: 0.45;
  }
}

.lbc-progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.lbc-progress-elapsed {
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* Page head variant that carries a contract lifecycle badge beside the title. */
.lbc-page-head-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.lbc-workspace > * + * {
  margin-top: var(--lbc-stack-gap);
}

.lbc-workspace > .page-head,
.lbc-workspace > .lbc-page-head {
  margin-top: 0;
}

.lbc-workspace > .page-head + *,
.lbc-workspace > .lbc-page-head + * {
  margin-top: 0;
}

.lbc-intro-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  box-shadow: var(--shadow-1);
}

.lbc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--lbc-card-pad-y) var(--lbc-card-pad-x);
  box-shadow: var(--shadow-1);
}

.lbc-card h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.lbc-subtitle {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.45;
}

.lbc-contract-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 17px;
}

.lbc-contract-row:last-child {
  border-bottom: none;
}

.lbc-contract-title {
  font-weight: 700;
  color: var(--text);
}

.lbc-contract-meta {
  color: var(--muted);
  font-size: 16px;
}

.lbc-pro-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  vertical-align: middle;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--border);
}

.nav a span .lbc-pro-badge {
  margin-left: 8px;
}

.lbc-soon-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  vertical-align: middle;
  background: rgba(120, 130, 150, 0.12);
  color: var(--muted);
  border: 1px solid var(--border);
}

.nav a.lbc-nav-placeholder {
  opacity: 0.72;
}

.nav a span .lbc-soon-badge {
  margin-left: 8px;
}

.lbc-diff-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.lbc-diff-output {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  max-height: 480px;
}

.lbc-diff-line {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 4px 10px;
  border-bottom: 1px solid rgba(120, 130, 150, 0.12);
}

.lbc-diff-line.add {
  background: rgba(46, 125, 70, 0.08);
}

.lbc-diff-line.remove {
  background: rgba(180, 60, 60, 0.08);
}

.lbc-diff-tag {
  font-weight: 700;
  color: var(--muted);
}

#compare-error {
  color: var(--bad);
  margin-top: 8px;
}

/* Contract drafting page */
body.page-draft .content {
  max-width: 1400px;
}

.lbc-draft-disclaimer {
  border-left: 3px solid var(--warn);
}

.lbc-draft-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.lbc-draft-input-panel .pbody,
.lbc-draft-output-panel .pbody {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lbc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.lbc-field input,
.lbc-field textarea {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid color-mix(in srgb, var(--ai) 35%, var(--border));
  background: var(--surface2);
  color: var(--text);
  resize: vertical;
}

.lbc-field input:focus,
.lbc-field textarea:focus {
  outline: none;
  border-color: var(--ai);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ai) 25%, transparent);
}

.lbc-field-grow textarea {
  min-height: 220px;
}

.lbc-draft-provider-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ai) 8%, var(--surface2));
  border: 1px solid color-mix(in srgb, var(--ai) 22%, var(--border));
}

.lbc-draft-provider-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.lbc-provider-toggle {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.lbc-provider-toggle[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.lbc-provider-btn {
  font-family: var(--serif);
  font-size: 14px;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.lbc-provider-btn.lbc-active {
  background: var(--ai);
  color: #fff;
}

.lbc-provider-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lbc-compare-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  margin-left: auto;
  cursor: pointer;
}

.lbc-compare-toggle input {
  accent-color: var(--ai);
}

.lbc-draft-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lbc-draft-compare-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.lbc-draft-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lbc-draft-compare-head h3 {
  margin: 0;
  font-size: 16px;
}

.lbc-draft-compare-status {
  margin: 0;
  font-size: 13px;
}

.lbc-draft-submit {
  align-self: flex-start;
  margin-top: 4px;
}

.lbc-draft-empty {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.lbc-draft-title {
  margin: 0 0 8px;
  font-size: 20px;
}

.lbc-draft-summary {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

.lbc-draft-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  max-height: 480px;
  overflow: auto;
  margin: 0;
}

.lbc-draft-meta h4 {
  margin: 16px 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.lbc-draft-caution {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--gold-soft);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.lbc-draft-actions {
  margin-bottom: 12px;
}

.lbc-draft-hint {
  font-size: 14px;
  color: var(--bad);
}

@media (max-width: 1100px) {
  .lbc-draft-grid,
  .lbc-draft-compare {
    grid-template-columns: 1fr;
  }

  .lbc-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "workspace";
  }

  .lbc-context {
    display: none;
  }
}

/* Obligation complexity badges & cards */
.lbc-obligation-signals {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.lbc-obligation-signal {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.3;
  border: 1px solid var(--border);
}

.lbc-obligation-party-you {
  color: var(--text);
  background: color-mix(in srgb, var(--ai) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ai) 28%, var(--border));
}

.lbc-obligation-party {
  color: var(--muted);
  background: var(--surface2);
}

.lbc-obligation-priority-high {
  color: #7a5a18;
  background: color-mix(in srgb, var(--warn) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--warn) 35%, var(--border));
}

.lbc-obligation-priority {
  color: var(--muted);
  background: var(--surface2);
  font-weight: 600;
}

.lbc-complexity-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25px;
  line-height: 1.35;
  border: 1px solid transparent;
  cursor: help;
  opacity: 0.92;
}

.lbc-complexity-conditional {
  color: #7a735f;
  background: color-mix(in srgb, var(--warn) 8%, var(--surface2));
  border-color: color-mix(in srgb, var(--warn) 18%, var(--border));
}

.lbc-complexity-complex {
  color: #8a6d45;
  background: color-mix(in srgb, var(--warn) 12%, var(--surface2));
  border-color: color-mix(in srgb, var(--warn) 24%, var(--border));
}

.lbc-complexity-needs_review {
  color: #7a6a52;
  background: var(--surface2);
  border-color: color-mix(in srgb, var(--warn) 30%, var(--border));
}

.lbc-complexity-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lbc-complexity-filter {
  font-family: var(--serif);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lbc-complexity-filter.lbc-active {
  background: color-mix(in srgb, var(--ai) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--ai) 35%, var(--border));
  color: var(--text);
}

.lbc-obligation-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lbc-obligation-count {
  font-size: 14px;
}

.lbc-obligation-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 4px;
  padding-bottom: 4px;
}

.lbc-obligation-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif);
}

.lbc-obligation-card:last-child {
  border-bottom: none;
}

.lbc-obligation-head {
  margin-bottom: 4px;
}

.lbc-obligation-title-btn,
.lbc-obligation-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.lbc-obligation-title-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.lbc-obligation-title-btn:hover .lbc-obligation-title {
  color: var(--ai);
}

.lbc-obligation-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.lbc-obligation-contract {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.lbc-obligation-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.lbc-obligation-due {
  font-size: 13px;
  color: var(--muted);
}

.lbc-obligation-excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
  font-style: italic;
}

.lbc-obligation-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed color-mix(in srgb, var(--border) 80%, transparent);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lbc-obligation-description {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.lbc-obligation-field span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.lbc-obligation-field p,
.lbc-obligation-field ul {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.lbc-obligation-field ul {
  padding-left: 18px;
}

.lbc-obligation-source {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.5;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  max-height: 200px;
  overflow: auto;
}

.lbc-obligation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.lbc-obligation-list-compact .lbc-obligation-card {
  padding: 12px 0;
}

.lbc-obligation-empty-msg {
  margin: 0;
  font-size: 15px;
}

.lbc-dashboard-obligations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.lbc-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.lbc-section-head h2 {
  margin: 0;
}

.lbc-section-link {
  font-size: 15px;
  text-decoration: none;
}

.lbc-section-link:hover {
  text-decoration: underline;
}

.lbc-section-note {
  font-size: 14px;
}

.lbc-attention-card {
  border-left: 3px solid color-mix(in srgb, var(--warn) 55%, transparent);
}

.lbc-contract-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  width: fit-content;
}

.lbc-contract-tab {
  font-family: var(--serif);
  font-size: 15px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lbc-contract-tab.lbc-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-1);
}

@media (max-width: 1100px) {
  .lbc-dashboard-obligations {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile shell + LBC components ── */
.lbc-mobile-topbar {
  display: none;
}

.lbc-sidebar-backdrop {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --lbc-mobile-topbar-h: 52px;
  }

  .lbc-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    height: var(--lbc-mobile-topbar-h);
    padding: 0 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .lbc-mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface2);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
  }

  .lbc-mobile-menu:hover {
    border-color: color-mix(in srgb, var(--ai) 35%, var(--border));
  }

  .lbc-mobile-brand {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--text);
  }

  .lbc-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9001;
    background: rgba(28, 26, 23, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.lbc-sidebar-open .lbc-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  [data-theme="dark"] .lbc-sidebar-backdrop {
    background: rgba(0, 0, 0, 0.55);
  }

  .lbc-shell {
    min-height: 100vh;
  }

  .lbc-contract-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .lbc-contract-row .badge {
    justify-self: start;
  }

  .lbc-obligation-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .lbc-complexity-filters {
    width: 100%;
  }

  .lbc-draft-provider-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .lbc-compare-toggle {
    margin-left: 0;
  }

  .lbc-contract-tabs {
    width: 100%;
    flex-wrap: wrap;
  }

  .lbc-limit-banner:not([hidden]) {
    flex-direction: column;
    align-items: flex-start;
    padding: 11px 14px;
  }
}

.lbc-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.lbc-compare-input {
  width: 100%;
  min-height: 280px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  resize: vertical;
}

.lbc-compare-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.lbc-playbook-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: var(--serif);
}

.lbc-playbook-row:last-child {
  border-bottom: none;
}

.lbc-playbook-row:hover .lbc-contract-title {
  color: var(--ai);
}

.lbc-rule-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.lbc-rule-card:last-child {
  border-bottom: none;
}

.lbc-rule-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.lbc-rule-head h3 {
  margin: 0;
  font-size: 17px;
}

.lbc-rule-clause {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}

body.lbc-pro-unlocked .lbc-pro-badge {
  display: none;
}

.lbc-sample-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px dashed color-mix(in srgb, var(--warn) 35%, var(--border));
  font-size: 14px;
}

@media (max-width: 768px) {
  .lbc-compare-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .lbc-obligation-title {
    font-size: 15px;
  }

  .lbc-obligation-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .lbc-draft-text {
    max-height: 360px;
    font-size: 14px;
  }

  .lbc-field input,
  .lbc-field textarea {
    font-size: 15px;
  }

  .lbc-complexity-filter {
    font-size: 12px;
    padding: 5px 10px;
  }
}

.page-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lbc-login-wrap {
  width: min(420px, 100%);
}

.lbc-login-card {
  background: var(--surface-elevated, #fff);
  border: 1px solid var(--border-subtle, #e6dfd4);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.lbc-login-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.lbc-login-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.lbc-login-form label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.lbc-login-form input {
  padding: 10px 12px;
  border: 1px solid var(--border-subtle, #d9d0c4);
  border-radius: 8px;
  font: inherit;
}

.lbc-login-error {
  color: var(--danger, #b42318);
  margin: 0;
  font-size: 0.9rem;
}

.lbc-login-foot {
  margin-top: 16px;
  font-size: 0.85rem;
}

.lbc-library-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.lbc-library-picker-btn {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #e6dfd4);
  background: var(--surface-elevated, #fff);
  cursor: pointer;
  font: inherit;
  min-width: 220px;
}

.lbc-library-picker-btn.is-active {
  border-color: var(--accent, #8b5a2b);
  background: color-mix(in srgb, var(--accent, #8b5a2b) 8%, transparent);
}

.lbc-library-picker-title {
  font-weight: 600;
}

.lbc-library-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

.lbc-library-layout-list {
  flex: 0 0 300px;
  width: 300px;
  max-width: 300px;
  min-width: 0;
}

.lbc-library-layout-detail {
  flex: 1 1 0;
  min-width: 0;
}

.lbc-library-list,
.lbc-library-detail {
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lbc-library-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.lbc-library-list-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.lbc-library-list-scroll {
  flex: 1;
  min-height: 0;
  max-height: min(68vh, 720px);
  overflow-y: auto;
  overflow-x: hidden;
}

.lbc-library-list .lbc-library-template-row {
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 10px;
  margin-bottom: 6px;
  box-sizing: border-box;
}

.lbc-library-list .lbc-library-template-row .lbc-contract-title {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  margin-bottom: 4px;
}

.lbc-library-list .lbc-library-template-row .lbc-contract-meta {
  display: block;
  font-size: 0.88rem;
  line-height: 1.3;
}

.lbc-library-list .lbc-playbook-row.is-active {
  border-color: var(--accent, #8b5a2b);
  background: color-mix(in srgb, var(--accent, #8b5a2b) 8%, transparent);
}

.lbc-library-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle, #ece7df);
}

#library-detail-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.lbc-library-detail-copy {
  min-width: 0;
  flex: 1 1 240px;
}

.lbc-library-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lbc-library-detail-actions .btn {
  white-space: nowrap;
}

.lbc-status-production {
  background: color-mix(in srgb, var(--accent, #8b5a2b) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #8b5a2b) 35%, transparent);
}

.lbc-status-live {
  background: color-mix(in srgb, #2d6a4f 12%, transparent);
  border: 1px solid color-mix(in srgb, #2d6a4f 30%, transparent);
}

.lbc-library-panels {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.lbc-library-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.lbc-library-hint {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.lbc-library-id {
  margin: 0 0 4px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #6b6258);
}

.lbc-library-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lbc-library-tab {
  border: 1px solid var(--border-subtle, #e6dfd4);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
}

.lbc-library-tab.is-active {
  background: var(--surface-muted, #f5f0e8);
  border-color: var(--accent, #8b5a2b);
}

.lbc-var-label-cell {
  font-weight: 600;
}

.lbc-library-vars-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.lbc-library-table-wrap {
  min-width: 0;
  overflow-x: auto;
}

.lbc-library-var-row {
  cursor: pointer;
}

.lbc-library-var-row:hover,
.lbc-library-var-row:focus-visible {
  background: color-mix(in srgb, var(--accent, #8b5a2b) 6%, transparent);
  outline: none;
}

.lbc-library-var-row.is-selected {
  background: color-mix(in srgb, var(--accent, #8b5a2b) 10%, transparent);
}

.lbc-library-var-detail {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #e6dfd4);
  background: var(--surface-muted, #f8f4ee);
  max-width: 100%;
}

.lbc-library-var-detail-label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #6b6258);
}

.lbc-library-var-detail-name {
  margin: 0 0 12px;
  font-size: 1rem;
}

.lbc-library-var-meta {
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.lbc-library-var-meta div {
  display: grid;
  gap: 2px;
}

.lbc-library-var-meta dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted, #6b6258);
}

.lbc-library-var-meta dd {
  margin: 0;
}

.lbc-library-var-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lbc-library-configure-form {
  display: grid;
  gap: 14px;
  max-width: 640px;
}

.lbc-library-configure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.lbc-required-mark {
  margin-left: 6px;
  font-size: 0.78rem;
  color: var(--accent, #8b5a2b);
  font-style: normal;
}

.lbc-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
}

.lbc-library-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.lbc-library-table th,
.lbc-library-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle, #ece7df);
  vertical-align: top;
}

.lbc-library-sections {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.lbc-library-section-btn {
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, #e6dfd4);
  background: var(--surface-elevated, #fff);
  cursor: pointer;
  font: inherit;
}

.lbc-library-section-btn:hover {
  border-color: var(--accent, #8b5a2b);
  background: color-mix(in srgb, var(--accent, #8b5a2b) 6%, transparent);
}

.lbc-library-source,
.lbc-library-preview-body {
  max-height: min(58vh, 560px);
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-muted, #f8f4ee);
  border: 1px solid var(--border-subtle, #e6dfd4);
}

.lbc-source-heading {
  margin: 1.1em 0 0.35em;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.lbc-source-heading:first-child {
  margin-top: 0;
}

.lbc-source-line {
  margin: 0 0 0.35em;
  white-space: pre-wrap;
  word-break: break-word;
}

.lbc-source-flash {
  animation: lbc-source-flash 1.2s ease;
}

@keyframes lbc-source-flash {
  0%, 100% { background: transparent; }
  20%, 60% { background: color-mix(in srgb, var(--accent, #8b5a2b) 18%, transparent); }
}

.lbc-library-preview-warn {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, #b45309 35%, transparent);
  background: color-mix(in srgb, #b45309 10%, transparent);
  font-size: 0.9rem;
}

.lbc-library-preview-ok {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #2d6a4f;
}

@media (max-width: 960px) {
  .lbc-library-layout {
    flex-direction: column;
  }

  .lbc-library-layout-list,
  .lbc-library-layout-detail {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .lbc-library-list-scroll {
    max-height: 320px;
  }
}
/* —— Workspace pages (contracts, review, risks, dates, reports, usage, settings) —— */
.lbc-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.lbc-contracts-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lbc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lbc-review-form {
  display: grid;
  gap: 14px;
}

.lbc-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-muted, #667085);
}

.lbc-check-row input {
  margin-top: 3px;
}

.lbc-risk-list {
  display: grid;
  gap: 12px;
}

.lbc-risk-card {
  border: 1px solid var(--border-subtle, #e6dfd4);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--surface-elevated, #fff);
}

.lbc-risk-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.lbc-risk-desc {
  margin: 0 0 8px;
  line-height: 1.45;
}

.lbc-risk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lbc-filter-chip {
  border: 1px solid var(--border-subtle, #e6dfd4);
  background: var(--surface-elevated, #fff);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text, #1f2933);
}

.lbc-filter-chip.is-active {
  border-color: var(--accent, #8b5a2b);
  background: color-mix(in srgb, var(--accent, #8b5a2b) 12%, transparent);
  font-weight: 600;
}

.lbc-dates-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lbc-date-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.lbc-date-row:hover {
  border-color: var(--border-subtle, #e6dfd4);
  background: color-mix(in srgb, var(--surface, #f8f5f0) 80%, transparent);
}

.lbc-date-when {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lbc-report-preview {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
  max-height: 60vh;
  overflow: auto;
  padding: 12px;
  background: var(--bg, #f5f7fa);
  border-radius: 8px;
  border: 1px solid var(--border-subtle, #e6dfd4);
}

.lbc-usage-detail {
  display: grid;
  gap: 16px;
}

.lbc-usage-detail h2 {
  margin: 0;
  font-size: 1.05rem;
}

.lbc-usage-note {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.lbc-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.lbc-settings-dl {
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}

.lbc-settings-dl > div {
  display: grid;
  gap: 2px;
}

.lbc-settings-dl dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #667085);
}

.lbc-settings-dl dd {
  margin: 0;
  font-weight: 600;
}

.lbc-settings-legal {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-muted, #667085);
}

.top-cards--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .lbc-form-grid {
    grid-template-columns: 1fr;
  }

  .lbc-date-row {
    grid-template-columns: 1fr;
  }

  .top-cards--3 {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Locke Professional — public sales landing (no sidebar)
   ═══════════════════════════════════════════════════════════════ */

body.lbc-public-home {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

body.lbc-public-home .app,
body.lbc-public-home .sidebar {
  display: none !important;
}

.pub-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.pub-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 12px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--border);
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(12px);
}

.pub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.pub-seal {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: var(--navy);
  color: #f7efe1;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 800;
}

.pub-word {
  color: var(--navy);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.pub-word strong { font-weight: 800; }
.pub-word em {
  margin-left: 5px;
  color: var(--gold);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.pub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2.2vw, 28px);
  margin-left: 8px;
}

.pub-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.pub-nav a:hover { color: var(--navy); }

.pub-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.pub-link {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.pub-link:hover { text-decoration: underline; }

.pub-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.pub-menu-btn span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--navy);
  border-radius: 2px;
}

.pub-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px clamp(20px, 5vw, 72px) 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.pub-mobile-nav[hidden] { display: none !important; }
.pub-mobile-nav a {
  padding: 12px 4px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.pub-mobile-nav .button { margin-top: 10px; text-align: center; }

body.lbc-public-home .lbc-home { flex: 1; }

body.lbc-public-home .lbc-home .button,
.pub-header .button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

body.lbc-public-home .button-primary,
.pub-header .button-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-1);
}
body.lbc-public-home .button-primary:hover,
.pub-header .button-primary:hover {
  background: #0f1a2c;
  color: #fff;
}
body.lbc-public-home .button-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: #d7e0e3;
}
body.lbc-public-home .button-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.lbc-home .section-pad {
  padding-left: clamp(24px, 5vw, 72px);
  padding-right: clamp(24px, 5vw, 72px);
}
.lbc-home .eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lbc-home .text-link {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.lbc-home .text-link span { margin-left: 6px; color: var(--gold); }

.lbc-home .home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding-top: 48px;
  padding-bottom: 48px;
  background: linear-gradient(180deg, var(--bg), #fff);
}
.lbc-home .home-hero-copy { max-width: 640px; }
.lbc-home .home-hero h1 {
  max-width: 16ch;
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.lbc-home .hero-lede {
  max-width: 50ch;
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}
.lbc-home .home-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.lbc-home .home-personas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.lbc-home .home-personas span {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.lbc-home .home-trio {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 20px;
}
.lbc-home .home-trio span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3a4a52;
  font-size: 13px;
}
.lbc-home .home-trio b { color: var(--ok); }

.lbc-home .home-paper {
  width: 100%;
  max-width: 520px;
  justify-self: end;
  overflow: hidden;
  border: 1px solid #e5ded1;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-2);
}
.lbc-home .home-paper-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  border-bottom: 1px solid #efe9dd;
  background: #faf8f3;
  color: #8a8474;
  font-size: 12px;
}
.lbc-home .home-tag {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid #e6d4b2;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lbc-home .home-paper-body { padding: 24px 28px; }
.lbc-home .home-paper-body .clause-tag {
  margin: 0;
  color: #a89878;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lbc-home .home-paper-body h3 {
  margin: 8px 0 2px;
  color: var(--navy);
  font-size: 19px;
  font-weight: 600;
  text-align: center;
}
.lbc-home .home-paper-body .doc-sub {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}
.lbc-home .home-paper-body p {
  color: #33404c;
  font-size: 13px;
  line-height: 1.65;
}
.lbc-home .home-paper-body p b { color: var(--navy); }
.lbc-home .home-paper-wm {
  margin: 10px 0 0 !important;
  color: rgba(201, 67, 67, 0.55) !important;
  font-style: italic;
  font-size: 9px !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: right;
}

.lbc-home .home-intents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  padding-bottom: 28px;
}
.lbc-home .home-intents a {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.lbc-home .home-intents a:hover {
  border-color: #c9bfae;
  box-shadow: var(--shadow-1);
}

.lbc-home .home-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
  padding: 16px clamp(24px, 5vw, 72px);
  background: var(--navy);
  color: #cdd7db;
  font-size: 13px;
}
.lbc-home .home-strip b {
  color: #d8b982;
  margin-right: 4px;
}

.lbc-home .home-section {
  padding-top: 72px;
  padding-bottom: 72px;
}
.lbc-home .home-sechead {
  max-width: 680px;
  margin: 0 auto 28px;
  text-align: center;
}
.lbc-home .home-sechead h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.12;
}
.lbc-home .home-sechead p {
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.lbc-home .home-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.lbc-home .home-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  text-decoration: none;
}
.lbc-home .home-card-static { cursor: default; }
.lbc-home .home-card-featured {
  border-color: #c9bfae;
  box-shadow: var(--shadow-1);
  background: linear-gradient(180deg, #fff, #faf7f1);
}
.lbc-home .home-card .cat {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lbc-home .home-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  font-weight: 600;
}
.lbc-home .home-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.lbc-home .home-card .meta {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.lbc-home .home-card .meta span {
  display: flex;
  align-items: center;
  gap: 9px;
}
.lbc-home .home-card .meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
}
.lbc-home .home-card .cf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}
.lbc-home .home-card .price {
  color: var(--navy);
  font-size: 18px;
  font-weight: 600;
}
.lbc-home .home-card .view {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.lbc-home .home-coming {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.65;
}
.lbc-home .home-coming b { color: var(--navy); }

.lbc-home .home-how-section {
  padding-top: 72px;
  padding-bottom: 72px;
  background: var(--surface2);
}
.lbc-home .home-how {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 18px;
}
.lbc-home .home-how article {
  padding-left: 16px;
  border-left: 2px solid #ded7c8;
}
.lbc-home .home-how article > span {
  color: var(--gold);
  font-size: 15px;
  font-weight: 600;
}
.lbc-home .home-how h3 {
  margin: 8px 0 4px;
  color: var(--navy);
  font-size: 16px;
}
.lbc-home .home-how p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.lbc-home .home-split-section {
  padding-top: 72px;
  padding-bottom: 72px;
}
.lbc-home .home-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}
.lbc-home .home-split h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 600;
  line-height: 1.12;
}
.lbc-home .home-split .lede {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.lbc-home .home-chk {
  display: grid;
  gap: 11px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.lbc-home .home-chk li {
  display: flex;
  gap: 11px;
  color: #2b323c;
  font-size: 14px;
}
.lbc-home .home-chk li span {
  color: var(--gold);
  font-weight: 800;
}
.lbc-home .home-privacy {
  padding: 28px;
  border-radius: 14px;
  background: var(--navy);
  color: #e6e9ee;
}
.lbc-home .home-privacy h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}
.lbc-home .home-privacy .pc {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.lbc-home .home-privacy .pc:last-child { border-bottom: 0; }
.lbc-home .home-privacy .pc > span {
  color: #8fbf9e;
  font-weight: 800;
}
.lbc-home .home-privacy .pc p {
  margin: 0;
  color: #c2c8d0;
  font-size: 13px;
}
.lbc-home .home-privacy .pc b { color: #fff; }

/**
 * Pre-footer call to action.
 *
 * Sand band, matching the Locke Direct ask strip so the two products share the
 * same rhythm going into the footer: sand ground, brass eyebrow, ink headline.
 * Colours are Direct's own tokens — --brass-pale #efe3d0, --brass-dark #7f5422,
 * --ink #102735, --text-muted #60717a, --border #ddd9d1 — carried across rather
 * than eyeballed, so the two bands are the same colour and not merely similar.
 *
 * Direct sets this as a slim left-aligned utility strip. Here it stays the tall
 * centred final CTA it already was; only the palette is shared.
 */
/**
 * Pre-footer band, dimensioned to the Locke Direct ask strip (.lp-ask-footer).
 *
 * Same ground, same rhythm going into the footer: a slim flex strip with the
 * copy left and the actions right, 22px of vertical padding, rather than the
 * tall centred block this was. Colours and metrics are Direct's own tokens —
 * --brass-pale #efe3d0, --brass-dark #7f5422, --ink #102735,
 * --text-muted #60717a, --border #ddd9d1 — carried across rather than eyeballed.
 */
.lbc-home .home-finalcta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 4vw, 80px);
  border-top: 1px solid #ddd9d1;
  background: #efe3d0;
  text-align: left;
}
.lbc-home .home-finalcta-copy {
  max-width: 760px;
}
.lbc-home .home-finalcta .eyebrow {
  margin: 0 0 4px;
  color: #7f5422;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.lbc-home .home-finalcta h2 {
  margin: 0;
  color: #102735;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.2;
}
.lbc-home .home-finalcta-copy span {
  display: block;
  margin-top: 5px;
  color: #60717a;
  font-size: 12px;
}
.lbc-home .home-finalcta-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}
/* Both buttons are restated for the sand ground: the primary was white-on-navy
   and the ghost drew light-on-dark, so neither reads against #efe3d0. */
.lbc-home .home-finalcta .button-primary {
  background: var(--navy);
  color: #f7efe1;
}
.lbc-home .home-finalcta .button-primary:hover {
  background: #0a1d28;
  color: #fff;
}
/* Scoped through body.lbc-public-home .lbc-home so this outranks the shared
   `body.lbc-public-home .lbc-home .button` border shorthand, which would
   otherwise keep the outline transparent on the sand ground. */
body.lbc-public-home .lbc-home .home-finalcta .button-ghost {
  border-color: rgba(16, 39, 53, 0.35);
  color: #102735;
}
body.lbc-public-home .lbc-home .home-finalcta .button-ghost:hover {
  border-color: #102735;
  background: rgba(16, 39, 53, 0.06);
  color: #102735;
}

/**
 * Footer, dimensioned to the Locke Direct footer (.lp-footer).
 *
 * Measured side by side at 1285px this stood 214px against Direct's 178px. The
 * difference was almost entirely vertical padding — 56/40 here against Direct's
 * 18/20 — with the rest coming from a wider column gap, looser heading margins
 * and 4px stacked on every link. All four are matched to Direct's values below.
 * The ground was already #0a1d28 (Direct's --ink-deep).
 */
.lbc-home .home-footer {
  display: grid;
  /* Direct's own track definition, not an approximation of its rendered widths:
     a wide brand column and three equal link columns that hold 120px before the
     layout collapses. Measured side by side at 1000px, the previous
     1.5fr/0.7fr/0.7fr/1fr had already collapsed to two columns and wrapped onto
     a second row while Direct was still showing four. */
  grid-template-columns: minmax(360px, 2.3fr) repeat(3, minmax(120px, 0.7fr));
  gap: clamp(18px, 2vw, 30px);
  padding-top: 18px;
  padding-bottom: 20px;
  background: #0a1d28;
  color: #aebdc2;
}
.lbc-home .home-footer h3 {
  margin: 0 0 6px;
  color: #dfc18c;
  font-size: 11px;
  /* Direct renders these at 400. An h3 defaults to bold, so the weight is
     stated rather than inherited. */
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lbc-home .home-footer a {
  display: block;
  margin: 0;
  padding: 2px 0;
  color: #aebdc2;
  font-size: 12.5px;
  line-height: 1.45;
  text-decoration: none;
}
.lbc-home .home-footer a:hover { color: #fff; }
.lbc-home .home-footer p {
  margin: 5px 0 0;
  color: #aebdc2;
  font-size: 12px;
  line-height: 1.4;
}
/**
 * Footer brand lockup.
 *
 * The footer previously built its own mark (.home-footer-brand + .home-seal)
 * with a single bold "Locke Professional" run, a 6px radius and no serif face —
 * so the same page drew the Locke mark two different ways, and neither matched
 * Locke Direct. Both classes are deleted. The footer now uses the same
 * .wordmark markup as the header, and only the size and the on-dark colours are
 * restated here, mirroring how Direct scopes .lp-footer .lp-seal and
 * .lp-footer .lp-word over its one shared definition.
 */
/* Inline, matching this product's own header lockup — seal beside the wordmark.
   Direct stacks its footer mark, but the instruction here is that the footer
   match the top of this page, and the header is inline. The shared part is the
   mark itself (rounded seal, split wordmark), not its orientation. */
.lbc-home .home-footer .wordmark {
  margin-bottom: 10px;
}
.lbc-home .home-footer .wordmark-seal {
  width: 30px;
  height: 30px;
  font-size: 15px;
}
/* The base rule paints the wordmark navy, which is unreadable on the navy
   footer, so the on-dark colours are stated for this context. */
.lbc-home .home-footer .wordmark > span:last-child {
  color: #eef1f4;
  font-size: 18px;
}
.lbc-home .home-footer .wordmark strong {
  color: #eef1f4;
}
.lbc-home .home-footer .wordmark em {
  color: #d7b476;
}
/* Direct's .lp-footer .lp-disc. The two forced declarations here were winning
   over the .home-footer p rule above rather than agreeing with it; stating the
   values once in a selector of sufficient weight removes the conflict. */
.lbc-home .home-footer .home-disc {
  max-width: 92ch;
  margin-top: 5px;
  color: #bac5c9;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1000px) {
  .lbc-home .home-hero { grid-template-columns: 1fr; gap: 36px; }
  .lbc-home .home-hero h1 { max-width: 100%; }
  .lbc-home .home-paper { justify-self: stretch; max-width: 560px; }
  .lbc-home .home-services-grid { grid-template-columns: 1fr 1fr; }
  .lbc-home .home-how { grid-template-columns: 1fr 1fr; }
  .lbc-home .home-split { grid-template-columns: 1fr; }
  .pub-nav, .pub-actions { display: none; }
  .pub-menu-btn { display: block; }
}
/* Direct collapses its footer at 860px, not 1000px, and gives the brand block
   the full row when it does. Collapsing at 1000px is what put this footer onto
   two rows at a width where Direct still showed four columns. */
@media (max-width: 860px) {
  .lbc-home .home-footer { grid-template-columns: 1fr 1fr; }
  .lbc-home .home-footer > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .lbc-home .home-finalcta {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .lbc-home .home-finalcta-actions { width: 100%; }
  .lbc-home .home-finalcta-actions .button {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 620px) {
  .lbc-home .home-services-grid,
  .lbc-home .home-how,
  .lbc-home .home-footer { grid-template-columns: 1fr; }
  .lbc-home .home-finalcta-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Public header — matched to Locke Direct (V2) public bar
   Brand text: Professional (not Direct)
   ═══════════════════════════════════════════════════════════════ */

body.lbc-public-home .public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

body.lbc-public-home .public-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  min-height: 84px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 12px clamp(24px, 5vw, 72px);
  border-bottom: 1px solid rgba(203, 197, 187, 0.78);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(16px);
}

body.lbc-public-home .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
}

body.lbc-public-home .wordmark-seal {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  /* Rounded, matching the Locke Direct seal (.lp-seal: 1.5px / 9px). The mark is
     shared brand furniture across Locke products, so it is drawn one way. */
  border: 1.5px solid var(--gold);
  border-radius: 9px;
  background: var(--navy);
  color: #f7efe1;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

body.lbc-public-home .wordmark > span:last-child {
  display: flex;
  align-items: baseline;
  color: var(--navy);
  font-size: 21px;
  letter-spacing: -0.02em;
}

body.lbc-public-home .wordmark strong {
  font-weight: 800;
}

body.lbc-public-home .wordmark em {
  margin-left: 4px;
  color: var(--gold);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

body.lbc-public-home .public-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 36px);
}

body.lbc-public-home .public-nav a,
body.lbc-public-home .sign-in-link {
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: #52656e;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

body.lbc-public-home .public-nav a:hover,
body.lbc-public-home .public-nav a.active,
body.lbc-public-home .sign-in-link:hover {
  color: var(--navy);
}

body.lbc-public-home .public-nav a.active {
  box-shadow: inset 0 -1px var(--gold);
}

body.lbc-public-home .public-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

body.lbc-public-home .public-header .button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

body.lbc-public-home .public-header .button-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 7px 16px rgba(16, 39, 53, 0.14);
}

body.lbc-public-home .public-header .button-primary:hover {
  background: #0f1a2c;
  color: #fff;
  transform: translateY(-1px);
}

body.lbc-public-home .mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

body.lbc-public-home .mobile-menu-button > span:not(.sr-only) {
  display: block;
  height: 1px;
  margin: 4px 0;
  background: var(--navy);
}

body.lbc-public-home .mobile-public-menu {
  position: fixed;
  z-index: 60;
  top: 76px;
  right: 16px;
  left: 16px;
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-2);
}

body.lbc-public-home .mobile-public-menu[hidden] {
  display: none !important;
}

body.lbc-public-home .mobile-public-menu > a:not(.button) {
  padding: 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}

body.lbc-public-home .mobile-public-menu > a:not(.button):hover {
  background: var(--surface2);
}

body.lbc-public-home .mobile-public-menu > .button {
  margin-top: 8px;
  text-align: center;
}

body.lbc-public-home .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hide legacy pub-header if any residual markup */
body.lbc-public-home .pub-header { display: none !important; }

@media (max-width: 1024px) {
  body.lbc-public-home .public-nav { display: none; }
  body.lbc-public-home .public-header { grid-template-columns: 1fr auto; }
  body.lbc-public-home .public-actions { display: none; }
  body.lbc-public-home .mobile-menu-button { display: block; }
}

@media (max-width: 768px) {
  body.lbc-public-home .public-header {
    min-height: 72px;
    padding: 10px 18px;
  }
  body.lbc-public-home .mobile-public-menu { top: 72px; }
  body.lbc-public-home .wordmark > span:last-child { font-size: 18px; }
  body.lbc-public-home .mobile-public-menu > a:not(.button) { font-size: 16px; }
}

/* Product disclaimer + jurisdiction gap assist */
/* Full product notice lives at download gate (.lbc-export-ack), not page-top banners. */
.lbc-disclaimer-banner {
  display: none;
}
.lbc-disclaimer-inline {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.lbc-export-ack {
  margin: 12px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle, #e6dfd4);
  border-radius: 10px;
  background: var(--surface-muted, #f8f4ee);
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.lbc-export-ack-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #6b6258);
  font-weight: 700;
}

.lbc-export-ack-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text, #2a2118);
}

.lbc-export-ack-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.4;
  cursor: pointer;
}

.lbc-export-ack-check input {
  margin-top: 3px;
  flex: 0 0 auto;
}
.lbc-jurisdiction-form {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.lbc-jurisdiction-gaps,
.lbc-jurisdiction-rules {
  margin: 0 0 14px;
  padding-left: 1.2rem;
}
.lbc-jurisdiction-gaps li,
.lbc-jurisdiction-rules li {
  margin-bottom: 8px;
}
.lbc-jurisdiction-fill {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border, #dcc9b0);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper, #fffaf3) 90%, #eee);
}
.lbc-jurisdiction-fill-text {
  white-space: pre-wrap;
  font-family: var(--serif, Georgia, serif);
  font-size: 0.92rem;
  margin: 8px 0 0;
}
.lbc-jurisdiction-results h3 {
  margin: 16px 0 8px;
  font-size: 1rem;
}

/* Multi-format export control */
.lbc-export-format {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.lbc-export-format select {
  font: inherit;
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border, #dcc9b0);
  background: var(--surface, #fff);
  color: var(--text, #1c1a17);
}
.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;
}

/* —— Guided drafting issue cards (attorney UI) —— */
.lbc-guided-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle, #e6dfd4);
}

.lbc-guided-toolbar-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.lbc-guided-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lbc-guided-meta {
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.lbc-guided-meta code {
  font-size: 0.8em;
}

.lbc-guided-toast {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, #2d6a4f 12%, transparent);
  border: 1px solid color-mix(in srgb, #2d6a4f 28%, transparent);
  color: var(--text, #2c2620);
  font-size: 0.9rem;
}

.lbc-guided-section-title {
  margin: 20px 0 6px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.lbc-issue-card-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.lbc-issue-card {
  border: 1px solid var(--border-subtle, #e6dfd4);
  border-radius: 10px;
  background: var(--surface-elevated, #fff);
  overflow: hidden;
}

.lbc-issue-card.is-decided {
  border-color: color-mix(in srgb, #2d6a4f 35%, var(--border-subtle, #e6dfd4));
}

.lbc-issue-card.is-supplemental {
  border-style: dashed;
}

.lbc-issue-card-thin {
  padding: 12px 14px;
}

.lbc-issue-details {
  margin: 0;
}

.lbc-issue-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.lbc-issue-summary::-webkit-details-marker {
  display: none;
}

.lbc-issue-summary-main {
  flex: 1 1 240px;
  min-width: 0;
}

.lbc-issue-kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #6b6258);
  margin-bottom: 4px;
}

.lbc-issue-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text, #2c2620);
}

.lbc-issue-rec-line {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.lbc-issue-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 100%;
}

.lbc-issue-status-gold {
  background: color-mix(in srgb, #c9a227 22%, transparent);
  border-color: color-mix(in srgb, #c9a227 45%, transparent);
}

.lbc-issue-status-draft {
  background: color-mix(in srgb, #6b7280 14%, transparent);
}

.lbc-issue-status-incomplete {
  background: color-mix(in srgb, #b45309 14%, transparent);
}

.lbc-issue-load-bearing {
  background: color-mix(in srgb, #9b1c1c 12%, transparent);
  border-color: color-mix(in srgb, #9b1c1c 30%, transparent);
}

.lbc-issue-posture-pill {
  background: color-mix(in srgb, var(--accent, #8b5a2b) 12%, transparent);
}

.lbc-issue-decision-accepted {
  background: color-mix(in srgb, #2d6a4f 16%, transparent);
  border-color: color-mix(in srgb, #2d6a4f 32%, transparent);
}

.lbc-issue-decision-pending {
  background: color-mix(in srgb, #b45309 14%, transparent);
}

.lbc-issue-decision-deferred {
  background: color-mix(in srgb, #6b7280 12%, transparent);
}

.lbc-issue-decision-custom {
  background: color-mix(in srgb, #5b4b8a 14%, transparent);
}

.lbc-issue-decision-open {
  background: transparent;
}

.lbc-issue-body {
  padding: 0 14px 14px;
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border-subtle, #ece7df);
}

.lbc-issue-client-q {
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.lbc-issue-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #6b6258);
  margin-right: 6px;
}

.lbc-issue-block {
  margin: 0;
}

.lbc-issue-block p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.lbc-issue-subhead {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #6b6258);
  font-weight: 600;
}

.lbc-issue-recommended {
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent, #8b5a2b) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #8b5a2b) 18%, transparent);
}

.lbc-issue-meta-grid {
  display: grid;
  gap: 8px;
  margin: 0;
}

.lbc-issue-meta-grid div {
  display: grid;
  gap: 2px;
}

.lbc-issue-meta-grid dt {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #6b6258);
}

.lbc-issue-meta-grid dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.lbc-issue-overlook {
  margin: 0;
  font-size: 0.88rem;
}

.lbc-issue-answer-field {
  max-width: 100%;
}

.lbc-issue-edit:not([hidden]) {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed var(--border-subtle, #e6dfd4);
  background: var(--surface-muted, #f8f4ee);
}

.lbc-issue-alts:not([hidden]) {
  display: block;
}

.lbc-issue-alt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.lbc-issue-alt {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, #e6dfd4);
  background: var(--surface-elevated, #fff);
}

.lbc-issue-alt-copy {
  flex: 1 1 200px;
  min-width: 0;
}

.lbc-issue-alt-copy p {
  margin: 4px 0 0;
  font-size: 0.9rem;
}

.lbc-issue-notes,
.lbc-issue-related {
  font-size: 0.9rem;
}

.lbc-issue-notes summary,
.lbc-issue-related summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted, #6b6258);
}

.lbc-issue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.lbc-issue-ledger-note {
  margin: 0;
  font-size: 0.86rem;
}

.lbc-guided-overlooked-list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.9rem;
  display: grid;
  gap: 6px;
}

/* Custom Agreement workflow */
.lbc-custom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 960px) {
  .lbc-custom-grid {
    grid-template-columns: 1fr;
  }
}

.lbc-custom-summary {
  display: grid;
  gap: 10px;
  font-size: 0.92rem;
}

.lbc-custom-summary h3 {
  margin-top: 8px;
}

.lbc-review-guided {
  margin-top: 16px;
}

.lbc-review-guided .lbc-issue-card-list {
  margin-top: 12px;
}
.lbc-session-list {
  display: grid;
  gap: 0.75rem;
}

.lbc-session-item {
  align-items: center;
  border-top: 1px solid var(--line, #d8d0c4);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 0.75rem;
}

.lbc-session-item p {
  margin: 0.25rem 0 0;
}
.lbc-recovery-prompt {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line, #d7dbe2);
  border-left: 4px solid var(--accent, #315efb);
  border-radius: 0.5rem;
  background: var(--surface, #fff);
}

.lbc-recovery-prompt p {
  margin: 0 0 0.65rem;
}

.lbc-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lbc-recovery-status {
  margin-top: 0.5rem;
  font-size: 0.82rem;
}
