/* Account: sign in, create an account, reset a password, my courses. */
.account-hero { background: radial-gradient(900px 480px at 85% 0%, rgba(94, 234, 212, 0.13), transparent 60%), radial-gradient(700px 420px at 0% 100%, rgba(11, 79, 179, 0.26), transparent 65%), var(--night); color: var(--on-night); padding: var(--hero-top) var(--gutter) 120px; }
.account-hero .eyebrow { color: var(--trace); }
.account-hero h1 { font-size: var(--h1); max-width: 16em; }

.account-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 32px; align-items: start; padding: 0 var(--gutter) 96px; margin-top: -76px; position: relative; }
.account-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: 0 18px 40px rgba(16, 29, 46, 0.1); min-width: 0; }
.account-card .course-loading { padding: 20px 0; }
.account-side { padding-top: 110px; }
.account-side .eyebrow { color: var(--muted); }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper-2); margin-bottom: 24px; }
.tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 15px; font-weight: 650; color: var(--muted); cursor: pointer; padding: 0 10px; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(16, 29, 46, 0.12); }

.form { display: grid; gap: 16px; }
.form h2 { font-size: 26px; }
.form-intro { color: var(--muted); font-size: 15.5px; margin-top: -6px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 650; font-size: 15px; }
.field input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #cfc7b8; border-radius: 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.field input:focus-visible { outline: 3px solid #f4b740; outline-offset: 1px; border-color: var(--blue); }
.field input[aria-invalid="true"] { border-color: #c2410c; }
.field-hint { font-size: 13.5px; color: var(--muted); }
.form .btn { justify-self: start; }
.form-status { font-size: 15px; padding: 12px 14px; border-radius: 12px; }
.form-status:empty { display: none; }
.form-status.is-error { background: #fdecea; color: #8a1c0c; }
.form-status.is-ok { background: #dff6f1; color: #064e44; }
.form-alt { font-size: 14.5px; color: var(--muted); }
.form-alt button { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 650; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.me-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.me-head p { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.me-head b { color: var(--ink); }
.me-head h2 { font-size: 28px; }
.my-courses { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.my-course { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: center; padding: 18px 18px 18px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); position: relative; overflow: hidden; }
.my-course::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--accent, var(--blue)); }
.my-course h3 { font-size: 21px; }
.my-course .course-progress { margin-top: 10px; }
.me-empty { margin-top: 18px; padding: 22px; border: 1px dashed #c9c1b1; border-radius: 16px; color: var(--muted); }
.me-empty .btn { margin-top: 14px; }
.me-next { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.me-next a { display: grid; gap: 2px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; text-decoration: none; transition: border-color 0.15s ease; }
.me-next a:hover { border-color: var(--blue); }
.me-next b { color: var(--ink); font-size: 15.5px; }
.me-next b::after { content: " \2192"; color: var(--blue); }
.me-next span { color: var(--muted); font-size: 14px; line-height: 1.4; }

@media (max-width: 980px) {
  .account-wrap { grid-template-columns: minmax(0, 1fr); }
  .account-side { padding-top: 0; }
}
@media (max-width: 640px) {
  .account-hero { padding-bottom: 100px; }
  .account-wrap { padding-left: 12px; padding-right: 12px; padding-bottom: 64px; }
  .account-card { padding: 22px 18px; border-radius: 16px; }
  .my-course { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 16px 20px; }
  .my-course .btn { width: 100%; }
  .form .btn { justify-self: stretch; }
}

.my-course-actions { display: grid; gap: 8px; justify-items: end; }
.my-cards { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); text-decoration: none; padding: 4px 0; white-space: nowrap; }
.my-cards b { font-family: var(--mono); color: var(--ink); }
.my-cards.has-due b { color: #b45309; }
.my-cards-go { margin-left: 6px; font-weight: 650; color: var(--blue); }
.my-cards:hover .my-cards-go { text-decoration: underline; }
.my-cert { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; color: #0a6b5e; text-decoration: none; padding: 4px 0; white-space: nowrap; }
.my-cert::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #dff6f1; box-shadow: inset 0 0 0 2px #0f9d8a; }
.my-cert:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .my-course-actions { justify-items: stretch; }
  .my-cert { justify-content: center; min-height: 40px; }
  .my-cards { justify-content: center; }
}

/* On narrow screens the side panel sits below the account card; hold it until the card has loaded. */
@media (scripting: enabled) and (max-width: 980px) {
  #panel:has(#account-loading) ~ .account-side { visibility: hidden; }
}
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.field-check input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--blue); }
.field-check label { font-weight: 500; font-size: 15px; line-height: 1.45; }
.field-check input[aria-invalid="true"] { outline: 2px solid #c2410c; outline-offset: 2px; }
.danger-zone { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 18px; scroll-margin-top: 88px; }
.danger-zone summary { cursor: pointer; font-weight: 650; color: #9a3412; width: fit-content; padding: 6px 0; }
.danger-zone summary:focus-visible { outline: 3px solid #f4b740; outline-offset: 2px; border-radius: 6px; }
.danger-form { display: grid; gap: 14px; max-width: 460px; margin-top: 12px; }
.danger-form p { margin: 0; color: var(--muted); line-height: 1.55; }
.btn-danger { background: #b42318; color: #fff; border-color: #b42318; justify-self: start; }
.btn-danger:hover:not(:disabled) { background: #8f1c13; border-color: #8f1c13; }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

/* ECG interpretation summary */
.me-interpret { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: center; margin-top: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(135deg, #f1fbf9, #eef4ff); }
.me-interpret h3 { font-size: 20px; }
.me-interpret-text { color: var(--muted); font-size: 15px; margin-top: 4px; }
.me-interpret-text b { color: var(--ink); }
.me-interpret-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 640px) {
  .me-interpret { grid-template-columns: minmax(0, 1fr); }
  .me-interpret-actions { justify-content: flex-start; }
  .me-interpret-actions > * { flex: 1 1 auto; white-space: nowrap; }
}
