.lh-command-center { margin: 0 0 26px; padding: 24px; border: 1px solid #cfdcc9; border-radius: 18px; background: linear-gradient(135deg,#eef6ed 0%,#fffefa 58%,#f4f8f0 100%); }
.lh-command-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.lh-command-head h2 { max-width:28ch; margin:6px 0 0; font-size:clamp(22px,2.5vw,32px); line-height:1.15; letter-spacing:-.8px; }
.lh-command-mode { display:inline-flex; align-items:center; gap:8px; flex-shrink:0; padding:8px 11px; border:1px solid #b8d5bd; border-radius:999px; background:#f8fff8; color:#17633f; font:700 10px ui-monospace,monospace; letter-spacing:.07em; }
.lh-command-mode i { width:7px; height:7px; border-radius:50%; background:#28a363; box-shadow:0 0 0 4px #ccefd8; }
.lh-command-mode.is-local { color:#795c12; border-color:#e2cc8c; background:#fffaf0; }
.lh-command-mode.is-local i { background:#d79a17; box-shadow:0 0 0 4px #f6e6b7; }
.lh-command-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.lh-command-card { display:flex; flex-direction:column; align-items:flex-start; min-height:154px; padding:17px; border:1px solid #cad7c7; border-radius:12px; background:#fffefa; color:var(--ek-ink,#13231e); text-align:left; cursor:pointer; font:inherit; transition:transform .2s,border-color .2s,box-shadow .2s; }
.lh-command-card:hover { transform:translateY(-3px); border-color:#2c7750; box-shadow:0 10px 22px #315e3214; }
.lh-command-card.is-active { border:2px solid #17623f; padding:16px; }
.lh-command-card.is-active .lh-command-index { color:#17623f; }
.lh-command-index { color:#83907e; font:700 11px ui-monospace,monospace; letter-spacing:.08em; }
.lh-command-card strong { margin-top:12px; font-size:17px; }
.lh-command-card>span:not(.lh-command-index) { margin-top:7px; color:#5c6c5c; font-size:12px; line-height:1.5; }
.lh-command-card b { margin-top:auto; padding-top:13px; color:#17623f; font-size:12px; }
.lh-command-flow { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:20px; padding-top:18px; border-top:1px solid #d5e0d0; color:#526554; font-size:11px; }
.lh-command-flow span { display:inline-flex; align-items:center; gap:7px; }
.lh-command-flow i { display:grid; place-items:center; width:21px; height:21px; border:1px solid #82a48a; border-radius:50%; color:#17623f; font:700 9px ui-monospace,monospace; font-style:normal; }
.lh-command-flow em { color:#7b9a7f; font-style:normal; }
.lh-advanced-filters { margin-top:14px; padding:0 14px; border:1px solid #dce9e6; border-radius:10px; background:#fbfdfd; }
.lh-advanced-filters summary { cursor:pointer; padding:11px 0; color:#526675; font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.lh-advanced-filters summary span { margin-left:7px; font-weight:500; letter-spacing:0; text-transform:none; opacity:.72; }
.lh-advanced-filters-body { padding:0 0 11px; }
.lh-advanced-filters-body .lh-chipbar { margin-top:8px; }
/* ---------------------------------------------------------------------------
   The record panel.

   It reads top to bottom as an answer: the question somebody asked, the record
   that answers it, the answer, then what the answer does not cover, then the
   facts, then where it sits. The limit comes before the facts on purpose -- a
   reader who stops halfway should have read the caveat, not missed it.

   The lineage used to be a horizontal flex strip with overflow-x:auto inside a
   352px column, so it always had a scrollbar and the reader saw two and a half
   boxes. It runs downward now and cannot overflow.
   --------------------------------------------------------------------------- */
.lh-detail-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:13px; }
.lh-library-detail .lh-detail-kicker { margin:0; }
.lh-library-detail h3 { margin:0; color:#12304a; font:700 1.32rem/1.16 'Space Grotesk',Inter,sans-serif; letter-spacing:-.024em; text-wrap:balance; }
.lh-detail-name { margin:9px 0 0!important; color:#5d7a72!important; font-size:.76rem!important; font-weight:650; line-height:1.35; }
.lh-detail-answer { margin:14px 0 0!important; color:#3f5a63!important; font-size:.9rem!important; line-height:1.62!important; }

/* A limit is not a fact among facts, so it does not look like one. */
.lh-library-detail .lh-detail-boundary { margin-top:16px; padding:13px 15px; border:0; border-left:3px solid #d9a441; border-radius:0 9px 9px 0; background:#fdf7ea; }
.lh-library-detail .lh-detail-boundary strong { display:block; margin-bottom:5px; color:#7a5410; font:700 .62rem ui-monospace,monospace; letter-spacing:.09em; text-transform:uppercase; }
.lh-library-detail .lh-detail-boundary p { margin:0; color:#6b5a3c; font-size:.8rem; line-height:1.55; }

.lh-library-detail .lh-detail-facts { margin-top:20px; border-top:1px solid #cfe4dd; }
.lh-library-detail .lh-detail-facts div { display:grid; grid-template-columns:minmax(0,96px) minmax(0,1fr); gap:12px; align-items:baseline; padding:10px 0; border-bottom:1px solid #dfece7; }
.lh-library-detail .lh-detail-facts dt { color:#77908b; font:700 .6rem ui-monospace,monospace; letter-spacing:.07em; text-transform:uppercase; }
.lh-library-detail .lh-detail-facts dd { margin:0; color:#2c4650; font-size:.79rem; line-height:1.45; overflow-wrap:anywhere; }

/* Where it sits: parent, this record, then what it connects to, read downward.
   The rail and dots carry the sequence, so no arrow glyphs are needed. */
.lh-detail-lineage { margin-top:18px; padding:15px 16px; border:1px solid #d5e0d1; border-radius:11px; background:#f6faf3; }
.lh-detail-lineage>strong { display:block; margin-bottom:12px; color:#4c6550; font:700 .62rem ui-monospace,monospace; letter-spacing:.08em; text-transform:uppercase; }
.lh-lineage-map { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.lh-lineage-step { position:relative; padding:0 0 14px 21px; }
.lh-lineage-step:last-child { padding-bottom:0; }
.lh-lineage-step::before { content:''; position:absolute; left:4px; top:5px; width:9px; height:9px; border:2px solid #9dc0a4; border-radius:50%; background:#f6faf3; }
.lh-lineage-step::after { content:''; position:absolute; left:8px; top:14px; bottom:0; width:1px; background:#c6d9c4; }
.lh-lineage-step:last-child::after { display:none; }
.lh-lineage-step.is-current::before { border-color:#17623f; background:#17623f; box-shadow:0 0 0 3px #17623f22; }
.lh-lineage-step small { display:block; color:#70816e; font:700 .58rem ui-monospace,monospace; letter-spacing:.07em; text-transform:uppercase; }
.lh-lineage-step b { display:block; margin-top:2px; color:#1b3024; font-size:.8rem; font-weight:600; line-height:1.3; }
.lh-lineage-step.is-current b { color:#0e4f33; font-weight:700; }

.lh-library-detail .lh-detail-relations { margin-top:16px; padding:14px 15px; border:1px solid #cfe4dd; border-radius:11px; background:rgba(255,255,255,.6); }
.lh-library-detail .lh-detail-relations>strong { display:block; margin-bottom:9px; color:#4c6550; font:700 .62rem ui-monospace,monospace; letter-spacing:.08em; text-transform:uppercase; }
.lh-detail-relations li { display:flex; justify-content:space-between; gap:12px; }
@media(max-width:700px) { .lh-command-center{padding:16px;border-radius:14px}.lh-command-head{flex-direction:column}.lh-command-mode{align-self:flex-start}.lh-command-grid{grid-template-columns:1fr}.lh-command-card{min-height:0}.lh-command-flow{align-items:flex-start;flex-direction:column;gap:7px}.lh-command-flow em{display:none}.lh-detail-lineage{overflow:hidden}.lh-library-results{min-width:0}.lh-library-results>.lh-library-detail{grid-column:1;min-width:0;margin-top:2px}.lh-library-workspace>.lh-library-detail.is-placeholder{display:none} }
@media(prefers-reduced-motion:reduce) { .lh-command-card{transition:none}.lh-command-card:hover{transform:none} }
