:root {
  --ink: #10243f;
  --muted: #65758a;
  --line: #d9e3ee;
  --paper: #f4f8fc;
  --white: #ffffff;
  --blue: #195fba;
  --blue-dark: #0d3975;
  --red: #c92f3d;
  --red-soft: #fdecee;
  --navy: #09213f;
  --cyan: #e7f4ff;
  --green: #2f7b59;
  --shadow: 0 18px 46px rgba(16, 36, 63, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 11px clamp(14px, 3vw, 42px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  width: 100%;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue) 58%, var(--red));
  color: var(--white);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.brand small {
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 900;
}

.main-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  min-width: 0;
}

.main-nav a {
  padding: 5px 0;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--blue-dark);
}

.anonamed-link {
  padding: 6px 10px !important;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white) !important;
  font-size: 0.82rem;
}

.directory-shell {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  min-height: calc(100vh - 66px);
}

.filters-panel {
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  overflow: auto;
  padding: clamp(18px, 3vw, 32px);
  background: var(--white);
  border-right: 1px solid var(--line);
}

.panel-heading {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: normal;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 5vw, 4.1rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.8rem);
}

h3 {
  font-size: 1rem;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.field span,
.sort-field span,
.mini-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(25, 95, 186, 0.14);
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-group,
.check-columns {
  display: grid;
  gap: 10px;
}

.checkbox-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 6px 0 20px;
}

.check-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

label:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.94rem;
}

input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 0;
  accent-color: var(--blue);
  flex: 0 0 auto;
  margin-top: 2px;
}

.filter-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 36, 63, 0.12);
}

.directory-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.directory-stats div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.directory-stats strong,
.directory-stats span {
  display: block;
}

.directory-stats strong {
  font-size: 1.3rem;
  line-height: 1;
}

.directory-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.results-panel {
  padding: clamp(18px, 3vw, 34px);
}

.results-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.sort-field {
  display: grid;
  gap: 7px;
  min-width: 210px;
}

.results-list {
  display: grid;
  gap: 14px;
}

.profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 25px rgba(16, 36, 63, 0.08);
}

.profile-card.pending {
  border-left-color: var(--red);
}

.profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-title h3 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.profile-title p,
.profile-meta,
.profile-summary,
.fee-list,
.case-list {
  color: var(--muted);
}

.badge-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row {
  margin-top: 12px;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 850;
}

.badge {
  background: var(--cyan);
  color: var(--blue-dark);
}

.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.tag {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  margin: 12px 0;
  font-size: 0.92rem;
}

.profile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-meta svg {
  width: 15px;
  height: 15px;
}

.profile-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.side-box {
  padding: 12px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.side-box strong {
  display: block;
  color: var(--navy);
  margin-bottom: 6px;
}

.fee-list,
.case-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-actions .icon-button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.empty-state {
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  text-align: center;
}

.map-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(28px, 5vw, 52px);
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.map-band.top-map {
  min-height: calc(100vh - 66px);
  align-items: center;
}

.map-copy {
  min-width: 0;
}

.map-copy h1,
.map-copy h2,
.map-copy p {
  color: var(--white);
}

.map-copy p {
  color: rgba(255, 255, 255, 0.76);
}

.map-frame {
  min-height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  overflow: hidden;
  background: #06162b;
}

.map-fallback {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(220px, 1fr);
  gap: 22px;
  align-items: center;
  padding: clamp(16px, 3vw, 26px);
  background: linear-gradient(135deg, #ffffff, #e9f4ff);
  color: var(--ink);
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-illustration {
  position: relative;
  min-height: 210px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(25, 95, 186, 0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(25, 95, 186, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 26% 42%, rgba(201, 47, 61, 0.24), transparent 9%),
    radial-gradient(circle at 68% 35%, rgba(25, 95, 186, 0.26), transparent 10%),
    radial-gradient(circle at 48% 68%, rgba(47, 123, 89, 0.18), transparent 12%),
    #f7fbff;
  background-size: 28px 28px, 28px 28px, auto, auto, auto, auto;
  border: 1px solid var(--line);
}

.map-illustration::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 2px solid rgba(13, 57, 117, 0.16);
  border-radius: 50%;
}

.map-pin {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid var(--white);
  border-radius: 50% 50% 50% 0;
  background: var(--red);
  box-shadow: 0 8px 18px rgba(16, 36, 63, 0.16);
  transform: rotate(-45deg);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--white);
}

.pin-one {
  left: 24%;
  top: 38%;
}

.pin-two {
  right: 28%;
  top: 30%;
  background: var(--blue);
}

.pin-three {
  left: 49%;
  bottom: 26%;
  background: var(--green);
}

.map-frame iframe {
  width: 100%;
  min-height: 340px;
  border: 0;
  display: none;
  background: var(--white);
}

.map-frame.live-map iframe {
  display: block;
}

.taxonomy-section,
.procedure-section,
.join-section,
.language-section {
  padding: clamp(46px, 7vw, 86px) clamp(18px, 5vw, 58px);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 24px;
}

.specialty-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.specialty-card,
.form-section,
.language-tools {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(16, 36, 63, 0.07);
}

.specialty-card {
  padding: 17px;
}

.specialty-card h3 {
  margin-bottom: 9px;
}

.specialty-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.procedure-section {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.procedure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.procedure-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.procedure-panel.echo-panel {
  grid-column: 1 / -1;
  grid-template-columns: minmax(250px, 0.36fr) minmax(0, 1fr);
}

.procedure-panel.compact {
  min-height: 300px;
}

.procedure-panel img,
.procedure-video {
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: 430px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
}

.procedure-video {
  background: #05080d;
}

.procedure-panel h3 {
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.procedure-panel p {
  color: var(--muted);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tech-list span {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 850;
}

.join-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.36fr) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 54px);
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.join-copy {
  position: sticky;
  top: 92px;
  align-self: start;
}

.profile-form {
  display: grid;
  gap: 16px;
}

.form-section {
  padding: clamp(18px, 3vw, 26px);
}

.form-section h3 {
  margin-bottom: 16px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.form-status {
  min-height: 24px;
  color: var(--green);
  font-weight: 800;
}

.language-tools {
  display: grid;
  grid-template-columns: minmax(230px, 0.28fr) minmax(0, 1fr) minmax(220px, 0.28fr);
  gap: 18px;
  align-items: start;
  padding: 20px;
}

.language-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.language-chips a,
.language-chips span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px clamp(18px, 5vw, 58px);
  background: var(--navy);
  color: var(--white);
}

.site-footer p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
}

.footer-links a {
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .directory-shell,
  .map-band,
  .join-section,
  .language-tools {
    grid-template-columns: 1fr;
  }

  .filters-panel,
  .join-copy {
    position: static;
    height: auto;
  }

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

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

  .procedure-grid,
  .procedure-panel,
  .procedure-panel.echo-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 10px;
    overflow: hidden;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 0.9rem;
  }

  .main-nav {
    justify-content: flex-start;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: 0.82rem;
    gap: 4px 10px;
    padding-bottom: 4px;
  }

  .main-nav a:nth-of-type(5),
  .main-nav a:nth-of-type(6),
  .main-nav a:nth-of-type(7),
  .main-nav a:nth-of-type(8) {
    display: none;
  }

  .anonamed-link {
    padding: 5px 8px !important;
  }

  .field-grid.two,
  .field-grid.three,
  .check-columns,
  .case-grid,
  .checkbox-group,
  .profile-card,
  .specialty-grid {
    grid-template-columns: 1fr;
  }

  .results-toolbar,
  .profile-top,
  .site-footer {
    display: grid;
  }

  .sort-field {
    min-width: 0;
  }

  .taxonomy-section,
  .procedure-section,
  .join-section,
  .language-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .procedure-panel {
    padding: 14px;
  }

  .procedure-panel img,
  .procedure-video {
    min-height: 230px;
    max-height: 330px;
  }

  .map-band {
    padding: 28px 16px;
  }

  .map-band.top-map {
    min-height: auto;
  }

  .map-copy h1 {
    font-size: 1.55rem;
    line-height: 1.13;
  }

  .panel-heading h1,
  .results-toolbar h2 {
    font-size: 1.55rem;
  }

  .map-fallback {
    grid-template-columns: 1fr;
  }

  .map-frame {
    min-height: 340px;
  }

  .map-frame iframe {
    min-height: 240px;
  }
}
