/* Tisira Academy accounts (W6Q, lane L6Q.E): sign in, create an account, the email code, reset, My account and the
   welcome page after payment. Built on site.css: its tokens, .wrap, .btn, .form and .field; logical properties only,
   so the Arabic pages mirror on their own; light and dark from the same tokens. */

.aa { padding-block: clamp(32px, 6vw, 96px) clamp(48px, 8vw, 120px); }
/* the script shows and hides parts with the hidden attribute; .btn and the grids would otherwise win over it */
.aa [hidden] { display: none !important; }
.aa__wrap { display: grid; gap: clamp(28px, 5vw, 72px); align-items: start; }
.aa-page-login .aa__wrap { grid-template-columns: minmax(0, 1fr); }
.aa-page-account .aa__wrap { gap: 0; grid-template-columns: minmax(0, 1fr); }
.aa__wrap > *, .aa__grid > * { min-width: 0; }
@media (min-width: 960px) {
  .aa-page-login .aa__wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); }
  .aa-page-login .aa__intro { position: sticky; top: calc(var(--header-h) + 32px); padding-block-start: 24px; }
}

.aa__title { margin: 14px 0 12px; font-family: var(--f-display); font-weight: 600; font-size: var(--s-d2); line-height: 1.08; letter-spacing: -.016em; color: var(--ink); text-wrap: balance; }
.aa__title:lang(ar) { line-height: 1.3; letter-spacing: 0; }
.aa__title:focus { outline: none; }
.aa__lead { margin: 0 0 20px; color: var(--body); font-size: var(--s-lead); line-height: 1.6; text-wrap: pretty; }
.aa__lead:lang(ar) { line-height: 1.9; }
.aa__lead:empty { display: none; }
/* My account (verify-w6q N6): the address under "Hello, …" is one long word, and a name may be too: they break anywhere
   rather than widen a phone's page, and no track of the page's grids may grow past the screen for them. The sign-in
   page's "You are signed in as …" carries the same address (verify-w6q §11 N6) */
[data-aa-email], [data-aa-hello], [data-aa-signed-text] { overflow-wrap: anywhere; }

.aa__points { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.aa__points li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.aa__points svg { flex: none; margin-block-start: 3px; padding: 3px; width: 24px; height: 24px; border-radius: 50%; color: var(--link); background: color-mix(in srgb, var(--olive) 14%, transparent); }

.aa__card { padding: clamp(20px, 4vw, 40px); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); min-width: 0; }
.aa__card--narrow { width: 100%; max-width: 560px; margin-inline: auto; }
.aa__head { max-width: 760px; }

/* tabs: a segmented control */
.aa__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-block-end: 22px; border-radius: 999px; background: var(--ground-2); }
.aa__tab { min-height: 44px; padding: 8px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: clamp(.84rem, 3.3vw, .95rem); white-space: nowrap; cursor: pointer; transition: background .2s ease, color .2s ease; }
.aa__tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--rule); }
.aa__tab:focus-visible, .aa__provider:focus-visible, .aa-show:focus-visible, .aa__linkbtn:focus-visible, .aa__key summary:focus-visible, .aa__panel summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Google and Apple: the same size and weight, side by side with the email form below (as Tisira Store) */
.aa__providers { display: grid; gap: 10px; margin-block-end: 6px; }
.aa__provider { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 10px 18px; border: 1px solid #747775; border-radius: 999px; background: #FFFFFF; color: #1F1F1F; font-weight: 600; font-size: 1rem; text-decoration: none; transition: background .2s ease, box-shadow .2s ease; }
.aa__provider:hover { background: #F7F7F7; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.aa__provider--apple { border-color: #000000; background: #000000; color: #FFFFFF; }
.aa__provider--apple:hover { background: #1F1F1F; }
@media (prefers-color-scheme: dark) {
  .aa__provider { border-color: #8E918F; background: #131314; color: #E3E3E3; }
  .aa__provider:hover { background: #1F1F21; }
  .aa__provider--apple { border-color: #FFFFFF; background: #FFFFFF; color: #000000; }
  .aa__provider--apple:hover { background: #ECECEC; }
}
.aa-ico { flex: none; }
.aa__or { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; color: var(--muted); font-size: .9rem; }
.aa__or::before, .aa__or::after { content: ""; flex: 1; height: 1px; background: var(--rule-2); }

/* one track that never grows past the card for a wide child (the live check's M2: Turnstile's 300 px widget made the
   track, the fields and the button 300 px wide in a 246 px card on a 320 px phone) */
.aa__form { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.aa__form[hidden] { display: none; }
.aa-field label { font-size: .92rem; }
.aa-input { position: relative; }
.aa-input--pw input { padding-inline-end: 84px; }
.aa-show { position: absolute; inset-block: 6px; inset-inline-end: 6px; min-width: 64px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--ground-2); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.aa-hint { margin: 0; color: var(--muted); font-size: .85rem; }
.aa-code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.5rem !important; letter-spacing: .4em; text-align: center; }
.aa-check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; line-height: 1.55; color: var(--body); }
.aa-check input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; }
.aa-check a, .aa__fine a, .aa__card a:not(.btn):not(.aa__provider) { color: var(--link); font-weight: 600; text-underline-offset: 3px; }
.aa__fine { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.aa__row { margin: -6px 0 0; }
.aa__row--split { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 16px 0 8px; }
.aa__link { font-size: .92rem; }
.aa__linkbtn { min-height: 40px; padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.aa__linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.aa__submit { width: 100%; }
.aa__ts { min-height: 65px; }
.aa__ts:empty { min-height: 0; }
/* the size academy-account.js chose for the slot keeps its room while the widget loads: 'flexible' is 65 px high, the
   'compact' one a slot under 300 px gets is 150 x 140 px */
.aa__ts[data-size="flexible"] { min-height: 65px; }
.aa__ts[data-size="compact"] { min-height: 140px; }
.aa__note { margin: 0 0 18px; }

.aa__msg { margin: 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--saffron-deep) 12%, transparent); color: var(--ink); font-size: .92rem; font-weight: 500; }
.aa__msg--ok { background: color-mix(in srgb, var(--olive) 14%, transparent); }
.aa__msg[hidden] { display: none; }

.aa__key { margin-block-start: 22px; padding-block-start: 18px; border-block-start: 1px solid var(--rule); }
.aa__key summary { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-weight: 600; cursor: pointer; list-style: none; }
.aa__key summary::-webkit-details-marker { display: none; }
.aa__key summary::after { content: "+"; margin-inline-start: auto; font-size: 1.2rem; color: var(--muted); }
.aa__key[open] summary::after { content: "−"; }
.aa__key .aa__fine { margin-block: 4px 14px; }
.aa__help { margin: 22px 0 0; color: var(--muted); font-size: .85rem; }

.aa__signed { display: grid; gap: 16px; }
.aa__signed-t { margin: 0; font-weight: 600; color: var(--ink); }
.aa__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* My account */
.aa__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-block-start: 24px; }
@media (min-width: 900px) {
  .aa__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aa__panel--course { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 24px; }
  .aa__panel--course > :not(.btn) { grid-column: 1; }
  .aa__panel--course > .btn { grid-column: 2; grid-row: 1 / span 3; }
  .aa__panel--course .aa__state { margin: 0; }
  .aa__panel--course > .aa__wa, .aa__panel--course > .aa__pp { grid-column: 1 / -1; }
}
/* a plan ordered on WhatsApp while Stripe is paused (tools/academy/orders.mjs) */
.aa__wa { display: grid; justify-items: start; gap: 12px; margin-block-start: 16px; }
.aa__wa .aa__msg { margin: 0; }
/* a plan paid through PayPal (payments.academy.checkout "paypal"): the plan, its USD line, the phone, the button */
.aa__pp { display: grid; justify-items: start; gap: 12px; margin-block-start: 18px; padding-block-start: 18px; border-block-start: 1px solid var(--rule); }
.aa__pp[hidden] { display: none; }
.aa__pp > .aa__h2 { margin: 0; }
.aa__pp > div, .aa__pp .aa-field { width: 100%; max-width: 440px; }
.aa__pp-plan { display: grid; gap: 2px; margin: 0; color: var(--ink); }
.aa__pp-line { color: var(--muted); font-size: .95rem; }
.aa__panel { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); min-width: 0; }
.aa__panel .aa__form { margin-block-start: 14px; }
.aa__h2 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.aa__course-name { margin: 0 0 6px; font-family: var(--f-display); font-size: var(--s-d3); line-height: 1.2; color: var(--ink); }
.aa__state { margin: 0 0 18px; color: var(--muted); }
.aa__state--on { color: var(--link); font-weight: 600; }
.aa__panel--danger summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; }
.aa__panel--danger summary::-webkit-details-marker { display: none; }
.aa__panel--danger summary .aa__h2 { margin: 0; color: var(--accent); }
.aa__panel--danger .aa__fine { margin-block: 8px 0; }
.aa__danger { color: var(--accent) !important; border-color: currentColor !important; }
.aa__table { overflow-x: auto; }
.aa__table table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.aa__table th, .aa__table td { padding: 10px 8px; border-block-end: 1px solid var(--rule); text-align: start; vertical-align: top; }
.aa__table thead th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.aa__table tbody th { font-weight: 600; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .85rem; }
.aa__table tbody th, .aa__table td:nth-child(3), .aa__table td:nth-child(4) { white-space: nowrap; }
@media (max-width: 560px) {
  .aa__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .aa__table table, .aa__table tbody, .aa__table tr { display: block; }
  .aa__table tr { padding-block: 8px; border-block-end: 1px solid var(--rule); }
  .aa__table th, .aa__table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .aa__table tbody th::before, .aa__table td::before { content: attr(data-label); color: var(--muted); font-family: var(--f-text); font-weight: 500; font-size: .85rem; }
  .aa__table tbody th:lang(ar)::before, .aa__table td:lang(ar)::before { font-family: var(--f-ar); }
}

/* the welcome page after Stripe */
.aa__welcome { text-align: center; }
.aa__welcome .eyebrow { justify-content: center; }
.aa__welcome .aa__actions { justify-content: center; }
.aa__spinner { width: 44px; height: 44px; margin: 26px auto 4px; border-radius: 50%; border: 3px solid var(--rule-2); border-block-start-color: var(--link); animation: aa-spin 1s linear infinite; }
.aa__done { display: none; place-items: center; width: 56px; height: 56px; margin: 22px auto 0; border-radius: 50%; color: var(--card); background: var(--link); }
.aa__welcome[data-aa-state="ready"] .aa__done { display: grid; }
.aa__welcome:not([data-aa-state="confirming"]) .aa__spinner { display: none; }
@keyframes aa-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aa__spinner { animation-duration: 3s; } .aa__tab, .aa__provider { transition: none; } }
