/* Alderwell Sprint 017 — Professional Presence & Client Trust */

.s17-client-entry {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
}

.s17-client-entry--profile {
  margin: 18px 0 0;
}

.s17-section-heading h3,
.s17-profile-section h3 {
  margin: 4px 0 0;
  color: var(--ink, #29364a);
  font-family: var(--serif, Georgia, serif);
  font-weight: 500;
}

.s17-connected-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(var(--antique-brass-rgb), 0.38);
  border-top: 3px solid rgba(var(--moss-rgb), 0.72);
  border-radius: var(--card-radius, 18px);
  background: linear-gradient(145deg, rgba(var(--sage-rgb), 0.18), rgba(var(--warm-ivory-rgb), 0.9) 54%, rgba(255, 255, 255, 0.92));
  box-shadow: 0 14px 34px rgba(45, 52, 43, 0.1);
}

.s17-connected-card--compact {
  margin-top: 14px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(var(--sage-rgb), 0.16), rgba(var(--warm-ivory-rgb), 0.92));
  box-shadow: 0 10px 24px rgba(45, 52, 43, 0.07);
}

.s17-connected-card__identity {
  min-width: 0;
}

.s17-connected-card h3,
.s17-connected-card p {
  margin: 0;
}

.s17-connected-card h3 {
  margin: 2px 0 4px;
  color: var(--ink, #29364a);
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.s17-kicker {
  color: var(--moss, #657057);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.s17-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(var(--antique-brass-rgb), 0.55);
  border-radius: 50%;
  background: rgba(var(--sage-rgb), 0.22);
  color: var(--ink, #29364a);
  font-weight: 700;
}

.s17-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s17-avatar--small { width: 48px; height: 48px; }
.s17-avatar--medium { width: 66px; height: 66px; }
.s17-avatar--large { width: 112px; height: 112px; font-size: 1.75rem; }

.s17-overlay {
  position: fixed;
  z-index: 1600;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(35, 43, 52, 0.54);
  backdrop-filter: blur(6px);
}

.s17-dialog {
  width: min(960px, 100%);
  max-height: min(90vh, 940px);
  overflow: hidden;
  border: 1px solid rgba(var(--stone-rgb), 0.62);
  border-radius: 24px;
  background: linear-gradient(180deg, #fffdf8, #f8f1e5);
  box-shadow: 0 24px 70px rgba(33, 37, 42, 0.28);
}

.s17-dialog__header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(var(--stone-rgb), 0.45);
  background: rgba(255, 253, 248, 0.97);
}

.s17-dialog__header h2 {
  margin: 0;
  color: var(--ink, #29364a);
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 500;
}

.s17-dialog__close {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(var(--stone-rgb), 0.42);
  border-radius: 50%;
  background: rgba(var(--warm-ivory-rgb), 0.82);
  color: var(--ink, #29364a);
  font-size: 1.4rem;
}

.s17-dialog__body {
  max-height: calc(min(90vh, 940px) - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 4vw, 42px);
}

.s17-client-profile {
  display: grid;
  gap: 22px;
}

.s17-profile-overview,
.s17-profile-section {
  border: 1px solid rgba(var(--antique-brass-rgb), 0.34);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 16px 38px rgba(45, 52, 43, 0.07);
}

.s17-profile-overview {
  padding: clamp(24px, 4vw, 38px);
  border-top: 4px solid rgba(var(--moss-rgb), 0.74);
  background: linear-gradient(155deg, rgba(var(--sage-rgb), 0.16), rgba(255, 253, 249, 0.97) 48%, rgba(var(--warm-ivory-rgb), 0.78));
}

.s17-profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0;
}

.s17-profile-hero h3 {
  margin: 4px 0 6px;
  color: var(--ink, #29364a);
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
}

.s17-profile-hero p { margin: 0; }

.s17-profile-identity {
  min-width: 0;
}

.s17-verified-badge {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 11px;
  border: 1px solid rgba(var(--moss-rgb), 0.62);
  border-radius: 999px;
  background: rgba(var(--sage-rgb), 0.16);
  color: var(--moss, #657057);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.s17-profile-bio {
  max-width: 780px;
  margin: 26px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(var(--stone-rgb), 0.42);
  color: var(--ink, #29364a);
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.65;
}

.s17-profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 26px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(var(--stone-rgb), 0.42);
}

.s17-profile-facts div {
  min-width: 0;
  padding: 2px 22px;
  border-left: 1px solid rgba(var(--stone-rgb), 0.42);
}

.s17-profile-facts div:first-child {
  padding-left: 0;
  border-left: 0;
}

.s17-profile-facts dt {
  margin-bottom: 8px;
  color: var(--moss, #657057);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.s17-profile-facts dd { margin: 0; color: var(--ink, #29364a); }
.s17-profile-facts dd.s17-muted-value { color: rgba(var(--ink-rgb), 0.58); font-style: italic; }
.s17-contact-links { display: flex; flex-wrap: wrap; gap: 10px; }
.s17-contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(var(--moss-rgb), 0.42);
  border-radius: 999px;
  background: rgba(var(--warm-ivory-rgb), 0.78);
  color: var(--moss, #657057);
  font-weight: 700;
  text-decoration: none;
}

.s17-contact-links a:hover,
.s17-contact-links a:focus-visible {
  border-color: rgba(var(--moss-rgb), 0.72);
  background: rgba(var(--sage-rgb), 0.18);
}

.s17-profile-section {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 3.5vw, 32px);
}

.s17-profile-section--resources {
  border-top: 4px solid rgba(var(--antique-brass-rgb), 0.68);
  background: linear-gradient(150deg, rgba(var(--honey-sunset-rgb), 0.15), rgba(255, 253, 249, 0.97) 58%);
}

.s17-profile-section--experiences {
  border-top: 4px solid rgba(var(--sage-rgb), 0.66);
  background: linear-gradient(150deg, rgba(var(--sage-rgb), 0.12), rgba(255, 253, 249, 0.97) 60%);
}

.s17-resource-grid,
.s17-testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.s17-resource-card,
.s17-testimonial-card,
.s17-review-card {
  margin: 0;
  padding: 20px;
  border: 1px solid rgba(var(--stone-rgb), 0.5);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(var(--warm-ivory-rgb), 0.82), rgba(255, 255, 255, 0.92));
}

.s17-resource-card {
  border-left: 3px solid rgba(var(--antique-brass-rgb), 0.52);
}

.s17-testimonial-card {
  border-left: 3px solid rgba(var(--sage-rgb), 0.66);
  background: rgba(var(--sage-rgb), 0.1);
}

.s17-resource-card h4 { margin: 4px 0 8px; color: var(--ink, #29364a); font-family: var(--serif, Georgia, serif); font-size: 1.2rem; }
.s17-resource-card p { margin: 0 0 14px; }
.s17-resource-card details { margin-top: 12px; }
.s17-resource-card summary { color: var(--moss, #657057); cursor: pointer; font-weight: 700; }
.s17-resource-card details p { margin-top: 10px; white-space: pre-line; }

.s17-testimonial-card p {
  margin: 0 0 12px;
  color: var(--ink, #29364a);
  font-family: var(--serif, Georgia, serif);
  font-size: 1.08rem;
  line-height: 1.55;
}

.s17-testimonial-card footer { color: var(--moss, #657057); font-weight: 700; }
.s17-testimonial-submit { border-color: rgba(var(--antique-brass-rgb), 0.5); background: linear-gradient(145deg, rgba(var(--honey-sunset-rgb), 0.12), rgba(255, 253, 249, 0.96)); }
.s17-status-note,
.s17-empty-copy { color: rgba(var(--ink-rgb), 0.72); }

.s17-empty-copy {
  margin: 0;
  padding: 18px 20px;
  border-left: 3px solid rgba(var(--antique-brass-rgb), 0.48);
  border-radius: 0 12px 12px 0;
  background: rgba(var(--warm-ivory-rgb), 0.62);
  line-height: 1.55;
}

.s17-form {
  display: grid;
  gap: 18px;
}

.s17-form label {
  display: grid;
  gap: 8px;
  color: var(--ink, #29364a);
  font-weight: 700;
}

.s17-form input,
.s17-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(var(--stone-rgb), 0.68);
  border-radius: 14px;
  background: rgba(var(--warm-ivory-rgb), 0.9);
  color: var(--ink, #29364a);
  font: inherit;
}

.s17-form textarea { min-height: 132px; resize: vertical; }
.s17-form-status { min-height: 1.4em; margin: 0; }
.s17-form-status.is-error { color: #9f503c; }
.s17-form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.s17-consent {
  grid-template-columns: auto 1fr !important;
  align-items: start;
  font-weight: 400 !important;
}

.s17-consent input { width: 22px; height: 22px; margin-top: 2px; }

.s17-trust-note {
  padding: 18px 20px;
  border-left: 3px solid var(--antique-brass, #b28b4e);
  background: rgba(var(--honey-sunset-rgb), 0.16);
}

.s17-trust-note strong { display: block; margin-bottom: 6px; }
.s17-trust-note p { margin: 0; }

.s17-professional-panel { margin: 24px 0; }
.s17-professional-testimonials { display: grid; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(var(--stone-rgb), 0.45); }
.s17-review-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.s17-review-card p { margin: 8px 0; }
.s17-review-card small { color: rgba(var(--ink-rgb), 0.64); text-transform: capitalize; }

@media (max-width: 720px) {
  .s17-connected-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .s17-connected-card .s17-view-profile {
    grid-column: 1 / -1;
    width: 100%;
  }

  .s17-overlay {
    align-items: end;
    padding: 0;
  }

  .s17-dialog {
    width: 100%;
    max-height: calc(100dvh - 18px);
    border-radius: 22px 22px 0 0;
  }

  .s17-dialog__header {
    padding: 15px 18px;
    border-bottom-color: rgba(var(--antique-brass-rgb), 0.36);
    background: linear-gradient(100deg, rgba(var(--sage-rgb), 0.13), rgba(255, 253, 248, 0.98) 46%, rgba(var(--warm-ivory-rgb), 0.92));
  }

  .s17-dialog__body {
    max-height: calc(100dvh - 92px);
    padding: 18px;
    padding-bottom: max(34px, env(safe-area-inset-bottom));
  }

  .s17-profile-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .s17-avatar--large { width: 92px; height: 92px; }
  .s17-profile-facts,
  .s17-resource-grid,
  .s17-testimonial-grid,
  .s17-form-actions { grid-template-columns: 1fr; }
  .s17-review-card { display: grid; }

  .s17-profile-overview,
  .s17-profile-section {
    border-radius: 18px;
  }

  .s17-profile-overview {
    padding: 26px 22px;
  }

  .s17-profile-section {
    padding: 24px 22px;
  }

  .s17-profile-facts {
    gap: 16px;
  }

  .s17-profile-facts div,
  .s17-profile-facts div:first-child {
    padding: 0 0 16px;
    border-left: 0;
    border-bottom: 1px solid rgba(var(--stone-rgb), 0.36);
  }

  .s17-profile-facts div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .s17-overlay, .s17-dialog { scroll-behavior: auto; }
}
