/* Philadelphia Sleep Directory */

:root {
  --ink: #161d3b;
  --muted: #5a6280;
  --line: #e2e5f0;
  --bg: #f5f6fb;
  --card: #ffffff;
  --brand: #2436a5;
  --brand-dark: #1a2780;
  --brand-soft: #eef0fb;
  --hero-a: #141d4d;
  --hero-b: #2c3f9e;
  --ok: #17603a;
  --ok-bg: #e6f4ec;
  --kid: #934600;
  --kid-bg: #fff1e0;
  --radius: 14px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

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

:focus-visible {
  outline: 3px solid #7c93ff;
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.no-map .map-wrap,
.no-map .map-small {
  display: none;
}

.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: absolute;
  top: -64px;
  left: 12px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

/* ---------------------------------------------------------- header, footer */

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

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 8px 24px;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand svg {
  color: var(--brand);
  flex: none;
}

.site-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}

.site-nav a:hover {
  background: var(--bg);
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 720px) {
  .site-header-inner {
    flex-wrap: wrap;
    padding: 8px 0;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
  }
}

.site-footer {
  background: #0f1633;
  color: #c7cdea;
}

.site-footer-inner {
  display: grid;
  gap: 24px;
  padding: 36px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
}

.footer-note {
  max-width: 64ch;
  margin-top: 10px;
  font-size: 13.5px;
  color: #a9b2d6;
}

.footer-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-nav a {
  color: #c7cdea;
  text-decoration: none;
  font-size: 14.5px;
}

.footer-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

@media (min-width: 760px) {
  .site-footer-inner {
    grid-template-columns: 3fr 2fr;
  }
}

/* ----------------------------------------------------------------- shared */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-accred {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge-pediatric {
  background: var(--kid-bg);
  color: var(--kid);
}

.badge-distance {
  background: var(--brand-soft);
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--kid-bg);
  color: var(--kid);
  font-size: 12px;
  font-weight: 600;
  vertical-align: 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  background: #fff;
  border-color: #c5cdf2;
  color: var(--brand);
}

.btn-secondary:hover {
  border-color: var(--brand);
  background: #f3f5ff;
}

.link-quiet {
  font-size: 14.5px;
  font-weight: 600;
}

.link-arrow {
  font-weight: 600;
  text-decoration: none;
}

.link-arrow::after {
  content: " →";
}

.breadcrumb {
  margin-bottom: 12px;
  font-size: 13.5px;
  color: var(--muted);
}

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

.leaflet-popup-content {
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------ home: hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 44px;
  background: linear-gradient(135deg, var(--hero-a), var(--hero-b) 70%, #3a4fc0);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -60%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 60%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
}

.hero .eyebrow {
  color: #c9d2ff;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero .lead {
  max-width: 62ch;
  margin-top: 14px;
  color: #e4e8ff;
  font-size: 1.0625rem;
}

.search {
  max-width: 560px;
  margin-top: 24px;
}

.search input {
  width: 100%;
  height: 54px;
  padding: 0 18px 0 50px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6280' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 16px center / 22px;
  color: var(--ink);
  font-size: 1rem;
  box-shadow: 0 10px 30px rgba(6, 10, 40, 0.28);
}

.search input::placeholder {
  color: var(--muted);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin-top: 28px;
}

.stats dt {
  font-size: 0.875rem;
  color: #c9d2ff;
}

.stats dd {
  margin: 2px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* -------------------------------------------------------- home: directory */

.directory {
  margin-top: 28px;
}

.notice {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.toolbar {
  position: sticky;
  top: 60px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(22, 29, 59, 0.04);
  scroll-margin-top: 76px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover {
  border-color: #b9c2ee;
}

.chip span {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip[aria-pressed="true"] span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.select-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.field select {
  max-width: 100%;
  min-height: 38px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235a6280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
  appearance: none;
  -webkit-appearance: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.field-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.field-sort {
  margin-left: auto;
}

.directory-layout {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

/* One stacking context for the map, so Leaflet's controls stay under the toolbar. */
.map-wrap {
  position: relative;
  z-index: 1;
  height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #dde3ec;
}

.map {
  width: 100%;
  height: 100%;
}

/* Below the two-column layout the map is collapsed behind a toggle so the
   results stay right under the filters. */
@media (max-width: 1023px) {
  .toolbar {
    position: static;
  }

  .map-wrap {
    display: none;
  }

  body.show-map .map-wrap {
    display: block;
  }
}

@media (max-width: 720px) {
  .toolbar {
    scroll-margin-top: 112px;
  }
}

.result-count {
  margin: 2px 2px 12px;
  font-size: 14px;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 14px;
  scroll-margin-top: 76px;
}

.card {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.card:hover {
  border-color: #b9c2ee;
  box-shadow: 0 8px 24px rgba(22, 29, 59, 0.08);
  transform: translateY(-1px);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}

.card-name {
  flex: 1 1 60%;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card-name a {
  color: var(--ink);
  text-decoration: none;
}

.card-name a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.card-system {
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
}

.card-address {
  margin-top: 12px;
  font-size: 14.5px;
  font-style: normal;
  line-height: 1.5;
}

.card-distance {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
}

.empty {
  padding: 32px 24px;
  border: 1px dashed #b9c2ee;
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
}

.empty h3 {
  font-size: 1.125rem;
}

.empty p {
  margin: 6px 0 16px;
  color: var(--muted);
}

@media (min-width: 1024px) {
  .directory-layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 24px;
    align-items: start;
  }

  .map-wrap {
    position: sticky;
    top: 188px;
    height: calc(100vh - 204px);
    min-height: 420px;
  }

  .chip-map {
    display: none;
  }
}

/* ----------------------------------------------------------- home: guide */

.how {
  padding: 48px 0 56px;
}

.how h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.how-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.how-grid > div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.how-grid h3 {
  font-size: 1.0625rem;
}

.how-grid p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}

.how-more {
  margin-top: 18px;
}

@media (min-width: 760px) {
  .how-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ------------------------------------------------------- area, about pages */

.page-narrow {
  padding: 28px 0 56px;
}

.page-header h1,
.prose h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.page-header .lead,
.prose .lead {
  max-width: 70ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.0625rem;
}

.cards-wide {
  margin-top: 24px;
}

.page-more {
  margin-top: 24px;
}

@media (min-width: 760px) {
  .cards-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.prose h2 {
  margin-top: 32px;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.prose p {
  max-width: 72ch;
  margin-top: 10px;
}

/* ---------------------------------------------------------- clinic detail */

.clinic {
  padding-bottom: 56px;
}

.clinic-header h1 {
  max-width: 24ch;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

.clinic-layout {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.clinic-main {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.panel h2 {
  margin-bottom: 12px;
  font-size: 1.0625rem;
}

.panel p.panel-note {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

.panel-plain {
  margin-top: 16px;
  background: transparent;
}

.clinic-address {
  font-size: 1.0625rem;
  font-style: normal;
  line-height: 1.5;
}

.clinic-phone {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 14px;
}

.clinic-phone span {
  min-width: 56px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.clinic-phone a {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.clinic-phone a:hover {
  text-decoration: underline;
}

.clinic-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

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

.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  font-size: 14px;
  font-weight: 500;
}

.map-small {
  height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #dde3ec;
}

.nearby li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}

.nearby li:first-child {
  border-top: 0;
}

.nearby a {
  font-weight: 600;
  text-decoration: none;
}

.nearby a:hover {
  text-decoration: underline;
}

.nearby span {
  font-size: 13px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .clinic-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }
}

/* ---------------------------------------------------------------- guides */

.guides-strip {
  padding: 8px 0 44px;
}

.guides-strip h2,
.guide-index h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.guide-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.guide-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.guide-card:hover {
  border-color: #b9c2ee;
  box-shadow: 0 8px 24px rgba(22, 29, 59, 0.08);
  transform: translateY(-1px);
}

.guide-card h3 {
  color: var(--brand);
  font-size: 1.0625rem;
}

.guide-card p {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--muted);
}

@media (min-width: 700px) {
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .guide-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.prose ul.plain-list,
.prose ol.plain-list,
.prose ul.checklist {
  margin-top: 10px;
  padding-left: 0;
  list-style: none;
}

.prose ul.plain-list li,
.prose ol.plain-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  max-width: 72ch;
}

.prose ul.plain-list > li::before,
.prose ul.checklist > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5cdf2;
}

.prose ol.plain-list {
  counter-reset: treat;
}

.prose ol.plain-list > li {
  counter-increment: treat;
}

.prose ol.plain-list > li::before {
  content: counter(treat);
  width: 20px;
  height: 20px;
  top: 8px;
  left: 0;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.prose ul.checklist > li::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.4 11.6 3 8.2l1.1-1.1 2.3 2.3 5.5-5.5L12 5z' fill='%23176939'/%3E%3C/svg%3E") no-repeat center / contain;
  width: 16px;
  height: 16px;
  top: 9px;
  left: 0;
}

.panel-callout {
  margin-top: 16px;
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
}

.panel-callout p {
  margin: 0;
}

.resource-list li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.resource-list li:first-child {
  border-top: 0;
}

.resource-list h3 {
  font-size: 1.0625rem;
}

.resource-list p {
  max-width: 72ch;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

.plain-list li span,
.guide-index span {
  color: var(--muted);
  font-size: 14px;
}

.prose .plain-list span {
  display: block;
  margin-left: 22px;
}

/* -------------------------------------------------------------- screeners */

.screener {
  margin-top: 16px;
}

.screener + .screener {
  margin-top: 16px;
}

.scale-q {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.scale-q > p {
  flex: 1 1 40%;
  min-width: 240px;
  font-size: 15px;
}

.scale {
  display: flex;
  gap: 6px;
}

.scale label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.scale label:hover {
  border-color: #b9c2ee;
}

.scale input {
  margin: 0;
  accent-color: var(--brand);
}

.check-q {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  cursor: pointer;
}

.check-q input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  flex: none;
}

.screener-score {
  margin-top: 14px;
  font-size: 1.0625rem;
  font-weight: 700;
}

.screener-result {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

.screener-result.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.screener-result.warn {
  background: #fff4dd;
  color: #8a5a00;
}

.screener-result.alert {
  background: #fdeaea;
  color: #a02626;
}

.screener-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 560px) {
  .scale {
    flex-wrap: wrap;
  }
}

/* ----------------------------------------------------------------- tools */

.tool .tool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}

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

.tool-field span {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.tool-field input,
.tool-field select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
}

.tool-field input[type="time"] {
  padding-right: 4px;
}

.tool-result {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--brand-soft);
}

.tool-lead {
  font-size: 1.0625rem;
}

.tool-note {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.tool-times {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

@media (min-width: 640px) {
  .tool-times {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tool-times li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.tool-times strong {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

.tool-times span {
  font-size: 13px;
  color: var(--muted);
}

/* -------------------------------------------------- guided flow + compare */

.flow-progress {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.flow-question {
  margin-top: 6px;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.4;
}

.flow-options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.flow-option {
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid #c5cdf2;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.flow-option:hover {
  border-color: var(--brand);
  background: #f3f5ff;
}

.flow-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.flow-outcome h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

.flow-outcome p {
  margin-top: 10px;
}

.flow-cta {
  font-weight: 600;
}

.compare-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.compare-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

.compare-tray {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  padding: 12px 0;
  background: #0f1633;
  color: #fff;
  box-shadow: 0 -8px 24px rgba(6, 10, 40, 0.28);
}

.compare-tray-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#compare-note {
  color: #c9d2ff;
  font-size: 14px;
}

.compare-layout {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

@media (min-width: 960px) {
  .compare-layout {
    grid-template-columns: 340px minmax(0, 1fr);
    align-items: start;
  }
}

#picker-search {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14.5px;
}

.picker {
  max-height: 460px;
  margin-top: 8px;
  overflow-y: auto;
}

.picker li {
  border-top: 1px solid var(--line);
}

.picker li:first-child {
  border-top: 0;
}

.picker .check-q span {
  font-size: 14px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.compare-table {
  min-width: 620px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--brand-soft);
  font-size: 15px;
}

.compare-table thead th a {
  color: var(--ink);
  font-weight: 700;
}

.th-sub {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.compare-table tbody th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.compare-services {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}

.prose table.age-table,
.prose table {
  width: 100%;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  border-collapse: collapse;
  overflow: hidden;
  background: var(--card);
}

.prose table th,
.prose table td {
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  text-align: left;
}

.prose table thead th {
  background: var(--brand-soft);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
}

.prose table tbody tr:first-child th,
.prose table tbody tr:first-child td {
  border-top: 0;
}

.prose h3 {
  margin-top: 20px;
  font-size: 1.0625rem;
}

/* ------------------------------------------------------------- animation */

@media (prefers-reduced-motion: reduce) {
  .card,
  .btn {
    transition: none;
  }

  .card:hover {
    transform: none;
  }
}
