/* Sign-in, sign-up, recovery and account pages.
   Loaded between styles.css and workbook.css, so the workbook palette wins and
   --card still resolves from styles.css. */

.auth-wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 44px 20px 72px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}

.auth-head { margin-bottom: 22px; }

.auth-title {
  font: 700 27px 'Playfair Display', Georgia, serif;
  line-height: 1.2;
  margin-bottom: 7px;
}

.auth-sub {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* The native focus ring convention in workbook.css covers buttons, links and
   summaries but not inputs, so keyboard users would get nothing here. */
.auth-card input:focus-visible {
  outline: 3px solid var(--workbook-ink, #354c3e);
  outline-offset: 2px;
}

/* --- provider buttons --- */

.auth-providers { display: grid; gap: 10px; }
.auth-providers[hidden], .auth-provider[hidden], .auth-divider[hidden] { display: none; }

.auth-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  font: 600 14.5px 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}

.auth-provider:hover { border-color: var(--text-muted); background: #fbfaf7; }
.auth-provider svg { width: 18px; height: 18px; flex: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- form --- */

.auth-form { display: grid; gap: 15px; }

.auth-field { display: grid; gap: 6px; }

.auth-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.auth-hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Bots fill in everything they can see; people never see this. */
.auth-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-submit { width: 100%; min-height: 46px; border-radius: 10px; font-size: 15px; }
.auth-submit[disabled] { opacity: .55; cursor: default; }

.auth-message {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  min-height: 1.2em;
}

/* Reserving a line for a message that is not there leaves a dead gap at the
   bottom of every card. Collapse it while empty — nothing above it moves when
   it fills, because it is the last thing in the form. */
.auth-message:empty {
  margin-top: 0;
  min-height: 0;
}

.auth-message.is-error { color: #a24528; }
.auth-message.is-ok { color: var(--workbook-ink, #354c3e); }

.auth-alt {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.auth-alt a { color: var(--accent); font-weight: 600; }
.auth-alt + .auth-alt { margin-top: 10px; padding-top: 0; border-top: 0; }

/* --- account page --- */

.account-wrap { max-width: 660px; margin: 0 auto; padding: 40px 20px 72px; }

.account-header { margin-bottom: 26px; }

.account-header h1 {
  font: 700 32px 'Playfair Display', Georgia, serif;
  margin-bottom: 6px;
}

.account-email { font-size: 15px; color: var(--text-muted); }

.account-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}

.account-section h2 {
  font: 700 19px 'Playfair Display', Georgia, serif;
  margin-bottom: 5px;
}

.account-section p.account-note {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.account-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: 2px;
  margin-left: 8px;
}

.account-badge.is-verified { background: var(--workbook-sage, #edf1e7); color: var(--workbook-ink, #354c3e); }
.account-badge.is-unverified { background: #fdf1e3; color: #97551b; }

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}

.account-row:first-of-type { border-top: 0; }
.account-row-main { min-width: 0; }
.account-row-title { font-size: 14.5px; font-weight: 600; }

.account-row-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.account-btn {
  flex: none;
  min-height: 40px;
  padding: 9px 16px;
  font: 600 13.5px 'DM Sans', system-ui, sans-serif;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.account-btn:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.account-btn[disabled] { opacity: .5; cursor: default; }
.account-btn.is-danger { border-color: #e0bcb5; color: #a24528; }
.account-btn.is-danger:hover:not([disabled]) { border-color: #a24528; color: #a24528; }

.account-form { display: grid; gap: 14px; max-width: 340px; }

.account-danger { border-color: #e8d3cd; }
.account-danger h2 { color: #a24528; }

.account-notice {
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.account-notice.is-warn { background: #fdf1e3; color: #7d4715; }
.account-notice.is-info { background: var(--workbook-sage, #edf1e7); color: var(--workbook-ink, #354c3e); }
.account-notice a { color: inherit; font-weight: 600; text-decoration: underline; }
.account-notice button { margin-left: 6px; }

.account-empty { font-size: 14px; color: var(--text-muted); }

/* --- mobile ---
   .lesson-topbar collapses to the hamburger at 700px, so the page follows it. */

@media (max-width: 700px) {
  .auth-wrap { padding: 26px 16px 56px; }
  .auth-card { padding: 24px 20px; border-radius: 12px; }
  .auth-title { font-size: 24px; }
  .account-wrap { padding: 26px 16px 56px; }
  .account-header h1 { font-size: 27px; }
  .account-section { padding: 20px 18px; border-radius: 12px; }
  .account-form { max-width: none; }

  .account-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* Scoped to rows on purpose: a stacked account row wants a full-width
     button, but .account-btn is reused in headers and banners elsewhere,
     where 100% overflows the viewport. */
  .account-row .account-btn { width: 100%; }
}

@media (max-width: 380px) {
  .auth-card { padding: 20px 16px; }
  .auth-provider { font-size: 14px; }
}

/* --- lesson list on the account page --- */

.lesson-list-unit {
  margin: 18px 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--unit-head, #706f63);
}

.lesson-list-unit:first-child { margin-top: 4px; }

.lesson-row .account-row-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.lesson-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.lesson-num.is-done {
  border-color: var(--workbook-ink, #354c3e);
  background: var(--workbook-sage, #edf1e7);
  color: var(--workbook-ink, #354c3e);
}

.lesson-link { color: var(--text); font-weight: 600; text-decoration: none; }
.lesson-link:hover { color: var(--accent); }

.lesson-resume {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
}

.lesson-practise { flex: none; white-space: nowrap; }

.account-device-note { display: block; margin-top: 6px; }

/* --- pricing --- */

.pricing-wrap { max-width: 860px; margin: 0 auto; padding: 44px 20px 72px; }
.pricing-head { text-align: center; margin-bottom: 30px; }

.pricing-head h1 {
  font: 700 34px 'Playfair Display', Georgia, serif;
  margin-bottom: 8px;
}

.pricing-head p { font-size: 15.5px; line-height: 1.6; color: var(--text-muted); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
}

.pricing-card.is-featured { border-color: var(--accent); }

.pricing-name {
  font: 700 20px 'Playfair Display', Georgia, serif;
  margin-bottom: 4px;
}

.pricing-price { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.pricing-blurb { font-size: 14px; line-height: 1.55; color: var(--text-muted); margin-bottom: 16px; }
.pricing-features { list-style: none; margin-bottom: 20px; }

.pricing-features li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 9px;
}

.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--workbook-ink, #354c3e);
  font-weight: 700;
}

.pricing-cta { width: 100%; min-height: 46px; border-radius: 10px; }
.pricing-current { text-align: center; font-size: 13.5px; color: var(--text-muted); padding: 12px 0; }

.pricing-foot {
  margin-top: 28px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .lesson-row .account-row-title { gap: 7px; }
  .pricing-wrap { padding: 26px 16px 56px; }
  .pricing-head h1 { font-size: 27px; }
  .pricing-card { padding: 22px 18px; border-radius: 12px; }
}

.auth-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.auth-consent input {
  margin-top: 2px;
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--accent);
}

.auth-consent a { color: var(--accent); font-weight: 600; }
