/**
 * Alpha Courses — Atelier front-end styles.
 *
 * Design language: editorial luxury. Deep wine + antique gold on warm
 * parchment, Instrument Serif display paired with Inter body copy.
 * Everything is scoped under .ac-wrap so it never bleeds into the theme.
 *
 * --ac-gold / --ac-wine are injected inline from plugin settings; the values
 * below are fallbacks so the stylesheet stands alone.
 */

:root {
	--ac-gold: #b8945f;
	--ac-wine: #4a1230;
}

.ac-wrap {
	/* Palette ---------------------------------------------------------- */
	--ac-wine-deep: #380d24;
	--ac-wine-soft: #6d2848;
	--ac-gold-deep: #9a7741;
	--ac-gold-soft: #d8c4a0;
	--ac-ink: #2a1620;
	--ac-ink-soft: #6b5560;
	--ac-line: #e7ddd2;
	--ac-line-strong: #d8cabb;
	--ac-parchment: #faf6f0;
	--ac-parchment-deep: #f3ebe0;
	--ac-card: #fffdfa;
	--ac-cream: #f6efe4;

	/* Type ------------------------------------------------------------- */
	--ac-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
	--ac-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	/* Form ------------------------------------------------------------- */
	--ac-radius: 14px;
	--ac-radius-sm: 9px;
	--ac-shadow: 0 1px 2px rgba(58, 18, 38, .04), 0 12px 30px -18px rgba(58, 18, 38, .28);
	--ac-shadow-lift: 0 2px 6px rgba(58, 18, 38, .06), 0 24px 48px -24px rgba(58, 18, 38, .40);

	max-width: 1180px;
	margin-inline: auto;
	padding: 8px 22px 72px;
	color: var(--ac-ink);
	font-family: var(--ac-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.ac-wrap *,
.ac-wrap *::before,
.ac-wrap *::after { box-sizing: border-box; }

.ac-wrap a { color: var(--ac-wine); text-decoration: none; transition: color .18s ease; }
.ac-wrap a:hover { color: var(--ac-gold-deep); }

/* ====================================================================
 * Typographic primitives
 * ================================================================= */

.ac-eyebrow {
	display: inline-block;
	font-family: var(--ac-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--ac-gold-deep);
	margin-bottom: 10px;
}

.ac-display {
	font-family: var(--ac-serif);
	font-weight: 400;
	font-size: clamp(2.1rem, 4.4vw, 3.4rem);
	line-height: 1.04;
	letter-spacing: -.01em;
	color: var(--ac-wine);
	margin: 0;
}

.ac-section-title {
	font-family: var(--ac-serif);
	font-weight: 400;
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	color: var(--ac-wine);
	letter-spacing: -.01em;
	margin: 0 0 22px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--ac-line);
}

.ac-muted { color: var(--ac-ink-soft); }

/* ====================================================================
 * Buttons
 * ================================================================= */

.ac-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	font-family: var(--ac-sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .01em;
	line-height: 1;
	padding: 13px 22px;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .16s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
	white-space: nowrap;
}
.ac-btn:active { transform: translateY(1px); }

.ac-btn--solid {
	background: var(--ac-wine);
	color: #fbf4ee;
	box-shadow: 0 10px 22px -14px rgba(58, 18, 38, .9);
}
.ac-btn--solid:hover {
	background: var(--ac-wine-deep);
	color: #fff;
	box-shadow: 0 14px 28px -14px rgba(58, 18, 38, .95);
}

.ac-btn--ghost {
	background: transparent;
	color: var(--ac-wine);
	border-color: var(--ac-line-strong);
}
.ac-btn--ghost:hover {
	border-color: var(--ac-gold);
	color: var(--ac-gold-deep);
	background: rgba(184, 148, 95, .07);
}

.ac-btn--block { width: 100%; }

/* ====================================================================
 * Catalog + section headers
 * ================================================================= */

.ac-catalog__head,
.ac-dash-head {
	margin-bottom: 30px;
}

.ac-catalog__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	padding-bottom: 26px;
	border-bottom: 1px solid var(--ac-line);
	margin-bottom: 28px;
}

.ac-search {
	display: flex;
	gap: 8px;
	align-items: center;
}
.ac-search input[type="search"] {
	font-family: var(--ac-sans);
	font-size: 14px;
	padding: 12px 16px;
	min-width: 230px;
	border: 1px solid var(--ac-line-strong);
	border-radius: 999px;
	background: var(--ac-card);
	color: var(--ac-ink);
	transition: border-color .18s ease, box-shadow .18s ease;
}
.ac-search input[type="search"]:focus {
	outline: none;
	border-color: var(--ac-gold);
	box-shadow: 0 0 0 3px rgba(184, 148, 95, .18);
}

/* Filter chips ------------------------------------------------------- */

.ac-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-bottom: 32px;
}
.ac-chip {
	font-size: 13px;
	font-weight: 500;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--ac-line-strong);
	color: var(--ac-ink-soft);
	background: var(--ac-card);
	transition: all .18s ease;
}
.ac-chip:hover { border-color: var(--ac-gold); color: var(--ac-gold-deep); }
.ac-chip.is-active {
	background: var(--ac-wine);
	border-color: var(--ac-wine);
	color: #f7ede4;
}

/* ====================================================================
 * Grid + course cards
 * ================================================================= */

.ac-grid {
	display: grid;
	grid-template-columns: repeat(var(--ac-cols, 3), minmax(0, 1fr));
	gap: 26px;
}

.ac-card {
	display: flex;
	flex-direction: column;
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: var(--ac-radius);
	overflow: hidden;
	box-shadow: var(--ac-shadow);
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.ac-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ac-shadow-lift);
	border-color: var(--ac-line-strong);
}
.ac-card.is-featured { border-color: var(--ac-gold-soft); }

.ac-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, var(--ac-wine) 0%, var(--ac-wine-soft) 100%);
	overflow: hidden;
}
.ac-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease;
}
.ac-card:hover .ac-card__media img { transform: scale(1.05); }

.ac-card__placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: var(--ac-serif);
	font-size: 3.6rem;
	color: rgba(255, 255, 255, .82);
}

.ac-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 6px 11px;
	border-radius: 999px;
	background: rgba(42, 22, 32, .55);
	color: #fff;
	backdrop-filter: blur(4px);
}
.ac-badge--gold {
	background: var(--ac-gold);
	color: #2a1620;
}

.ac-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px 22px 22px;
}
.ac-card__body .ac-eyebrow { margin-bottom: 8px; }

.ac-card__title {
	font-family: var(--ac-serif);
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 1.12;
	letter-spacing: -.01em;
	margin: 0 0 10px;
}
.ac-card__title a { color: var(--ac-wine); }
.ac-card__title a:hover { color: var(--ac-gold-deep); }

.ac-card__excerpt {
	font-size: 14.5px;
	color: var(--ac-ink-soft);
	margin: 0 0 16px;
	flex: 1;
}

.ac-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 12.5px;
	color: var(--ac-ink-soft);
	margin-bottom: 16px;
}
.ac-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.ac-card__meta span + span { position: relative; padding-left: 14px; }
.ac-card__meta span + span::before {
	content: "";
	position: absolute; left: 0; top: 50%;
	width: 3px; height: 3px; border-radius: 50%;
	background: var(--ac-gold);
	transform: translateY(-50%);
}

.ac-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--ac-line);
}

/* Price -------------------------------------------------------------- */

.ac-price {
	font-family: var(--ac-serif);
	font-size: 1.5rem;
	color: var(--ac-wine);
	line-height: 1;
}
.ac-price--lg { font-size: 2.4rem; display: block; margin-bottom: 4px; }
.ac-price .amount,
.ac-price bdi { font-family: var(--ac-serif); }
.ac-price del { color: var(--ac-ink-soft); font-size: .7em; margin-right: .35em; opacity: .7; }
.ac-price ins { text-decoration: none; }
.ac-free {
	font-family: var(--ac-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ac-gold-deep);
}

/* ====================================================================
 * Progress bar
 * ================================================================= */

.ac-progress {
	position: relative;
	height: 7px;
	border-radius: 999px;
	background: var(--ac-cream);
	overflow: hidden;
	margin: 14px 0 8px;
}
.ac-progress__bar {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ac-gold-deep), var(--ac-gold));
	transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.ac-progress__label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--ac-ink-soft);
}

/* ====================================================================
 * Pagination
 * ================================================================= */

.ac-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 44px;
}
.ac-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid var(--ac-line-strong);
	font-size: 14px;
	font-weight: 600;
	color: var(--ac-ink-soft);
	background: var(--ac-card);
	transition: all .18s ease;
}
.ac-pagination .page-numbers:hover { border-color: var(--ac-gold); color: var(--ac-gold-deep); }
.ac-pagination .page-numbers.current {
	background: var(--ac-wine);
	border-color: var(--ac-wine);
	color: #f7ede4;
}
.ac-pagination .page-numbers.dots { border: none; background: none; }

/* ====================================================================
 * Empty / login states
 * ================================================================= */

.ac-empty {
	text-align: center;
	padding: 64px 28px;
	background: var(--ac-card);
	border: 1px dashed var(--ac-line-strong);
	border-radius: var(--ac-radius);
}
.ac-empty h3 {
	font-family: var(--ac-serif);
	font-weight: 400;
	font-size: 1.8rem;
	color: var(--ac-wine);
	margin: 0 0 8px;
}
.ac-empty p { color: var(--ac-ink-soft); margin: 0 auto 22px; max-width: 42ch; }
.ac-login-gate { background: var(--ac-cream); border-style: solid; border-color: var(--ac-line); }

/* ====================================================================
 * Dashboard ("My Learning")
 * ================================================================= */

.ac-dash-head .ac-display { margin-top: 4px; }

.ac-stat-row {
	display: flex;
	gap: 18px;
	margin-top: 22px;
}
.ac-stat {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 26px 16px 18px;
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-left: 3px solid var(--ac-gold);
	border-radius: var(--ac-radius-sm);
}
.ac-stat strong {
	font-family: var(--ac-serif);
	font-weight: 400;
	font-size: 2rem;
	line-height: 1;
	color: var(--ac-wine);
}
.ac-stat span {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ac-ink-soft);
}

/* ====================================================================
 * Learning plans
 * ================================================================= */

.ac-plan-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	gap: 26px;
}
.ac-plan-card {
	display: flex;
	flex-direction: column;
	padding: 30px;
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(184, 148, 95, .08), transparent 60%),
		var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: var(--ac-radius);
	box-shadow: var(--ac-shadow);
}
.ac-plan-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 18px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--ac-line);
}
.ac-plan-card__head .ac-display { font-size: 1.9rem; }
.ac-plan-card__desc { color: var(--ac-ink-soft); margin: 0 0 22px; font-size: 14.5px; }

.ac-plan-track {
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	display: flex;
	flex-direction: column;
}
.ac-plan-track li {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 13px 0;
}
.ac-plan-track li + li { border-top: 1px solid var(--ac-line); }
.ac-plan-track__num {
	flex: none;
	width: 34px; height: 34px;
	display: grid;
	place-items: center;
	font-family: var(--ac-serif);
	font-size: 1rem;
	color: var(--ac-gold-deep);
	background: var(--ac-cream);
	border: 1px solid var(--ac-gold-soft);
	border-radius: 50%;
}
.ac-plan-track li a { font-weight: 500; color: var(--ac-ink); }
.ac-plan-track li a:hover { color: var(--ac-gold-deep); }
.ac-plan-card .ac-btn { margin-top: auto; align-self: flex-start; }

/* ====================================================================
 * Teacher dashboard
 * ================================================================= */

.ac-teacher section + section { margin-top: 44px; }

.ac-teach-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 18px;
}
.ac-teach-card {
	padding: 22px;
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: var(--ac-radius-sm);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.ac-teach-card:hover { border-color: var(--ac-gold-soft); box-shadow: var(--ac-shadow); }
.ac-teach-card h4 {
	font-family: var(--ac-serif);
	font-weight: 400;
	font-size: 1.3rem;
	margin: 0 0 8px;
	line-height: 1.15;
}
.ac-teach-card h4 a { color: var(--ac-wine); }
.ac-teach-card p { margin: 0 0 14px; font-size: 14px; color: var(--ac-ink-soft); }
.ac-teach-card p strong { font-family: var(--ac-serif); font-size: 1.4rem; color: var(--ac-wine); margin-right: 4px; }

.ac-link {
	font-weight: 600;
	font-size: 13.5px;
	letter-spacing: .02em;
	color: var(--ac-gold-deep);
}
.ac-link:hover { color: var(--ac-wine); }

/* Tables ------------------------------------------------------------- */

.ac-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: var(--ac-radius-sm);
	overflow: hidden;
	font-size: 14px;
}
.ac-table thead th {
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ac-ink-soft);
	padding: 14px 18px;
	background: var(--ac-cream);
	border-bottom: 1px solid var(--ac-line);
}
.ac-table tbody td { padding: 15px 18px; border-bottom: 1px solid var(--ac-line); }
.ac-table tbody tr:last-child td { border-bottom: none; }
.ac-table tbody tr { transition: background .15s ease; }
.ac-table tbody tr:hover { background: rgba(184, 148, 95, .05); }

/* Status pills ------------------------------------------------------- */

.ac-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .04em;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--ac-cream);
	color: var(--ac-ink-soft);
	text-transform: capitalize;
}
.ac-pill::before {
	content: "";
	width: 6px; height: 6px;
	border-radius: 50%;
	background: currentColor;
	opacity: .8;
}
.ac-pill--active,
.ac-pill--open { background: rgba(108, 160, 108, .16); color: #3f6b3f; }
.ac-pill--completed,
.ac-pill--closed { background: rgba(184, 148, 95, .18); color: var(--ac-gold-deep); }
.ac-pill--cancelled,
.ac-pill--draft { background: rgba(160, 90, 90, .15); color: #9a4242; }

/* ====================================================================
 * Single course
 * ================================================================= */

.ac-single__hero {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 48px;
	align-items: start;
	padding-bottom: 44px;
	margin-bottom: 44px;
	border-bottom: 1px solid var(--ac-line);
}

.ac-single__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 18px 0 24px;
	font-size: 13.5px;
	color: var(--ac-ink-soft);
}
.ac-single__meta span { display: inline-flex; align-items: center; gap: 6px; }
.ac-single__meta span + span { position: relative; padding-left: 16px; }
.ac-single__meta span + span::before {
	content: "";
	position: absolute; left: 0; top: 50%;
	width: 3px; height: 3px; border-radius: 50%;
	background: var(--ac-gold);
	transform: translateY(-50%);
}

.ac-original-content {
	font-size: 16.5px;
	line-height: 1.72;
	color: var(--ac-ink);
}
.ac-original-content > *:first-child { margin-top: 0; }

/* Teacher byline ----------------------------------------------------- */

.ac-teachers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 30px;
	padding-top: 24px;
	border-top: 1px solid var(--ac-line);
}
.ac-teachers__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ac-ink-soft);
}
.ac-teacher-chip {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	font-weight: 500;
}
.ac-teacher-chip img { border-radius: 50%; border: 2px solid var(--ac-gold-soft); }

/* CTA card ----------------------------------------------------------- */

.ac-single__cta {
	position: sticky;
	top: 30px;
	padding: 24px;
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: var(--ac-radius);
	box-shadow: var(--ac-shadow-lift);
}
.ac-single__poster {
	margin: -24px -24px 22px;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--ac-radius) var(--ac-radius) 0 0;
}
.ac-single__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-cta-progress { margin-bottom: 18px; }
.ac-enroll-msg { font-size: 13px; margin: 12px 0 0; min-height: 1em; color: var(--ac-gold-deep); }
.ac-enroll-msg.is-error { color: #9a4242; }

/* Curriculum --------------------------------------------------------- */

.ac-lessons {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ac-line);
	border-radius: var(--ac-radius);
	overflow: hidden;
	background: var(--ac-card);
}
.ac-lesson {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 16px 22px;
	transition: background .15s ease;
}
.ac-lesson + .ac-lesson { border-top: 1px solid var(--ac-line); }
.ac-lesson:hover { background: rgba(184, 148, 95, .05); }
.ac-lesson__num {
	flex: none;
	font-family: var(--ac-serif);
	font-size: 1.15rem;
	color: var(--ac-gold-deep);
	width: 30px;
}
.ac-lesson__body { flex: 1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ac-lesson__title { font-weight: 500; font-size: 15.5px; color: var(--ac-ink); }
a.ac-lesson__title:hover { color: var(--ac-gold-deep); }
.ac-lesson__title.is-locked { color: var(--ac-ink-soft); }
.ac-lesson__len { font-size: 12.5px; color: var(--ac-ink-soft); }
.ac-lesson.is-done .ac-lesson__title { color: var(--ac-ink-soft); }

/* Completion check button ------------------------------------------- */

.ac-check {
	flex: none;
	width: 30px; height: 30px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1.5px solid var(--ac-line-strong);
	background: transparent;
	color: transparent;
	cursor: pointer;
	transition: all .18s ease;
}
.ac-check:hover { border-color: var(--ac-gold); color: var(--ac-gold); }
.ac-check.is-checked {
	background: var(--ac-gold);
	border-color: var(--ac-gold);
	color: #fff;
}
.ac-lock { flex: none; color: var(--ac-line-strong); display: grid; place-items: center; width: 30px; }

/* ====================================================================
 * Single lesson
 * ================================================================= */

.ac-lesson-view { max-width: 820px; }
.ac-back { display: inline-block; margin-bottom: 22px; }

.ac-video {
	position: relative;
	margin-bottom: 30px;
	border-radius: var(--ac-radius);
	overflow: hidden;
	background: #1a0c14;
	box-shadow: var(--ac-shadow);
}
.ac-video iframe,
.ac-video video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
}

.ac-lesson-content {
	font-size: 17px;
	line-height: 1.75;
}
.ac-lesson-content > *:first-child { margin-top: 0; }
.ac-lesson-content h2,
.ac-lesson-content h3 { font-family: var(--ac-serif); font-weight: 400; color: var(--ac-wine); letter-spacing: -.01em; }

.ac-lesson-actions {
	margin: 36px 0;
	padding: 26px 0;
	border-top: 1px solid var(--ac-line);
	border-bottom: 1px solid var(--ac-line);
	text-align: center;
}

.ac-lesson-nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-weight: 600;
}
.ac-lesson-nav a { color: var(--ac-wine); font-size: 14.5px; }
.ac-lesson-nav a:hover { color: var(--ac-gold-deep); }

/* ====================================================================
 * Responsive
 * ================================================================= */

@media (max-width: 900px) {
	.ac-single__hero { grid-template-columns: 1fr; gap: 32px; }
	.ac-single__cta { position: static; }
	.ac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.ac-wrap { padding: 8px 16px 56px; }
	.ac-grid,
	.ac-plan-list { grid-template-columns: 1fr; }
	.ac-catalog__head { flex-direction: column; align-items: stretch; }
	.ac-search { width: 100%; }
	.ac-search input[type="search"] { flex: 1; min-width: 0; }
	.ac-stat-row { flex-wrap: wrap; }
	.ac-plan-card { padding: 24px 20px; }
}

/* =======================================================================
 * Phase 2 — sections, quizzes, final test, flashcards, study notes
 * ==================================================================== */

/* Section headings within the curriculum */
.ac-module-title {
	font-family: var(--ac-sans);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ac-gold-deep);
	margin: 26px 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--ac-line);
}
.ac-module-title:first-of-type { margin-top: 8px; }

.ac-lesson__quizflag {
	display: inline-block;
	margin-left: 10px;
	padding: 1px 9px;
	font-size: .64rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ac-gold-deep);
	background: var(--ac-cream);
	border: 1px solid var(--ac-gold-soft);
	border-radius: 999px;
	vertical-align: middle;
}

/* ---------- Quiz ---------- */
.ac-quiz {
	margin: 22px 0;
	padding: 26px;
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: var(--ac-radius);
	box-shadow: var(--ac-shadow);
}
.ac-quiz--empty { padding: 18px 26px; }
.ac-q { padding: 18px 0; border-bottom: 1px solid var(--ac-line); }
.ac-q:first-child { padding-top: 0; }
.ac-q:last-of-type { border-bottom: 0; }
.ac-q__text {
	font-family: var(--ac-serif);
	font-size: 1.22rem;
	line-height: 1.35;
	color: var(--ac-wine);
	margin: 0 0 14px;
}
.ac-q__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px; height: 26px;
	margin-right: 10px;
	font-family: var(--ac-sans);
	font-size: .78rem;
	font-weight: 700;
	color: var(--ac-gold-deep);
	background: var(--ac-cream);
	border-radius: 50%;
	vertical-align: middle;
}
.ac-q__opt {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 14px;
	margin: 7px 0;
	border: 1px solid var(--ac-line-strong);
	border-radius: var(--ac-radius-sm);
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}
.ac-q__opt:hover { border-color: var(--ac-gold-soft); background: var(--ac-parchment); }
.ac-q__opt input { accent-color: var(--ac-wine); width: 16px; height: 16px; }
.ac-q__input {
	width: 100%;
	padding: 12px 14px;
	font-family: var(--ac-sans);
	font-size: .96rem;
	border: 1px solid var(--ac-line-strong);
	border-radius: var(--ac-radius-sm);
	background: var(--ac-parchment);
}
.ac-q__input:focus { outline: none; border-color: var(--ac-gold); }
.ac-q__explain {
	margin: 12px 0 0;
	padding: 11px 14px;
	font-size: .9rem;
	color: var(--ac-ink-soft);
	background: var(--ac-parchment);
	border-left: 3px solid var(--ac-gold);
	border-radius: 0 var(--ac-radius-sm) var(--ac-radius-sm) 0;
}
/* graded states */
.ac-q.is-correct .ac-q__num { background: #e7f1e7; color: #2f6f3f; }
.ac-q.is-incorrect .ac-q__num { background: #f6e3e3; color: #9a3b3b; }
.ac-q__opt.is-right { border-color: #5a9367; background: #eef6ee; }
.ac-q__opt.is-right span { color: #2f6f3f; font-weight: 600; }
.ac-quiz__foot { display: flex; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.ac-quiz__result {
	font-family: var(--ac-sans);
	font-size: .94rem;
	padding: 9px 16px;
	border-radius: 999px;
}
.ac-quiz__result.is-pass { color: #2f6f3f; background: #eef6ee; border: 1px solid #cfe4cf; }
.ac-quiz__result.is-fail { color: #9a3b3b; background: #f9eded; border: 1px solid #ecd2d2; }

/* ---------- Final test ---------- */
.ac-final { margin: 40px 0; padding-top: 8px; }
.ac-final__head { margin-bottom: 10px; }
.ac-locked {
	padding: 22px 24px;
	text-align: center;
	color: var(--ac-ink-soft);
	background: var(--ac-parchment-deep);
	border: 1px dashed var(--ac-line-strong);
	border-radius: var(--ac-radius);
}
.ac-passed-banner {
	padding: 14px 20px;
	margin-bottom: 16px;
	font-weight: 600;
	color: #2f6f3f;
	background: #eef6ee;
	border: 1px solid #cfe4cf;
	border-radius: var(--ac-radius-sm);
}

/* ---------- Study / flashcards ---------- */
.ac-study { margin: 40px 0; }
.ac-decks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-top: 14px; }
.ac-deck {
	padding: 22px;
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: var(--ac-radius);
	box-shadow: var(--ac-shadow);
}
.ac-deck__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.ac-deck__title { font-family: var(--ac-serif); color: var(--ac-wine); font-size: 1.3rem; margin: 0; }
.ac-deck__counter { font-family: var(--ac-sans); font-size: .8rem; color: var(--ac-ink-soft); }
.ac-deck__card {
	position: relative;
	width: 100%;
	min-height: 180px;
	cursor: pointer;
	perspective: 1200px;
	margin-bottom: 16px;
}
.ac-deck__face {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 26px;
	font-family: var(--ac-serif);
	font-size: 1.3rem;
	line-height: 1.4;
	color: var(--ac-wine);
	background: var(--ac-parchment);
	border: 1px solid var(--ac-line-strong);
	border-radius: var(--ac-radius-sm);
	backface-visibility: hidden;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.ac-deck__face--front { transform: rotateY(0deg); }
.ac-deck__face--back {
	transform: rotateY(180deg);
	background: var(--ac-wine);
	color: var(--ac-parchment);
	border-color: var(--ac-wine-deep);
	font-size: 1.12rem;
}
.ac-deck__card.is-flipped .ac-deck__face--front { transform: rotateY(180deg); }
.ac-deck__card.is-flipped .ac-deck__face--back { transform: rotateY(360deg); }
.ac-deck__controls { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-deck__controls .ac-btn { padding: 7px 14px; font-size: .82rem; }

/* ---------- Notes ---------- */
.ac-notes {
	margin: 24px 0;
	padding: 22px;
	background: var(--ac-card);
	border: 1px solid var(--ac-line);
	border-radius: var(--ac-radius);
	box-shadow: var(--ac-shadow);
}
.ac-notes__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ac-notes__title { font-family: var(--ac-serif); color: var(--ac-wine); font-size: 1.3rem; margin: 0; }
.ac-notes__state { font-family: var(--ac-sans); font-size: .78rem; color: var(--ac-gold-deep); }
.ac-notes__text {
	width: 100%;
	min-height: 130px;
	padding: 14px 16px;
	font-family: var(--ac-sans);
	font-size: .95rem;
	line-height: 1.6;
	color: var(--ac-ink);
	background: var(--ac-parchment);
	border: 1px solid var(--ac-line-strong);
	border-radius: var(--ac-radius-sm);
	resize: vertical;
}
.ac-notes__text:focus { outline: none; border-color: var(--ac-gold); }
