/* Keptridge, practices site. Warm off-white paper, dark slate text, deep teal accent. */

:root {
  --paper: #faf7f2;
  --white: #ffffff;
  --wash: #f2ede4;
  --ink: #1f2b33;
  --muted: #4a5a62;
  --teal: #10605d;
  --teal-dark: #0b4b49;
  --teal-wash: #e4efed;
  --line: #d9d2c6;
  --line-strong: #5f6f76;
  --soon-bg: #f8e7cf;
  --soon-text: #6b3a00;
  --watch-bg: #e4efed;
  --watch-text: #0e4f4c;
  --error-bg: #fdecec;
  --error-line: #f3b4b4;
  --error-text: #9b1c1c;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.375rem); }
h3 { font-size: 1.375rem; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:is(a, button, input, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 3px; }
section[id] { scroll-margin-top: 16px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 16px; }
.muted { color: var(--muted); }

.skip { position: absolute; left: 12px; top: -120px; z-index: 10; padding: 12px 16px; background: var(--teal); color: var(--white); border-radius: 6px; text-decoration: none; }
.skip:focus { top: 12px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 12px 22px;
  background: var(--teal); color: var(--white); border: 1px solid var(--teal); border-radius: 6px;
  font-weight: 600; font-size: 1rem; line-height: 1.3; text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.button:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); }
.button.secondary { background: var(--white); color: var(--teal); }
.button.secondary:hover { background: var(--teal-wash); color: var(--teal-dark); }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--serif); font-size: 1.5rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.wordmark:hover { color: var(--teal); }
nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 10px; border-radius: 4px; color: var(--ink); font-size: 0.9375rem; text-decoration: none; }
nav a:hover { color: var(--teal); background: var(--wash); }
.header-cta { min-height: 44px; padding: 10px 18px; font-size: 0.9375rem; flex-shrink: 0; }

/* Hero */
.hero { padding: 72px 0 64px; background: linear-gradient(180deg, var(--paper) 0%, var(--wash) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.hero h1 { max-width: 14ch; }
.lead { font-size: 1.1875rem; line-height: 1.6; margin-top: 22px; max-width: 36rem; }
.hero-actions { margin-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hero-note { font-size: 0.9375rem; color: var(--muted); max-width: 32rem; }
.hero-card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 8px; padding: 26px 28px; }
.card-title { font-family: var(--serif); font-size: 1.25rem; margin-bottom: 14px; }
.check-list { list-style: none; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.25em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--teal-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6.5-7' fill='none' stroke='%2310605d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.card-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--muted); }

/* Sections */
.section { padding: 72px 0; }
.band { padding: 72px 0; background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-teal { background: var(--teal); color: var(--white); border-color: var(--teal); }
.band-teal h2, .band-teal h3, .band-teal p { color: var(--white); }
.band-teal :focus-visible { outline-color: var(--white); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 36px; }
.section-head p { max-width: 36rem; color: var(--muted); }

.reasons { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; counter-reset: reason; }
.reasons li { counter-increment: reason; position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px 20px 66px; }
.reasons li::before { content: counter(reason, decimal-leading-zero); position: absolute; left: 22px; top: 18px; font-family: var(--serif); font-size: 1.375rem; line-height: 1.2; color: var(--teal); }
.reasons li:last-child { grid-column: 1 / -1; }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.service { border-top: 3px solid var(--teal); padding-top: 20px; }
.service h3 { margin-bottom: 12px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid rgba(255, 255, 255, 0.35); padding-top: 22px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--serif); font-size: 2.25rem; line-height: 1; margin-bottom: 16px; color: var(--white); }
.steps h3 { margin-bottom: 12px; }

.two-col { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 48px; align-items: start; }
.handling { list-style: none; }
.handling li { position: relative; padding: 18px 0 18px 32px; border-top: 1px solid var(--line); }
.handling li:last-child { border-bottom: 1px solid var(--line); }
.handling li::before { content: ""; position: absolute; left: 0; top: 28px; width: 14px; height: 14px; border-radius: 3px; background: var(--teal); }

/* Sample section */
.sample { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.sample-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 22px; }
.sample-badge { display: inline-block; background: var(--ink); color: var(--white); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 10px; border-radius: 4px; }
.sample-meta { color: var(--muted); font-size: 0.9375rem; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 22px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
table.calendar { min-width: 860px; }
table.applications { min-width: 800px; }
.payer { white-space: nowrap; }
caption { caption-side: top; text-align: left; padding: 14px 16px; font-family: var(--serif); font-size: 1.125rem; background: var(--wash); border-bottom: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
thead th { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
tbody th { font-weight: 600; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.due { white-space: nowrap; }
.pill { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; }
.pill.soon { background: var(--soon-bg); color: var(--soon-text); }
.pill.watch { background: var(--watch-bg); color: var(--watch-text); }
.days { margin-left: 6px; font-size: 0.8125rem; color: var(--muted); }

.excerpts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.excerpt { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; }
.excerpt h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 1.125rem; margin-bottom: 12px; }
.excerpt h3 span { font-family: var(--sans); font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.excerpt-line { font-size: 0.9375rem; color: var(--muted); }
.excerpt-line strong { color: var(--ink); font-weight: 600; }
.excerpt > p:not(.excerpt-line) { margin-top: 10px; font-size: 0.9375rem; }
.report { display: grid; gap: 12px; margin: 0; }
.report > div { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 12px; font-size: 0.9375rem; }
.report dt { font-weight: 600; color: var(--teal); }
.report dd { margin: 0; }
.sample-foot { margin-top: 18px; font-size: 0.875rem; color: var(--muted); }

/* Scope note */
.scope { border-left: 4px solid var(--teal); padding: 6px 0 6px 24px; max-width: 48rem; }
.scope h2 { font-size: 1.625rem; margin-bottom: 12px; }

/* Questions */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; cursor: pointer; list-style: none; min-height: 44px; padding: 16px 44px 16px 0; font-family: var(--serif); font-size: 1.1875rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
/* Plus and minus markers are background images, so screen readers do not announce them after the question. */
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' fill='none' stroke='%2310605d' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.faq details[open] summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12' fill='none' stroke='%2310605d' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.faq details p { padding: 0 0 20px; max-width: 44rem; }

/* Contact */
.contact { padding: 72px 0; background: var(--teal-wash); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.contact-intro p { margin-top: 16px; }
.contact-intro .email { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 1.125rem; overflow-wrap: anywhere; }
.check-form { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
label { font-weight: 600; font-size: 0.9375rem; }
.optional { font-weight: 400; color: var(--muted); }
input, textarea { width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--white); color: var(--ink); }
input:hover, textarea:hover { border-color: var(--ink); }
textarea { resize: vertical; min-height: 120px; }
.field-short input { max-width: 180px; }
.form-note { font-size: 0.875rem; color: var(--muted); }
.form-error { font-size: 0.9375rem; color: var(--error-text); background: var(--error-bg); border: 1px solid var(--error-line); border-radius: 6px; padding: 10px 12px; margin-bottom: 14px; }
.form-error[hidden] { display: none; }
.submit { width: 100%; margin-top: 4px; }
.form-how { margin-top: 12px; }
.prepared { margin-top: 24px; padding: 20px; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; }
.prepared[hidden] { display: none; }
.prepared h3 { font-size: 1.25rem; margin-bottom: 8px; }
.preview { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.875rem; line-height: 1.6; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin: 14px 0; max-height: 320px; overflow: auto; }
.prepared-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.prepared-actions .button { flex: 1 1 180px; }
noscript p { margin-top: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; font-size: 0.9375rem; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.footer-wordmark { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.sep { color: var(--line-strong); }

/* Layout breakpoints */
@media (max-width: 1099px) {
  /* Six section links plus the header button need about 980px on one row; below this width the links are hidden. The page is one scroll, so nothing is lost. */
  nav { display: none; }
}
@media (max-width: 960px) {
  .hero-grid, .two-col, .contact-grid, .services, .steps, .reasons, .excerpts { grid-template-columns: 1fr; }
  .hero-grid { gap: 36px; }
  .reasons li:last-child { grid-column: auto; }
  .steps { gap: 28px; }
  .two-col { gap: 24px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .section, .band, .contact { padding: 48px 0; }
  .hero { padding: 48px 0 44px; }
  .header-row { min-height: 68px; gap: 12px; }
  .wordmark { font-size: 1.3125rem; }
  .header-cta { padding: 10px 14px; font-size: 0.875rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 28px; }
  .hero-card { padding: 22px 20px; }
  .reasons li { padding: 18px 18px 18px 56px; }
  .reasons li::before { left: 18px; }
  .sample { padding: 16px; }
  /* Each table row becomes a labelled card; the roles in the markup keep table semantics. */
  .table-scroll { overflow: visible; }
  .sample table { display: block; min-width: 0; }
  .sample caption { display: block; }
  .sample thead { display: block; position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .sample tbody, .sample tr, .sample th, .sample td { display: block; }
  .sample tbody tr { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
  .sample tbody tr:last-child { border-bottom: 0; }
  .sample tbody th { padding: 0 0 8px; border: 0; white-space: normal; font-size: 1rem; }
  .sample td { position: relative; padding: 4px 0 4px 96px; border: 0; white-space: normal; }
  .sample td::before { content: attr(data-label); position: absolute; left: 0; top: 6px; width: 84px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
  .report > div { grid-template-columns: 1fr; gap: 2px; }
  .check-form { padding: 20px; }
  .field-short input { max-width: none; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sep { display: none; }
}
@media (max-width: 400px) {
  :root { --gutter: 16px; }
  .hero-actions .button { width: 100%; }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
