/* A-Alaa brand: fonts, tokens, site header/footer and plain pages. */

@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Regular.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyahsans-Bold.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans Display"; src: url("../fonts/thmanyahsans-Black.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
	--aa-night: #03110d;
	--aa-forest: #062b21;
	--aa-emerald: #08754f;
	--aa-emerald-hover: #065e40;
	--aa-mint: #12c48a;
	--aa-glow: #2ee6a6;
	--aa-mist: #eef6f2;
	--aa-haze: #bfe9d6;
	--aa-ink: #0a1f18;
	--aa-ink-muted: #3c5a4f;
	--aa-line: #d5e6de;
	--aa-line-dark: rgba(255, 255, 255, 0.12);
	--aa-radius: 14px;
	--aa-radius-lg: 20px;
	--aa-font-sans: "Thmanyah Sans", system-ui, "Segoe UI", Tahoma, sans-serif;
	--aa-font-display: "Thmanyah Sans Display", "Thmanyah Sans", system-ui, sans-serif;
}

body {
	margin: 0;
	background: var(--aa-mist);
	color: var(--aa-ink);
	font-family: var(--aa-font-sans);
	font-size: 16px;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--aa-emerald); }
a:hover { color: var(--aa-emerald-hover); }

.aa-wrap {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: max(16px, env(safe-area-inset-left, 0px));
	box-sizing: border-box;
}
@media (min-width: 768px) { .aa-wrap { padding-inline: 24px; } }

/* Buttons used outside Tutor */
.aa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	transition: background-color 150ms, color 150ms, border-color 150ms;
}
.aa-btn--brand { background: var(--aa-emerald); color: #fff; }
.aa-btn--brand:hover { background: var(--aa-emerald-hover); color: #fff; }
.aa-btn--ghost-dark { border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; }
.aa-btn--ghost-dark:hover { border-color: #fff; color: #fff; }

/* Site header */
.aa-site-header { background: var(--aa-night); color: #fff; }
.aa-site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.aa-site-header__logo img { display: block; height: 44px; width: auto; }
.aa-site-header__nav { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 500; }
.aa-site-header__nav a:not(.aa-btn) { color: #fff; text-decoration: none; }
.aa-site-header__nav a:not(.aa-btn):hover { color: var(--aa-haze); }
@media (max-width: 599px) { .aa-site-header__nav a:not(.aa-btn) { display: none; } }

/* Site footer */
.aa-site-footer { background: var(--aa-night); color: var(--aa-haze); font-size: 14px; }
.aa-site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px; }
.aa-site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.aa-site-footer a { color: #fff; text-decoration: none; }
.aa-site-footer a:hover { color: var(--aa-haze); }

/* Plain pages */
.aa-main { min-height: 60vh; }
.aa-content { padding-block: 40px 64px; }
.aa-page-title { margin: 0 0 20px; font-family: var(--aa-font-display); font-weight: 900; font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); line-height: 1.25; }
.aa-entry { max-width: 75ch; }

/* ---------- Course page (subscribed student) ---------- */
.aa-course__hero { background: var(--aa-night); background-image: radial-gradient(70% 90% at 0% 100%, rgba(18, 196, 138, 0.22) 0%, rgba(8, 117, 79, 0) 70%); color: #fff; }
.aa-course__hero-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 28px; align-items: center; padding-block: 40px; }
.aa-course__intro { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.aa-course__back { align-self: flex-start; font-size: 14px; color: var(--aa-haze); text-decoration: none; }
.aa-course__back::before { content: "→ "; }
.aa-course__back:hover { color: #fff; }
.aa-course__intro h1 { margin: 0; font-family: var(--aa-font-display); font-weight: 900; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1.25; }
.aa-course__access { margin: 0; color: var(--aa-haze); }
.aa-course__progress { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 20px; background: rgba(3, 17, 13, 0.5); border: 1px solid var(--aa-line-dark); }
.aa-course__progress .aa-btn { align-self: flex-start; }
.aa-course__next { font-size: 14px; color: var(--aa-haze); }
.aa-resume__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.aa-resume__row span { color: var(--aa-haze); }
.aa-meter { height: 8px; border-radius: 999px; background: #e2ece7; overflow: hidden; }
.aa-meter span { display: block; height: 100%; border-radius: 999px; background: var(--aa-emerald); }
.aa-meter--dark { background: rgba(255, 255, 255, 0.14); }
.aa-meter--dark span { background: var(--aa-mint); }
.aa-btn--mint { background: var(--aa-mint); color: var(--aa-night); }
.aa-btn--mint:hover { background: var(--aa-glow); color: var(--aa-night); }
.aa-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; padding: 16px 20px; border-radius: 16px; background: #fff7e0; border: 1px solid #f1d58a; color: #5c3d00; }
.aa-course__body { display: flex; flex-direction: column; gap: 14px; padding-block: 32px 64px; }
.aa-dash__h2 { margin: 0; font-size: 20px; font-weight: 700; }
.aa-curriculum { background: #fff; border: 1px solid var(--aa-line); border-radius: 20px; overflow: hidden; }
.aa-topic { border-top: 1px solid var(--aa-line); }
.aa-topic:first-child { border-top: 0; }
.aa-topic summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; font-weight: 700; }
.aa-topic summary::-webkit-details-marker { display: none; }
.aa-topic summary::after { content: ""; width: 9px; height: 9px; border-left: 2px solid var(--aa-ink-muted); border-bottom: 2px solid var(--aa-ink-muted); transform: rotate(-45deg); transition: transform 150ms; margin-inline-start: 4px; }
.aa-topic[open] summary::after { transform: rotate(135deg); }
.aa-topic__title { flex: 1; min-width: 0; }
.aa-topic__count { font-size: 13px; font-weight: 500; color: var(--aa-ink-muted); white-space: nowrap; }
.aa-topic__count.is-done { color: var(--aa-emerald); font-weight: 700; }
.aa-topic__lessons { list-style: none; margin: 0; padding: 0 0 10px; }
.aa-topic__lessons a { display: flex; align-items: flex-start; gap: 12px; padding: 10px 20px; color: var(--aa-ink); text-decoration: none; font-size: 15px; line-height: 1.6; }
.aa-topic__lessons a:hover { background: var(--aa-mist); }
.aa-topic__lessons em { margin-inline-start: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--aa-emerald); white-space: nowrap; }
.aa-lesson__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 3px; border-radius: 999px; border: 2px solid #9fb8ad; font-size: 12px; font-weight: 700; color: #fff; }
.aa-topic__lessons .is-done .aa-lesson__icon { background: var(--aa-emerald); border-color: var(--aa-emerald); }
.aa-topic__lessons .is-current a { background: #e2f3ea; box-shadow: inset -3px 0 0 var(--aa-emerald); font-weight: 700; }

/* Blog: /blog/ index and articles */
.aa-blog-hero, .aa-post__head { background: var(--aa-night); background-image: radial-gradient(70% 90% at 0% 100%, rgba(18, 196, 138, 0.2) 0%, rgba(8, 117, 79, 0) 70%); color: #fff; }
.aa-blog-hero .aa-wrap { padding-block: 48px 40px; }
.aa-blog-hero__eyebrow { margin: 0 0 8px; color: var(--aa-mint); font-weight: 700; font-size: 14px; }
.aa-blog-hero h1, .aa-post__head h1 { margin: 0; font-family: var(--aa-font-display); font-weight: 900; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); line-height: 1.25; max-width: 22ch; text-wrap: balance; }
.aa-blog-hero p:last-child { margin: 12px 0 0; color: var(--aa-haze); max-width: 60ch; }
.aa-blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.aa-blog-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--aa-line); border-radius: var(--aa-radius-lg); padding: 22px; }
.aa-blog-card h2 { margin: 0; font-size: 1.15rem; line-height: 1.5; text-wrap: balance; }
.aa-blog-card h2 a { color: var(--aa-ink); text-decoration: none; }
.aa-blog-card h2 a::after { content: ""; position: absolute; inset: 0; }
.aa-blog-card { position: relative; transition: border-color 150ms; }
.aa-blog-card:hover { border-color: var(--aa-emerald); }
.aa-blog-card p { margin: 0; color: var(--aa-ink-muted); font-size: 15px; line-height: 1.7; flex: 1; }
.aa-blog-card__meta { font-size: 13px; color: var(--aa-emerald); font-weight: 700; }
.aa-post__head .aa-wrap { padding-block: 32px 36px; display: flex; flex-direction: column; gap: 12px; }
.aa-post__back { align-self: flex-start; color: var(--aa-haze); text-decoration: none; font-size: 14px; }
.aa-post__back:hover { color: #fff; }
.aa-post__meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--aa-haze); font-size: 14px; }
.aa-post__body { margin-inline: auto; padding-block: 36px 8px; font-size: 18px; line-height: 1.9; max-width: 72ch; }
.aa-post__body h2 { font-family: var(--aa-font-display); font-weight: 900; font-size: 1.45rem; line-height: 1.4; margin: 40px 0 12px; text-wrap: balance; }
.aa-post__body h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.aa-post__body p { margin: 0 0 16px; }
.aa-post__body ul, .aa-post__body ol { padding-inline-start: 24px; margin: 0 0 18px; }
.aa-post__body li { margin-bottom: 8px; }
.aa-post__body .note { background: #fff; border: 1px solid var(--aa-line); border-radius: var(--aa-radius); padding: 14px 18px; font-size: 16px; }
.aa-post__body .cta { background: var(--aa-forest); color: #fff; border-radius: var(--aa-radius-lg); padding: 20px 22px; margin: 32px 0; }
.aa-post__body .cta p { margin: 0; }
.aa-post__body .cta a { color: var(--aa-mint); font-weight: 700; }
.aa-post__body .formula { direction: ltr; unicode-bidi: isolate; display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 15px; background: #fff; border: 1px solid var(--aa-line); border-radius: 6px; padding: 0 8px; }
.aa-post__body .tbl { overflow-x: auto; border: 1px solid var(--aa-line); border-radius: var(--aa-radius); background: #fff; margin: 0 0 20px; }
.aa-post__body table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; }
.aa-post__body th, .aa-post__body td { text-align: right; padding: 10px 14px; border-bottom: 1px solid var(--aa-line); }
.aa-post__body th { background: var(--aa-mist); font-size: 14px; color: var(--aa-ink-muted); font-weight: 500; }
.aa-post__body tr:last-child td { border-bottom: 0; }
.aa-post__body td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.aa-author { display: flex; gap: 16px; align-items: flex-start; max-width: 72ch; margin: 24px auto 64px; padding: 20px; background: #fff; border: 1px solid var(--aa-line); border-radius: var(--aa-radius-lg); }
.aa-author img { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.aa-author strong { font-size: 17px; }
.aa-author p { margin: 4px 0 8px; color: var(--aa-ink-muted); font-size: 15px; line-height: 1.7; }
.aa-author a { font-size: 14px; font-weight: 700; }
.nav-links { display: flex; gap: 12px; justify-content: center; margin-top: 32px; }
