@import url("/bookmark.css");

/* Account components from the approved Figma Make preview. */
.account-page,
[data-account-nav] {
  --account-brand: #2444ad;
  --account-ink: #162642;
  --account-line: #d4ddea;
  --account-muted: #526582;
  --account-page: #f5f7fb;
  --account-tint: #ecf1ff;
  --account-tint-line: #b9c8e1;
  color: var(--account-ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.account-auth[open] {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: rgb(15 26 51 / 45%);
  color: var(--account-ink);
}

.account-auth::backdrop { background: transparent; }
.account-auth-panel {
  position: relative;
  width: 100%;
  max-height: 92dvh;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 18px 18px 0 0;
  background: #fff;
  padding: 16px 20px 24px;
  box-shadow: 0 20px 60px rgb(15 26 51 / 25%);
  animation: account-fade-up 220ms cubic-bezier(.2,.7,.3,1) both;
}

@keyframes account-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.account-kicker {
  margin: 0;
  color: var(--account-brand);
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
}

.account-auth h1 {
  margin: 8px 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 34px;
}

.account-auth-intro,
.account-switch,
.account-auth [data-account-status] {
  margin: 0 0 16px;
  color: var(--account-muted);
  font-size: 14px;
  line-height: 22px;
}

.account-auth [data-account-status]:empty { display: none; }
.account-auth [data-account-status]:not(:empty) { margin: 8px 0 0; }

.account-close,
.account-return {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--account-brand);
  font-size: 14px;
  font-weight: 700;
}

.account-close {
  position: absolute;
  top: 8px;
  right: 12px;
  min-width: 44px;
  justify-content: center;
  font-size: 24px;
}

.account-auth form { margin: 0; }
.account-form-fields,
.account-field,
.account-security {
  display: grid;
  min-width: 0;
}

.account-form-fields {
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
}

.account-field { gap: 6px; }
.account-field label,
.account-security legend {
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.account-security {
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--account-line);
  border-radius: 12px;
}

.account-field input,
.account-field select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--account-tint-line);
  border-radius: 10px;
  background: #fff;
  color: var(--account-ink);
  font: inherit;
  font-size: 15px;
}

.account-field :is(input, select):focus {
  outline: 0;
  border-color: var(--account-brand);
  box-shadow: 0 0 0 2px var(--account-tint-line);
}

.account-password { position: relative; }
.account-password input { padding-inline-end: 68px; }
.account-auth [data-account-visibility] {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  min-width: 60px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--account-brand);
  font-size: 14px;
}

.account-field [data-field-error],
.account-field small,
.account-field #answer-hint {
  margin: 0;
  color: var(--account-muted);
  font-size: 13px;
  line-height: 20px;
}

.account-auth .account-submit {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 1px solid #476bcf;
  border-radius: 14px;
  background: linear-gradient(90deg, #1a2969, #2457e3);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: transform 220ms cubic-bezier(.2,.7,.3,1);
}

.account-auth .account-submit:disabled { opacity: .65; }
.account-auth .account-switch { margin: 16px 0 0; }
.account-switch a,
.account-forgot { color: var(--account-brand); font-weight: 700; }
.account-forgot { justify-self: end; font-size: 14px; line-height: 20px; }

.account-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--account-muted);
  font-size: 13px;
  line-height: 20px;
}

.account-steps li + li::before {
  margin-inline-end: 6px;
  content: "→";
  color: var(--account-muted);
}
.account-steps [aria-current="step"] { color: var(--account-brand); font-weight: 700; }

.account-library {
  width: 100%;
  max-width: 1344px;
  margin-inline: auto;
  padding: 24px 16px 96px;
}

.account-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.account-title-row h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 38px;
}
.account-title-row [data-account-count] { color: var(--account-muted); font-size: 14px; }

.account-library-intro {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--account-muted);
  font-size: 15px;
  line-height: 24px;
}

.account-library [data-account-items] {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-block-start: 24px;
}
.account-library [data-account-items]:empty { display: none; }

.account-course-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas: "cover copy" "cover action";
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d6e0f0;
  border-radius: 16px;
  background: #fff;
}

.account-course-row:not(:has(.account-course-cover)) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy" "action";
}

.account-course-cover {
  grid-area: cover;
  display: block;
  min-width: 0;
  aspect-ratio: 483 / 270;
  overflow: hidden;
  border-radius: 10px;
}

.account-course-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.account-course-copy { grid-area: copy; min-width: 0; overflow-wrap: anywhere; }
.account-course-copy h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}
.account-course-copy p { color: var(--account-muted); margin: 0; font-size: 14px; }
.account-course-action { grid-area: action; justify-self: start; }
.account-course-action.resource-trigger { max-width: 100%; }
.account-course-action.resource-trigger img { display: block; }

.account-course-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding-inline: 8px;
  border-radius: 12px;
  background: var(--account-tint);
  color: var(--account-brand);
  font-size: 12px;
  font-weight: 700;
}
.account-course-badge[data-source="annual-claim"] { background: #e4f5f3; color: #1f7a6c; }

.account-library [data-account-delivery] { white-space: pre-wrap; overflow-wrap: anywhere; }
.account-library [data-account-resource-links] a,
.account-library [data-account-empty] a,
.account-library [data-account-visitor] a { color: var(--account-brand); text-decoration: underline; }

[data-account-nav] {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
[data-account-nav] :is(a, summary, button) {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-inline: 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--account-ink);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
[data-account-nav] [aria-current="page"] {
  color: var(--account-brand);
  text-decoration: underline 2px;
  text-underline-offset: 5px;
}
.account-menu { position: relative; }
.account-menu summary { cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-avatar {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--account-tint);
  color: var(--account-brand);
}
.account-menu[open] .account-menu-actions {
  position: absolute;
  z-index: 10;
  top: 100%;
  inset-inline-end: 0;
  display: grid;
  width: max-content;
  padding: 6px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  background: #fff;
}

@media (hover: hover) {
  .account-auth .account-submit:enabled:hover { transform: scale(1.015); }
}
@media (width < 640px) {
  .account-course-action.resource-trigger { grid-column: 1 / -1; }
}
@media (min-width: 640px) {
  .account-auth[open] { align-items: center; padding: 24px; }
  .account-auth-panel { max-width: 460px; border-radius: 18px; padding: 20px 24px 24px; }
  .account-course-row { grid-template-columns: 240px minmax(0, 1fr); gap: 12px 20px; }
  .account-course-copy h2 { font-size: 18px; line-height: 1.36; }
}
@media (min-width: 768px) {
  .account-library { padding-inline: 32px; }
}
@media (min-width: 1024px) {
  .account-library { padding-block-start: 40px; }
  .account-title-row h1 { font-size: 30px; line-height: 42px; }
  .account-course-row { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .account-auth-panel { animation: none; }
  .account-auth .account-submit { transition: none; }
  .account-auth .account-submit:enabled:hover { transform: none; }
}
