/* Account / login — Econ Clear tokens, Chinese-first, mobile-first. */

.acct-nav-label {
  white-space: nowrap;
}

.site-nav {
  gap: 8px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  gap: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lang-toggle:hover {
  border-color: rgba(37, 99, 235, 0.28);
}

.lang-toggle-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  padding: 5px 6px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  pointer-events: auto;
  user-select: none;
  cursor: pointer;
}

.lang-toggle-opt.is-active {
  background: var(--primary);
  color: #fff;
}

.site-nav a.acct-nav-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  min-height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.18);
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
}

/* Study notes are selected in JS by UI language (zh|en|fr).
   English essay body / definitions / questions stay visible in all languages. */

.site-nav a.acct-nav-btn:hover {
  color: #fff;
  background: var(--primary-dark);
}

.site-nav a.acct-nav-btn.active,
.site-nav a.acct-nav-btn.is-on-auth {
  color: #fff;
  background: var(--primary-dark);
}

.site-nav a.acct-nav-btn[hidden] {
  display: none !important;
}

.view-account {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.view-account-auth {
  max-width: none;
  align-items: stretch;
}

.acct-shell {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.acct-hero {
  text-align: left;
  padding: 4px 2px 2px;
}

.acct-kicker {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.acct-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.acct-lead {
  margin: 8px 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.acct-sync-tip {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: #334155;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.acct-banner {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.55;
}

.acct-banner-title {
  display: block;
  margin-bottom: 4px;
}

.acct-banner-en {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.acct-banner p {
  color: var(--text-muted);
  margin: 0;
}

.acct-banner-preview {
  background: #fff7ed;
  border: 1px dashed rgba(234, 88, 12, 0.35);
}

.acct-banner-live,
.acct-banner-synced {
  background: var(--blue-50);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.acct-banner-signed-out,
.acct-banner-connecting {
  background: #f8fafc;
  border: 1px solid var(--border);
}

.acct-banner-error {
  background: #fef2f2;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.acct-banner-offline {
  background: #fff7ed;
  border: 1px dashed rgba(234, 88, 12, 0.35);
}

.acct-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
}

.acct-card-auth {
  padding-top: 8px;
}

.acct-card-title {
  font-size: 1.05rem;
  font-family: var(--font-display);
  margin-bottom: 8px;
}

.acct-card-subtitle {
  font-size: 0.9375rem;
  font-family: var(--font-display);
  margin: 14px 0 6px;
}

.acct-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  word-break: break-all;
}

.acct-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--border);
}

.acct-tab {
  position: relative;
  text-align: center;
  padding: 12px 8px 14px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 700;
  background: transparent;
  border: 0;
}

.acct-tab:hover {
  color: var(--text);
}

.acct-tab.is-active {
  color: var(--primary);
}

.acct-tab.is-active::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.acct-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.acct-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}

.acct-label-en {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.acct-field-hint {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.acct-field .question-input {
  margin-top: 6px;
}

.acct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.acct-submit {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  font-size: 0.9375rem;
}

.acct-reset {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.acct-link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
  padding: 4px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.acct-link-btn:hover {
  color: var(--primary-dark);
}

.acct-link-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.acct-privacy,
.acct-warn,
.acct-sync-ok {
  margin-top: 16px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.acct-warn {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.2);
}

.acct-sync-ok {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f0fdf4;
  border: 1px solid rgba(22, 163, 74, 0.2);
  color: #166534;
}

.acct-data-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 0;
}

.acct-data-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.acct-data-en {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.acct-data-state {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--primary);
  margin-top: 4px;
}

.acct-status {
  min-height: 1.25rem;
}

@media (max-width: 640px) {
  .view-account,
  .view-account-auth {
    max-width: none;
  }

  .acct-shell {
    max-width: none;
  }

  .acct-card {
    padding: 18px 16px 16px;
  }

  .acct-tab.is-active::after {
    left: 12%;
    right: 12%;
  }
}
