/* -------------------- */
/* CSS ROOT & TOKENS    */
/* -------------------- */

:root {
    --brand-950: #0B1220;
    --brand-900: #111A2E;
    --brand-100: #E6ECFF;
    --text-100: #EAF2FF;
    --text-300: #B6C2E2;
    --primary-600: #3F6AFF;
    --primary-500: #5B8CFF;
    --teal-500: #22D1B2;
    --amber-400: #FFD166;
    --pink-400: #FF6BAA;
    --success-500: #18C77C;
    --danger-500: #F04438;
  
    --grad-primary: linear-gradient(135deg, #3F6AFF 0%, #22D1B2 50%, #FFD166 100%);
    --grad-hero: radial-gradient(1200px 600px at 20% -10%, rgba(63,106,255,.35), transparent 60%), 
                 radial-gradient(1000px 600px at 80% 0%, rgba(34,209,178,.25), transparent 60%);
  
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --shadow-lg: 0 10px 30px rgba(0,0,0,.35);
    --blur-bg: blur(8px);
  
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
  
    --container-max: 1200px;
    --gutter: clamp(16px, 3vw, 32px);
  }
  
  /* -------------------- */
  /* GLOBAL RESET         */
  /* -------------------- */
  
  *, *::before, *::after {
    box-sizing: border-box;
  }
  html {
    scroll-behavior: smooth;
  }
  body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--brand-950);
    color: var(--text-100);
    line-height: 1.6;
    font-size: clamp(1rem, 0.4vw + 0.9rem, 1.125rem);
  }
  img {
    max-width: 100%;
    display: block;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  button {
    font: inherit;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
  }
  input, select, textarea {
    font: inherit;
  }
  
  /* -------------------- */
  /* TYPOGRAPHY SCALE     */
  /* -------------------- */
  
  h1 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2rem, 3.5vw + 1rem, 4rem);
    margin: 0 0 0.5em;
  }
  h2 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.5rem, 2.2vw + 1rem, 2.5rem);
    margin: 2em 0 1em;
  }
  h3 {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(1.25rem, 1.4vw + 1rem, 1.75rem);
    margin: 1.5em 0 0.75em;
  }
  
  /* -------------------- */
  /* UTILITIES            */
  /* -------------------- */
  
  .container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
  }
  .btn {
    display: inline-block;
    padding: 0.75em 1.25em;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
  }
  .btn-primary {
    background: var(--grad-primary);
    color: var(--brand-950);
    border: none;
    background-size: 300%;
    background-position: 0% center;
    animation: shimmer 3s linear infinite;
  }
  .btn-primary:hover {
    transform: translateY(-2px);
  }
  .btn-ghost {
    background: transparent;
    border: 2px solid var(--primary-500);
    color: var(--primary-500);
  }
  .chip {
    background: var(--brand-900);
    padding: 0.4em 0.75em;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    display: inline-block;
    color: var(--text-300);
  }
  .card {
    background: rgba(17, 26, 46, 0.6);
    backdrop-filter: var(--blur-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  }
  .grid {
    display: grid;
    gap: 2rem;
  }
  .sr-only, .skip-link {
    position: absolute;
    left: -9999px;
  }
  .skip-link {
    top: 0;
    left: 0;
    padding: 0.5em;
    background: var(--primary-600);
    color: var(--brand-950);
    z-index: 1000;
  }
  .skip-link:focus {
    left: 1rem;
    top: 1rem;
  }
  
  /* -------------------- */
  /* HEADER + NAV         */
  /* -------------------- */
  
  .header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--brand-950);
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
  }
  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
  }
  .nav-links {
    display: flex;
    gap: 1.5rem;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-menu {
    display: none;
  }
  
  /* -------------------- */
  /* HERO                 */
  /* -------------------- */
  
  .hero {
    position: relative;
    padding: 6rem 0;
    background: var(--grad-hero);
    overflow: hidden;
  }
  .hero-sub {
    color: var(--text-300);
    max-width: 45ch;
    margin-bottom: 2rem;
  }
  .hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .trust-row {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .hero-bg img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.06;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
  }
  .orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
    animation: float 20s ease-in-out infinite alternate;
  }
  .orb1 {
    background: var(--primary-600);
    width: 300px;
    height: 300px;
    top: -50px;
    left: 10%;
  }
  .orb2 {
    background: var(--teal-500);
    width: 250px;
    height: 250px;
    bottom: -30px;
    right: 10%;
  }
  
  /* -------------------- */
  /* TOASTS               */
  /* -------------------- */
  
  .toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .toast {
    background: var(--brand-900);
    color: var(--text-100);
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary-600);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: fade-in 0.3s ease-out;
  }
  
  /* -------------------- */
  /* MODALS               */
  /* -------------------- */
  
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11,18,32,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: var(--blur-bg);
    z-index: 2000;
  }
  .modal[hidden] {
    display: none;
  }
  .modal .dialog {
    background: var(--brand-900);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
  }
  
  /* -------------------- */
  /* ANIMATIONS           */
  /* -------------------- */
  
  @keyframes shimmer {
    0% {
      background-position: 0% center;
    }
    100% {
      background-position: 200% center;
    }
  }
  @keyframes float {
    0% {
      transform: translateY(0px) scale(1);
    }
    100% {
      transform: translateY(20px) scale(1.05);
    }
  }
  @keyframes fade-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* -------------------- */
  /* MEDIA QUERIES        */
  /* -------------------- */
  
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation: none !important;
      transition: none !important;
    }
  }
  @media (max-width: 768px) {
    .nav-links {
      display: none;
    }
    .nav-toggle {
      display: block;
    }
    .mobile-menu {
      display: block;
      position: absolute;
      top: 100%;
      left: 0;
      background: var(--brand-900);
      width: 100%;
      padding: 1rem;
    }
    .mobile-menu ul {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }
  }
  /* -------------------- */
/* USER ICON + ACTIONS  */
/* -------------------- */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .user-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--brand-900);
    border-radius: 50%;
    border: 2px solid var(--primary-600);
    transition: background 0.3s ease;
  }
  .user-icon:hover {
    background: var(--brand-100);
    color: var(--brand-950);
  }
  .user-icon svg {
    width: 20px;
    height: 20px;
  }
  
  /* -------------------- */
  /* LOGIN MODAL FORM     */
  /* -------------------- */

  
  #login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  #login-form label {
    font-weight: 500;
    font-size: 0.9rem;
  }
  #login-form input {
    padding: 0.75em 1em;
    background: var(--brand-900);
    border: 1px solid var(--text-300);
    color: var(--text-100);
    border-radius: var(--radius-sm);
  }
  #login-form input:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
  }
  #login-form .divider {
    text-align: center;
    color: var(--text-300);
    font-size: 0.85rem;
    margin: 0.5rem 0;
    position: relative;
  }
  #login-form .divider::before,
  #login-form .divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--text-300);
  }
  #login-form .divider::before {
    left: 0;
  }
  #login-form .divider::after {
    right: 0;
  }
  #google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }
  
  /* -------------------- */
  /* USER STATE DISPLAY   */
  /* -------------------- */
  
  .user-initials {
    background: var(--primary-600);
    color: var(--brand-950);
    font-weight: 600;
    font-size: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
/* -------------------- */
/* AUTH MODALS REFINED  */
/* -------------------- */

.modal .dialog {
    padding: 2rem;
    background: var(--brand-900);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }
  
  #login-form,
  #signup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  #login-form input,
  #signup-form input {
    padding: 0.75em 1em;
    background: var(--brand-900);
    border: 1px solid var(--text-300);
    color: var(--text-100);
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
  
  #login-form input:focus,
  #signup-form input:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
  }
  
  .divider {
    text-align: center;
    color: var(--text-300);
    font-size: 0.85rem;
    margin: 0.5rem 0;
    position: relative;
  }
  .divider::before,
  .divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--text-300);
  }
  .divider::before { left: 0; }
  .divider::after { right: 0; }
  
  #google-login,
  #google-signup {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
  }
  
  /* -------------------- */
  /* LINK-STYLE SWITCH    */
  /* -------------------- */
  
  .auth-link {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-300);
  }
  
  .auth-link button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--primary-600);
    background-image: linear-gradient(to right, var(--primary-600), var(--teal-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
  }
  .auth-link button:hover {
    text-decoration: none;
    opacity: 0.9;
  }
    /* SECTION STYLES */
section {
    padding: 5rem 0;
  }
  .lead {
    font-size: 1.2rem;
    color: var(--text-300);
    max-width: 60ch;
    margin-bottom: 1rem;
  }
  .text-center {
    text-align: center;
  }
  
  /* WHY MATTERS */
  .why-matters {
    background: var(--brand-900);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
  }
  .why-matters .btn {
    margin-top: 1.5rem;
  }
  
  /* HOW WE HELP */
  .how-we-help .help-columns {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  /* MOVEMENT CTA */
  .movement-call {
    background: var(--grad-hero);
    position: relative;
  }
  .movement-call::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/texture-noise.svg');
    opacity: 0.05;
  }
  .movement-call .btn {
    margin-top: 2rem;
  }
  
  /* ANIMATIONS */
  .fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
  }
/* HERO VISUAL BACKGROUND ELEMENTS */
.hero {
    
    min-height: 100vh;

    
    background: var(--grad-hero);

  }
  .hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
  }
  .hero-bg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    object-fit: cover;
  }
  .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.1;
    animation: float 20s ease-in-out infinite alternate;
  }
  .orb1 {
    background: var(--primary-600);
    width: 280px;
    height: 280px;
    top: 20%;
    left: -10%;
  }
  .orb2 {
    background: var(--teal-500);
    width: 220px;
    height: 220px;
    bottom: 15%;
    right: -10%;
  }
  .ring {
    position: absolute;
    border: 2px solid var(--amber-400);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    opacity: 0.08;
  }
  .ring1 {
    top: 30%;
    right: 25%;
    animation: float 14s ease-in-out infinite;
  }
  .ring2 {
    bottom: 25%;
    left: 15%;
    animation: float 18s ease-in-out infinite reverse;
  }
  .blob {
    position: absolute;
    width: 400px;
    height: 400px;
    pointer-events: none;
  }
  .blob1 {
    top: -15%;
    left: -10%;
  }
  .blob2 {
    bottom: -10%;
    right: -10%;
  }
  @keyframes float {
    from {
      transform: translateY(0px) scale(1);
    }
    to {
      transform: translateY(20px) scale(1.05);
    }
  }
  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    z-index: 2;
    position: relative;
  }
  .metric {
    text-align: center;
    color: var(--text-100);
  }
  .metric .count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-500);
    animation: fadeUp 1s ease-out both;
  }
  .metric p {
    color: var(--text-300);
    margin-top: 0.5rem;
    font-size: 0.95rem;
  }
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .hero-metrics-wrapper {
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 2rem;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  .hero-metrics {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
  }
  
  .metric {
    flex: 1 1 200px;
    text-align: center;
  }
  
  .metric .count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-500);
  }
  
  .metric p {
    color: var(--text-300);
    margin-top: 0.5rem;
    font-size: 0.95rem;
  }
  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    align-items: center;
  }
  
  .metric .count {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary-500);
    text-shadow: 0 0 8px var(--primary-600), 0 0 16px rgba(91, 140, 255, 0.5);
    transition: transform 0.3s ease;
  }
  
  .metric:hover .count {
    transform: scale(1.05);
  }
  
  .metric p {
    color: var(--text-300);
    margin-top: 0.5rem;
    font-size: 0.95rem;
  }
  .hero-metrics {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    text-align: center;
  }
  .hero-metrics-wrapper {
    margin: 3rem auto 0 auto;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 960px;
    box-shadow: 0 0 40px rgba(97, 156, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    gap: 2rem;
    text-align: center;
  }
  .hero-metrics-wrapper {
    margin: 3rem auto 0 auto;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 960px;
    box-shadow: 0 0 40px rgba(97, 156, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: pulseGlow 6s ease-in-out infinite;
  }
  @media (max-width: 768px) {
    .hero-metrics {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 480px) {
    .hero-metrics {
      grid-template-columns: 1fr;
    }
  }
  .why-section {
    background: linear-gradient(to bottom, #0e1320, #0c111b);
    padding: 5rem 2rem;
    text-align: center;
    color: var(--text-200);
    position: relative;
    overflow: hidden;
  }
  
  .why-content {
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out both;
  }
  
  .section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-100);
    margin-bottom: 1.5rem;
  }
  
  .lead {
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
    color: var(--text-300);
  }
  
  .feature-list {
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    list-style: none;
    padding: 0;
  }
  
  .feature-list li {
    margin: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-100);
  }
  
  .feature-list li span {
    color: var(--primary-500);
    margin-right: 0.5rem;
    font-weight: bold;
  }
  
  .why-btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: linear-gradient(90deg, #ffe259, #37a1ff);
    color: #000;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 16px rgba(55, 161, 255, 0.2);
  }
  
  .why-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(55, 161, 255, 0.3);
  }
  
  /* Animation keyframes */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(25px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .glow-btn {
    background: transparent;
    color: #5daeff;
    border: 1.5px solid #5daeff;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    font-weight: 500;
    transition: all 0.25s ease-in-out;
    position: relative;
    overflow: hidden;
  }
  
  .glow-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, #5daeff88 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
  }
  
  .glow-btn:hover::before {
    opacity: 1;
  }
  
  .glow-btn:hover {
    box-shadow: 0 0 15px #5daeff88, 0 0 40px #5daeff44;
    color: #ffffff;
    border-color: #5daeff;
  }
  .movement-section {
    padding: 6rem 2rem;
    background: radial-gradient(circle at top right, #002542 0%, #0a0a1a 80%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  
  .movement-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
  }
  
  .movement-subtitle {
    font-size: 1.2rem;
    color: #a5b8d0;
    margin-bottom: 3rem;
  }
  
  .movement-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
  }
  
  .movement-card {
    background-color: #10192b;
    padding: 1.2rem 1.8rem;
    border-radius: 12px;
    font-size: 1rem;
    color: #8ac6ff;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 transparent;
  }
  
  .movement-card:hover {
    box-shadow: 0 0 15px #5daeff55;
    background-color: #131f37;
  }
  
  .glow-cta-btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(to right, #00f0a8, #5daeff);
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: box-shadow 0.4s ease;
    animation: pulse 2.5s infinite;
  }
  
  .glow-cta-btn:hover {
    box-shadow: 0 0 20px #00f0a880, 0 0 40px #5daeff60;
  }
  
  .movement-quotes {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    opacity: 0;
    animation: fadeUp 1.2s ease forwards;
    animation-delay: 1s;
  }
  
  .quote-bubble {
    background: #131f30;
    padding: 1rem 1.4rem;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #a7cfff;
    box-shadow: 0 0 15px #2f81f770;
    max-width: 600px;
  }
  
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 0 #5daeff66;
    }
    70% {
      box-shadow: 0 0 15px 25px transparent;
    }
    100% {
      box-shadow: 0 0 0 0 transparent;
    }
  }
  
  .fade-in-late {
    display: inline-block;
    animation: fadeUp 1.5s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
  }
  .footer {
    background-color: #0c0f1b;
    padding: 2.5rem 2rem 1rem;
    color: #aabbd0;
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
  }
  
  .footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
  }
  
  .footer-left {
    flex: 1 1 30%;
    min-width: 200px;
  }
  
  .footer-logo {
    width: 150px;
    margin-bottom: 0.8rem;
  }
  
  .footer-tagline {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.4;
  }
  
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    flex: 1 1 30%;
    justify-content: center;
    min-width: 220px;
  }
  
  .footer-links a {
    text-decoration: none;
    color: #c0d2f0;
    font-weight: 500;
    transition: color 0.3s ease;
  }
  
  .footer-links a:hover {
    color: #5daeff;
    text-shadow: 0 0 8px #5daeff66;
  }
  
  .footer-contact {
    flex: 1 1 20%;
    text-align: right;
    min-width: 200px;
    font-weight: 500;
    color: #89b4ff;
  }
  
  .footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: #6d7991;
    margin-top: 1rem;
  }
  @media (max-width: 768px) {
    .footer-container {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
  
    .footer-contact {
      text-align: center;
    }
  }
/* Chat Page */
.bot-page {
  background: var(--brand-950);
  color: var(--text-100);
  font-family: Inter, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bot-header {
  padding: 1.5rem 2rem;
  background: var(--brand-900);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bot-header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.logo-link {
  color: var(--primary-500);
  text-decoration: none;
  font-weight: 500;
}

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.chat-window {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.user-bubble, .bot-bubble {
  max-width: 85%;
  padding: 0.9rem 1.2rem;
  border-radius: 16px;
  line-height: 1.4;
  font-size: 0.95rem;
  animation: fadeIn 0.3s ease;
  white-space: pre-wrap;
}

.user-bubble {
  background: var(--primary-600);
  color: #fff;
  align-self: flex-end;
}

.bot-bubble {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-100);
  align-self: flex-start;
}

.chat-form {
  display: flex;
  gap: 0.75rem;
}

.chat-form input {
  flex: 1;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--brand-100);
  background: var(--brand-900);
  color: var(--text-100);
  font-size: 1rem;
}

.chat-form button {
  padding: 0.9rem 1.4rem;
  border: none;
  background: var(--primary-600);
  color: white;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.chat-form button:hover {
  background: var(--primary-500);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-shell {
  position: relative;
  background: radial-gradient(circle at 50% 10%, #1e2a45 0%, #0b1220 90%);
  min-height: 100vh;
  overflow: hidden;
  z-index: 0;
}

.chat-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.chat-bg img {
  opacity: 0.05;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 18s ease-in-out infinite alternate;
}

.orb1 {
  background: var(--primary-600);
  width: 200px;
  height: 200px;
  top: 10%;
  left: 15%;
}

.orb2 {
  background: var(--teal-500);
  width: 180px;
  height: 180px;
  bottom: 10%;
  right: 15%;
}

@keyframes float {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(30px) scale(1.05); }
}
.chat-area {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.chat-title {
  text-align: center;
}

.chat-title h1 {
  font-family: var(--font-head);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.chat-subtext {
  color: var(--text-300);
  font-size: 1rem;
  max-width: 60ch;
  margin: 0 auto;
}

.chat-window {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  min-height: 300px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bot-bubble, .user-bubble {
  max-width: 80%;
  padding: 1rem 1.4rem;
  border-radius: 16px;
  font-size: 0.95rem;
  animation: fadeIn 0.4s ease;
  white-space: pre-wrap;
}

.bot-bubble {
  background: rgba(255,255,255,0.05);
  color: var(--text-100);
  border: 1px solid rgba(255,255,255,0.1);
  align-self: flex-start;
}

.user-bubble {
  background: var(--primary-600);
  color: white;
  align-self: flex-end;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.chat-form input {
  flex: 1;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--brand-100);
  background: var(--brand-900);
  color: var(--text-100);
  font-size: 1rem;
  box-shadow: inset 0 0 10px rgba(63, 106, 255, 0.1);
  transition: all 0.3s ease;
}

.chat-form input:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 12px rgba(63, 106, 255, 0.4);
}

.chat-form button {
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  background: var(--primary-600);
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(63, 106, 255, 0.4);
}

.chat-form button:hover {
  background: var(--primary-500);
  box-shadow: 0 0 16px rgba(63, 106, 255, 0.6);
}
/* ===========================
   ARTICLES PAGE POLISH
   Paste below your base styles
   =========================== */

/* Shell + background */
.articles-shell{
  min-height:100vh;
  background: var(--grad-hero);
  position:relative;
  overflow-x:hidden;
}
.articles-shell::before{
  content:"";
  position:absolute; inset:0;
  background:url("/assets/texture-noise.svg");
  opacity:.06; pointer-events:none;
}

/* Hero */
.articles-hero{ padding: min(7vh,5rem) 0 1rem; }
.articles-hero h1{
  line-height:1.1;
  letter-spacing:.2px;
  background: linear-gradient(180deg, var(--text-100), rgba(234,242,255,.3));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
  text-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.articles-hero p{
  color: var(--text-300);
  max-width: 65ch;
}

/* Sticky controls bar */
.controls{
  position: sticky;
  top: calc(64px + 8px); /* header height + gap */
  z-index: 50;
  background: rgba(17,26,46,.6);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: .75rem;
  backdrop-filter: var(--blur-bg);
}
.controls-row{ display:flex; gap:.75rem; align-items:center; flex-wrap:wrap; }

/* Search */
.search-wrap{
  flex: 1 1 360px;
  display:flex; align-items:center; gap:.6rem;
  background: rgba(11,18,32,.8);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: .65rem .8rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.search-wrap input{
  flex:1; border:0; outline:0; background:transparent; color:var(--text-100);
}
.search-wrap input::placeholder{ color: rgba(182,194,226,.75); }
.kbd{
  font-size:.8rem; line-height:1;
  color: var(--text-300);
  border:1px solid rgba(255,255,255,.16);
  padding:.15rem .45rem; border-radius:6px;
}

/* Filters */
.filters .chip{
  background: rgba(255,255,255,.06);
  color: var(--text-300);
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}
.filters .chip:hover{ transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.25); color: var(--text-100); }
.filters .chip.is-active{
  color: var(--text-100);
  border-color: rgba(91,140,255,.6);
  box-shadow: 0 0 0 2px rgba(91,140,255,.35) inset, 0 8px 28px rgba(63,106,255,.18);
}

/* Sort + result count */
.sort{ margin-left:auto; display:flex; align-items:center; gap:.6rem; }
.sort select{
  background: var(--brand-900);
  border:1px solid rgba(255,255,255,.12);
  color: var(--text-100);
  padding:.5rem .7rem;
  border-radius:10px;
}
#result-count{ color: var(--text-300); }

/* Grid */
.articles-grid{
  display:grid; gap:1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
  margin-bottom: 1rem;
}

/* Cards */
.article-card{
  position:relative;
  overflow:hidden;
  background: rgba(17,26,46,.65);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  contain: content;
}
.article-card::before{
  /* animated gradient ring */
  content:""; position:absolute; inset:-1px;
  border-radius: inherit;
  background: linear-gradient(135deg,#3F6AFF22,#22D1B222,#FFD16622);
  z-index:0; pointer-events:none;
  opacity:.0; transition: opacity .25s ease;
}
.article-card:hover{
  transform: translateY(-6px);
  border-color: rgba(91,140,255,.35);
  box-shadow: 0 16px 44px rgba(0,0,0,.45);
}
.article-card:hover::before{ opacity: 1; }

.art-media{
  height: 160px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  overflow:hidden; position:relative; margin-bottom:.9rem;
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(63,106,255,.35), transparent 55%),
    radial-gradient(100% 120% at 100% 0%, rgba(34,209,178,.25), transparent 60%),
    linear-gradient(135deg,#0F172A,#0B1220);
  transform: translateZ(0);
}
.art-media::after{
  /* faint diagonal sheen */
  content:""; position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.06) 35%, transparent 70%);
  transform: translateX(-40%);
  transition: transform .6s ease;
}
.article-card:hover .art-media::after{ transform: translateX(0%); }

.art-badge{
  position:absolute; top:.6rem; left:.6rem;
  background: rgba(255,255,255,.08);
  color: var(--text-100);
  border:1px solid rgba(255,255,255,.18);
  padding:.25rem .55rem;
  font-size:.75rem;
  border-radius:999px;
  backdrop-filter: blur(6px);
}

.art-title{ position:relative; z-index:1; margin:.25rem 0 .25rem; font-family: var(--font-head); font-weight:600; font-size:1.1rem; }
.art-meta{ color: var(--text-300); font-size:.9rem; margin-bottom:.5rem; }
.art-blurb{ color: var(--text-300); }
.art-tags{ display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.6rem; }
.art-tags .chip{ font-size:.75rem; padding:.25rem .55rem; }

/* Empty state */
#empty-state{
  text-align:center;
  background: rgba(17,26,46,.55);
  border:1px solid rgba(255,255,255,.06);
}

/* Load more */
#load-more{
  border-color: rgba(255,255,255,.18);
}
#load-more:hover{ transform: translateY(-2px); }

/* Reveal animation for cards */
.reveal{ opacity:0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view{ opacity:1; transform:none; }

/* Reader modal polish */
#reader-modal .dialog{
  max-width: 900px; width: 92%; padding:0; overflow:hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.reader-progress{ height:4px; background: rgba(255,255,255,.08); }
.reader-progress .bar{
  height:100%; width:0;
  background: var(--grad-primary);
  background-size: 200%;
  animation: shimmer 4s linear infinite;
}
.reader-head{
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:1rem 1.25rem;
  background: rgba(17,26,46,.9);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.reader-title{ margin:0; font-family:var(--font-head); font-size:1.4rem; }
.reader-meta{ color: var(--text-300); font-size:.9rem; }
.reader-body{
  max-height: 70vh; overflow:auto;
  padding: 1.25rem 1.25rem 2rem;
  background: rgba(11,18,32,.75);
}
.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  transition: transform .2s ease, outline-color .2s ease;
}
.icon-btn:hover{ transform: translateY(-1px); }
.icon-btn:focus{ outline:2px solid var(--primary-500); outline-offset:2px; }
/* remove skip-to-content everywhere */
.skip-link, .sr-only { display: none !important; }
/* ----- HEADER: exact same look as homepage ----- */
.header{
  background: #0B1220 !important;   /* deep navy — matches homepage header */
  color: #EAF2FF !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.30);
}
.header .nav, .header .nav a, .header .nav *:not(.btn-primary){
  color: #EAF2FF !important;
}
.header .btn.btn-primary{
  /* keep your gradient CTA with dark text */
  background: var(--grad-primary) !important;
  color: #0B1220 !important;
}

/* ----- PAGE BACKGROUND: match homepage hero ----- */
body.articles-shell{
  /* layered like your home hero: blue glow left, teal glow right, deep navy base */
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(63,106,255,.35), transparent 60%),
    radial-gradient(1000px 600px at 80%   0%, rgba(34,209,178,.25), transparent 60%),
    linear-gradient(180deg, #0B1220 0%, #0A0F1B 100%) !important;
}
.articles-shell::before{
  /* subtle noise only */
  opacity: .05 !important;
}

/* optional: ensure the sticky controls bar sits nicely on the new bg */
.controls{
  background: rgba(17,26,46,.85);
  border: 1px solid rgba(234,242,255,.08);
  box-shadow: var(--shadow-lg);
}
/* ---------- Article Reader: polished typography & chrome ---------- */

/* Dim/blur the page behind the modal */
.modal{
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: color-mix(in srgb, #0B1220 65%, transparent);
  backdrop-filter: blur(6px);
  z-index: 50;
}

/* The reader card */
.modal .dialog{
  width: min(860px, calc(100% - 32px));
  max-height: min(76vh, 940px);
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 15% -10%, #0f1b2f 10%, transparent 55%),
    linear-gradient(180deg, #0f1729 0%, #0b1220 80%);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  box-shadow:
    0 20px 60px rgba(0,0,0,.65),
    inset 0 1px 0 rgba(255,255,255,.04);
}

/* Progress bar */
.reader-progress{ position: sticky; top: 0; height: 3px; background: transparent; z-index: 2; }
.reader-progress .bar{
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #2dd4bf, #60a5fa);
  box-shadow: 0 0 14px #60a5fa66;
}

/* Header area */
.reader-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:22px 24px 0; }
.reader-title{
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 1.02rem + 1.6vw, 1.8rem);
  letter-spacing:.2px; margin:0 0 6px;
  color:#EAF2FF;
  text-shadow: 0 1px 0 rgba(255,255,255,.04);
}
.reader-meta{
  color:#9AA6BD; font-size:.92rem; opacity:.95;
  display:flex; gap:.6rem; align-items:center; flex-wrap:wrap;
}
.reader-meta::before{
  content:""; width:8px; height:8px; border-radius:50%;
  background: linear-gradient(90deg,#2dd4bf,#60a5fa);
  box-shadow: 0 0 10px #2dd4bf66;
}

/* Header buttons */
.reader-actions{ display:flex; gap:8px; }
.reader-actions .icon-btn{
  width:36px; height:36px; display:grid; place-items:center;
  border-radius:10px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.reader-actions .icon-btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }

/* Scrollable body */
.reader-body{
  padding: 12px 24px 24px;
  overflow: auto; max-height: calc(76vh - 72px);
  scrollbar-width: thin;
}
.reader-body::-webkit-scrollbar{ width: 10px; }
.reader-body::-webkit-scrollbar-thumb{ background:#2b364f; border-radius:8px; }

/* Beautiful, readable copy */
.reader-body p{
  color:#D7E2F1;
  font-size: 1.06rem;
  line-height: 1.8;
  letter-spacing: .02px;
  margin: 0 0 1.15em;
  max-width: 72ch;   /* ideal measure */
}
.reader-body p:first-of-type{
  font-size: 1.12rem;
}
/* Tasteful drop cap on the very first paragraph */
.reader-body p:first-of-type::first-letter{
  float:left;
  font-size: 3.1rem; line-height: .88;
  margin: .14rem .5rem .1rem 0;
  font-weight: 600; color:#EAF2FF;
  text-shadow: 0 6px 18px rgba(45,212,191,.22);
}

/* In-article headings (if present) */
.reader-body h2, .reader-body h3{
  color:#F3F7FF; font-weight:700;
  margin: 1.8rem 0 .6rem;
  letter-spacing:.2px;
}
.reader-body h2{ font-size:1.25rem; }
.reader-body h3{ font-size:1.15rem; }

/* Lists, quotes, links */
.reader-body ul, .reader-body ol{ margin: 0 0 1.15em 1.25em; max-width: 72ch; }
.reader-body li{ margin:.2em 0; }
.reader-body blockquote{
  margin: 1.2rem 0; padding: .25rem 1rem;
  color:#CFD9E6; border-left:3px solid #2dd4bf99;
  background: rgba(45,212,191,.06); border-radius:8px;
}
.reader-body a{
  color:#8ACBFF; text-decoration: underline;
  text-decoration-color: rgba(138,203,255,.35);
  text-underline-offset: 3px;
}

/* Subtle section separators if you insert <hr> in content */
.reader-body hr{
  border:none; height:1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  margin: 2.1rem 0;
}

/* Mobile tweaks */
@media (max-width: 640px){
  .modal .dialog{ border-radius: 14px; }
  .reader-head{ padding:16px 16px 0; }
  .reader-body{ padding: 8px 16px 16px; max-height: calc(72vh - 64px); }
  .reader-body p{ font-size: 1rem; line-height: 1.75; }
}
/* =============== Article Reader Polish (no content changes) =============== */
:root{
  --ink-1:#E6EEFF;          /* primary text on dark */
  --ink-2:#9FB3C8;          /* muted text */
  --card-bg:#0E1526;        /* modal body */
  --accent:#30E3CA;         /* teal */
  --accent-2:#6EA8FF;       /* indigo */
  --ring: rgba(48,227,202,.35);
}

/* Dialog card glow + subtle gradients that match homepage hero */
.modal .dialog{
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(110,168,255,.09), transparent 60%),
    radial-gradient(700px 420px at 120% 0%, rgba(48,227,202,.09), transparent 60%),
    var(--card-bg);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}

/* Title + meta */
.reader-title{
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.65rem, 1vw + 1.6rem, 2.2rem); /* slightly bigger */
  letter-spacing: .2px;
}
.reader-meta{
  color: var(--ink-2);
}

/* Progress bar = gradient accent */
.reader-progress .bar{
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

/* Typography inside the article */
#reader-body{
  max-width: 72ch;                 /* comfy line length */
  margin-inline: auto;
  font-size: clamp(1.02rem, .3vw + 1rem, 1.12rem);
  line-height: 1.75;
  color: var(--ink-1);
}

/* Section headings: bigger + accent rail */
#reader-body h2{
  margin: .25rem 0 .5rem;
  font-size: clamp(1.35rem, .8vw + 1.3rem, 1.7rem);
  color: #fff;
}
#reader-body h3{
  margin: 1.6rem 0 .75rem;
  font-size: clamp(1.2rem, .6vw + 1.05rem, 1.4rem); /* slightly bigger */
  font-weight: 750;
  color: #fff;
  position: relative;
  padding-left: .85rem;
}
#reader-body h3::before{
  content:"";
  position:absolute;
  left:0; top:.2rem; bottom:.2rem;
  width:3px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
}

/* First paragraph callout (“lead”) */
#reader-body > p:first-of-type{
  border: 1px solid rgba(110,168,255,.28);
  background: linear-gradient(180deg, rgba(110,168,255,.08), rgba(48,227,202,.06));
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 500;
}

/* Lists: tighter rhythm + colorful markers */
#reader-body ul, #reader-body ol{
  padding-left: 1.25rem;
  margin: .8rem 0 1.1rem;
}
#reader-body li{ margin: .35rem 0; }
#reader-body li::marker{ color: var(--accent); font-weight: 700; }

/* Turn the list right after a heading into soft “chips/cards” (great for Glossary & Sources) */
#reader-body h3 + ul{
  list-style: none;
  padding: 0;
  display: grid;
  gap: .5rem;
}
#reader-body h3 + ul li{
  padding: .6rem .75rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
}
#reader-body h3 + ul li::marker{ content: none; }

/* Blockquotes look like pro tips */
#reader-body blockquote{
  margin: 1.2rem 0;
  padding: .8rem 1rem;
  border-left: 4px solid var(--accent-2);
  background: rgba(255,255,255,.05);
  border-radius: 10px;
  color: var(--ink-1);
}

/* Links: subtle underline, brighten on hover */
#reader-body a{
  color: var(--accent-2);
  text-decoration-color: rgba(110,168,255,.45);
  text-underline-offset: 3px;
}
#reader-body a:hover{ text-decoration-color: var(--accent-2); filter: brightness(1.12); }

/* Comfy scrolling inside long articles */
#reader-body{
  scrollbar-color: rgba(110,168,255,.55) transparent;
}
#reader-body::-webkit-scrollbar{ width: 10px; }
#reader-body::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(110,168,255,.45), rgba(48,227,202,.45));
  border-radius: 10px;
}

/* Mobile niceties */
@media (max-width: 640px){
  .modal .dialog{ border-radius: 16px; }
  #reader-body{ padding-inline: .25rem; }
}
/* courses.css */
:root{
  /* Reuse base tokens from styles.css; add page extras */
  --ring-size: 120px;
}

.course-shell{
  background: var(--brand-950);
  color: var(--text-100);
}

/* Hero / catalog */
.courses-hero{
  padding: 4.5rem 0 3rem;
  position: relative;
}
.catalog{
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  margin-top: 2rem;
}
.course-card .meta{
  display:grid; gap:.25rem; margin:.75rem 0 1rem;
  color: var(--text-300); font-size:.95rem;
}
.course-card .course-card-actions{ display:flex; gap:.75rem; flex-wrap:wrap; }

/* Player layout */
.course-player{
  position: relative;
  padding: 2rem 0 4rem;
}
.player-shell{
  display:grid; gap:1.5rem;
  grid-template-columns: 320px 1fr;
}
@media (max-width: 960px){
  .player-shell{ grid-template-columns: 1fr; }
  .player-sidebar{ order:2; }
}

.player-sidebar{
  position: sticky; top: 90px; align-self: start;
  background: rgba(17,26,46,.6);
  backdrop-filter: var(--blur-bg);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
}

.course-meta{ display:flex; align-items:center; gap:1rem; padding:.25rem .25rem 1rem; border-bottom:1px solid rgba(255,255,255,.06);}
.ring-wrap{ position:relative; width: var(--ring-size); height: var(--ring-size); }
.progress-ring{ width:100%; height:100%; transform: rotate(-90deg); }
.ring-bg{ fill:none; stroke: rgba(255,255,255,.08); stroke-width: 10; }
.ring-fg{ fill:none; stroke: url(#gradPrimary); stroke-width: 10; stroke-linecap: round; }

.ring-label{
  position:absolute; inset:0; display:grid; place-items:center; text-align:center;
  font-weight:700;
}
.ring-label small{ display:block; font-weight:500; color: var(--text-300); margin-top:-2px; }

/* SVG gradient for ring (created in HTML via JS) */
.module-list{
  margin-top: 1rem; display:grid; gap:.5rem; max-height: 60vh; overflow:auto; padding-right:.25rem;
}
.module-heading{
  margin-top:.75rem; color: var(--text-300); font-weight:600; font-size:.9rem;
}
.module-link{
  text-align:left; padding:.6rem .75rem; border-radius: var(--radius-md);
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
}
.module-link[aria-current="page"]{ outline:2px solid var(--primary-500); outline-offset: 0; }
.module-link.completed{ border-color: var(--success-500); }

.player-content{
  background: rgba(17,26,46,.6);
  border:1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-height: 60vh;
  display:flex; flex-direction:column;
}
.content-top{
  display:flex; justify-content:space-between; align-items:center;
  padding: 1rem 1rem .75rem; border-bottom:1px solid rgba(255,255,255,.06);
}
.crumbs{ color: var(--text-300); font-size:.95rem; }
.content-scroll{
  padding: 1rem 1.25rem 2rem;
  content-visibility: auto;
  contain-intrinsic-size: 750px;
}
.content-nav{
  display:flex; justify-content:space-between; gap:1rem; padding: .75rem 1rem 1rem; border-top:1px solid rgba(255,255,255,.06);
}

/* Content blocks */
.section-head{
  display:flex; justify-content:space-between; align-items:flex-end; gap:1rem; margin-bottom:.5rem;
}
.section-head h3{ margin:0; }
.section-note{ color: var(--text-300); font-size:.95rem; }

.transcript{
  margin-top: .75rem; background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-md); padding: .75rem .9rem;
}
.video-placeholder{
  width:100%; aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(63,106,255,.2), rgba(34,209,178,.18)),
    url('/assets/texture-noise.svg');
  border:1px solid rgba(255,255,255,.08);
  display:grid; place-items:center; font-weight:600; color: var(--text-100);
  box-shadow: var(--shadow-lg);
}

/* Quiz / exercise */
.quiz-card{
  display:grid; gap:1rem; padding:1rem; border:1px solid rgba(255,255,255,.06); border-radius: var(--radius-lg);
  background: rgba(255,255,255,.03);
}
.quiz-options{ display:grid; gap:.6rem; }
.quiz-options label{
  display:flex; gap:.6rem; align-items:flex-start; padding:.6rem .7rem; border:1px solid rgba(255,255,255,.08);
  border-radius: 12px; background: rgba(17,26,46,.5);
}
.quiz-controls{ display:flex; gap:.75rem; flex-wrap:wrap; margin-top:.5rem; }
.inline-note{ color: var(--text-300); font-size:.95rem; }
.feedback{ margin-top:.5rem; border-left: 3px solid var(--primary-600); padding:.5rem .75rem; background: rgba(255,255,255,.03); border-radius: 8px; }

/* Accordion / details */
details.ff-acc{
  border:1px solid rgba(255,255,255,.06); border-radius: var(--radius-md); padding:.75rem .9rem; background: rgba(255,255,255,.03);
}
details.ff-acc summary{ cursor:pointer; font-weight:600; }

/* Risk Audit form */
.audit-form{
  display:grid; gap:1rem; max-width: 760px;
}
.audit-grid{ display:grid; gap:1rem; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); }
label span.req{ color: var(--amber-400); margin-left:.25rem; }
.input, select, textarea{
  width:100%; padding:.7rem .8rem; border-radius: 10px; background: var(--brand-900); color: var(--text-100);
  border:1px solid rgba(255,255,255,.12);
}
.badge-wrap{
  display:flex; gap:1rem; flex-wrap:wrap; align-items:center; margin-top:.75rem;
}
.badge-wrap img{ width:96px; height:96px; }

/* High contrast toggle */
.hc *{
  outline-color: #fff !important;
}
.hc .card, .hc .player-content, .hc .player-sidebar{ background:#000 !important; border-color:#fff !important; }
.hc .module-link{ background:#000 !important; color:#fff; border-color:#fff; }

/* Dyslexia-friendly font */
.dyslexia{
  letter-spacing: .02em;
  word-spacing: .04em;
  line-height: 1.7;
  font-variant-ligatures: none;
  /* If user has OpenDyslexic installed it will be used; otherwise fallbacks */
  font-family: "OpenDyslexic","Atkinson Hyperlegible", var(--font-body), Arial, sans-serif;
}

/* Modal additions */
.modal .modal-head{ display:flex; justify-content:space-between; align-items:center; }
.icon-btn{
  background: transparent; color: var(--text-100); border:1px solid rgba(255,255,255,.2);
  border-radius: 10px; padding:.25rem .5rem;
}

/* Background adornments */
.hero-bg{ position:absolute; inset:0; pointer-events:none; z-index:0; }
.hero-bg img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.06; }
.orb{ position:absolute; border-radius:50%; filter:blur(90px); opacity:.12; animation: float 20s ease-in-out infinite alternate; }
.orb1{ width:300px; height:300px; top:10%; left:-6%; background: var(--primary-600); }
.orb2{ width:240px; height:240px; bottom:8%; right:-6%; background: var(--teal-500); }
.ring{ position:absolute; border:2px solid var(--amber-400); border-radius:50%; opacity:.08; }
.ring1{ width:120px; height:120px; top:22%; right:16%; animation: float 14s ease-in-out infinite; }
.ring2{ width:140px; height:140px; bottom:18%; left:12%; animation: float 18s ease-in-out infinite reverse; }

@keyframes float{
  from{ transform:translateY(0) scale(1);}
  to{ transform:translateY(18px) scale(1.03);}
}

/* Reveal */
.fade-up{ opacity:0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.in-view{ opacity:1; transform: translateY(0); }

/* Utilities */
.muted{ color: var(--text-300); }
.kbd{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; background: rgba(255,255,255,.06); padding:.1rem .35rem; border-radius: 6px; }
.note{ font-size:.95rem; color: var(--text-300); }
.hr{ height:1px; background: rgba(255,255,255,.08); margin:1rem 0; }

/* Focus states (redundant reinforcement) */
button:focus, a:focus, .module-link:focus, input:focus, textarea:focus, select:focus{
  outline:2px solid var(--primary-500); outline-offset: 2px;
}
/* Make auth modals wider */
#login-modal .dialog,
#signup-modal .dialog {
  max-width: clamp(560px, 60vw, 720px); /* pick the size you like */
  width: min(720px, calc(100% - 48px)); /* stays responsive */
}
/* FINAL override for auth modals */
#login-modal .dialog,
#signup-modal .dialog {
  max-width: none !important;                 /* remove old clamps */
  width: clamp(560px, 60vw, 720px) !important;/* pick your preferred size */
}

/* (optional) make fields fill the wider dialog */
#login-modal input,
#signup-modal input {
  width: 100%;
  box-sizing: border-box;
}
/* courses.css */
/* Fynoptic — Course catalog page additions
   Uses global tokens from styles.css
*/

:root {
  /* Reuse existing tokens; extend as needed here */
  --ring: 0 10px 30px rgba(0,0,0,.35);
}

/* ---------------- Hero ---------------- */

.courses-hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
  padding: 6rem 0 3rem;
  isolation: isolate;
}
.courses-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .06;
  pointer-events: none;
}
.c-orb, .c-ring { position: absolute; pointer-events: none; }
.c-orb { border-radius: 50%; filter: blur(70px); opacity: .16; animation: float 22s ease-in-out infinite alternate; }
.c-orb--blue { width: 320px; height: 320px; background: var(--primary-600); top: -40px; left: 10%; }
.c-orb--teal { width: 240px; height: 240px; background: var(--teal-500); bottom: -20px; right: 12%; animation-duration: 26s; }
.c-ring { border-radius: 50%; border: 2px solid var(--amber-400); opacity: .08; }
.c-ring--1 { width: 140px; height: 140px; top: 18%; right: 20%; animation: float 18s ease-in-out infinite; }
.c-ring--2 { width: 180px; height: 180px; bottom: 12%; left: 12%; animation: float 20s ease-in-out infinite reverse; }

.courses-hero h1 {
  margin: 0 0 .5rem;
}
.courses-hero-sub {
  color: var(--text-300);
  max-width: 60ch;
  margin-bottom: 1.75rem;
}
.courses-hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; }
.courses-hero-metrics {
  margin-top: 2.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 1rem;
}
.c-metric { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-lg); padding: 1rem 1.25rem; backdrop-filter: var(--blur-bg); box-shadow: var(--shadow-lg); }
.c-metric__num { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem, 2.2vw + 1rem, 2.25rem); color: var(--primary-500); }
.c-metric__label { color: var(--text-300); font-size: .95rem; }
.c-unit { font-size: .85rem; margin-left: .2rem; color: var(--text-300); }

/* ---------------- Catalog ---------------- */

.courses-catalog { padding: 4rem 0; }
.catalog-note { color: var(--text-300); margin-top: -.5rem; margin-bottom: 1.5rem; }

.courses-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}
.course-card {
  grid-column: span 12;
  background: rgba(17,26,46,.6);
  backdrop-filter: var(--blur-bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  border-color: rgba(91,140,255,.25);
}
@media (min-width: 768px) {
  .course-card { grid-column: span 6; }
}
@media (min-width: 1100px) {
  .course-card { grid-column: span 3; }
}

.course-card__head { margin-bottom: .5rem; }
.course-card__title { margin: .35rem 0 .25rem; }
.course-card__meta { color: var(--text-300); font-size: .95rem; }

.badge {
  display: inline-block;
  font-size: .8rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: var(--brand-900);
  color: var(--text-300);
  border: 1px solid rgba(255,255,255,.1);
}
.badge--grad {
  color: var(--brand-950);
  background: var(--grad-primary);
  border: none;
}

.course-criteria {
  display: grid;
  gap: .35rem;
  margin: .75rem 0 1rem;
  color: var(--text-100);
}
.course-criteria li {
  font-size: .95rem;
  color: var(--text-300);
}
.course-criteria li::before {
  content: "• ";
  color: var(--primary-500);
}

/* Stepper */
.course-stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .5rem;
  margin: .25rem 0 1rem;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: 12px 1fr;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 999px;
  padding: .35rem .6rem;
  font-size: .85rem;
  color: var(--text-300);
}
.step .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #2a3550;
  border: 1px solid rgba(255,255,255,.12);
}
.step.is-unlocked .dot { background: var(--primary-600); border-color: transparent; }
.step.is-locked { opacity: .65; }

/* Progress */
.course-progress {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-md);
  padding: .75rem;
  box-shadow: var(--shadow-lg);
}
.progress-bar {
  position: relative;
  height: 10px;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  --p: 0%;
  position: absolute; inset: 0 0 0 auto;
  width: var(--p);
  background: var(--grad-primary);
  border-radius: 999px;
  transition: width .7s cubic-bezier(.22,1,.36,1);
}
.progress-meta {
  margin-top: .5rem;
  display: flex; justify-content: space-between; gap: .75rem;
  font-size: .9rem; color: var(--text-300);
}
.progress-count strong { color: var(--text-100); }

/* Actions */
.course-card__actions {
  margin-top: 1rem;
  display: flex; gap: .5rem; flex-wrap: wrap;
}

/* Coming soon overlay */
.course-card--soon {
  position: relative;
}
.course-card--soon .soon-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(11,18,32,.2), rgba(11,18,32,.6)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 10px, rgba(255,255,255,0) 10px 20px);
  color: var(--text-100);
  font-weight: 600;
  letter-spacing: .5px;
  pointer-events: none;
  text-transform: uppercase;
}
.course-card--soon .btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }

/* ---------------- How Certification ---------------- */

.how-cert { padding-bottom: 5rem; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(12,1fr);
  gap: 1.25rem;
}
.how {
  grid-column: span 12;
  text-align: left;
}
@media (min-width: 800px) {
  .how { grid-column: span 4; }
}
.how__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--grad-primary);
  color: var(--brand-950);
  font-weight: 700;
  display: grid; place-items: center;
  margin-bottom: .5rem;
}

/* ---------------- Animations / Reveal ---------------- */

.fade-up { opacity: 0; transform: translateY(24px); animation: fadeUp .7s ease-out forwards; }
.fade-up:nth-child(2) { animation-delay: .06s; }
.fade-up:nth-child(3) { animation-delay: .12s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-up, .c-orb, .c-ring, .progress-fill { animation: none !important; transition: none !important; }
}

/* Accessibility helpers */
.btn[aria-disabled="true"] { cursor: not-allowed; }

/* Small tweaks for header inside this page so the sticky shadow feels tighter */
.header { box-shadow: 0 2px 6px rgba(0,0,0,.35); }
/* Stepper visuals (if not already styled) */
.course-stepper { display:flex; gap:1rem; padding:.75rem 0; list-style:none; margin:0; }
.course-stepper .step { display:flex; align-items:center; gap:.5rem; color: var(--text-300); }
.course-stepper .step .dot { width:10px; height:10px; border-radius:50%; background:#2a3550; display:inline-block; }
.course-stepper .step.is-unlocked { color: var(--text-100); }

/* Hard lock overlay for sections */
.locked { position: relative; }
.locked .locked-overlay {
  position: absolute; inset: 0; display:flex; align-items:center; justify-content:center;
  background: rgba(11,18,32,.6); backdrop-filter: blur(6px);
  color: var(--text-300); font-weight: 600; border-radius: 16px; text-align: center;
  border: 1px dashed rgba(255,255,255,.12);
  padding: 1rem;
  pointer-events: none; /* overlay itself doesn't eat events; the section is inert */
}

/* Make disabled/aria-disabled buttons visually clear */
button[disabled], button[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
/* Hard lock: hide everything and show only the lock card */
.locked { position: relative; }
.locked > * { visibility: hidden !important; }
.locked > .locked-scrim { visibility: visible !important; }

.locked-scrim {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11,18,32,.88);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.locked-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  text-align: center;
  max-width: 640px;
  color: var(--text-100);
}
.locked-emoji { font-size: 1.5rem; margin-bottom: .25rem; }
.locked-msg { font-weight: 600; }

/* disable interaction for buttons when aria-disabled or disabled */
button[disabled], button[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }

/* Stepper polish if needed */
.course-stepper { display:flex; gap:1rem; padding:.75rem 0; list-style:none; margin:0; }
.course-stepper .step { display:flex; align-items:center; gap:.5rem; color: var(--text-300); }
.course-stepper .step .dot { width:10px; height:10px; border-radius:50%; background:#2a3550; display:inline-block; }
.course-stepper .step.is-unlocked { color: var(--text-100); }
/* ---- Progress sidebar ---- */
.progress-sidebar{
  position: fixed; right: 16px; top: 120px; width: 280px; z-index: 60;
  background: rgba(17,26,46,.7); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 12px;
  box-shadow: var(--shadow-lg);
}
.ps-head{ display:flex; align-items:center; gap:.75rem; justify-content:space-between; }
.ps-bar{ flex:1; height:8px; background: rgba(255,255,255,.08); border-radius:999px; overflow:hidden; }
.ps-bar #ps-fill{ height:100%; width:0%; background: var(--grad-primary); transition: width .5s cubic-bezier(.22,1,.36,1); }
.ps-list{ margin:.75rem 0 0; display:grid; gap:.4rem; }
.ps-list li{
  display:flex; align-items:center; gap:.5rem; font-size:.92rem;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: .45rem .6rem;
}
.ps-dot{ width:10px; height:10px; border-radius:50%; background:#2a3550; }
.ps-item--current .ps-dot{ background: var(--primary-600); box-shadow: 0 0 0 2px rgba(91,140,255,.25); }
.ps-item--done .ps-dot{ background: var(--success-500); }
.ps-item--locked{ opacity:.55; }
.ps-item--locked a{ pointer-events:none; }

/* Hard-lock everything except the scrim card */
.locked{ position: relative; }
.locked > *{ visibility: hidden !important; }
.locked > .locked-scrim{ visibility: visible !important; }
.locked-scrim{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background: rgba(11,18,32,.88); border:1px solid rgba(255,255,255,.08);
  border-radius:16px; padding: 1.25rem; text-align:center;
}
.locked-card{ background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12);
  border-radius:12px; padding: .9rem 1rem; color: var(--text-100); }
.locked-emoji{ font-size:1.25rem; }

/* hide sidebar on narrow screens */
@media (max-width: 1024px){ .progress-sidebar{ display:none; } }
/* Progress sidebar */
#progress-sidebar{
  position: fixed;
  top: 120px; right: 16px;
  width: 280px; z-index: 60;
}
@media (max-width: 1100px){ #progress-sidebar{ display:none; } }

.ps-card{
  background: rgba(17,26,46,.7);
  border:1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--blur-bg);
  padding: 12px;
}
.ps-head{ display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.ps-bar{ flex:1; height:8px; background: rgba(255,255,255,.08); border-radius:999px; overflow:hidden; }
#ps-fill{ display:block; height:100%; width:0%; background: var(--grad-primary); transition: width .6s cubic-bezier(.22,1,.36,1); }

.ps-list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.ps-list li{ display:flex; align-items:center; gap:8px; font-size:.92rem; }
.ps-list a{ color: var(--text-100); text-decoration:none; }
.ps-dot{ width:10px; height:10px; border-radius:50%; background:#2a3550; border:1px solid rgba(255,255,255,.14); }

.ps-item--done .ps-dot{ background: var(--success-500); border-color: transparent; }
.ps-item--current .ps-dot{ background: var(--primary-600); border-color: transparent; }
.ps-item--locked{ opacity:.60; }
/* optional: slight dim for view-only pre-quiz */
.peekable { opacity: .95; }
/* Progress sidebar */
#progress-sidebar{
  position: fixed;
  top: 120px; right: 12px;   /* was right:16px */
  width: 240px;              /* was 280px */
  z-index: 60;
}
@media (max-width: 1100px){ #progress-sidebar{ display:none; } }

/* (rest unchanged) */
/* Responsive centered video + big play button */
.video-frame{
  position: relative;
  max-width: min(960px, 92vw);
  margin: 16px auto 28px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}
.video-frame > video{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;       /* keeps height sensible even before metadata loads */
  object-fit: contain;      /* no cropping; fits within frame */
}

/* Overlay play */
.video-overlay{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(rgba(0,0,0,.25), rgba(0,0,0,.45));
  cursor: pointer;
  transition: opacity .18s ease;
}
.video-overlay.hide{ opacity: 0; pointer-events: none; }
.video-overlay .play{
  width: 96px; height: 96px; border-radius: 999px;
  background: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.video-overlay svg{ width: 42px; height: 42px; fill: #111; transform: translateX(2px); }
@media (max-width:640px){
  .video-overlay .play{ width: 72px; height: 72px; }
  .video-overlay svg{ width: 32px; height: 32px; }
}
/* --- Waffle toggle --- */
.nav-toggle{
  display:none;              /* default hidden on desktop */
  width:40px; height:40px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:10px;
  background: rgba(255,255,255,.06);
  place-items:center;
  gap:4px;
  padding:6px;
  grid-template-columns: repeat(3, 1fr);
}
.nav-toggle .dot{
  width:6px; height:6px; border-radius:50%;
  background: currentColor; opacity:.9;
}
.nav-toggle[aria-expanded="true"]{ outline:2px solid var(--primary-600); }

/* --- Mobile drawer --- */
.mobile-menu[hidden] { display: none !important; }   /* <- important fix */
.mobile-menu{
  position: fixed;
  inset: 0;
  z-index: 2000;
  padding: 88px clamp(16px,4vw,24px) 24px;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(63,106,255,.35), transparent 60%),
    radial-gradient(1000px 600px at 80% 0%, rgba(34,209,178,.25), transparent 60%),
    var(--brand-950);
  overflow-y: auto;
}

.mobile-menu ul{
  display: grid;
  gap: 1rem;
}
.mobile-menu a{
  font-size: 1.125rem;
}

/* prevent background scroll when menu is open */
.no-scroll { overflow: hidden; }

/* --- Responsive header behavior --- */
@media (max-width: 768px){
  .nav-links{ display:none; }         /* hide desktop links */
  .nav-toggle{ display:grid; }        /* show waffle */
  .cta-desktop{ display:none; }       /* hide header CTA; keep CTA in drawer */
}
/* Shrink the header logo */
.header .logo img {
  height: 40px;   /* make it much smaller; tweak as needed */
  width: auto;    /* keep aspect ratio */
  display: block; /* removes extra baseline gap */
}

/* Optional: slightly larger on wider screens */
@media (min-width: 768px) {
  .header .logo img {
    height: 40px;
  }
}
/* Shrink the footer logo */
.footer .footer-logo {
  height: 28px;  /* small on mobile */
  width: auto;   /* keep aspect ratio */
  display: block;
}

@media (min-width: 768px) {
  .footer .footer-logo {
    height: 36px; /* a touch larger on desktop */
  }
}
/* Center ONLY the middle footer links across the whole footer */
.footer .footer-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left | CENTER | right */
  align-items: center;
}

.footer .footer-left { justify-self: start; }
.footer .footer-links {
  justify-self: center;      /* dead center of the page */
  display: flex;
  gap: 1.25rem;
  text-align: center;
}
.footer .footer-contact { justify-self: end; }

/* Optional: tiny left nudge if you want it visually offset a bit */
 /* .footer .footer-links { transform: translateX(-8px); } */
/* --- FIX: keep stepper chips inside the course card --- */
.course-stepper{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* wrap instead of overflow */
  gap: .5rem;
  margin: .25rem 0 1rem;
}

.course-stepper .step{
  min-width: 0;                  /* allow shrinking in the grid cell */
  padding: .28rem .5rem;         /* smaller pill */
  font-size: .78rem;             /* smaller text */
  white-space: nowrap;           /* keep each label on one line */
  overflow: hidden;              
  text-overflow: ellipsis;       /* safety: ellipsis if space gets super tight */
  border-radius: 999px;
  grid-template-columns: 10px 1fr; /* slightly smaller dot + label */
  gap: .35rem;
}

.course-stepper .step .dot{
  width: 8px; 
  height: 8px;
}

/* Optional: on very narrow screens, allow slightly smaller min width */
@media (max-width: 400px){
  .course-stepper{ grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
}
/* --- Scope the reader-only modal so it doesn't affect auth --- */
#reader-modal.modal .dialog {
  width: min(860px, calc(100% - 32px));
  max-height: min(76vh, 940px);
  overflow: hidden;
}

/* --- Auth modals: never clip; scroll if needed --- */
#login-modal .dialog,
#signup-modal .dialog {
  /* keep your preferred width but allow vertical scroll */
  width: clamp(560px, 60vw, 720px);
  max-height: calc(100dvh - 2rem);
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Give the overlay a little padding so the bottom button isn't flush with the edge */
.modal {
  display: grid;                /* keep your centering */
  place-items: center;
  padding: clamp(12px, 2vh, 24px);
}

/* Optional: slightly tighter divider to save vertical space */
#login-form .divider,
#signup-form .divider { margin: .5rem 0; }
/* profile.css — stays on-brand with your tokens from styles.css */

.profile-shell{
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(63,106,255,.35), transparent 60%),
    radial-gradient(1000px 600px at 80% 0%, rgba(34,209,178,.25), transparent 60%),
    linear-gradient(180deg, #0B1220 0%, #0A0F1B 100%);
  color: var(--text-100);
}

/* Section */
.profile-hero{ position:relative; padding: clamp(48px, 5vw, 80px) 0; }
.profile-hero .hero-bg{ position:absolute; inset:0; pointer-events:none; }
.profile-hero .hero-bg img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.05; }
.profile-hero .orb{ position:absolute; border-radius:50%; filter: blur(90px); opacity:.12; animation: float 20s ease-in-out infinite alternate; }
.profile-hero .orb1{ width:300px; height:300px; top:12%; left:-6%; background: var(--primary-600); }
.profile-hero .orb2{ width:240px; height:240px; bottom:10%; right:-6%; background: var(--teal-500); }
.profile-hero .ring{ position:absolute; border:2px solid var(--amber-400); border-radius:50%; opacity:.08; }
.profile-hero .ring1{ width:140px; height:140px; top:20%; right:18%; animation: float 18s ease-in-out infinite; }
.profile-hero .ring2{ width:160px; height:160px; bottom:18%; left:12%; animation: float 22s ease-in-out infinite reverse; }
@keyframes float{ from{ transform:translateY(0) scale(1);} to{ transform:translateY(18px) scale(1.03);} }

/* Identity card */
.profile-card{
  display:grid; align-items:center; gap: clamp(18px, 2.8vw, 32px);
  grid-template-columns: auto 1fr auto;
  background: rgba(17,26,46,.6);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 3.2vw, 28px);
  box-shadow: var(--shadow-lg);
}

.avatar-wrap{ position:relative; width: 96px; height: 96px; }
.avatar{
  width:100%; height:100%; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(255,255,255,.12); display:none;
}
.avatar-fallback{
  width:100%; height:100%; border-radius:50%;
  display:grid; place-items:center;
  font-weight:700; font-size: 1.4rem;
  background: var(--primary-600); color: var(--brand-950);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.15);
}

.id-block h1{ margin: 0 0 .25rem; font-family: var(--font-head); }
.id-block .muted{ color: var(--text-300); margin: 0 0 .6rem; }
.chip-row{ display:flex; gap:.5rem; flex-wrap:wrap; margin:.25rem 0 1rem; }
.chip{ background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }

.action-row{ display:flex; gap:.6rem; flex-wrap:wrap; }

/* Pretty ring progress (conic) */
.ring-progress{ display:grid; place-items:center; }
.ring{
  --deg: 0deg;
  width: 120px; height: 120px; border-radius: 50%;
  background:
    conic-gradient(var(--primary-600) var(--deg), rgba(255,255,255,.08) 0);
  display:grid; place-items:center;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.ring::after{
  content:""; width: 88px; height: 88px; border-radius:50%;
  background: rgba(11,18,32,.9);
  border: 1px solid rgba(255,255,255,.08);
}
.ring-center{
  position:absolute; display:grid; place-items:center; text-align:center;
}
.ring-num{ font-family: var(--font-head); font-size: 1.4rem; }
.ring-label{ color: var(--text-300); font-size: .85rem; }

/* Stats grid */
.stats-grid{
  margin-top: 18px;
  display:grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.stat.card{
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
}
.stat-label{ color: var(--text-300); font-size:.92rem; }
.stat-value{ font-weight: 700; font-size: 1.1rem; }

/* Progress block */
.progress-block.card{
  margin-top: 1rem;
  background: rgba(17,26,46,.6);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.progress-bar{
  position: relative; height: 12px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.progress-fill{
  position:absolute; inset:0 auto 0 0;
  width: var(--p, 0%);
  background: var(--grad-primary);
  transition: width .7s cubic-bezier(.22,1,.36,1);
}
.progress-meta{
  margin-top: .6rem; display:flex; justify-content:space-between; align-items:center;
  color: var(--text-300);
}

/* Settings */
.settings.card{
  margin-top: 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.settings-form{
  display:grid; gap:.9rem; max-width: 560px;
}
.settings-form label{ display:grid; gap:.4rem; }
.settings-form input{
  padding:.7rem .85rem; border-radius: 10px;
  background: var(--brand-900);
  color: var(--text-100);
  border: 1px solid rgba(255,255,255,.12);
}
.settings-actions{ display:flex; gap:.5rem; justify-content:flex-end; }

/* Toasts (reuse theme) */
.toast-container{
  position: fixed; bottom: 1rem; right: 1rem; z-index: 999;
  display:flex; flex-direction:column; gap:.6rem;
}
.toast{
  background: rgba(17,26,46,.9); color: var(--text-100);
  padding: .8rem 1rem; border-left: 4px solid var(--primary-600);
  border-radius: 10px; box-shadow: var(--shadow-lg);
}
