/* SSMC Pain & Wellness — site stylesheet
   Layout: white letterhead band (logo) over a calm, pale-blue page; one serif display face
   for headings (echoes the logo wordmark), a humanist sans for body. Light theme only. Chrome is calm blue;
   SSMC red appears only in the logo, per SSMC/brand/BRAND.md. */

:root {
  --bg: #f6f9fb;            /* page ground, slight blue bias */
  --surface: #ffffff;       /* cards, header band */
  --panel: #e3eef4;         /* pale panel (brand Light Blue, tuned) */
  --fg: #14222b;            /* body text */
  --muted: #5a6b77;         /* secondary text */
  --line: #d3dee5;          /* rules, borders */
  --accent: #006992;        /* brand Calm Blue: links, buttons, section bars */
  --accent-strong: #00506f; /* hover / pressed */
  --accent-ink: #ffffff;    /* text on accent */
  --header-bg: #ffffff;     /* letterhead stays white in both themes (logo is red on transparent) */
  --header-fg: #14222b;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --measure: 68ch;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
/* Single light theme by decision (JP, 2026-10-22): the site looks the same for every visitor,
   whatever their device setting. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; max-width: var(--measure); }
ul, ol { margin: 0; padding-left: 1.3em; max-width: var(--measure); }
li + li { margin-top: .35em; }
.eyebrow { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* skip link */
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: var(--gutter-l); }

/* wrappers: every band carries the gutter on its inner wrapper */
.wrap { max-width: 1120px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

/* header */
.site-header { background: var(--header-bg); color: var(--header-fg); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--header-bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; min-width: 0; }
.brand img { width: clamp(150px, 22vw, 220px); }
.brand .tag { font-family: var(--font-display); font-size: .95rem; color: #5a6b77; border-left: 1px solid #d3dee5; padding-left: .75rem; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 1px solid #d3dee5; color: #14222b; border-radius: var(--radius); padding: .4rem .7rem; font: inherit; cursor: pointer; }
.nav { display: flex; align-items: center; gap: .1rem .25rem; flex-wrap: wrap; }
.nav a { color: #14222b; text-decoration: none; padding: .45rem .6rem; border-radius: var(--radius); font-size: .97rem; }
.nav a:hover { background: #e3eef4; color: #00506f; }
.nav a[aria-current="page"] { color: #006992; font-weight: 600; box-shadow: inset 0 -2px 0 #006992; border-radius: 0; }
.nav .btn { margin-left: .4rem; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-top: .5rem; border-top: 1px solid #d3dee5; }
  .nav.open { display: flex; }
  .nav a { padding: .7rem .4rem; }
  .nav .btn { margin: .5rem 0 0; text-align: center; }
  .brand .tag { display: none; }
}

/* buttons */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink) !important; text-decoration: none; padding: .6rem 1.1rem; border-radius: var(--radius); font-weight: 600; border: 1px solid transparent; cursor: pointer; font: inherit; }
.btn:hover { background: var(--accent-strong); }
.btn.ghost { background: transparent; color: var(--accent) !important; border-color: var(--accent); }
.btn.ghost:hover { background: var(--panel); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* sections */
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section.tint { background: var(--panel); border-top: 0; }
.section.ink { background: var(--accent); color: var(--accent-ink); border-top: 0; }
.section.ink a:not(.btn) { color: inherit; }
.section.ink .btn { background: var(--accent-ink); color: var(--accent) !important; }
.section-head { display: grid; gap: .5rem; margin-bottom: 1.75rem; }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 1.75rem; }

/* hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem; align-items: center; padding-block: clamp(2rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); }
.hero .lede { font-size: 1.15rem; color: var(--muted); }
.hero figure { margin: 0; }
.hero figure img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; } .hero figure { max-width: 380px; } }

/* cards / grids */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem; display: grid; gap: .5rem; align-content: start; min-width: 0; }
.card h3 { font-size: 1.15rem; }
.card p { font-size: 1rem; }
.tint .card { border-color: transparent; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; max-width: none; }
.chips li { margin: 0; background: var(--panel); color: var(--fg); border-radius: 999px; padding: .3rem .8rem; font-size: .92rem; }
.ink .chips li, .tint .chips li { background: var(--surface); }

/* definition table (credentials, procedures) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { text-align: left; padding: .7rem .9rem; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--accent); font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; background: var(--panel); }
tr:last-child td { border-bottom: 0; }
td.year { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }

/* pull quote */
blockquote { margin: 0; padding: 1.25rem 1.5rem; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.45; max-width: var(--measure); }
blockquote footer { font-family: var(--font-body); font-size: .95rem; color: var(--muted); margin-top: .75rem; }

/* profile page */
.profile-top .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2.5rem; align-items: start; padding-block: clamp(2rem, 5vw, 4rem); }
.profile-top img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.profile-top .name { display: grid; gap: .9rem; }
.profile-top h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); }
.profile-top .role { font-size: 1.15rem; color: var(--muted); }
@media (max-width: 760px) { .profile-top .wrap { grid-template-columns: 1fr; } .profile-top img { max-width: 340px; } }
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem; display: grid; gap: .75rem; font-size: .97rem; }
.aside h3 { font-size: 1.05rem; }
.aside ul { padding-left: 1.1em; }
.prose { display: grid; gap: 1rem; }
.prose p { font-size: 1.08rem; }
.conditions-cols { columns: 2; column-gap: 2.5rem; max-width: none; list-style: none; padding: 0; }
.conditions-cols li { break-inside: avoid; margin: 0 0 .45rem; padding-left: 1.1em; position: relative; }
.conditions-cols li::before { content: ""; position: absolute; left: 0; top: .62em; width: .45em; height: .45em; border-radius: 50%; background: var(--accent); }
@media (max-width: 600px) { .conditions-cols { columns: 1; } }

/* FAQ */
details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .2rem 1.1rem; }
details + details { margin-top: .6rem; }
summary { cursor: pointer; font-weight: 600; padding: .7rem 0; font-size: 1.05rem; }
details p { padding-bottom: .9rem; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; display: grid; gap: .9rem; max-width: none; }
.contact-list li { display: grid; gap: .15rem; }
.contact-list .k { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-list .v { font-size: 1.1rem; }
form { display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--fg); width: 100%; }
textarea { min-height: 7rem; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: start; font-weight: 400; }
.check input { width: auto; margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-out { display: none; background: var(--panel); border-radius: var(--radius); padding: 1rem 1.1rem; }
.form-out.show { display: grid; gap: .75rem; }
.form-out pre { white-space: pre-wrap; font: inherit; margin: 0; background: var(--surface); padding: .8rem; border-radius: var(--radius); border: 1px solid var(--line); }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 2.5rem 2rem; font-size: .95rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 1.5rem; grid-template-columns: 2fr 1fr 1fr auto; align-items: start; }
.site-footer a { color: var(--fg); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
.site-footer li { margin: 0; }
.site-footer .mark img { width: 56px; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .mark { display: none; } }

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a { transition: background-color .15s ease, color .15s ease; }
}

/* booking page */
.trust-strip { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.trust-strip img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.trust-strip div { display: grid; gap: .15rem; min-width: 0; }
@media (max-width: 560px) { .trust-strip { grid-template-columns: 56px 1fr; } .trust-strip img { width: 56px; height: 56px; } .trust-strip > a { grid-column: 2; } }
.visit { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.visit.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.visit .pick { color: var(--accent); font-weight: 600; }
.visit.offline { opacity: .75; cursor: default; }
.grid-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.grid-nav .btn:disabled { opacity: .4; cursor: default; }
.slot-scroll { overflow-x: auto; padding-bottom: .5rem; }
.slot-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: .6rem; min-width: 100%; }
.day { display: grid; gap: .4rem; align-content: start; }
.day-head { display: grid; text-align: center; padding-bottom: .4rem; border-bottom: 2px solid var(--line); margin-bottom: .2rem; }
.day-head span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.day .none { text-align: center; color: var(--muted); font-size: .85rem; padding: .5rem 0; }
.slot { font: inherit; font-size: .95rem; background: var(--surface); border: 1px solid var(--accent); color: var(--accent); border-radius: var(--radius); padding: .45rem .3rem; cursor: pointer; }
.slot:hover { background: var(--panel); }
.slot.selected { background: var(--accent); color: var(--accent-ink); }
/* admin editor */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; }
.admin-row label { flex: 1 1 140px; font-size: .85rem; }
.admin-row .check { flex: 0 0 auto; }
.admin-row .btn { padding: .4rem .7rem; font-size: .9rem; }
#raw { width: 100%; font-family: Menlo, Consolas, monospace; font-size: .8rem; }
code { background: var(--panel); padding: .1em .35em; border-radius: 3px; font-size: .92em; }

/* admin: week calendar */
.banner { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; background: #fef3cd; color: #5a4300; border: 1px solid #e9d58a; border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; font-size: .95rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin-bottom: .5rem; }
.toolbar .spacer { flex: 1; }
.tool-group { display: inline-flex; gap: .3rem; }
.tool { font: inherit; font-size: .95rem; padding: .5rem .9rem; border: 1px solid var(--accent); color: var(--accent); background: var(--surface); border-radius: var(--radius); cursor: pointer; }
.tool.selected { background: var(--accent); color: var(--accent-ink); }
.inline { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .95rem; }
.inline select, .inline input { width: auto; }
.cal-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cal { display: grid; grid-template-columns: 64px repeat(7, minmax(120px, 1fr)); min-width: 920px; user-select: none; }
.tcol, .dcol { border-right: 1px solid var(--line); }
.dcol:last-child { border-right: 0; }
.dhead { height: 64px; display: grid; align-content: center; justify-items: center; gap: .1rem; border-bottom: 1px solid var(--line); background: var(--panel); position: relative; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dhead strong { font-size: 1.05rem; color: var(--fg); text-transform: none; letter-spacing: 0; }
.dcol.today .dhead strong { color: var(--accent); }
.dcol.override .dhead { background: repeating-linear-gradient(135deg, var(--panel) 0 6px, #cfe0ea 6px 8px); }
.dmenu { position: absolute; top: 4px; right: 4px; width: 28px; border: 0; background: transparent; font-size: 1.1rem; padding: 0; cursor: pointer; color: var(--fg); }
.tcell { height: 14px; font-size: .72rem; color: var(--muted); text-align: right; padding-right: 6px; line-height: 1; transform: translateY(-6px); }
.tcell.hour { border-top: 0; }
.tcol .dhead { background: transparent; }
.dbody { position: relative; }
.cell { height: 14px; border-top: 1px solid transparent; background: #f1f4f6; cursor: crosshair; }
.cell.hour { border-top-color: var(--line); }
.cell.open { background: #d9ecf4; }
body[data-tool="book"] .cell { cursor: default; }
.pill { position: absolute; left: 6px; right: 6px; box-sizing: border-box; background: var(--surface); border: 1px solid var(--accent); color: var(--accent); border-radius: 4px; font-size: .75rem; font-weight: 600; padding: 1px 5px; overflow: hidden; line-height: 1.2; pointer-events: none; }
body[data-tool="book"] .pill { pointer-events: auto; cursor: pointer; }
body[data-tool="book"] .pill:hover { background: var(--panel); }
.booked { position: absolute; left: 6px; right: 6px; box-sizing: border-box; background: #c7d2d9; color: #2b3a44; border-radius: 4px; font-size: .72rem; padding: 1px 5px; overflow: hidden; line-height: 1.2; z-index: 2; pointer-events: none; }
body[data-tool="book"] .booked { pointer-events: auto; cursor: pointer; }
.dfoot { text-align: center; padding: .4rem .2rem; border-top: 1px solid var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .6rem; color: var(--muted); }
.legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: .3rem; }
.sw-open { background: #d9ecf4; } .sw-closed { background: #f1f4f6; border: 1px solid var(--line); } .sw-pill { background: var(--surface); border: 1px solid var(--accent); } .sw-booked { background: #c7d2d9; } .sw-override { background: repeating-linear-gradient(135deg, var(--panel) 0 4px, #cfe0ea 4px 6px); }

/* map */
.map-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem; align-items: start; }
@media (max-width: 860px) { .map-grid { grid-template-columns: 1fr; } }
.map-frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.locator { display: block; width: 100%; height: auto; max-width: 100%; font-family: var(--font-body); }
.locator .m-major line, .locator .m-major path { stroke: #b9cdd9; stroke-width: 9; stroke-linecap: round; }
.locator .m-minor line { stroke: #dbe6ec; stroke-width: 4; stroke-linecap: round; }
.locator .m-street { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.locator .m-road { font-size: 13px; fill: #4e6472; letter-spacing: .02em; }
.locator .m-small { font-size: 11.5px; }
.locator .m-water { font-size: 12px; fill: #4b7f99; letter-spacing: .08em; text-transform: uppercase; }
.locator .m-mark rect, .locator .m-mark path { fill: #8aa7b8; }
.locator .m-mark text { font-size: 13px; fill: var(--fg); font-weight: 600; }
.locator .m-you circle { fill: var(--accent); }
.locator .m-you .m-halo { fill: var(--accent); opacity: .18; }
.locator .m-you text { font-size: 15px; font-weight: 700; fill: var(--accent); }
.locator .m-you .m-small { font-size: 12px; font-weight: 400; fill: var(--muted); }
.locator .m-north path { fill: #4e6472; } .locator .m-north text { font-size: 12px; fill: #4e6472; font-weight: 600; }
.locator .m-scale line { stroke: #4e6472; stroke-width: 2; } .locator .m-scale text { font-size: 11px; fill: #4e6472; }
.map-fallback { margin: 0; padding: .6rem .9rem; border-top: 1px solid var(--line); }
