:root {
  --ink: #122033;
  --muted: #4d5d70;
  --subtle: #6d7b8c;
  --line: #d8e1e8;
  --line-strong: #b9c7d3;
  --page: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef5f7;
  --brand: #0a625f;
  --brand-strong: #073f3d;
  --brand-soft: #dff4f1;
  --gold: #b76600;
  --gold-soft: #fff3d8;
  --danger: #9f1239;
  --danger-soft: #fff1f3;
  --success: #11633f;
  --success-soft: #e4f7ed;
  --max: 1240px;
  --shadow: 0 14px 34px rgba(18, 32, 51, 0.08);
  --shadow-soft: 0 8px 20px rgba(18, 32, 51, 0.06);
  --radius: 8px;
  --radius-sm: 6px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body.is-nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

a:hover {
  color: var(--brand);
}

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

::selection {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  max-width: 860px;
}

.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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-140%);
  color: #ffffff;
  background: var(--brand-strong);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  min-height: 48px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-radius: var(--radius);
  font-weight: 900;
}

.brand span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

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

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: #354255;
  text-decoration: none;
  font-weight: 750;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--brand-strong);
  background: var(--surface-soft);
}

.nav-link.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 999px;
}

main:focus {
  outline: none;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  margin-bottom: var(--space-4);
  font-size: 4rem;
  font-weight: 860;
}

h2 {
  margin-bottom: var(--space-3);
  font-size: 1.8rem;
  font-weight: 820;
}

h3 {
  margin-bottom: var(--space-2);
  font-size: 1.18rem;
  font-weight: 810;
}

p {
  margin-top: 0;
}

.lead,
.hero-copy {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-copy {
  max-width: 780px;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-2);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-hero,
.profile-hero {
  background: #eef5f7;
}

.search-hero {
  padding: 68px 0 80px;
}

.hero-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: end;
  gap: var(--space-10);
}

.hero-copy-block {
  max-width: 820px;
}

.hero-actions,
.button-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.trust-strip,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
}

.trust-strip div,
.stats-grid div {
  min-height: 112px;
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(216, 225, 232, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.trust-strip dt,
.stats-grid dt {
  color: var(--brand-strong);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.trust-strip dd,
.stats-grid dd {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.search-section {
  position: relative;
  z-index: 2;
  margin-top: -42px;
}

.filter-panel,
.content-card,
.auth-card,
.form-section,
.profile-contact,
.state-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-panel {
  padding: var(--space-6);
}

.filter-heading,
.results-header,
.admin-heading,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.filter-heading h2,
.results-header h2,
.admin-heading h1,
.section-heading h2 {
  margin-bottom: 0;
}

.section-heading p,
.results-header p,
.admin-heading p {
  margin: var(--space-2) 0 0;
  color: var(--muted);
}

.filter-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-4);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-wide {
  grid-column: span 2;
}

.field span {
  color: #314054;
  font-size: 0.88rem;
  font-weight: 780;
}

.field em {
  color: var(--danger);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #c7d2dc;
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(10, 98, 95, 0.14);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(159, 18, 57, 0.12);
}

.field-error {
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 700;
}

.advanced-filter-set {
  margin-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.advanced-filter-set summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.advanced-filter-set summary::-webkit-details-marker {
  display: none;
}

.advanced-filter-set summary small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.compatibility-feature-label {
  color: var(--brand-strong);
  background: var(--gold-soft);
  border: 1px solid rgba(183, 102, 0, 0.22);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
}

.advanced-filter-set summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
}

.advanced-filter-set[open] summary::after {
  content: "-";
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  padding-top: var(--space-4);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.active-filters > span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.filter-chip,
.tag,
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 820;
  line-height: 1.2;
}

.filter-chip {
  padding: 8px 10px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  text-decoration: none;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  color: var(--brand-strong);
  box-shadow: 0 0 0 3px rgba(10, 98, 95, 0.14);
}

.filter-chip.is-static {
  color: var(--brand-strong);
  cursor: default;
}

.filter-chip.is-static:hover {
  box-shadow: none;
}

.match-pill {
  display: inline-grid;
  grid-template-columns: auto;
  gap: 2px;
  max-width: 100%;
  padding: 10px 13px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(18, 32, 51, 0.06);
}

.match-pill span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.match-pill strong {
  color: var(--brand-strong);
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.similar-summary {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.similar-summary > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.similar-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.similar-summary small {
  color: var(--muted);
  font-weight: 700;
}

.text-link,
.back-link,
.table-action {
  color: var(--brand);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  min-width: 46px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.2;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:focus-visible,
a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(183, 102, 0, 0.45);
  outline-offset: 3px;
}

.button-primary {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 10px 22px rgba(10, 98, 95, 0.22);
}

.button-primary:hover,
.button-primary:focus-visible {
  color: #ffffff;
  background: var(--brand-strong);
}

.button-secondary {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line-strong);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: var(--brand-strong);
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
}

.button-quiet {
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(10, 98, 95, 0.18);
}

.button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}

.button.is-loading::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.results-section,
.profile-content,
.simple-page,
.admin-page,
.state-page {
  padding: var(--space-12) 0;
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-5);
}

.doctor-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.doctor-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.doctor-card-top,
.profile-heading {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  color: var(--brand-strong);
  background:
    linear-gradient(135deg, rgba(10, 98, 95, 0.18), rgba(183, 102, 0, 0.18)),
    var(--brand-soft);
  border: 1px solid rgba(10, 98, 95, 0.15);
  border-radius: var(--radius);
  font-weight: 900;
}

.avatar-large {
  width: 74px;
  height: 74px;
  flex-basis: 74px;
  font-size: 1.3rem;
}

.doctor-type {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.doctor-card h3 {
  margin: 4px 0 5px;
  font-size: 1.32rem;
}

.doctor-card h3 a {
  text-decoration: none;
}

.doctor-card h3 a:hover {
  color: var(--brand);
}

.doctor-card-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.card-badges,
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-badges {
  margin-top: var(--space-4);
}

.status {
  padding: 6px 9px;
}

.status.live {
  color: var(--success);
  background: var(--success-soft);
}

.status.draft {
  color: #53606f;
  background: #edf1f5;
}

.status.spotlight {
  color: #7a4300;
  background: var(--gold-soft);
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: var(--space-5) 0;
}

.identity-grid div {
  min-width: 0;
  padding: 10px 11px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
}

.identity-grid dt,
.compact-details dt,
.details-list dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.identity-grid dd,
.compact-details dd,
.details-list dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.tag {
  padding: 7px 10px;
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.card-summary {
  margin: var(--space-4) 0;
  color: #425167;
}

.meta-list {
  display: grid;
  gap: 9px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.meta-list li {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.meta-list span {
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.meta-list strong {
  color: var(--ink);
  font-weight: 720;
}

.card-actions {
  margin-top: var(--space-5);
}

.empty-state,
.notice-panel {
  padding: var(--space-10);
  text-align: center;
  background: #ffffff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-state h2,
.empty-state h3 {
  margin-bottom: var(--space-2);
}

.empty-state p,
.notice-panel p {
  max-width: 560px;
  margin: 0 auto var(--space-5);
  color: var(--muted);
}

.profile-hero {
  padding: var(--space-12) 0;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: var(--space-8);
  align-items: start;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-5);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.breadcrumb a {
  color: var(--brand);
}

.profile-contact,
.content-card,
.auth-card,
.form-section,
.state-panel {
  padding: var(--space-6);
}

.profile-contact h2 {
  margin-top: var(--space-4);
}

.compact-details,
.details-list dl {
  display: grid;
  gap: 0;
  margin: var(--space-4) 0 0;
}

.compact-details div,
.details-list dl div {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}

.compact-details div:first-child {
  border-top: 1px solid var(--line);
}

.sample-warning {
  margin-top: var(--space-5);
  padding: var(--space-4);
  color: #653900;
  background: var(--gold-soft);
  border: 1px solid rgba(183, 102, 0, 0.24);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: var(--space-5);
  align-items: start;
}

.content-card h3 {
  margin-top: var(--space-5);
}

.content-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.simple-page {
  background: #ffffff;
}

.simple-page h1 {
  font-size: 3.4rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin: var(--space-8) 0;
}

.standards-card {
  margin: var(--space-8) 0;
}

.process-list {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding-left: 1.3rem;
}

.process-list li::marker {
  color: var(--brand);
  font-weight: 900;
}

.auth-page {
  min-height: 70vh;
  display: grid;
  align-items: center;
}

.auth-card {
  max-width: 540px;
  margin: 0 auto;
}

.stack-form,
.editor-form {
  display: grid;
  gap: var(--space-5);
}

.alert {
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
  font-weight: 700;
}

.alert ul {
  margin: var(--space-2) 0 0;
  padding-left: 1.25rem;
}

.alert-error {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(159, 18, 57, 0.18);
}

.alert-success {
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid rgba(17, 99, 63, 0.18);
}

.admin-page {
  min-height: 70vh;
  background: var(--page);
}

.stats-grid {
  margin-bottom: var(--space-5);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto auto;
  align-items: end;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-5);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.table-wrap {
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #fbfcfe;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

td small {
  display: block;
  color: var(--muted);
}

tbody tr:hover {
  background: #fbfdff;
}

.form-section {
  box-shadow: var(--shadow-soft);
}

.compact-section {
  padding-bottom: var(--space-5);
}

.switch-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.switch-list label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.switch-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.form-actions {
  justify-content: flex-start;
}

.state-page {
  min-height: 68vh;
  display: grid;
  align-items: center;
  background: linear-gradient(180deg, #ffffff, var(--page));
}

.state-panel {
  text-align: center;
}

.site-footer {
  padding: var(--space-10) 0;
  color: #d9e3eb;
  background: #142033;
}

.family-footer {
  --footer-bg: #07110f;
  --footer-text: #f3f8f5;
  --footer-muted: #b7c7c3;
  --footer-link: #d8e1de;
  --footer-accent: #9bef7f;
  --footer-line: rgba(155, 239, 127, 0.18);
  padding: 34px 0;
  color: var(--footer-muted);
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-line);
  font-size: 14px;
}

.family-footer__inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.family-footer__brand {
  min-width: 0;
  max-width: 560px;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--footer-muted);
  text-decoration: none;
}

.family-footer__mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: var(--footer-accent);
  background: #0b1a17;
  border: 1px solid rgba(155, 239, 127, 0.46);
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(155, 239, 127, 0.14);
  font-weight: 800;
}

.family-footer__mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.family-footer__copy {
  min-width: 0;
}

.family-footer__title,
.family-footer__description,
.family-footer__copyright {
  display: block;
}

.family-footer__title {
  color: var(--footer-text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-footer__description {
  margin-top: 4px;
  color: var(--footer-muted);
  line-height: 1.45;
}

.family-footer__copyright {
  margin-top: 5px;
  color: var(--footer-muted);
  opacity: 0.78;
  font-size: 12px;
  line-height: 1.45;
}

.family-footer__navigation {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.family-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  font-weight: 700;
}

.family-footer a {
  color: var(--footer-link);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.family-footer a:hover {
  color: var(--footer-accent);
  text-decoration: underline;
}

.family-footer__parent {
  color: var(--footer-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-footer__parent:hover {
  color: var(--footer-accent);
  text-decoration: none;
}

.family-footer a:focus-visible {
  outline: 2px solid var(--footer-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: var(--space-8);
}

.site-footer p {
  margin: var(--space-2) 0 0;
  color: #b9c7d5;
}

.footer-note {
  font-size: 0.94rem;
}

.footer-note nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.footer-note a {
  color: #ffffff;
  font-weight: 800;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1040px) {
  h1 {
    font-size: 3.25rem;
  }

  .hero-stack,
  .profile-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    max-width: 760px;
  }

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

  .admin-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1240px);
  }

  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .js .site-nav {
    position: fixed;
    inset: 64px 12px auto;
    display: grid;
    gap: 4px;
    padding: var(--space-3);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .js body.is-nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    justify-content: flex-start;
    width: 100%;
  }

  .search-hero {
    padding: var(--space-10) 0 72px;
  }

  h1,
  .simple-page h1 {
    font-size: 2.45rem;
  }

  .lead,
  .hero-copy {
    font-size: 1.03rem;
  }

  .trust-strip,
  .stats-grid,
  .info-grid,
  .content-columns {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .content-card,
  .auth-card,
  .form-section,
  .profile-contact,
  .state-panel {
    padding: var(--space-5);
  }

  .filter-heading,
  .results-header,
  .admin-heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-primary,
  .filter-grid,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .filter-primary .button,
  .admin-toolbar .button,
  .form-actions .button {
    width: 100%;
  }

  .doctor-grid {
    grid-template-columns: 1fr;
  }

  .doctor-card:hover {
    transform: none;
  }

  .profile-heading {
    align-items: center;
  }

  .identity-grid {
    grid-template-columns: 1fr;
  }

  .empty-state,
  .notice-panel {
    padding: var(--space-6);
    text-align: left;
  }

  .empty-state .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: var(--space-4);
  }

  tr {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }

  td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    border-bottom: 1px solid var(--line);
  }

  td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  td:last-child {
    border-bottom: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .family-footer {
    padding: 28px 0;
  }

  .family-footer__inner {
    width: calc(100% - 28px);
    align-items: flex-start;
    flex-direction: column;
  }

  .family-footer__brand {
    align-items: flex-start;
  }

  .family-footer__links {
    justify-content: flex-start;
  }

  .family-footer__navigation {
    justify-items: start;
  }
}

@media (max-width: 460px) {
  .container {
    width: min(100% - 20px, 1240px);
  }

  h1,
  .simple-page h1 {
    font-size: 2.1rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .hero-actions,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .brand small {
    display: none;
  }

  .doctor-card-top {
    align-items: center;
  }
}

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