/* Client portal (Comfy Couch built-in booking). Laid out like Jane's "My Account": a coloured
   bar, the client's name, a menu on the left and the page on the right. --brand comes from the
   practice's settings (default slate, like the sample site). */
:root {
  --brand: #3E5A5F; --ink: #263234; --ink-2: #4A5658; --muted: #6B7577; --line: #DCD9D3; --line-2: #ECEAE5;
  --bg: #F6F5F2; --card: #fff; --ok: #1F6B43; --ok-bg: #EAF5EE; --warn: #8A4B12; --warn-bg: #FBF1E3; --bad: #B42318;
  --radius: 6px; --font: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font); }
a { color: var(--brand); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 0; }
h2 { font-size: 1.75rem; margin-bottom: 14px; }
h3 { font-size: 1.15rem; margin: 26px 0 10px; }
.pt-wrap { width: min(1140px, 100% - 32px); margin: 0 auto; }
.pt-skip { position: absolute; left: -999px; }
.pt-skip:focus { left: 16px; top: 8px; z-index: 10; background: #fff; padding: 8px 12px; }
.pt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* bar, header */
.pt-top { background: var(--brand); color: #fff; font-size: .98rem; }
.pt-top .pt-wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; min-height: 50px; padding: 8px 0; }
.pt-top nav { display: flex; gap: 22px; align-items: center; }
.pt-top a, .pt-top button { color: #fff; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; display: inline-flex; gap: 6px; align-items: center; }
.pt-top a:hover, .pt-top button:hover { text-decoration: underline; }
.pt-top form { margin: 0; }
.pt-head { background: color-mix(in srgb, var(--brand) 86%, #000); color: #fff; }
.pt-head .pt-wrap { padding: 18px 0 22px; }
.pt-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 300; }
.pt-practice { margin: 0 0 4px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.pt-demo { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid rgb(255 255 255 / .5); border-radius: 99px; letter-spacing: .06em; }

/* layout */
.pt-main { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; padding: 28px 0 56px; }
.pt-single { padding: 36px 0 64px; }
.pt-content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px 30px; min-width: 0; }
.pt-out .pt-content { background: none; border: 0; padding: 0; }

/* menu */
.pt-menu summary { font-size: 1.75rem; font-weight: 500; list-style: none; cursor: default; margin-bottom: 14px; }
.pt-menu summary::-webkit-details-marker { display: none; }
.pt-menu ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.pt-menu li + li { border-top: 1px solid var(--line); }
.pt-menu a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 15px; color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.pt-menu a:hover { background: var(--bg); }
.pt-menu a[aria-current] { background: color-mix(in srgb, var(--brand) 16%, #fff); color: var(--ink); font-weight: 500; }
.pt-badge { flex: none; min-width: 22px; padding: 0 7px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .75rem; line-height: 22px; text-align: center; }
.pt-book { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 20px; padding: 9px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); text-decoration: none; font-size: .95rem; }
.pt-book:hover { border-color: var(--brand); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 20px; border: 1px solid var(--brand); border-radius: var(--radius);
  background: var(--brand); color: #fff; font: 500 .95rem var(--font); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: color-mix(in srgb, var(--brand) 82%, #000); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn-sm { min-height: 34px; padding: 5px 13px; font-size: .88rem; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); border-color: var(--ink-2); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: #EEF0F0; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / .6); }
.btn-ghost-light:hover { background: rgb(255 255 255 / .1); }
.btn-block { width: 100%; }

/* forms */
label, legend { display: block; font-weight: 500; font-size: .93rem; margin: 14px 0 5px; padding: 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #C9C6BF; border-radius: var(--radius); background: #fff; color: var(--ink); font: inherit; }
textarea { min-height: 110px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pt-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 6px; margin: 0 0 18px; }
.pt-card h3 { margin-top: 2px; }
.pt-narrow { max-width: 460px; margin: 0 auto; padding: 24px 26px 14px; }
.pt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.pt-span { grid-column: 1 / -1; }
.pt-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 12px 0; cursor: pointer; }
.pt-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pt-static { margin: 0; min-height: 44px; display: flex; align-items: center; gap: 10px; }
.pt-fs legend { margin-top: 16px; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-chip { display: inline-flex; gap: 8px; align-items: center; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; font-weight: 400; cursor: pointer; }
.pt-chip small { color: var(--muted); }
.pt-chip:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, #fff); }
.pt-pw { position: relative; }
.pt-pw input { padding-right: 48px !important; }
.pt-pw input::-ms-reveal { display: none; }
.pt-pw-toggle { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 38px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
.pt-pw-toggle:hover { color: var(--ink); }
.pt-meter { height: 5px; border-radius: 99px; background: var(--line-2); margin-top: 7px; overflow: hidden; }
.pt-meter span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s, background .2s; }

/* messages */
.pt-ok, .pt-warn { padding: 11px 15px; border-radius: var(--radius); margin: 0 0 16px; }
.pt-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #C3E2CF; }
.pt-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #EBD3B0; }
.pt-notice { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; padding: 13px 16px; margin-bottom: 20px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--brand) 10%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 30%, #fff); }
.pt-notice p { margin: 0; }
.pt-empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; margin: 0 0 16px; }
.pt-empty .btn { margin-top: 10px; }
.pt-small { font-size: .88rem; color: var(--muted); }
.pt-muted { color: var(--muted); font-size: .9rem; }
.pt-tag { display: inline-block; padding: 1px 9px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 13%, #fff); color: var(--ink); font-size: .78rem; }
.pt-tag-off { background: var(--line-2); color: var(--muted); }
.pt-rule { border: 0; border-top: 1px solid var(--line); margin: 30px 0 24px; }

/* tables (stack into cards on phones) */
.pt-titlebar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pt-titlebar h2 { margin: 0; }
.pt-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); margin: 0 0 18px; font-size: .95rem; }
.pt-table th, .pt-table td { text-align: left; vertical-align: top; padding: 11px 12px; border: 1px solid var(--line); }
.pt-table th { font-weight: 500; background: #FBFAF8; }
.pt-act { white-space: nowrap; width: 1%; }
.pt-act form { display: inline; margin: 0; }
.pt-list { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.pt-list li { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 12px 15px; }
.pt-list li + li { border-top: 1px solid var(--line); }
.pt-list li div { display: grid; gap: 2px; }
.pt-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 16px 18px; margin-bottom: 18px; border-radius: var(--radius); background: var(--bg); }
.pt-total b { font-size: 1.6rem; font-weight: 500; }

/* appointment options menu */
.pt-drop { position: relative; display: inline-block; }
.pt-drop summary { list-style: none; display: grid; place-items: center; width: 36px; height: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.pt-drop summary::-webkit-details-marker { display: none; }
.pt-drop > div { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 230px; padding: 6px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / .1); white-space: normal; }
.pt-drop a, .pt-drop button { display: block; width: 100%; padding: 8px 14px; text-align: left; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; font-size: .93rem; cursor: pointer; }
.pt-drop a:hover, .pt-drop button:hover { background: var(--bg); }
.pt-drop form { display: block; border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 4px; }
.pt-drop button { color: var(--bad); }
.pt-drop span { display: block; padding: 8px 14px; }

/* reschedule */
.pt-slots fieldset { margin: 0 0 14px; }
.pt-slots legend { font-weight: 500; margin: 0 0 8px; }
.pt-slots div { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-slot { min-width: 96px; padding: 8px 12px; border: 1px solid var(--brand); border-radius: var(--radius); background: #fff; color: var(--brand); font: 500 .93rem var(--font); cursor: pointer; }
.pt-slot:hover { background: var(--brand); color: #fff; }

/* calendar feed, cards */
.pt-copy { display: flex; gap: 8px; margin: 14px 0 20px; }
.pt-copy input { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.pt-cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
.pt-cards3 > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.pt-cards3 h3 { margin: 0 0 6px; font-size: 1rem; }
.pt-cards3 p { margin: 0 0 8px; font-size: .9rem; }
.pt-paypanel { margin: 14px 0; padding: 20px; border-radius: 10px; background: #44585C; color: #fff; }
.pt-paypanel h3 { margin: 0 0 12px; color: #fff; }
.pt-paypanel .pt-warn { margin-top: 12px; }
.pt-cardfield { min-height: 120px; }
.pt-addcard { margin: 6px 0 14px; }

/* footer */
.pt-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.pt-foot .pt-wrap { padding: 18px 0 28px; }
.pt-foot p { margin: 0 0 4px; }

/* ---- forms built in the form builder (also used by the admin preview) ---- */
.pf { max-width: 760px; }
.pf-description { color: var(--ink-2); margin-bottom: 8px; }
.pf-heading { font-size: 1.35rem; margin: 30px 0 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.pf > .pf-heading:first-of-type { border-top: 0; padding-top: 0; }
.pf-paragraph { color: var(--ink-2); }
.pf-field { margin: 0 0 6px; }
.pf-req { color: var(--muted); font-weight: 400; font-size: .85rem; }
.pf-help { margin: -2px 0 6px; color: var(--muted); font-size: .88rem; }
.pf-options { display: grid; gap: 6px; }
.pf-option { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 400; cursor: pointer; }
.pf-other input[type=text] { min-height: 36px; padding: 5px 9px; width: auto; flex: 1; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.pf-sub label { font-weight: 400; font-size: .88rem; color: var(--ink-2); margin: 8px 0 4px; }
.pf-grid .pf-sub:has(.pf-wide) { grid-column: 1 / -1; }
.pf-policy { max-height: 220px; overflow: auto; padding: 12px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #FBFAF8; font-size: .92rem; color: var(--ink-2); }
.pf-policy p { margin: 0 0 8px; }
.pf-agree { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; font-weight: 500; cursor: pointer; }
.pf-sign { position: relative; height: 160px; border: 1px solid #C9C6BF; border-radius: var(--radius); background: #fff; touch-action: none; }
.pf-sign canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.pf-sign::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 34px; border-bottom: 1px solid var(--line); pointer-events: none; }
.pf-sign-hint { position: absolute; left: 24px; bottom: 12px; color: var(--muted); font-size: .8rem; pointer-events: none; }
.pf-sign.signed .pf-sign-hint { display: none; }
.pf-clear { position: absolute; right: 8px; top: 8px; padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font: inherit; font-size: .82rem; cursor: pointer; }
.pf-error { color: var(--bad); font-size: .88rem; margin: 6px 0 0; }
.pf-summary { padding: 10px 14px; border-radius: var(--radius); background: #FDF0EE; margin: 0 0 12px; }
.has-error input:not([type=checkbox]):not([type=radio]), .has-error select, .has-error textarea, .has-error .pf-sign, .has-error .pf-policy { border-color: var(--bad); }
.pf-actions { margin: 26px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .pt-main { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .pt-menu summary { font-size: 1.1rem; cursor: pointer; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin: 0; display: flex; justify-content: space-between; }
  .pt-menu summary::after { content: "▾"; }
  .pt-menu[open] summary { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
  .pt-menu[open] ul { border-radius: 0 0 var(--radius) var(--radius); }
  .pt-book { margin-top: 10px; }
  .pt-content { padding: 18px 16px 22px; }
  .pt-cards3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pt-grid, .pf-grid { grid-template-columns: 1fr; }
  h2 { font-size: 1.45rem; }
  .pt-table, .pt-table tbody, .pt-table tr, .pt-table td { display: block; width: 100%; }
  .pt-table thead { display: none; }
  .pt-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .pt-table td { border: 0; padding: 4px 12px; }
  .pt-table td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .pt-act { width: auto; white-space: normal; }
  .pt-drop > div { left: 0; right: auto; }
  .pt-list li { flex-direction: column; align-items: flex-start; }
  .pt-copy { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* Video sessions: the counsellor's own Zoom, Google Meet or Teams link (2026-10-06) */
.pt-join { margin-top: 6px; }
/* Secure messages */
.pt-thread { display: grid; gap: 10px; margin: 14px 0 18px; }
.pt-msg { max-width: 560px; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.pt-msg.mine { justify-self: end; background: color-mix(in srgb, var(--brand) 9%, #fff); }
.pt-msg small { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; white-space: normal; }
/* Questionnaires (PHQ-9, GAD-7) */
.pt-q { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0; }
.pt-q legend { font-weight: 500; padding: 0; margin-bottom: 8px; }
.pt-scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
.pt-scale label { display: flex; gap: 8px; align-items: center; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; cursor: pointer; }
.pt-scale label:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); }
