:root {
  color-scheme: light;
  --ink: #15264a;
  --muted: #52647a;
  --blue: #0b4bb7;
  --line: #dce5ed;
  --wash: #f4f8fc;
  --green: #06695c;
  font-family: Inter, "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.45; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: var(--blue); }
button, a, input { touch-action: manipulation; }
:focus-visible { outline: 3px solid #2774d0; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.6rem, 2.7vw, 2rem); letter-spacing: -.045em; line-height: 1.18; }
h2 { font-size: 1rem; letter-spacing: -.02em; }
h3, label, button { font-size: .875rem; }
label { font-weight: var(--weight-regular); }
p { font-size: .875rem; }
input { min-width: 0; padding: 10px 12px; border: 1px solid #9cabbc; border-radius: 6px; background: #fff; color: var(--ink); }
input::placeholder { color: #66788e; }
.primary-button, .secondary-button { min-height: 40px; padding: 8px 14px; border-radius: 6px; font-weight: var(--weight-medium); white-space: nowrap; }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.primary-button:hover { background: #073b90; }
.secondary-button { border: 1px solid #a8b5c5; background: #fff; color: var(--ink); }
.secondary-button:hover { background: var(--wash); }
.text-button { background: none; border: 0; padding: 5px 0; color: var(--blue); font-weight: var(--weight-medium); }
.text-button:hover, .access-top nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.access-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.access-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px clamp(18px, 4vw, 64px); border-bottom: 1px solid var(--line); }
.access-top nav { display: flex; gap: 18px; align-items: center; font-size: .875rem; }
.access-top nav a { text-decoration: none; font-weight: var(--weight-regular); }
.access-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; line-height: 1.16; font-weight: var(--weight-semibold); }
.access-practice-logo { display: block; width: 135px; height: 38px; object-fit: contain; object-position: left center; }
.provider { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: auto; padding: 22px 16px; color: var(--muted); font-size: .75rem; }
.provider img { display: block; width: 108px; height: auto; }
.sr-only, .access-skip:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.access-skip:focus { position: absolute; top: 6px; left: 6px; padding: 9px; background: #fff; z-index: 2; }
.admin-main { margin: 0; padding: clamp(24px, 5vw, 58px) clamp(18px, 4vw, 48px); }
.admin-page:has(#access-admin[hidden]) .admin-only,
.workbook-page:has(#connection-panel[hidden]) .admin-only { display: none; }
.admin-main:focus { outline: none; }
.admin-main h1 + p, #access-blocked { margin-top: 10px; }
#access-blocked button { margin-top: 12px; }
.account-caption { margin: 6px 0 24px; color: var(--muted); }
.add-user { display: grid; grid-template-columns: 1fr 1.2fr; align-items: end; gap: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash); padding: 18px; }
.add-user p, .manage-option p { margin-top: 4px; color: var(--muted); }
.add-fields { display: flex; gap: 7px; align-items: stretch; margin-top: 5px; }
.inbox-checkbox { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: .8125rem; font-weight: var(--weight-regular); }
.inbox-checkbox input { width: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--blue); }
.add-fields input { flex: 1; width: 100%; }
.feedback { color: var(--muted); overflow-wrap: anywhere; }
.feedback:not(:empty) { margin-top: 12px; }
.feedback[data-error="true"], #manage-error { color: #963924; }
.users-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.find-user { font-size: .75rem; color: var(--muted); }
.find-user input { display: block; margin-top: 4px; max-width: 200px; font-size: .8125rem; }
.users-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
.users-table th { padding: 7px 8px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: .75rem; font-weight: var(--weight-medium); }
.users-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.users-table th:first-child, .users-table td:first-child { padding-left: 0; }
.users-table td:last-child { text-align: right; }
.user-email { font-weight: var(--weight-regular); overflow-wrap: anywhere; }
.user-role { margin-top: 2px; font-size: .75rem; color: var(--muted); }
.user-status { display: inline-block; padding: 2px 7px; border-radius: 4px; background: #e5f6ef; color: var(--green); font-size: .75rem; font-weight: var(--weight-regular); }
.user-status.disabled { color: #515c68; background: #edf0f4; }
.share-access { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
#user-empty { color: var(--muted); padding: 12px 0; }
dialog { color: var(--ink); width: min(440px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
dialog::backdrop { background: rgb(17 34 61 / 40%); }
.dialog-head, .manage-option, .confirm-buttons { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { font-size: 1.15rem; }
.manage-email { color: var(--muted); overflow-wrap: anywhere; margin: 5px 0 17px; }
.manage-option { padding: 14px 0; border-top: 1px solid var(--line); }
.confirm-buttons { justify-content: flex-end; margin-top: 14px; }
@media (max-width: 620px) {
  .add-user { grid-template-columns: 1fr; gap: 14px; }
  .users-table td, .users-table th { padding-inline: 4px; }
  .users-head { align-items: center; }
  .find-user input { max-width: 136px; }
  .users-table .user-last, .users-table th:nth-child(3) { display: none; }
  .users-table { font-size: .8125rem; }
  .access-top nav { gap: 10px; }
}
@media (pointer: coarse) {
  .primary-button, .secondary-button, .text-button, input, .access-top nav a { min-height: 44px; }
  .access-top nav a { display: inline-flex; align-items: center; }
}
.signin-page { background: linear-gradient(150deg, #f2f8fb 0%, #f6f9fc 50%, #f2f7fd 100%); }
.signin-main { display: grid; flex: 1; place-items: center; width: 100%; padding: 32px 18px 0; }
.signin-card { width: min(400px, 100%); padding: clamp(24px, 5vw, 36px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 36px rgb(30 56 89 / 6%); }
.signin-logo { display: block; width: min(168px, 65%); max-height: 60px; object-fit: contain; object-position: left center; margin-bottom: 25px; }
.signin-intro { margin-top: 9px; color: var(--muted); overflow-wrap: anywhere; }
.signin-card form { display: grid; gap: 7px; margin-top: 22px; }
.signin-card form input { width: 100%; }
.signin-card form .primary-button { margin-top: 7px; }
#signin-code { letter-spacing: .26em; font-variant-numeric: tabular-nums; }
.code-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }


.consultation-import { margin-block: 1rem; padding-block: .75rem; border-block: 1px solid #dbe4eb; }
.consultation-import summary { cursor: pointer; font-weight: var(--weight-medium); }
.consultation-import p { max-width: 72ch; }
.consultation-import form { display: grid; gap: .45rem; max-width: 26rem; margin: 1rem 0; }
.consultation-import [type="file"] { max-width: 100%; }
.consultation-import form button { justify-self: start; margin-top: .3rem; }
