/* ==========================================================================
   Lawyer profile — direction A (2026-09-17). Template:
   templates_v2/core/lawyer_detail.html. Also the frame of the firm page
   (templates_v2/core/firm_detail.html), which adds static/core/css/v2/firm.css.
   Every rule is under .ui2 .lp; tokens and components come from ui-kit.css.
   No :root block.

   Desktop: hero + body on the left, a sticky price card on the right, sticky
   section tabs. Phone: the card folds under the hero, the chat button moves to
   a bar pinned to the bottom (the page's one filled button on that screen).
   ========================================================================== */

.ui2 .lp-messages { padding-top: 16px; }
.ui2 .lp-crumbs { padding-top: 16px; }
.ui2 .lp-crumbs li { display: inline-flex; align-items: center; gap: 6px; }

.ui2 .lp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "hero aside" "body aside";
  column-gap: 48px;
  align-items: start;
  padding-bottom: 96px;
}

/* ------------------------------------------------------------------ hero */
.ui2 .lp-hero { grid-area: hero; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; padding: 28px 0 44px; min-width: 0; }
.ui2 .lp-ava { width: 160px; height: 160px; border-radius: 36px; font-size: 44px; }
.ui2 .lp-ava > .ui-ic { width: 56px; height: 56px; stroke-width: 1.3; }
.ui2 .lp-ava:has(> img) { background: var(--fill); }
.ui2 .lp-tone-0, .ui2 .lp-tone-6 { background: #e9ded4; color: #7b5c44; }
.ui2 .lp-tone-1, .ui2 .lp-tone-7 { background: #dce5ef; color: #3f5b79; }
.ui2 .lp-tone-2, .ui2 .lp-tone-8 { background: #e4e1f0; color: #5a5387; }
.ui2 .lp-tone-3, .ui2 .lp-tone-9 { background: #ddebe2; color: #3e6b50; }
.ui2 .lp-tone-4 { background: #f1e4d6; color: #87603b; }
.ui2 .lp-tone-5 { background: #e6e6ea; color: #56565d; }

.ui2 .lp-id { min-width: 0; }
.ui2 .lp-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ui2 .lp-name .ui-h2 { overflow-wrap: anywhere; }
.ui2 .lp-ad { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 980px; background: var(--tint); color: var(--brand); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: help; }
.ui2 .lp-ad .ui-ic { width: 14px; height: 14px; }
.ui2 .lp-kick { margin-top: 6px; }

.ui2 .lp-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 14px; font-size: 17px; font-variant-numeric: tabular-nums; }
.ui2 .lp-rate-v { font-weight: 600; }
.ui2 .lp-dot { color: var(--ink3); }
.ui2 .lp-rate .ui-link { font-size: 17px; }
.ui2 .lp-muted { margin: 0; font-size: 15px; line-height: 1.4; color: var(--ink2); }
.ui2 .lp-stars { display: inline-flex; gap: 1px; color: #ff9f0a; }
.ui2 .lp-stars .ui-ic { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.ui2 .lp-stars .ui-ic.is-off { color: var(--fill3); }

.ui2 .lp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.ui2 .lp-chips .ui-chip { height: 30px; padding: 0 12px; font-size: 13px; }

.ui2 .lp-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 20px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.35; color: var(--ink2); }
.ui2 .lp-meta > li { display: inline-flex; align-items: center; gap: 7px; }
.ui2 .lp-meta .ui-ic { width: 17px; height: 17px; color: var(--ink3); }
.ui2 .lp-meta .is-ok { color: var(--ok-ink); }
.ui2 .lp-meta .is-ok .ui-ic { color: var(--ok); }

/* ------------------------------------------------------------ price card */
.ui2 .lp-aside { grid-area: aside; position: sticky; top: calc(var(--app-header-h, 48px) + 24px); padding-top: 28px; min-width: 0; }
.ui2 .lp-card { padding: 26px 28px 22px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.ui2 .lp-row-l { display: block; font-size: 13px; line-height: 1.35; color: var(--ink2); }
.ui2 .lp-row-v { display: block; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui2 .lp-price { margin-top: 2px; font-size: 40px; line-height: 1.1; letter-spacing: -0.022em; }
.ui2 .lp-row-price .is-none { margin-top: 4px; font-size: 21px; line-height: 1.25; color: var(--ink2); white-space: normal; }
.ui2 .lp-row-fee { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.ui2 .lp-row-fee .lp-row-l { font-size: 15px; }
.ui2 .lp-row-fee .lp-row-v { font-size: 15px; }
.ui2 .lp-chat { margin-top: 20px; }
.ui2 .lp-contacts { margin-top: 10px; }
.ui2 .lp-contacts > summary { list-style: none; }
.ui2 .lp-contacts > summary::-webkit-details-marker { display: none; }
.ui2 .lp-contacts[open] > summary { background: var(--fill3); }
.ui2 .lp-ct { margin: 8px 0 0; padding: 0 4px; list-style: none; }
.ui2 .lp-ct > li { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; line-height: 1.35; }
.ui2 .lp-ct > li + li { border-top: 1px solid var(--fill2); }
.ui2 .lp-ct .ui-ic { width: 17px; height: 17px; color: var(--ink3); }
.ui2 .lp-ct a { min-width: 0; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.ui2 .lp-ct a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.ui2 .lp-req { display: flex; justify-content: center; margin: 14px 0 0; }
.ui2 .lp-where { margin: 18px 0 0; padding: 12px 0 0; border-top: 1px solid var(--hair); list-style: none; }
.ui2 .lp-where > li { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; font-size: 13px; line-height: 18px; color: var(--ink2); }
.ui2 .lp-where .ui-ic { width: 16px; height: 16px; margin-top: 1px; color: var(--ink3); }

.ui2 .lp-share { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 0 6px; font-size: 13px; color: var(--ink2); }
.ui2 .lp-share > span:first-child { margin-right: auto; }
.ui2 .lp-share-menu { position: relative; }
.ui2 .lp-share-menu > summary { list-style: none; }
.ui2 .lp-share-menu > summary::-webkit-details-marker { display: none; }
.ui2 .lp-share-menu[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 40; cursor: default; }
.ui2 .lp-share-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 41; min-width: 190px; }
.ui2 .lp-copied { position: absolute; right: 6px; top: calc(100% + 6px); font-size: 12px; color: var(--ok-ink); white-space: nowrap; }

/* ------------------------------------------------------------------ body */
.ui2 .lp-body { grid-area: body; min-width: 0; }
.ui2 .lp-tabs { position: sticky; top: var(--app-header-h, 48px); z-index: 30; background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.ui2 .lp-n { margin-left: 2px; font-size: 13px; font-weight: 400; color: var(--ink3); font-variant-numeric: tabular-nums; }

.ui2 .lp-sec { padding-top: 52px; scroll-margin-top: calc(var(--app-header-h, 48px) + 40px); }
.ui2 .lp-sec > .ui-h3 { margin-bottom: 18px; }
.ui2 .lp-prose { font-size: 17px; line-height: 1.47; letter-spacing: -0.2px; overflow-wrap: anywhere; }
.ui2 .lp-prose p { margin: 0 0 14px; }
.ui2 .lp-prose p:last-child { margin-bottom: 0; }
.ui2 .lp-prose-rule { padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 15px; color: var(--ink); }
.ui2 .lp-sub { margin: 36px 0 2px; font-size: 13px; line-height: 1.35; font-weight: 600; letter-spacing: 0; color: var(--ink2); }
.ui2 .lp-lines { margin: 0; padding: 0; list-style: none; }
.ui2 .lp-lines > li { padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 17px; line-height: 1.4; letter-spacing: -0.2px; }

.ui2 .lp .lprof-checklist { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.ui2 .lp .lprof-checklist > li { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hair); font-size: 17px; line-height: 1.35; letter-spacing: -0.2px; }
.ui2 .lp .lprof-checklist .ui-ic { width: 18px; height: 18px; margin-top: 2px; color: var(--ok); stroke-width: 2.2; }

/* reviews */
.ui2 .lp-rsum { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 48px; align-items: center; padding: 4px 0 28px; }
.ui2 .lp-big { display: block; font-size: 80px; line-height: 0.95; font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.ui2 .lp-rscore .lp-stars { margin-top: 10px; }
.ui2 .lp-rscore .lp-stars .ui-ic { width: 20px; height: 20px; }
.ui2 .lp-rscore .ui-meta { margin-top: 6px; }
.ui2 .lp-bars { margin: 0; padding: 0; list-style: none; }
.ui2 .lp-bars > li { display: grid; grid-template-columns: 30px minmax(0, 1fr) 28px; gap: 12px; align-items: center; height: 26px; font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.ui2 .lp-bars-s { display: inline-flex; align-items: center; gap: 3px; }
.ui2 .lp-bars-s .ui-ic { width: 11px; height: 11px; color: var(--ink3); fill: currentColor; stroke: none; }
.ui2 .lp-track > i { background: var(--ink2); }
.ui2 .lp-bars-n { text-align: right; }
.ui2 .lp-rnote { margin-bottom: 18px; }
.ui2 .lprof-rev-truncated { margin: 0 0 14px; }

.ui2 .lp-rv { padding: 22px 26px 24px; border-radius: 18px; background: var(--fill); }
.ui2 .lp-rv + .lp-rv { margin-top: 12px; }
.ui2 .lp-rv-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ui2 .lp-rv-h > b { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.ui2 .lp-rv-h .lp-stars .ui-ic { width: 14px; height: 14px; }
.ui2 .lp-rv-h time { margin-left: auto; font-size: 13px; color: var(--ink3); white-space: nowrap; }
.ui2 .lp-rv-t { margin-top: 10px; font-size: 17px; line-height: 1.47; letter-spacing: -0.2px; overflow-wrap: anywhere; }
.ui2 .lp-rv-t p { margin: 0 0 10px; }
.ui2 .lp-rv-t p:last-child { margin-bottom: 0; }
.ui2 .lp-rv-doc { margin-top: 10px; }
/* Three reviews show; the rest of the page's ten sit in a <details> (no JS, all in the DOM). */
.ui2 .lp-more { margin-top: 12px; }
.ui2 .lp-more > summary { list-style: none; gap: 4px; }
.ui2 .lp-more > summary::-webkit-details-marker { display: none; }
.ui2 .lp-more[open] > summary { display: none; }
.ui2 .lp-rempty { margin-top: 4px; }
.ui2 .lp-rwho { margin-top: 18px; }
.ui2 .lp-state { margin: 0 0 18px; }
.ui2 .lp-state .ui-status { height: auto; min-height: 28px; padding: 5px 12px; white-space: normal; line-height: 1.35; }

.ui2 .lp-form { margin: 0 0 28px; padding: 24px 28px 26px; border-radius: 18px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.ui2 .lp-form .ui-title { margin-bottom: 18px; }
.ui2 .lp-fs { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.ui2 .lp-fs > legend { float: none; width: auto; margin-bottom: 6px; padding: 0; }
.ui2 .lp-req-mark { color: var(--brand); }
.ui2 .lp-rpicks { display: flex; gap: 2px; }
.ui2 .lp-rpick { position: relative; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; border-radius: 10px; color: var(--fill3); cursor: pointer; transition: background-color 0.2s; }
.ui2 .lp-rpick:hover { background: var(--fill); }
.ui2 .lp-rpick > input { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; }
.ui2 .lp-rpick:has(> input:focus-visible) { outline: 2px solid rgba(139, 0, 0, 0.55); outline-offset: 1px; }
.ui2 .lp-rpick .ui-ic { width: 28px; height: 28px; fill: currentColor; stroke: none; transition: color 0.15s; }
.ui2 .lp-rpicks:has(.lp-rpick:nth-child(1) > input:checked) .lp-rpick:nth-child(-n+1),
.ui2 .lp-rpicks:has(.lp-rpick:nth-child(2) > input:checked) .lp-rpick:nth-child(-n+2),
.ui2 .lp-rpicks:has(.lp-rpick:nth-child(3) > input:checked) .lp-rpick:nth-child(-n+3),
.ui2 .lp-rpicks:has(.lp-rpick:nth-child(4) > input:checked) .lp-rpick:nth-child(-n+4),
.ui2 .lp-rpicks:has(.lp-rpick:nth-child(5) > input:checked) .lp-rpick:nth-child(-n+5) { color: #ff9f0a; }
.ui2 .lp-fld { margin-bottom: 18px; }
.ui2 .lp .ui-field.area { padding: 10px 14px; }
.ui2 .lp .ui-field.area textarea { width: 100%; min-height: 120px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 17px; line-height: 1.47; }
.ui2 .lp-file input[type="file"] { width: 100%; max-width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--fill); color: var(--ink); font-size: 15px; box-shadow: none; }
.ui2 .lp-err { margin-top: 6px; font-size: 13px; color: var(--urgent); }
.ui2 .lp-err ul { margin: 0; padding: 0; list-style: none; }

/* answers, articles */
.ui2 .lp-qa { margin: 0; padding: 0; list-style: none; }
.ui2 .lp-qa > li > a { display: grid; grid-template-columns: minmax(0, 1fr) 16px; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--hair); color: var(--ink); text-decoration: none; }
.ui2 .lp-qa > li:first-child > a { border-top: 1px solid var(--hair); }
.ui2 .lp-qa-b > span { display: block; }
.ui2 .lp-qa-t { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.012em; text-wrap: balance; transition: color 0.2s; }
.ui2 .lp-qa a:hover .lp-qa-t { color: var(--brand); }
.ui2 .lp-qa .lp-qa-x { display: -webkit-box; margin-top: 6px; overflow: hidden; font-size: 15px; line-height: 1.4; color: var(--ink2); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ui2 .lp-qa .lp-qa-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; font-size: 13px; color: var(--ink3); }
.ui2 .lp-best { display: inline-flex; align-items: center; gap: 5px; color: var(--ok-ink); font-weight: 500; white-space: nowrap; }
.ui2 .lp-best .ui-ic { width: 14px; height: 14px; color: var(--ok); }
.ui2 .lp-chev { width: 14px; height: 14px; color: var(--ink3); stroke-width: 2.4; }

.ui2 .lp-actbar { display: none; }

/* =============================================================== tablet */
@media (max-width: 1067.98px) {
  .ui2 .lp-grid { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 32px; }
  .ui2 .lp-hero { grid-template-columns: 120px minmax(0, 1fr); gap: 24px; }
  .ui2 .lp-ava { width: 120px; height: 120px; border-radius: 28px; font-size: 36px; }
  .ui2 .lp-card { padding: 22px 22px 18px; }
  .ui2 .lp-price { font-size: 32px; }
  .ui2 .lp .lprof-checklist { grid-template-columns: 1fr; }
}

/* ================================================================ phone */
@media (max-width: 733.98px) {
  body.ui2:has(.lp-actbar) { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .ui2 .lp-crumbs { padding-top: 12px; }
  .ui2 .lp-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "aside" "body"; padding-bottom: 48px; }

  .ui2 .lp-hero { display: block; padding: 18px 0 0; }
  .ui2 .lp-ava { width: 88px; height: 88px; margin-bottom: 18px; border-radius: 20px; font-size: 26px; }
  .ui2 .lp-ava > .ui-ic { width: 34px; height: 34px; }
  .ui2 .lp-name { gap: 6px 10px; }
  .ui2 .lp-rate { gap: 4px 8px; margin-top: 10px; font-size: 15px; }
  .ui2 .lp-rate .ui-link { font-size: 15px; min-height: 32px; }
  .ui2 .lp-chips { flex-wrap: nowrap; width: calc(100% + 2 * var(--ui-gutter)); max-width: none; margin: 12px calc(-1 * var(--ui-gutter)) 0; padding: 4px var(--ui-gutter); overflow-x: auto; scrollbar-width: none; }
  .ui2 .lp-chips::-webkit-scrollbar { display: none; }
  .ui2 .lp-chips .ui-chip { flex: none; height: 36px; padding: 0 15px; font-size: 15px; }
  .ui2 .lp-meta { gap: 6px 18px; margin-top: 16px; }
  .ui2 .lp-meta > li { min-height: 24px; }

  .ui2 .lp-aside { position: static; padding-top: 0; }
  .ui2 .lp-card { margin: 16px 0 8px; padding: 18px; background: var(--fill); box-shadow: none; }
  .ui2 .lp-row-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .ui2 .lp-row-l, .ui2 .lp-row-fee .lp-row-l { font-size: 15px; }
  .ui2 .lp-price { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
  .ui2 .lp-row-price .is-none { margin: 0; font-size: 17px; text-align: right; }
  .ui2 .lp-row-fee { margin-top: 8px; padding: 0; border: 0; }
  .ui2 .lp-row-fee .lp-row-v { font-size: 17px; }
  .ui2 .lp-chat { display: none; }
  .ui2 .lp-contacts { margin-top: 16px; }
  .ui2 .lp-contacts > summary { height: 44px; background: #fff; }
  .ui2 .lp-contacts[open] > summary { background: #fff; box-shadow: inset 0 0 0 1px var(--hair); }
  .ui2 .lp-ct > li + li { border-top-color: rgba(0, 0, 0, 0.07); }
  .ui2 .lp-req { align-items: center; height: 36px; margin-top: 8px; }
  .ui2 .lp-where { border-top-color: rgba(0, 0, 0, 0.08); }
  .ui2 .lp-share { display: none; }

  .ui2 .lp-tabs { gap: 22px; margin-top: 20px; }
  .ui2 .lp-sec { padding-top: 36px; }
  .ui2 .lp-sec > .ui-h3 { margin-bottom: 12px; }
  .ui2 .lp-lines > li { padding: 12px 0; font-size: 15px; }
  .ui2 .lp .lprof-checklist > li { padding: 11px 0; }
  .ui2 .lp-rsum { grid-template-columns: 112px minmax(0, 1fr); gap: 20px; padding-bottom: 20px; }
  .ui2 .lp-big { font-size: 56px; }
  .ui2 .lp-rscore .lp-stars .ui-ic { width: 14px; height: 14px; }
  .ui2 .lp-bars > li { grid-template-columns: 26px minmax(0, 1fr) 22px; gap: 8px; height: 22px; }
  .ui2 .lp-rv { padding: 16px 18px 18px; border-radius: 16px; }
  .ui2 .lp-rv-t { margin-top: 8px; font-size: 15px; line-height: 1.45; }
  .ui2 .lp-form { padding: 18px; }
  .ui2 .lp-qa-t { font-size: 17px; }

  .ui2 .lp-actbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    display: flex; align-items: center; gap: 12px;
    padding: 10px var(--ui-gutter) calc(env(safe-area-inset-bottom, 0px) + 10px);
    background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }
  .ui2 .lp-actbar-p { display: flex; flex-direction: column; min-width: 0; }
  .ui2 .lp-actbar-p b { font-size: 19px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ui2 .lp-actbar-p b.is-none { font-size: 15px; font-weight: 500; color: var(--ink2); }
  .ui2 .lp-actbar-p span { font-size: 13px; color: var(--ink2); white-space: nowrap; }
  .ui2 .lp-actbar-go { flex: none; min-width: 150px; margin-left: auto; }
}

@media print {
  .ui2 .lp-actbar, .ui2 .lp-share, .ui2 .lp-chat, .ui2 .lp-tabs, .ui2 .lp-form { display: none !important; }
  .ui2 .lp-aside { position: static; }
}
