/* Rivermill Physiotherapy — the whole look of the site.
   One accent colour, one stylesheet, no fonts or assets from anywhere else.
   Contrast: every text/background pair below is at least 6.6:1. */

:root {
  --accent: #0d5c55;          /* 7.84:1 on white */
  --accent-dark: #073f3a;     /* 11.79:1 on white */
  --accent-deep: #123330;     /* header and footer background */
  --ink: #1c2321;             /* body text, 16.01:1 on white */
  --ink-quiet: #4a5553;       /* secondary text, 7.73:1 on white */
  --page: #ffffff;
  --surface: #f4f6f6;         /* cards */
  --surface-tint: #e6efee;    /* call-to-action block */
  --rule: #ccd6d4;
  --flag-bg: #fff4d6;         /* .not-supplied */
  --flag-edge: #a8760a;
  --flag-ink: #5a3d00;        /* 9.12:1 on --flag-bg */

  --measure: 68ch;            /* maximum width of a line of text */
  --gutter: 1.25rem;
  --radius: 6px;
}

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

html {
  /* Keeps the layout honest at 360px: nothing is allowed to push the page wider. */
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

/* Long words and pasted URLs must not widen the page on a narrow screen. */
p,
li,
dd,
dt,
address,
h1,
h2,
h3 {
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---- Skip link ------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  min-height: 44px;
  background: var(--page);
  color: var(--accent-dark);
  font-weight: bold;
  text-decoration: underline;
}

.skip-link:focus {
  left: 0;
}

/* ---- Shared page rhythm ---------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main {
  display: block;
  padding: 1.5rem 0 3rem;
}

main p,
main ul,
main ol,
main dl,
main h1,
main h2,
main h3,
main > address {
  max-width: var(--measure);
}

/* ---- Header and navigation ------------------------------------------- */

.site-header {
  background: var(--accent-deep);
  color: #ffffff;
  border-bottom: 4px solid var(--accent);
}

.site-header a {
  color: #ffffff;
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 0.75rem;
}

.site-name {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: bold;
}

.site-name a {
  text-decoration: none;
}

.site-name a:hover,
.site-name a:focus {
  text-decoration: underline;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0;
  font-size: 1.0625rem;
  text-decoration: underline;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0 0 0.5rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0;
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

/* ---- Headings and text ----------------------------------------------- */

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--ink);
  font-weight: bold;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
}

h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.375rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--rule);
  max-width: var(--measure);
}

h3 {
  margin: 1.5rem 0 0.35rem;
  font-size: 1.125rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.1875rem;
  color: var(--ink);
}

.quiet {
  color: var(--ink-quiet);
}

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

a:hover,
a:focus {
  color: var(--accent-dark);
}

:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 2px;
}

/* ---- Lists ------------------------------------------------------------ */

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.4rem;
}

.plain-list {
  list-style: none;
  padding-left: 0;
}

.plain-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

/* Opening hours and similar name/value pairs. */
.facts {
  margin: 0 0 1.25rem;
  max-width: var(--measure);
}

.facts div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  font-weight: bold;
  min-width: 8rem;
}

.facts dd {
  margin: 0;
}

/* ---- Treatment cards -------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
}

.card h2,
.card h3 {
  margin-top: 0;
  border-bottom: 0;
  padding-bottom: 0;
  font-size: 1.1875rem;
  max-width: none;
}

.card p {
  max-width: none;
}

.card > :last-child {
  margin-bottom: 0;
}

.card-meta {
  margin: 0 0 0.75rem;
  color: var(--ink-quiet);
  font-size: 0.9375rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
  padding-top: 0.5rem;
  font-weight: bold;
}

/* ---- Call to action --------------------------------------------------- */

.cta {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--surface-tint);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.cta h2 {
  margin-top: 0;
  border-bottom: 0;
  padding-bottom: 0;
}

.cta p {
  max-width: var(--measure);
}

.cta > :last-child {
  margin-bottom: 0;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: #ffffff;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font: inherit;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #ffffff;
}

.button-quiet {
  background: var(--page);
  color: var(--accent-dark);
}

.button-quiet:hover,
.button-quiet:focus {
  background: var(--accent-dark);
  color: #ffffff;
}

/* ---- Forms ------------------------------------------------------------ */

form {
  max-width: 34rem;
}

fieldset {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

legend {
  padding: 0 0.4rem;
  font-weight: bold;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: bold;
}

.field .hint {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-quiet);
  font-size: 0.9375rem;
  line-height: 1.5;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.7rem;
  background: var(--page);
  color: var(--ink);
  border: 2px solid var(--ink-quiet);
  border-radius: var(--radius);
  font: inherit;
  line-height: 1.5;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-dark);
}

.field-inline {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.field-inline input {
  width: 1.5rem;
  min-width: 1.5rem;
  height: 1.5rem;
  min-height: 1.5rem;
  margin-top: 0.25rem;
}

.field-inline label {
  font-weight: normal;
}

/* ---- A fact the clinic has not supplied ------------------------------- */

.not-supplied {
  display: block;
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  background: var(--flag-bg);
  color: var(--flag-ink);
  border: 2px dashed var(--flag-edge);
  border-radius: var(--radius);
  font-style: normal;
  font-weight: bold;
}

span.not-supplied,
dd.not-supplied {
  display: inline-block;
  margin-bottom: 0;
  padding: 0.15rem 0.45rem;
  font-size: 0.9375rem;
}

.not-supplied::before {
  content: "Not supplied: ";
  text-transform: none;
}

/* ---- Footer ----------------------------------------------------------- */

.site-footer {
  background: var(--accent-deep);
  color: #e6efee;
  border-top: 4px solid var(--accent);
  padding: 1.75rem 0 2rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.site-footer a {
  color: #ffffff;
}

.site-footer h2 {
  margin: 0 0 0.5rem;
  color: #ffffff;
  font-size: 1.0625rem;
  border-bottom: 0;
  padding-bottom: 0;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.25rem 2rem;
}

.site-footer address {
  font-style: normal;
  margin: 0 0 0.75rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-note {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #3a5b57;
  color: #e6efee;
}

/* ---- Single column under 700px ---------------------------------------- */

@media (max-width: 700px) {
  :root {
    --gutter: 1rem;
  }

  body {
    font-size: 1.0625rem;
  }

  h1 {
    font-size: 1.625rem;
  }

  .header-top {
    display: block;
  }

  .header-phone {
    margin-top: 0.25rem;
  }

  .site-nav ul {
    display: block;
  }

  .site-nav li {
    margin: 0;
    border-top: 1px solid #3a5b57;
  }

  .site-nav a {
    display: flex;
    width: 100%;
    padding: 0.5rem 0;
  }

  .card-grid,
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .cta,
  fieldset {
    padding: 1rem;
  }

  .cta-actions .button {
    width: 100%;
  }

  .facts div {
    display: block;
  }

  .facts dt {
    min-width: 0;
  }
}
/* site-config:css */
/* The honeypot field the form carries against robots. Hidden by class rather
   than by an inline style, because the security headers forbid inline styles. */
.botcheck { display: none; }

/* The note that this is a demonstration, kept quiet and readable. */
.demo-note { margin-top: 0.5rem; opacity: 0.85; }
/* /site-config:css */
/* repair:target-size */
/* Links inside sentences, the site name and the header telephone link measured
   17 to 22 CSS pixels tall, under the 24 pixel floor WCAG 2.2 sets for anything a
   visitor presses. Vertical padding on an inline element widens what a thumb can
   hit without moving a single line of text. Written by the loop's C21 repair. */
main p a, main li a, main dd a, .site-footer p a, .site-footer address a,
.site-name a, .header-phone { padding-block: 4px; }
/* /repair:target-size */
