/* Riverstone Therapy — original page styling, no external fonts or services. */
:root {
  --cream: #f6f2eb;
  --paper: #fffefd;
  --ink: #263e51;
  --blue: #386792;
  --blue-dark: #294e70;
  --blue-pale: #eef3f7;
  --gold: #9a7f52;
  --muted: #666c70;
  --line: #e9e4dc;
  --radius: 26px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { min-width: 280px; }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: radial-gradient(ellipse at 2% 18%, #e9eef1 0, transparent 46%), radial-gradient(ellipse at 100% 95%, #ede5d8 0, transparent 45%), var(--cream); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button:disabled { cursor: wait; opacity: .65; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
.icon { display: block; width: 21px; height: 21px; flex: 0 0 auto; }
.skip-link { position: fixed; z-index: 100; top: -90px; left: 18px; padding: 12px 18px; background: white; border-radius: 8px; }
.skip-link:focus { top: 18px; }
.page-shell { max-width: 1032px; margin: 0 auto; padding: 25px 32px 22px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-logo { width: 67px; height: auto; flex: 0 0 auto; border-radius: 50%; }
.brand-name { font-size: 13px; letter-spacing: 2.7px; line-height: 1.6; font-weight: 500; }
.brand-name > span { display: block; color: #826b46; font-size: 10px; letter-spacing: 3.6px; }
.topbar-label { color: #6c7072; font-size: 10px; font-weight: 500; letter-spacing: 2.2px; }
.business-card { display: grid; grid-template-columns: 42% 58%; background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(210, 201, 185, .65); box-shadow: 0 24px 65px -32px rgba(52, 49, 43, .30), 0 3px 16px -8px rgba(54, 64, 67, .08); }
.portrait-panel { position: relative; background: white; overflow: hidden; min-height: 690px; }
.portrait { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 48% 35%; }
.portrait-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(32,50,62,.77) 0, rgba(35,49,59,.15) 24%, transparent 45%); pointer-events: none; }
.portrait-caption { position: absolute; bottom: 40px; left: 34px; z-index: 1; color: white; }
.caption-line { width: 35px; height: 2px; background: #cfb890; display: block; margin-bottom: 18px; }
.portrait-caption p { font-family: Georgia, "Times New Roman", serif; font-size: 35px; line-height: 1.14; letter-spacing: -.6px; margin: 0 0 22px; }
.caption-label { font-size: 9px; letter-spacing: 2.7px; }
.details-panel { padding: 46px 44px 30px; min-width: 0; }
.eyebrow { font-size: 10px; letter-spacing: 2.5px; font-weight: 600; color: #806b4c; line-height: 1.5; }
.detail-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.detail-eyebrow > span { width: 28px; height: 1px; background: var(--gold); }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { margin: 0; font-size: 41px; line-height: 1.12; letter-spacing: -1.2px; }
.name-first, .name-rest { display: block; }
.name-rest { margin-top: 3px; font-size: 33px; line-height: 1.15; letter-spacing: -.8px; }
.organization { font-size: 15px; color: #707476; margin: 14px 0 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 51px; padding: 14px 16px; border-radius: 10px; text-decoration: none; border: 1px solid transparent; font-size: 13px; font-weight: 600; line-height: 1.25; transition: background-color .15s, border-color .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--blue); color: white; border-color: var(--blue); }
.button-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.button-secondary { color: var(--ink); background: transparent; border-color: #dcdedc; }
.button-secondary:hover { background: var(--blue-pale); border-color: #c5d1d8; }
.save-contact { width: 100%; min-height: 56px; justify-content: flex-start; font-size: 15px; padding: 16px 20px; }
.button-arrow { margin-left: auto; }
.save-hint { color: var(--muted); font-size: 11px; text-align: center; margin: 11px 0 19px; line-height: 1.5; }
.contact-list { font-style: normal; }
.contact-row { display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 15px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-row:hover .contact-value { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.contact-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--blue-pale); border-radius: 11px; color: var(--blue); flex: 0 0 auto; }
.contact-copy { flex: 1; min-width: 0; }
.contact-label { font-size: 9px; display: block; letter-spacing: 1.6px; color: var(--muted); margin-bottom: 6px; }
.contact-value { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.row-arrow { width: 16px; height: 16px; color: #927c5a; }
.card-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 24px; }
.card-tools .button { font-size: 12px; gap: 8px; padding-inline: 10px; }
.card-tools .icon { width: 18px; height: 18px; }
.save-help { margin-top: 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.save-help summary { cursor: pointer; width: fit-content; }
.save-help p { margin: 10px 0 0; font-size: 12px; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 24px; color: #72716a; font-size: 11px; }
.page-footer > :last-child { color: #7a7467; }
/* Dedicated QR screen / installable home-screen entry point */
.qr-shell { width: min(100%, 532px); margin: 0 auto; padding: 22px 24px max(20px, env(safe-area-inset-bottom)); }
.qr-page .topbar { margin-bottom: 20px; }
.qr-page .brand-logo { width: 55px; }
.qr-page .brand-name { font-size: 10px; letter-spacing: 2px; }
.qr-page .brand-name > span { font-size: 8px; letter-spacing: 3px; }
.back-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; text-decoration: none; min-height: 44px; }
.back-link .icon { width: 15px; height: 15px; }
.qr-card { padding: 32px 32px 27px; background: var(--paper); border: 1px solid rgba(210,201,185,.7); border-radius: var(--radius); box-shadow: 0 16px 55px -30px rgba(60,56,50,.28); text-align: center; }
.qr-card h1 { font-size: 39px; margin-top: 13px; letter-spacing: -1px; }
.qr-instruction { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 11px auto 19px; max-width: 300px; }
.qr-instruction strong { font-weight: 600; }
.qr-frame { border: 1px solid #ded4c5; border-radius: 18px; padding: 8px; width: min(100%, 300px); margin: 0 auto; background: white; box-shadow: 0 6px 25px -18px #9b8461; }
.qr-code { width: 100%; aspect-ratio: 1; background: white; }
.qr-code svg { width: 100%; height: auto; display: block; shape-rendering: crispEdges; }
.qr-address { display: block; color: #6a6d6e; font-size: 10px; line-height: 1.6; margin: 12px auto 22px; text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.qr-address:hover { text-decoration: underline; }
.qr-identity { display: flex; align-items: center; justify-content: center; gap: 14px; text-align: left; border-top: 1px solid var(--line); padding-top: 19px; margin-bottom: 23px; }
.qr-identity img { border-radius: 50%; width: 57px; height: 57px; object-fit: cover; border: 1px solid var(--line); }
.qr-identity p { font-family: Georgia,"Times New Roman",serif; font-size: 19px; line-height: 1.23; letter-spacing: -.3px; margin: 0 0 6px; }
.qr-identity span { color: var(--muted); font-size: 10px; }
.qr-actions { display: grid; grid-template-columns: 1.12fr 1fr; gap: 9px; }
.qr-actions .button { font-size: 11px; padding: 12px 9px; gap: 7px; }
.qr-actions .icon { width: 17px; height: 17px; }
.install-area { text-align: center; margin-top: 18px; }
.install-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 14px; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 12px; font-weight: 600; border-radius: 8px; }
.install-button:hover { background: rgba(255,255,255,.55); }
.install-button .icon { width: 18px; height: 18px; }
.install-button .icon:last-child { width: 15px; height: 15px; }
.install-area p { font-size: 10px; color: var(--muted); margin: 3px 0 0; }
.install-area .offline-status { font-size: 9px; color: #546957; margin-top: 10px; }
.qr-footer { text-align: center; font-size: 9px; color: #72716a; margin-top: 24px; }
/* Accessible, optional help and share dialogs */
.help-dialog { width: min(440px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); padding: 26px; box-shadow: 0 20px 90px -20px #22313f66; max-height: calc(100dvh - 40px); overflow: auto; }
.help-dialog::backdrop { background: rgba(32,46,55,.42); backdrop-filter: blur(4px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.icon-button { display: flex; justify-content: center; align-items: center; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 50%; width: 40px; height: 40px; flex: 0 0 auto; }
.help-dialog h2 { font-size: 29px; letter-spacing: -.7px; line-height: 1.15; margin: 0 0 14px; }
.help-dialog p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.help-dialog label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.help-dialog input { width: 100%; padding: 13px 10px; color: var(--ink); background: #f5f5f3; border: 1px solid #d5d8d9; border-radius: 7px; font-size: 13px; }
.help-dialog > .button { width: 100%; margin-top: 15px; }
.instruction-block { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 18px; }
.instruction-block h3 { font-size: 13px; margin: 0; }
.instruction-block p { margin: 8px 0 0; font-size: 12px; }
.help-dialog .small-note { font-size: 10px; }
.preview-notice { font-size: 11px !important; color: #75532b !important; background: #f9f1e3; border: 1px solid #e8d5b7; padding: 10px 12px; border-radius: 8px; line-height: 1.6; }
.preview-qr-dialog { text-align: center; }
.preview-qr-dialog .qr-code { width: min(100%, 280px); margin-inline: auto; }
.toast { position: fixed; z-index: 100; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: white; border-radius: 10px; padding: 13px 20px; width: max-content; max-width: calc(100% - 30px); font-size: 12px; line-height: 1.5; box-shadow: 0 4px 20px #0003; text-align: center; }
.not-found { margin: 80px auto; }
.not-found h1 { font-size: 35px; margin-top: 20px; }
@media (max-width: 860px) and (min-width: 641px) {
  .page-shell { padding-inline: 24px; }
  .business-card { grid-template-columns: 40% 60%; }
  .details-panel { padding: 35px 28px 26px; }
  h1 { font-size: 37px; }
  .name-rest { font-size: 29px; }
  .portrait-caption { left: 25px; }
  .portrait-caption p { font-size: 30px; }
}
@media (max-width: 640px) {
  .page-shell { padding: 15px 18px 20px; max-width: 470px; }
  .topbar { margin-bottom: 15px; }
  .brand { gap: 10px; }
  .brand-logo { width: 52px; }
  .brand-name { font-size: 10px; letter-spacing: 2px; }
  .brand-name > span { font-size: 8px; letter-spacing: 2.7px; }
  .topbar-label { font-size: 8px; letter-spacing: 1.25px; max-width: 92px; text-align: right; line-height: 1.65; }
  .business-card { display: block; border-radius: 21px; }
  .portrait-panel { height: 204px; min-height: 0; }
  .portrait { width: 60%; left: auto; right: 0; object-fit: cover; object-position: center top; }
  .portrait-panel::after { background: linear-gradient(90deg, white 0, white 33%, rgba(255,255,255,.25) 43%, transparent 55%); }
  .portrait-caption { left: 21px; bottom: 37px; color: var(--ink); }
  .portrait-caption p { font-size: 22px; letter-spacing: -.65px; margin: 0; max-width: 120px; }
  .caption-line { background: #a58c60; width: 22px; height: 1px; margin-bottom: 11px; }
  .caption-label { display: none; }
  .details-panel { padding: 25px 23px 22px; }
  .detail-eyebrow { font-size: 8px; letter-spacing: 2.2px; gap: 10px; margin-bottom: 12px; }
  .detail-eyebrow > span { width: 23px; }
  h1 { font-size: 31px; letter-spacing: -.7px; }
  .name-rest { font-size: 26px; line-height: 1.12; margin-top: 3px; letter-spacing: -.55px; }
  .organization { font-size: 12px; margin: 10px 0 21px; }
  .save-contact { min-height: 50px; font-size: 14px; padding: 13px 15px; }
  .save-hint { font-size: 9px; margin: 9px 0 10px; }
  .contact-row { min-height: 67px; padding: 12px 0; gap: 12px; }
  .contact-icon { width: 35px; height: 35px; border-radius: 9px; }
  .contact-icon .icon { width: 18px; height: 18px; }
  .contact-label { font-size: 8px; margin-bottom: 4px; }
  .contact-value { font-size: 12px; }
  .row-arrow { width: 14px; height: 14px; }
  .card-tools { margin-top: 20px; gap: 9px; }
  .card-tools .button { min-height: 45px; font-size: 10px; gap: 7px; }
  .card-tools .icon { width: 17px; height: 17px; }
  .save-help { margin-top: 14px; font-size: 9px; }
  .page-footer { margin-top: 17px; font-size: 9px; }
  .qr-shell { max-width: 455px; padding: 14px 18px max(18px,env(safe-area-inset-bottom)); }
  .qr-page .topbar { margin-bottom: 15px; }
  .qr-page .brand-logo { width: 49px; }
  .qr-card { padding: 25px 21px 22px; border-radius: 21px; }
  .qr-card h1 { font-size: 33px; margin-top: 10px; }
  .qr-card .eyebrow { font-size: 9px; }
  .qr-instruction { font-size: 10px; margin-top: 10px; margin-bottom: 17px; }
  .qr-frame { width: min(100%,282px); padding: 5px; }
  .qr-address { font-size: 9px; margin: 11px 0 18px; }
  .qr-identity { padding-top: 16px; margin-bottom: 20px; gap: 12px; }
  .qr-identity img { width: 48px; height: 48px; }
  .qr-identity p { font-size: 17px; }
  .qr-identity span { font-size: 9px; }
  .qr-actions .button { font-size: 10px; padding: 12px 8px; min-height: 45px; }
  .install-area { margin-top: 12px; }
  .qr-footer { margin-top: 20px; font-size: 8px; }
}
@media (max-width: 360px) {
  .page-shell, .qr-shell { padding-inline: 12px; }
  .details-panel { padding-inline: 18px; }
  .portrait-panel { height: 180px; }
  .portrait-caption { left: 17px; }
  .portrait-caption p { font-size: 21px; }
  .name-rest { font-size: 24px; }
  .contact-row { gap: 9px; }
  .contact-value { font-size: 11px; }
  .qr-card { padding-inline: 16px; }
  .qr-identity p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: white; }
  .topbar, .page-footer, .qr-footer, .card-tools, .save-help, .qr-actions, .install-area { display: none; }
  .page-shell, .qr-shell { padding: 0; }
  .business-card, .qr-card { box-shadow: none; }
  .save-contact, .save-hint { display: none; }
}
