@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --ink: #171512;
  --ink-soft: #55504a;
  --ink-faint: #817b73;
  --paper: #f5f3ef;
  --surface: #ffffff;
  --surface-warm: #fbfaf7;
  --line: #ded9d0;
  --line-dark: #c7c0b6;
  --gold: #c49a28;
  --gold-dark: #8b6914;
  --topbar: #120c08;
  --shadow: 0 18px 45px rgba(36, 29, 21, .07);
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --arch: #8b5a2b;
  --pitt: #8b1a1a;
  --scul: #1b3a7a;
  --legn: #2d6b4a;
  --test: #5b2d7a;
  --pell: #b5522a;
  --graf: #8b6914;
  --archivio: #1b4a4a;
  --libr: #2d4a2d;
  --organico: #5a3820;
  --inorganico: #4a4642;
  --spec: #c49a28;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
}

body.dialog-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.network-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 84px;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  gap: 26px;
  padding: 0 clamp(24px, 3.6vw, 58px);
  background:
    radial-gradient(circle at 68% 0, rgba(118, 48, 9, .28), transparent 31%),
    linear-gradient(100deg, #0e0906 0%, #17100b 52%, #2a0f04 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  color: #f5f0e7;
}

.network-brand {
  justify-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.network-brand img {
  width: auto;
  height: 35px;
}

.network-brand > span {
  color: rgba(245, 240, 231, .53);
  font: 500 7.5px/1.35 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.network-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 2px;
}

.network-nav a,
.network-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: rgba(245, 240, 231, .64);
  font: 500 10px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.network-nav a:hover,
.network-nav button:hover,
.network-nav .active {
  color: #fff;
}

.network-nav .active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--gold);
}

.nav-count {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--gold);
  color: #17120d;
  font-size: 9px;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 2px;
  color: rgba(255, 255, 255, .78);
  font: 500 10px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.header-register {
  border-color: var(--gold);
  background: var(--gold);
  color: #17120d;
}

.mobile-menu-button {
  display: none;
  width: 38px;
  height: 38px;
  padding: 10px 7px;
  border: 0;
  background: transparent;
}

.mobile-menu-button > span:not(.sr-only) {
  display: block;
  width: 24px;
  height: 1px;
  margin: 5px auto;
  background: #fff;
}

.network-mobile-nav {
  display: none;
}

.network-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(28px, 3vw, 48px);
  padding: 46px clamp(24px, 4vw, 64px) 80px;
}

.directory {
  min-width: 0;
}

.directory-heading {
  min-height: 78px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-label {
  margin: 0 0 8px;
  color: var(--gold-dark);
  font: 600 10px/1.2 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.directory-heading h1 {
  margin: 0;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 500;
}

.directory-heading-side {
  display: flex;
  align-items: center;
  gap: 18px;
}

.data-note {
  color: var(--ink-faint);
  font: 500 9px/1.35 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.saved-searches {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  background: transparent;
  font: 500 10px/1 var(--mono);
  letter-spacing: .10em;
  text-transform: uppercase;
}

.inline-count {
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--gold);
  color: #17120d;
  font-size: 8px;
}

.search-panel {
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 8px 30px rgba(36, 29, 21, .04);
}

.main-search {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 0 21px;
  border: 1px solid #cbc4ba;
  border-radius: 14px;
  background: var(--surface-warm);
}

.search-mark {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1.8px solid var(--ink);
  border-radius: 50%;
}

.search-mark::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 1.8px;
  right: -5px;
  bottom: -2px;
  background: var(--ink);
  transform: rotate(45deg);
  transform-origin: left center;
}

.main-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
}

.main-search input::placeholder,
.location-field input::placeholder {
  color: #8a837b;
  opacity: 1;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr auto;
  gap: 10px;
  margin-top: 12px;
}

.filter-field {
  position: relative;
  min-width: 0;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.filter-field > span,
.filter-field > label {
  color: var(--ink-faint);
  font: 500 9px/1.1 var(--mono);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.filter-field select,
.filter-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.filter-field select {
  appearance: none;
  padding-right: 16px;
  background-image:
    linear-gradient(45deg, transparent 50%, #787169 50%),
    linear-gradient(135deg, #787169 50%, transparent 50%);
  background-position:
    calc(100% - 6px) 54%,
    100% 54%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.location-field {
  z-index: 20;
}

.location-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: -1px;
  right: -1px;
  padding: 7px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.location-option {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.location-option:hover,
.location-option:focus-visible {
  background: #f3efe8;
  outline: 0;
}

.location-option span {
  color: var(--ink);
  font-size: 13px;
}

.location-option small {
  color: var(--ink-faint);
  font: 500 8px/1.5 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.availability-filter {
  min-width: 174px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
}

.availability-filter input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  width: 35px;
  height: 20px;
  flex: 0 0 35px;
  border-radius: 999px;
  background: #d7d2ca;
  transition: .2s;
}

.switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  transition: .2s;
}

.availability-filter input:checked + .switch {
  background: var(--legn);
}

.availability-filter input:checked + .switch::after {
  transform: translateX(15px);
}

.availability-filter input:focus-visible + .switch {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.active-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 0;
}

.active-filter-row:not(:empty) {
  padding-top: 13px;
}

.active-filter {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px 0 13px;
  border: 1px solid rgba(23, 21, 18, .14);
  border-radius: 999px;
  background: #f0ede7;
  color: var(--ink-soft);
  font-size: 11px;
}

.active-filter::after {
  content: '×';
  color: var(--ink-faint);
  font-size: 15px;
}

.results-toolbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.results-toolbar p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.results-toolbar p strong {
  color: var(--ink);
  font-weight: 600;
}

.results-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font: 500 9px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.results-toolbar select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 10px/1 var(--mono);
  text-transform: uppercase;
}

.profile-list {
  display: grid;
  gap: 12px;
}

.profile-card {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 21px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.profile-card:hover {
  transform: translateY(-2px);
  border-color: #c5bdb2;
  box-shadow: var(--shadow);
}

.profile-photo {
  position: relative;
  width: 104px;
  height: 112px;
  overflow: hidden;
  border-radius: 12px;
  background: #dcd5ca;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.profile-initials {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 72% 20%, rgba(196, 154, 40, .28), transparent 31%),
    linear-gradient(145deg, var(--avatar-from), var(--avatar-to));
  color: rgba(255, 255, 255, .90);
  font: 500 27px/1 var(--mono);
  letter-spacing: .04em;
}

.availability-dot {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #4f895f;
}

.profile-main {
  min-width: 0;
}

.profile-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-topline h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 600;
}

.verified-badge,
.demo-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font: 600 8px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.verified-badge {
  gap: 5px;
  border: 1px solid rgba(139, 105, 20, .28);
  background: #fbf5df;
  color: #775a0d;
}

.verified-badge::before {
  content: '✓';
  font-size: 10px;
}

.demo-badge {
  border: 1px solid var(--line);
  background: #f2f0ec;
  color: var(--ink-faint);
}

.profile-role {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.profile-location {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font: 500 10px/1.5 var(--mono);
  letter-spacing: .04em;
}

.profile-summary {
  max-width: 660px;
  margin: 13px 0 15px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.taxonomy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.taxonomy-pill {
  position: relative;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px 0 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pill), black 13%);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .15), transparent 55%),
    var(--pill);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 4px 10px color-mix(in srgb, var(--pill), transparent 80%);
  font: 600 10px/1 var(--sans);
  letter-spacing: .01em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .16);
  transition: transform .15s ease, box-shadow .15s ease;
}

.taxonomy-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .12);
}

.taxonomy-pill:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 6px 14px color-mix(in srgb, var(--pill), transparent 75%);
}

.taxonomy-pill[data-taxonomy='arch'] { --pill: var(--arch); }
.taxonomy-pill[data-taxonomy='pitt'] { --pill: var(--pitt); }
.taxonomy-pill[data-taxonomy='scul'] { --pill: var(--scul); }
.taxonomy-pill[data-taxonomy='legn'] { --pill: var(--legn); }
.taxonomy-pill[data-taxonomy='test'] { --pill: var(--test); }
.taxonomy-pill[data-taxonomy='pell'] { --pill: var(--pell); }
.taxonomy-pill[data-taxonomy='graf'] { --pill: var(--graf); }
.taxonomy-pill[data-taxonomy='archivio'] { --pill: var(--archivio); }
.taxonomy-pill[data-taxonomy='libr'] { --pill: var(--libr); }
.taxonomy-pill[data-taxonomy='organico'] { --pill: var(--organico); }
.taxonomy-pill[data-taxonomy='inorganico'] { --pill: var(--inorganico); }
.taxonomy-pill[data-taxonomy='spec'] { --pill: var(--spec); }

.profile-actions {
  width: 134px;
  display: grid;
  gap: 7px;
}

.profile-actions a,
.profile-actions button {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 8px;
  font: 600 9px/1 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.profile-action-primary {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.profile-action-secondary {
  border: 1px solid var(--line-dark);
  background: transparent;
  color: var(--ink);
}

.profile-action-book {
  border: 1px solid rgba(139, 105, 20, .26);
  background: #fbf5df;
  color: #73560b;
}

.profile-action-book[disabled] {
  border-color: var(--line);
  background: #f4f2ee;
  color: #aaa39b;
  cursor: default;
}

.empty-state {
  padding: 60px 30px;
  border: 1px dashed var(--line-dark);
  border-radius: 15px;
  background: rgba(255, 255, 255, .46);
  text-align: center;
}

.empty-state h2 {
  margin: 0;
  font-size: 23px;
}

.empty-state p {
  margin: 7px 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

.empty-state button {
  min-height: 39px;
  padding: 0 17px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: 600 9px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.network-side {
  min-width: 0;
  padding-top: 104px;
}

.specialists-panel,
.requests-preview {
  border-radius: 17px;
}

.specialists-panel {
  scroll-margin-top: 98px;
  padding: 25px 22px 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(196, 154, 40, .18), transparent 31%),
    #211a14;
  color: #f6f1e8;
  box-shadow: 0 24px 55px rgba(35, 25, 16, .13);
}

.specialists-panel.focused {
  animation: specialistFocus 1.1s ease;
}

@keyframes specialistFocus {
  0%, 100% { box-shadow: 0 24px 55px rgba(35, 25, 16, .13); }
  45% { box-shadow: 0 0 0 5px rgba(196, 154, 40, .32), 0 24px 55px rgba(35, 25, 16, .20); }
}

.specialists-panel .section-label {
  color: #d7ad42;
}

.specialists-panel h2 {
  max-width: 290px;
  margin: 0;
  font-size: 28px;
  line-height: 1.04;
  letter-spacing: -.035em;
}

.specialists-intro {
  margin: 14px 0 22px;
  color: rgba(246, 241, 232, .61);
  font-size: 13px;
  line-height: 1.55;
}

.specialist-list {
  margin: 0 -9px;
}

.specialist-list button {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px 9px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
  background: transparent;
  color: #f6f1e8;
  text-align: left;
}

.specialist-list button:hover {
  background: rgba(255, 255, 255, .045);
}

.specialist-code {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(196, 154, 40, .18);
  color: #e1ba55;
  font: 600 12px/1 var(--mono);
}

.specialist-code.spec-blue {
  background: rgba(69, 105, 148, .20);
  color: #91b4dd;
}

.specialist-code.spec-green {
  background: rgba(66, 122, 82, .21);
  color: #92c7a1;
}

.specialist-code.spec-red {
  background: rgba(142, 58, 48, .22);
  color: #df958d;
}

.specialist-list strong,
.specialist-list small {
  display: block;
}

.specialist-list strong {
  font-size: 13px;
  font-weight: 600;
}

.specialist-list small {
  margin-top: 2px;
  color: rgba(246, 241, 232, .49);
  font-size: 11px;
}

.specialist-list .arrow {
  color: rgba(246, 241, 232, .46);
  font-size: 17px;
}

.requests-preview {
  margin-top: 16px;
  padding: 21px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.requests-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

.requests-head h2 {
  margin: 0;
  font-size: 20px;
}

.requests-head > button {
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  background: transparent;
  font: 500 8px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.request-row,
.mail-row {
  width: 100%;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.request-status {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
}

.request-status.waiting {
  background: var(--gold);
}

.request-status.answered {
  background: #39734a;
}

.request-row strong,
.request-row small,
.mail-row strong,
.mail-row small {
  display: block;
}

.request-row strong,
.mail-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-row small,
.mail-row small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
}

.request-row time,
.mail-row time {
  color: var(--ink-faint);
  font: 500 8px/1.5 var(--mono);
  white-space: nowrap;
}

dialog {
  padding: 0;
  border: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(14, 12, 10, .58);
  backdrop-filter: blur(7px);
}

.message-dialog {
  width: min(610px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  margin: auto;
}

.message-sheet {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: 0 35px 90px rgba(0, 0, 0, .28);
}

.message-sheet-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 25px;
}

.message-sheet-head h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -.025em;
}

.dialog-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  padding: 0 0 3px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-soft);
  font-size: 24px;
  font-weight: 300;
}

.message-recipient {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 13px;
  border-radius: 12px;
  background: #f1eee8;
}

.recipient-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font: 600 11px/1 var(--mono);
}

.message-recipient small,
.message-recipient strong {
  display: block;
}

.message-recipient small {
  margin-bottom: 3px;
  color: var(--ink-faint);
  font: 500 8px/1 var(--mono);
  letter-spacing: .10em;
  text-transform: uppercase;
}

.message-recipient strong {
  font-size: 13px;
}

.message-field {
  display: grid;
  gap: 7px;
  margin-top: 17px;
}

.message-field > span {
  color: var(--ink-faint);
  font: 500 9px/1 var(--mono);
  letter-spacing: .10em;
  text-transform: uppercase;
}

.message-field input,
.message-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.message-field textarea {
  resize: vertical;
  min-height: 138px;
  line-height: 1.55;
}

.message-field input:focus,
.message-field textarea:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(196, 154, 40, .11);
}

.attachment-field {
  min-height: 69px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed #bbb2a7;
  border-radius: 10px;
  background: #faf8f4;
  cursor: pointer;
}

.attachment-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.attachment-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--gold-dark);
  font-size: 20px;
}

.attachment-field strong,
.attachment-field small {
  display: block;
}

.attachment-field strong {
  font-size: 12px;
}

.attachment-field small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.message-note,
.demo-warning {
  margin: 13px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.5;
}

.demo-warning {
  color: #866818;
  font: 500 8px/1.5 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}

.message-actions button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 8px;
  font: 600 9px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.secondary-action {
  border: 1px solid var(--line-dark);
  background: transparent;
}

.primary-action {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.messages-dialog {
  width: min(1040px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  margin: auto;
}

.messages-sheet {
  padding: 28px;
  border-radius: 19px;
  background: var(--surface);
  box-shadow: 0 35px 90px rgba(0, 0, 0, .28);
}

.mail-layout {
  min-height: 500px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}

.mail-list {
  padding: 9px 15px;
  border-right: 1px solid var(--line);
  background: #f7f5f1;
}

.mail-row {
  padding: 16px 9px;
}

.mail-row.active {
  margin: 0 -7px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(32, 26, 18, .07);
}

.mail-thread {
  padding: 28px;
}

.thread-subject {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.thread-label {
  color: var(--gold-dark);
  font: 600 8px/1 var(--mono);
  letter-spacing: .10em;
  text-transform: uppercase;
}

.thread-subject h3 {
  margin: 8px 0 4px;
  font-size: 22px;
}

.thread-subject p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.thread-entry {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.thread-entry.reply {
  margin: 0 -28px;
  padding: 20px 28px;
  background: #fbf8f0;
}

.thread-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.thread-meta strong {
  font-size: 12px;
}

.thread-meta time {
  color: var(--ink-faint);
  font: 500 8px/1.4 var(--mono);
}

.thread-entry p {
  margin: 10px 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.thread-attachment {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: 500 8px/1 var(--mono);
}

.thread-reply {
  min-height: 41px;
  margin-top: 20px;
  padding: 0 15px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: 600 9px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  min-width: min(360px, calc(100vw - 30px));
  padding: 13px 17px;
  border-radius: 10px;
  background: #191612;
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  font-size: 12px;
  transition: opacity .2s, transform .2s;
}

.toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (min-width: 1161px) and (max-width: 1380px) {
  .network-topbar {
    grid-template-columns: 1fr auto;
  }

  .network-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .network-mobile-nav {
    position: fixed;
    z-index: 95;
    top: 84px;
    left: 0;
    right: 0;
    display: grid;
    padding: 10px 22px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: rgba(22, 18, 14, .985);
    color: #fff;
    transform: translateY(-120%);
    transition: transform .2s ease;
  }

  .network-mobile-nav.open {
    transform: translateY(0);
  }

  .network-mobile-nav a,
  .network-mobile-nav button {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: transparent;
    color: rgba(255, 255, 255, .75);
    font: 500 10px/1 var(--mono);
    letter-spacing: .10em;
    text-align: left;
    text-transform: uppercase;
  }
}

@media (max-width: 1160px) {
  .network-topbar {
    grid-template-columns: 1fr auto;
  }

  .network-nav {
    display: none;
  }

  .network-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
  }

  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .availability-filter {
    min-width: 0;
  }

  .network-side {
    padding-top: 104px;
  }

  .mobile-menu-button {
    display: block;
  }

  .network-mobile-nav {
    position: fixed;
    z-index: 95;
    top: 84px;
    left: 0;
    right: 0;
    display: grid;
    padding: 10px 22px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: rgba(22, 18, 14, .985);
    color: #fff;
    transform: translateY(-120%);
    transition: transform .2s ease;
  }

  .network-mobile-nav.open {
    transform: translateY(0);
  }

  .network-mobile-nav a,
  .network-mobile-nav button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 45px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: transparent;
    color: rgba(255, 255, 255, .75);
    font: 500 10px/1 var(--mono);
    letter-spacing: .10em;
    text-transform: uppercase;
    text-align: left;
  }
}

@media (max-width: 880px) {
  .network-shell {
    display: flex;
    flex-direction: column;
    padding-top: 31px;
  }

  .network-side {
    display: contents;
  }

  .specialists-panel {
    order: 2;
  }

  .requests-preview {
    margin-top: 0;
  }

  .directory {
    display: contents;
  }

  .directory-heading,
  .search-panel { order: 1; }
  .directory-heading { order: 0; }
  .results-toolbar { order: 3; }
  .profile-list,
  .empty-state { order: 4; }

  .profile-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .profile-photo {
    width: 88px;
    height: 96px;
  }

  .profile-actions {
    grid-column: 1 / -1;
    width: auto;
    grid-template-columns: repeat(3, 1fr);
  }

  .requests-preview {
    order: 5;
  }

  .mail-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .network-topbar {
    height: 68px;
    padding: 0 15px;
  }

  .network-brand img {
    height: 28px;
  }

  .network-brand > span,
  .header-button {
    display: none;
  }

  .network-mobile-nav {
    top: 68px;
  }

  .network-shell {
    gap: 20px;
    padding: 19px 14px 55px;
  }

  .specialists-panel {
    padding: 15px;
  }

  .specialists-panel h2 {
    max-width: none;
    font-size: 19px;
  }

  .specialists-intro {
    display: none;
  }

  .specialist-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin: 12px 0 0;
    padding: 0;
  }

  .specialist-list button {
    min-width: 0;
    min-height: 68px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 7px 3px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 9px;
    background: rgba(255, 255, 255, .025);
    text-align: center;
  }

  .specialist-list strong {
    font-size: 10px;
  }

  .specialist-list small {
    display: none;
  }

  .specialist-list .arrow {
    display: none;
  }

  .specialist-code {
    width: 29px;
    height: 29px;
    border-radius: 8px;
  }

  .directory-heading {
    min-height: 0;
    display: block;
    margin: 7px 2px 19px;
  }

  .directory-heading h1 {
    font-size: 39px;
  }

  .directory-heading-side {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 13px;
  }

  .data-note {
    width: 100%;
    max-width: none;
    font-size: 7px;
  }

  .search-panel {
    padding: 10px;
    border-radius: 14px;
  }

  .main-search {
    min-height: 55px;
    padding: 0 16px;
  }

  .main-search input {
    font-size: 15px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .filter-field,
  .availability-filter {
    min-height: 57px;
  }

  .results-toolbar {
    min-height: 57px;
  }

  .results-toolbar label span {
    display: none;
  }

  .profile-card {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 13px;
    padding: 15px;
    border-radius: 13px;
  }

  .profile-photo {
    width: 70px;
    height: 78px;
    border-radius: 9px;
  }

  .profile-topline {
    align-items: flex-start;
  }

  .profile-topline h2 {
    width: 100%;
    font-size: 17px;
  }

  .profile-role {
    font-size: 12px;
  }

  .profile-summary {
    grid-column: 1 / -1;
    margin-top: 13px;
  }

  .taxonomy-pills {
    grid-column: 1 / -1;
  }

  .taxonomy-pill {
    min-height: 29px;
    padding: 0 10px 0 8px;
    font-size: 9px;
  }

  .profile-actions {
    grid-template-columns: 1fr 1fr;
  }

  .profile-actions .profile-action-book {
    grid-column: 1 / -1;
  }

  .requests-preview {
    padding: 18px;
  }

  .message-sheet,
  .messages-sheet {
    padding: 19px;
    border-radius: 15px;
  }

  .message-dialog,
  .messages-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100svh - 18px);
  }

  .message-actions button {
    flex: 1;
    padding: 0 10px;
  }

  .mail-layout {
    display: block;
    min-height: 0;
  }

  .mail-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mail-row:not(.active) {
    display: none;
  }

  .mail-thread {
    padding: 18px;
  }

  .thread-entry.reply {
    margin: 0 -18px;
    padding: 20px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
