/* Changes layer. Token fallbacks live in comments.css (:where(:root)), which is
   always injected alongside; kind colours are local since the kit has no tokens
   for "new / changed / logic". */
:where(:root) {
  --lpch-new: #31ca88; --lpch-changed: #fe5000; --lpch-logic: #457ce7; --lpch-old: #72747a;
}
:where(.lpch-toggle, .lpch-panel, .lpch-badge) { font-family: 'Montserrat', Arial, sans-serif; color: var(--lp-text); }

.lpch-toggle { position: fixed; right: 20px; bottom: 74px; z-index: 150; background: #2c2929; color: #fff;
  border: none; border-radius: 24px; padding: 12px 18px; font-family: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; box-shadow: var(--lp-shadow-float); display: flex; align-items: center; gap: 8px; }
.lpch-toggle .lpch-ico { width: 15px; height: 15px; fill: #fff; }

/* hidden = "not in the selected task set", kept in the DOM so switching is reversible */
.lpch-hidden { display: none !important; }

body.lpch-on .lpch-mark { outline: 2px dashed var(--lpch-changed); outline-offset: 2px; }
body.lpch-on .lpch-mark[data-lp-kind="new"] { outline-color: var(--lpch-new); }
body.lpch-on .lpch-mark[data-lp-kind="logic"] { outline-color: var(--lpch-logic); outline-style: dotted; }
body.lpch-on .lpch-mark[data-lp-kind="old"] { outline-color: var(--lpch-old); }

.lpch-flash { animation: lpch-flash 1.4s ease-out; }
@keyframes lpch-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(69,124,231,0); }
  20% { box-shadow: 0 0 0 6px rgba(69,124,231,.45); }
}

/* numbered marker on the element's top-left corner; text lives in the checklist */
.lpch-badge { position: absolute; z-index: 145; transform: translate(-50%,-50%);
  width: 18px; height: 18px; border-radius: 50%; background: var(--lpch-changed); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.lpch-badge--new { background: var(--lpch-new); }
.lpch-badge--logic { background: var(--lpch-logic); }
.lpch-badge--old { background: var(--lpch-old); }

.lpch-panel { position: fixed; top: 0; right: -340px; width: 340px; height: 100vh; background: #fff;
  border-left: 1px solid var(--lp-gray-light); box-shadow: var(--lp-shadow-float); z-index: 160;
  transition: right .2s; display: flex; flex-direction: column; }
.lpch-panel.is-open { right: 0; }
.lpch-panel__head { padding: 16px 20px; border-bottom: 1px solid var(--lp-gray-light); font-weight: 700;
  display: flex; align-items: center; }
.lpch-panel__head .x { margin-left: auto; cursor: pointer; color: var(--lp-gray-medium); background: none;
  border: none; font-size: 18px; }
.lpch-body { flex: 1; overflow-y: auto; padding: 8px 0 24px; }

.lpch-row { display: flex; align-items: center; gap: 8px; padding: 10px 20px; font-size: 13px; cursor: pointer; }
.lpch-row:hover { background: var(--lp-gray-lightest); }
.lpch-row--hl { border-bottom: 1px solid var(--lp-gray-light); font-weight: 600; }
.lpch-row .task { font-weight: 700; }
.lpch-row .n { margin-left: auto; color: var(--lp-gray-medium); font-size: 11px; }

.lpch-links { display: flex; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--lp-gray-light); }
.lpch-link { color: var(--lp-link); font-weight: 600; font-size: 12px; cursor: pointer; text-decoration: none; }

.lpch-items { padding: 0 20px 8px 44px; }
.lpch-item { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 12px; cursor: pointer; }
.lpch-item .num { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--lpch-changed);
  color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; }
.lpch-item .num--new { background: var(--lpch-new); }
.lpch-item .num--logic { background: var(--lpch-logic); }
.lpch-item .num--old { background: var(--lpch-old); }
.lpch-item:hover .note { color: var(--lp-primary); }
.lpch-item.is-off { opacity: .4; cursor: default; }
.lpch-item .k { flex: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--lpch-changed); }
.lpch-item .k--new { color: var(--lpch-new); }
.lpch-item .k--logic { color: var(--lpch-logic); }
.lpch-item .k--old { color: var(--lpch-old); }
.lpch-item .note { color: var(--lp-text); }
.lpch-empty { padding: 20px; color: var(--lp-gray-medium); font-size: 13px; }
