/* ─────────────────────────────────────────────────────────────────────────────
   Public website chrome and shared components (templates/base.html)

   Header with drop-down menus, the sign-in pop-up, the footer, the page banner,
   buttons, forms and cards used by every public page.  Loaded after the base
   styles in base.html, so it refines them.  Mobile-first; the menu collapses
   below 1060 px.  Dropdown parents are real links, so the menus also work
   without JavaScript (hover / keyboard focus).
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --font-head: "Poppins", "Nunito", system-ui, sans-serif;
  --shadow-sm: 0 1px 2px rgba(26, 26, 46, .05), 0 8px 20px -14px rgba(45, 33, 128, .28);
  --shadow-md: 0 14px 34px -16px rgba(45, 33, 128, .38);
  --ring: 0 0 0 3px rgba(103, 89, 232, .3);
  --site-gray: #f3f4f8;
}
body { background: var(--gray-50); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); }
:focus-visible { outline: 3px solid var(--purple-500); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn { border-radius: 999px; font-weight: 800; letter-spacing: .01em; height: 40px; padding: 0 1.25rem; }
.btn:hover { opacity: 1; filter: brightness(1.06); }
.btn-brand { box-shadow: 0 10px 20px -12px rgba(75, 60, 199, .85); }
.btn-sm { height: 34px; padding: 0 1rem; border-radius: 999px; }
.btn-lg { height: 50px; padding: 0 1.9rem; border-radius: 999px; font-size: .98rem; }
.btn-white { background: #fff; color: var(--purple-600); border-color: #fff; box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .5); }
.btn-white:hover { background: var(--purple-50); }
.btn-line-white { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .8); }
.btn-line-white:hover { background: rgba(255, 255, 255, .16); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-control {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: 12px; min-height: 46px; padding: .7rem .95rem;
  font-size: .92rem; transition: border-color .15s, box-shadow .15s;
}
select.form-control { padding-right: 2rem; }
.form-control:focus { border-color: var(--purple-500); box-shadow: var(--ring); background: #fff; }
.form-control::placeholder { color: #6b6b85; opacity: 1; }
.form-label { font-size: .82rem; margin-bottom: .35rem; }
.form-error, .field-error { color: #b42318; font-weight: 600; }
.surface, .card { border-radius: 20px; box-shadow: var(--shadow-sm); border-color: #e8e6f6; }

/* ── Header ───────────────────────────────────────────────────────────────── */
header {
  background: var(--white); border-bottom: 1px solid #ecebf7; position: sticky; top: 0; z-index: 100;
}
@supports (backdrop-filter: blur(8px)) {
  header { background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px); }
}
.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 1000; padding: .6rem 1rem; border-radius: 12px;
  background: var(--purple-600); color: #fff; font-weight: 800;
}
.skip-link:focus { top: .75rem; color: #fff; text-decoration: none; }
.navbar { display: flex; align-items: center; min-height: 70px; gap: .35rem; padding: .25rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex-shrink: 0; }
.navbar-brand:hover { text-decoration: none; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; overflow: hidden; background: var(--gradient); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--gray-900); letter-spacing: -.01em; }
.brand-text span { font-size: .62rem; font-weight: 700; color: var(--purple-500); text-transform: uppercase; letter-spacing: .06em; }
.nav-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 .3rem; border-radius: 999px;
  background: var(--purple-500); color: #fff; font-size: .68rem; font-weight: 800;
}
.nav-actions { display: flex; align-items: center; flex-shrink: 0; }
.account-menu {
  position: absolute; top: calc(100% + .6rem); right: 0; width: min(310px, calc(100vw - 2rem)); padding: .5rem; background: var(--white);
  border: 1px solid var(--gray-200); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility 0s linear .15s; z-index: 230;   /* hides after the fade-out, shows at once */
}
.account-dropdown.is-open .account-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.account-menu-link {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: .55rem .6rem;
  color: var(--gray-900); border-radius: 12px; text-decoration: none;
}
.account-menu-link:hover { background: var(--purple-50); color: var(--purple-600); text-decoration: none; }
.account-menu-link i {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
  background: var(--purple-50); color: var(--purple-600); font-size: 1rem;
}
.account-menu-link strong { display: block; font-size: .85rem; line-height: 1.2; }
.account-menu-link small { display: block; color: var(--gray-400); font-size: .72rem; line-height: 1.3; margin-top: .1rem; }
.account-menu-meta { color: var(--gray-600); font-size: .74rem; font-weight: 800; }
.account-menu-separator { height: 1px; margin: .3rem 0; background: var(--gray-100); }
.menu-toggle { display: none; flex-direction: column; gap: 4px; border: 0; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; }
.pwa-install-button { position: fixed; right: 1rem; bottom: 1rem; z-index: 300; }
.pwa-install-button[hidden], .push-enable-btn[hidden] { display: none; }
@media (max-width: 560px) {
  .pwa-install-button { width: 48px; height: 48px; padding: 0; border-radius: 50%; right: .75rem; bottom: .75rem; }
  .pwa-install-button i { font-size: 1.3rem; }
  .pwa-install-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.navbar-nav { display: flex; align-items: center; flex: 1 1 0; min-width: 0; gap: .1rem; margin: 0 0 0 1rem; padding: 0; list-style: none; flex-wrap: nowrap; }
.navbar-nav > li { position: relative; display: flex; align-items: center; }
.navbar-nav > li.nav-mobile-only { display: none; }
.navbar-nav a, .navbar-nav .nav-chevron {
  font-size: .86rem; font-weight: 700; color: var(--gray-600); padding: .5rem .8rem; border-radius: 999px;
  text-decoration: none; white-space: nowrap; transition: background .15s, color .15s;
}
.navbar-nav a:hover, .navbar-nav > li:hover > a, .navbar-nav a[aria-current="page"], .navbar-nav > li.is-current > a {
  background: var(--purple-50); color: var(--purple-600); text-decoration: none;
}
.navbar-nav .has-menu > a { padding-right: .35rem; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.nav-chevron {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 36px; margin-left: -1px;
  background: transparent; border: 0; cursor: pointer; padding: 0 .2rem 0 0; border-radius: 0 999px 999px 0;
}
.nav-chevron[hidden] { display: none; }
.nav-chevron i { transition: transform .18s ease; font-size: 1.05rem; }
.navbar-nav > li:hover > .nav-chevron, .navbar-nav > li.is-open > .nav-chevron { background: var(--purple-50); color: var(--purple-600); }
.navbar-nav > li.is-open > .nav-chevron i { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + .45rem); left: 0; z-index: 210; min-width: 250px; margin: 0; padding: .5rem; list-style: none;
  background: #fff; border: 1px solid #ecebf7; border-radius: 18px; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s, transform .16s, visibility 0s linear .16s;
}
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -.55rem; height: .55rem; }
.navbar-nav > li:hover > .nav-menu, .navbar-nav > li:focus-within > .nav-menu, .navbar-nav > li.is-open > .nav-menu {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.nav-menu a {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: .65rem; align-items: center; width: 100%;
  padding: .55rem .6rem; border-radius: 12px; white-space: normal; background: transparent;
}
.nav-menu a i {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
  background: var(--purple-50); color: var(--purple-600); font-size: 1rem;
}
.nav-menu a strong { display: block; font-size: .85rem; color: var(--gray-900); line-height: 1.2; }
.nav-menu a small { display: block; font-size: .74rem; font-weight: 600; color: var(--gray-400); line-height: 1.3; margin-top: .1rem; }
.nav-menu a:hover { background: var(--purple-50); }
.nav-menu .nav-menu-label { padding: .35rem .7rem .2rem; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-400); }

.nav-actions { gap: .45rem; margin-left: auto; }
.nav-search { margin-left: 0; position: relative; }
.nav-search-toggle {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--gray-200);
  background: #fff; color: var(--gray-600); cursor: pointer; font-size: 1.1rem;
}
.nav-search-toggle:hover { background: var(--purple-50); color: var(--purple-600); border-color: var(--purple-100); }
.nav-search-panel {
  position: absolute; right: 0; top: calc(100% + .55rem); width: min(340px, calc(100vw - 2rem)); padding: .6rem; z-index: 220;
  background: #fff; border: 1px solid #ecebf7; border-radius: 18px; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s, transform .16s, visibility 0s linear .16s;
}
.nav-search.is-open .nav-search-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav-search-panel form { display: flex; gap: .4rem; }
.nav-search-panel input[type="search"] { flex: 1; width: auto; height: 42px; border-radius: 999px; padding: 0 1rem; }
.nav-search-toggle[hidden] { display: none; }
/* Without JavaScript the search field is simply shown inside the menu. */
html:not(.js) .nav-search-panel { position: static; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0; }
html:not(.js) .nav-search-toggle { display: none; }

.account-dropdown { position: relative; display: flex; align-items: center; }
.account-menu-toggle { min-width: 0; }
.account-menu { border-radius: 18px; box-shadow: var(--shadow-md); border-color: #ecebf7; }
.menu-toggle {
  width: 42px; height: 42px; padding: 0; margin-left: .15rem; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--gray-100);
}
.menu-toggle span { background: var(--gray-900); }

.nav-mobile-only { display: none; }
.nav-search-mobile form { display: flex; gap: .45rem; }
.nav-search-mobile .form-control { flex: 1; width: auto; border-radius: 999px; min-height: 44px; }
.account-menu-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1060px) {
  .menu-toggle { display: flex; }
  .navbar { flex-wrap: wrap; min-height: 64px; padding: .4rem 0; }
  .nav-actions { margin-left: auto; }
  .navbar-nav > li.nav-mobile-only { display: block; }
  .navbar-nav {
    display: none; order: 10; flex: 0 0 100%; width: 100%; flex-direction: column; align-items: stretch; gap: .1rem; margin: .4rem 0 0;
    padding: .6rem 0 .8rem; border-top: 1px solid var(--gray-100);
  }
  .navbar-nav.active { display: flex; }
  .navbar-nav > li { display: block; }
  .navbar-nav a { display: block; width: 100%; padding: .7rem .9rem; border-radius: 14px; font-size: .95rem; }
  .navbar-nav .has-menu > a { border-radius: 14px; padding-right: .9rem; }
  .nav-chevron { display: none !important; }
  .nav-menu {
    position: static; min-width: 0; margin: 0 0 .25rem .8rem; padding: 0 0 0 .6rem; background: transparent; border: 0; border-left: 2px solid var(--purple-100);
    border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none;
  }
  .nav-menu::before { display: none; }
  .nav-menu a { grid-template-columns: minmax(0, 1fr); padding: .5rem .7rem; font-size: .88rem; }
  .nav-menu a i, .nav-menu a small { display: none; }
  .nav-menu a strong { font-weight: 600; color: var(--gray-600); }
  .navbar-nav > li > a { color: var(--gray-900); }
  .nav-menu .nav-menu-label { display: none; }
  .nav-search { display: none; }
}
@media (max-width: 520px) {
  .account-menu-name { display: none; }
}
@media (max-width: 420px) {
  .nav-actions .btn-brand { display: none; }
  .navbar-brand .brand-text span { display: none; }
}

/* ── Page banner used by inner pages ──────────────────────────────────────── */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; text-align: left;
  background:
    radial-gradient(60% 120% at 0% 0%, rgba(192, 38, 211, .38), rgba(192, 38, 211, 0) 60%),
    linear-gradient(135deg, #5b3fd6 0%, #3b2fa8 55%, #241b7a 100%);
  padding: clamp(2.4rem, 6vw, 4.2rem) 0 clamp(3.2rem, 7.5vw, 5.4rem);
}
.page-hero::before, .page-hero::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; pointer-events: none; }
.page-hero::before { width: 26rem; height: 26rem; right: -8rem; top: -12rem; background: rgba(255, 255, 255, .08); }
.page-hero::after {
  inset: auto 0 -1px 0; width: auto; height: clamp(26px, 4vw, 46px); border-radius: 0; background: var(--gray-50);
  clip-path: ellipse(58% 100% at 50% 100%); z-index: 0;
}
.page-hero.is-center { text-align: center; }
.page-hero.is-center .crumbs, .page-hero.is-center .page-hero-actions { justify-content: center; }
.page-hero .kicker {
  display: inline-block; margin-bottom: .6rem; padding: .25rem .8rem; border-radius: 999px; font-size: .72rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; background: rgba(255, 255, 255, .16); color: #fff;
}
.page-hero h1 { font-size: clamp(1.8rem, 4.6vw, 3rem); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; margin: 0; color: #fff; }
.page-hero p.lead { max-width: 44rem; margin: .9rem 0 0; font-size: clamp(.95rem, 1.6vw, 1.1rem); color: rgba(255, 255, 255, .9); line-height: 1.65; }
.page-hero.is-center p.lead { margin-left: auto; margin-right: auto; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .8rem; font-weight: 700; }
.crumbs a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs li + li::before { content: "›"; margin-right: .35rem; color: rgba(255, 255, 255, .6); }
.crumbs [aria-current="page"] { color: #fff; }
.page-body { padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(3rem, 6vw, 4.5rem); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer { background: #17104f; border-top: 0; color: rgba(255, 255, 255, .82); margin-top: 4rem; padding: 3.2rem 0 1.4rem; position: relative; }
footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr)); gap: 2rem 2.2rem; margin-bottom: 2.2rem; }
.footer-brand-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
footer .brand-text strong { color: #fff; }
footer .brand-text span { color: rgba(255, 255, 255, .75); }
.footer-desc { font-size: .88rem; line-height: 1.7; color: rgba(255, 255, 255, .78); max-width: 26rem; }
.footer-title { font-family: var(--font-head); font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: .9rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: .55rem; margin: 0; padding: 0; }
.footer-links a { font-size: .9rem; font-weight: 600; }
.footer-social { display: flex; gap: .55rem; margin-top: 1.1rem; }
.footer-social a {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .1);
  color: #fff; font-size: 1.1rem; transition: background .15s, transform .15s;
}
.footer-social a:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); text-decoration: none; }
.footer-contact { list-style: none; display: grid; gap: .6rem; margin: 1rem 0 0; padding: 0; font-size: .86rem; }
.footer-contact li { display: flex; gap: .55rem; align-items: flex-start; }
.footer-contact i { color: #cfc8ff; margin-top: .15rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 1.2rem; font-size: .8rem; color: rgba(255, 255, 255, .72);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1rem;
}
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; text-align: center; } }

/* ── Sign-in / register pop-up ────────────────────────────────────────────── */
.auth-dialog {
  /* the global reset removed the browser's own "margin: auto", which is what centres a modal dialog */
  margin: auto; width: min(460px, calc(100vw - 1.5rem)); max-height: calc(100vh - 1.5rem); max-height: calc(100dvh - 1.5rem); padding: 0; border: 0; border-radius: 24px; overflow: hidden;
  background: #fff; color: var(--gray-900); box-shadow: 0 30px 80px -20px rgba(26, 18, 112, .55);
}
.auth-dialog::backdrop { background: rgba(23, 16, 79, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.auth-dialog[open] { animation: auth-pop .22s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
@keyframes auth-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.auth-dialog-close {
  position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 1.3rem; display: grid; place-items: center;
}
.auth-dialog-close:hover { background: rgba(255, 255, 255, .32); }
.auth-dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.auth-loading, .auth-failed { padding: 3rem 1.5rem; text-align: center; color: var(--gray-600); font-weight: 700; }
.auth-head {
  position: relative; padding: 1.7rem 1.6rem 1.5rem; color: #fff;
  background: radial-gradient(70% 120% at 0% 0%, rgba(192, 38, 211, .4), rgba(192, 38, 211, 0) 60%), linear-gradient(135deg, #5b3fd6, #2d2180);
}
.auth-head h1, .auth-head h2 { font-size: 1.45rem; font-weight: 700; margin: 0 0 .2rem; color: #fff; }
.auth-head p { margin: 0; font-size: .88rem; color: rgba(255, 255, 255, .88); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin: 1.1rem 0 0; padding: .3rem; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.auth-tabs a {
  text-align: center; padding: .5rem .5rem; border-radius: 999px; font-weight: 800; font-size: .86rem; color: #fff; text-decoration: none;
}
.auth-tabs a[aria-current="page"] { background: #fff; color: var(--purple-600); }
.auth-form { padding: 1.4rem 1.6rem 1.6rem; display: grid; gap: .95rem; }
.auth-field { display: grid; gap: .3rem; }
.auth-field label { font-size: .8rem; font-weight: 800; color: var(--gray-600); }
.auth-field .hint { font-size: .74rem; color: var(--gray-400); }
.auth-field .error { font-size: .78rem; color: #b42318; font-weight: 700; }
.auth-two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 420px) { .auth-two { grid-template-columns: 1fr; } }
.auth-alert { padding: .7rem .9rem; border-radius: 12px; background: var(--danger-bg); color: #b42318; border: 1px solid var(--danger-border); font-size: .85rem; font-weight: 700; }
.auth-submit { width: 100%; height: 48px; font-size: .95rem; }
.auth-or { display: flex; align-items: center; gap: .8rem; color: var(--gray-400); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--gray-200); }
.btn-google {
  width: 100%; height: 48px; background: #fff; color: var(--gray-900); border: 1.5px solid var(--gray-200); gap: .65rem; font-size: .92rem;
}
.btn-google:hover { background: var(--gray-50); text-decoration: none; }
.btn-google svg { width: 20px; height: 20px; flex: none; }
.auth-foot { text-align: center; font-size: .84rem; color: var(--gray-600); margin: 0; }
.auth-foot a { font-weight: 800; }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 3rem; }
.pw-toggle {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: transparent; color: var(--gray-600); cursor: pointer; font-size: 1.1rem;
}
.pw-toggle:hover { background: var(--gray-100); }
body.has-dialog { overflow: hidden; }
.auth-page {
  padding: clamp(1.6rem, 5vw, 3.6rem) 0 clamp(3rem, 7vw, 5rem);
  background: radial-gradient(60% 40% at 50% 0%, rgba(124, 110, 245, .16), rgba(124, 110, 245, 0) 70%);
}
.auth-card {
  width: min(480px, calc(100% - 2rem)); margin: 0 auto; background: #fff; border-radius: 24px; overflow: hidden;
  border: 1px solid #ecebf7; box-shadow: var(--shadow-md);
}
.auth-form select.form-control { background: #fff; }

/* ── Worksheet card (catalogue, landing page, dashboard, saved list) ───────── */
.worksheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 1.15rem; }
.ws-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #ecebf7;
  border-radius: 20px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ws-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--purple-100); }
.ws-card-media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--gradient-soft); overflow: hidden; }
.ws-card-media img, .ws-card-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ws-card:hover .ws-card-thumb { transform: scale(1.04); }
.ws-card-thumb-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.8rem; color: var(--purple-500);
  background: linear-gradient(135deg, #f3f0ff, #e1dbff);
}
.ws-card-chip {
  position: absolute; left: .75rem; top: .75rem; padding: .22rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .94);
  color: var(--purple-600); font-size: .7rem; font-weight: 800; letter-spacing: .03em; box-shadow: 0 6px 14px -8px rgba(26, 26, 46, .5);
}
.ws-card-body { display: flex; flex-direction: column; gap: .4rem; padding: 1rem 1.1rem .4rem; flex: 1; }
.ws-card-title { font-family: var(--font-head); font-size: .98rem; font-weight: 600; line-height: 1.3; color: var(--gray-900); }
.ws-card-title a { color: inherit; text-decoration: none; }
.ws-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }      /* the whole card is one big target */
.ws-card-title a:hover { color: var(--purple-600); }
.ws-card-desc { margin: 0; font-size: .82rem; line-height: 1.55; color: var(--gray-600); }
.ws-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .85rem; margin-top: auto; padding-top: .35rem; font-size: .76rem; font-weight: 700; color: var(--gray-400); }
.ws-card-meta i { color: var(--purple-500); margin-right: .15rem; }
.ws-card-rating { color: #92560a; }
.ws-card-rating i { color: #d97706; }
.ws-card-rating span { color: var(--gray-400); font-weight: 600; }
.ws-card-actions { position: relative; z-index: 2; display: flex; gap: .5rem; padding: .7rem 1.1rem 1.1rem; }
.ws-card-actions .btn-brand { flex: 1; }
.ws-card-save { flex: none; margin: 0; }
.ws-card-save .btn { width: 36px; padding: 0; }

/* Links inside a sentence are underlined so they do not rely on colour alone (WCAG 1.4.1). */
.support-note a, .muted a, .job-closed a, .alert a, .contact-lead a { text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }

/* ── Messages ─────────────────────────────────────────────────────────────── */
.alert { border-radius: 14px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .auth-dialog[open] { animation: none; }
  .nav-menu, .nav-search-panel, .nav-chevron i { transition: none; }
}
