/* Precision Pain and Rehabilitation — site layer on top of the Industry design system */
:root {
  --color-accent: #3A5434;
  --color-accent-100: #eaefe7;
  --color-accent-200: #cfdac9;
  --color-accent-300: #a9bba1;
  --color-accent-600: #314727;
  --color-accent-700: #273820;
  --color-accent-800: #1d2a18;
  --color-accent-900: #141d11;
  --color-text: #040707;
  --color-bg: #f4f4f1;
  --color-divider: #c9cbc6;

  /* one radius everywhere — the system ships three, the site uses one */
  --radius-sm: 4px;
  --radius-md: 4px;
  --radius-lg: 4px;

  /* softer than stock: this palette is hairline-and-paper, so elevation
     should read as a lift, not an edge */
  --shadow-sm: 0 1px 3px rgba(4, 7, 7, 0.06);
  --shadow-md: 0 4px 14px rgba(4, 7, 7, 0.07);
  --shadow-lg: 0 14px 40px rgba(4, 7, 7, 0.10);
}
a { color: var(--color-accent-700); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--color-accent); text-decoration: underline; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); }
img { max-width: 100%; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: var(--color-bg); padding: 10px 14px; z-index: 50; }
.nav-link { text-decoration: none !important; }
.nav-link:hover { color: var(--color-accent) !important; border-bottom-color: var(--color-accent) !important; }
header .btn, footer nav a, .card a { text-decoration: none; }
footer nav a:hover { color: #fff !important; text-decoration: underline; }
footer a { color: #e4e8e1; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* the accent is too dark to read as a focus ring on the dark footer */
footer :focus-visible, [style*="--color-accent-900"] :focus-visible { outline-color: #f4f4f1; }

/* every button is the same height whatever its padding, and clears the
   44px touch target */
.btn { min-height: 44px; }

/* ---- contact form validation messages ---- */
.field-err {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-accent-800);
  border-left: 2px solid var(--color-text);
  padding-left: 10px;
}
.input[aria-invalid="true"] { border-color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-text); }

/* ---- consent banner ---- */
#consent {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  background: var(--color-bg);
  border-top: 1px solid var(--color-text);
  box-shadow: 0 -14px 40px rgba(4, 7, 7, 0.10);
}
#consent .consent-inner {
  max-width: 1120px; margin: 0 auto; padding: 18px 28px;
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}
#consent .consent-copy { margin: 0; flex: 1 1 380px; font-size: 14px; line-height: 1.55; max-width: 76ch; }
#consent .consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#consent .btn {
  font-family: var(--font-heading); letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 14px; padding: 11px 22px; min-height: 44px;
}
#consent .btn-primary { color: #fff; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  /* the at-a-glance and contact rows draw cell dividers that only read on a wide grid */
  main dl > div[style*="border-right"] { border-right: 0 !important; border-bottom: 1px solid var(--color-divider); }
  main dl > div[style*="padding: 30px 26px 30px 0"],
  main dl > div[style*="padding: 30px 0 30px 26px"],
  main dl > div[style*="padding: 30px 26px"] { padding: 26px 0 !important; }
  main dl > div:last-child { border-bottom: 0; }
}
@media (max-width: 760px) {
  header > div { padding: 14px 20px !important; gap: 14px !important; align-items: flex-start !important; }
  header img { width: 188px !important; }
  header nav {
    margin-left: 0 !important; width: 100%;
    gap: 0 !important; row-gap: 0 !important;
    border-top: 1px solid var(--color-divider);
    padding-top: 10px;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  header nav .nav-link {
    border-bottom: 1px solid var(--color-divider) !important;
    padding: 13px 2px !important;
    min-height: 44px; display: flex; align-items: center;
  }
  header nav .btn { grid-column: 1 / -1; margin-top: 12px; justify-content: center; min-height: 46px; }
  main section { padding-left: 20px !important; padding-right: 20px !important; }
  main section[style*="84px"] { padding-top: 48px !important; }
  footer > div { padding-left: 20px !important; padding-right: 20px !important; }
  footer > div > div > p:last-child { max-width: none !important; }
  /* the comparison table cannot hold three columns at this width — stack each row */
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { border-bottom: 1px solid var(--color-text); padding: 6px 0 16px; }
  .table td { border: 0 !important; padding: 8px 0 !important; }
  .table td:first-child {
    font-family: var(--font-heading); font-size: 19px !important;
    padding-top: 16px !important; letter-spacing: 0.01em;
  }
  .table td:nth-child(2)::before { content: 'Typical consult coverage'; }
  .table td:nth-child(3)::before { content: 'Precision Pain and Rehabilitation'; }
  .table td:nth-child(2)::before, .table td:nth-child(3)::before {
    display: block; font-family: var(--font-heading); font-size: 11px;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--color-accent-700); margin-bottom: 4px;
  }
  #consent .consent-inner { padding: 16px 20px; }
  #consent .consent-actions { width: 100%; }
  #consent .consent-actions .btn { flex: 1 1 auto; justify-content: center; }
  /* cards carry desktop padding from the system's space scale */
  .card { padding: 22px !important; }
  main .card[style*="padding: 32px"] { padding: 22px !important; }
  /* the dark closing panels run tall on a phone */
  main section[style*="--color-accent-900"] > div,
  main section > div[style*="padding: 60px 28px"] { padding: 46px 20px !important; }
  footer > div:first-child { padding-top: 40px !important; }
}
@media (max-width: 420px) {
  header nav { grid-template-columns: 1fr; }
  /* the stat numerals are set in vw and get lopsided on a narrow phone */
  .card > p[style*="clamp(46px"] { font-size: 46px !important; }
  main section > h1, main section > p { max-width: none !important; }
}
@media print {
  header, footer nav, #consent, .skip { display: none; }
}
