.expertise-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% 0, rgba(239, 17, 24, .11), transparent 29%),
    linear-gradient(180deg, #fff 0, #f7f7f8 100%);
}
.expertise-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0 28%, #17171a 28% 100%);
}
.expertise-intro { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 34px; align-items: stretch; }
.expertise-copy { padding-block: 10px; align-self: center; }
.expertise-copy h2 { font-size: clamp(34px, 4.2vw, 62px); line-height: .98; letter-spacing: -2.5px; }
.expertise-copy > p:last-child { max-width: 720px; margin-top: 20px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.expertise-join { padding: 25px; border-radius: 16px; color: white; background: #151518; box-shadow: 0 22px 55px rgba(17, 17, 20, .13); }
.expertise-join-label { display: block; color: #ff696e; font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.expertise-join strong { display: block; margin-top: 17px; font-size: 20px; line-height: 1.25; letter-spacing: -.45px; }
.expertise-join p { margin-top: 10px; color: #bdbdc5; font-size: 12px; }
.expertise-join .button { width: 100%; margin-top: 20px; }

.expertise-toolbar { margin-top: 34px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .9); box-shadow: 0 14px 36px rgba(17, 17, 20, .045); }
.expert-search { display: grid; grid-template-columns: auto 1fr; gap: 15px; align-items: center; padding: 0 4px 14px; border-bottom: 1px solid var(--line); }
.expert-search span { font-size: 10px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; white-space: nowrap; }
.expert-search input { min-width: 0; width: 100%; padding: 11px 13px; border: 1px solid #d9d9de; border-radius: 8px; color: var(--ink); background: #fafafa; font-size: 12px; }
.expert-search input:focus { outline: 2px solid #ffc5c7; outline-offset: 1px; border-color: var(--red); background: white; }
.expert-filters { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; }
.expert-filter { min-height: 34px; padding: 7px 12px; border: 1px solid #dedee2; border-radius: 999px; color: #55555c; background: white; font-size: 10px; font-weight: 750; }
.expert-filter:hover { border-color: #efaaad; color: var(--red); }
.expert-filter.active { border-color: var(--ink); color: white; background: var(--ink); }
.expertise-results { min-height: 24px; margin: 21px 2px 12px; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.expertise-results p { color: var(--muted); font-size: 10px; letter-spacing: .35px; }
.expertise-results strong { color: var(--ink); }
.expert-save-status { color: #16823c !important; font-weight: 750; text-align: right; }

.expert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.expert-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #dedee2; border-radius: 15px; background: #fff; box-shadow: 0 12px 32px rgba(17, 17, 20, .045); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.expert-card::before { content: ""; display: block; height: 4px; background: #d6d6db; }
.expert-card.boosted::before { background: linear-gradient(90deg, var(--red), #ff7075 42%, #1b1b1f 42%); }
.expert-card.boosted { border-color: #edb4b7; }
.expert-card:hover { transform: translateY(-5px); border-color: #edb4b7; box-shadow: 0 20px 45px rgba(17, 17, 20, .09); }
.expert-card-main { padding: 20px; }
.expert-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.expert-identity { display: flex; gap: 12px; min-width: 0; align-items: center; }
.expert-avatar { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #f1cfd0; border-radius: 14px; color: var(--red); background: #fff1f1; font-size: 15px; font-weight: 850; letter-spacing: -.4px; }
.expert-name { overflow-wrap: anywhere; font-size: 15px; line-height: 1.3; letter-spacing: -.2px; }
.expert-profession { margin-top: 5px; color: var(--red); font-size: 10px; font-weight: 750; line-height: 1.45; text-transform: uppercase; letter-spacing: .55px; }
.expert-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px; color: #267343; background: #eaf8ef; font-size: 8px; font-weight: 800; letter-spacing: .25px; text-transform: uppercase; }
.expert-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2eb35e; box-shadow: 0 0 0 3px rgba(46, 179, 94, .13); }
.expert-status.busy { color: #825e18; background: #fff5dc; }
.expert-status.busy::before { background: #e1a821; box-shadow: 0 0 0 3px rgba(225, 168, 33, .14); }
.expert-sample-label { display: inline-block; margin-top: 15px; padding: 4px 7px; border-radius: 4px; color: #77777e; background: #f1f1f3; font-size: 8px; font-weight: 800; letter-spacing: .65px; text-transform: uppercase; }
.expert-plan-label { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 9px; padding: 8px 10px; border: 1px solid #f0d4d5; border-radius: 7px; color: #5a3133; background: #fff5f5; font-size: 8px; font-weight: 800; letter-spacing: .45px; text-transform: uppercase; }
.expert-plan-label span:last-child { color: var(--red); text-align: right; }
.expert-plan-label.expired { border-color: #e3e3e6; color: #898990; background: #f6f6f7; }
.expert-plan-label.expired span:last-child { color: #898990; }
.expert-plan-label.standard { border-color: #e3e3e6; color: #626269; background: #f7f7f8; }
.expert-plan-label.standard span:last-child { color: #77777e; }
.expert-upgrade-panel { margin-top: 10px; padding: 11px; border: 1px solid #efcfd1; border-radius: 9px; background: linear-gradient(135deg, #fff7f7, #fff); }
.expert-upgrade-panel > span { display: block; color: var(--red); font-size: 8px; font-weight: 850; letter-spacing: .75px; text-transform: uppercase; }
.expert-upgrade-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.expert-upgrade-button { min-height: 34px; padding: 7px 8px; border: 1px solid #e5bfc1; border-radius: 6px; color: #5b2d30; background: white; font-size: 8px; font-weight: 850; line-height: 1.3; }
.expert-upgrade-button:hover { border-color: var(--red); color: var(--red); }
.expert-upgrade-button.messages { border-color: var(--red); color: white; background: var(--red); }
.expert-upgrade-button.messages:hover { background: var(--red-deep); }
.expert-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 17px; }
.expert-stat { padding: 11px 12px; border-radius: 9px; background: #f7f7f8; }
.expert-stat strong { display: block; font-size: 18px; line-height: 1; letter-spacing: -.5px; }
.expert-stat span { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; }
.expert-bio { min-height: 61px; margin-top: 15px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.expert-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.expert-skill { padding: 5px 7px; border: 1px solid #ebebee; border-radius: 5px; color: #4c4c52; background: #fafafa; font-size: 9px; font-weight: 650; }
.expert-card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid #ededf0; background: #fcfcfd; }
.expert-action { min-height: 36px; flex: 1 1 105px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 11px; border: 1px solid #dcdce0; border-radius: 7px; color: var(--ink); background: white; font-size: 9px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }
.expert-action:hover { border-color: var(--red); color: var(--red); }
.expert-action-primary { border-color: var(--red); color: white; background: var(--red); }
.expert-action-primary:hover { border-color: var(--red-deep); color: white; background: var(--red-deep); }
.expert-action-disabled { cursor: default; border-color: #e6e6e9; color: #929299; background: #f5f5f6; }
.expert-empty, .expert-noscript { padding: 32px; border: 1px dashed #d2d2d7; border-radius: 14px; text-align: center; background: white; }
.expert-empty strong { font-size: 14px; }
.expert-empty p { margin-top: 7px; color: var(--muted); font-size: 11px; }

.expert-profile-dialog { width: min(720px, calc(100% - 28px)); }
.expert-profile-dialog form { gap: 14px; }
.expert-upgrade-dialog { width: min(620px, calc(100% - 28px)); }
.expert-plan-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.expert-plan-picker legend { grid-column: 1 / -1; margin-bottom: 2px; padding: 0; font-size: 11px; font-weight: 750; }
.expert-plan-picker label { position: relative; display: flex; grid-template-columns: none; gap: 10px; align-items: flex-start; min-width: 0; padding: 12px; border: 1px solid #dcdce0; border-radius: 9px; background: #fafafa; cursor: pointer; }
.expert-plan-picker label:has(input:checked) { border-color: var(--red); background: #fff4f4; box-shadow: 0 0 0 1px var(--red); }
.expert-plan-picker input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; padding: 0; accent-color: var(--red); }
.expert-plan-picker span { display: block; min-width: 0; }
.expert-plan-picker strong { display: block; font-size: 11px; line-height: 1.35; }
.expert-plan-picker small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.45; }
.expert-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.expert-profile-dialog select { width: 100%; padding: 12px 34px 12px 13px; border: 1px solid #d8d8dc; border-radius: 7px; color: var(--ink); background: white; font-size: 13px; }
.expert-profile-dialog select:focus { outline: 2px solid #ffc5c7; outline-offset: 1px; border-color: var(--red); }
.optional-field { color: var(--muted); font-size: 9px; font-weight: 500; }
.expert-form-note { padding: 10px 12px; border-radius: 7px; color: #6e5a27; background: #fff7df; font-size: 10px; line-height: 1.55; }
.expert-profile-dialog .button[type="submit"] { width: 100%; }
.expert-upgrade-summary { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 12px 13px; border-radius: 8px; color: white; background: var(--ink); }
.expert-upgrade-summary span { color: #bdbdc5; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .55px; }
.expert-upgrade-summary strong { font-size: 10px; text-align: right; }
.expert-upgrade-dialog .button[type="submit"] { width: 100%; }

@media (max-width: 1180px) {
  .expert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .expertise-intro { grid-template-columns: 1fr; }
  .expertise-join { max-width: 620px; }
}
@media (max-width: 700px) {
  .expertise-copy h2 { font-size: 38px; letter-spacing: -1.5px; }
  .expertise-copy > p:last-child { font-size: 13px; }
  .expertise-toolbar { margin-top: 26px; }
  .expert-search { grid-template-columns: 1fr; gap: 8px; }
  .expert-grid { grid-template-columns: 1fr; }
  .expertise-results { align-items: flex-start; flex-direction: column; gap: 5px; }
  .expert-save-status { text-align: left; }
  .expert-form-grid, .expert-plan-picker { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .expertise-join, .expert-card-main { padding: 18px; }
  .expert-card-top { flex-direction: column; }
  .expert-card-actions { padding-inline: 18px; }
  .expert-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .expert-filter { flex: 0 0 auto; }
}
