:root {
  --navy: #0d2b4a;
  --navy-light: #1a4570;
  --teal: #0e8a8a;
  --teal-bright: #14b8b8;
  --cream: #f7f5f0;
  --white: #ffffff;
  --gold: #d4a017;
  --text: #1e2933;
  --muted: #5c6b7a;
  --border: #d8dee6;
  --ring-bg: #fff8e6;
  --shadow: 0 4px 24px rgba(13, 43, 74, 0.1);
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 1.5rem 1rem 1.25rem;
  border-bottom: 4px solid var(--gold);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-icon {
  font-size: 2.75rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.site-header h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  color: var(--teal-bright);
  font-weight: 500;
}

.disclaimer-banner {
  margin: 1rem 0 0;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
}

.main {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  width: 100%;
}

.hero h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--navy);
}

.hero-copy {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

.search-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Mobile-first: single column stack */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ring-range {
  display: flex;
  gap: 0.65rem;
}

.ring-range .field {
  flex: 1;
}

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.btn-search {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  background: var(--cream);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 138, 138, 0.2);
}

.btn-search:hover {
  background: var(--navy-light);
}

.btn-search:active {
  transform: scale(0.98);
}

.search-hint {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.results-section {
  margin-top: 2rem;
}

.results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.results-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--navy);
}

.results-count {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.results-status {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.results-status.error {
  color: #9b2c2c;
  border-color: #f5c6c6;
  background: #fff5f5;
}

.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.doctor-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.25rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
}

.ring-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.75rem 0.5rem;
  background: var(--ring-bg);
  border: 2px solid var(--gold);
  border-radius: 50%;
  aspect-ratio: 1;
  text-align: center;
}

.ring-size {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.ring-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.15rem;
}

.doctor-info h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: var(--navy);
}

.doctor-city {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--teal);
  font-weight: 600;
}

.doctor-city::before {
  content: "📍 ";
}

.doctor-quote {
  margin: 0;
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  border-left: 3px solid var(--teal-bright);
  padding-left: 0.75rem;
}

.testimonial-section {
  margin-top: 3rem;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

.testimonial-band {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 55%, #0e6b6b 100%);
  border-top: 4px solid var(--gold);
  border-bottom: 4px solid var(--gold);
  padding: 2.5rem 1.25rem 3rem;
  box-shadow: 0 -8px 32px rgba(13, 43, 74, 0.12);
}

.testimonial-inner {
  max-width: 960px;
  margin: 0 auto;
}

.testimonial-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.testimonial-section h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

.testimonial-lead {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  font-size: 1.05rem;
  color: var(--teal-bright);
  font-weight: 500;
}

.testimonial-card {
  position: relative;
  margin: 0;
  padding: 2rem 1.75rem 1.75rem;
  background: var(--white);
  border-radius: calc(var(--radius) + 2px);
  border: 2px solid var(--gold);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.testimonial-mark {
  position: absolute;
  top: 0.15rem;
  left: 1.1rem;
  font-size: 5rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--gold);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.testimonial-quote {
  position: relative;
  margin: 0;
  z-index: 1;
}

.testimonial-pull {
  margin: 0 0 1.25rem !important;
  padding: 1rem 1.1rem;
  background: var(--ring-bg);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-size: 1.15rem !important;
  font-weight: 700;
  line-height: 1.45 !important;
  color: var(--navy) !important;
}

.testimonial-quote p {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.testimonial-quote p:last-child {
  margin-bottom: 0;
}

.testimonial-author {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--border);
}

.testimonial-author-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.testimonial-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy);
}

.testimonial-meta {
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 1.5rem 1rem;
  font-size: 0.88rem;
  text-align: center;
}

.site-footer p {
  margin: 0 0 0.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.footer-fine {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-bottom: 0 !important;
}

.error-page {
  text-align: center;
  padding-top: 4rem;
}

.error-page h2 {
  color: var(--navy);
  font-size: 1.75rem;
}

.error-page .btn-search {
  display: inline-block;
  text-decoration: none;
  margin-top: 1rem;
}

/* Desktop: single row */
@media (min-width: 641px) {
  .search-panel {
    padding: 1.25rem 1.5rem;
  }

  .search-form {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.75rem;
  }

  .search-form > .field {
    flex: 1 1 auto;
  }

  .ring-range {
    flex: 0 0 auto;
    gap: 0.75rem;
  }

  .ring-range .field {
    width: 7rem;
    flex: 0 0 7rem;
  }

  .btn-search {
    flex: 0 0 auto;
    width: auto;
    padding: 0.65rem 1.5rem;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .main {
    padding: 1rem 0.75rem 2rem;
  }

  .site-header {
    padding: 1rem 0.75rem;
  }

  .site-header h1 {
    font-size: 1.45rem;
  }

  .logo-icon {
    font-size: 2rem;
  }

  .disclaimer-banner {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .hero h2 {
    font-size: 1.2rem;
  }

  .hero-copy {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .search-panel {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
  }

  .search-hint {
    margin-top: 0.55rem;
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .results-section {
    margin-top: 1.25rem;
  }

  .results-status {
    padding: 1.25rem 0.85rem;
    font-size: 0.9rem;
  }

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

  .ring-badge {
    width: 64px;
    min-width: 64px;
    margin: 0 auto;
    padding: 0.5rem;
  }

  .ring-size {
    font-size: 1.15rem;
  }

  .testimonial-band {
    padding: 2rem 1rem 2.5rem;
  }

  .testimonial-card {
    padding: 1.75rem 1.25rem 1.25rem;
  }

  .testimonial-mark {
    font-size: 3.5rem;
    left: 0.75rem;
  }

  .testimonial-pull {
    font-size: 1.05rem !important;
  }
}
