/* ==========================================================================
   Linked Housing Portal - components for the working build.
   Loads after portal.css, which holds the tokens and the base design system.
   Principles: one clear action per area, plain labels, big targets,
   nothing that needs explaining. AI surfaces share one look (mint to
   periwinkle, a sparkle) so people learn to recognise them.
   ========================================================================== */

/* -------------------------------------------------------- utilities --- */

.lh-muted { color: var(--lh-ink-3); }
.lh-red   { color: var(--lh-red); }
.lh-amber { color: var(--lh-amber); display: inline-flex; align-items: center; gap: 4px; }
.lh-ok    { color: var(--lh-ok); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.lh-link  { color: var(--lh-primary-600); font-weight: 620; }
.lh-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.lh-break { word-break: break-all; }
.lh-clip  { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-done  { text-decoration: line-through; color: var(--lh-ink-3); }
.lh-dot   { display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--lh-primary); vertical-align: middle; }
.lh-quote { font-weight: 500; font-style: italic; }
.lh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lh-spacer { flex: 1; }
.lh-amount { font-variant-numeric: tabular-nums; min-width: 96px; text-align: right; }

.lh-hint {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--lh-ink-3); margin: 0 0 12px;
}

.lh-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 620; color: var(--lh-primary-600);
  margin-bottom: 14px; padding: 6px 10px 6px 6px; border-radius: var(--r-sm);
  transition: background var(--fast) var(--ease);
}
.lh-back:hover { background: var(--lh-primary-100); }

/* ---------------------------------------------------------- text size -- */
/* "Large" in Settings. Zoom on the reading area only, so the shell and
   popovers keep their geometry. */
body.lh-text-large .lh-view { zoom: 1.14; }
body.lh-text-large .lh-nav__item { font-size: 15px; }

/* ================================================================ nav === */

.lh-nav__group {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700;
  color: #7FA4BE; padding: 18px 10px 7px; border-radius: var(--r-sm);
}
.lh-nav__group:hover { color: #BFD6E6; }
.lh-nav__group svg { transition: transform var(--fast) var(--ease); opacity: .7; }
.lh-nav__group.is-closed svg { transform: rotate(-90deg); }
.lh-nav__groupbody[hidden] { display: none; }

.lh-nav__item--ai svg { color: var(--lh-mint); opacity: 1; }
.lh-nav__ai {
  font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 99px;
  background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52;
}

.lh-brand a { display: block; }
.lh-brand img { outline: none; }

/* ============================================================= topbar === */

.lh-ask { position: relative; flex: 1; max-width: 460px; }
.lh-ask__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--lh-peri-600); pointer-events: none; }
.lh-ask input {
  width: 100%; height: 40px; padding: 0 64px 0 40px;
  border: 1px solid var(--lh-line); border-radius: 99px; background: var(--lh-card);
  font: inherit; font-size: 13.5px; color: var(--lh-ink);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.lh-ask input::placeholder { color: var(--lh-ink-3); }
.lh-ask input:focus { outline: none; border-color: var(--lh-peri); box-shadow: 0 0 0 3px rgba(146, 157, 198, .22); }
.lh-ask__kbd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font: 600 10.5px/1 inherit; color: var(--lh-ink-3);
  border: 1px solid var(--lh-line); border-radius: 6px; padding: 4px 6px; background: var(--lh-sand);
  pointer-events: none;
}

.lh-askpop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70;
  background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: var(--r-lg);
  box-shadow: var(--sh-3); padding: 6px; max-height: 70vh; overflow-y: auto;
}
.lh-askpop[hidden] { display: none; }
.lh-askpop__ai {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; cursor: pointer; text-align: left;
  padding: 10px 12px; border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(169, 217, 217, .28), rgba(146, 157, 198, .22));
  font-size: 13.5px; color: var(--lh-ink);
}
.lh-askpop__ai:hover { background: linear-gradient(135deg, rgba(169, 217, 217, .42), rgba(146, 157, 198, .34)); }
.lh-askpop__aiicon {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52;
}
.lh-askpop__aitext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-askpop kbd { font: 600 10.5px/1 inherit; color: var(--lh-ink-3); border: 1px solid var(--lh-line); border-radius: 6px; padding: 4px 6px; background: var(--lh-card); }
.lh-askpop__label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--lh-ink-3); padding: 12px 12px 6px; }
.lh-askpop__hit {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-md);
  color: var(--lh-ink-2);
}
.lh-askpop__hit:hover, .lh-askpop__hit.is-sel { background: var(--lh-primary-050); color: var(--lh-ink); }
.lh-askpop__hit > span { display: flex; flex-direction: column; min-width: 0; }
.lh-askpop__t { font-size: 13.5px; font-weight: 600; color: var(--lh-ink); }
.lh-askpop__s { font-size: 12px; color: var(--lh-ink-3); }

.lh-viewas { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--lh-ink-3); font-weight: 600; white-space: nowrap; }
.lh-viewas select { min-width: 170px; }

.lh-aibtn {
  position: fixed; right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom)); z-index: 80;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 52px; padding: 0 20px; border-radius: 99px; border: 0; cursor: pointer;
  font-size: 13.5px; font-weight: 680; color: #1F3B52;
  background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri));
  box-shadow: 0 1px 2px rgba(23, 36, 46, .10), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: filter var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.lh-aibtn:hover { filter: brightness(1.04) saturate(1.1); }
.lh-aibtn:active { transform: scale(.96); }
body.lh-ai-open .lh-aibtn { visibility: hidden; }
.lh-view { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.lh-toast { bottom: calc(88px + env(safe-area-inset-bottom)); }

.lh-iconbtn--sm { width: 32px; height: 32px; }

a.lh-user { color: inherit; }

.lh-field--sm { min-height: 36px; font-size: 13px; }

/* ============================================================ buttons === */

.lh-btn--ai {
  color: #2E3F6B; font-weight: 660;
  background: linear-gradient(135deg, rgba(169, 217, 217, .55), rgba(146, 157, 198, .45));
  border-color: rgba(98, 112, 165, .25);
}
.lh-btn--ai:hover { background: linear-gradient(135deg, rgba(169, 217, 217, .75), rgba(146, 157, 198, .62)); }
.lh-btn--ai svg { color: #4E5A93; }
.lh-btn[disabled], .lh-btn.is-busy { opacity: .55; cursor: not-allowed; transform: none; }
.lh-btn.is-busy svg { animation: lh-spin .9s linear infinite; }
@keyframes lh-spin { to { transform: rotate(360deg); } }

/* ============================================================== stats === */

.lh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 14px; margin-bottom: 18px; }
.lh-widget .lh-stats, .lh-drawer .lh-stats { margin-bottom: 0; }
.lh-drawer .lh-stats { margin-bottom: 18px; }
.lh-stat {
  display: flex; align-items: center; gap: 14px;
  background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: var(--r-xl);
  padding: 16px 18px; box-shadow: var(--sh-1); color: inherit;
  transition: box-shadow var(--med) var(--ease), transform var(--med) var(--ease), border-color var(--med) var(--ease);
}
.lh-widget .lh-stat { box-shadow: none; background: var(--lh-primary-050); border-color: var(--lh-line-2); }
.lh-stat--link:hover { box-shadow: var(--sh-2); transform: translateY(-1px); border-color: #CBD9E3; }
.lh-stat__icon {
  width: 42px; height: 42px; border-radius: var(--r-md); flex: 0 0 auto;
  display: grid; place-items: center; background: var(--lh-primary-100); color: var(--lh-primary-700);
}
.lh-stat__icon--blue  { background: var(--lh-peri-100); color: var(--lh-peri-600); }
.lh-stat__icon--teal  { background: var(--lh-mint-100); color: var(--lh-mint-600); }
.lh-stat__icon--amber { background: var(--lh-amber-100); color: var(--lh-amber); }
.lh-stat__icon--red   { background: var(--lh-red-100); color: var(--lh-red); }
.lh-stat__text { display: flex; flex-direction: column; min-width: 0; }
.lh-stat__value { font-size: 25px; font-weight: 740; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lh-stat__label { font-size: 13px; font-weight: 600; color: var(--lh-ink-2); margin-top: 2px; }
.lh-stat__sub { font-size: 12px; color: var(--lh-ink-3); }

/* ============================================================= AI bar === */

.lh-aibar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 18px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(169, 217, 217, .22), rgba(146, 157, 198, .16));
  box-shadow: inset 0 0 0 1px rgba(98, 112, 165, .14);
}
.lh-aibar__icon {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52;
}
.lh-aibar__label { font-size: 13px; font-weight: 700; color: #3A4675; }
.lh-aibar__chips { display: flex; flex-wrap: wrap; gap: 7px; }

.lh-followup {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(98, 112, 165, .25); background: rgba(255, 255, 255, .8); color: #3A4675;
  border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  text-align: left;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.lh-followup:hover { background: #fff; border-color: var(--lh-peri-600); }
.lh-followup:active { transform: scale(.97); }
.lh-followup svg { color: var(--lh-peri-600); }

/* ======================================================= pills / coll === */

.lh-pills { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.lh-coll .lh-pills { margin-bottom: 0; }
.lh-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  padding: 7px 13px; border-radius: 99px;
  font-size: 13px; font-weight: 620; color: var(--lh-ink-2);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.lh-pill:hover { background: var(--lh-sand-2); color: var(--lh-ink); }
.lh-pill.is-on { background: var(--lh-card); color: var(--lh-primary-700); border-color: var(--lh-line); box-shadow: var(--sh-1); }
.lh-pill__n {
  font-size: 11px; font-weight: 700; min-width: 20px; text-align: center;
  padding: 1px 6px; border-radius: 99px; background: var(--lh-sand-2); color: var(--lh-ink-3);
}
.lh-pill.is-on .lh-pill__n { background: var(--lh-primary-100); color: var(--lh-primary-700); }

.lh-coll__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lh-coll__tabs { flex: 1 1 auto; min-width: 0; }
.lh-coll__tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lh-coll__body:not(.lh-coll__body--cards) > .lh-tablewrap,
.lh-coll__body > .lh-list,
.lh-coll__body > .lh-empty {
  background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: var(--r-xl); box-shadow: var(--sh-1);
}
.lh-coll__body > .lh-empty + .lh-empty__act { margin-top: -8px; }
.lh-empty__act { text-align: center; margin: -26px 0 0; padding-bottom: 28px; }

.lh-searchbox { position: relative; }
.lh-searchbox svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--lh-ink-3); pointer-events: none; }
.lh-searchbox input {
  height: 36px; width: 240px; padding: 0 12px 0 34px;
  border: 1px solid var(--lh-line); border-radius: var(--r-md); background: var(--lh-card);
  font: inherit; font-size: 13px; color: var(--lh-ink); box-shadow: var(--sh-1);
}
.lh-searchbox input:focus { outline: none; border-color: var(--lh-primary); box-shadow: 0 0 0 3px rgba(87, 140, 176, .16); }

.lh-t-go { width: 36px; color: var(--lh-ink-3); text-align: right; }
tr[data-click]:hover .lh-t-go, tr[data-open]:hover .lh-t-go { color: var(--lh-primary); }

/* ============================================================== tiles === */

.lh-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 16px; }
.lh-tile {
  background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: var(--r-xl);
  box-shadow: var(--sh-1); overflow: hidden; cursor: pointer; padding: 18px;
  transition: box-shadow var(--med) var(--ease), transform var(--med) var(--ease), border-color var(--med) var(--ease);
}
.lh-tile:has(.lh-tile__media) { padding: 0; }
.lh-tile:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: #CBD9E3; }
.lh-tile__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.lh-tile__head h3 { font-size: 15px; line-height: 1.3; }
.lh-tile__head p { font-size: 12.5px; color: var(--lh-ink-3); margin-top: 2px; }
.lh-tile__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--lh-line-2); border-bottom: 1px solid var(--lh-line-2); }
.lh-tile__nums--2 { grid-template-columns: repeat(2, 1fr); margin-top: 14px; border-bottom: 0; padding-bottom: 0; }
.lh-tile__nums div { display: flex; flex-direction: column; }
.lh-tile__nums strong { font-size: 18px; font-weight: 720; letter-spacing: -0.02em; }
.lh-tile__nums span { font-size: 11.5px; color: var(--lh-ink-3); font-weight: 600; }
.lh-tile__foot { display: flex; align-items: center; gap: 7px; padding-top: 12px; font-size: 12.5px; color: var(--lh-ink-2); }
.lh-tile__media { position: relative; }
.lh-tile__tag { position: absolute; top: 12px; left: 12px; }
.lh-tile__tag--r { left: auto; right: 12px; }
.lh-tile__body { padding: 16px 18px 18px; }
.lh-tile__body h3 { font-size: 15.5px; line-height: 1.3; }
.lh-tile__body p { font-size: 13px; color: var(--lh-ink-3); margin-top: 3px; }
.lh-tile__meter { margin-top: 14px; display: grid; gap: 6px; font-size: 12.5px; color: var(--lh-ink-3); }

.lh-photoph {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: #5A7F93; font-size: 12px; font-weight: 600;
  background:
    radial-gradient(110% 90% at 15% 0%, #EDF6F7 0%, transparent 60%),
    linear-gradient(140deg, #DCEAF0, #C9DEE7 55%, #BBD3DF);
}
.lh-photoph > svg, .lh-web__photo-note > svg {
  width: 96px; height: 96px; padding: 22px; border-radius: 24px;
  color: var(--lh-primary-700); background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .7); stroke-width: 1.25;
}
.lh-web__photo-note { padding: 0; background: none; backdrop-filter: none; }

/* ============================================================== board === */

.lh-col.is-droptarget { background: var(--lh-mint-100); border-color: var(--lh-mint-600); border-style: dashed; }
.lh-col__empty {
  border: 1.5px dashed #C9D7DF; border-radius: var(--r-sm); padding: 18px 10px;
  text-align: center; font-size: 12px; color: var(--lh-ink-3);
}
.lh-ticket.is-dragging { opacity: .45; transform: rotate(-1.5deg); }
.lh-ticket[draggable="true"] { cursor: grab; }
.lh-ticket__due { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--lh-amber); margin-left: auto; }
.lh-ticket__due.is-late { color: var(--lh-red); }
.lh-ticket__foot { font-size: 12px; color: var(--lh-ink-3); }
.lh-ticket__progress { display: grid; gap: 5px; margin-top: 10px; font-size: 11.5px; color: var(--lh-ink-3); }
.lh-avatar--sm { width: 22px; height: 22px; font-size: 9.5px; }

/* ============================================================== steps === */

.lh-steps { list-style: none; margin: 4px 0 18px; padding: 0; display: flex; gap: 0; }
.lh-steps__item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; text-align: center; }
.lh-steps__item::before {
  content: ''; position: absolute; top: 12px; right: 50%; left: -50%; height: 2px; background: var(--lh-line);
}
.lh-steps__item:first-child::before { display: none; }
.lh-steps__item--done::before, .lh-steps__item--now::before { background: var(--lh-primary); }
.lh-steps__dot {
  width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; position: relative; z-index: 1;
  font-size: 11px; font-weight: 800; background: var(--lh-card); color: var(--lh-ink-3);
  box-shadow: inset 0 0 0 2px var(--lh-line);
}
.lh-steps__item--done .lh-steps__dot { background: var(--lh-primary); color: #fff; box-shadow: none; }
.lh-steps__item--now .lh-steps__dot { background: var(--lh-primary-100); color: var(--lh-primary-700); box-shadow: inset 0 0 0 2px var(--lh-primary); }
.lh-steps__label { font-size: 11.5px; font-weight: 620; color: var(--lh-ink-3); line-height: 1.3; padding: 0 2px; }
.lh-steps__item--done .lh-steps__label, .lh-steps__item--now .lh-steps__label { color: var(--lh-ink); }

/* ============================================================= modals === */

.lh-modal {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: flex-start; justify-content: center; padding: 8vh 20px 20px;
  overflow-y: auto; pointer-events: none;
}
.lh-modal.is-open { display: flex; }
.lh-modal__box {
  pointer-events: auto; width: 100%; max-width: 560px;
  background: var(--lh-card); border-radius: 20px; box-shadow: var(--sh-3);
  display: flex; flex-direction: column; max-height: 84vh;
  animation: lh-pop var(--med) var(--ease) both;
}
.lh-modal--sm .lh-modal__box { max-width: 440px; }
.lh-modal--lg .lh-modal__box { max-width: 760px; }
@keyframes lh-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.lh-modal__head {
  display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px;
  border-bottom: 1px solid var(--lh-line-2);
}
.lh-modal__icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--lh-primary-100); color: var(--lh-primary-700);
}
.lh-modal__icon--ai { background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52; }
.lh-modal__titles { flex: 1; min-width: 0; padding-top: 2px; }
.lh-modal__titles h2 { font-size: 18px; letter-spacing: -0.02em; }
.lh-modal__titles p { font-size: 13px; color: var(--lh-ink-3); margin-top: 3px; }
.lh-modal__body { padding: 18px 22px; overflow-y: auto; }
.lh-modal__foot {
  display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px;
  border-top: 1px solid var(--lh-line-2); background: var(--lh-sand); border-radius: 0 0 20px 20px;
}

.lh-drawer--wide { width: min(720px, 100%); }
.lh-drawer__titles { flex: 1; min-width: 0; }
.lh-drawer__foot { align-items: center; }
.lh-drawer__body .lh-note { margin-bottom: 14px; }
.lh-drawer__body > .lh-steps { margin-top: 2px; }

/* =============================================================== forms === */

.lh-form { display: grid; gap: 16px; }
.lh-fld { display: flex; flex-direction: column; }
.lh-fld--full { grid-column: 1 / -1; }
.lh-req { color: var(--lh-red); }
.lh-form__actions { margin-top: 4px; }
.lh-form--big .lh-field { min-height: 48px; font-size: 15px; }
.lh-form--big textarea.lh-field { font-size: 15px; }
.lh-form--big .lh-label { font-size: 14px; }
.lh-card--flat { box-shadow: none; background: var(--lh-sand); border-color: var(--lh-line-2); margin-top: 14px; }
.lh-consent { display: grid; gap: 4px; }

/* AI boxes inside forms */
.lh-aibox {
  border-radius: var(--r-lg); padding: 14px 16px;
  background: linear-gradient(135deg, rgba(169, 217, 217, .20), rgba(146, 157, 198, .15));
  box-shadow: inset 0 0 0 1px rgba(98, 112, 165, .16);
  display: grid; gap: 10px;
}
.lh-aibox--row { grid-template-columns: 1fr auto; align-items: center; margin-bottom: 16px; }
.lh-aibox--row > .lh-field { grid-column: 1 / 2; }
.lh-aibox--row .lh-aibox__work { grid-column: 1 / -1; }
.lh-aibox--soft { grid-template-columns: auto 1fr; align-items: center; }
.lh-aibox--soft .lh-aibox__work { grid-column: 1 / -1; }
.lh-aibox__head { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: #3A4675; line-height: 1.5; }
.lh-aibox__head svg { color: var(--lh-peri-600); margin-top: 2px; }
.lh-aibox__btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lh-aibox__work[hidden] { display: none; }
.lh-aibox__work--page { margin-bottom: 16px; }

.lh-aiwork { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .75); }
.lh-aiwork > svg { color: var(--lh-peri-600); margin-top: 2px; }

.lh-aifilled { background: linear-gradient(135deg, rgba(169, 217, 217, .16), rgba(146, 157, 198, .12)) !important; border-color: var(--lh-peri) !important; }

/* ============================================================ thinking === */

.lh-think { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.lh-think__step {
  display: none; align-items: center; gap: 8px; font-size: 12.5px; color: var(--lh-ink-3);
}
.lh-think__step.is-on, .lh-think.is-done .lh-think__step, .lh-think__step.is-done { display: flex; }
.lh-think__mark {
  width: 16px; height: 16px; border-radius: 99px; display: grid; place-items: center; flex: 0 0 auto;
  border: 2px solid var(--lh-peri); border-top-color: transparent; color: transparent;
  animation: lh-spin .8s linear infinite;
}
.lh-think__step.is-done .lh-think__mark {
  animation: none; border: 0; background: var(--lh-mint-100); color: var(--lh-mint-600);
}
.lh-think.is-done { opacity: .75; }

.is-streaming::after {
  content: ''; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px;
  background: var(--lh-peri); border-radius: 2px; animation: lh-caret .9s steps(2) infinite;
}
@keyframes lh-caret { 50% { opacity: 0; } }
textarea.is-streaming::after { display: none; }

.lh-reveal { animation: lh-rise var(--slow) var(--ease) both; }

/* ============================================================ AI panel === */

.lh-aipanel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(430px, 100%);
  background: var(--lh-card); box-shadow: var(--sh-3);
  border-left: 1px solid var(--lh-line);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--med) var(--ease);
  will-change: transform;
}
.lh-aipanel.is-open { transform: none; }
.lh-aipanel__head {
  display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 18px;
  border-bottom: 1px solid var(--lh-line-2);
  background: linear-gradient(135deg, rgba(169, 217, 217, .28), rgba(146, 157, 198, .20));
}
.lh-aipanel__mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52;
}
.lh-aipanel__titles { flex: 1; display: flex; flex-direction: column; }
.lh-aipanel__titles strong { font-size: 15px; }
.lh-aipanel__titles span { font-size: 12px; color: var(--lh-ink-2); }
.lh-aipanel .lh-chat__log { flex: 1; overflow-y: auto; padding: 18px; overscroll-behavior: contain; }
.lh-aipanel__form { display: flex; gap: 8px; padding: 12px 14px 6px; border-top: 1px solid var(--lh-line-2); }
.lh-aipanel__form input {
  flex: 1; height: 42px; padding: 0 14px; border: 1px solid var(--lh-line); border-radius: 12px;
  font: inherit; font-size: 14px; color: var(--lh-ink);
}
.lh-aipanel__form input:focus { outline: none; border-color: var(--lh-peri); box-shadow: 0 0 0 3px rgba(146, 157, 198, .22); }
.lh-aipanel__form .lh-btn { min-height: 42px; padding: 0 14px; }
.lh-aipanel__foot { font-size: 11.5px; color: var(--lh-ink-3); text-align: center; padding: 4px 14px 12px; }

@media (min-width: 1400px) {
  body.lh-ai-open .lh-main { margin-right: 430px; transition: margin-right var(--med) var(--ease); }
}

/* ================================================================ chat === */

.lh-chat__log { display: flex; flex-direction: column; gap: 16px; }
.lh-chat__log--page { padding: 20px; min-height: 360px; max-height: 70vh; overflow-y: auto; }

.lh-msg { display: flex; gap: 10px; }
.lh-msg--me { justify-content: flex-end; }
.lh-msg__bubble {
  max-width: 82%; padding: 10px 14px; border-radius: 16px 16px 4px 16px;
  background: var(--lh-primary); color: #fff; font-size: 13.5px; line-height: 1.5;
}
.lh-msg__avatar {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52;
}
.lh-msg__col { flex: 1; min-width: 0; display: grid; gap: 10px; }
.lh-msg__text { font-size: 14px; line-height: 1.65; color: var(--lh-ink); }
.lh-msg__text[hidden], .lh-msg__cards[hidden], .lh-msg__more[hidden], .lh-msg__note[hidden] { display: none; }
.lh-msg__note {
  display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--lh-amber);
  background: var(--lh-amber-100); padding: 8px 10px; border-radius: var(--r-md);
}
.lh-msg__cards { display: grid; gap: 10px; }
.lh-msg__actions { display: flex; gap: 7px; flex-wrap: wrap; }
.lh-msg__follow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lh-msg__sources { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--lh-ink-3); margin-top: 8px; }

.lh-aicard {
  border: 1px solid var(--lh-line); border-radius: var(--r-lg); background: var(--lh-card); overflow: hidden;
}
.lh-aicard__title {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 720; text-transform: uppercase; letter-spacing: .06em; color: var(--lh-ink-3);
  padding: 10px 12px 6px;
}
.lh-aicard__row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--lh-line-2); color: inherit;
}
a.lh-aicard__row:hover { background: var(--lh-primary-050); }
.lh-aicard__ic { color: var(--lh-ink-3); }
.lh-aicard__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lh-aicard__t { font-size: 13px; font-weight: 620; }
.lh-aicard__s { font-size: 12px; color: var(--lh-ink-3); }
.lh-aicard__foot { display: flex; gap: 7px; padding: 10px 12px; border-top: 1px solid var(--lh-line-2); background: var(--lh-sand); flex-wrap: wrap; }
.lh-aicard--draft { border-color: rgba(98, 112, 165, .28); }
.lh-aidraft { padding: 4px 14px 12px; font-size: 13.5px; line-height: 1.6; color: var(--lh-ink); }

.lh-aimatch { border: 1px solid var(--lh-line); border-radius: var(--r-lg); padding: 12px; background: var(--lh-card); }
.lh-aimatch__top { display: flex; align-items: center; gap: 10px; }
.lh-aimatch__rank {
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto;
  font-size: 12px; font-weight: 800; background: var(--lh-sand-2); color: var(--lh-ink-2);
}
.lh-aimatch__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lh-aimatch__why { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.lh-aimatch__why li, .lh-why li { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: var(--lh-ink-2); }
.lh-aimatch__why li svg, .lh-why li svg { margin-top: 2px; flex: 0 0 auto; }
.is-ok svg { color: var(--lh-ok); }
.is-warn svg { color: var(--lh-amber); }
.is-no svg { color: var(--lh-red); }

.lh-score {
  font-size: 13px; font-weight: 800; padding: 4px 9px; border-radius: 99px; font-variant-numeric: tabular-nums;
}
.lh-score--good { background: var(--lh-ok-100); color: var(--lh-ok); }
.lh-score--ok   { background: var(--lh-amber-100); color: var(--lh-amber); }
.lh-score--weak { background: var(--lh-red-100); color: var(--lh-red); }
.lh-score--lg { font-size: 17px; padding: 8px 12px; border-radius: 12px; }

.lh-aiwelcome { text-align: center; padding: 26px 10px; }
.lh-aiwelcome__icon {
  width: 52px; height: 52px; border-radius: 16px; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52; margin-bottom: 12px;
}
.lh-aiwelcome h3 { font-size: 16px; }
.lh-aiwelcome p { font-size: 13px; color: var(--lh-ink-2); margin: 6px auto 16px; max-width: 34ch; }
.lh-aiwelcome__chips { display: flex; flex-direction: column; align-items: center; gap: 7px; }

/* ====================================================== AI page ======== */

.lh-aihero {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: stretch;
  border-radius: 24px; padding: 28px; margin-bottom: 18px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(146, 157, 198, .35), transparent 60%),
    radial-gradient(80% 120% at 0% 100%, rgba(169, 217, 217, .45), transparent 60%),
    var(--lh-card);
  border: 1px solid var(--lh-line); box-shadow: var(--sh-1);
}
.lh-aihero__badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #3A4675;
  background: rgba(255, 255, 255, .7); padding: 5px 11px; border-radius: 99px; margin-bottom: 12px;
}
.lh-aihero h1 { font-size: 30px; letter-spacing: -0.03em; line-height: 1.15; }
.lh-aihero p { font-size: 15px; color: var(--lh-ink-2); margin: 8px 0 18px; max-width: 52ch; }
.lh-aihero__ask { display: flex; gap: 8px; max-width: 620px; }
.lh-aihero__ask input {
  flex: 1; height: 48px; padding: 0 16px; border: 1px solid var(--lh-line); border-radius: 14px;
  font: inherit; font-size: 15px; background: var(--lh-card); box-shadow: var(--sh-2);
}
.lh-aihero__ask input:focus { outline: none; border-color: var(--lh-peri); box-shadow: 0 0 0 3px rgba(146, 157, 198, .25); }
.lh-aihero__ask .lh-btn { min-height: 48px; padding: 0 20px; border-radius: 14px; }
.lh-aihero__demo {
  background: rgba(255, 255, 255, .78); border-radius: 18px; padding: 20px; align-self: center;
  box-shadow: inset 0 0 0 1px rgba(98, 112, 165, .16);
}
.lh-aihero__demotitle { display: flex; align-items: center; gap: 7px; font-weight: 720; font-size: 14.5px; color: #3A4675; }
.lh-aihero__demo p { font-size: 13px; margin: 8px 0 14px; }

.lh-how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.lh-how__step {
  display: flex; gap: 12px; align-items: flex-start; position: relative;
  background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: var(--r-xl); padding: 16px;
}
.lh-how__n {
  position: absolute; top: -9px; left: 14px; font-size: 11px; font-weight: 800;
  background: var(--lh-nav); color: #fff; width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center;
}
.lh-how__icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; background: var(--lh-peri-100); color: var(--lh-peri-600); }
.lh-how__t { font-weight: 700; font-size: 14px; }
.lh-how__s { font-size: 12.5px; color: var(--lh-ink-3); line-height: 1.45; margin-top: 2px; }

.lh-aipage { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; align-items: start; }
.lh-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
.lh-example {
  display: flex; flex-direction: column; gap: 5px; text-align: left; cursor: pointer;
  border: 1px solid var(--lh-line); background: var(--lh-card); border-radius: var(--r-lg); padding: 13px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.lh-example:hover { border-color: var(--lh-peri); box-shadow: var(--sh-2); transform: translateY(-1px); }
.lh-example:active { transform: scale(.98); }
.lh-example__who { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--lh-peri-600); }
.lh-example__q { display: flex; gap: 7px; align-items: flex-start; font-size: 13.5px; font-weight: 660; color: var(--lh-ink); line-height: 1.35; }
.lh-example__q svg { color: var(--lh-ink-3); margin-top: 1px; }
.lh-example__s { font-size: 12px; color: var(--lh-ink-3); line-height: 1.45; }

/* ======================================================== demo guide === */

.lh-demo {
  position: fixed; left: 50%; bottom: 22px; z-index: 130; transform: translateX(-50%);
  width: min(460px, calc(100vw - 32px));
  background: var(--lh-nav); color: #fff; border-radius: 18px; padding: 14px 16px 16px;
  box-shadow: var(--sh-3);
  animation: lh-demo-pop var(--med) var(--ease) both;
}
@keyframes lh-demo-pop {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.lh-demo[hidden] { display: none; }
.lh-demo__top { display: flex; align-items: center; gap: 10px; }
.lh-demo__badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52; padding: 4px 9px; border-radius: 99px;
}
.lh-demo__count { font-size: 12px; color: #9DB9CF; flex: 1; }
.lh-demo .lh-iconbtn { background: transparent; border-color: rgba(255, 255, 255, .18); color: #CFE0EC; }
.lh-demo__title { font-size: 16px; font-weight: 720; margin-top: 10px; }
.lh-demo__text { font-size: 13px; color: #C3D6E4; margin-top: 4px; line-height: 1.5; }
.lh-demo__dots { display: flex; gap: 5px; margin-top: 12px; }
.lh-demo__dots i { width: 22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.lh-demo__dots i.is-done { background: var(--lh-peri); }
.lh-demo__dots i.is-on { background: var(--lh-mint); }
.lh-demo__btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.lh-demo .lh-btn--ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .2); box-shadow: none; }

/* ============================================================ widgets === */

.lh-widgets { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.lh-widget {
  background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: var(--r-xl); box-shadow: var(--sh-1);
  display: flex; flex-direction: column; min-width: 0;
  transition: box-shadow var(--med) var(--ease), border-color var(--med) var(--ease), transform var(--med) var(--ease);
}
.lh-widget--sm { grid-column: span 4; }
.lh-widget--md { grid-column: span 6; }
.lh-widget--lg { grid-column: span 12; }
.lh-widget--ai {
  background:
    radial-gradient(70% 140% at 100% 0%, rgba(146, 157, 198, .20), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(169, 217, 217, .26), transparent 60%),
    var(--lh-card);
  border-color: rgba(98, 112, 165, .22);
}
.lh-widget__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; min-height: 54px; }
.lh-widget__icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--lh-primary-100); color: var(--lh-primary-700); flex: 0 0 auto; }
.lh-widget__icon--ai { background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52; }
.lh-widget__title { font-size: 14.5px; font-weight: 680; letter-spacing: -0.012em; }
.lh-widget__body { padding: 0 16px 16px; flex: 1; }
.lh-widget__body--flush { padding: 0 0 6px; }
.lh-widget__body--flush > .lh-list .lh-list__row { padding-left: 16px; padding-right: 16px; }
.lh-widget__tools { display: flex; gap: 2px; align-items: center; }
.lh-widget__tools .lh-btn--sm { min-height: 30px; padding: 0 8px; }
.lh-widget__grip { color: var(--lh-ink-3); cursor: grab; display: grid; place-items: center; }

.lh-widget.is-editing { border-style: dashed; border-color: var(--lh-peri); box-shadow: 0 0 0 4px rgba(146, 157, 198, .12); }
.lh-widget.is-editing .lh-widget__body { pointer-events: none; opacity: .85; }
.lh-widget.is-editing[draggable="true"] { cursor: grab; }
.lh-widget.is-dragging { opacity: .4; }
.lh-widget.is-droptarget { border-color: var(--lh-mint-600); box-shadow: 0 0 0 4px rgba(63, 138, 138, .18); }

.lh-edittip {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 16px;
  border-radius: var(--r-lg); background: var(--lh-peri-100); color: #3A4675; font-size: 13px; line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(98, 112, 165, .16);
}

.lh-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lh-gallery__item {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px;
  align-items: center; text-align: left; cursor: pointer;
  border: 1px solid var(--lh-line); background: var(--lh-card); border-radius: var(--r-lg); padding: 12px;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.lh-gallery__item:hover { border-color: var(--lh-primary); background: var(--lh-primary-050); }
.lh-gallery__icon { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--lh-primary-100); color: var(--lh-primary-700); }
.lh-gallery__icon--ai { background: linear-gradient(135deg, var(--lh-mint), var(--lh-peri)); color: #1F3B52; }
.lh-gallery__t { font-size: 14px; font-weight: 660; }
.lh-gallery__s { font-size: 12px; color: var(--lh-ink-3); grid-column: 2; }
.lh-gallery__add { grid-row: 1 / 3; grid-column: 3; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--lh-primary-600); }

/* home widget bits */
.lh-brief__text { font-size: 15.5px; line-height: 1.7; color: var(--lh-ink); min-height: 3.2em; max-width: 90ch; }
.lh-brief__chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

.lh-hbars { display: grid; gap: 10px; flex: 1; }
.lh-hbar { display: grid; grid-template-columns: 100px 1fr 44px; align-items: center; gap: 12px; color: inherit; font-size: 13px; }
a.lh-hbar:hover .lh-hbar__label { color: var(--lh-primary-600); }
.lh-hbar__label { font-weight: 620; }
.lh-hbar__n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lh-occ { display: flex; align-items: center; gap: 22px; }
.lh-occ > p { flex: 1; font-size: 13px; }

.lh-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lh-quick__btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  min-height: 84px; padding: 12px; border-radius: var(--r-lg); cursor: pointer;
  border: 1px solid var(--lh-line); background: var(--lh-primary-050); color: var(--lh-primary-700);
  font-size: 13px; font-weight: 660; text-align: center;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.lh-quick__btn:hover { background: var(--lh-primary-100); border-color: #BCD3E2; }
.lh-quick__btn:active { transform: scale(.97); }
.lh-quick__btn--ai { background: linear-gradient(135deg, rgba(169, 217, 217, .4), rgba(146, 157, 198, .32)); color: #2E3F6B; border-color: rgba(98, 112, 165, .22); }

.lh-agenda { display: grid; }
.lh-agenda__row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--lh-line-2); color: inherit; }
.lh-agenda__row:first-child { border-top: 0; }
.lh-agenda__row:hover { background: var(--lh-primary-050); }
.lh-agenda__when {
  width: 52px; flex: 0 0 auto; text-align: center; font-size: 12px; font-weight: 750; padding: 6px 4px; border-radius: 9px;
  background: var(--lh-primary-100); color: var(--lh-primary-700);
}
.lh-agenda__when.is-soon { background: var(--lh-amber-100); color: var(--lh-amber); }
.lh-agenda__when.is-late { background: var(--lh-red-100); color: var(--lh-red); }
.lh-agenda__main { display: flex; flex-direction: column; min-width: 0; }

.lh-feed { display: grid; }
.lh-feed__row { display: flex; gap: 11px; padding: 10px 16px; border-top: 1px solid var(--lh-line-2); color: inherit; align-items: flex-start; }
.lh-feed__row:first-child { border-top: 0; }
a.lh-feed__row:hover { background: var(--lh-primary-050); }
.lh-feed__dot { width: 8px; height: 8px; border-radius: 99px; background: var(--lh-mint-600); margin-top: 6px; flex: 0 0 auto; }
.lh-feed__row > span:last-child { display: flex; flex-direction: column; }
.lh-feed__what { font-size: 13px; line-height: 1.45; }
.lh-feed__who { font-size: 11.5px; color: var(--lh-ink-3); margin-top: 2px; }

.lh-rowicon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; background: var(--lh-primary-100); color: var(--lh-primary-700); }
.lh-rowicon--blue  { background: var(--lh-peri-100); color: var(--lh-peri-600); }
.lh-rowicon--teal  { background: var(--lh-mint-100); color: var(--lh-mint-600); }
.lh-rowicon--amber { background: var(--lh-amber-100); color: var(--lh-amber); }
.lh-rowicon--red   { background: var(--lh-red-100); color: var(--lh-red); }

.lh-list__row.is-selected { background: var(--lh-primary-100); }
.lh-list__row.is-selected .lh-list__title { color: var(--lh-primary-700); }
.lh-list--tight .lh-list__row { padding: 10px 0; min-height: 0; }
.lh-list__row--top { align-items: flex-start; }
.lh-list__row .lh-btn--sm { flex: 0 0 auto; }

/* ============================================================== AI bits === */

.lh-aisuggest {
  display: flex; gap: 11px; align-items: flex-start; margin-top: 18px;
  padding: 14px; border-radius: var(--r-lg); font-size: 13px; line-height: 1.55; color: #3A4675;
  background: linear-gradient(135deg, rgba(169, 217, 217, .24), rgba(146, 157, 198, .18));
  box-shadow: inset 0 0 0 1px rgba(98, 112, 165, .16);
}
.lh-aisuggest > svg { color: var(--lh-peri-600); margin-top: 2px; flex: 0 0 auto; }
.lh-aisuggest--wide { margin: 0 0 16px; }
.lh-aisuggest__btns { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }

.lh-aiexplain {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 12px;
  padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; line-height: 1.6; color: #3A4675;
  background: linear-gradient(135deg, rgba(169, 217, 217, .22), rgba(146, 157, 198, .16));
}
.lh-aiexplain svg { color: var(--lh-peri-600); margin-top: 3px; flex: 0 0 auto; }

.lh-aireason { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 12px; font-weight: 600; color: #4E5A93; }

.lh-aireading { display: flex; gap: 20px; align-items: center; padding: 10px 0; }
.lh-aireading__doc {
  position: relative; overflow: hidden; width: 110px; height: 140px; flex: 0 0 auto;
  border-radius: 12px; border: 1px solid var(--lh-line); background: var(--lh-sand);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: 10.5px; color: var(--lh-ink-3); text-align: center; padding: 8px; color: var(--lh-peri-600);
}
.lh-aireading__doc span { color: var(--lh-ink-3); word-break: break-all; }
.lh-aireading__scan {
  position: absolute; left: 0; right: 0; height: 26px; top: -26px;
  background: linear-gradient(180deg, transparent, rgba(146, 157, 198, .45), transparent);
  animation: lh-scan 1.4s var(--ease) infinite;
}
@keyframes lh-scan { to { top: 140px; } }

/* =========================================================== matching === */

.lh-matchlayout { display: grid; grid-template-columns: 290px 1fr; gap: 16px; align-items: start; }
.lh-queue { position: sticky; top: calc(var(--lh-topbar) + 16px); overflow: hidden; }
.lh-matchhead { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.lh-matchhead h2 { font-size: 20px; letter-spacing: -0.02em; }
.lh-matchhead p { font-size: 13px; color: var(--lh-ink-3); margin: 2px 0 8px; }
.lh-matches { display: grid; gap: 12px; margin-top: 16px; }
.lh-match {
  background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: var(--r-xl); padding: 16px; box-shadow: var(--sh-1);
}
.lh-match--best { border-color: rgba(46, 125, 104, .35); box-shadow: 0 0 0 3px rgba(46, 125, 104, .08), var(--sh-1); }
.lh-match__top { display: flex; align-items: center; gap: 14px; }
.lh-match__title { flex: 1; min-width: 0; }
.lh-match__title h3 { font-size: 15.5px; }
.lh-match__title p { font-size: 12.5px; color: var(--lh-ink-3); margin-top: 2px; }
.lh-why { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.lh-match__btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ========================================================== checklist === */

.lh-checklist { display: grid; gap: 6px; }
.lh-check {
  display: flex; align-items: center; gap: 11px; cursor: pointer;
  padding: 11px 12px; border-radius: var(--r-md); border: 1px solid var(--lh-line);
  font-size: 13.5px; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.lh-check:hover { background: var(--lh-primary-050); }
.lh-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.lh-check__box {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: inset 0 0 0 2px #C4D3DD; color: transparent; transition: background var(--fast) var(--ease);
}
.lh-check.is-done { background: var(--lh-ok-100); border-color: rgba(46, 125, 104, .25); }
.lh-check.is-done .lh-check__box { background: var(--lh-ok); box-shadow: none; color: #fff; }
.lh-check.is-done span:last-child { color: var(--lh-ink-2); }
.lh-check input:focus-visible + .lh-check__box { outline: 2px solid var(--lh-primary); outline-offset: 2px; }

/* ======================================================== small pages === */

.lh-renewals, .lh-autos { display: grid; gap: 14px; }
.lh-renewal__top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.lh-renewal__who { flex: 1; }
.lh-renewal__who h3 { font-size: 15px; }
.lh-renewal__who p, .lh-renewal__ends span { font-size: 12.5px; color: var(--lh-ink-3); }
.lh-renewal__ends { display: flex; flex-direction: column; align-items: flex-end; }
.lh-renewal__foot { display: flex; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--lh-line-2); font-size: 13px; flex-wrap: wrap; }

.lh-recon { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; font-size: 13px; font-weight: 700; }
.lh-recon .lh-bar { height: 10px; }

.lh-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%;
  padding: 30px 20px; border-radius: var(--r-lg); cursor: pointer;
  border: 2px dashed #C4D3DD; background: var(--lh-sand); color: var(--lh-ink-2); font-size: 13px;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.lh-drop:hover { border-color: var(--lh-primary); background: var(--lh-primary-050); }
.lh-drop svg { color: var(--lh-primary); }
.lh-drop strong { font-size: 14px; color: var(--lh-ink); }
.lh-drop span { color: var(--lh-ink-3); font-size: 12.5px; }
.lh-drop--sm { padding: 18px; }

.lh-choices { display: grid; gap: 8px; }
.lh-choice {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--lh-line); background: var(--lh-card); border-radius: var(--r-lg); padding: 11px 12px;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.lh-choice:hover { border-color: var(--lh-primary); background: var(--lh-primary-050); }
.lh-choice > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; font-size: 13.5px; }
.lh-choice .lh-muted { font-size: 12px; }

.lh-connecting { display: flex; align-items: center; gap: 12px; padding: 18px 0; font-weight: 600; }
.lh-spinner { width: 22px; height: 22px; border-radius: 99px; border: 3px solid var(--lh-primary-100); border-top-color: var(--lh-primary); animation: lh-spin .8s linear infinite; }

.lh-auto.is-off { opacity: .72; }
.lh-auto__top { display: flex; align-items: center; gap: 12px; }
.lh-auto__top h3 { font-size: 15px; }
.lh-auto__icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--lh-amber-100); color: var(--lh-amber); }
.lh-auto__rule { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 12px; }
.lh-auto__when, .lh-auto__then {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: var(--r-md); font-size: 13px;
  background: var(--lh-sand); border: 1px solid var(--lh-line-2);
}
.lh-auto__when em, .lh-auto__then em { font-style: normal; font-weight: 750; color: var(--lh-ink-2); margin-right: 4px; }
.lh-auto__arrow { color: var(--lh-ink-3); }
.lh-auto__foot { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }

.lh-apps, .lh-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.lh-app__top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.lh-app__top h3 { font-size: 15px; }
.lh-app__top p { font-size: 12.5px; color: var(--lh-ink-3); margin-top: 2px; }
.lh-app__logo {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center;
  font-weight: 800; font-size: 18px; background: var(--lh-primary-100); color: var(--lh-primary-700);
}
.lh-app__foot { display: flex; align-items: center; gap: 10px; font-size: 12px; padding-top: 12px; border-top: 1px solid var(--lh-line-2); }

.lh-person .lh-card__body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.lh-person h3 { font-size: 15px; margin-top: 8px; }
.lh-person p { font-size: 12.5px; color: var(--lh-ink-3); }
.lh-person__load { display: flex; gap: 6px; margin: 10px 0; min-height: 24px; align-items: center; }
.lh-person__contact { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--lh-ink-2); }
.lh-person__contact span { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.lh-person--invite { border-style: dashed; }

.lh-segment--lg button { padding: 10px 18px; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; }

.lh-democtl { display: grid; grid-template-columns: 1fr auto; gap: 16px 20px; align-items: center; }
.lh-democtl p { font-size: 12.5px; margin-top: 2px; }

.lh-meter { display: flex; align-items: center; gap: 10px; min-width: 150px; font-size: 12.5px; font-weight: 700; }
.lh-meter .lh-bar { flex: 1; }

/* ============================================================ messages === */

.lh-msglayout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.lh-threads { overflow: hidden; }
.lh-convo { display: flex; flex-direction: column; overflow: hidden; }
.lh-convo--solo { max-width: 760px; }
.lh-bubbles { display: flex; flex-direction: column; gap: 10px; padding: 18px; max-height: 420px; overflow-y: auto; background: var(--lh-sand); }
.lh-bubble { max-width: 76%; display: flex; flex-direction: column; gap: 4px; }
.lh-bubble--them { align-self: flex-start; }
.lh-bubble--me { align-self: flex-end; align-items: flex-end; }
.lh-bubble__text { padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; }
.lh-bubble--them .lh-bubble__text { background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: 16px 16px 16px 4px; }
.lh-bubble--me .lh-bubble__text { background: var(--lh-primary); color: #fff; border-radius: 16px 16px 4px 16px; }
.lh-bubble__meta { font-size: 11px; color: var(--lh-ink-3); display: inline-flex; align-items: center; gap: 4px; }
.lh-convo__reply { padding: 16px 18px 18px; border-top: 1px solid var(--lh-line-2); }
.lh-convo__send { display: flex; justify-content: flex-end; margin-top: 10px; }
.lh-composer { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--lh-line-2); }
.lh-composer .lh-field { flex: 1; }

.lh-reply { display: grid; gap: 10px; }
.lh-reply__ai { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lh-reply .lh-help { display: flex; align-items: center; gap: 5px; margin-top: 0; }
.lh-tones { display: inline-flex; gap: 2px; background: var(--lh-sand-2); border-radius: 99px; padding: 3px; border: 1px solid var(--lh-line); }
.lh-tone { border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 640; color: var(--lh-ink-2); padding: 5px 11px; border-radius: 99px; }
.lh-tone.is-on { background: var(--lh-card); color: #3A4675; box-shadow: var(--sh-1); }

.lh-quotebox { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: var(--r-lg); background: var(--lh-sand); margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
.lh-quotebox svg { color: var(--lh-ink-3); margin-top: 3px; flex: 0 0 auto; }

/* ============================================================ partners === */

.lh-pref { padding: 14px 16px; border: 1px solid var(--lh-line); border-radius: var(--r-lg); background: var(--lh-card); width: 100%; }
.lh-list .lh-pref { border: 0; padding: 4px 0; }
.lh-pref__top { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.lh-pref__who { flex: 1; display: flex; flex-direction: column; }
.lh-pref__who strong { font-size: 14.5px; }
.lh-pref__who span { font-size: 12.5px; color: var(--lh-ink-3); }
.lh-pref__due { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--lh-ink-2); padding-top: 12px; border-top: 1px solid var(--lh-line-2); }
.lh-pref .lh-steps { margin-bottom: 12px; }

.lh-contact { display: flex; align-items: center; gap: 14px; }
.lh-contact > div { display: flex; flex-direction: column; }
.lh-contact strong { font-size: 15px; }
.lh-contact span { font-size: 12.5px; color: var(--lh-ink-3); }

.lh-faq { display: grid; gap: 8px; }
.lh-faq__item { border: 1px solid var(--lh-line); border-radius: var(--r-lg); background: var(--lh-card); }
.lh-faq__item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; font-weight: 640; font-size: 14px;
}
.lh-faq__item summary::-webkit-details-marker { display: none; }
.lh-faq__item summary svg { transition: transform var(--fast) var(--ease); color: var(--lh-ink-3); flex: 0 0 auto; }
.lh-faq__item[open] summary svg { transform: rotate(180deg); }
.lh-faq__item p { padding: 0 16px 16px; font-size: 13.5px; color: var(--lh-ink-2); line-height: 1.6; }

/* ============================================================ resident === */
/* Big targets, big type, one idea per screen. */

.lh-resident { max-width: 760px; margin: 0 auto; }
.lh-resident__hi { font-size: 32px; letter-spacing: -0.03em; }
.lh-resident__lead { font-size: 17px; color: var(--lh-ink-2); margin: 6px 0 22px; line-height: 1.55; }
.lh-bigbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.lh-bigbtns--list { grid-template-columns: 1fr; }
.lh-bigbtn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; cursor: pointer;
  min-height: 150px; padding: 22px; border-radius: 20px;
  background: var(--lh-card); border: 1px solid var(--lh-line); box-shadow: var(--sh-1); color: var(--lh-primary-700);
  transition: box-shadow var(--med) var(--ease), transform var(--med) var(--ease), border-color var(--med) var(--ease);
}
.lh-bigbtn:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: #BCD3E2; }
.lh-bigbtn:active { transform: scale(.98); }
.lh-bigbtn strong { font-size: 18px; color: var(--lh-ink); margin-top: auto; }
.lh-bigbtn span { font-size: 14px; color: var(--lh-ink-3); }
.lh-bigbtn--primary { background: var(--lh-primary); border-color: var(--lh-primary); color: #fff; }
.lh-bigbtn--primary strong { color: #fff; }
.lh-bigbtn--primary span { color: #DCEAF4; }
.lh-bigbtn--row { flex-direction: row; align-items: center; min-height: 80px; gap: 16px; }
.lh-bigbtn--row strong { margin-top: 0; font-size: 16.5px; flex: 1; }
.lh-bigbtn__txt { display: flex; flex-direction: column; flex: 1; }
.lh-bigbtn__txt strong { flex: 0; }
.lh-bigbtn__call { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--lh-primary-700) !important; font-size: 15px !important; }
.lh-emergency {
  display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 16px 18px; border-radius: 16px;
  background: var(--lh-red-100); color: var(--lh-red); font-size: 15px;
}

/* ============================================================== family === */

.lh-approval { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lh-approval__main { flex: 1; min-width: 200px; }
.lh-approval__main strong { font-size: 15px; }
.lh-approval__main p { font-size: 13px; color: var(--lh-ink-3); margin-top: 2px; }
.lh-done-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--lh-ok-100); color: var(--lh-ok); font-size: 14px; }
.lh-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lh-ticks li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.lh-ticks li svg { color: var(--lh-ok); }
.lh-ticks li.is-no svg { color: var(--lh-red); }

/* ============================================================ property === */

.lh-prophead {
  display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: center;
  background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: var(--r-xl); box-shadow: var(--sh-1);
  padding: 16px; margin-bottom: 18px;
}
.lh-prophead__media .lh-photoph { border-radius: 14px; }
.lh-prophead__text h1 { font-size: 24px; letter-spacing: -0.025em; margin-top: 10px; }
.lh-prophead__text > p { font-size: 14px; color: var(--lh-ink-3); margin-top: 3px; }
.lh-prophead__nums { display: flex; gap: 28px; margin: 16px 0; }
.lh-prophead__nums div { display: flex; flex-direction: column; }
.lh-prophead__nums strong { font-size: 20px; font-weight: 740; letter-spacing: -0.02em; }
.lh-prophead__nums span { font-size: 12px; color: var(--lh-ink-3); font-weight: 600; }
.lh-prophead__btns { display: flex; gap: 8px; flex-wrap: wrap; }

.lh-web__desc { font-size: 14px; line-height: 1.6; color: var(--lh-ink-2); margin-top: 12px; }
.lh-serp { max-width: 560px; margin: 20px auto 0; background: #fff; border: 1px solid var(--lh-line); border-radius: 14px; padding: 14px 16px; }
.lh-serp__label { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--lh-ink-3); margin-bottom: 8px; }
.lh-serp__url { font-size: 12.5px; color: var(--lh-ink-3); }
.lh-serp__title { font-size: 17px; color: #1A4C8F; font-weight: 600; margin-top: 2px; }
.lh-serp__desc { font-size: 13px; color: var(--lh-ink-2); margin-top: 4px; line-height: 1.5; }

/* ============================================================== tour === */

.lh-tour__text { font-size: 15px; line-height: 1.6; color: var(--lh-ink-2); }
.lh-tour__dots { display: flex; gap: 6px; margin-top: 18px; }
.lh-tour__dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--lh-line); }
.lh-tour__dots i.is-on { background: var(--lh-primary); width: 22px; }

/* ============================================================= toast === */

.lh-toast.has-action { pointer-events: auto; }
.lh-toast__undo {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 6px;
  border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
  padding: 5px 11px; border-radius: 99px; background: rgba(255, 255, 255, .15); color: var(--lh-mint);
}
.lh-toast__undo:hover { background: rgba(255, 255, 255, .25); }

/* ======================================================== responsive === */

@media (max-width: 1300px) {
  .lh-viewas label { display: none; }
  .lh-how { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1180px) {
  .lh-widget--sm { grid-column: span 6; }
  .lh-aihero, .lh-aipage { grid-template-columns: 1fr; }
  .lh-matchlayout, .lh-msglayout { grid-template-columns: 1fr; }
  .lh-queue { position: static; }
  .lh-prophead { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .lh-widget--sm, .lh-widget--md { grid-column: span 12; }
  .lh-why { grid-template-columns: 1fr; }
  .lh-examples, .lh-gallery { grid-template-columns: 1fr; }
  .lh-bigbtns { grid-template-columns: 1fr; }
  .lh-bigbtn { min-height: 110px; }
}

@media (max-width: 767px) {
  .lh-ask { max-width: none; }
  .lh-ask__kbd { display: none; }
  .lh-viewas select { min-width: 0; max-width: 130px; }
  .lh-how { grid-template-columns: 1fr; }
  .lh-steps__label { font-size: 10.5px; }
  .lh-searchbox input { width: 100%; }
  .lh-searchbox, .lh-coll__tools { width: 100%; }
  .lh-coll__tools select { flex: 1; }
  .lh-democtl { grid-template-columns: 1fr; }
  .lh-resident__hi { font-size: 26px; }
  .lh-aibox--row { grid-template-columns: 1fr; }
  .lh-occ { flex-direction: column; align-items: stretch; }
  .lh-prophead__nums { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .lh-aireading__scan, .lh-think__mark, .lh-spinner { animation: none !important; }
}

/* ----------------------------------------------------- small leftovers --- */
.lh-aihero__text { min-width: 0; }
.lh-aipage__examples, .lh-aipage__chat { overflow: hidden; }
.lh-card__titles { flex: 1; min-width: 0; }
.lh-card__icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; background: var(--lh-primary-100); color: var(--lh-primary-700); }
.lh-brief { display: block; }
.lh-hbar__track { min-width: 0; }
.lh-matchmain { min-width: 0; }
.lh-renewal { overflow: hidden; }
.lh-steps__item--todo .lh-steps__label { color: var(--lh-ink-3); }
.lh-table__empty td { padding: 0; }

/* Shared sizing: let cards shrink, and keep wide data inside its scroller. */
.lh-view, .lh-grid > *, .lh-stack > *, .lh-split > *, .lh-formgrid > *,
.lh-editor > *, .lh-stats > *, .lh-how > *, .lh-tiles > *, .lh-apps > *,
.lh-people > *, .lh-prophead > *, .lh-msglayout > *, .lh-matchlayout > *,
.lh-gallery > *, .lh-quick > *, .lh-bigbtns > *, .lh-examples > * { min-width: 0; }
.lh-view, .lh-drawer, .lh-modal, .lh-aipanel { overflow-wrap: anywhere; }
.lh-pagehead__text { min-width: min(260px, 100%); }
.lh-tablewrap, .lh-board, .lh-tabs { max-width: 100%; min-width: 0; }
.lh-field, .lh-searchbox, .lh-searchbox input { max-width: 100%; }
.lh-ask, .lh-ask input, .lh-aihero__ask input, .lh-aipanel__form input,
.lh-composer .lh-field, .lh-pref__who, .lh-aipanel__titles { min-width: 0; }
.lh-burger, .lh-iconbtn, .lh-aibtn, .lh-user, .lh-aipanel__mark { flex-shrink: 0; }
.lh-card__head, .lh-card__foot, .lh-widget__head, .lh-drawer__foot,
.lh-modal__foot, .lh-prophead__nums, .lh-demo__btns { flex-wrap: wrap; }
.lh-btn { max-width: 100%; white-space: normal; padding-top: 7px; padding-bottom: 7px; }
.lh-drawer:not(.is-open), .lh-aipanel:not(.is-open) { display: none; }
.lh-side { height: 100dvh; }
.lh-side-close, .lh-menu-scrim { display: none; }
.lh-modal__box { max-height: 84dvh; }
.lh-drawer__head, .lh-drawer__foot, .lh-aipanel__head,
.lh-aipanel__form, .lh-aipanel__foot, .lh-modal__head, .lh-modal__foot { flex-shrink: 0; }

@media (min-width: 1024px) and (max-width: 1300px) {
  .lh-user__text, .lh-ask__kbd { display: none; }
  .lh-user { padding: 4px; }
  .lh-ask input { padding-right: 14px; }
  .lh-top__spacer { display: none; }
}

@media (max-width: 1023px) {
  .lh-side { max-width: calc(100% - 40px); visibility: hidden; }
  .lh-side.is-open { visibility: visible; }
  .lh-brand { display: flex; align-items: center; gap: 12px; }
  .lh-brand a { min-width: 0; flex: 1; }
  .lh-side-close { display: grid; font-size: 24px; }
  .lh-menu-open { overflow: hidden; }
  .lh-menu-open .lh-menu-scrim { display: block; position: fixed; inset: 0; z-index: 105; background: rgba(23, 36, 46, .4); }
  .lh-nav__item, .lh-nav__group { min-height: 44px; }
  .lh-top__spacer, .lh-user__text { display: none; }
  .lh-user { padding: 4px; }
  .lh-ask { max-width: none; }
  .lh-top { gap: 10px; }
}

@media (max-width: 767px) {
  :root { --lh-topbar: 116px; }
  .lh-top { height: auto; min-height: var(--lh-topbar); display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 44px; gap: 8px; padding: 10px 20px; }
  .lh-ask { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .lh-ask input { padding-right: 14px; }
  .lh-askpop { max-height: min(60dvh, 420px); }
  .lh-viewas { min-width: 0; }
  .lh-viewas select { width: 100%; max-width: none; min-width: 0; }
  .lh-burger, .lh-top .lh-iconbtn, .lh-top .lh-user { width: 44px; height: 44px; justify-content: center; }
  .lh-field, .lh-searchbox input, .lh-ask input, .lh-aihero__ask input, .lh-aipanel__form input { font-size: 16px; }
  .lh-field, .lh-btn, .lh-pill, .lh-searchbox input, .lh-ask input { min-height: 44px; }
  .lh-coll__tools > *, .lh-filters > * { min-width: 0; max-width: 100%; }
  .lh-pagehead__actions { width: 100%; }
  .lh-pagehead__actions .lh-btn { flex: 1 1 140px; }
  .lh-aihero { padding: 20px; }
  .lh-aihero__ask { flex-wrap: wrap; }
  .lh-aihero__ask input { flex: 1 1 100%; width: 100%; }
  .lh-modal { padding: 20px; }
  .lh-modal__box { max-height: calc(100dvh - 40px); }
  .lh-drawer, .lh-aipanel { height: 100dvh; }
  .lh-drawer__body, .lh-modal__body { padding: 20px; }
  .lh-drawer__foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .lh-aipanel__foot { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .lh-donut, .lh-emergency, .lh-bigbtn--row, .lh-pref__top, .lh-pref__due, .lh-aireading { flex-wrap: wrap; }
  .lh-recon { grid-template-columns: minmax(0, 1fr); }
  .lh-approval__main { min-width: 0; flex-basis: 100%; }
  .lh-bubble { max-width: 90%; }
  .lh-demo { bottom: calc(88px + env(safe-area-inset-bottom)); width: calc(100% - 40px); max-height: calc(100dvh - 108px - env(safe-area-inset-bottom)); overflow-y: auto; }
}

@media print {
  .lh-aibtn { display: none; }
}

@media (max-width: 380px) {
  .lh-quick, .lh-tile__nums { grid-template-columns: minmax(0, 1fr); }
  .lh-gallery__item { grid-template-columns: auto minmax(0, 1fr); }
  .lh-gallery__add { grid-column: 2; grid-row: 3; }
}
