/* IVYN refresh: one set of tokens for motion, radius and elevation, plus the shared component
   polish built on them. Loaded last on index, pricing, courses and dashboard so it settles the
   values the earlier layers disagree on. Identity (logo, green palette, copy, section order) is
   unchanged; only finish is unified here. */

:root {
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --dur-press: 160ms;
  --dur-ui: 200ms;
  --radius-control: 10px;
  --radius-card: 16px;
  --brand: #397858;
  --brand-hover: #2e664a;
  --brand-ink: #244633;
  --brand-ink-hover: #1b3626;
  --shadow-1: 0 1px 2px rgba(31, 53, 38, .06), 0 2px 6px rgba(31, 53, 38, .04);
  --shadow-2: 0 2px 4px rgba(31, 53, 38, .06), 0 10px 24px rgba(31, 53, 38, .08);
  --shadow-3: 0 4px 10px rgba(31, 53, 38, .08), 0 22px 48px rgba(31, 53, 38, .14);
}
html[data-theme="dark"] {
  --brand-hover: #4a8d68;
  --brand-ink-hover: #2c4d39;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .3), 0 10px 24px rgba(0, 0, 0, .28);
  --shadow-3: 0 4px 10px rgba(0, 0, 0, .35), 0 22px 48px rgba(0, 0, 0, .4);
}

/* Browser surfaces: selection, caret, form accents, scrollbars and link underlines carry the palette. */
::selection { background: #cfe6d4; color: #16281d; }
html[data-theme="dark"] ::selection { background: #2f5a3e; color: #f0f4ed; }
html { accent-color: var(--brand); scrollbar-color: #b9cdbd transparent; }
html[data-theme="dark"] { scrollbar-color: #3a4b3d transparent; }
input, textarea { caret-color: var(--brand); }
a { text-underline-offset: .2em; text-decoration-thickness: from-font; }

/* Marketing buttons: one radius, one size ramp, flat at rest, press feedback on every one. */
body .button,
body .footer-growth-cta,
body .pricing-cta,
body .google-button {
  border-radius: var(--radius-control);
  box-shadow: none;
  transition: background-color var(--dur-press) var(--ease-out), border-color var(--dur-press) var(--ease-out), color var(--dur-press) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
body .button { font-size: 15px; letter-spacing: -.005em; }
body .button-small,
body .site-header .header-actions .button-small { font-size: 13px; }
body .site-header .header-actions .text-button { font-size: 14px; }
body .footer-growth-cta { font-size: 14px; }
body .button-primary { background: var(--brand); }
body .button-dark { background: var(--brand-ink); }
body :is(.button, .footer-growth-cta, .pricing-cta, .google-button):active:not(:disabled) { transform: scale(.97); }

/* Hover lifts only where a pointer can hover; touch screens otherwise keep the hover state stuck. */
@media (hover: hover) and (pointer: fine) {
  body .button-primary:hover { background: var(--brand-hover); box-shadow: var(--shadow-2); transform: none; }
  body .button-dark:hover { background: var(--brand-ink-hover); box-shadow: var(--shadow-2); transform: none; }
  body .button-light:hover { box-shadow: var(--shadow-1); transform: none; }
  body .footer-growth-cta:hover { box-shadow: var(--shadow-2); transform: none; }
}

/* App buttons (dashboard, courses): primary and secondary actions share the same shape and feedback. */
body.dashboard-body :is(.sat-practice-primary, .settings-save, .study-plan-create, .university-submit, .material-generate, .flashcard-reveal, .essay-feedback-button, .focus-button, .catalog-course-card a),
body.dashboard-body :is(.course-continue, .settings-signout, .onboarding-edit-profile, .pulse-action, .essay-save-button, .analytics-more) {
  border-radius: var(--radius-control);
  box-shadow: none;
  transition: background-color var(--dur-press) var(--ease-out), border-color var(--dur-press) var(--ease-out), color var(--dur-press) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
body.dashboard-body :is(.sat-practice-primary, .settings-save, .study-plan-create, .university-submit, .material-generate, .flashcard-reveal, .essay-feedback-button) { min-height: 42px; font-size: 14px; font-weight: 700; }
body.dashboard-body :is(.focus-button, .course-continue) { font-size: 14px; }
body.dashboard-body :is(button, .catalog-course-card a):active:not(:disabled) { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  body.dashboard-body :is(.sat-practice-primary, .settings-save, .study-plan-create, .university-submit, .material-generate, .flashcard-reveal, .essay-feedback-button):hover { box-shadow: var(--shadow-2); transform: none; }
}

/* Resting panels sit on a soft, offset shadow; only floating layers (menus, dialogs) go deeper. */
body.dashboard-body :is(.dash-course-card, .stat-card, .activity-card, .catalog-course-card, .settings-card, .chance-me-card) { box-shadow: var(--shadow-1); }
body .ap-mega-menu, body .auth-modal-card, body .notification-panel { box-shadow: var(--shadow-3); }

/* Reading sizes: lead copy reads at 17px on marketing pages, as on comparable learning platforms. */
body .hero-description,
body .section-lead,
body .courses-heading p,
body .feature-copy > p { font-size: 17px; line-height: 1.65; }
body .pricing-summary { font-size: 15px; }
body .pricing-card li { font-size: 14px; }
body .pricing-plan-fit { font-size: 13px; }
@media (max-width: 650px) {
  body .hero-description,
  body .section-lead,
  body .courses-heading p,
  body .feature-copy > p { font-size: 16px; }
}

/* Course catalog: the page title is the page's h1 and reads as one. */
body.dashboard-body #courseCatalogTitle { margin: 0; font-family: var(--display, 'Manrope', sans-serif); font-size: clamp(26px, 2.2vw, 32px); line-height: 1.15; letter-spacing: -.04em; color: var(--ink); }
body.dashboard-body .catalog-intro { font-size: 15px; }

/* Numbers that change or line up (prices, counts, stats) keep their width. */
body :is(.pricing-card, .stat-card, .home-question-count, .catalog-count, .sat-countdown) { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  body :is(.button, .footer-growth-cta, .pricing-cta, .google-button, button):active:not(:disabled) { transform: none; }
}

/* Free-plan daily limit dialog (plan-limits.js). */
.free-limit-dialog { width: min(440px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--line, #dce7dc); border-radius: var(--radius-card); background: var(--white, #fff); color: var(--ink, #20362b); box-shadow: var(--shadow-3); }
.free-limit-dialog::backdrop { background: rgba(18, 28, 21, .45); }
.free-limit-dialog h2 { margin: 0 0 10px; font: 700 22px/1.25 var(--display, 'Manrope', sans-serif); letter-spacing: -.02em; }
.free-limit-dialog p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: var(--muted, #5f7064); }
.free-limit-dialog .free-limit-note { font-size: 13px; }
.free-limit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.free-limit-actions > * { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-control); font: 700 15px var(--font, 'DM Sans', sans-serif); text-decoration: none; cursor: pointer; transition: background-color var(--dur-press) var(--ease-out), transform var(--dur-press) var(--ease-out); }
.free-limit-primary { background: var(--brand); color: #fff; border: 0; }
.free-limit-secondary { background: transparent; color: var(--ink, #20362b); border: 1px solid var(--line, #dce7dc); }
.free-limit-actions > *:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .free-limit-primary:hover { background: var(--brand-hover); } }

/* Exam guide link inside the IMAT / CEnT-S course cards (added 2026-10-22). */
.course-card .course-guide-link{display:inline-block;margin-top:6px;font-weight:700;color:#2f6f4c;text-decoration:none;position:relative;z-index:1}
.course-card .course-guide-link:hover{text-decoration:underline;text-underline-offset:3px}
html[data-theme="dark"] .course-card .course-guide-link{color:#8fd1a3}
