/* Opal for clinicians: signing in by phone, the steps after it and the base her profile, what Opal remembers, the
   Clinicians page and the terms pages build on. The app's own look (opal_ui.css): Google Sans served from this platform,
   tight sans headings, near black on white, pill buttons and soft fields, in one centered column. */
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/google_sans_latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/google_sans_latin_ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* The app's tokens when opal_ui.css is on the page, the same values when it is not. */
:root {
  --ink: var(--ui-ink, #0a0a0a);
  --gray: var(--ui-sec, #5c6370);
  --line: var(--ui-line2, #e3e4e8);
  --hair: var(--ui-line, #ebebee);
  --fill: var(--ui-soft, #f5f5f7);
  --page: #ffffff;
  --sans: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* Signing up wears the Opal app's own look (web/opal.css): its native type, ink, grays and hairlines, so signing up,
   waiting for approval and Opal itself read as one product. The pages of Opal's own that share this column, such as
   a hospital sign in that did not go through (console/hospital_sso.py), wear it with it. */
:root:has(body > .column) {
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ui-ink: #151515; --ui-ink2: #323235; --ui-gray: #626267; --ui-sec: #626267;
  --ui-line: #e6e6e8; --ui-line2: #dedee2; --ui-soft: #f4f4f5;
  --sans: var(--ui-font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--ink); font-family: var(--sans); font-size: 15px;
  line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- the top: Opal's mark and name, as in the app ------------------------------------------------ */

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: calc(72px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); background: #ffffff; }
.mark { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--ink); text-decoration: none; }
.mark svg { width: 24px; height: 24px; flex: none; }
/* The link's name is its aria-label, so the word it shows is only what the eye reads. */
.mark::after { content: "Opal"; font-size: 22px; line-height: 1; font-weight: 500; letter-spacing: -.02em; }
.top-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px;
  border-radius: 999px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
@media (hover: hover) { .top-link:hover { background: #ececef; } }

/* ---- one centered column ---------------------------------------------------------------------- */

.column { width: 100%; max-width: 448px; margin: 0 auto; padding: clamp(8px, 4vh, 40px) 24px 64px; text-align: center; }
/* A screen's title sits at the same height with or without the back button's row above it. */
.screen { animation: screen-in .28s ease-out both; }
.screen:not(:has(> .steps-head)), .column > h1:first-child { padding-top: 76px; }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.column h1 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.sub { margin: 12px 0 0; font-size: 16px; line-height: 1.55; color: var(--gray); }
.column .sub { margin-top: 10px; font-size: 17px; line-height: 1.5; text-wrap: balance; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; text-align: left; }

.input { width: 100%; height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: #ffffff;
  font-size: 16px; -webkit-appearance: none; appearance: none; }
.input:focus { outline: none; border-color: var(--ink); }
.input::placeholder { color: #8a8f98; }
select.input { padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--gray) 50%),
  linear-gradient(135deg, var(--gray) 50%, transparent 50%); background-position: calc(100% - 21px) 22px,
  calc(100% - 16px) 22px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--gray); }

/* A field as she signs up: a little taller, with the app's 17px type and a full line of ink once she is in it. */
.column .input { height: 52px; font-size: 17px; }
.column .input:focus, .phone:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.column .input::placeholder, .phone input::placeholder { color: #737378; }
.column select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' stroke='%23626267' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 16px center; background-size: 12px 8px; background-repeat: no-repeat; text-overflow: ellipsis; }
.column .label { font-weight: 400; }
/* A field's name above it, which stays once she types (web/signup.js labeled). */
.column .field { display: flex; flex-direction: column; gap: 6px; }
.column .field .label { margin: 0 0 0 2px; font-size: 14px; line-height: 1.3; font-weight: 500; color: var(--gray); }
.column ::selection { background: rgba(21, 21, 21, .14); }

.phone { display: flex; align-items: center; height: 52px; border: 1px solid var(--line); border-radius: 14px; background: #ffffff; }
.country { display: flex; align-items: center; height: 100%; padding: 0 14px 0 16px; border-right: 1px solid var(--hair);
  font-size: 17px; color: var(--ink); }
.phone input { flex: 1; min-width: 0; height: 100%; padding: 0 16px; border: 0; border-radius: 0 14px 14px 0;
  background: none; font-size: 17px; }
.phone input:focus { outline: none; }

.column .code { height: 60px; padding: 0 0 0 .45em; text-align: center; font-size: 26px; letter-spacing: .45em;
  font-variant-numeric: tabular-nums; }
.column .code::placeholder { color: #c9c9ce; }
/* While she waits to ask for another code, its button counts down in plain gray instead of fading. */
.column .quiet:disabled { opacity: 1; color: var(--gray); }
.column .note .quiet { font-variant-numeric: tabular-nums; }
.remember-device, .optional-reminder { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; cursor: pointer; }
.remember-device { min-height: 44px; align-items: center; font-size: 15px; }
.optional-reminder { font-size: 14px; line-height: 1.5; color: var(--gray); }
.remember-device input, .optional-reminder input, .check input, .column .radio input { flex: none; width: 22px; height: 22px;
  margin: 0; accent-color: var(--ink); }

/* Buttons are pills, as on opalclinical.com: black for the one thing to do, a white outline for the other. */
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 0 22px; border: 0;
  border-radius: 999px; background: var(--ink); color: #ffffff; font-size: 16px; font-weight: 600; text-decoration: none; }
@media (hover: hover) { .primary:hover:not(:disabled) { background: #2a2a2a; } }
.secondary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 999px; background: #ffffff; color: var(--ink); font-size: 16px; font-weight: 600;
  text-decoration: none; }
@media (hover: hover) { .secondary:hover:not(:disabled) { background: var(--fill); } }
.quiet { min-height: 44px; border: 0; background: none; padding: 6px 0; font-size: 14px; color: var(--gray); text-decoration: underline;
  text-underline-offset: 3px; }
@media (hover: hover) { .quiet:hover { color: var(--ink); } }

/* As she signs up: the black pill for the one thing to do, a soft pill for the other and plain words for the rest. */
.column .primary, .column .secondary { min-height: 52px; font-size: 17px; }
.column .secondary { border: 0; background: var(--fill); font-weight: 500; }
@media (hover: hover) { .column .secondary:hover:not(:disabled) { background: #ececef; } }
.column .quiet { padding: 6px 4px; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; }
@media (hover: hover) { .column .quiet:hover { text-decoration: underline; text-underline-offset: 3px; } }

.error { min-height: 0; margin: 0; font-size: 14px; line-height: 1.5; color: var(--ui-bad, #c0291d); }
.error:not(:empty) { margin-top: -2px; }
.column .error { font-size: 15px; text-align: center; }
.column .error:empty { display: none; }
/* Good news in the same place, such as a new code on its way, reads as words and not as a mistake. */
.column .error.said { color: var(--gray); }
/* The field a mistake is about, in the error's color (web/signup.js fault). */
.column .input[aria-invalid="true"], .column .input[aria-invalid="true"]:focus { border-color: var(--ui-bad, #c0291d);
  box-shadow: 0 0 0 1px var(--ui-bad, #c0291d); }
.column .options:has([aria-invalid="true"]) .radio { border-color: var(--ui-bad, #c0291d); }
.column input[type="checkbox"][aria-invalid="true"] { outline: 2px solid var(--ui-bad, #c0291d); outline-offset: 2px; }
/* Did you mean, under her email, with the fix to tap (web/signup.js meant). */
.column .hint { margin: 0; font-size: 15px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.column .hint .fix { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none;
  font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.consent { margin: 20px 0 0; font-size: 13px; line-height: 1.6; color: var(--gray); text-wrap: balance; }
.consent + .consent { margin-top: 8px; }
.consent a { text-decoration-color: #b9b9be; }
@media (hover: hover) { .consent a:hover { text-decoration-color: currentColor; } }
.note { margin: 20px 0 0; font-size: 15px; line-height: 1.55; color: var(--gray); text-wrap: balance; }
.access-entry { margin: 12px 0 0; }
.column .access-entry .quiet { font-size: 13px; font-weight: 400; color: var(--gray); }

/* ---- the steps after sign in: the way back and a thin line for how far she is ----------------------- */

/* The line keeps to the middle with the same room on both sides, so it never moves when the way back appears. */
.steps-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 12px; height: 44px;
  margin: 0 0 32px; }
.back { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; margin-left: -14px;
  border: 0; border-radius: 50%; background: none; color: var(--ink); }
@media (hover: hover) { .back:hover { background: var(--fill); } }
.back svg { width: 22px; height: 22px; }
/* The first step keeps the back button's place without showing it. */
span.back { visibility: hidden; }
.progress { height: 3px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--ink);
  transition: width .45s cubic-bezier(.2, .7, .2, 1); }

.choices { display: flex; flex-direction: column; gap: 8px; margin-top: 28px; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: #ffffff; text-align: left;
  font-size: 16px; }
@media (hover: hover) { .choice:hover { border-color: #c9ccd3; } }
.choice[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice small { color: var(--gray); font-size: 13px; }

/* A license: the kind she holds, its state and its number, each on a line of its own so no name is cut short. */
.license-row { display: grid; gap: 10px; }
.license-row + .license-row { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hair); }
/* Adding another license is a small text button that keeps to the left, in line with the words in the fields. */
.quiet.add { justify-self: start; align-self: flex-start; margin-left: 12px; }

/* ---- the terms pages: one large title and comfortable reading --------------------------------------- */

.reading { width: 100%; max-width: 720px; margin: 0 auto; padding: 56px 24px 96px; }
.reading .draft { margin: 0 0 14px; font-size: 14px; color: var(--gray); }
.reading h1 { margin: 0; font-size: 44px; line-height: 1.08; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.reading .updated { margin: 14px 0 40px; font-size: 15px; line-height: 1.6; color: var(--gray); }
.reading h2 { margin: 40px 0 10px; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; }
.reading p, .reading li { font-size: 17px; line-height: 1.7; color: var(--ui-ink2, #2f3033); }
.reading p { margin: 0 0 14px; }
.reading footer { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--hair); font-size: 15px; line-height: 1.6; color: var(--gray); }

@media (max-width: 600px) {
  .top { height: calc(60px + env(safe-area-inset-top)); padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right)); }
  .mark::after { font-size: 21px; }
  .column { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right));
    padding-bottom: max(48px, calc(env(safe-area-inset-bottom) + 32px)); }
  .column h1 { font-size: 28px; }
  .reading { padding-top: 32px; }
  .reading h1 { font-size: 34px; letter-spacing: -.03em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; transition: none; animation: none; }
}

/* Where she practices and what she accepts at sign up (web/signup.js practice). */
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; cursor: pointer; }
.radio > span { display: flex; flex-direction: column; gap: 2px; }
.radio b { font-weight: 600; }
/* Her two answers are cards, as Select your role draws its choices in the app, and the one she picks takes the ink. */
.options { display: grid; gap: 10px; }
.column .radio { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; }
.column .radio:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.column .radio input { margin-top: 1px; }
.column .radio b { font-size: 17px; line-height: 1.4; }
.column .radio span span { font-size: 15px; line-height: 1.45; color: var(--gray); }
/* What she accepts sits on the app's soft ground, with her yes under it. */
.points { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; padding: 18px; border-radius: 16px; background: var(--fill); }
.points .label { margin: 0; }
.points ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; cursor: pointer; }
.points .check { padding-top: 14px; border-top: 1px solid var(--line); font-weight: 500; }
/* Her one yes is a row of at least 44 points to tap. */
.column .check { min-height: 44px; align-items: center; }
/* Opal's agreement opens full screen from a link above her yes (web/signup.js agreementSheet). */
.column .points .read { align-self: flex-start; padding: 6px 0; text-align: left; text-decoration: underline;
  text-underline-offset: 3px; }

/* Opal's agreement to read: full screen on a phone and a tall panel on a computer, in type she can read. */
.column .sheet { width: min(100% - 48px, 680px); max-width: none; height: min(100% - 48px, 860px); max-height: none; margin: auto;
  padding: 0; border: 0; border-radius: 20px; background: #ffffff; color: var(--ink); text-align: left;
  box-shadow: 0 24px 80px rgba(10, 10, 10, .18); }
.column .sheet[open] { display: flex; flex-direction: column; }
.column .sheet::backdrop { background: rgba(10, 10, 10, .4); }
html:has(.column .sheet[open]) { overflow: hidden; }
.column .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: none;
  padding: 10px 16px 10px 24px; border-bottom: 1px solid var(--hair); }
.column .sheet-head h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.column .sheet-head .quiet { font-size: 16px; font-weight: 600; padding: 6px 8px; }
.column .sheet-version { flex: none; margin: 16px 24px 0; font-size: 14px; color: var(--gray); }
.column .sheet-text { flex: 1; min-height: 0; overflow: auto; padding: 10px 24px 40px; white-space: pre-wrap; font-size: 16px; line-height: 1.6;
  color: var(--ui-ink2, #2f3033); overscroll-behavior: contain; }
@media (max-width: 600px) {
  .column .sheet { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
  .column .sheet-head { padding-top: max(10px, env(safe-area-inset-top)); }
  .column .sheet-text { padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 24px)); }
}
