.ld-shell {
  --ld-line: #e1e3e8;
  --ld-muted: #6b7280;
  --ld-accent: #5e6ad2;
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  color: #202228;
}

.ld-shell *, .ld-shell *::before, .ld-shell *::after { box-sizing: border-box; }
.ld-shell-head, .ld-card-head, .ld-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ld-shell-head { padding: 15px 17px; border: 1px solid var(--ld-line); border-radius: 12px; background: linear-gradient(135deg, #fff, #f7f7fc); }
.ld-shell h2, .ld-shell h3, .ld-shell p { margin: 0; }
.ld-shell h2 { margin-top: 2px; font-size: 1.14rem; }
.ld-shell h3 { font-size: 0.98rem; }
.ld-shell p { color: var(--ld-muted); font-size: 0.78rem; line-height: 1.55; }
.ld-shell .ld-kicker { color: var(--ld-accent); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

.ld-card { overflow: hidden; border: 1px solid var(--ld-line); border-radius: 11px; background: #fff; box-shadow: 0 1px 2px rgba(20, 24, 34, 0.03); }
.ld-card-head { padding: 13px 15px; border-bottom: 1px solid var(--ld-line); }
.ld-card-head > div { display: grid; gap: 3px; min-width: 0; }
.ld-pill { flex: none; padding: 3px 8px; border-radius: 999px; color: #5158a5; background: #eef0ff; font-size: 0.75rem; font-weight: 750; }
.ld-editor form { padding: 15px; }

.ld-table-wrap { overflow-x: auto; }
.ld-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.ld-table th { padding: 8px 10px; color: #777d88; background: #fafafa; font-size: 0.75rem; text-align: left; }
.ld-table td { padding: 8px 10px; border-top: 1px solid #eceef1; vertical-align: middle; }
.ld-table tr.is-selected { background: #f4f5ff; }
.ld-table small { color: var(--ld-muted); }
.ld-table button { display: grid; gap: 2px; min-width: 170px; padding: 0; border: 0; color: #252831; background: transparent; text-align: left; cursor: pointer; }
.ld-table button strong { color: #5059ac; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; }

.ld-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--ld-line); }
.ld-facts div { min-width: 0; padding: 8px 14px; background: #fafafa; }
.ld-facts dt { color: #858b96; font-size: 0.75rem; }
.ld-facts dd { overflow: hidden; margin: 2px 0 0; color: #3f434c; font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }

.ld-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.ld-field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.ld-field > span, .ld-sensitive legend { color: #555b67; font-size: 0.75rem; font-weight: 700; }
.ld-field input, .ld-field select, .ld-field textarea {
  width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #d9dce2; border-radius: 7px;
  color: #252830; background: #fff; font: inherit; font-size: 0.76rem;
}
.ld-field textarea { min-height: 68px; resize: vertical; line-height: 1.45; }
.ld-field input:focus, .ld-field select:focus, .ld-field textarea:focus { outline: 3px solid rgba(94, 106, 210, 0.14); border-color: #9ba1df; }
.ld-wide { grid-column: 1 / -1; }

.ld-sensitive { display: grid; gap: 10px; min-width: 0; margin: 2px 0; padding: 12px; border: 1px solid #dfd7ef; border-radius: 9px; background: #fbf9ff; }
.ld-sensitive > p { margin-bottom: 1px; color: #705d81; }
.ld-contact-wrap { overflow-x: auto; border: 1px solid #e3deeb; border-radius: 8px; background: #fff; }
.ld-contact-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.ld-contact-table th { padding: 6px 7px; color: #746d7d; background: #f7f4fa; font-size: 0.75rem; text-align: left; }
.ld-contact-table td { padding: 5px; border-top: 1px solid #eeeaf2; }
.ld-contact-table input:not([type="radio"]) { width: 100%; min-height: 32px; padding: 5px 7px; border: 1px solid #dad5e0; border-radius: 6px; font: inherit; font-size: 0.75rem; }
.ld-contact-table td:nth-last-child(2), .ld-contact-table td:last-child { text-align: center; white-space: nowrap; }
.ld-inline-actions { display: flex; justify-content: flex-start; }
.ld-callout { display: grid; gap: 3px; padding: 9px 11px; border: 1px solid #dae2ef; border-radius: 8px; color: #516274; background: #f5f8fc; }
.ld-callout strong { font-size: 0.75rem; }
.ld-callout span { font-size: 0.75rem; line-height: 1.45; }
.ld-muted { color: #6a6870; border-color: #e0e1e5; background: #f7f7f8; }

.ld-actions { justify-content: flex-end; flex-wrap: wrap; margin-top: 13px; }
.ld-shell-head .ld-actions { margin-top: 0; }
.ld-file-button { position: relative; overflow: hidden; }
.ld-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ld-field small { color: #7b818c; font-size: 0.75rem; line-height: 1.45; }
.ld-exchange-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eceef1; color: #747a85; font-size: 0.75rem; line-height: 1.45; }
.ld-exchange-note strong { flex: none; color: #555c68; }
.ld-shell .ld-message { margin-top: 11px; padding: 9px 11px; border-radius: 7px; }
.ld-shell .ld-error { color: #a22e37; background: #fff0f1; }
.ld-shell .ld-success { color: #16714f; background: #eaf8f1; }
.ld-empty { padding: 20px; border: 1px dashed #d9dce2; border-radius: 10px; color: #777e89; background: #fbfbfc; font-size: 0.78rem; text-align: center; }

.ld-dialog { width: min(650px, calc(100vw - 28px)); max-height: min(720px, calc(100vh - 28px)); padding: 18px; border: 1px solid #d8dae2; border-radius: 12px; color: #252830; background: #fff; box-shadow: 0 20px 80px rgba(20, 22, 32, 0.22); }
.ld-dialog::backdrop { background: rgba(22, 24, 30, 0.42); backdrop-filter: blur(2px); }
.ld-dialog h3 { margin: 4px 0; }
.ld-close { position: absolute; top: 9px; right: 10px; width: 30px; height: 30px; border: 0; color: #737985; background: transparent; font-size: 1.15rem; }
.ld-preview { display: grid; gap: 1px; max-height: 380px; margin: 13px 0 0; overflow: auto; background: var(--ld-line); }
.ld-preview div { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 9px; padding: 8px; background: #fafafa; }
.ld-preview dt { color: #656b76; font-size: 0.75rem; font-weight: 700; }
.ld-preview dd { min-width: 0; margin: 0; }
.ld-preview code { display: block; overflow-wrap: anywhere; color: #3d4350; font-size: 0.75rem; white-space: pre-wrap; }

@media (max-width: 760px) {
  .ld-shell-head, .ld-card-head { align-items: flex-start; flex-direction: column; }
  .ld-grid, .ld-facts { grid-template-columns: 1fr; }
  .ld-wide { grid-column: auto; }
  .ld-preview div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ld-shell * { scroll-behavior: auto; }
}

/* Professional directory and sourcing surfaces follow the approved compact workspace. */
.ld-professional { gap:16px; margin-top:4px; }
.ld-work-heading { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:4px 0 12px; }
.ld-work-heading h2 { font-size:21px;font-weight:650;letter-spacing:-.35px;margin:0 0 5px; }
.ld-work-heading p { font-size:12px; }
.ld-work-toolbar {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ld-work-toolbar form {display:flex;gap:6px;margin:0}
.ld-work-toolbar input {border:1px solid #e0e3e8;border-radius:6px;min-height:32px;padding:5px 10px;font:inherit;font-size:12px}
.ld-work-tabs {display:flex;gap:3px;flex-wrap:wrap;border-bottom:1px solid #e5e7eb;padding:0 0 5px}
.ld-work-tabs button {background:transparent;border:0;border-radius:5px;color:#69717d;padding:8px 11px;font:inherit;font-size:12px;cursor:pointer}
.ld-work-tabs button.is-active {color:#414fac;background:#eef0ff;font-weight:600}
.ld-work-toolbar .ld-work-tabs {border:0}
.ld-back {border:0;background:none;color:#68717c;cursor:pointer;text-align:left;padding:0;font:inherit;font-size:12px}
.ld-identity {display:flex;gap:12px;align-items:center}
.ld-avatar {width:42px;height:42px;display:grid;place-items:center;border:1px solid #e3e5eb;border-radius:9px;background:#f5f6fa;color:#5a6380;font-size:13px;flex:none}
.ld-business-facts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px 24px;margin:0;padding:22px}
.ld-business-facts dt,.ld-capability-summary span {font-size:12px;color:#7d8591;margin-bottom:6px}
.ld-business-facts dd {font-size:13px;line-height:1.6;margin:0;color:#303744;overflow-wrap:anywhere}
.ld-capability-summary {border-top:1px solid #edf0f4;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:22px}
.ld-capability-summary div {display:grid;gap:4px}
.ld-capability-summary strong {font-size:12px;font-weight:500}
.ld-shell .ld-list-note {font-size:12px;padding:12px 0;color:#7b828d}
.ld-detail-content .ld-list-note {padding:14px 20px}
.ld-table td {padding:12px 14px;font-size:12px}
.ld-table th {padding:10px 14px;font-size:12px;font-weight:500}
.ld-table small {display:block;font-size:12px;margin-top:3px}
.ld-table .ld-supplier-cell {display:flex;align-items:center;gap:10px;min-width:210px}
.ld-table .ld-supplier-cell strong {font:inherit;font-size:13px;color:#31394a;font-weight:600}
.ld-table .ld-avatar {width:32px;height:32px;font-size:12px}
.ld-edit-overlay {position:fixed;inset:0;z-index:120;display:flex;justify-content:flex-end;background:#222b394d}
.ld-edit-surface {width:min(750px,100vw);height:100%;overflow:auto;background:white;box-shadow:-8px 0 36px #18233920;padding:20px}
.ld-edit-close {position:sticky;top:0;z-index:2;background:#f4f5f8;border:1px solid #e1e4ea;border-radius:6px;padding:7px 12px;margin-bottom:12px;cursor:pointer}
.ld-edit-group {border:1px solid #e4e7ec;border-radius:7px;padding:0 12px}
.ld-edit-group summary {padding:12px 0;font-size:12px;font-weight:600;cursor:pointer}
.ld-edit-group>.ld-grid {padding-bottom:12px}
.ld-edit-surface .ld-facts,.ld-edit-surface .ld-kicker,.ld-edit-surface .ld-exchange-note {display:none}
.ld-edit-surface .ld-actions {position:sticky;bottom:-20px;background:white;padding:14px 0;border-top:1px solid #e5e7eb}
.ld-source-layout {display:grid;grid-template-columns:210px minmax(0,1fr);border:1px solid #e5e7eb;border-radius:8px;background:#fff;min-height:330px}
.ld-source-list {border-right:1px solid #e5e7eb;padding:8px;background:#fcfcfd}
.ld-source-list button {display:block;width:100%;text-align:left;border:0;border-radius:6px;background:none;padding:12px;font:inherit;font-size:12px;cursor:pointer;color:#3a4452}
.ld-source-list button.is-active {background:#eef0fc;color:#4b55aa}
.ld-source-list small {display:block;color:#8a919c;margin-top:5px}
.ld-source-body {min-width:0;padding:16px}
.ld-source-body header {display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}
.ld-source-body h3 {font-size:15px;margin:0}
.ld-source-body .ld-work-tabs {margin-bottom:14px}
.ld-local-filter {display:flex;align-items:center;gap:10px;margin:0 0 14px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px;background:#fafafa;color:#69717d;font-size:12px}
.ld-local-filter>span {flex:none;font-weight:600}
.ld-local-filter>div {display:flex;flex-wrap:wrap;gap:5px}
.ld-local-filter button {min-height:28px;padding:5px 9px;border:1px solid transparent;border-radius:6px;background:transparent;color:#69717d;font:inherit;cursor:pointer}
.ld-local-filter button.is-active {border-color:#d8dcfb;background:#eef0ff;color:#414fac;font-weight:600}
.ld-source-summary {display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#f7f8fb;border:1px solid #e8eaf0;border-radius:6px;font-size:12px;margin-bottom:14px;color:#58616f}
.ld-source-form label {display:grid;gap:6px;font-size:12px;color:#646d79}
.ld-source-form input,.ld-source-form select,.ld-source-form textarea {font:inherit;padding:8px;border:1px solid #dfe3e9;border-radius:6px;width:100%;min-width:0;color:#303946;background:#fff}
.ld-source-form .ld-grid {margin:15px 0}
.ld-source-form details {padding:10px 0;border-bottom:1px solid #edf0f4}
.ld-source-form summary {font-size:12px;cursor:pointer;font-weight:600}
.ld-note-timeline article {display:grid;grid-template-columns:105px minmax(0,1fr);gap:18px;padding:15px 0;border-bottom:1px solid #edf0f4}
.ld-note-timeline time {font-size:12px;color:#8a919b}
.ld-shell .ld-note-timeline p {margin:6px 0;color:#434c59;white-space:pre-wrap}
.ld-note-timeline small {color:#8a919b;font-size:12px}
@media(max-width:800px){.ld-business-facts,.ld-capability-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.ld-source-layout{grid-template-columns:1fr}.ld-source-list{border-right:0;border-bottom:1px solid #e5e7eb;display:flex;overflow:auto}.ld-source-list button{min-width:160px}.ld-edit-surface{padding:12px}.ld-note-timeline article{grid-template-columns:75px minmax(0,1fr)}}
