/* The Backstory Chiropractic
   Direction: "every pain has a backstory". An editorial, book-like feel taken from the clinic's
   name and logo: a literary serif, Sydney sandstone and the clinic's own teal, generous whitespace,
   hairline rules instead of boxes, and one clear action per section. */
:root {
  --paper: #ffffff;
  --sand: #f2ebdf;        /* Sydney sandstone, light */
  --sand-2: #e6dac6;
  --line: #e3dccf;
  --ink: #1d2a2b;         /* teal-black */
  --ink-2: #46585a;
  --muted: #586769;       /* 5.3:1 on sand */
  --teal: #0e5f61;        /* the clinic's teal, deepened so white text passes AA */
  --teal-dark: #0a4749;
  --teal-soft: #e1eeec;
  --ok: #2d7a4f;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --measure: 38rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.12; margin: 0 0 .45em; text-wrap: balance; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h1 em, h2 em { font-style: italic; color: var(--teal); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.measure { max-width: var(--measure); }
.lead { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.kicker { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); margin: 0 0 .6rem; display: block; }
section { padding: 88px 0; }
.sand { background: var(--sand); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Buttons: one primary per view, everything else is a link */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: 15px 26px; border-radius: 6px; font-family: var(--sans); font-weight: 600; font-size: 1.02rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; line-height: 1.2; transition: background .15s ease; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: #fff; }
.btn svg { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.alt-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--sand-2); text-decoration-thickness: 2px; }
.alt-link:hover { text-decoration-color: var(--teal); }
.facts { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.facts span + span::before { content: "·"; margin: 0 .55em; color: var(--sand-2); }

/* Top bar and header */
.topbar { background: var(--ink); color: #c9d3d3; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.open-now { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #9aa6a6; display: inline-block; }
.dot.on { background: #5fd28f; }
header.site { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 74px; }
.logo img { height: 32px; width: auto; }
nav.main { display: flex; gap: 2px; }
nav.main a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; padding: 8px 12px; white-space: nowrap; border-bottom: 2px solid transparent; }
nav.main a:hover, nav.main a[aria-current] { border-bottom-color: var(--sand-2); }
.header-cta { display: flex; align-items: center; gap: 18px; }
.header-cta .phone { color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-cta .btn { padding: 11px 18px; font-size: .95rem; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 26px; height: 26px; }

/* Home hero */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero h1 { margin-bottom: .3em; }
.hero h1 .second { display: block; font-style: italic; color: var(--teal); }
.hero .lead { max-width: 34rem; margin-bottom: 30px; }
.hero figure { margin: 0; }
.hero figure img { width: 100%; aspect-ratio: 4/3.4; object-fit: cover; border-radius: 4px; }
.hero figcaption, figcaption { font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--muted); margin-top: 10px; }
.next-slot { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; color: var(--ok); margin: 14px 0 0; }
.next-slot[hidden] { display: none; }

/* Letter from Scott */
.letter { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.letter figure { margin: 0; }
.letter figure img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 4px; }
.letter .body { font-family: var(--serif); font-size: 1.22rem; line-height: 1.65; max-width: 36rem; color: var(--ink); }
.letter .body p:first-child { font-size: 1.5rem; font-style: italic; color: var(--teal); }
.signoff { font-family: var(--sans); font-size: .95rem; color: var(--muted); margin-top: 1.4em; }
.signoff b { display: block; color: var(--ink); font-size: 1.05rem; }
.creds { list-style: none; padding: 0; margin: 28px 0 0; font-size: .92rem; color: var(--ink-2); display: grid; gap: 6px; }
.creds li { padding-left: 0; }
.creds b { font-weight: 600; color: var(--ink); }

/* Contents list of conditions */
.contents { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 56px; }
.contents li { break-inside: avoid; border-top: 1px solid var(--line); }
.contents a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 0 18px; text-decoration: none; color: var(--ink); }
.contents .t { font-family: var(--serif); font-size: 1.35rem; }
.contents .d { grid-column: 1; color: var(--muted); font-size: .95rem; }
.contents .arr { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--sand-2); font-size: 1.3rem; transition: transform .15s, color .15s; }
.contents a:hover .t { color: var(--teal); }
.contents a:hover .arr { color: var(--teal); transform: translateX(3px); }
.section-head { max-width: 40rem; margin-bottom: 44px; }

/* Chapters (first visit) */
.chapters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; counter-reset: ch; }
.chapter { border-top: 2px solid var(--ink); padding-top: 18px; }
.chapter img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 4px; margin-bottom: 18px; }
.chapter .n { font-family: var(--serif); font-style: italic; color: var(--teal); font-size: 1.05rem; display: block; margin-bottom: 6px; }
.chapter h3 { font-size: 1.45rem; }
.chapter p { color: var(--ink-2); margin: 0; }

/* Fees */
.fees { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.fee-list { list-style: none; margin: 0; padding: 0; }
.fee-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.fee-list li:first-child { border-top: 1px solid var(--line); }
.fee-list .name { font-family: var(--serif); font-size: 1.3rem; }
.fee-list .name small { display: block; font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.fee-list .price { font-family: var(--serif); font-size: 1.6rem; }
.plain-list { margin: 0; padding-left: 1.1em; color: var(--ink-2); }
.plain-list li { margin-bottom: .45em; }

/* Treatments, simple list */
.treat-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 48px; }
.treat-list a { text-decoration: none; color: inherit; display: block; border-top: 1px solid var(--line); padding-top: 16px; }
.treat-list h3 { font-size: 1.25rem; margin-bottom: .3em; }
.treat-list a:hover h3 { color: var(--teal); }
.treat-list p { color: var(--muted); font-size: .97rem; margin: 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 20px 40px 20px 0; font-family: var(--serif); font-size: 1.25rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--sans); font-size: 1.5rem; color: var(--teal); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-2); max-width: var(--measure); padding-bottom: 18px; margin: 0; }

/* Finding us */
.loc { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: stretch; }
.map { min-height: 360px; border-radius: 4px; overflow: hidden; background: var(--sand); }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; }
.hours { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: .98rem; font-variant-numeric: tabular-nums; }
.hours td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; }
.hours tr.today td { font-weight: 600; color: var(--teal); }

/* Closing band */
.close { background: var(--sand); padding: 80px 0; text-align: center; }
.close h2 { margin-bottom: .3em; }
.close p { color: var(--ink-2); margin: 0 auto 28px; max-width: 32rem; }
.close .actions { justify-content: center; }

/* Inner pages */
.page-hero { padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.page-hero .lead { max-width: 40rem; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; align-items: start; }
.prose { max-width: 40rem; }
.prose h2 { font-size: 1.75rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.15em; }
.prose li { margin-bottom: .45em; }
.prose figure { margin: 0 0 2em; }
.prose figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
.prose .symptoms { columns: 2; column-gap: 40px; padding-left: 1.15em; }
.prose .symptoms li { break-inside: avoid; }
.aside { position: sticky; top: 100px; }
.book-note { background: var(--sand); border-radius: 4px; padding: 26px; }
.book-note h3 { font-size: 1.35rem; margin-bottom: .2em; }
.book-note p { font-size: .95rem; color: var(--ink-2); margin-bottom: 1em; }
.book-note .btn { width: 100%; margin-bottom: 12px; }
.book-note .alt-link { font-size: .95rem; }
.alert { border-left: 3px solid #b7791f; padding: 4px 0 4px 18px; margin: 1.6em 0; color: var(--ink-2); }
.alert b { color: var(--ink); }
.aside-cta { margin: 2.2em 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.aside-cta p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.chips a { font-weight: 600; }
.sources { margin-top: 2.4em; padding-top: 1em; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.sources ul { padding-left: 1.1em; margin: .4em 0 0; }
.sources a { color: var(--muted); }
.reviewed { font-size: .88rem; color: var(--muted); }

/* Booking page */
.booking-page .mbar { display: none !important; }
.booking-frame { width: 100%; min-height: 820px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }

/* Footer */
footer.site { background: var(--ink); color: #b9c5c5; padding: 64px 0 112px; font-size: .93rem; }
footer.site a { color: #eef3f3; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .legal a, footer.site p a { text-decoration: underline; text-underline-offset: 2px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
footer.site .foot-h { color: #fff; font-family: var(--serif); font-weight: 500; font-size: 1.1rem; margin: 0 0 12px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legal { border-top: 1px solid #34474a; margin-top: 40px; padding-top: 20px; font-size: .84rem; }

/* Mobile bar */
.mbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 10px; }
.mbar .btn { flex: 1; padding: 13px 10px; }

/* Ad landing pages */
.lp nav.main { display: none; }

@media (max-width: 1100px) {
  nav.main { display: none; position: absolute; top: 74px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 10px 24px 22px; border-bottom: 1px solid var(--line); }
  nav.main.open { display: flex; }
  nav.main a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: block; }
  .header-cta .phone { display: none; }
  .content-grid { grid-template-columns: 1fr; gap: 40px; }
  .aside { position: static; }
  .treat-list { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  section { padding: 60px 0; }
  .wrap { padding: 0 20px; }
  .hero { padding: 36px 0 52px; }
  .hero-grid, .letter, .fees, .loc { grid-template-columns: 1fr; gap: 32px; }
  .hero figure img { aspect-ratio: 16/11; }
  .letter figure { max-width: 240px; }
  .letter .body { font-size: 1.12rem; }
  .contents, .prose .symptoms { columns: 1; }
  .chapters, .treat-list { grid-template-columns: 1fr; gap: 32px; }
  .topbar .hide-sm { display: none; }
  .header-cta .btn { display: none; }
  .mbar { display: flex; }
  .foot-grid { grid-template-columns: 1fr; }
  .lp .hero figure { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.post img { width: auto; max-width: 100%; height: auto; border-radius: 4px; margin: 1.4em 0; }
