/* Patrick O'Hare Therapy.
   The practice pages are plain: one column of text, his photo, a form. Nothing is boxed and nothing explains itself.
   The handout library (library.css) is the only part that behaves like a tool. */
/* Fonts are served from this site, not from a third party. Both are under the SIL Open Font Licence (see assets/fonts). */
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/lora-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/lora-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/lora-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/lora-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/source-sans-3-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/source-sans-3-latin-700-normal.woff2) format("woff2"); }
:root {
  --paper: #FFFFFF;
  --wash: #EEF3FB;
  --desk: #EDF1F7;       /* behind sheets of paper in the library */
  --ink: #17223B;        /* blue-black */
  --muted: #4B5870;
  --line: #5F6B7C;       /* borders of things you can type in or press */
  --rule: #C9D2DF;       /* hairlines between things */
  --blue: #1E40AF;
  --blue-b: #2563EB;
  --blue-t: #E8F0FE;
  --green: #0E9F6E;
  --green-d: #047857;
  --red: #B42318;
  --serif: "Lora", Georgia, "Times New Roman", serif;                              /* reading text and headings */
  --sans: "Source Sans 3", "Segoe UI", Tahoma, Verdana, sans-serif;                /* menus, forms, the library */
  --display: var(--serif);
  --body: var(--sans);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.09rem/1.55 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; }
a:hover { color: var(--blue-b); }
:focus-visible { outline: 3px solid var(--blue-b); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; }
p, ul, ol, dl, dd, figure { margin: 0; }
.wrap { max-width: 44.5rem; margin: 0 auto; padding: 0 1.25rem; }
.lib .wrap { max-width: 72rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.top { border-bottom: 1px solid var(--rule); background: var(--paper); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1.5rem; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.brand { font: 600 1.2rem/1.2 var(--serif); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; }
.brand::before { content: ""; width: 5px; height: 1.4rem; border-radius: 3px; background: var(--green); }
.brand:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
.nav a { color: var(--ink); text-decoration: none; min-height: 2.75rem; display: inline-flex; align-items: center; font-size: 1.06rem; }
.nav a:hover { text-decoration: underline; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.4em; }
@media (max-width: 34rem) {
  .nav { width: 100%; justify-content: space-between; gap: 0 0.6rem; }
  .nav a { font-size: 1rem; }
}

/* ---------- Buttons: the form's Send, the one link that asks you to get in touch, and the library's controls ---------- */
.btn { font: 700 1.06rem/1.2 var(--sans); cursor: pointer; border-radius: 6px; padding: 0.65rem 1.15rem; min-height: 2.9rem; border: 1.5px solid var(--blue); background: var(--paper); color: var(--blue); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.btn:hover { background: var(--blue-t); color: var(--blue); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-b); border-color: var(--blue-b); color: #fff; }
.btn.quiet { border-color: var(--line); color: var(--ink); font-weight: 400; }
.btn.quiet:hover { background: var(--wash); color: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- A page of text ---------- */
.text { font: 1.09rem/1.65 var(--serif); padding-top: 2.6rem; }
.text h1 { font-size: clamp(2rem, 7.2vw, 2.75rem); line-height: 1.12; letter-spacing: -0.01em; }
.text h2 { font-size: 1.5rem; margin-top: 3rem; }
.text h2.q { font-size: 1.2rem; line-height: 1.35; margin-top: 2.2rem; }
.text h3 { font-size: 1.15rem; margin-top: 1.9rem; }
.text p, .text ul, .text ol { margin-top: 1rem; }
.text h1 + p { margin-top: 1.3rem; }
.text h2 + p, .text h3 + p { margin-top: 0.6rem; }
.text ul, .text ol { padding-left: 1.3rem; }
.text li + li { margin-top: 0.4rem; }
.text .what { color: var(--muted); margin-top: 0.8rem; }
.text .act { margin-top: 1.6rem; }
.text .small { font: 0.95rem/1.5 var(--sans); color: var(--muted); margin-top: 1.6rem; }

/* The top of the home page and the About page: words, with his photo beside them on a wide screen */
.photo { max-width: 13rem; margin-top: 1.5rem; }
.photo img { width: 100%; border-radius: 3px; }
.photo figcaption { font: 0.92rem/1.4 var(--sans); color: var(--muted); margin-top: 0.5rem; }
.ibody > p:first-child { margin-top: 1.5rem; }
@media (min-width: 44rem) {
  .intro { display: grid; grid-template-columns: minmax(0, 1fr) 13.5rem; column-gap: 2.75rem; grid-template-areas: "head head" "body photo"; }
  .ihead { grid-area: head; }
  .ibody { grid-area: body; }
  .photo { grid-area: photo; max-width: none; margin-top: 1.75rem; align-self: start; }
  .ibody > p:first-child { margin-top: 1.3rem; }
}

/* Fee, session length, where */
.details { margin-top: 1.8rem; border-top: 1px solid var(--rule); }
.details > div { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); column-gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.details dt { color: var(--muted); }
@media (max-width: 30rem) {
  .details > div { grid-template-columns: 1fr; }
  .details dt { font: 0.95rem/1.4 var(--sans); }
}

/* ---------- The contact form ---------- */
.form { display: grid; gap: 1.1rem; margin-top: 1.5rem; font: 1.09rem/1.5 var(--sans); max-width: 34rem; }
.field label, .field legend { font-weight: 700; display: block; padding: 0; margin: 0 0 0.35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea { font: inherit; color: var(--ink); width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 0.65rem 0.75rem; background: var(--paper); min-height: 2.9rem; }
.field textarea { min-height: 9rem; resize: vertical; display: block; }
.field input:focus, .field textarea:focus { border-color: var(--blue-b); }
.field [aria-invalid="true"] { border-color: var(--red); border-width: 2px; }
.field .err { color: var(--red); font-size: 0.95rem; margin: 0.3rem 0 0; font-weight: 700; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.radios label { display: inline-flex; gap: 0.5rem; align-items: center; min-height: 2.75rem; font-weight: 400; margin: 0; cursor: pointer; }
.radios input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--blue); }
.hp { position: absolute; left: -9999px; }
.form .formnote { font-size: 0.95rem; color: var(--muted); margin: 0; }
.status { border-left: 4px solid var(--green-d); padding: 0.2rem 0 0.2rem 0.9rem; }
.status.bad { border-left-color: var(--red); }
.status strong { display: block; }

/* ---------- Urgent help ---------- */
.help { border-left: 4px solid var(--red); padding: 0.1rem 0 0.2rem 1.1rem; }
.text .help { margin-top: 3rem; }
.text .help h2, .help h2, .help h3 { font-size: 1.25rem; margin: 0; }
.help p, .help ul { margin: 0.6rem 0 0; }
.help ul { padding-left: 1.2rem; }
.help li + li { margin-top: 0.3rem; }
.help a { color: var(--ink); font-weight: 700; }

/* ---------- Footer ---------- */
.foot { margin-top: 4.5rem; border-top: 1px solid var(--rule); padding: 1.8rem 0 2.6rem; font-size: 1rem; }
.foot .name { font: 600 1.1rem/1.3 var(--serif); }
.foot address { font-style: normal; margin-top: 0.25rem; }
.flinks { display: flex; flex-wrap: wrap; gap: 0 1.3rem; margin-top: 0.7rem; }
.flinks a, .foot address a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.foot .urgent { margin-top: 0.7rem; max-width: 40rem; }
.foot .legal { margin-top: 0.9rem; color: var(--muted); }

@media (min-width: 48rem) { .text { font-size: 1.15rem; } }
@media print {
  .top .nav, .skip, .flinks, form, .act { display: none !important; }
  body { font-size: 11pt; }
}

/* The handout library. A quiet index: the sheets are the pictures, everything else stays out of their way. */
:root { --sheet: #FFFFFF; }
body.lib { background: var(--desk); font-size: 17px; }
body.lib .foot { margin-top: 0; }
.libhead { padding: 34px 0 22px; }
.libhead h1 { font-size: clamp(30px, 6vw, 46px); font-weight: 700; }
.libhead .lead { max-width: 62ch; font-size: 19px; margin: 14px 0 0; }
.libhead .facts { margin: 14px 0 0; color: var(--muted); }
.libhead .facts strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.controls { background: var(--sheet); border: 1.25px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.controls label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.controls .q, .controls .wide { grid-column: 1 / -1; }
.controls input[type=search], .controls select { font: inherit; color: var(--ink); background: var(--sheet); border: 1.25px solid var(--line); border-radius: 6px; padding: 10px 12px; width: 100%; min-height: 46px; }
.controls input[type=search]:focus, .controls select:focus { border-color: var(--blue); }
.controls .row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.controls .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.controls .tools .btn { padding: 10px 13px; }
.controls .more { grid-column: 1 / -1; display: none; gap: 12px; grid-template-columns: 1fr 1fr; }
.controls.open .more { display: grid; }
#f-toggle[aria-expanded=true] { background: var(--blue-t); border-color: var(--blue); color: var(--blue); }
#count { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1.25px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { font: inherit; border: 0; background: var(--sheet); color: var(--ink); padding: 9px 14px; min-height: 42px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--ink); color: #fff; }

.topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.topics a { display: inline-flex; align-items: center; gap: 6px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px; padding: 7px 13px; min-height: 40px; text-decoration: none; color: var(--ink); font-size: 15px; }
.topics a:hover { border-color: var(--blue); color: var(--blue); }
.topics a span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }

.topic { padding: 34px 0 0; scroll-margin-top: 12px; }
.topic h2 { font-size: 26px; font-weight: 600; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.topic h2 span { font: 400 15px var(--body); color: var(--muted); font-variant-numeric: tabular-nums; }
.topic > p { margin: 6px 0 0; color: var(--muted); max-width: 65ch; }
.grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 22px 16px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.card a { display: block; text-decoration: none; color: var(--ink); }
.card .thumb { display: block; background: var(--sheet); border: 1px solid #A9B2BF; border-radius: 3px; box-shadow: 0 1px 2px rgba(23, 34, 59, .10), 0 6px 14px -10px rgba(23, 34, 59, .35); aspect-ratio: 210 / 297; overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card a:hover .thumb, .card a:focus-visible .thumb { border-color: var(--blue); transform: translateY(-3px); }
.card .t { display: block; font-weight: 700; font-size: 15.5px; line-height: 1.3; margin-top: 10px; }
.card .m { display: block; font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.card .d { display: none; }
.card[hidden], .topic[hidden] { display: none; }

body.list .grid { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--rule); }
body.list .card a { display: grid; grid-template-columns: 46px 1fr; gap: 4px 14px; padding: 12px 4px; border-bottom: 1px solid var(--rule); align-items: start; }
body.list .card .thumb { grid-row: 1 / span 3; box-shadow: none; }
body.list .card a:hover .thumb { transform: none; }
body.list .card .t { margin-top: 0; font-size: 17px; }
body.list .card .d { display: block; font-size: 15px; color: var(--ink); max-width: 75ch; }
#none, #note { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 18px; margin: 22px 0 0; }
#note { border-left: 5px solid var(--blue); }
#help-top { margin-top: 22px; }
#help-top dl { max-width: 70ch; }

.band { margin-top: 52px; padding: 40px 0 46px; background: var(--sheet); border-top: 1.5px solid var(--line); }
.band + .band { margin-top: 0; border-top: 1px solid var(--rule); }
.band h2 { font-size: 30px; font-weight: 700; }
.band .sub { color: var(--muted); max-width: 65ch; margin: 8px 0 0; }
.packs { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.pack { border: 1.25px solid var(--line); border-radius: 8px; background: var(--sheet); }
.pack summary { cursor: pointer; padding: 14px 16px; list-style: none; display: grid; gap: 2px; min-height: 44px; }
.pack summary::-webkit-details-marker { display: none; }
.pack summary h3 { font: 700 18px/1.3 var(--body); }
.pack summary h3::after { content: " +"; color: var(--blue); font-weight: 400; }
.pack[open] summary h3::after { content: " \2212"; }
.pack summary span { color: var(--muted); font-size: 15px; }
.pack ol { margin: 0; padding: 0 16px 6px 38px; }
.pack li { padding: 3px 0; }
.pack .act { padding: 6px 16px 16px; }
.libabout { display: grid; gap: 26px; grid-template-columns: 1fr; margin-top: 18px; align-items: start; }
.libabout p, .libabout li { max-width: 65ch; }
.libabout ul { padding-left: 20px; margin: 8px 0 0; }
.libabout h3 { font: 700 18px/1.3 var(--body); margin: 24px 0 6px; }
.libabout p + p, .libabout ul + p { margin-top: 14px; }

dialog#viewer { border: 0; padding: 0; width: min(1080px, 100%); max-width: 100%; height: 100%; max-height: 100%; background: var(--desk); color: var(--ink); overscroll-behavior: contain; }
dialog#viewer::backdrop { background: rgba(23, 34, 59, .55); }
.vbar { position: sticky; top: 0; z-index: 2; background: var(--sheet); border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; }
.vbar p { margin: 0; color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vbody { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 18px 16px 30px; }
.vinfo h2, .vinfo h1 { font-size: 28px; font-weight: 700; }
.vinfo .sub { margin: 6px 0 0; color: var(--muted); }
.tags { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--blue-t); color: var(--blue); border-radius: 4px; padding: 3px 9px; font-size: 14px; }
.tags li.plain { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); }
.vinfo .desc { margin: 14px 0 0; max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.hint { font-size: 15px; color: var(--muted); margin: 12px 0 0; max-width: 60ch; }
.pairline { font-size: 15px; margin: 10px 0 0; max-width: 60ch; padding: 9px 12px; background: var(--blue-t); border-radius: 8px; }
.pairline a { font-weight: 700; }
.pairlist { list-style: none; padding: 0 16px 10px; margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.pack .pairlist li { padding: 9px 0; border-top: 1px solid var(--rule); line-height: 1.45; }
.pairlist .with { color: var(--muted); font-size: 14px; padding: 0 2px; }
.pairlist .pdl { display: inline-flex; align-items: center; min-height: 40px; margin-left: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; font-weight: 700; text-decoration: none; vertical-align: middle; }
.related { margin: 22px 0 0; }
.related h3, .related h2 { font: 700 16px/1.3 var(--body); }
.related ul { list-style: none; padding: 0; margin: 6px 0 0; }
.related li { padding: 4px 0; }
.vpages { display: grid; gap: 16px; }
.vpages img { width: 100%; background: var(--sheet); border: 1px solid #A9B2BF; border-radius: 3px; box-shadow: 0 8px 22px -14px rgba(23, 34, 59, .45); }
#copied { font-size: 15px; color: var(--green-d); min-height: 1.4em; margin: 8px 0 0; }

.page { padding-top: 26px; padding-bottom: 10px; }
.crumbs { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.page .vbody { padding: 0; }

@media (max-width: 719px) {
  /* Phones: the handout itself comes straight after the title and the buttons. */
  .vbody { display: flex; flex-direction: column; gap: 0; }
  .vinfo { display: contents; }
  .vinfo > h1, .vinfo > h2 { order: 1; }
  .vinfo > .sub { order: 2; }
  .vinfo > .actions { order: 3; }
  .vinfo > #copied { order: 4; }
  .vinfo > .hint { order: 5; }
  .vinfo > .pairline { order: 6; }
  .vpages { order: 6; margin-top: 16px; }
  .vinfo > .tags { order: 7; margin-top: 22px; }
  .vinfo > .desc { order: 8; }
  .vinfo > .related { order: 9; }
}
@media (min-width: 720px) {
  .controls { grid-template-columns: 2fr 1fr 1fr 1fr; position: sticky; top: 8px; z-index: 5; box-shadow: 0 10px 24px -20px rgba(23, 34, 59, .6); }
  .controls .q, .controls .wide { grid-column: auto; }
  .controls .more { display: contents; }
  #f-toggle { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 28px 20px; }
  .topic { scroll-margin-top: 150px; }
  .packs { grid-template-columns: 1fr 1fr; align-items: start; }
  .packs > li:has(#two-sided) { grid-column: 1 / -1; }
  .pairlist { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .libabout { grid-template-columns: 1.2fr 1fr; }
  dialog#viewer { height: calc(100% - 40px); border-radius: 10px; }
  .vbody { grid-template-columns: minmax(280px, 360px) 1fr; padding: 24px 26px 36px; gap: 30px; }
  .vinfo { position: sticky; top: 76px; align-self: start; }
  .page .vinfo { top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card .thumb { transition: none; }
}
/* Printing from the browser: just the handout, one sheet per page, no site furniture. (The PDF is still the sharper print.) */
@media print {
  .top, .skip, .controls, .topics, .foot, .band, .crumbs, .vbar, .vinfo, #help-top, #note, #none { display: none !important; }
  html, body { background: #fff; }
  .page, .page .vbody, .vbody, .vpages { display: block; margin: 0; padding: 0; max-width: none; }
  .vpages img { width: 100%; height: auto; border: 0; border-radius: 0; box-shadow: none; break-after: page; page-break-after: always; break-inside: avoid; }
  .vpages img:last-child { break-after: auto; page-break-after: auto; }
  body.viewing > *:not(dialog) { display: none !important; }
  dialog#viewer[open] { position: static; width: 100%; height: auto; max-height: none; border-radius: 0; overflow: visible; background: #fff; }
}

.page h1.big { font-size: 30px; }
.page .lead { max-width: 60ch; font-size: 19px; margin: 14px 0 0; }
.page .go { margin-top: 18px; }
